Ticket #1471: macbundle.diff
File macbundle.diff, 5.7 KB (added by , 16 years ago) |
---|
-
build.xml
2 2 3 3 <!-- All jar files necessary to run only JOSM (no tests) --> 4 4 <fileset id="josm_required_libs" dir="lib"> 5 <include name="gettext-commons-0.9.2.jar" />6 <include name="metadata-extractor-2.3.1-nosun.jar" />5 <include name="gettext-commons-0.9.2.jar" /> 6 <include name="metadata-extractor-2.3.1-nosun.jar" /> 7 7 </fileset> 8 8 9 9 <!-- Java classpath addition (all jar files to compile tests with this) --> 10 10 <path id="classpath"> 11 11 <fileset dir="lib"> 12 <include name="**/*.jar" />12 <include name="**/*.jar" /> 13 13 </fileset> 14 14 </path> 15 15 … … 33 33 <copy file="styles/standard/elemstyles.xml" todir="build/styles/standard"/> 34 34 35 35 <!-- create josm-custom.jar --> 36 <delete file="dist/josm-custom.jar" />36 <delete file="dist/josm-custom.jar" /> 37 37 <jar destfile="dist/josm-custom.jar" basedir="build"> 38 38 <manifest> 39 39 <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication" /> 40 40 </manifest> 41 41 </jar> 42 <!-- Create Mac Os X bundle --> 43 <exec dir="." os="Mac OS X" executable="/bin/sh"> 44 <arg value="-c" /> 45 <arg value="./osx/mkbundle.sh" /> 46 </exec> 42 47 </target> 43 48 49 <target name="release" depends="dist"> 50 <!-- Create dmg for Mac OS X --> 51 <exec dir="." os="Mac OS X" executable="/bin/sh"> 52 <arg value="-c" /> 53 <arg value="./osx/mkdmg.sh" /> 54 </exec> 55 </target> 56 44 57 <target name="compile" depends="init"> 45 58 <javac srcdir="src" classpathref="classpath" destdir="build" 46 59 target="1.5" source="1.5" debug="on" encoding="UTF-8"> 47 <compilerarg value="-Xlint:deprecation" />60 <compilerarg value="-Xlint:deprecation" /> 48 61 </javac> 49 62 </target> 50 63 -
osx/Info.plist
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: osx/josm.icns ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> 3 <plist version="0.9"> 4 <dict> 5 <key>CFBundleName</key> 6 <string>JOSM</string> 7 <key>CFBundleVersion</key> 8 <string>897</string> 9 <key>CFBundleAllowMixedLocalizations</key> 10 <string>false</string> 11 <key>CFBundleExecutable</key> 12 <string>JavaApplicationStub</string> 13 <key>CFBundleDevelopmentRegion</key> 14 <string>English</string> 15 <key>CFBundlePackageType</key> 16 <string>APPL</string> 17 <key>CFBundleShortVersionString</key> 18 <string>897</string> 19 <key>CFBundleSignature</key> 20 <string>????</string> 21 <key>CFBundleGetInfoString</key> 22 <string>JOSM 897</string> 23 <key>CFBundleInfoDictionaryVersion</key> 24 <string>6.0</string> 25 <key>CFBundleIconFile</key> 26 <string>josm.icns</string> 27 <key>Java</key> 28 <dict> 29 <key>VMOptions</key> 30 <string>-Dsun.java2d.opengl=True</string> 31 <key>MainClass</key> 32 <string>org.openstreetmap.josm.gui.MainApplication</string> 33 <key>JVMVersion</key> 34 <string>1.5+</string> 35 <key>ClassPath</key> 36 <string>$JAVAROOT/josm.jar</string> 37 </dict> 38 </dict> 39 </plist> -
osx/mkdmg.sh
1 #!/bin/sh 2 #Remove old dmg if it already exists 3 rm ./dist/JOSM.dmg 4 5 #first we prepare all files we want in our disk image in a new folder 6 mkdir ./dist/dmg/ 7 cp -r ./dist/JOSM.app ./dist/dmg/JOSM.app 8 SetFile -a B ./dist/dmg/JOSM.app 9 10 #Create the dmg, reduce it size to the minimum requiered, compress it and clean up 11 hdiutil create -size 100m -fs HFS+ -layout NONE -format UDIF -volname JOSM -srcfolder ./dist/dmg/ -noanyowners ./dist/TEMP 12 hdiutil convert -format UDBZ ./dist/TEMP.dmg -o ./dist/JOSM.dmg 13 hdiutil internet-enable -yes ./dist/JOSM.dmg 14 15 rm -r ./dist/dmg 16 rm ./dist/TEMP.dmg 17 No newline at end of file -
osx/mkbundle.sh
Property changes on: osx/mkdmg.sh ___________________________________________________________________ Name: svn:executable + *
1 #!/bin/sh 2 3 #Creates a Mac OS X Bundle for JOSM 4 5 #Create he requiered folders 6 mkdir ./dist/JOSM.app 7 mkdir ./dist/JOSM.app/Contents 8 mkdir ./dist/JOSM.app/Contents/MacOS 9 mkdir ./dist/JOSM.app/Contents/Resources 10 mkdir ./dist/JOSM.app/Contents/Resources/Java 11 12 #Copy the exectubale from the system framework into the bundle 13 cp /System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub ./dist/JOSM.app/Contents/MacOS/JavaApplicationStub 14 15 #Copy OSX specific files into the bundle 16 cp ./osx/PkgInfo ./dist/JOSM.app/Contents/PkgInfo 17 cp ./osx/Info.plist ./dist/JOSM.app/Contents/Info.plist 18 cp ./osx/josm.icns ./dist/JOSM.app/Contents/Resources/josm.icns 19 20 #Copy the jar into the bundle 21 cp ./dist/josm-custom.jar ./dist/JOSM.app/Contents/Resources/Java/josm.jar 22 23 #And finally tell Mac OS that this is a Bundle 24 SetFile -a B ./dist/JOSM.app 25 No newline at end of file -
osx/PkgInfo
Property changes on: osx/mkbundle.sh ___________________________________________________________________ Name: svn:executable + *
1 APPL???? 2 No newline at end of file