Jump to content

Compiling a script


Azu
 Share

Recommended Posts

It's cool how AutoIt has a whole bunch of different functions and stuff already included by default!

I'm wandering if there as an option, however, to make it so it includes the ones that the script will use?

If there isn't, could someone make it? I think it could speed up compile times and we could start seeing 10KB AutoIt EXEs.. that could be fun, couldn't it? :P

Edited by Azu
Link to comment
Share on other sites

  • Moderators

It's cool how AutoIt has a whole bunch of different functions and stuff already included by default!

I'm wandering if there as an option, however, to make it so it includes the ones that the script will use?

If there isn't, could someone make it? I think it could speed up compile times and we could start seeing 10KB AutoIt EXEs.. that could be fun, couldn't it? :P

That's not an "easy task" at all (Give it a try and you'll see what I mean)... I think someone was already working on it... I'll check the thread and see if that's what they working on.

Edit:

http://www.autoitscript.com/forum/index.ph...st&p=218660

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thank you, this looks like ALMOST exactly what I'm looking for, except I was also wandering if there could be a way to do this, except instead of only doing it to the things you manually added with #include, if it could also do it to all of the stuff that is normally included by default even if it's not used. This could result in some compiled scripts being like 20 times smaller, and freeing up a lot of unused resources.

Link to comment
Share on other sites

  • Moderators

Thank you, this looks like ALMOST exactly what I'm looking for, except I was also wandering if there could be a way to do this, except instead of only doing it to the things you manually added with #include, if it could also do it to all of the stuff that is normally included by default even if it's not used. This could result in some compiled scripts being like 20 times smaller, and freeing up a lot of unused resources.

I don't understand what your saying. If you wrote it, don't you know whether or not you used it? If your talking about only including the functions that you are using in the #includes, it goes a bit deeper than that, you'll also only want to include the Global Const's that each function/main script is using.

You really have to think this out, what you would need to do.

1. Get every function from the main script without the #includes.

2. Get every Variable from the Main Script and from the #includes

3. Compare the Function Names from the Main to the #include to see which you would want to extract.

4. Make sure that those functions aren't using another function and if they are include those.

5. Make sure that include isn't calling another include and call that one so you can etract the necessary Vars and Funcs

6. Piece them all together

(I know I missed something up above, but this was just to show you... what your asking for is no small task).

I'd suggest getting started right away on writing it, it's definately not a road I personally feel like venturing in.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Sorry I worded it wrong.

I love what the program you linked does. For the #includes.

I would like it to do the same to all the stuff that gets bundled into the EXE, also, though.

:P

Is there any way to do this?

Edited by Azu
Link to comment
Share on other sites

  • Moderators

Sorry I worded it wrong.

I love what the program you linked does. For the #includes.

I would like it to do the same to all the stuff that gets bundled into the EXE, also, though.

:P

Is there any way to do this?

What are you talking about?... Please be specific... because I'm clueless.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

I think Azu is talking about dynamically recompiling the stub to only include the builtin functions used in the compiled script.

This is about to become a Valik Quote thread ... :P

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

the most difficult way that I can think if, is having the locations and sizes for *every* function, cutting out the ones that aren't used, then rebasing (or whatever it is called), then going ahead and compiling the script...

Side Effect: your compiled script can no longer be used as a stand along interpretor for any au3 files.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...