Jump to content
Sign in to follow this  
qman33

Help scripting installer

Recommended Posts

qman33

Hello all,

I'm pretty new to Autoit (about 3 weeks). Couldn't find anything on the web or the forums related to this. I've decided I wanted to write an installer for a hotkey program I have already created that allow for it to be used by anyone. Essentially I want the program to edit the source code while it's running (if that makes any sense). In other words, I've created a GUI with a checkbox that allows the user to pick which parts of the program he/she would like installed. I was wondering:

A. Is it possible to either delete parts of the code if the box is unchecked

B. If it is not possible, is there another means I could go about doing this or something similar to obtain the same result?

Thanks a lot,

qman

Share this post


Link to post
Share on other sites
PsaltyDS

Hello all,

I'm pretty new to Autoit (about 3 weeks). Couldn't find anything on the web or the forums related to this. I've decided I wanted to write an installer for a hotkey program I have already created that allow for it to be used by anyone. Essentially I want the program to edit the source code while it's running (if that makes any sense). In other words, I've created a GUI with a checkbox that allows the user to pick which parts of the program he/she would like installed. I was wondering:

A. Is it possible to either delete parts of the code if the box is unchecked

B. If it is not possible, is there another means I could go about doing this or something similar to obtain the same result?

Thanks a lot,

qman

Just don't run the unselected parts. Since AutoIt is an interpreted scripting language, removing parts of the "source" will make only a tiny difference in the size of the executable. The AutoIt interpreter's binary will be unchanged. The unused parts will have no impact on performance and almost no impact on resources used.

If it must actually compile a new executable, then the modular parts should be in include files that attached with FileInstall() or ResHacker. The script would have to generate an intermediate .au3 file on disk from those parts and then compile that to the target .exe file. This can be done, but sounds like a pain compared to just ignoring some unused parts in the code.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
qman33

Just don't run the unselected parts. Since AutoIt is an interpreted scripting language, removing parts of the "source" will make only a tiny difference in the size of the executable. The AutoIt interpreter's binary will be unchanged. The unused parts will have no impact on performance and almost no impact on resources used.

If it must actually compile a new executable, then the modular parts should be in include files that attached with FileInstall() or ResHacker. The script would have to generate an intermediate .au3 file on disk from those parts and then compile that to the target .exe file. This can be done, but sounds like a pain compared to just ignoring some unused parts in the code.

:)

Okay, that makes sense and seems really difficult. Thanks for the help!

:lmao:

qman

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×