< prev index next >

modules/jdk.packager/src/main/java/com/oracle/tools/packager/mac/MacAppBundler.java

Print this page




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.oracle.tools.packager.mac;
  26 
  27 import com.oracle.tools.packager.AbstractImageBundler;
  28 import com.oracle.tools.packager.BundlerParamInfo;
  29 import com.oracle.tools.packager.ConfigException;
  30 import com.oracle.tools.packager.EnumeratedBundlerParam;
  31 import com.oracle.tools.packager.IOUtils;
  32 import com.oracle.tools.packager.Log;
  33 import com.oracle.tools.packager.Platform;
  34 import com.oracle.tools.packager.StandardBundlerParam;
  35 import com.oracle.tools.packager.UnsupportedPlatformException;
  36 import jdk.packager.builders.mac.MacAppImageBuilder;
  37 
  38 import jdk.packager.internal.JLinkBundlerHelper;
  39 
  40 import java.io.File;
  41 import java.io.IOException;
  42 import java.math.BigInteger;
  43 import java.text.MessageFormat;
  44 import java.util.Arrays;
  45 import java.util.Collection;
  46 import java.util.HashMap;
  47 import java.util.Map;
  48 import java.util.Optional;
  49 import java.util.ResourceBundle;
  50 
  51 import static com.oracle.tools.packager.StandardBundlerParam.*;
  52 import static com.oracle.tools.packager.mac.MacBaseInstallerBundler.*;
  53 import jdk.packager.builders.AbstractAppImageBuilder;
  54 import jdk.packager.internal.mac.MacCertificate;
  55 
  56 public class MacAppBundler extends AbstractImageBundler {
  57 
  58     private static final ResourceBundle I18N =
  59             ResourceBundle.getBundle(MacAppBundler.class.getName());
  60 
  61     public final static String MAC_BUNDLER_PREFIX =
  62             BUNDLER_PREFIX + "macosx" + File.separator;
  63 
  64     private static final String TEMPLATE_BUNDLE_ICON = "GenericApp.icns";
  65 
  66     private static Map<String, String> getMacCategories() {
  67         Map<String, String> map = new HashMap<>();
  68         map.put("Business", "public.app-category.business");
  69         map.put("Developer Tools", "public.app-category.developer-tools");
  70         map.put("Education", "public.app-category.education");
  71         map.put("Entertainment", "public.app-category.entertainment");
  72         map.put("Finance", "public.app-category.finance");
  73         map.put("Games", "public.app-category.games");
  74         map.put("Graphics & Design", "public.app-category.graphics-design");




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.oracle.tools.packager.mac;
  26 
  27 import com.oracle.tools.packager.AbstractImageBundler;
  28 import com.oracle.tools.packager.BundlerParamInfo;
  29 import com.oracle.tools.packager.ConfigException;
  30 import com.oracle.tools.packager.EnumeratedBundlerParam;
  31 import com.oracle.tools.packager.IOUtils;
  32 import com.oracle.tools.packager.Log;
  33 import com.oracle.tools.packager.Platform;
  34 import com.oracle.tools.packager.StandardBundlerParam;
  35 import com.oracle.tools.packager.UnsupportedPlatformException;
  36 import jdk.packager.internal.legacy.builders.mac.MacAppImageBuilder;
  37 
  38 import jdk.packager.internal.legacy.JLinkBundlerHelper;
  39 
  40 import java.io.File;
  41 import java.io.IOException;
  42 import java.math.BigInteger;
  43 import java.text.MessageFormat;
  44 import java.util.Arrays;
  45 import java.util.Collection;
  46 import java.util.HashMap;
  47 import java.util.Map;
  48 import java.util.Optional;
  49 import java.util.ResourceBundle;
  50 
  51 import static com.oracle.tools.packager.StandardBundlerParam.*;
  52 import static com.oracle.tools.packager.mac.MacBaseInstallerBundler.*;
  53 import jdk.packager.internal.legacy.builders.AbstractAppImageBuilder;
  54 import jdk.packager.internal.legacy.mac.MacCertificate;
  55 
  56 public class MacAppBundler extends AbstractImageBundler {
  57 
  58     private static final ResourceBundle I18N =
  59             ResourceBundle.getBundle(MacAppBundler.class.getName());
  60 
  61     public final static String MAC_BUNDLER_PREFIX =
  62             BUNDLER_PREFIX + "macosx" + File.separator;
  63 
  64     private static final String TEMPLATE_BUNDLE_ICON = "GenericApp.icns";
  65 
  66     private static Map<String, String> getMacCategories() {
  67         Map<String, String> map = new HashMap<>();
  68         map.put("Business", "public.app-category.business");
  69         map.put("Developer Tools", "public.app-category.developer-tools");
  70         map.put("Education", "public.app-category.education");
  71         map.put("Entertainment", "public.app-category.entertainment");
  72         map.put("Finance", "public.app-category.finance");
  73         map.put("Games", "public.app-category.games");
  74         map.put("Graphics & Design", "public.app-category.graphics-design");


< prev index next >