Jump to content

[Discussion] A new set of resource tools


-I-

Recommended Posts

Update:

the info in this topic should be considered reference material only.

it is outdated, and a new topic has be started... < check it here >

________________________

this topic should be clozed.....

____________________________________

In discussion here we've talked about x64 versions of XPize and future Vize,

and as XPero has said he wanted to go away from NSIS and I think he should take it a whole step futher.

Just recently NTcore offerd to add command line arguments to his CFFexplorer whitch is part of the Explorer Suite these so-called commandline arguments would enable the tool to be used in scripting and thus in installers (like XPize),

with this tools you can do almost all resource editing including; hex, bitmap, vista icons, and more,

in both 32 and 64bit aplications,

but to get it all working he asked for some requests about the best way it should be implemented..

my first idea would be to have both a commandly agument and a config file as below:

;a resource patcher file should consist of the following information, 
; a) a sourcefile (an exe or dll that should be patched),
; b) a command (describing what should be done with the file
; # for example
; # >> -add (ads a resource) ¹
; # >> -update (updates a resource) ¹
; # >> -del (deletes a resource)
; # >> -save (saves a resource as file) ²
; c) the alocation and name of the resource (example: bitmaps\10245)
; d) (if required): the resource file name ¹ / or destination file name ²

;examples
;system32.dll -update bitmap\1234 c:\temp\xpize\system32.dll\1234.bmp
;system32.dll -save icongroups\1357 c:\icons\1357.ico

any commands are welcome,

please lets al make it word for x64 users...

Edited by -I-
Link to comment
Share on other sites


The syntax of "patch.exe system32.dll -replace bitmap\10240 c:\temp\sytem32.dll\bitmap\10240.bmp" looks good to me, but it is important to have batch support, like reshacker scripts, so I dont have to be calling in my C# code the patcher app for every resource that needs to be applied (that config file in the blogger post looks good to).

Another possibility (likely impossible) would be to have a DLL library API which I can use with my C# code, but I dont know if thats OK with the creator of the patcher. Anyway, this is looking very good and promising.

Many thanks go to -I- for bringing light to x64 support of XPize and Vize.

Link to comment
Share on other sites

Why not stick with the same commands and script files as with ResHacker? They work great. Although I would welcome some additional commands for renaming resources and changing their language without modification of their content (not useful for XPize, but it would be nice for translators). Also, the patcher should accept both, raw resources (like .bmp, .ico, .cur) and compiled resource (.res) files, like ResHacker does.

The commands used by ResHacker are:

-add ExeFile, SaveAsFile, ResourceFile, [ResType],[ResName],[ResLang] - adds new resources

-addskip ExeFile, SaveAsFile, ResourceFile, [ResType],[ResName],[ResLang] - adds new resources, but skips existing

-addoverwrite ExeFile, SaveAsFile, ResourceFile, [ResType],[ResName],[ResLang] - adds resources, overwrites existing

-modify ExeFile, SaveAsFile, ResourceFile, [ResType],[ResName],[ResLang] - modifies existing resources, doesn't add any new

-extract ExeFile, ResourceFile, [ResType],[ResName],[ResLang] - extracts specified resources as .rc script + raw binary files or as a .res file

-delete ExeFile, SaveAsFile, [ResType],[ResName],[ResLang] - deletes specified resources

Parameters in square brackets are optional, but the commas cannot be omitted.

As I said, -rename and -setlng commands would be nice to have.

The script file format is also simple:

 [FILENAMES]
Exe=ExeFile
SaveAs=SaveAsFile
Log=LogFile

[COMMANDS]
-add ResourceFile, [ResType],[ResName],[ResLang]
-addskip ResourceFile, [ResType],[ResName],[ResLang]
-addoverwrite ResourceFile, [ResType],[ResName],[ResLang]
-addoverwrite ResourceFile, [ResType],[ResName],[ResLang]
-modify ResourceFile, [ResType],[ResName],[ResLang]
-extract ResourceFile, [ResType],[ResName],[ResLang]
-delete [ResType],[ResName],[ResLang]

Link to comment
Share on other sites

@ LordWarlock:

i first posted it that way too:

 [FILENAMES]
Exe=ExeFile
SaveAs=SaveAsFile
Log=LogFile

[COMMANDS]
-add ResourceFile, [ResType],[ResName],[ResLang]
-addskip ResourceFile, [ResType],[ResName],[ResLang]
-addoverwrite ResourceFile, [ResType],[ResName],[ResLang]
-addoverwrite ResourceFile, [ResType],[ResName],[ResLang]
-modify ResourceFile, [ResType],[ResName],[ResLang]
-extract ResourceFile, [ResType],[ResName],[ResLang]
-delete [ResType],[ResName],[ResLang]

on the blogg, yet the comment i got was that, it was 1script file per resource file,

so i proposed file sections as:

<file = system32.dll>
-add ........
-del ....
....etc.........
</file>

witch can become rather unclean, as well,

Thats why i wanted to see what people thought about, also including, the origing file in a command, ofcaurce it would be conf filre rather than a batchfile (you dont want calling patcher.exe) for every seperate file you want patched.

but you should get sothing like... patcher.exe -ua:patcher.conf

patcher.conf

00:   resource patcher configuration file  version 0.1
01:
02: <file> <command> <restype> <alocation> <lang> <resource file> (to be discused)....

In the end this would just be a batch file, but parsed by patcher rather than by command.com ) ....

Edited by -I-
Link to comment
Share on other sites

In discussion here we've talked about x64 versions of XPize and future Vize,

and as XPero has said he wanted to go away from NSIS and I think he should take it a whole step futher.

Just recently NTcore offerd to add command line arguments to his CFFexplorer whitch is part of the Explorer Suite these so-called commandline arguments would enable the tool to be used in scripting and thus in installers (like XPize),

If I new that the NTCore's admin were so nice, i'd have contacted him sooner... :whistle:

Anyway, a syntax similar to Reshacker would be nice, like you said.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...