question: Restorator commandline

HJW

2008-03-20 10:04:39

Hi all,

I am trying to apply resources (.res) to files and keeping the language of the replaced resource.

So if bitmap 101 in test.dll = English and bitmap 101 in image.res is German can it be applied and remain English ?

If this is not possible is it then possible to extract languageID from the resource bitmap 101 ?

thanks,
HJW

florian

2008-03-31 22:29:44

Hi,

by default, Restorator overwrites an existing resource by name regardless of language, if there is only one existing resource. From the command line, however, you can specify the resource to assign to by name and (optionally) the language when you use the -assignOn command line parameter. E.g.

Code: Select all

Restorator.exe -open test.dll -assignOn image.res "Bitmap\101\English (United States)" -save -exit
That should open test.dll and overwrite (or create) an english bitmap resource named 101 with the 101 bitmap in image.res . You can also use hexadecimal or decimal number for the language, e.g. Bitmap\101\0x0409 .

For more info, see http://www.bome.com/Restorator/help/hel ... c350126141

Regards,
Florian

HJW

2008-04-20 16:48:27

Hi Florian,

First of all I want to thank you for your reply. It helped me a lot though I do have a next question using -assingOn
I work with .res files which contain a lot of bitmaps (101 to 150 for example) How do I need to use that with -assignOn ?

Code: Select all

Restorator.exe -open test.dll -assignOn image.res "*\English (United States)" -save -exit
I suppose wildcards are not possible?

HJW

florian

2008-04-20 23:06:31

in that case, I'd recommend using setLangID:
The following parameter

Code: Select all

-setLangIDOn Bitmap "English (United States)"
will set all bitmap resources to US English.

Now, the easy way would be this:

Code: Select all

Restorator.exe -open test.dll -assignOn image.res Bitmap -setLangIDOn Bitmap "English (United States)" -save -exit
But of course that may cause problems if you have/want to have different language resources.

Now the other way is not as straight-forward, but should work: use a temporary file, set all its bitmap resources to US English, and then use Restorator to assign the temporary file. At best, do this from a .bat file:

Code: Select all

copy image.res temp.res
Restorator.exe -open temp.res -setLangIDOn Bitmap "English (United States)" -save -open test.dll -assignOn temp.res Bitmap -save -exit
del temp.res
(you can also call Restorator.exe twice, for each file)

Let me know if that helps!
Florian