Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled code #202

Closed
lhDream opened this issue May 25, 2022 · 20 comments
Closed

Garbled code #202

lhDream opened this issue May 25, 2022 · 20 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists fixed Issue fixed and release pending help wanted Extra attention is needed

Comments

@lhDream
Copy link
Contributor

lhDream commented May 25, 2022

When ${project. Description} is in Chinese, the process displays garbled code

- JavaPackager version: 1.6.6
- OS version: windows Server 2019 Datacenter 1809
- JDK version: 1.8
- Build tool: Maven 3.8

image

@fvarrui
Copy link
Owner

fvarrui commented May 27, 2022

Hi @lhDream!
Please, have a look at this related issue.

@fvarrui fvarrui added the duplicate This issue or pull request already exists label May 27, 2022
@fvarrui
Copy link
Owner

fvarrui commented Jun 8, 2022

Hi @lhDream!
Did you manage to fix this issue? JavaPackager is using rcedit-x64.exe command line tool to customize WinRun4j and Why launchers (EXE files) ... maybe you can try it with the EXE generated by Launch4j.

@lhDream
Copy link
Contributor Author

lhDream commented Jun 9, 2022

Hi @fvarrui
I tried to use launch4j, but it was also garbled code.

@fvarrui
Copy link
Owner

fvarrui commented Jun 9, 2022

I mean use rcedit-x64.exe command tool by your own to modify the description of the EXE generated with Launch4j

@lhDream
Copy link
Contributor Author

lhDream commented Jun 9, 2022

@fvarrui
rcedit-x64.exe does modify the EXE file description, but it cannot be executed.

@fvarrui
Copy link
Owner

fvarrui commented Jun 9, 2022

Could you give a try to Resource Hacker? It also can be used as a command line tool, and if it works fine, maybe you can automate the "set-exe-description" process calling it from Maven.

I'm sorry I can't help you much more

@lhDream
Copy link
Contributor Author

lhDream commented Jun 9, 2022

I'll try

@lhDream
Copy link
Contributor Author

lhDream commented Jun 9, 2022

The Resource Hacker GUI can use

@lhDream
Copy link
Contributor Author

lhDream commented Jun 10, 2022

Hi @fvarrui
If the project path contains CJK, the project will fail to package.
Example:

D:/test/测试/testProject

@fvarrui
Copy link
Owner

fvarrui commented Jun 16, 2022

Hi @lhDream!
sorry for my late reply!
I'll do some research about this, but I'm not really sure if I can reproduce your issue on my Spanish Windows.

@fvarrui fvarrui added the bug Something isn't working label Jun 16, 2022
@lhDream
Copy link
Contributor Author

lhDream commented Jun 23, 2022

hi @fvarrui
It doesn't matter. It's not a big problem. If you can't reproduce it, you can try the virtual machine.

@fvarrui
Copy link
Owner

fvarrui commented Jun 23, 2022

Let's keep this issue opened until we can find a solution. Thanks!

hi @fvarrui It doesn't matter. It's not a big problem. If you can't reproduce it, you can try the virtual machine.

@fvarrui fvarrui added the help wanted Extra attention is needed label Jun 23, 2022
@fvarrui
Copy link
Owner

fvarrui commented Jun 23, 2022

The Resource Hacker GUI can use

Did you manage to automate the "set description" process using Resource Hacker?

@lhDream
Copy link
Contributor Author

lhDream commented Jun 30, 2022

hi @fvarrui
Tried, but failed. Maybe I used it the wrong way

@fvarrui
Copy link
Owner

fvarrui commented Jul 11, 2022

Hi @lhDream!
I'll give it a try and tell you something ASAP.

@lhDream
Copy link
Contributor Author

lhDream commented Jul 18, 2022

Hi @fvarrui
Thanks.

@lhDream
Copy link
Contributor Author

lhDream commented Aug 16, 2022

Hi @fvarrui

ResourceHacker.exe version V5.1.8

demo.rc

1 VERSIONINFO
FILEVERSION 3,1,4,1592
PRODUCTVERSION 2,7,1,8
FILEOS 0x4
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
    BLOCK "040904E4"
    {
        VALUE "CompanyName", "测试0\0"
        VALUE "FileDescription", "测试1\0"
        VALUE "FileVersion", "测试2\0"
        VALUE "ProductName", "测试3\0"
        VALUE "InternalName", "测试4\0"
        VALUE "LegalCopyright", "测试5\0"
        VALUE "OriginalFilename", "测试6\0"
        VALUE "ProductVersion", "测试7\0"
    }
}

BLOCK "VarFileInfo"
{
    VALUE "Translation", 0x0409 0x04E4  
}
}

ResourceHacker.exe -open demo.rc -save demo.res -action compile

ResourceHacker.exe -open demo.exe -save newDemo.exe -action addoverwrite -resource demo.res

image
image

@fvarrui
Copy link
Owner

fvarrui commented Sep 3, 2022

Hi @lhDream!
So, is ResourceHacker command line tool working as expected?

@lhDream
Copy link
Contributor Author

lhDream commented Sep 3, 2022

Hi @fvarrui !
Yes!

@fvarrui fvarrui added the fixed Issue fixed and release pending label Jan 25, 2023
@fvarrui
Copy link
Owner

fvarrui commented Feb 8, 2023

JavaPackager 1.7.0 released to Maven Central

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists fixed Issue fixed and release pending help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants