-
Notifications
You must be signed in to change notification settings - Fork 132
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
Path resolution causes bundled jre to not be found on linux when building from windows #419
Comments
I've always built apps for a given OS on the OS that it needs to be built for. I leverage virtual machines with a build setup (JDK, Maven etc.) installed on the VM so I can just copy the project folder over to the other OS and build the final artifact. I'm not sure if cross-platform building is supported by JavaPackager, but I might be wrong about that. |
Crossplatform building has worked for all cases (except installer generation on some platforms, as those need specific tools) before, also evidenced by the ability to set the target platform for the packaging to be different from the current platform. |
Hi @keastrid! |
That seems to work, thanks! |
I found a similar problem with |
Hi @chengjieFENG! |
Yes, I used this snapshot version and it was fixed when I didn't set the |
I've done a clean rebuild (deleted cached files, uninstalled the app from linux) just to confirm the snapshot works, and I might have found an issue (or I've done something wrong, I don't use linux very often). I can confirm the generated deb has the correct internal structure (though I did not test with Running the path to the application under |
I think I'm going to change |
I just released a new snapshot version with this change: Please, test this version and give me some feedback, so I can publish 1.7.6 on Maven Central ASAP. |
I gave it a test, and it still seems to fail for me. I have uploaded the built deb here in case it is useful. I have probably done something wrong, in which case sorry for the trouble! |
Hi @keastrid! |
Branch issue-419 merged into devel, ready to be released to Maven Central. |
v1.7.6 released to Maven Central |
Ugh, sorry about that. Could have sworn lowercase had worked before... Thanks for the help! |
I'm submitting a…
Short description of the issue/suggestion:
When building a .deb for linux on windows, the jre ends up split into 2 pieces as the windows drive letter is prepended to the path, causing the launch script to fail to run.
I believe this is caused by the fix for #302, where the installation path is resolved as an absolute path first.
Steps to reproduce the issue/enhancement:
What is the expected behavior?
Have the app run and not to include window's paths.
What is the current behavior?
App cannot run, installation succeeds but attempting to run the app will result in
No such file or directory
error.Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
As a test, I changed the 2
appPath.getAbsolutePath()
toappPath.toPath().normalize().toString()
(not sure if normalizing is what you were aiming for with the absolute path call), and this build and install succeeded, though I am using the default installation location.What is the motivation / use case for changing the behavior?
Ability to build for linux from windows
Please tell us about your environment:
Other information (e.g. related issues, suggestions how to fix, links for us to have context)
The text was updated successfully, but these errors were encountered: