Difference between revisions of "AutoIt3Wrapper Directives"

From AutoIt Wiki
Jump to navigation Jump to search
m (Tidy: Improved table formatting)
m (Run Before And After Directives)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is a list of compiler directives used by AutoIt3Wrapper.exe and their descriptions.
+
__TOC__
  
__TOC__
+
== List of AutoIt3Wrapper Directives ==
  
{| border="1" class="wikitable"
+
This is a list of compiler directives used by AutoIt3Wrapper.exe and their descriptions.
!! scope="col" | Directive
 
!! scope="col" | Options
 
!! scope="col" | Description
 
!! scope="col" | Default
 
|-
 
| #AutoIt3Wrapper_testing || (Y/N) || Skip Tidy, Obfuscator and cvsWrapper for speed while testing. || Default=N
 
|}
 
  
 
== AutoIt3 ==
 
== AutoIt3 ==
Line 20: Line 13:
 
!! scope="col" | Default
 
!! scope="col" | Default
 
|-
 
|-
| #AutoIt3Wrapper_UseX64 || (Y/N) || Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. || Default=N
+
| #AutoIt3Wrapper_testing || (Y/N) || Skip Tidy, Obfuscator and cvsWrapper for speed while testing. || N  
 
|-
 
|-
|  #AutoIt3Wrapper_Version || (B/P) || Use Beta or Production for AutoIt3 and AUT2EXE. || Default=P
+
|  #AutoIt3Wrapper_UseX64 || (Y/N) || Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. || N
 
|-
 
|-
|  #AutoIt3Wrapper_Run_Debug_Mode || (Y/N) || Run Script with console debugging. || Default=N
+
|  #AutoIt3Wrapper_Version || (B/P) || Use Beta or Production for AutoIt3 and AUT2EXE. || P
 
|-
 
|-
|  #AutoIt3Wrapper_Run_SciTE_Minimized || (Y/N) || Minimize SciTE while script is running. || Default=n
+
|  #AutoIt3Wrapper_Run_Debug_Mode || (Y/N) || Run Script with console debugging. || N
 
|-
 
|-
|  #AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized || (Y/N) || Toggle SciTE output pane at run time so its not shown. || Default=n
+
|  #AutoIt3Wrapper_Run_SciTE_Minimized || (Y/N) || Minimize SciTE while script is running. || N
 +
|-
 +
|  #AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized || (Y/N) || Toggle SciTE output pane at run time so its not shown. || N
 
|-
 
|-
 
|  #AutoIt3Wrapper_Autoit3Dir || || Optionally override the base AutoIt3 install directory. ||  
 
|  #AutoIt3Wrapper_Autoit3Dir || || Optionally override the base AutoIt3 install directory. ||  
Line 51: Line 46:
 
|  #AutoIt3Wrapper_OutFile || || Target exe/a3x filename. ||
 
|  #AutoIt3Wrapper_OutFile || || Target exe/a3x filename. ||
 
|-
 
|-
|  #AutoIt3Wrapper_OutFile_Type || || a3x=small AutoIt3 file exe=Standalone executable || Default=???
+
|  #AutoIt3Wrapper_OutFile_Type || || a3x=small AutoIt3 file exe=Standalone executable || exe
 
|-
 
|-
 
|  #AutoIt3Wrapper_OutFile_X64 || || Target exe filename for X64 compile. ||
 
|  #AutoIt3Wrapper_OutFile_X64 || || Target exe filename for X64 compile. ||
 
|-
 
|-
|  #AutoIt3Wrapper_Compression || || Compression parameter 0-40=Low 2=normal 4=High. || Default=2
+
|  #AutoIt3Wrapper_Compression || || Compression parameter 0-4. 0=Low 2=normal 4=High. || 2
 
|-
 
|-
|  #AutoIt3Wrapper_UseUpx || (Y/N) || Compress output program. || Default=Y
+
|  #AutoIt3Wrapper_UseUpx || (Y/N) || Compress output program. || Y
 
|-
 
|-
 
|  #AutoIt3Wrapper_UPX_Parameters || || Override the default setting for UPX. ||
 
|  #AutoIt3Wrapper_UPX_Parameters || || Override the default setting for UPX. ||
 
|-
 
|-
|  #AutoIt3Wrapper_Change2CUI || (Y/N) || Change output program to CUI in stead of GUI. || Default=N
+
|  #AutoIt3Wrapper_Change2CUI || (Y/N) || Change output program to CUI in stead of GUI. || N
 
|-
 
|-
|  #AutoIt3Wrapper_Compile_both || (Y/N) || Compile both X86 and X64 in one run. || Default=N
+
|  #AutoIt3Wrapper_Compile_both || (Y/N) || Compile both X86 and X64 in one run. || N
 
|}
 
|}
  
Line 80: Line 75:
 
|  #AutoIt3Wrapper_Res_Fileversion || || File Version ||  
 
|  #AutoIt3Wrapper_Res_Fileversion || || File Version ||  
 
|-
 
|-
|  #AutoIt3Wrapper_Res_FileVersion_AutoIncrement || (Y/N/P) || AutoIncrement FileVersion After AUTEXE is finished. P=Prompt, Will ask at compilation time if you want to increase the version number || Default=N
+
|  #AutoIt3Wrapper_Res_FileVersion_AutoIncrement || (Y/N/P) || AutoIncrement FileVersion After AUTEXE is finished. P=Prompt, Will ask at compilation time if you want to increase the version number || N
 
|-
 
|-
 
|  #AutoIt3Wrapper_Res_ProductVersion || || Product Version. || Default is the AutoIt3 version used.
 
|  #AutoIt3Wrapper_Res_ProductVersion || || Product Version. || Default is the AutoIt3 version used.
 
|-
 
|-
|  #AutoIt3Wrapper_Res_Language || || Resource Language code. || Default=2057 which is English (United Kingdom)
+
|  #AutoIt3Wrapper_Res_Language || || Resource Language code. || 2057 which is English (United Kingdom)
 
|-
 
|-
 
|  #AutoIt3Wrapper_Res_LegalCopyright || || Copyright field ||  
 
|  #AutoIt3Wrapper_Res_LegalCopyright || || Copyright field ||  
Line 90: Line 85:
 
|  #AutoIt3Wrapper_res_requestedExecutionLevel || || asInvoker, highestAvailable, requireAdministrator or None (remove the trustInfo section). || Default is the setting from AUT2EXE - asInvoker.
 
|  #AutoIt3Wrapper_res_requestedExecutionLevel || || asInvoker, highestAvailable, requireAdministrator or None (remove the trustInfo section). || Default is the setting from AUT2EXE - asInvoker.
 
|-
 
|-
|  #AutoIt3Wrapper_res_Compatibility || || Vista, Windows7 both allowed separated by a comma. ||  Default=None
+
|  #AutoIt3Wrapper_res_Compatibility || || Vista, Windows7 both allowed separated by a comma. ||  None
 
|-
 
|-
|  #AutoIt3Wrapper_Res_SaveSource || (Y/N) || Save a copy of the script source in the EXE resources. || Default=N
+
|  #AutoIt3Wrapper_Res_SaveSource || (Y/N) || Save a copy of the script source in the EXE resources.  If Y then the content of the script source depends on the #AutoIt3Wrapper_Run_Obfuscator and #obfuscator_parameters directives. || N
 
|}
 
|}
  
If #AutoIt3Wrapper_Res_SaveSource=Y Then the content of the script source depends on the #AutoIt3Wrapper_Run_Obfuscator and #obfuscator_parameters directives.
+
=== Add Extra Fields to The Resources ===
 
 
=== Add Extra Files to The Resources ===
 
  
 
A maximum of fifteen free form resource fields.The following variables are available:
 
A maximum of fifteen free form resource fields.The following variables are available:
Line 111: Line 104:
 
An example:
 
An example:
 
   #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
 
   #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
   #AutoIt3Wrapper_Res_Field Free format fieldname|fieldvalue
+
   #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue
   #AutoIt3Wrapper_Res_Field Free format fieldname|fieldvalue
+
   #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue
   #AutoIt3Wrapper_Res_Field Free format fieldname|fieldvalue
+
   #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue
  
Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 5) etc
+
Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 5) etc.
  
list of filename of the Ico files to be added, First one will have number 5, then 6 ..etc
+
list of filename of the Ico files to be added, First one will have number 5, then 6 etc.
  
 
   #AutoIt3Wrapper_Res_Icon_AddFilename[,LanguageCode] of ICO to be added.
 
   #AutoIt3Wrapper_Res_Icon_AddFilename[,LanguageCode] of ICO to be added.
Line 131: Line 124:
 
!! scope="col" | Default
 
!! scope="col" | Default
 
|-
 
|-
|  #AutoIt3Wrapper_Run_Tidy || (Y/N)||  Run Tidy before compilation. || Default=N
+
|  #AutoIt3Wrapper_Run_Tidy || (Y/N)||  Run Tidy before compilation. || N
 
|-
 
|-
|  #AutoIt3Wrapper_Tidy_Stop_OnError || (Y/N) || Continue when only Warnings. || Default=Y
+
|  #AutoIt3Wrapper_Tidy_Stop_OnError || (Y/N) || Continue when only Warnings. || Y
 
|-
 
|-
 
|  #Tidy_Parameters || || See the SciTE4AutoIt3 helpfile for options. ||
 
|  #Tidy_Parameters || || See the SciTE4AutoIt3 helpfile for options. ||
 
|}
 
|}
  
== Obfuscator ==
+
== AU3Stripper ==
 +
 
 +
The directives used within the script to control Au3Stripper are as follows:
  
 
{| border="1" class="wikitable"
 
{| border="1" class="wikitable"
Line 146: Line 141:
 
!! scope="col" | Default
 
!! scope="col" | Default
 
|-
 
|-
|   #AutoIt3Wrapper_Run_Obfuscator || (Y/N) || Run Obfuscator before compilation. || Default=N
+
| #AutoIt3Wrapper_Run_Au3Stripper || (y/n) || Run Au3Stripper before compilation. || n
 +
|-
 +
| #Au3Stripper_Parameters || || Use the parameters as listed below. ||
 +
|-
 +
| #Au3Stripper_Off ||  || Stop the Stripping process below this line. ||
 +
|-
 +
| #Au3Stripper_On ||  || Start the Stripping process below this line. ||
 
|-
 
|-
|  #obfuscator_parameters || || See the SciTE4AutoIt3 helpfile for options. ||
+
| #Au3Stripper_Ignore_Funcs ||| Do not Strip these functions. ||
 +
|-
 +
| #Au3Stripper_Ignore_Variables || || Do not Strip these variables. ||
 
|}
 
|}
  
 
+
{| border="1" class="wikitable"
If #AutoIt3Wrapper_Run_Obfuscator=Y and if #obfuscator_parameters=/STRIPONLY then the script source is stripped and the includes are stripped.
+
|+ Parameters
 
+
!! scope="col" | Directive
 
+
!! scope="col" | Options
If #obfuscator_parameters=/STRIPONLYINCLUDES then script source is skipped and the includes are stripped.
+
!! scope="col" | Description
 
+
!! scope="col" | Default
 
+
|-
With any other parameters, the SaveSource directive is ignored as obfuscation is intended to protect the source.
+
| PreExpand ||  || Replace any reference to a Global Const variable with its actual value. ||
 
+
|-
 
+
| StripOnly || (SF/SV) ||  || SV = 1
If #AutoIt3Wrapper_Run_Obfuscator=N or is not set then script source is original script only.
+
|-
 
+
| StripUnusedFunc ||  || Remove unused Funcs. || 0
 
+
|-
Autoit3Wrapper indicates the SaveSource action taken in the SciTE console during compilation.
+
| StripUnusedVars ||  || Remove unused Global variable declarations. || 0
 +
|-
 +
| StripOnlyIncludes ||  || Same as /SO but leaves the main script untouched. ||
 +
|-
 +
| MergeOnly ||  || Will produce a scriptfile as AUT2EXE includes in the Compiled EXE. This allows you to find the proper linenumber when errors are reported. ||
 +
|-
 +
| RenameMinimum ||  || Generates a much smaller file by substituting function and variable names with unique 2+-character names. ||
 +
|-
 +
| ShowConsoleInfo || (0/1/9) || 0 = Minimal output to the console - only warnings and errors. 1 = Show more progress information 9 = Show all debug lines as found in the Au3Stripper.log. || 0
 +
|-
 +
| Beta ||  || Use the ...\AutoIt\Beta\Include files if installed. ||
 +
|}
  
 
== AU3Check ==
 
== AU3Check ==
Line 174: Line 188:
 
!! scope="col" | Default
 
!! scope="col" | Default
 
|-
 
|-
|  #AutoIt3Wrapper_Run_AU3Check || (Y/N) || Run au3check before compilation. || Default=Y
+
|  #AutoIt3Wrapper_Run_AU3Check || (Y/N) || Run au3check before compilation. || Y
 
|-
 
|-
 
|  #AutoIt3Wrapper_AU3Check_Parameters || || Au3Check parameters ||
 
|  #AutoIt3Wrapper_AU3Check_Parameters || || Au3Check parameters ||
 
|-
 
|-
|  #AutoIt3Wrapper_AU3Check_Stop_OnWarning || (Y/N) || N=Continue on Warnings. || Default=Y (Always stop on warnings.)
+
|  #AutoIt3Wrapper_AU3Check_Stop_OnWarning || (Y/N) || N=Continue on Warnings. || Y (Always stop on warnings.)
 
|-
 
|-
 
|  #AutoIt3Wrapper_PlugIn_Funcs || || Define PlugIn function names separated by a comma to avoid AU3Check errors. ||
 
|  #AutoIt3Wrapper_PlugIn_Funcs || || Define PlugIn function names separated by a comma to avoid AU3Check errors. ||
Line 191: Line 205:
 
!! scope="col" | Default
 
!! scope="col" | Default
 
|-
 
|-
  | #AutoIt3Wrapper_Versioning || (Y/N/V) || Run versioning to update the script source. V=only run when fileversion is increased by #AutoIt3Wrapper_Res_FileVersion_AutoIncrement. || Default=N
+
  | #AutoIt3Wrapper_Versioning || (Y/N/V) || Run versioning to update the script source. V=only run when fileversion is increased by #AutoIt3Wrapper_Res_FileVersion_AutoIncrement. || N
 
  |-
 
  |-
 
  | #AutoIt3Wrapper_Versioning_Parameters || || /NoPrompt: Will skip the Comments prompt /Comments: Text to added in the Comments. It can also contain the below variables. ||
 
  | #AutoIt3Wrapper_Versioning_Parameters || || /NoPrompt: Will skip the Comments prompt /Comments: Text to added in the Comments. It can also contain the below variables. ||
Line 198: Line 212:
 
== Run Before And After Directives ==
 
== Run Before And After Directives ==
  
The following directives can contain: these variables
+
The following directives can contain these variables:
  
 
%in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.
 
%in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.

Latest revision as of 18:49, 20 October 2019

List of AutoIt3Wrapper Directives

This is a list of compiler directives used by AutoIt3Wrapper.exe and their descriptions.

AutoIt3

Directive Options Description Default
#AutoIt3Wrapper_testing (Y/N) Skip Tidy, Obfuscator and cvsWrapper for speed while testing. N
#AutoIt3Wrapper_UseX64 (Y/N) Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. N
#AutoIt3Wrapper_Version (B/P) Use Beta or Production for AutoIt3 and AUT2EXE. P
#AutoIt3Wrapper_Run_Debug_Mode (Y/N) Run Script with console debugging. N
#AutoIt3Wrapper_Run_SciTE_Minimized (Y/N) Minimize SciTE while script is running. N
#AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized (Y/N) Toggle SciTE output pane at run time so its not shown. N
#AutoIt3Wrapper_Autoit3Dir Optionally override the base AutoIt3 install directory.
#AutoIt3Wrapper_Aut2exe Optionally override the Aut2exe.exe to use for this script
#AutoIt3Wrapper_AutoIt3 Optionally override the Autoit3.exe to use for this script
#AutoIt3Wrapper_Add_Constants Add the needed standard constant include files. Will only run one time.

AUT2EXE

Directive Options Description Default
#AutoIt3Wrapper_Icon Filename of the Ico file to use
#AutoIt3Wrapper_OutFile Target exe/a3x filename.
#AutoIt3Wrapper_OutFile_Type a3x=small AutoIt3 file exe=Standalone executable exe
#AutoIt3Wrapper_OutFile_X64 Target exe filename for X64 compile.
#AutoIt3Wrapper_Compression Compression parameter 0-4. 0=Low 2=normal 4=High. 2
#AutoIt3Wrapper_UseUpx (Y/N) Compress output program. Y
#AutoIt3Wrapper_UPX_Parameters Override the default setting for UPX.
#AutoIt3Wrapper_Change2CUI (Y/N) Change output program to CUI in stead of GUI. N
#AutoIt3Wrapper_Compile_both (Y/N) Compile both X86 and X64 in one run. N

Target Program Resource Info

Directive Options Description Default
#AutoIt3Wrapper_Res_Comment Comment field
#AutoIt3Wrapper_Res_Description Description field
#AutoIt3Wrapper_Res_Fileversion File Version
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement (Y/N/P) AutoIncrement FileVersion After AUTEXE is finished. P=Prompt, Will ask at compilation time if you want to increase the version number N
#AutoIt3Wrapper_Res_ProductVersion Product Version. Default is the AutoIt3 version used.
#AutoIt3Wrapper_Res_Language Resource Language code. 2057 which is English (United Kingdom)
#AutoIt3Wrapper_Res_LegalCopyright Copyright field
#AutoIt3Wrapper_res_requestedExecutionLevel asInvoker, highestAvailable, requireAdministrator or None (remove the trustInfo section). Default is the setting from AUT2EXE - asInvoker.
#AutoIt3Wrapper_res_Compatibility Vista, Windows7 both allowed separated by a comma. None
#AutoIt3Wrapper_Res_SaveSource (Y/N) Save a copy of the script source in the EXE resources. If Y then the content of the script source depends on the #AutoIt3Wrapper_Run_Obfuscator and #obfuscator_parameters directives. N

Add Extra Fields to The Resources

A maximum of fifteen free form resource fields.The following variables are available:

%AutoItVer% = will be replaced with the version of AutoIt3

%date% = PC date in short date format

%longdate% = PC date in long date format

%time% = PC timeformat

An example:

 #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
 #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue
 #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue
 #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue

Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 5) etc.

list of filename of the Ico files to be added, First one will have number 5, then 6 etc.

 #AutoIt3Wrapper_Res_Icon_AddFilename[,LanguageCode] of ICO to be added.
 #AutoIt3Wrapper_Res_File_AddFilename[,Section [,ResName[,LanguageCode]]] to be added.

Tidy

Directive Options Description Default
#AutoIt3Wrapper_Run_Tidy (Y/N) Run Tidy before compilation. N
#AutoIt3Wrapper_Tidy_Stop_OnError (Y/N) Continue when only Warnings. Y
#Tidy_Parameters See the SciTE4AutoIt3 helpfile for options.

AU3Stripper

The directives used within the script to control Au3Stripper are as follows:

Directive Options Description Default
#AutoIt3Wrapper_Run_Au3Stripper (y/n) Run Au3Stripper before compilation. n
#Au3Stripper_Parameters Use the parameters as listed below.
#Au3Stripper_Off Stop the Stripping process below this line.
#Au3Stripper_On Start the Stripping process below this line.
#Au3Stripper_Ignore_Funcs Do not Strip these functions.
#Au3Stripper_Ignore_Variables Do not Strip these variables.
Parameters
Directive Options Description Default
PreExpand Replace any reference to a Global Const variable with its actual value.
StripOnly (SF/SV) SV = 1
StripUnusedFunc Remove unused Funcs. 0
StripUnusedVars Remove unused Global variable declarations. 0
StripOnlyIncludes Same as /SO but leaves the main script untouched.
MergeOnly Will produce a scriptfile as AUT2EXE includes in the Compiled EXE. This allows you to find the proper linenumber when errors are reported.
RenameMinimum Generates a much smaller file by substituting function and variable names with unique 2+-character names.
ShowConsoleInfo (0/1/9) 0 = Minimal output to the console - only warnings and errors. 1 = Show more progress information 9 = Show all debug lines as found in the Au3Stripper.log. 0
Beta Use the ...\AutoIt\Beta\Include files if installed.

AU3Check

Directive Options Description Default
#AutoIt3Wrapper_Run_AU3Check (Y/N) Run au3check before compilation. Y
#AutoIt3Wrapper_AU3Check_Parameters Au3Check parameters
#AutoIt3Wrapper_AU3Check_Stop_OnWarning (Y/N) N=Continue on Warnings. Y (Always stop on warnings.)
#AutoIt3Wrapper_PlugIn_Funcs Define PlugIn function names separated by a comma to avoid AU3Check errors.

Versioning

Directive Options Description Default
#AutoIt3Wrapper_Versioning (Y/N/V) Run versioning to update the script source. V=only run when fileversion is increased by #AutoIt3Wrapper_Res_FileVersion_AutoIncrement. N
#AutoIt3Wrapper_Versioning_Parameters /NoPrompt: Will skip the Comments prompt /Comments: Text to added in the Comments. It can also contain the below variables.

Run Before And After Directives

The following directives can contain these variables:

%in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.

%scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.

%fileversion% is the information from the #AutoIt3Wrapper_Res_Fileversion directive

%scitedir% will be replaced by the SciTE program directory

%autoitdir% will be replaced by the AutoIt3 program directory

#AutoIt3Wrapper_Run_Before process to run before compilation.  
You can have multiple records that will be processed in sequence.

#AutoIt3Wrapper_Run_After process to run after compilation.  
You can have multiple records that will be processed in sequence.

Conditional Directives

Optional use this format for the supported directives to have seperate directive values for Run and Compile.

The GUI is not available when this format is used.

#AutoIt3Wrapper_If_Run
 #AutoIt3Wrapper_Run_AU3Check=y
 #AutoIt3Wrapper_Jump_To_First_Error=y
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=n
 #AutoIt3Wrapper_Run_Tidy=n
 #Tidy_Parameters=
 #AutoIt3Wrapper_Tidy_Stop_onerror=n
#AutoIt3Wrapper_If_Compile
 #AutoIt3Wrapper_Run_AU3Check=y
 #AutoIt3Wrapper_Jump_To_First_Error=y
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
 #AutoIt3Wrapper_Run_Tidy=y
 #Tidy_Parameters=/gd /nsdp
 #AutoIt3Wrapper_Tidy_Stop_onerror=y
#AutoIt3Wrapper_EndIf