4

I've read I have to add these lines into my .au3 file:

#Region
#AutoIt3Wrapper_Icon=C:\myicon.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=1.0
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion

I've put myicon.ico into the C:\ directory.

Then I right click on my .au3 file and click Compile, everything is fine, but the default icon is still the AutoIT icon.

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
Cyclone
  • 14,839
  • 23
  • 82
  • 114

2 Answers2

11

This is one of the things that has bothered me about the compile process for quite a while. It doesn't work if you right click your file and 'Compile'.

You have to go via the Start menu > AutoIt v3 > Compile Script to .exe. Once you select your script, you will see your settings loaded into the GUI.

enter image description here

Martin Frank
  • 3,445
  • 1
  • 27
  • 47
Jos van Egmond
  • 2,370
  • 15
  • 19
0

You can create a batch script to execute AutoIt's compilation.

For example:

@echo off

set FOLDER_CURRENT=%cd%    

set VERSION=v0.x.x.x
set STATUS=prod
set NAME_PROJECT=nameProject_%VERSION%_%STATUS%
set EXE_OUT=%NAME_PROJECT%.exe

set FOLDER_SRC=%FOLDER_CURRENT%\..\src\
set FOLDER_OUT=%FOLDER_CURRENT%\%VERSION%\%NAME_PROJECT%
set ICON_PATH=%FOLDER_SRC%\images\icon.ico
set AUT2EXE_ARGS=/in "%FOLDER_SRC%\main_script.au3" /out "%FOLDER_OUT%\%EXE_OUT%" /icon "%ICON_PATH%"

echo ----[Compilation with aut2exe]----
aut2exe %AUT2EXE_ARGS%
echo -----------------------------------

In this batch script, you can do more things like:

  • Create output directory
  • Copy all necessary directories and files ressources (images, icon, ...)
  • Create another file text
  • Zip the output folder in order to make deployement easy
  • Push the release on git server
Nathan
  • 8,093
  • 8
  • 50
  • 76
v20100v
  • 696
  • 4
  • 11