electron / rcedit

Command line tool to edit resources of exe
MIT License
1.67k stars 185 forks source link

Set Language Info from CLI #18

Open dharders opened 8 years ago

dharders commented 8 years ago

By default, the language is set as English US.

For those of us that are outside of the US, is there a way to set the language from the CLI, assuming we know the language / sub_lang hex codes ?

Currently, the locale code is hardcoded in rcedit.rc

BLOCK "VarFileInfo"
BEGIN
    VALUE "Translation", 0x409, 1200
END

Where 0x0409 == 1033 == en_us and 1200 == 1.2.0.0 version.

SetVersionString() is only exposing the1200 part (i.e. the version) in main.cc, but there is the an extended version of the function SetVersionString() in rescle.cc.

Please allow us to pass locale codes from CLI (in hex or decimal or en_au format doesn't matter).

If there is already a way to do this, please explain. Thanks !

dharders commented 8 years ago

cc @zcbenz

nurtext commented 7 years ago

Any progress so far?

dharders commented 7 years ago

Still waiting @nurtext ....

If my c++ skills were better I'd fix it myself and submit a PR.

Here is a simple node script that I knocked up that achieves the same thing if you're desperate: https://github.com/electron-userland/electron-builder/issues/672

I agree that it would be much better to fix here though!

nurtext commented 7 years ago

Thanks @dharders, already seen the script. Curious how you implemented it in your build workflow. Any tips? Appreciate it!

dharders commented 7 years ago

The script was more a proof of concept, called after build but before code signing. Nothing special, just used as a gulp task / npm script.

That being said, I no longer use it as I'm using electron-builder with NSIS and it automatically handles it for me. However, only the installer has the correct language but the runtime still has English US, hence why I'm still waiting for this issue to be resolved.

aliaga-d commented 5 years ago

no news on this? It seems NSIS has the option to set language but not the portable target

tenwx commented 2 years ago

Any progress so far?

kanweiwei commented 1 year ago

You can use peresed.exe to apply a new .res by Python module pe_tools before signing the .exe