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

winrun4j don't support 32bit EXE #395

Closed
gfek2001zz opened this issue Feb 18, 2024 · 7 comments
Closed

winrun4j don't support 32bit EXE #395

gfek2001zz opened this issue Feb 18, 2024 · 7 comments
Labels
enhancement New feature or request feedback Waiting for feedback fixed Issue fixed and release pending

Comments

@gfek2001zz
Copy link

help

@fvarrui
Copy link
Owner

fvarrui commented Feb 21, 2024

Hi @gfek2001zz!
Please, could you explain your issue a bit more?
AFAIK winrun4j binary file is compiled for 32 bit architecture, but have to check it to be 100% sure

@fvarrui
Copy link
Owner

fvarrui commented Feb 27, 2024

Hi @gfek2001zz! Please, could you explain your issue a bit more? AFAIK winrun4j binary file is compiled for 32 bit architecture, but have to check it to be 100% sure

Sorry, you are right. JP just distributes WinRun4J64.exe (64-bit version). I'm going to add support for 32-bit.

@fvarrui fvarrui added the enhancement New feature or request label Feb 27, 2024
@fvarrui
Copy link
Owner

fvarrui commented Feb 27, 2024

Hi again!

Changes pushed into issue-395 branch. I also used this branch to do some more improvements, as remove winrun4j-launcher auxiliary library (not needed anymore).

Tests

64-bit

JP keeps the current behaviour:

<configuration>
	<platform>windows</platform>
	<winConfig>
		<exeCreationTool>winrun4j</exeCreationTool>
	</winConfig>
</configuration>

Simplified configuration just to illustrate JP behavior

After building, you can check (using Sysinternals SisCheck tool, e.g.) that the EXE is 64-bit:

C:\Users\fvarrui\GitHub\HelloWorldMaven>sigcheck target\helloworldmaven\HelloWorldMaven.exe

Sigcheck v2.90 - File version and signature viewer
Copyright (C) 2004-2022 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\Users\fvarrui\GitHub\HelloWorldMaven\target\helloworldmaven\HelloWorldMaven.exe:
        Verified:       Unsigned
        Link date:      23:47 13/04/2013
        Publisher:      n/a
        Company:        ACME
        Description:    HelloWorldMaven
        Product:        HelloWorldMaven
        Prod version:   1.0.0.0
        File version:   1.0.0.0
        MachineType:    64-bit

And the bundled java (generated with jlink):

C:\Users\fvarrui\GitHub\HelloWorldMaven>sigcheck target\HelloWorldMaven\jre\bin\server\jvm.dll

Sigcheck v2.90 - File version and signature viewer
Copyright (C) 2004-2022 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\Users\fvarrui\GitHub\HelloWorldMaven\target\helloworldmaven\jre\bin\server\jvm.dll:
        Verified:       Signed
        Signing date:   4:30 17/01/2024
        Publisher:      Eclipse.org Foundation, Inc.
        Company:        Eclipse Adoptium
        Description:    OpenJDK 64-Bit server VM
        Product:        OpenJDK Platform 21.0.2
        Prod version:   21.0.2.0
        File version:   21.0.2.0
        MachineType:    64-bit

32-bit

I have to bundle a 32-bit JRE (see jrePath) since I'm building on a 64-bit Windows, because WinRun4J 32-bit needs it, unless your system has a 32-bit JRE installed (not my case). Notice that now when using WinRun4J you can set arch=x86 if you want a 32-bit WinRun4J.exe (on a 64-bit Windows system arch=x64 by default).

<configuration>
	<platform>windows</platform>
	<jrePath>C:\Users\fvarrui\jdks\windows\jdk-11.0.22+7-jre</jrePath>
	<arch>x86</arch>
	<winConfig>
		<exeCreationTool>winrun4j</exeCreationTool>
	</winConfig>
</configuration>

Simplified configuration just to illustrate JP behavior

And now, after building:

C:\Users\fvarrui\GitHub\HelloWorldMaven>sigcheck target\HelloWorldMaven\HelloWorldMaven.exe

Sigcheck v2.90 - File version and signature viewer
Copyright (C) 2004-2022 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\Users\fvarrui\GitHub\HelloWorldMaven\target\helloworldmaven\HelloWorldMaven.exe:
        Verified:       Unsigned
        Link date:      23:47 13/04/2013
        Publisher:      n/a
        Company:        ACME
        Description:    HelloWorldMaven
        Product:        HelloWorldMaven
        Prod version:   1.0.0.0
        File version:   1.0.0.0
        MachineType:    32-bit

And the bundled java (copied from jrePath):

C:\Users\fvarrui\GitHub\HelloWorldMaven>sigcheck target\HelloWorldMaven\jre\bin\server\jvm.dll

Sigcheck v2.90 - File version and signature viewer
Copyright (C) 2004-2022 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\Users\fvarrui\GitHub\HelloWorldMaven\target\helloworldmaven\jre\bin\server\jvm.dll:
        Verified:       Signed
        Signing date:   0:21 17/01/2024
        Publisher:      Eclipse.org Foundation, Inc.
        Company:        Eclipse Adoptium
        Description:    OpenJDK server VM
        Product:        OpenJDK 11.0.22
        Prod version:   11.0.22.0
        File version:   11.0.22.0
        MachineType:    32-bit

Release

Just released a snapshot version which supports WinRun4j 32-bit EXE: 1.7.6-20240227.185320-2. Take a look at how to use JP snapshot versions in the README.

Please, try it and give me some feedback.
Thanks!

@fvarrui fvarrui added the feedback Waiting for feedback label Feb 27, 2024
@fvarrui
Copy link
Owner

fvarrui commented Feb 28, 2024

New snapshot version released with several improvements: 1.7.6-20240228.024956-3.

Now also checks if the bundled JRE matches the target architecture, preventing an invalid app from being generated.

@gfek2001zz
Copy link
Author

thanks !!!

@fvarrui fvarrui added the fixed Issue fixed and release pending label Mar 27, 2024
@fvarrui
Copy link
Owner

fvarrui commented Mar 30, 2024

Branch issue-395 merged into devel, ready to be released to Maven Central asap.

@fvarrui
Copy link
Owner

fvarrui commented Jun 30, 2024

v1.7.6 released to Maven Central

@fvarrui fvarrui closed this as completed Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback Waiting for feedback fixed Issue fixed and release pending
Projects
None yet
Development

No branches or pull requests

2 participants