Jump to content

francoiste

Active Members
  • Posts

    79
  • Joined

  • Last visited

Community Answers

  1. francoiste's post in setting FileVersion from environment variable (expansion during compile time) was marked as the answer   
    update:
    earlier i said i had found a suitable workaround by using #AutoIt3Wrapper_Run_Before to dynamically gereate the required #include file.
    this worked fine when compiling from the scite.exe editor (GUI).
    however, in the context of the automated build system i hit another problem.
    it seems the "AutoIt3Wrapper.exe" does not execute the "Run_Before" when being invoked to compile the script from the command line:
    AutoIt3Wrapper.exe" /in "%MySourceRoot%\MyTool.au3" in turn it will not generate (or rather update) the required include file.
    so by now i have discarded the approach with "Run_Before" of the wrapper.
    instead, the build system is now generating the include file itself - right before doing the compilation:
    REM pseudo batch echo #pragma compile(FileVersion, %MyBuildNumber%, %MyBuildNumber%) > "%MySourceRoot%\_tmp_MyBuildNumber.au3" AutoIt3Wrapper.exe" /in "%MySourceRoot%\MyTool.au3" and the source of "MyTool.au3" looks like:
    #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=Y #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "_tmp_MyBuildNumber.au3" ;this contains the pragma for the FileVersion - generated by the build system #pragma compile(FileDescription, 'My Super Tool') #pragma compile(ProductName, 'My Tool') #pragma compile(LegalCopyright, 'My Company 2014') #pragma compile(CompanyName, 'My Company') #pragma compile(Comments, 'For internal use only') #pragma compile(ExecLevel, highestAvailable) #pragma compile(Icon, MyTool.ico) i need to admit this #pragma feature in AutoIt was new to me.
    still, the initial request for some "compiler directives" to do expansion / resolution during "compile time" remains valid, i think.
×
×
  • Create New...