< 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         "--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 }


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