132 new FileWriter("fa.properties")))) {
133 out.println("extension=" + TEST_EXT);
134 out.println("mime-type=application/" + TEST_EXT);
135 out.println("description=jpackage test extention");
136 }
137 }
138
139 private static void init(String name, String ext) {
140 TEST_NAME = name;
141 EXT = ext;
142 TEST_EXT = "jptest1";
143 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
144 CMD = new String[]{
145 "create-installer",
146 "--installer-type", EXT,
147 "--input", "input",
148 "--output", "output",
149 "--name", TEST_NAME,
150 "--main-jar", "hello.jar",
151 "--main-class", "Hello",
152 "--overwrite",
153 "--files", "hello.jar",
154 "--file-associations", "fa.properties"};
155 }
156
157 public static void run(String name, String ext) throws Exception {
158 init(name, ext);
159
160 if (JPackageInstallerHelper.isVerifyInstall()) {
161 verifyInstall();
162 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
163 verifyUnInstall();
164 } else {
165 JPackageHelper.createHelloInstallerJar();
166 createFileAssociationsProperties();
167 testCreateInstaller();
168 }
169 }
170 }
|
132 new FileWriter("fa.properties")))) {
133 out.println("extension=" + TEST_EXT);
134 out.println("mime-type=application/" + TEST_EXT);
135 out.println("description=jpackage test extention");
136 }
137 }
138
139 private static void init(String name, String ext) {
140 TEST_NAME = name;
141 EXT = ext;
142 TEST_EXT = "jptest1";
143 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
144 CMD = new String[]{
145 "create-installer",
146 "--installer-type", EXT,
147 "--input", "input",
148 "--output", "output",
149 "--name", TEST_NAME,
150 "--main-jar", "hello.jar",
151 "--main-class", "Hello",
152 "--files", "hello.jar",
153 "--file-associations", "fa.properties"};
154 }
155
156 public static void run(String name, String ext) throws Exception {
157 init(name, ext);
158
159 if (JPackageInstallerHelper.isVerifyInstall()) {
160 verifyInstall();
161 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
162 verifyUnInstall();
163 } else {
164 JPackageHelper.createHelloInstallerJar();
165 createFileAssociationsProperties();
166 testCreateInstaller();
167 }
168 }
169 }
|