Moderators Melba23 Posted January 29, 2009 Moderators Posted January 29, 2009 Hi, When I compile a script which includes any resources the first thing that appears in the small compiling window is the message "Creating resource file". For one of my scripts, which contains a fair number of icons and other resources, this takes very nearly half the time of the whole compile. As the resources are unlikely to change, but I am often tinkering with the code of the script, is there a way to get the resource file compiled ahead of time, so that the overall compile time can be reduced? I had a look at ResHacker, but it seems to allow only 1 resource to be saved at any one time. It does allow the creation of a .rc file, but this appears to be a list of resource names only. Is there an AutoItWrapper directive which will produce a .res file? There seems to be one for everything else, but I cannot find one for this. And if I manage to produce a .res file, how to include it in the compile process? Thanks in advance for any pointers, M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Developers Jos Posted January 29, 2009 Developers Posted January 29, 2009 (edited) Which version of autoit3wrapper are you using, because this is removed for a while since i coded the builin resource update functions. EDIT: 02/16/2008 *** Updated AutoIt3Wrapper_Gui/AutoIt3Wrapper v1.10.1.4 (Jos) - Added: Buildin Resource update functions instead of requiring RC.exe and Reshacker. This also enables the resource update of x64 compiled scripts. RC.exe is the program that used to create the res file from the generated rc file Jos Edited January 29, 2009 by Jos 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.
Mobius Posted January 29, 2009 Posted January 29, 2009 (edited) @Melba23,If you like Reshacker you could also::create an empty (zero byte) file with a .res extension and either open it up with the reshacker gui and add resources from scratch,or use reshackers excellent scriptable functions to add / Update mass amounts of resources ahead of time.The wrapper method is probably loads easier and cleaner to implement, but I do not use standard build methods.check out the reshack documentation for information regarding the scriptable functions. (which are similar to cmdline ones.)Ed: Spelling Edited January 29, 2009 by Mobius
Moderators Melba23 Posted January 29, 2009 Author Moderators Posted January 29, 2009 Mobius, Thank you for that tip about Reshacker. It is obvious when you think about it - I was fixated on saving the resources from the .exe and never thought of using the originals! Jos, I am using the 20-12-2008 download (I also have the latest beta since our "include source code" discussion yesterday). There is no RC.exe in my AutoIt folders (or anywhere else for that matter). If I were to use the Reshacker method, how then to use the .res file when compiling with AutoItWrapper? Thank you both for your quick replies. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Developers Jos Posted January 29, 2009 Developers Posted January 29, 2009 When you see this "Creating resource file" it is actually adding the resources to the output file, not creating a RES file. Jos 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.
Moderators Melba23 Posted January 29, 2009 Author Moderators Posted January 29, 2009 Jos, Understood. I will continue with the AutoItWrapper directives and use the additional compile time to make some tea! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Developers Jos Posted January 29, 2009 Developers Posted January 29, 2009 You could give it a try using RES.exe to create a standard RES file and run reshacker every compile to input these standard resources. Could be this is faster... 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.
Moderators Melba23 Posted January 29, 2009 Author Moderators Posted January 29, 2009 Jos, I will try over the weekend. I am betting your Wrapper directives will win, though! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Developers Jos Posted January 29, 2009 Developers Posted January 29, 2009 Not so sure about that. The reason I spent to time to code it all up in AutoIt3 native code was the fact that I had to include the res.exe + dlls and that people had to download reshacker and on top of that the main reason was that reshacker doesn't support x64 compiled script which the internal code does. Jos 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.
Moderators Melba23 Posted January 30, 2009 Author Moderators Posted January 30, 2009 Jos,Looking at just the compile time, ResHacker is very much quicker.But if you factor in the time to create the .res file in the first place - and the time I spent learning how to get it all working! - I am not so sure.In the case I spoke of - resources rarely changed, but code often tinkered with - a .res file is probably the way to go. But for anything else:AutoItWrapper Rulesas I suspected!Many thanks for all the effort you have put into it - I know I speak for many when I say: "Bedankt"M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Zedna Posted January 30, 2009 Posted January 30, 2009 (edited) Look here at my older solutionhttp://www.autoitscript.com/forum/index.ph...st&p=169711I prepared RES file from RC file first and then I added this RES file to compiled EXE file by reshacker -addI used batch file for that but you can use #AutoIt3Wrapper_run_after=ResHacker.exe -add for that.EDIT:here is example for adding resources by reshacker Quote #AutoIt3Wrapper_useupx=n#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, test_1.txt, rcdata, TEST_TXT_1, 0#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, image1.bmp, bitmap, TEST_BMP_1, 0#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, image2.bmp, bitmap, TEST_BMP_2, 0#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, binary1.dat, rcdata, TEST_BIN_1, 0#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, C:\WINDOWS\Media\tada.wav, sound, TEST_WAV_1, 0#AutoIt3Wrapper_run_after=upx.exe --compress-resources=0 "%out%"http://www.autoitscript.com/forum/index.php?showtopic=51103 Edited January 30, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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