< prev index next >

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java

Print this page




 117                                 "message.app-image-dir-does-not-exist.advice"),
 118                                 PREDEFINED_APP_IMAGE.getID()));
 119             }
 120             if (APP_NAME.fetchFrom(params) == null) {
 121                 throw new ConfigException(
 122                         I18N.getString("message.app-image-requires-app-name"),
 123                         I18N.getString(
 124                             "message.app-image-requires-app-name.advice"));
 125             }
 126             if (IDENTIFIER.fetchFrom(params) == null) {
 127                 throw new ConfigException(
 128                         I18N.getString("message.app-image-requires-identifier"),
 129                         I18N.getString(
 130                             "message.app-image-requires-identifier.advice"));
 131             }
 132         } else {
 133             APP_BUNDLER.fetchFrom(params).validate(params);
 134         }
 135     }
 136 
 137     protected File prepareAppBundle(Map<String, ? super Object> params,
 138             boolean pkg) throws PackagerException {
 139         File predefinedImage =
 140                 StandardBundlerParam.getPredefinedAppImage(params);
 141         if (predefinedImage != null) {
 142             return predefinedImage;
 143         }
 144         File appImageRoot = APP_IMAGE_TEMP_ROOT.fetchFrom(params);
 145         if (pkg) {
 146             // create pkg in dmg
 147             return new MacPkgBundler().bundle(params, appImageRoot);
 148         } else {
 149             return APP_BUNDLER.fetchFrom(params).doBundle(
 150                     params, appImageRoot, true);
 151         }
 152     }
 153 
 154     @Override
 155     public String getBundleType() {
 156         return "INSTALLER";
 157     }
 158 
 159     public static String findKey(String key, String keychainName,
 160             boolean verbose) {
 161         if (Platform.getPlatform() != Platform.MAC) {
 162             return null;
 163         }
 164 
 165         try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
 166                 PrintStream ps = new PrintStream(baos)) {
 167             List<String> searchOptions = new ArrayList<>();
 168             searchOptions.add("security");
 169             searchOptions.add("find-certificate");
 170             searchOptions.add("-c");
 171             searchOptions.add(key);




 117                                 "message.app-image-dir-does-not-exist.advice"),
 118                                 PREDEFINED_APP_IMAGE.getID()));
 119             }
 120             if (APP_NAME.fetchFrom(params) == null) {
 121                 throw new ConfigException(
 122                         I18N.getString("message.app-image-requires-app-name"),
 123                         I18N.getString(
 124                             "message.app-image-requires-app-name.advice"));
 125             }
 126             if (IDENTIFIER.fetchFrom(params) == null) {
 127                 throw new ConfigException(
 128                         I18N.getString("message.app-image-requires-identifier"),
 129                         I18N.getString(
 130                             "message.app-image-requires-identifier.advice"));
 131             }
 132         } else {
 133             APP_BUNDLER.fetchFrom(params).validate(params);
 134         }
 135     }
 136 
 137     protected File prepareAppBundle(Map<String, ? super Object> params)
 138             throws PackagerException {
 139         File predefinedImage =
 140                 StandardBundlerParam.getPredefinedAppImage(params);
 141         if (predefinedImage != null) {
 142             return predefinedImage;
 143         }
 144         File appImageRoot = APP_IMAGE_TEMP_ROOT.fetchFrom(params);
 145 



 146         return APP_BUNDLER.fetchFrom(params).doBundle(
 147                 params, appImageRoot, true);

 148     }
 149 
 150     @Override
 151     public String getBundleType() {
 152         return "INSTALLER";
 153     }
 154 
 155     public static String findKey(String key, String keychainName,
 156             boolean verbose) {
 157         if (Platform.getPlatform() != Platform.MAC) {
 158             return null;
 159         }
 160 
 161         try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
 162                 PrintStream ps = new PrintStream(baos)) {
 163             List<String> searchOptions = new ArrayList<>();
 164             searchOptions.add("security");
 165             searchOptions.add("find-certificate");
 166             searchOptions.add("-c");
 167             searchOptions.add(key);


< prev index next >