-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathold-osx-build-file.txt
78 lines (69 loc) · 2.65 KB
/
old-osx-build-file.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0"?>
<project name="Yoshikoder OSX Application" basedir="." default="all">
<property file="build.properties"/>
<target name="all"
description="Generate an OSX application and make a disk image"
depends="clean,jni,osx,dmg"/>
<target name="clean"
description="Remove existing OSX application, dmg, and JNI library">
<delete dir="Yoshikoder.app"/>
<delete file="Yoshikoder-${build.version}.dmg"/>
<delete file="libHelpBookJNI.jnilib"/>
</target>
<target name="jni"
description="Compile the JNI bridge that launches OSX help">
<exec executable="cc">
<arg line="-c"/>
<arg line="-I/System/Library/Frameworks/JavaVM.framework/Headers"/>
<arg line="-o HelpBookJNI.o"/>
<arg value="src/objc/HelpBookJNI.m"/>
</exec>
<exec executable="cc">
<arg line="-dynamiclib"/>
<arg line="-framework JavaVM"/>
<arg line="-framework Cocoa"/>
<arg line="-o libHelpBookJNI.jnilib"/>
<arg value="HelpBookJNI.o"/>
</exec>
<delete file="HelpBookJNI.o" quiet="true"/>
</target>
<target name="osx"
description="Generate an OSX application">
<taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler"
classpath="/usr/share/ant/lib/jarbundler-2.3.1.jar"/>
<jarbundler dir="."
name="Yoshikoder"
mainclass="edu.harvard.wcfia.yoshikoder.Yoshikoder"
jar="Yoshikoder-${build.version}.jar"
vmoptions="-Xmx256m"
build="${build.version}"
bundleid="edu.harvard.wcfia.yoshikoder.Yoshikoder"
helpbookfolder="Help"
helpbookname="Yoshikoder Help"
icon="resources/icons/appicon.icns"
jvmversion="1.8"
stubfile="resources/universalJavaApplicationStub">
<!-- icons path above -->
<!-- Copy the HelpBook JNI library -->
<javafilelist dir="." files="libHelpBookJNI.jnilib"/>
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<documenttype name="Yoshikoder Project"
extensions="ykp"
iconFile="resources/icons/appicon-project.icns"
role="Editor"/>
<helpbook>
<fileset dir="onlinehelp"/>
</helpbook>
</jarbundler>
</target>
<target name="dmg"
description="Make a disk image of the application">
<exec executable="hdiutil">
<arg value="create"/>
<arg value="-srcfolder"/>
<arg value="Yoshikoder.app"/>
<arg value="Yoshikoder-${build.version}.dmg"/>
</exec>
</target>
</project>