Sign in to follow this  
Followers 0
2tim3_16

Compile x64 from AutoIt3Wrapper

17 posts in this topic

I'm working on Vista x64, AutoIt v3.2.10.0. When I do a compile from within Scite (Ctrl-F7) or by right clicking the script and choosing Compile with Options, there's no way to choose x64. If I just right click and choose Compile, I get x64 but none of the AutoIt3Wrapper settings (icon, version, etc.) take effect. Any way to get both? An option like Aut2Exe has would be nice. :) Or is there already something and I'm just missing it?

Share this post


Link to post
Share on other sites



There was an couple of issues with the AutoIt3Wrapper and GUI which are fixed in the current Beta version.

I need to see the SciTE outputpane information to check what is wrong in your case or you could try the Beta version.

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

Hi Jos, I tried the beta version, but now it's telling me "Unable to execute upx.exe to compress stub file." If I uncheck the x64 option, it compiles correctly as x86.

Here's the SciTE output:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" /in "C:\Users\jaglick\Desktop\Template.au3"

+>09:31:16 Starting AutoIt3Wrapper GUI v.1.10.1.3

-> 1 Change(s) made.

@@ Debug(-1) : $INP_Compression = 2

>Error code: 0

+>09:31:20 Starting AutoIt3Wrapper v.1.10.1.3 Environment(Language:0409 Keyboard:00000409 OS:WIN_VISTA/ CPU:X64)

>Running AU3Check (1.54.13.0) from:C:\Program Files (x86)\AutoIt3\beta

+>09:31:21 AU3Check ended.rc:0

+> Updated RT_VERSION information.

>09:31:21 Resource updating finished.

>Running:(3.2.11.1):C:\Program Files (x86)\AutoIt3\beta\aut2exe\aut2exe.exe /in "C:\Users\jaglick\Desktop\Template.au3" /out "C:\Users\jaglick\Desktop\Template.exe" /comp 2 /pack /Bin C:\Users\jaglick\AppData\Local\Temp\AUTOIT~1.BIN

!>09:31:42 Aut2exe.exe ended errors because the target exe wasn't created, abandon build.rc:9999

>Exit code: 0 Time: 26.519

Share this post


Link to post
Share on other sites

I just tried reinstalling SciTE, and now it correctly compiles as x64. However, now I'm getting a Reshacker error. Here's my output:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" /in "C:\Users\jaglick\Desktop\Template.au3"

+>09:48:54 Starting AutoIt3Wrapper GUI v.1.9.5.7

-> No changes made..

+>09:48:57 Starting AutoIt3Wrapper v.1.9.5.6 Environment(Language:0409 Keyboard:00000409 OS:WIN_VISTA/ CPU:X64)

>Running AU3Check (1.54.13.0) from:C:\Program Files (x86)\AutoIt3\beta

+>09:48:57 AU3Check ended.rc:0

>Running:(3.2.11.1):C:\Program Files (x86)\AutoIt3\beta\aut2exe\aut2exe_x64.exe /in "C:\Users\jaglick\Desktop\Template.au3" /out "C:\Users\jaglick\Desktop\Template.exe" /comp 2 /nopack /x64

+>09:48:57 Aut2exe.exe ended.rc:0

->Warning: This is an X64 compiled script and will only work on a system with a X64 OS.

+>09:48:58 RC.exe ended. Changed resource language to: English (United States). rc:0

! Reshacker Error:

[13 Feb 2008, 09:48:58]

[FileNames]

Exe=C:\Users\jaglick\Desktop\Template.exe

SaveAs=C:\Users\jaglick\Desktop\Template.exe

Log=C:\Users\jaglick\AppData\Local\Temp\ResHack.log

[Commands]

-addoverwrite "C:\Users\jaglick\AppData\Local\Temp\temp.res", , ,

Added: VERSIONINFO,1,1033

-delete 16,1,2057

Error: No matching resource found.

! Resources will not be updated!+>09:48:58 Reshacker ended.rc:0

>Exit code: 0 Time: 5.494

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Ok, now here's another thing that I don't know if it's related or not... When I compile the following script as x64, I don't get any errors at all, unlike all the others I've tried. However, if I compile as x86, the file size is 252KB. But if I compile as x64, the file size is 1,972,575KB! Any clue what may be causing that? Oh, and it only happens if I compile with the AutoIt3Wrapper GUI. If I just right-click and compile, it's ~700KB.

#RequireAdmin
AutoItSetOption("RunErrorsFatal", 0)

Dim $installPath = @ProgramFilesDir & "\Life Action\"
Dim $appExecutable = "lam_backup.exe"
Dim $appFullPath = $installPath & $appExecutable

FileCopy("\\lifeaction.net\dfs\download\__Install - All PCs\AutoIt Scripts\Backup Script\CSharp\lam_backup (Vista).exe", @ProgramFilesDir & "\Life Action\lam_backup.exe", 9)
FileCopy("\\lifeaction.net\dfs\backup\" & @ComputerName & "\C" & @ComputerName & ".txt", @ProgramFilesDir & "\Life Action\C" & @ComputerName & ".txt", 9)
FileCopy("\\lifeaction.net\dfs\download\__Install - All PCs\AutoIt Scripts\Backup Script\CSharp\ChilkatDotNet2 (x64).dll", @ProgramFilesDir & "\Life Action\ChilkatDotNet2.dll", 9)
FileCopy("\\lifeaction.net\dfs\download\__Install - All PCs\AutoIt Scripts\Backup Script\CSharp\backup_stub (Vista).exe", @StartupCommonDir & "\backup_stub.exe",9)

$permissions = 'IF NOT EXIST "' & $appFullPath & '" GOTO ENDIF' & @CRLF & _
    @CRLF & _
    'echo y| cacls "' & @ProgramFilesDir & '\Life Action" /e /t /g users:f' & @CRLF & _
    @CRLF & _
    'IF EXIST "' & @AppDataCommonDir & '\Life Action\Backup Utility" GOTO APPDIR' & @CRLF & _
    @CRLF & _
    'cd "' & @AppDataCommonDir & '"' & @CRLF & _
    'md "Life Action"' & @CRLF & _
    @CRLF & _
    'cd "' & @AppDataCommonDir & '\Life Action"' & @CRLF & _
    'md "Backup Utility"' & @CRLF & _
    @CRLF & _
    ':APPDIR' & @CRLF & _
    'echo y| cacls "' & @AppDataCommonDir & '\Life Action" /e /t /g users:f' & @CRLF & _
    @CRLF & _
    ':ENDIF'

$bat = FileOpen(@TempDir & "\permissions.bat", 2)
FileWriteLine($bat, $permissions)
FileClose($bat)

ShellExecuteWait("permissions.bat", "", @TempDir, "", @SW_HIDE)

FileDelete(@TempDir & "\permissions.bat")
Edited by 2tim3_16

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You will have to use the current Beta version of AutoIt3Wrapper when you want support for Resource updates for x64 compiled scripts, since ResHacker doesn;t support it.

Autoit3Wrapper now has a build-in res update capabilities...

You can find the Beta versions here: http://www.autoitscript.com/autoit3/scite/..._SciTE4AutoIt3/

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

I am using the current beta version.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I am using the current beta version.

Not in the pasted example.

It should say:

Starting AutoIt3Wrapper v.1.10.1.4

I am refering to the Beta version of AutoIt3Wrapper NOT AutoIt3 :)

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

Ok, I forgot to replace the AutoIt3Wrapper with the beta after reinstalling SciTE. Sorry about that! Now I'm getting version v.1.10.1.3 though... Is the latest version not online or was yours just a typo?

Now when I compile it pops up a message:

Command Line Parameters:

Aut2Exe.exe /in <infile.au3> [/out <outfile.exe>] [/icon <iconfile.ico>] [/comp 0-4] [/nopack] [/ansi] [/unicode]

Clicking OK just brings up the Aut2Exe.exe GUI.

Thanks so much for your help on this!

Share this post


Link to post
Share on other sites

The version is not a typo, but the version I am working on (not available yet) :)

You need to copy the aut2exe.exe from the beta directory to the production directory since I am using commandline switches only available in the Beta version of aut2exe.

This link describes the changes made in the current Beta version...

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

You need to copy the aut2exe.exe from the beta directory to the production directory since I am using commandline switches only available in the Beta version of aut2exe.

Error: Unable to execute upx.exe to compress stub file.

Share this post


Link to post
Share on other sites

Lost you here. There is a /nopack on the commandline thus the UPX step shouldn't be done.

Do you have a "stripped down" script just containing the directives and the output pane info for me ?

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

Ah! Well if that's the case...

I just unchecked the "Use UPX" option, and that works. :) So I take it the UPX compression is for x86 only?

Share this post


Link to post
Share on other sites

Ah! Well if that's the case...

I just unchecked the "Use UPX" option, and that works. :) So I take it the UPX compression is for x86 only?

Yes correct, but it should automagically skip it even when its selected. Thats why I was interested how you got it to try to upx the compiled script.

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

Ok, here's a sample script:

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=beta
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_Res_Fileversion=2.0.2.0
#AutoIt3Wrapper_Res_Language=1033
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****


MsgBox(0, "Checking Compiled Script", @ProgramFilesDir)

And here's what I get:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" /in "C:\Users\jaglick\Desktop\Template.au3"
+>16:57:49 Starting AutoIt3Wrapper GUI v.1.10.1.3
-> 1 Change(s) made.
@@ Debug(-1) : $INP_Compression = 2
>Error code: 0
+>16:57:54 Starting AutoIt3Wrapper v.1.10.1.3   Environment(Language:0409  Keyboard:00000409  OS:WIN_VISTA/  CPU:X64)
>Running AU3Check (1.54.13.0)  from:C:\Program Files (x86)\AutoIt3\beta
+>16:57:54 AU3Check ended.rc:0
+> Updated RT_VERSION information.
>16:57:54 Resource updating finished.
>Running:(3.2.11.1):C:\Program Files (x86)\AutoIt3\beta\aut2exe\aut2exe.exe  /in "C:\Users\jaglick\Desktop\Template.au3" /out "C:\Users\jaglick\Desktop\Template.exe" /comp 2 /pack /Bin C:\Users\jaglick\AppData\Local\Temp\AUTOIT~1.BIN
!>16:57:56 Aut2exe.exe ended errors because the target exe wasn't created, abandon build.rc:9999
>Exit code: 0   Time: 8.088

Share this post


Link to post
Share on other sites

Thanks, I understand now whats happening.

I will add a test to AUtoIt3Wrapper not to add "/pack" to the commandline when iam using the x64 Bin file.


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

Uploaded a new Beta AutoIt3Wrapper v.1.10.1.4 that shouldn't give the UPX error anymore for x64 compiled scripts .


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