120 }
121 }
122
123 private static void init(String name, String ext) {
124 TEST_NAME = name;
125 EXT = ext;
126 TEST_EXT = "jptest1";
127 if (EXT.equals("rpm")) {
128 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
129 } else {
130 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
131 }
132 CMD = new String[]{
133 "create-installer",
134 "--installer-type", EXT,
135 "--input", "input",
136 "--output", "output",
137 "--name", TEST_NAME,
138 "--main-jar", "hello.jar",
139 "--main-class", "Hello",
140 "--overwrite",
141 "--files", "hello.jar",
142 "--file-associations", "fa.properties"};
143 }
144
145 public static void run(String name, String ext) throws Exception {
146 init(name, ext);
147
148 if (JPackageInstallerHelper.isVerifyInstall()) {
149 verifyInstall();
150 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
151 verifyUnInstall();
152 } else {
153 JPackageHelper.createHelloInstallerJar();
154 createFileAssociationsProperties();
155 testCreateInstaller();
156 }
157 }
158 }
|
120 }
121 }
122
123 private static void init(String name, String ext) {
124 TEST_NAME = name;
125 EXT = ext;
126 TEST_EXT = "jptest1";
127 if (EXT.equals("rpm")) {
128 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
129 } else {
130 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
131 }
132 CMD = new String[]{
133 "create-installer",
134 "--installer-type", EXT,
135 "--input", "input",
136 "--output", "output",
137 "--name", TEST_NAME,
138 "--main-jar", "hello.jar",
139 "--main-class", "Hello",
140 "--files", "hello.jar",
141 "--file-associations", "fa.properties"};
142 }
143
144 public static void run(String name, String ext) throws Exception {
145 init(name, ext);
146
147 if (JPackageInstallerHelper.isVerifyInstall()) {
148 verifyInstall();
149 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
150 verifyUnInstall();
151 } else {
152 JPackageHelper.createHelloInstallerJar();
153 createFileAssociationsProperties();
154 testCreateInstaller();
155 }
156 }
157 }
|