Modify

#1348 closed Bug (No Bug)

aut2exe Mangles Named RCDATA Resources

Reported by: wraithdu Owned by:
Milestone: Component: Aut2Exe
Version: 3.3.1.7 Severity: None
Keywords: aut2exe rcdata Cc:

Description

If I add a named resource to AutoItSC.bin with ResHacker, then compile a script, the resource name is mangled. For example:

ResHacker -add AutoItSC.bin, AutoItSC.bin, mydata.dat, rcdata, MYDATA, 1033

Viewing the resulting AutoItSC.bin in ResHacker:

RCData -> MYDATA -> 1033

Viewing the compiled EXE in ResHacker:

RCData -> M( -> 1033
(or some other mangled name)

The actual data seems intact. The same problem happens with named resources of types BITMAP and ICON as well. I do not know if aut2exe_x64 has this problem or not.

Attachments (0)

Change History (4)

comment:1 by Zedna, on Dec 16, 2009 at 9:34:30 AM

Just some notes:

1)As workaround you can add desired resources to output compiled EXE instead of AutoItSC.bin. This way I add resources in my Resource UDF
http://www.autoitscript.com/forum/index.php?showtopic=51103

#AutoIt3Wrapper_useupx=n
#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, image3.jpg, rcdata, TEST_JPG_1, 0
#AutoIt3Wrapper_run_after=upx.exe --best --compress-resources=0 "%out%"

#include "resources.au3"
 
$gui = GUICreate("Data from resources simple example 1",400,150)
$pic1 = GUICtrlCreatePic("",0,0,400,150)
_ResourceSetImageToCtrl($pic1, "TEST_JPG_1") ; set JPG image to picture control from resource
GUISetState(@SW_SHOW)

While 1
    If GUIGetMsg() = -3 Then Exit
WEnd

2) Scite4AutoIt3 has the similar bug. If you use #AutoIt3Wrapper_Res_File_Add directive then resource is placed at wrong section with wrong name

comment:2 by wraithdu, on Dec 16, 2009 at 2:44:10 PM

Actually I found the bug while modifying AutoIt3Wrapper to use named resources, and just confirmed it with ResHacker. Took me hours to figure out what was going on until I interrupted the process and looked at the interim .bin file :/

comment:3 by Jos, on Dec 22, 2009 at 6:35:15 PM

Not sure if we really want to support modifying the BIN files but leave that up to Jon to decide.
The current solution we are working on to update the resources after compilation is the way to go.

Jos

comment:4 by Jon, on Jan 8, 2010 at 2:25:38 PM

Resolution: No Bug
Status: newclosed

No bug. Aut2exe is built to handle AutoItSC.bin as is (for now).

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.