< prev index next >

test/jdk/tools/jpackage/createinstaller/macosx/base/JPackageCreateInstallerLicenseBase.java

Print this page




  51     }
  52 
  53     private static void verifyUnInstall() throws Exception {
  54         // Not needed on OS X, since we just deleting installed application
  55         // without using generated installer. We keeping this for consistnency
  56         // between platforms.
  57     }
  58 
  59     private static void init(String name, String ext) {
  60         TEST_NAME = name;
  61         EXT = ext;
  62         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  63         CMD = new String [] {
  64         "create-installer",
  65         "--installer-type", EXT,
  66         "--input", "input",
  67         "--output", "output",
  68         "--name", TEST_NAME,
  69         "--main-jar", "hello.jar",
  70         "--main-class", "Hello",
  71         "--overwrite",
  72         "--files", "hello.jar",
  73         "--license-file", JPackagePath.getLicenseFilePath()};
  74     }
  75 
  76     public static void run(String name, String ext) throws Exception {
  77         init(name, ext);
  78 
  79         if (JPackageInstallerHelper.isVerifyInstall()) {
  80             verifyInstall();
  81         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  82             verifyUnInstall();
  83         } else {
  84             JPackageHelper.createHelloInstallerJar();
  85             testCreateInstaller();
  86         }
  87     }
  88 }


  51     }
  52 
  53     private static void verifyUnInstall() throws Exception {
  54         // Not needed on OS X, since we just deleting installed application
  55         // without using generated installer. We keeping this for consistnency
  56         // between platforms.
  57     }
  58 
  59     private static void init(String name, String ext) {
  60         TEST_NAME = name;
  61         EXT = ext;
  62         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  63         CMD = new String [] {
  64         "create-installer",
  65         "--installer-type", EXT,
  66         "--input", "input",
  67         "--output", "output",
  68         "--name", TEST_NAME,
  69         "--main-jar", "hello.jar",
  70         "--main-class", "Hello",

  71         "--files", "hello.jar",
  72         "--license-file", JPackagePath.getLicenseFilePath()};
  73     }
  74 
  75     public static void run(String name, String ext) throws Exception {
  76         init(name, ext);
  77 
  78         if (JPackageInstallerHelper.isVerifyInstall()) {
  79             verifyInstall();
  80         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  81             verifyUnInstall();
  82         } else {
  83             JPackageHelper.createHelloInstallerJar();
  84             testCreateInstaller();
  85         }
  86     }
  87 }
< prev index next >