Forráskód Böngészése

- fix desktop deployment for OSX by using Oracles stub instead of Apples

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10421 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 12 éve
szülő
commit
bf910ef6fc

+ 36 - 42
jme3-desktop-executables/macapp-data/Info.plist

@@ -1,44 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<?xml version="1.0" ?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
-<dict>
-	<key>CFBundleName</key>
-	<string>${application.title}</string>
-	<key>CFBundleIdentifier</key>
-	<string>${main.class}</string>
-	<key>CFBundleVersion</key>
-	<string>100.0</string>
-	<key>CFBundleAllowMixedLocalizations</key>
-	<string>true</string>
-	<key>CFBundleExecutable</key>
-	<string>JavaApplicationStub</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleIconFile</key>
-	<string>GenericApp.icns</string>
-	<key>Java</key>
-	<dict>
-		<key>VMOptions</key>
-		<string>${run.jvmargs}</string>
-		<key>WorkingDirectory</key>
-		<string>$APP_PACKAGE/Contents/Resources/Java</string>
-		<key>MainClass</key>
-		<string>${main.class}</string>
-		<key>JVMVersion</key>
-		<string>1.5+</string>
-		<key>ClassPath</key>
-			<string>$JAVAROOT/${application.title}.jar</string>
-		<key>Properties</key>
-		<dict>
-			<key>apple.laf.useScreenMenuBar</key>
-			<string>true</string>
-		</dict>
-	</dict>
-</dict>
+ <dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>English</string>
+  <key>CFBundleExecutable</key>
+  <string>JavaAppLauncher</string>
+  <key>CFBundleIconFile</key>
+  <string>GenericApp.icns</string>
+  <key>CFBundleIdentifier</key>
+  <string>${main.class}</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>${application.title}</string>
+  <key>CFBundlePackageType</key>
+  <string>APPL</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
+       for list of AppStore categories -->
+  <key>LSApplicationCategoryType</key>
+  <string>unknown</string>
+  <key>CFBundleVersion</key>
+  <string>1</string>
+  <key>NSHumanReadableCopyright</key>
+  <string>Unknown</string>
+  <key>JVMMainClassName</key>
+  <string>${main.class}</string>
+  <key>JVMOptions</key>
+  <array>
+      <string>${run.jvmargs}</string>
+  </array>
+ </dict>
 </plist>

BIN
jme3-desktop-executables/macapp-data/osx-stub


+ 1 - 1
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java

@@ -65,7 +65,7 @@ public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeC
             launch4j = new ProjectExtensionManager("launch4j", "v1.4", new String[]{"jar", "-launch4j-exe"});
             launch4j.setAntTaskLibrary("launch4j");
             launch4j.setDataZip("nbres:/com/jme3/gde/desktop/executables/winapp-data.zip");
-            macapp = new ProjectExtensionManager("macapp", "v1.2", new String[]{"jar", "-mac-app"});
+            macapp = new ProjectExtensionManager("macapp", "v2.0", new String[]{"jar", "-mac-app"});
             macapp.setDataZip("nbres:/com/jme3/gde/desktop/executables/macapp-data.zip");
             linux = new ProjectExtensionManager("linuxlauncher", "v1.1", new String[]{"jar", "-linux-launcher"});
         }

BIN
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/macapp-data.zip


+ 16 - 4
jme3-desktop-executables/src/com/jme3/gde/desktop/executables/macapp-targets.xml

@@ -1,21 +1,33 @@
     <target name="-mac-app" depends="-test-mac-app-enabled" if="is.mac.app.enabled">
         <echo>MacOSX Application Creation</echo>
+        <!--replace -->
+        <loadresource property="jfxdeploy.jvmargs">
+            <propertyresource name="run.jvmargs"/>
+            <filterchain>
+                <tokenfilter>
+                    <filetokenizer/>
+                    <replacestring from=" " to="&lt;/string&gt;&lt;string&gt;"/>
+                </tokenfilter>
+            </filterchain>
+        </loadresource>
         <copy file="resources/macapp/Info.plist" tofile="resources/macapp/_Info.plist">
             <filterchain>
                 <replacestring from="$${main.class}" to="${main.class}"/>
-                <replacestring from="$${run.jvmargs}" to="${run.jvmargs}"/>
+                <replacestring from="$${run.jvmargs}" to="${jfxdeploy.jvmargs}"/>
                 <replacestring from="$${application.title}" to="${application.title}"/>
+                <replacestring from="$${jfxdeploy.jvmargs}" to="-Xnoagent"/>
             </filterchain>
         </copy>
         <zip destfile="${dist.dir}/${application.title}-MacOSX.zip">
-            <zipfileset file="resources/macapp/osx-stub" filemode="755" fullpath="${application.title}.app/Contents/MacOS/JavaApplicationStub"/>
+            <zipfileset file="resources/macapp/osx-stub" filemode="755" fullpath="${application.title}.app/Contents/MacOS/JavaAppLauncher"/>
             <zipfileset file="resources/macapp/_Info.plist" fullpath="${application.title}.app/Contents/Info.plist"/>
             <zipfileset file="resources/macapp/osx-icon.icns" fullpath="${application.title}.app/Contents/Resources/GenericApp.icns"/>
-            <zipfileset file="${dist.jar}" prefix="${application.title}.app/Contents/Resources/Java"/>
-            <zipfileset dir="${dist.dir}/lib" prefix="${application.title}.app/Contents/Resources/Java/lib"/>
+            <zipfileset file="${dist.jar}" prefix="${application.title}.app/Contents/Java"/>
+            <zipfileset dir="${dist.dir}/lib" prefix="${application.title}.app/Contents/Java/lib"/>
         </zip>
         <delete file="resources/macapp/_Info.plist"/>
     </target>
+    
     <target name="-test-mac-app-enabled">
         <condition property="is.mac.app.enabled">
             <istrue value="${mac.app.enabled}"/>