Developers Jos Posted September 21, 2004 Author Developers Posted September 21, 2004 (edited) Here's how it will function (when its ready): compileau3.exe will; - read the command line options like aut2exe supports. - read any info from the SCRIPTNAME.INI file as defaults if its available. - read the script searching for compiler directives. If found, it will override any other setting. Also the info isn't saved into an INI file when Directives are found. - a menu is displayed (there will be a compiler directive for this as well) - run RC.exe (optional) return code reported to console. - run reshack.exe (optional) return code reported to console. - run aut2exe.exe , return code reported to console. - Save all setting to SCRIPTNAME.INI when no directives are found in the script. This is the list of directives it will handle; #Region Compiler directives section ;** This is a list of compiler directives used by CompileAU3.exe. ;** comment the lines you don't need or else it will override the default settings #Compiler_Prompt=y ;y=show compile menu ;** AUT2EXE settings #Compiler_AUT2EXE= ;Override the defaut compiler with this version. #Compiler_Icon= ;Full Path/filename to the Ico to use #Compiler_Compression=2 ;Compression parameter 0-4 0=Low 2=normal 4=High #Compiler_Allow_Decompile=y ;y= allow decompile #Compiler_PassPhrase= ;Password to use for compilation ;** Target program Resource info #Compiler_Res_Comment= ;Comment field #Compiler_Res_Description= ;Description field #Compiler_Res_Fileversion= ;File Version #Compiler_Res_Field1Name= ;Free format fieldname 1 (could be used for Copyright/Company/Programmer etc #Compiler_Res_Field1Value= ;Free format fieldvalue 1 #Compiler_Res_Field2Name= ;Free format fieldname 2 #Compiler_res_Field2Value= ;Free format fieldvalue 2 #EndRegion Edited September 21, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
CyberSlug Posted September 21, 2004 Posted September 21, 2004 The problem appears to be with the ResHacker command line paramters....ResHacker.exe -addoverwrite ExeFile, SaveAsFile, ResourceFile, ResourceMaskI'll investigate more..... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Developers Jos Posted September 21, 2004 Author Developers Posted September 21, 2004 (edited) Ok here goes.... Just uploaded http://www.autoitscript.com/fileman/users/jdeb/scite4au3upd.exe which includes version 0.16 of Compileau3.exe and ResHacker.exe and an updated AU3.properties & Scite4AutoIt3.chm.This version of Compileau3.exe supports Compiler directives inside the script which enable you to generate a compiled version of your script with the settings defined inside your script.Just run the installer to update your SciTe installation. Ctrl+F7 will run Compileau3.exe.This is the list of the Compiler directives Compileau3.exe understands (this example is used in compileau3.au3). They are also listed in directives.au3, located in the compileau3 subdirectory: #Region Compiler directives section ;** This is a list of compiler directives used by CompileAU3.exe. ;** comment the lines you don't need or else it will override the default settings #Compiler_Prompt=n ;y=show compile menu ;** AUT2EXE settings #Compiler_AUT2EXE=d:\AutoIt3\au3beta\aut2exe.exe #Compiler_Icon=C:\Program Files\AutoIt3\Aut2Exe\Icons\AutoIt_32x32x256.ico #Compiler_Compression=2 ;Compression parameter 0-4 0=Low 2=normal 4=High #Compiler_Allow_Decompile=y ;y= allow decompile ;#Compiler_PassPhrase= ;Password to use for compilation ;** Target program Resource info #Compiler_Res_Comment=Compile your Autoit3 script menu where you can change the setting of the compiler and resource information. #Compiler_Res_Description=Compile your Autoit3 script with options. #Compiler_Res_Fileversion=0.16 ;File Version #Compiler_Res_LegalCopyright=JoSoft #Compiler_Res_Field1Name=Created By ;Free format fieldname 1 (could be used for Copyright/Company/Programmer etc #Compiler_Res_Field1Value=Jos van der Zande ;Free format fieldvalue 1 #Compiler_Res_Field2Name=Email ;Free format fieldname 2 #Compiler_Res_Field2Value=jdeb@autoitscript.com ;Free format fieldvalue 2 #EndRegionWhen you prefer not to use the directives, compileau3.exe will save all settings you do in the same directory as the script with the ScriptFileName.au3.INI to avoid having to retype all setting everytime.I am pretty happy the way this works, if you don't mind me saying this .. Enjoy,http://www.autoitscript.com/fileman/users/jdeb/test/compileau3.png Edited September 21, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
emmanuel Posted September 21, 2004 Posted September 21, 2004 When you prefer not to use the directives, compileau3.exe will save all settings you do in the same directory as the script with the ScriptFileName.au3.INI to avoid having to retype all setting everytime. I am pretty happy the way this works, if you don't mind me saying this .. Enjoy, http://www.autoitscript.com/fileman/users/jdeb/test/compileau3.png <{POST_SNAPBACK}>what happens if there is a #compiler_ directive that doesn't have a value, would it prompt for a value? "I'm not even supposed to be here today!" -Dante (Hicks)
Developers Jos Posted September 21, 2004 Author Developers Posted September 21, 2004 (edited) what happens if there is a #compiler_ directive that doesn't have a value, would it prompt for a value? <{POST_SNAPBACK}>Only when you have the #Compiler_Prompt=y. An empty value will set that parameter to blank, and if its a needed value it will take the last used value like aut2exe handles it. Only errors are reported like an invalid aut2exe.exe path .... If you don't want to use a particular #compiler directive, just comment it out... Edited September 21, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
emmanuel Posted September 21, 2004 Posted September 21, 2004 Only when you have the #Compiler_Prompt=y. An empty value will set that parameter to blank, and if its a needed value it will take the last used value like aut2exe handles it. Only errors are reported like an invalid aut2exe.exe path .... If you don't want to use a particular #compiler directive, just comment it out... <{POST_SNAPBACK}>cool, right on. I've added the #compiler directives to my template file, and am about to give it a test run... "I'm not even supposed to be here today!" -Dante (Hicks)
CyberSlug Posted September 22, 2004 Posted September 22, 2004 Got it working I encountered at least two problems: 1) The FileVersion string cannot contain letters such as "v1.0"! This causes RC.exe to FAIL to generate the temp.res file which prevents AutoItSC.bin from being updated.... 2) At least one time when I ran the compiler, I was asked to specify the directory containing AutoItSC.bin..... and I pointed it to copies of these file in my testing directory instead of the official "C:\Program Files\AutoIt3\Aut2Exe" directory. Apparently, this prevented the AutoitscT.bin file from properly overwriting AutoItSC.bin .... I hope this makes sense Thanks for the wondeful util, JdeB :cool: Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Developers Jos Posted September 22, 2004 Author Developers Posted September 22, 2004 Got it working I encountered at least two problems: 1) The FileVersion string cannot contain letters such as "v1.0"! This causes RC.exe to FAIL to generate the temp.res file which prevents AutoItSC.bin from being updated.... 2) At least one time when I ran the compiler, I was asked to specify the directory containing AutoItSC.bin..... and I pointed it to copies of these file in my testing directory instead of the official "C:\Program Files\AutoIt3\Aut2Exe" directory. Apparently, this prevented the AutoitscT.bin file from properly overwriting AutoItSC.bin .... I hope this makes sense Thanks for the wondeful util, JdeB :cool: <{POST_SNAPBACK}>1)That is correct.. maybe i should test for its validity... 2)When a directory is specified where one of the 3 needed files is missing, Aut2exe.exe, upx.exe, AutoitSC.Bin, it will prompt for a directory that contains all 3 files. tnx for the feedback..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
MHz Posted September 22, 2004 Posted September 22, 2004 emmanuel, may have a point. Advantages to having information in the script itself? 1. Can use different icon depending on script. 2. Info like version, description and comments will remain with script. 3. Only 2 or 3 extra lines in script, I assume. If this method is used, maybe have an Opt() function for informing compiler that personalized copyright information is to be used? (Replaces checkbox used in Compileau3.exe)
Developers Jos Posted September 22, 2004 Author Developers Posted September 22, 2004 emmanuel, may have a point. Advantages to having information in the script itself? 1. Can use different icon depending on script. 2. Info like version, description and comments will remain with script. 3. Only 2 or 3 extra lines in script, I assume. If this method is used, maybe have an Opt() function for informing compiler that personalized copyright information is to be used? (Replaces checkbox used in Compileau3.exe) <{POST_SNAPBACK}>Did you see my post (up a few) that starts with: Here Goes.. ? Compiler directives are implemented in the latest version. You can just specify only those things you want to override without the menu being shown...... Hope this answers your question.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
MHz Posted September 22, 2004 Posted September 22, 2004 Thanks JdeB, I'm sorry, posted before trying your last update or fully absorbing the information detailed for it. :">
this-is-me Posted September 22, 2004 Posted September 22, 2004 @jdeb, I just got into this post a second ago, and I must say that this functionality is just what I needed, but I need another couple of favors as well [please tell me of this has been added already]:Run any au3 scripting needed before compilingRun any au3 scripting needed after compilingAn example of this is:run au3check and tidy before compilingcompileautoupload to an ftp site when done compilingalso, does this set the compileau3 as the default item on right-click -> Compile? If not, please add this as well.I have done a similar program before, but I have not been up-to-date on the reshacking stuff:http://www.autoitscript.com/forum/index.php?showtopic=3912I have been happily using my version for a long time, and would prefer to see these extra features in your version as well. Who else would I be?
Developers Jos Posted September 22, 2004 Author Developers Posted September 22, 2004 @jdeb, I just got into this post a second ago, and I must say that this functionality is just what I needed, but I need another couple of favors as well [please tell me of this has been added already]: Run any au3 scripting needed before compiling Run any au3 scripting needed after compiling An example of this is: run au3check and tidy before compiling compile autoupload to an ftp site when done compiling <{POST_SNAPBACK}>With the current SciTe installer you only get the Au3check&Compile Ctrl&Shift&F7 option currently, but its easy to make yourself a batchfile and add a shortcut to the SciteUser.properties... I think tidy is something i would always want to see the result of before compiling. also, does this set the compileau3 as the default item on right-click -> Compile? If not, please add this as well.Its the Right mouse click/Compile with Options. I have done a similar program before, but I have not been up-to-date on the reshacking stuff: http://www.autoitscript.com/forum/index.php?showtopic=3912 I have been happily using my version for a long time, and would prefer to see these extra features in your version as well. <{POST_SNAPBACK}>If there are more supporters for making this a build in function, i would be happy to have a closer look at your script and see if it can be build in with Compiler directives and all..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
emmanuel Posted September 22, 2004 Posted September 22, 2004 I think tidy is something i would always want to see the result of before compiling. <{POST_SNAPBACK}>definately, I compile more often than I tidy thanks to the good job that scite already does at helping me keep it neet. "I'm not even supposed to be here today!" -Dante (Hicks)
this-is-me Posted September 22, 2004 Posted September 22, 2004 I always run an au3check before compiling my scripts, Just in case I make a stupid error, which I almost always do when making major changes. I also upload my script immediately when done compiling, so. @jdeb, I noticed a problem. I use a flash drive for my scripts, so the drive letter is not always the same on multiple computers. If I use an icon in the same directory as the script, You would think that if I had #Compiler_Icon=file.ico then the compiler would look in the same folder as the script for the icon, but it doesn't. Can this be fixed? Who else would I be?
emmanuel Posted September 22, 2004 Posted September 22, 2004 I always run an au3check before compiling my scripts, Just in case I make a stupid error, which I almost always do when making major changes. I also upload my script immediately when done compiling, so. @jdeb, I noticed a problem. I use a flash drive for my scripts, so the drive letter is not always the same on multiple computers. If I use an icon in the same directory as the script, You would think that if I had #Compiler_Icon=file.ico then the compiler would look in the same folder as the script for the icon, but it doesn't. Can this be fixed? <{POST_SNAPBACK}>good point as I've taken to backing my scripts up on flashdrive and network so I can fiddle with them wherever I'm at... "I'm not even supposed to be here today!" -Dante (Hicks)
Developers Jos Posted September 23, 2004 Author Developers Posted September 23, 2004 I always run an au3check before compiling my scripts, Just in case I make a stupid error, which I almost always do when making major changes. I also upload my script immediately when done compiling, so. <{POST_SNAPBACK}>I do the same... thats why i added the batchfile for Check&Compile. If everybody is happy with the compileau3.exe wrapper, i can change the batchfile to run compileau3 always in stead of aut2exe so you can use the Ctrl+Shift+F7 shortcut. @jdeb, I noticed a problem. I use a flash drive for my script as, so the drive letter is not always the same on multiple computers. If I use an icon in the same directory as the script, You would think that if I had #Compiler_Icon=file.ico then the compiler would look in the same folder as the script for the icon, but it doesn't. Can this be fixed? <{POST_SNAPBACK}>The problem you see is due to the fact that AUT2EXE wants the full path. Thats why the comment stated that as well. Having said that, i like the idea that when just a filename.ico is specified we assume its in the script directory, so its easy for me to add that to it before running aut2exe. I will also add 2 directives for running a program/batchfile before and after the compile task. stay tunned.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
emmanuel Posted September 23, 2004 Posted September 23, 2004 If everybody is happy with the compileau3.exe wrapper, i can change the batchfile to run compileau3 always in stead of aut2exe so you can use the Ctrl+Shift+F7 shortcut. <{POST_SNAPBACK}>yes please! "I'm not even supposed to be here today!" -Dante (Hicks)
Developers Jos Posted September 23, 2004 Author Developers Posted September 23, 2004 (edited) Just uploaded CompileAU3.exe ver 0.17, included in http://www.autoitscript.com/fileman/users/jdeb/scite4au3updtable.exe and has the following updates:- Modified GUI code to the latest unstable build ( Great stuff guys, these new command... it was a lot of work to change but much more logical to code and read!)- Added Tabs to the Gui to handle the extra fields.- Changed:When the ICO file is specified without a fullpath, the scriptdir is assumed and is checked if it exists. when the file isn't available it is changed back to the last used ICO.- Added 2 directives and fields to the menu for:#Compiler_Run_Before = ;process to run before compilation#Compiler_Run_After = ;process to run After compilationHere you can define a program/batchfile/script to run before and after compilation.Pls test and let me know if I broke anything...The installer also contains the updated GUI function definitions for Scite and utilities.Enjoy,http://www.autoitscript.com/fileman/users/jdeb/test/compileau3.png Edited September 23, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now