< prev index next >

src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacAppImageBuilder.java

Print this page




  94 
  95     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_NAME =
  96             new StandardBundlerParam<>(
  97                     Arguments.CLIOptions.MAC_BUNDLE_NAME.getId(),
  98                     String.class,
  99                     params -> null,
 100                     (s, p) -> s);
 101 
 102     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_IDENTIFIER =
 103             new StandardBundlerParam<>(
 104                     Arguments.CLIOptions.MAC_BUNDLE_IDENTIFIER.getId(),
 105                     String.class,
 106                     params -> {
 107                         // Get identifier from app image if user provided
 108                         // app image and did not provide the identifier via CLI.
 109                         String identifier = extractBundleIdentifier(params);
 110                         if (identifier != null) {
 111                             return identifier;
 112                         }
 113 
 114                         return IDENTIFIER.fetchFrom(params);








 115                     },
 116                     (s, p) -> s);
 117 
 118     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_VERSION =
 119             new StandardBundlerParam<>(
 120                     "mac.CFBundleVersion",
 121                     String.class,
 122                     p -> {
 123                         String s = VERSION.fetchFrom(p);
 124                         if (validCFBundleVersion(s)) {
 125                             return s;
 126                         } else {
 127                             return "100";
 128                         }
 129                     },
 130                     (s, p) -> s);
 131 
 132     public static final BundlerParamInfo<File> ICON_ICNS =
 133             new StandardBundlerParam<>(
 134             "icon.icns",




  94 
  95     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_NAME =
  96             new StandardBundlerParam<>(
  97                     Arguments.CLIOptions.MAC_BUNDLE_NAME.getId(),
  98                     String.class,
  99                     params -> null,
 100                     (s, p) -> s);
 101 
 102     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_IDENTIFIER =
 103             new StandardBundlerParam<>(
 104                     Arguments.CLIOptions.MAC_BUNDLE_IDENTIFIER.getId(),
 105                     String.class,
 106                     params -> {
 107                         // Get identifier from app image if user provided
 108                         // app image and did not provide the identifier via CLI.
 109                         String identifier = extractBundleIdentifier(params);
 110                         if (identifier != null) {
 111                             return identifier;
 112                         }
 113 
 114                         identifier = IDENTIFIER.fetchFrom(params);
 115                         if (identifier != null) {
 116                             return identifier;
 117                         }
 118                         // the IDENTIFIER (above) will default to derive from
 119                         // the main-class, in case there is no main-class
 120                         // (such as runtime installer) revert to the name.
 121                         // any of these could be invalid, so check later.
 122                         return APP_NAME.fetchFrom(params);
 123                     },
 124                     (s, p) -> s);
 125 
 126     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_VERSION =
 127             new StandardBundlerParam<>(
 128                     "mac.CFBundleVersion",
 129                     String.class,
 130                     p -> {
 131                         String s = VERSION.fetchFrom(p);
 132                         if (validCFBundleVersion(s)) {
 133                             return s;
 134                         } else {
 135                             return "100";
 136                         }
 137                     },
 138                     (s, p) -> s);
 139 
 140     public static final BundlerParamInfo<File> ICON_ICNS =
 141             new StandardBundlerParam<>(
 142             "icon.icns",


< prev index next >