< prev index next >

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

Print this page




  64 
  65         // Validate start menu
  66         JPackageInstallerHelper.validateStartMenu("Unknown", TEST_NAME, false);
  67 
  68         // Validate desktop shortcut
  69         JPackageInstallerHelper.validateDesktopShortcut(TEST_NAME, false);
  70     }
  71 
  72     private static void init(String name, String ext) {
  73         TEST_NAME = name;
  74         EXT = ext;
  75         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  76         CMD = new String[]{
  77             "create-installer",
  78             "--installer-type", EXT,
  79             "--input", "input",
  80             "--output", "output",
  81             "--name", TEST_NAME,
  82             "--main-jar", "hello.jar",
  83             "--main-class", "Hello",
  84             "--overwrite",
  85             "--files", "hello.jar",
  86             "--win-shortcut"};
  87     }
  88 
  89     public static void run(String name, String ext) throws Exception {
  90         init(name, ext);
  91 
  92         if (JPackageInstallerHelper.isVerifyInstall()) {
  93             verifyInstall();
  94         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  95             verifyUnInstall();
  96         } else {
  97             JPackageHelper.createHelloInstallerJar();
  98             testCreateInstaller();
  99         }
 100     }
 101 }


  64 
  65         // Validate start menu
  66         JPackageInstallerHelper.validateStartMenu("Unknown", TEST_NAME, false);
  67 
  68         // Validate desktop shortcut
  69         JPackageInstallerHelper.validateDesktopShortcut(TEST_NAME, false);
  70     }
  71 
  72     private static void init(String name, String ext) {
  73         TEST_NAME = name;
  74         EXT = ext;
  75         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  76         CMD = new String[]{
  77             "create-installer",
  78             "--installer-type", EXT,
  79             "--input", "input",
  80             "--output", "output",
  81             "--name", TEST_NAME,
  82             "--main-jar", "hello.jar",
  83             "--main-class", "Hello",

  84             "--files", "hello.jar",
  85             "--win-shortcut"};
  86     }
  87 
  88     public static void run(String name, String ext) throws Exception {
  89         init(name, ext);
  90 
  91         if (JPackageInstallerHelper.isVerifyInstall()) {
  92             verifyInstall();
  93         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  94             verifyUnInstall();
  95         } else {
  96             JPackageHelper.createHelloInstallerJar();
  97             testCreateInstaller();
  98         }
  99     }
 100 }
< prev index next >