--- old/src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java 2019-03-20 16:49:27.541223700 -0700 +++ new/src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java 2019-03-20 16:49:26.253094900 -0700 @@ -46,39 +46,48 @@ if (noArgs) { Log.info(I18N.getString("MSG_Help_no_args")); } else { - Platform platform = (Log.isDebug()) ? + Platform platform = (Log.isDebug()) ? Platform.UNKNOWN : Platform.getPlatform(); String types; String pLaunchOptions; String pInstallOptions; + String pInstallDir; switch (platform) { case MAC: types = "{\"pkg\", \"dmg\"}"; pLaunchOptions = ""; pInstallOptions = I18N.getString("MSG_Help_mac_install"); + pInstallDir + = I18N.getString("MSG_Help_mac_linux_install_dir"); break; case LINUX: types = "{\"rpm\", \"deb\"}"; pLaunchOptions = ""; pInstallOptions = I18N.getString("MSG_Help_linux_install"); + pInstallDir + = I18N.getString("MSG_Help_mac_linux_install_dir"); break; case WINDOWS: types = "{\"exe\", \"msi\"}"; pLaunchOptions = I18N.getString("MSG_Help_win_launcher"); pInstallOptions = I18N.getString("MSG_Help_win_install"); + pInstallDir + = I18N.getString("MSG_Help_win_install_dir"); break; default: - types = + types = "{\"exe\", \"msi\", \"rpm\", \"deb\", \"pkg\", \"dmg\"}"; pLaunchOptions = I18N.getString("MSG_Help_win_launcher"); pInstallOptions = I18N.getString("MSG_Help_win_install") + I18N.getString("MSG_Help_mac_install") + I18N.getString("MSG_Help_linux_install"); + pInstallDir + = I18N.getString("MSG_Help_default_install_dir"); break; } Log.info(MessageFormat.format(I18N.getString("MSG_Help"), File.pathSeparator, types, pLaunchOptions, - pInstallOptions)); + pInstallOptions, pInstallDir)); } } } --- old/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties 2019-03-20 16:49:33.690838600 -0700 +++ new/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties 2019-03-20 16:49:32.379707500 -0700 @@ -166,7 +166,7 @@ \ The format must be a DNS name in reverse order,\n\ \ such as com.example.myapplication.\n\ \ --install-dir \n\ -\ Absolute path of the installation directory of the application\n\ +\ {4}\ \ --installer-type \n\ \ The type of the installer to create\n\ \ Valid values are: {1} \n\ @@ -215,6 +215,10 @@ \ --win-upgrade-uuid \n\ \ UUID associated with upgrades for this package\n\ +MSG_Help_win_install_dir=\ +\Relative sub-path of the installation location of the application such as\n\ +\ "Program Files" or "AppData"\n\ + MSG_Help_mac_install=\ \ --mac-bundle-identifier \n\ \ An identifier that uniquely identifies the application for MacOSX\n\ @@ -253,6 +257,14 @@ \ --linux-rpm-license-type \n\ \ Type of the license ("License: " of the RPM .spec)\n\ +MSG_Help_mac_linux_install_dir=\ +\Absolute path of the installation directory of the application\n\ + +MSG_Help_default_install_dir=\ +\Absolute path of the installation directory of the application on OS X\n\ +\ or Linux. Relative sub-path of the installation location of the application\n\ +\ such as "Program Files" or "AppData" on Windows.\n\ + MSG_Help_no_args=Usage: jpackage \n\ \Use jpackage --help (or -h) for a list of possible options\ --- old/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties 2019-03-20 16:49:39.788448300 -0700 +++ new/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties 2019-03-20 16:49:38.495319000 -0700 @@ -166,7 +166,7 @@ \ The format must be a DNS name in reverse order,\n\ \ such as com.example.myapplication.\n\ \ --install-dir \n\ -\ Absolute path of the installation directory of the application\n\ +\ {4}\ \ --installer-type \n\ \ The type of the installer to create\n\ \ Valid values are: {1} \n\ @@ -215,6 +215,10 @@ \ --win-upgrade-uuid \n\ \ UUID associated with upgrades for this package\n\ +MSG_Help_win_install_dir=\ +\Relative sub-path of the installation location of the application such as\n\ +\ "Program Files" or "AppData"\n\ + MSG_Help_mac_install=\ \ --mac-bundle-identifier \n\ \ An identifier that uniquely identifies the application for MacOSX\n\ @@ -253,6 +257,14 @@ \ --linux-rpm-license-type \n\ \ Type of the license ("License: " of the RPM .spec)\n\ +MSG_Help_mac_linux_install_dir=\ +\Absolute path of the installation directory of the application\n\ + +MSG_Help_default_install_dir=\ +\Absolute path of the installation directory of the application on OS X\n\ +\ or Linux. Relative sub-path of the installation location of the application\n\ +\ such as "Program Files" or "AppData" on Windows.\n\ + MSG_Help_no_args=Usage: jpackage \n\ \Use jpackage --help (or -h) for a list of possible options\ --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinAppBundler.java 2019-03-20 16:49:45.939063300 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinAppBundler.java 2019-03-20 16:49:44.605930000 -0700 @@ -25,10 +25,7 @@ package jdk.jpackage.internal; -import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.IOException; -import java.io.PrintStream; import java.nio.file.Path; import java.text.MessageFormat; import java.util.Arrays; --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java 2019-03-20 16:49:52.015670900 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java 2019-03-20 16:49:50.728542200 -0700 @@ -30,8 +30,6 @@ import java.nio.file.Files; import java.text.MessageFormat; import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import static jdk.jpackage.internal.WindowsBundlerParam.*; @@ -463,7 +461,7 @@ data.put("PRODUCT_APP_IDENTIFIER", innosetupEscape(getAppIdentifier(p))); - + validateValueAndPut(data, "INSTALL_DIR", WINDOWS_INSTALL_DIR, p); validateValueAndPut(data, "INSTALLER_NAME", APP_NAME, p); validateValueAndPut(data, "APPLICATION_VENDOR", VENDOR, p); validateValueAndPut(data, "APPLICATION_VERSION", VERSION, p); --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java 2019-03-20 16:49:58.131282400 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java 2019-03-20 16:49:56.841153400 -0700 @@ -30,7 +30,6 @@ import java.nio.file.Files; import java.text.MessageFormat; import java.util.*; -import java.util.regex.Matcher; import java.util.regex.Pattern; import static jdk.jpackage.internal.WindowsBundlerParam.*; @@ -965,8 +964,17 @@ out.println( " "); } + + // We should get valid folder or subfolders + String installDir = WINDOWS_INSTALL_DIR.fetchFrom(params); + String [] installDirs = installDir.split(Pattern.quote("\\")); + for (int i = 0; i < (installDirs.length - 1); i++) { + out.println(" "); + } + out.println(" "); + + installDirs[installDirs.length - 1] + "\">"); // dynamic part id = 0; @@ -974,7 +982,9 @@ walkFileTree(params, WIN_APP_IMAGE.fetchFrom(params), out, " "); // closing - out.println(" "); + for (int i = 0; i < installDirs.length; i++) { + out.println(" "); + } out.println(" "); // for shortcuts --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsBundlerParam.java 2019-03-20 16:50:04.267896000 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsBundlerParam.java 2019-03-20 16:50:02.974766700 -0700 @@ -25,6 +25,7 @@ package jdk.jpackage.internal; +import java.text.MessageFormat; import java.util.Map; import java.util.ResourceBundle; import java.util.function.BiFunction; @@ -86,4 +87,30 @@ params -> Boolean.FALSE, (s, p) -> Boolean.valueOf(s) ); + + static final BundlerParamInfo WINDOWS_INSTALL_DIR = + new StandardBundlerParam<>( + "windows-install-dir", + String.class, + params -> { + String dir = INSTALL_DIR.fetchFrom(params); + if (dir != null) { + if (dir.contains(":") || dir.contains("..")) { + Log.error(MessageFormat.format(I18N.getString( + "message.invalid.install.dir"), dir, + APP_NAME.fetchFrom(params))); + } else { + if (dir.startsWith("\\")) { + dir = dir.substring(1); + } + if (dir.endsWith("\\")) { + dir = dir.substring(0, dir.length() - 1); + } + return dir; + } + } + return APP_NAME.fetchFrom(params); // Default to app name + }, + (s, p) -> s + ); } --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties 2019-03-20 16:50:10.373506500 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties 2019-03-20 16:50:09.069376100 -0700 @@ -88,4 +88,5 @@ message.light-file-string=WiX light tool set to {0} message.candle-file-string=WiX candle tool set to {0} message.install.dir.exist=The folder [APPLICATIONFOLDER] already exist. Whould you like to install to that folder anyway? +message.invalid.install.dir=Warning: Invalid install dir {0}. Install dir should be a relative sub-path under default installation location such as "Program Files". Defaulting to application name "{1}". --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties 2019-03-20 16:50:16.455114600 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties 2019-03-20 16:50:15.164985600 -0700 @@ -88,4 +88,5 @@ message.light-file-string=WiX light tool set to {0} message.candle-file-string=WiX candle tool set to {0} message.install.dir.exist=The folder [APPLICATIONFOLDER] already exist. Whould you like to install to that folder anyway? +message.invalid.install.dir=Warning: Invalid install dir {0}. Install dir should be a relative sub-path under default installation location such as "Program Files". Defaulting to application name "{1}". --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties 2019-03-20 16:50:22.536722700 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties 2019-03-20 16:50:21.241593200 -0700 @@ -88,4 +88,5 @@ message.light-file-string=WiX light tool set to {0} message.candle-file-string=WiX candle tool set to {0} message.install.dir.exist=The folder [APPLICATIONFOLDER] already exist. Whould you like to install to that folder anyway? +message.invalid.install.dir=Warning: Invalid install dir {0}. Install dir should be a relative sub-path under default installation location such as "Program Files". Defaulting to application name "{1}". --- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss 2019-03-20 16:50:28.630332000 -0700 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss 2019-03-20 16:50:27.339202900 -0700 @@ -10,7 +10,7 @@ AppCopyright=APPLICATION_COPYRIGHT VersionInfoVersion=APPLICATION_VERSION VersionInfoDescription=APPLICATION_DESCRIPTION -DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALLER_NAME +DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALL_DIR DisableStartupPrompt=Yes DisableDirPage=DISABLE_DIR_PAGE DisableProgramGroupPage=Yes --- old/test/jdk/tools/jpackage/createimage/JPackageCreateImageModularJarTest.java 2019-03-20 16:50:34.715940500 -0700 +++ new/test/jdk/tools/jpackage/createimage/JPackageCreateImageModularJarTest.java 2019-03-20 16:50:33.428811800 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it --- old/test/jdk/tools/jpackage/createinstaller/windows/base/JPackageCreateInstallerFileAssociationsBase.java 2019-03-20 16:50:40.794548300 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/base/JPackageCreateInstallerFileAssociationsBase.java 2019-03-20 16:50:39.504419300 -0700 @@ -136,25 +136,39 @@ } } - private static void init(String name, String ext) { + private static void init(String name, String ext, String installDir, String testExt) { TEST_NAME = name; EXT = ext; - TEST_EXT = "jptest1"; + TEST_EXT = testExt; OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; - CMD = new String[]{ - "create-installer", - "--installer-type", EXT, - "--input", "input", - "--output", "output", - "--name", TEST_NAME, - "--main-jar", "hello.jar", - "--main-class", "Hello", - "--files", "hello.jar", - "--file-associations", "fa.properties"}; + if (installDir == null) { + CMD = new String[]{ + "create-installer", + "--installer-type", EXT, + "--input", "input", + "--output", "output", + "--name", TEST_NAME, + "--main-jar", "hello.jar", + "--main-class", "Hello", + "--files", "hello.jar", + "--file-associations", "fa.properties"}; + } else { + CMD = new String[]{ + "create-installer", + "--installer-type", EXT, + "--input", "input", + "--output", "output", + "--name", TEST_NAME, + "--main-jar", "hello.jar", + "--main-class", "Hello", + "--files", "hello.jar", + "--file-associations", "fa.properties", + "--install-dir", installDir}; + } } - public static void run(String name, String ext) throws Exception { - init(name, ext); + public static void run(String name, String ext, String installDir, String testExt) throws Exception { + init(name, ext, installDir, testExt); if (JPackageInstallerHelper.isVerifyInstall()) { verifyInstall(); --- old/test/jdk/tools/jpackage/createinstaller/windows/exe/JPackageCreateInstallerFileAssociationsTest.java 2019-03-20 16:50:46.890157800 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/exe/JPackageCreateInstallerFileAssociationsTest.java 2019-03-20 16:50:45.601028900 -0700 @@ -38,8 +38,9 @@ public class JPackageCreateInstallerFileAssociationsTest { private static final String TEST_NAME = "JPackageCreateInstallerFileAssociationsTest"; private static final String EXT = "exe"; + private static final String TEST_EXT = "jptest1"; public static void main(String[] args) throws Exception { - JPackageCreateInstallerFileAssociationsBase.run(TEST_NAME, EXT); + JPackageCreateInstallerFileAssociationsBase.run(TEST_NAME, EXT, null, TEST_EXT); } } --- old/test/jdk/tools/jpackage/createinstaller/windows/exe/install.bat 2019-03-20 16:50:52.970765800 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/exe/install.bat 2019-03-20 16:50:51.680636800 -0700 @@ -11,4 +11,6 @@ JPackageCreateInstallerLicenseTest-1.0.exe JPackageCreateInstallerWinUpgradeUUIDTest-1.0.exe JPackageCreateInstallerWinUpgradeUUIDTest-2.0.exe +JPackageCreateInstallerInstallDirTest-1.0.exe +JPackageCreateInstallerFileAssociationsInstallDirTest-1.0.exe PAUSE --- old/test/jdk/tools/jpackage/createinstaller/windows/exe/uninstall.bat 2019-03-20 16:50:59.035372200 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/exe/uninstall.bat 2019-03-20 16:50:57.744243100 -0700 @@ -8,4 +8,6 @@ "%ProgramFiles%\JPackageCreateInstallerWinShortcutTest\unins000.exe" "%ProgramFiles%\JPackageCreateInstallerLicenseTest\unins000.exe" "%ProgramFiles%\JPackageCreateInstallerWinUpgradeUUIDTest\unins000.exe" +"%ProgramFiles%\TestVendor\JPackageCreateInstallerInstallDirTestDir\unins000.exe" +"%ProgramFiles%\TestVendor\JPackageCreateInstallerFileAssociationsInstallDirTestDir\unins000.exe" PAUSE \ No newline at end of file --- old/test/jdk/tools/jpackage/createinstaller/windows/msi/JPackageCreateInstallerFileAssociationsTest.java 2019-03-20 16:51:05.117980400 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/msi/JPackageCreateInstallerFileAssociationsTest.java 2019-03-20 16:51:03.829851600 -0700 @@ -38,8 +38,9 @@ public class JPackageCreateInstallerFileAssociationsTest { private static final String TEST_NAME = "JPackageCreateInstallerFileAssociationsTest"; private static final String EXT = "msi"; + private static final String TEST_EXT = "jptest1"; public static void main(String[] args) throws Exception { - JPackageCreateInstallerFileAssociationsBase.run(TEST_NAME, EXT); + JPackageCreateInstallerFileAssociationsBase.run(TEST_NAME, EXT, null, TEST_EXT); } } --- old/test/jdk/tools/jpackage/createinstaller/windows/msi/install.bat 2019-03-20 16:51:11.173585900 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/msi/install.bat 2019-03-20 16:51:09.888457400 -0700 @@ -11,4 +11,6 @@ JPackageCreateInstallerLicenseTest-1.0.msi JPackageCreateInstallerWinUpgradeUUIDTest-1.0.msi JPackageCreateInstallerWinUpgradeUUIDTest-2.0.msi +JPackageCreateInstallerInstallDirTest-1.0.msi +JPackageCreateInstallerFileAssociationsInstallDirTest-1.0.msi PAUSE --- old/test/jdk/tools/jpackage/createinstaller/windows/msi/uninstall.bat 2019-03-20 16:51:17.241192600 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/msi/uninstall.bat 2019-03-20 16:51:15.940062500 -0700 @@ -8,4 +8,6 @@ MSIEXEC /uninstall JPackageCreateInstallerWinShortcutTest-1.0.msi MSIEXEC /uninstall JPackageCreateInstallerLicenseTest-1.0.msi MSIEXEC /uninstall JPackageCreateInstallerWinUpgradeUUIDTest-2.0.msi +MSIEXEC /uninstall JPackageCreateInstallerInstallDirTest-1.0.msi +MSIEXEC /uninstall JPackageCreateInstallerFileAssociationsInstallDirTest-1.0.msi PAUSE \ No newline at end of file --- old/test/jdk/tools/jpackage/helpers/JPackagePath.java 2019-03-20 16:51:23.311799600 -0700 +++ new/test/jdk/tools/jpackage/helpers/JPackagePath.java 2019-03-20 16:51:22.025671000 -0700 @@ -220,6 +220,11 @@ + testName + ".exe"; } + public static String getWinInstalledApp(String installDir, String testName) { + return getWinProgramFiles() + File.separator + installDir + File.separator + + testName + ".exe"; + } + public static String getOSXInstalledApp(String testName) { return File.separator + "Applications" + File.separator + testName + ".app" + File.separator + "Contents" + File.separator --- /dev/null 2019-03-20 16:51:29.000000000 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/base/JPackageCreateInstallerInstallDirBase.java 2019-03-20 16:51:27.817250100 -0700 @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +public class JPackageCreateInstallerInstallDirBase { + + private static String TEST_NAME; + private static String EXT; + private static String OUTPUT; + private static String[] CMD; + private static String INSTALL_DIR; + + private static void copyResults() throws Exception { + List files = new ArrayList<>(); + files.add(OUTPUT); + JPackageInstallerHelper.copyTestResults(files); + } + + private static void testCreateInstaller() throws Exception { + JPackageHelper.executeCLI(true, CMD); + JPackageInstallerHelper.validateOutput(OUTPUT); + copyResults(); + } + + private static void verifyInstall() throws Exception { + String app = JPackagePath.getWinInstalledApp(INSTALL_DIR, TEST_NAME); + JPackageInstallerHelper.validateApp(app); + + // Validate start menu + JPackageInstallerHelper.validateStartMenu("Unknown", TEST_NAME, false); + + // Validate desktop shortcut + JPackageInstallerHelper.validateDesktopShortcut(TEST_NAME, true); + } + + private static void verifyUnInstall() throws Exception { + String folderPath = JPackagePath.getWinInstallFolder(INSTALL_DIR); + File folder = new File(folderPath); + if (folder.exists()) { + throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist"); + } + + // Validate start menu + JPackageInstallerHelper.validateStartMenu("Unknown", TEST_NAME, false); + + // Validate desktop shortcut + JPackageInstallerHelper.validateDesktopShortcut(TEST_NAME, false); + } + + private static void init(String name, String ext) { + TEST_NAME = name; + EXT = ext; + OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; + INSTALL_DIR = "TestVendor\\JPackageCreateInstallerInstallDirTestDir"; + CMD = new String[]{ + "create-installer", + "--installer-type", EXT, + "--input", "input", + "--output", "output", + "--name", TEST_NAME, + "--main-jar", "hello.jar", + "--main-class", "Hello", + "--files", "hello.jar", + "--install-dir", INSTALL_DIR, + "--win-shortcut"}; + } + + public static void run(String name, String ext) throws Exception { + init(name, ext); + + if (JPackageInstallerHelper.isVerifyInstall()) { + verifyInstall(); + } else if (JPackageInstallerHelper.isVerifyUnInstall()) { + verifyUnInstall(); + } else { + JPackageHelper.createHelloInstallerJar(); + testCreateInstaller(); + } + } +} --- /dev/null 2019-03-20 16:51:34.000000000 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/exe/JPackageCreateInstallerFileAssociationsInstallDirTest.java 2019-03-20 16:51:32.573725700 -0700 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary jpackage create installer test + * @library ../../../helpers + * @library ../base + * @build JPackageHelper + * @build JPackagePath + * @build JPackageInstallerHelper + * @build JPackageCreateInstallerFileAssociationsBase + * @requires (os.family == "windows") + * @modules jdk.jpackage + * @ignore + * @run main/othervm -Xmx512m JPackageCreateInstallerFileAssociationsInstallDirTest + */ +public class JPackageCreateInstallerFileAssociationsInstallDirTest { + private static final String TEST_NAME = "JPackageCreateInstallerFileAssociationsInstallDirTest"; + private static final String EXT = "exe"; + private static final String INSTALL_DIR + = "TestVendor\\JPackageCreateInstallerFileAssociationsInstallDirTestDir"; + private static final String TEST_EXT = "jptest3"; + + public static void main(String[] args) throws Exception { + JPackageCreateInstallerFileAssociationsBase.run(TEST_NAME, EXT, INSTALL_DIR, TEST_EXT); + } +} --- /dev/null 2019-03-20 16:51:39.000000000 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/exe/JPackageCreateInstallerInstallDirTest.java 2019-03-20 16:51:37.321200400 -0700 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary jpackage create installer install dir test + * @library ../../../helpers + * @library ../base + * @build JPackageHelper + * @build JPackagePath + * @build JPackageInstallerHelper + * @build JPackageCreateInstallerInstallDirBase + * @requires (os.family == "windows") + * @modules jdk.jpackage + * @ignore + * @run main/othervm -Xmx512m JPackageCreateInstallerInstallDirTest + */ +public class JPackageCreateInstallerInstallDirTest { + private static final String TEST_NAME = "JPackageCreateInstallerInstallDirTest"; + private static final String EXT = "exe"; + + public static void main(String[] args) throws Exception { + JPackageCreateInstallerInstallDirBase.run(TEST_NAME, EXT); + } +} --- /dev/null 2019-03-20 16:51:43.000000000 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/msi/JPackageCreateInstallerFileAssociationsInstallDirTest.java 2019-03-20 16:51:42.076675900 -0700 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary jpackage create installer test + * @library ../../../helpers + * @library ../base + * @build JPackageHelper + * @build JPackagePath + * @build JPackageInstallerHelper + * @build JPackageCreateInstallerFileAssociationsBase + * @requires (os.family == "windows") + * @modules jdk.jpackage + * @ignore + * @run main/othervm -Xmx512m JPackageCreateInstallerFileAssociationsInstallDirTest + */ +public class JPackageCreateInstallerFileAssociationsInstallDirTest { + private static final String TEST_NAME = "JPackageCreateInstallerFileAssociationsInstallDirTest"; + private static final String EXT = "msi"; + private static final String INSTALL_DIR + = "TestVendor\\JPackageCreateInstallerFileAssociationsInstallDirTestDir"; + private static final String TEST_EXT = "jptest3"; + + public static void main(String[] args) throws Exception { + JPackageCreateInstallerFileAssociationsBase.run(TEST_NAME, EXT, INSTALL_DIR, TEST_EXT); + } +} --- /dev/null 2019-03-20 16:51:48.000000000 -0700 +++ new/test/jdk/tools/jpackage/createinstaller/windows/msi/JPackageCreateInstallerInstallDirTest.java 2019-03-20 16:51:46.821150300 -0700 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary jpackage create installer install dir test + * @library ../../../helpers + * @library ../base + * @build JPackageHelper + * @build JPackagePath + * @build JPackageInstallerHelper + * @build JPackageCreateInstallerInstallDirBase + * @requires (os.family == "windows") + * @modules jdk.jpackage + * @ignore + * @run main/othervm -Xmx512m JPackageCreateInstallerInstallDirTest + */ +public class JPackageCreateInstallerInstallDirTest { + private static final String TEST_NAME = "JPackageCreateInstallerInstallDirTest"; + private static final String EXT = "msi"; + + public static void main(String[] args) throws Exception { + JPackageCreateInstallerInstallDirBase.run(TEST_NAME, EXT); + } +}