Modify

Opened 14 years ago

Closed 14 years ago

#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 Changed 14 years ago by Zedna

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 Changed 14 years ago by wraithdu

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 Changed 14 years ago by Jos

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 Changed 14 years ago by Jon

  • Resolution set to No Bug
  • Status changed from new to closed

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.