Smart Package Robot 's "Script to Executable" Compiler

<< Click to Display Table of Contents >>

Navigation:  2. Components > 2. EXE-Compiler >

Smart Package Robot 's "Script to Executable" Compiler

'#EXC: - Exclude from Executable

Previous Top Next


Compiler-Directives

 

'#EXC: - Exclude from Package

Used to prevent files and folders from being packed into the executable.

 

 

Intention

 

Compiler-Directives start with the Sequence:

'#

Which is a comment-sign on the left and then the #.

 

Because of the comment sign, the running script ignores these commands at Runtime (at time of script execution).

 

At Compile-Time these commands can change several behaviors. Compile-Time, that is, when the script is been compiled to an Standalone EXE-File

 

'#EXC:

The "'#EXC:" will exclude files or folders from the Package.

 

Important:

Use the '#EXC: - Directive before any other directive that may include files or folders. The '#EXC: will starting from the time it was read. Lines above the directive are not influenced.

 

The '#EXC: understands the File-Wildcards, these are:

*  - match anything that follows

? - match to a single character, letter or number

# - match to a numeric character (0-9)

 

Examples:

' The following lines will exclude files from the package.

'#EXC:Folder*.exe

'#EXC:Folder.e??

'#EXC:Folder*.*

'#EXC:*.bmp

 

' The following lines will exclude Dirs from the package.

'#EXC:mydir\

'#EXC:my*\

'#EXC:Sub Fol*\

'#EXC:Subfolder\Subfolder_??\

 

How do I exclude files or folders into the package?

 

Using the "\" at the end or inside the specified parameter, will exclude a folder.

'#EXC:myfolder\

 

Just giving a name without a \ will exclude a File..

'#EXC:myfile.bmp

 

... or a group of files. You can use wildcards for this.

'#EXC:*.bmp

 

You can use special folders, and you can use wildcards. Excluding a folder will always exclude all subfolders and sub-files from this folder.

'#EXC:?path\reserve\

 

You can also give a path between folders, to exclude a specified folder, even if there are multiple folders with the same name on different locations.

 

graphic

 

'#EXC:*A\O21\

 

The given example above will exclude the folder O21 below the "Sub Folder A", but will not exclude the other O21 Folder in ?path\.

 

Here is another example. Assume we have the folder "O21" in ?path\.

 

graphic

 

Now we want to include the file "I-Test_01.exe" but wedo not want to include the PNG-Files. We can do it like that:

 

'#EXC:*.png

'#INC:?pfad\O21\*

 

This way, we include the whole folder excluding all *.PNG-Files.

Always remember that

 

 

 

Syntax:

 

'#EXC:P1[*][?][#][\]

 

 

 

Example:

 

'----------------------------------------

' Compile-Time Commands

'----------------------------------------

'#SPI:ForceWrite

'#EXC:*.png

'#INC:?pfad\O21\*

'

' The following line will change the target path for the EXE-Compiler.

'#EXE:?desktop\

'

EXO.?path\

MBX.!

END.

 

 

Parameter Explanation:

 

-

 

 

Remarks:

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.5 '#INC: - Include Files and Folders into the Executable

    1.3 '#SPI: - Special Instructions

    Specialfolders

    #ONCE / # OEND - Multiple Include Protection

    1.6 #INC: - Pre-Processor File-Include