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