MikeRerick Posted May 11, 2010 Posted May 11, 2010 I have run into a problem compiling a large executable installer with AutoIt3 v3.3.6.1. Sorry for the lengthy post - trying to provide as much info as possible. I'm hoping it's a stupid typo that I can't see, but I don't think so. I can build the executable using v3.3.0.0 but not with v3.3.6.1. See the end of the post for the output window results of the two builds in the SCiTe editors. I get an 'error allocating memory' error message box appearing when the compiler is trying to add network-path-to\dotnetfx35SP1.exe, which is the second to last file. I am using AutoIt3 V3.3.6.1. I updated from V3.3.0.0. I created executable installers larger than 1GB with 3.3.0.0. The large installers included the above files plus quite a few others. (See the MyProductInstallerFiles.au3 for the files used int he installer.) I'm running Windows XP SP3 and have 3.5GB of memory in the machine. I installed the v3.3.6.1 AutoIt Full Install plus the customized AutoIt script editor. I left my v3.3.0.0 AutoIt3 installed on a differrent drive. v3.3.0.0 is installed on my C: drive, v3.3.6.1 is installed on an external drive. 'path-to' in the following information is the path to where v3.3.6.1 is installed. The shortcut to the v3.3.0.0 SCiTe editor is c:\dev\autoit3\scite4\scite.exe The shortcut to the v3.3.6.1 SCiTe editor is f:\dev\autoit3\scite\scite.exe This script gets included by a product install file that also includes my main install framework files. --------------------------------------- AutoIt3 Script --------------------------------------- MyProductInstaller.au3: #Region AutoIt3Wrapper directives section ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y ;#NoTrayIcon ; Don't display the system tray icon #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Res_LegalCopyright=© 2008-2009 ImageWare Systems, Inc. All rights reserved. #AutoIt3Wrapper_Icon=..\Common\company.ico ; Use the IWS icon #AutoIt3Wrapper_OutFile_Type=exe ; The output file type is an executable ; ********************************************************************* ; The name of the project executable file ; ********************************************************************* #AutoIt3Wrapper_OutFile=MyProductSetup.exe #AutoIt3Wrapper_Res_Comment=Builds the MyProduct installer package #AutoIt3Wrapper_Res_Description=MyProduct Installer Package #AutoIt3Wrapper_Res_Fileversion=1.0.0.38 #AutoIt3Wrapper_Res_FileVersion_AutoIncrement=Y ;(Y/N/P) #AutoIt3Wrapper_Res_LegalCopyright=Copyright © 2008-2010 ImageWare Systems, Inc. All rights reserved. #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer% #AutoIt3Wrapper_Res_Field=Date built|%date% #AutoIt3Wrapper_Res_Field=Time built|%time% #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; *************************************************************************** ; The name of the project executable file to be called in the Shutdown task ; Display a console message about extracting the isntall files ; *************************************************************************** Global $installExeName = "MyProductSetup.exe" Global $extractFilesMsg = "Extracting the installation files. This may take a few minutes. Please wait..." $installVersion = FileGetVersion(@ScriptFullPath, "FileVersion") $installDescription = FileGetVersion(@ScriptFullPath, "FileDescription") $installerCopyright = FileGetVersion(@ScriptFullPath, "LegalCopyright") DisplayConsoleMessage($installerCopyright & @CRLF) DisplayConsoleMessage("MyProduct Installer Version " & $installVersion & @CRLF) DisplayConsoleMessage($extractFilesMsg & @CRLF) ; ********************************************************************* ; Project installation XML script ; ********************************************************************* Local $scriptFile = "myproduct.xml" ; MyProduct product script ; ********************************************************************* ; Make sure the install script gets installed ; ********************************************************************* FileInstall("path-to\myproduct.xml", @ScriptDir & "\" & $scriptFile, 0) ; ********************************************************************* ; List of all of the files required for the project installation ; ********************************************************************* #include "MyProductInstallFiles.au3" #include "ICC.au3" MyProductInstallerFiler.aue: ; Files needed to install MyProduct: ;------------------------------------------------ #include-once $destFolder = @ScriptDir $mysqlFolder = @ScriptDir & "\MySQL" $dotNetFolder = @ScriptDir & "\DotNet35" DirCreate($destFolder) DirCreate($mysqlFolder) DirCreate($dotNetFolder) ; MySQL Workbench FileInstall("local-path-to\mysql-workbench-oss-5.2.16-beta-win32.msi", $mysqlFolder & "\mysql-workbench-oss-5.2.16-beta-win32.msi", 0) ; MySQL Database ; Windows XP or Windows Server 2003 32 bit if @OSArch = "X86" then FileInstall("local-path-to\mysql-essential-5.1.44-win32.msi", $mysqlFolder & "\mysql-essential-5.1.44.msi", 0) endif ; Windows Server 2003 64 bit if @OSArch = "X64" then FileInstall("local-path-to\mysql-essential-5.1.44-winx64.msi", $mysqlFolder & "\mysql-essential-5.1.44.msi", 0) endif ; Identity Manager V2 installer file FileInstall("path-to\MyProduct.msi", $destFolder & "\MyProduct.msi", 0) ; .NET 3.5 Framework files $sysRoot = EnvGet("systemroot") if FileExists($sysRoot & "\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5\") then FileInstall("DoNothing.exe", $dotNetFolder & "\dotnetfx35.exe", 0) else FileInstall("network-path-to\dotnetfx35.exe", $dotNetFolder & "\dotnetfx35.exe", 0) endif if FileExists($sysRoot & "\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\") then FileInstall("DoNothing.exe", $dotNetFolder & "\dotnetfx35SP1.exe", 0) else FileInstall("network-path-to\dotnetfx35SP1.exe", $dotNetFolder & "\dotnetfx35SP1.exe", 0) endif FileInstall("network-path-to\NDP35SP1-KB958484-x86.exe", $dotNetFolder & "\NDP35SP1-KB958484-x86.exe", 0) ------------------------------------- End AutoIt script ----------------------------------------- I am building an executable installer. I'm getting the error during the first compile phase of an Ant macro (see below). I am running the build from an Ant script. The correct values are being passed in to the Ant macro. I pass in the executable.main.file and executable.name attributes to the macro when I call it and use the default values for all other attributes. Defined in a property file that gets included: autoit3.home=path-to/AutoIt3 autoit3.projects.home=${autoit3.home}/Projects autoit3.wrapper=${autoit3.home}/SciTE/AutoIt3Wrapper/AutoIt3Wrapper.exe autoit3.iccproj=${autoit3.projects.home}/ICC autoit3.aut2exe=${autoit3.home}/aut2exe autoit3.common=${autoit3.projects.home}/Common autoit3.params=/comp 2 /pack /console /bin ${autoit3.aut2exe}/AutoItSC.bin autoit3.params2=/comp 2 /pack /console <macrodef name="build.executable.installer"> <attribute name="executable.main.file"/> <attribute name="executable.name"/> <attribute name="autoit3.wrapper" default="${autoit3.wrapper}"/> <attribute name="autoit3.iccproj" default="${autoit3.iccproj}"/> <attribute name="autoit3.common" default="${autoit3.common}"/> <attribute name="executable.icon" default="company_icon.ico"/> <attribute name="autoit3.aut2exe" default="${autoit3.aut2exe}"/> <sequential> <echo message="build.executable.installer: executable.main.file = @{executable.main.file}"/> <echo message="build.executable.installer: executable.name = @{executable.name}"/> <echo message="build.executable.installer: autoit3.iccproj = @{autoit3.iccproj}"/> <echo message="build.executable.installer: autoit3.common = @{autoit3.common}"/> <echo message="build.executable.installer: executable.icon = @{executable.icon}"/> <echo message="build.executable.installer: autoit3.aut2exe = @{autoit3.aut2exe}"/> <!-- Compile the AutoIt install files --> <exec executable="@{autoit3.wrapper}" failonerror="true"> <arg value="/prod"/> <arg value="/in"/> <arg value=""@{autoit3.iccproj}\@{executable.main.file}.au3""/> <arg value="/out"/> <arg value=""@{autoit3.iccproj}\@{executable.name}.exe""/> <arg value="/autoit3dir"/> <arg value=""..\AutoIt3""/> <arg value="/icon"/> <arg value=""@{autoit3.common}\@{executable.icon}""/> <arg value="/comp"/> <arg value="2"/> <arg value="/pack"/> <arg value="/console"/> </exec> <!-- Build the executable installer --> <exec executable="@{autoit3.aut2exe}\aut2exe.exe" failonerror="true"> <arg value="/in"/> <arg value=""@{autoit3.iccproj}\@{executable.main.file}.au3""/> <arg value="/out"/> <arg value=""@{autoit3.iccproj}\@{executable.name}.exe""/> <arg value="/icon"/> <arg value=""@{autoit3.common}\@{executable.icon}""/> <arg value="/comp"/> <arg value="2"/> <arg value="/pack"/> <arg value="/console"/> <arg value="/bin"/> <arg value=""@{autoit3.aut2exe}/AutoItSC.bin""/> </exec> </sequential> </macrodef> All of the files exist in the paths specified in the FileInstall file literal. Here are the file sizes: mysql-workbench-oss-5.2.16-beta-win32.msi - 20,123 KB mysql-essential-5.1.44-win32.msi - 39,991 KB mysql-essential-5.1.44-winx64.msi - 32,422 KB MyProduct.msi - 4,597 KB DoNothing.exe - 7KB dotnetfx35.exe - 201.849 KB dotnetfx35SP1.exe - 237,054 KB NDP35SP1-KB958484-x86.exe - 1,392 KB Output window from v3.3.6.1 Tools|Build: >"path-to\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "path-to\AutoIt3\Projects\ICC\MyProductInstaller.au3" /autoit3dir "path-to\AutoIt3" +>15:11:57 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86) >Running AU3Check (1.54.19.0) from:path-to\AutoIt3 +>15:11:58 AU3Check ended.rc:0 >Running:(3.3.6.1):path-to\AutoIt3\aut2exe\aut2exe.exe /in "path-to\AutoIt3\Projects\ICC\MyProductInstaller.au3" /out "path-to\AutoIt3\Projects\ICC\MyProductSetup.exe" /nopack /icon "..\Common\company.ico" /comp 2 /Console +>15:21:14 Aut2exe.exe ended.rc:0 >15:21:14 Performing the Program Resource Update steps: >Exit code: 1 Time: 579.959 --->>> Get the memory allocation error Output window from v3.3.0.0 Tools|Build >"path-to-v3300\AutoIt3\SciTE4\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "path-to\AutoIt3\Projects\ICC\MyProductInstaller.au3" /autoit3dir "..\AutoIt3" +>15:40:17 Starting AutoIt3Wrapper v.1.10.1.12 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 ANSI) >Running AU3Check (1.54.19.0) from:F:\Dev\AutoIt3 +>15:40:18 AU3Check ended.rc:0 +> Updated RT_VERSION information. >15:40:19 Resource updating finished. >Running:(3.3.6.1):path-to\AutoIt3\aut2exe\aut2exe.exe /in "path-to\AutoIt3\Projects\ICC\MyProductInstaller.au3" /out "path-to\AutoIt3\Projects\ICC\MyProductSetup.exe" /icon "F:\Dev\AutoIt3\Projects\Common\IWS_F.ico" /comp 2 /pack /Console /Bin C:\DOCUME~1\MRerick\LOCALS~1\Temp\AutoItSC.bin Ultimate Packer for eXecutables Copyright © 1996 - 2008 UPX 3.03w Markus Oberhumer, Laszlo Molnar & John Reiser Apr 27th 2008 File size Ratio Format Name -------------------- ------ ----------- ----------- 646656 -> 301056 46.56% win32/pe MyProductSetup.exe Packed 1 file. +>15:49:27 Aut2exe.exe ended.rc:0 +>15:49:27 Created program:path-to\AutoIt3\Projects\ICC\MyProductSetup.exe ->Warning: This is an Unicode compiled script and will not run on Win9x/ME. >Updated the Source Version to:1.0.0.31... +>15:49:27 AutoIt3Wrapper Finished >Exit code: 0 Time: 550.326 --->>> successfully builds the executable installer Unfortunately, I have two other installers that exhibit the same error. Thanks for any help. Mike Rerick
omikron48 Posted May 11, 2010 Posted May 11, 2010 My guess is that the files used in the FileInstall are too large to be handled. I'd suggest just skipping the FileInstall(s) altogether and just packaging your script and the installers into one folder which you copy to the different computers.
MikeRerick Posted May 11, 2010 Author Posted May 11, 2010 Unfortunately that is not an option. I really need the self-extracing installer. I am able to build the executable installer using v3.3.0.0 of AutoIt3. Something changed between 3.3.0.0 and 3.3.6.1 that affects memory management with the FileInstall function. With 3.3.0.0, I built self-extracting installers that were about 1GB in size without any problems.
MikeRerick Posted May 11, 2010 Author Posted May 11, 2010 I have additional information on this issue. If I take The following file from v3.3.0.0 and put it in v3.3.6.1, the executable installer is built successfully. from 3.3.0.0 autoit3\scite4\autoit3wrapper\autoit3wrapper.exe to 3.3.6.1 autoit3\scite\autoit3wrapper The AutoIt3Wrapper executable seems to be what causes the problem building the executable installer.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now