8231858:[macos] App does not run if installed with pkg
Submitted-by: almatvee
Reviewed-by: aherrick, asemenyuk
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Thu Oct 10 10:57:42 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Mon Oct 14 11:04:06 2019 -0400
@@ -190,7 +190,11 @@
Map<String, String> data = new HashMap<>();
+ Path appLocation = Path.of(MAC_INSTALL_DIR.fetchFrom(params),
+ APP_NAME.fetchFrom(params) + ".app", "Contents", "app");
+
data.put("INSTALL_LOCATION", MAC_INSTALL_DIR.fetchFrom(params));
+ data.put("APP_LOCATION", appLocation.toString());
try (Writer w = Files.newBufferedWriter(
getScripts_PreinstallFile(params).toPath())) {
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/postinstall.template Thu Oct 10 10:57:42 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/postinstall.template Mon Oct 14 11:04:06 2019 -0400
@@ -2,5 +2,6 @@
chown root:wheel "INSTALL_LOCATION"
chmod a+rX "INSTALL_LOCATION"
+chmod +r "APP_LOCATION/"*.jar
exit 0