Re: jpackage: packaging a real application

2019-07-29 Thread Andy Herrick
Thanks for the heads up on linux file associations.  I have filed 
JDK-8228744 and make sure it is fixed.


As to the customization of the msi scripts, it is generally the 
intention of the implementation that all resources would be fetched by 
calling fetchResource() in AbstractBundler.java.  I can see from the 
current implementation that only the post install script (for which 
there is no default resource) is fetched in this way (all others, 
including main.wxs, just calling getResourceAsStream() which will only 
get the default resources).


If the code were to call fetchResource()  (as intended) instead of 
getResourceAsStream(), you would have the capability to use option 
"--resource-dir " with  pointing to a directory containing any 
resource you want to override.


I will investigate this further and get back to you.

/Andy


On 7/27/2019 2:30 AM, Nicolas Roduit wrote:

Hi all,

I'm trying to use jpackage to replace deployment by Java Web Start. I 
have set up a continuous build to allow the construction of a package 
on Windows, Mac and Linux.


The latest changes to the directory change of the launch binaries and 
the change in the value of the current working directory required a 
series of modification in my build. However, there is a bug on Linux 
for the installation of the file association, see the proposed patch 
in attachment.


There is another problem that seems to me to be major. It is to no 
longer possible to overload the construction of the MSI. I modified 
the code to be able to add my own main.wxs file. I think that being 
able to fully overload main.wxs is essential even if many users will 
just use the default template.


Best,

Nicolas



jpackage: packaging a real application

2019-07-29 Thread Nicolas Roduit

Hi all,

I'm trying to use jpackage to replace deployment by Java Web Start. I 
have set up a continuous build to allow the construction of a package on 
Windows, Mac and Linux.


The latest changes to the directory change of the launch binaries and 
the change in the value of the current working directory required a 
series of modification in my build. However, there is a bug on Linux for 
the installation of the file association, see the proposed patch in 
attachment.


There is another problem that seems to me to be major. It is to no 
longer possible to overload the construction of the MSI. I modified the 
code to be able to add my own main.wxs file. I think that being able to 
fully overload main.wxs is essential even if many users will just use 
the default template.


Best,

Nicolas

diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java
index 0feefa1d5..6e99fa920 100644
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java
@@ -546,7 +546,7 @@ private boolean prepareProjectConfig(Map params)
 .append(LINUX_INSTALL_DIR.fetchFrom(params))
 .append("/")
 .append(data.get("APPLICATION_FS_NAME"))
-.append("/")
+.append("/bin/")
 .append(mimeInfoFile)
 .append("\n");
 
@@ -554,7 +554,7 @@ private boolean prepareProjectConfig(Map params)
 .append(LINUX_INSTALL_DIR.fetchFrom(params))
 .append("/")
 .append(data.get("APPLICATION_FS_NAME"))
-.append("/")
+.append("/bin/")
 .append(mimeInfoFile)
 .append("\n");
 addedEntry = true;
diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java
index 8a9daf550..8445679c6 100644
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java
@@ -460,7 +460,7 @@ private boolean prepareProjectConfig(Map params)
 .append(LINUX_INSTALL_DIR.fetchFrom(params))
 .append("/")
 .append(data.get("APPLICATION_FS_NAME"))
-.append("/")
+.append("/bin/")
 .append(mimeInfoFile)
 .append("\n");
 
@@ -468,7 +468,7 @@ private boolean prepareProjectConfig(Map params)
 .append(LINUX_INSTALL_DIR.fetchFrom(params))
 .append("/")
 .append(data.get("APPLICATION_FS_NAME"))
-.append("/")
+.append("/bin/")
 .append(mimeInfoFile)
 .append("\n");
 addedEntry = true;