Sign in to follow this  
Followers 0
qwert

At compile time, where do icons come from?

12 posts in this topic

I would like to replace the standard AU3 icons for all scripts that I compile using the SciTE4 editor. I've tried replacing the AutoIt3\install\icons\au3.ico file with one containing blank icons, but the standard icons are still showing up in the resulting executable.

Where are the icons coming from? Does SciTE4 have its own internal set?

Any help will be appreciated.

Share this post


Link to post
Share on other sites

I believe that when scite compiles it compiles via command line. So if you want to compile with options and use your own icon your going to need to either use the autoit3 compiler or use like reshack to change it.

Share this post


Link to post
Share on other sites

They are included in the exe. To add a different icon to your exe, use AutoIt3Wrapper (comes with full SciTe installation).

Share this post


Link to post
Share on other sites

So the icon files on the AutoIt3\install\icons directory are irrelevant? Seems odd ... but I'll take a look at the using the wrapper approach. Thanks.

Share this post


Link to post
Share on other sites

Use this directive at the top of your script and change the path for the icon you want.

#AutoIt3Wrapper_icon=C:\icon.ico

Of course that you'll need AutoIt3Wrapper

Share this post


Link to post
Share on other sites

You can use any icon file you want. when you only specify a filename without a path, aut2exe will look in the script directory and then in the standard Ico directory (AutoIt3\install\icons ).. AutoIt3Wrapper follows the same logic as aut2exe.

:D


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Where are the icons coming from? Does SciTE4 have its own internal set?

Not SciTE, as it's not directly involved with the compile. The icons are actually stored in "...\AutoIt3\Aut2Exe\AutoItSC.bin" if you edit the icons in that file with something like Resource Hacker, then the default compile icons will change (I have tested this just now, it's true). I cannot vouch for the stability of your compiled files afterwards, but I don't see any reason for problems.

Also, I presume that if you're compiling as a 64bit exe you would need to edit icons in AutoItSC_x64.bin, but I cannot view that file with Resource Hacker (presumably because it's not a 64bit application, plus I'm not running a 64bit machine).

*Edit: On a thinly related topic, I just compiled an empty file - the .exe appeared, then disappeared... weird.

Edited by Saunders

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

The default Ico is indeed in the Bin file. Changing this default Ico is a standard function of aut2exe.

Reshacker can also safely change it but using the aut2exe functionality is easier, but I haven't checked the x64 environment and what reshacker does there because I don't have a test system available. When trying with AutoIt3Wrapper, the reshacker step doesn't complain on the x64 generated outputfile.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

OK, I've succeeded in producing an executable without any icons by running Aut2exe.exe and specifying an icon file containing blank icons. So to summarize (from the documentation) what I have found, this can be accomplished by any one of the following ways:

Method 1 - Start Menu:

"5. If you like you can change the icon of the resulting .exe - just browse to the icon you want."

Method 2 - Right Click on File:

"When compiling in this way, Aut2Exe uses current icon/compression settings from the last time Aut2Exe was run manually as in method 1."

Method 3 - Command Line:

Aut2exe.exe /in myfile.au3 /icon myicons.ico

But this leaves me still wondering: Isn't there an icon file that Aut2exe uses as its default icons that could be replaced so that all compiled scripts get the replaced icons? I've tried replacing AutoIt_HighColor.ico, but that didn't work either.

Thanks very much for your assistance.

(Sorry, but I hadn't seen the very recent responses before I posted this. I will read them and re-edit this summarizing post. Thanks.)

Edited by qwert

Share this post


Link to post
Share on other sites

OK, I've succeeded in producing an executable without any icons by running Aut2exe.exe and specifying an icon file containing blank icons. So to summarize (from the documentation) what I have found, this can be accomplished by any one of the following ways:

Method 1 - Start Menu:

"5. If you like you can change the icon of the resulting .exe - just browse to the icon you want."

Method 2 - Right Click on File:

"When compiling in this way, Aut2Exe uses current icon/compression settings from the last time Aut2Exe was run manually as in method 1."

Method 3 - Command Line:

Aut2exe.exe /in myfile.au3 /icon myicons.ico

But this leaves me still wondering: Isn't there an icon file that Aut2exe uses as its default icons that could be replaced so that all compiled scripts get the replaced icons? I've tried replacing AutoIt_HighColor.ico, but that didn't work either.

Thanks very much for your assistance.

(Sorry, but I hadn't seen the very recent responses before I posted this. I will read them and re-edit this summarizing post. Thanks.)

As Saunders stated: the default Ico is located in the *.bin files. I don't see any reason wanting to change that ....

Just install the SciTE4AutoIt3 installation and specify the Ico you want to use there by means of the directive:

#AutoIt3Wrapper_icon=Your.ico

That will save you from having to change it with each release of AutoIt3.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thanks for the clarifications.

Being new at AutoIt3, I've been reluctant to use the AutoIt3Wrapper program because it seemed to do more than I needed -- and I wanted my compiled scripts to be as small as possible. I'll give it another look.

Thanks again for your help.

Share this post


Link to post
Share on other sites

Thanks for the clarifications.

Being new at AutoIt3, I've been reluctant to use the AutoIt3Wrapper program because it seemed to do more than I needed -- and I wanted my compiled scripts to be as small as possible. I'll give it another look.

Thanks again for your help.

AutoIt3Wrapper only does what you tell it to do. The only extra thing it does automatically is run au3check before running/compiling your script which I consider a good practice because aut2exe doesn't do any syntax checking. (you could still opt to disable it ...)

:D


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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