Sign in to follow this  
Followers 0
Azu

Compiling a script

14 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
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.

Share this post


Link to post
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.

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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?

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Yes I think that's it.. :P

Share this post


Link to post
Share on other sites

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

lol. I'm just learning vb .net and even I know how difficult it is to do dynamic recompiling

Share this post


Link to post
Share on other sites

So.. has anyone does it? I've tried searching for it but came up empty handed. :P

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Not going to happen. Been asked before. Technical nightmare, not worth the effort. breaks /AutoIt3ExecuteScript and /AutoIt3ExecuteLine. I think that about covers it.

Share this post


Link to post
Share on other sites

The easiest way is to switch language. Good luck with that.

I can recommend Visual basic if you are familiar with AutoIt. C/C++ is a total nightmare. Lol ^^

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  
Followers 0