wraithdu Posted November 19, 2010 Share Posted November 19, 2010 Ok, to illustrate the problem, pre-compress the x64 bin file, then compile an empty script. Now from a cmd prompt, run this: <script>.exe /ErrorStdOut /AutoIt3ExecuteLine "asdf" Yes, I know the command is bogus, but that's important. The script will crash. This doesn't happen if the compiled script is post-compressed with my script posted earlier. Link to comment Share on other sites More sharing options...
JFX Posted November 19, 2010 Share Posted November 19, 2010 (edited) pre-compress the x64 bin file with mpress -s -r AutoItSC_x64.bin switch does not crash here.Seems -r switch is important Edited November 19, 2010 by JFX Link to comment Share on other sites More sharing options...
wraithdu Posted November 19, 2010 Share Posted November 19, 2010 Thanks for the tip. I'll have to try that. Link to comment Share on other sites More sharing options...
wraithdu Posted November 20, 2010 Share Posted November 20, 2010 Yep, I can confirm the -r switch prevents the crash. Hopefully that's the last problem I'll run into with the new compressor. Link to comment Share on other sites More sharing options...
wraithdu Posted November 20, 2010 Share Posted November 20, 2010 (edited) My point was that the wrapper directive and au3check are not foolproof, nothing more. Here, here's a better example that doesn't actually crash. #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 Opt("MustDeclareVars", 1) _Main() Func _Main() If False Then Local $var = "declared" MsgBox(0, "", $var) ; to avoid 'declared but not used' warning EndIf $var = "not declared" EndFunc So in a way you're correct, nothing makes up for bad programming. Edited November 20, 2010 by wraithdu Link to comment Share on other sites More sharing options...
Homes32 Posted December 22, 2010 Share Posted December 22, 2010 thanks for the good info. perhaps this could be added as an option in Autoit3Wrapper?[screenshot is concept art only]regards,Homes32 Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2010 Developers Share Posted December 22, 2010 (edited) thanks for the good info. perhaps this could be added as an option in Autoit3Wrapper?I have no intention to add support for tools that are not part of the AutoIt3 or SciTE4AutoIt3 installers.A simple solution would be to add a #AutoIt3Wrapper_Run_After= directive that should be able to do this. Edited December 22, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Homes32 Posted December 22, 2010 Share Posted December 22, 2010 I have no intention to add support for tools that are not part of the AutoIt3 or SciTE4AutoIt3 installers.A simple solution would be to add a #AutoIt3Wrapper_Run_After= directive that should be able to do this.yes the #AutoIt3Wrapper_Run_After= works quite well, the point of the suggestion though was for AutoIt3Wrapper to support compression of x64 exe; which UPX option in your GUI doesn't currently provide. obviously if you decided to add this it would make sense to ship mpress.exe along with the upx.exe that you already ship with AutoIt3Wrapper in the SciTE4AutoIt3 installer. the benefit being that the general user-base would have easy access to the feature.in any case its only a suggestion and you are perfectly free to do/or don't do whatever you like.Homes32 Link to comment Share on other sites More sharing options...
Ontosy Posted January 1, 2014 Share Posted January 1, 2014 (edited) In the last version not exist AutoItSC_x64.bin or AutoItSC.bin, and the script not work. But it work command line; mpress.exe "file.exe". Edited January 1, 2014 by Ontosy Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 1, 2014 Administrators Share Posted January 1, 2014 In 3.3.10.x just compile the exe as normal and then run: mpress -r compiledfile.exe Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Developers Jos Posted January 1, 2014 Developers Share Posted January 1, 2014 (edited) Mpress does a pretty good job creating a smaller EXE. Added this as Directive: #AutoIt3Wrapper_Run_After="%scitedir%\mpress\mpress.exe" -r -q %out% Result: << test.exe >> PE32/x86 843.12kB -> 340.0kB Ratio: 40.3% Jos Edited January 1, 2014 by Jos mLipok 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Jekov Posted January 2, 2014 Share Posted January 2, 2014 After compillation with#AutoIt3Wrapper_Run_After="%scitedir%\mpress\mpress.exe" -r -q %out%App say: Unable to Open Scryt file . Link to comment Share on other sites More sharing options...
Developers Jos Posted January 2, 2014 Developers Share Posted January 2, 2014 After compillation with #AutoIt3Wrapper_Run_After="%scitedir%\mpress\mpress.exe" -r -q %out% App say: Unable to Open Scryt file . Need more input than this. For starters: Show the SciTE outputpane information when running Compile. PS. Could you be having AntiVirus type issues like you mentioned in> your other post? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Jekov Posted January 2, 2014 Share Posted January 2, 2014 (edited) Oops!Excuse me! It was with AutoIt v3.3.8.3. In AutoIt v3.310.2 :PE32+/x64 920.12kB -> 352.0kB Ratio: 38.2%PE32/x86 1175.12kB -> 673.0kB Ratio: 57.2%Apps run OK.But compression in AutoIt v3.3.8.3, not in the new AutoIt v3.310.2 is better.#AutoIt3Wrapper_Run_After="%scitedir%upxupx.exe" --ultra-brute -qf --compress-exports=1 --compress-icons=0 --strip-relocs=1 %out%How to compile x64 with built-in Directive? Thank's! Edited January 2, 2014 by Jekov Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2014 Share Posted January 2, 2014 There is no v3.3.8.3. Did you mean v3.3.9.3? Which is a beta release and should be used for production code. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Jekov Posted January 2, 2014 Share Posted January 2, 2014 (edited) I compile my .au3 namely in AutoIt v3.3.8.3, because there outfile size is smaller than with the new release or any beta: Running:(3.3.8.1) #AutoIt3Wrapper_Run_After="%scitedir%\upx\upx.exe" --ultra-brute -qf --compress-exports=1 --compress-icons=0 --strip-relocs=1 %out% Ultimate Packer for eXecutables Copyright (C) 1996 - 2013 UPX 3.91w Markus Oberhumer, Laszlo Molnar & John Reiser Sep 30th 2013 File size Ratio Format Name -------------------- ------ ----------- ----------- 790151 -> 317063 40.13% win64/pe TrackCleanReg_x64.exe Edited January 2, 2014 by Jekov Link to comment Share on other sites More sharing options...
Developers Jos Posted January 2, 2014 Developers Share Posted January 2, 2014 version 3.3.8.1 is not using standard PE resources so that could lead to issues. Version 3.3.10.x should be no problem. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Jekov Posted January 14, 2014 Share Posted January 14, 2014 I mean , why not instead in AutoIt3Wrapper compile x64 code: ; Compile x64 version ORIGIN If $INP_Compile_Both = "y" Or $INP_UseX64 <> 'n' Then Compile_Run_AUT2EXE('x64', $TempOutFile) If $INP_AutoIt3Wrapper_Testing <> "y" Then Compile_Upd_res($TempOutFile) If FileCopy($TempOutFile, $ScriptFile_Out_x64, 1) Then Write_RC_Console_Msg("Created program:" & $ScriptFile_Out_x64, "", "+") Else Write_RC_Console_Msg("Problem copying file from: " & $TempOutFile & " To :" & $ScriptFile_Out_x64, "", "!") EndIf If $Pragma_Out = "" Then FileDelete($TempOutFile) EndIf Replace with working code x64 UPX compression: expandcollapse popup; Compile x64 version If $INP_Compile_Both = "y" Or $INP_UseX64 <> 'n' Then Compile_Run_AUT2EXE('x64', $TempOutFile) If $INP_AutoIt3Wrapper_Testing <> "y" Then ; Move the created EXE by AUT2EXE to a tempdir to be able to add the resources and UPX without conflicts If $Pragma_Out <> "" Then $TempOutFile = _TempFile($TempDir, "~AU3", "." & $ScriptFile_Out_Type) FileMove($Pragma_Out, $TempOutFile, 1) EndIf If Compile_Upd_res($TempOutFile) And $INP_UseUpx = "y" Then ; ######################################################################################## ; Check if Pragma is used for UPX updates and supported ; ######################################################################################## If $Pragma_UseUpx <> "" Then If _VersionCompare($AUT2EXE_PGM_VER, "3.3.9.4") = 1 Then ConsoleWrite("> #pragma Compile(UPX, true/false) found." & @CRLF) ConsoleWrite("- Ignoring all #AutoIt3Wrapper_UseUPX #directive!" & @CRLF) $INP_Res_requestedExecutionLevel = "" $INP_Res_Compatibility = "" Else ConsoleWrite("- Ignoring all #pragma Compile(UPX, true/false) because AutoIt3 version: " & $AUT2EXE_PGM_VER & " doesn't support it!" & @CRLF) If $INP_UseUpx = "y" Then Compile_UPX($TempOutFile) EndIf Else If $Pragma_UseUpx <> "" Then ConsoleWrite("- Ignoring all #pragma Compile(UPX, true/false) because AutoIt3 version: " & $AUT2EXE_PGM_VER & " doesn't support it!" & @CRLF) If $INP_UseUpx = "y" Then Compile_UPX($TempOutFile) EndIf EndIf EndIf If $Pragma_Out <> "" Then ; Move the tempfile back FileMove($TempOutFile, $Pragma_Out, 1) If FileExists($Pragma_Out) Then Write_RC_Console_Msg("Created program (pragma):" & $Pragma_Out, "", "+") $ScriptFile_Out_x64 = $Pragma_Out Else Write_RC_Console_Msg("AUT2EXE did not created program:" & $Pragma_Out, "", "!") EndIf ElseIf FileMove($TempOutFile, $ScriptFile_Out_x64, 1) Then Write_RC_Console_Msg("Created program:" & $ScriptFile_Out_x64, "", "+") Else Write_RC_Console_Msg("Problem copying file from: " & $TempOutFile & " To :" & $ScriptFile_Out_x64, "", "!") EndIf EndIf It suits me. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 14, 2014 Developers Share Posted January 14, 2014 Assume your point is that UPX now also support x64 compiled script were this wasn't case before and you would like the support added? v 3.91.0.0 does indeed have: " experimental support for Win64/PE", so I could added the support for x64 compiled scripts but this it remains experimental. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
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