< prev index next >

test/jdk/tools/jpackage/createinstaller/windows/base/JPackageCreateInstallerWinPerUserInstallBase.java

Print this page




  58         if (folder.exists()) {
  59             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  60         }
  61 
  62         // Validate start menu
  63         JPackageInstallerHelper.validateUserLocalStartMenu(TEST_NAME, TEST_NAME, false);
  64     }
  65 
  66     private static void init(String name, String ext) {
  67         TEST_NAME = name;
  68         EXT = ext;
  69         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  70         CMD = new String[]{
  71             "create-installer",
  72             "--installer-type", EXT,
  73             "--input", "input",
  74             "--output", "output",
  75             "--name", TEST_NAME,
  76             "--main-jar", "hello.jar",
  77             "--main-class", "Hello",
  78             "--overwrite",
  79             "--files", "hello.jar",
  80             "--win-per-user-install",
  81             "--win-menu",
  82             "--win-menu-group", TEST_NAME};
  83     }
  84 
  85     public static void run(String name, String ext) throws Exception {
  86         init(name, ext);
  87 
  88         if (JPackageInstallerHelper.isVerifyInstall()) {
  89             verifyInstall();
  90         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  91             verifyUnInstall();
  92         } else {
  93             JPackageHelper.createHelloInstallerJar();
  94             testCreateInstaller();
  95         }
  96     }
  97 }


  58         if (folder.exists()) {
  59             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  60         }
  61 
  62         // Validate start menu
  63         JPackageInstallerHelper.validateUserLocalStartMenu(TEST_NAME, TEST_NAME, false);
  64     }
  65 
  66     private static void init(String name, String ext) {
  67         TEST_NAME = name;
  68         EXT = ext;
  69         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  70         CMD = new String[]{
  71             "create-installer",
  72             "--installer-type", EXT,
  73             "--input", "input",
  74             "--output", "output",
  75             "--name", TEST_NAME,
  76             "--main-jar", "hello.jar",
  77             "--main-class", "Hello",

  78             "--files", "hello.jar",
  79             "--win-per-user-install",
  80             "--win-menu",
  81             "--win-menu-group", TEST_NAME};
  82     }
  83 
  84     public static void run(String name, String ext) throws Exception {
  85         init(name, ext);
  86 
  87         if (JPackageInstallerHelper.isVerifyInstall()) {
  88             verifyInstall();
  89         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  90             verifyUnInstall();
  91         } else {
  92             JPackageHelper.createHelloInstallerJar();
  93             testCreateInstaller();
  94         }
  95     }
  96 }
< prev index next >