altosui: construct Darwin application directory
authorKeith Packard <keithp@keithp.com>
Thu, 29 Jul 2010 18:09:19 +0000 (11:09 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 29 Jul 2010 18:09:19 +0000 (11:09 -0700)
This adds the necessary files and build steps to construct
AltosUI.app on a Darwin system.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/altosui/AltosUI.app/Contents/Info.plist [new file with mode: 0644]
ao-tools/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub [new file with mode: 0755]
ao-tools/altosui/AltosUI.app/Contents/PkgInfo [new file with mode: 0644]
ao-tools/altosui/AltosUI.app/Contents/Resources/AltosUIIcon.icns [new file with mode: 0644]
ao-tools/altosui/AltosUIIcon.icns [deleted file]
ao-tools/altosui/Makefile

diff --git a/ao-tools/altosui/AltosUI.app/Contents/Info.plist b/ao-tools/altosui/AltosUI.app/Contents/Info.plist
new file mode 100644 (file)
index 0000000..97b1b59
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+       <key>CFBundleName</key>
+       <string>altosui</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>CFBundleGetInfoString</key>
+       <string>AltOS UI version 0.7</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleIconFile</key>
+       <string>AltosUIIcon.icns</string>
+       <key>Java</key>
+       <dict>
+               <key>MainClass</key>
+               <string>altosui.AltosUI</string>
+               <key>JVMVersion</key>
+               <string>1.5+</string>
+               <key>ClassPath</key>
+                       <array>
+                       <string>$JAVAROOT/altosui.jar</string>
+                       <string>$JAVAROOT/freetts.jar</string>
+                       </array>
+       </dict>
+</dict>
+</plist>
diff --git a/ao-tools/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub b/ao-tools/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub
new file mode 100755 (executable)
index 0000000..c661d3e
Binary files /dev/null and b/ao-tools/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub differ
diff --git a/ao-tools/altosui/AltosUI.app/Contents/PkgInfo b/ao-tools/altosui/AltosUI.app/Contents/PkgInfo
new file mode 100644 (file)
index 0000000..8a43480
--- /dev/null
@@ -0,0 +1 @@
+APPLAM.O
diff --git a/ao-tools/altosui/AltosUI.app/Contents/Resources/AltosUIIcon.icns b/ao-tools/altosui/AltosUI.app/Contents/Resources/AltosUIIcon.icns
new file mode 100644 (file)
index 0000000..fe49f36
Binary files /dev/null and b/ao-tools/altosui/AltosUI.app/Contents/Resources/AltosUIIcon.icns differ
diff --git a/ao-tools/altosui/AltosUIIcon.icns b/ao-tools/altosui/AltosUIIcon.icns
deleted file mode 100644 (file)
index fe49f36..0000000
Binary files a/ao-tools/altosui/AltosUIIcon.icns and /dev/null differ
index a2d70c18ab5bf216206335703e61ad0de5012063..51a85a13a425f521e858c7211b4dbb8a2d258594 100644 (file)
@@ -33,7 +33,17 @@ FREETTSJAR= \
 
 JAVAFLAGS=-Xlint:unchecked
 
-all: altosui.jar
+OS:=$(shell uname)
+
+ifeq ($(OS),Linux)
+ALTOSUI_APP=altosui
+endif
+
+ifeq ($(OS),Darwin)
+ALTOSUI_APP=AltosUI.app/Contents/Resources/Java/altosui.jar
+endif
+
+all: altosui.jar $(ALTOSUI_APP)
 
 $(CLASSFILES):
 
@@ -54,6 +64,22 @@ classes/libaltosJNI:
 $(FREETTSJAR):
        ln -s $(FREETTSLIB)/$@ .
 
+ifeq ($(OS),Darwin)
+RESOURCES=altosui.jar $(FREETTSJAR) ../libaltos/libaltos.dylib
+
+$(ALTOSUI_APP): $(RESOURCES)
+       mkdir -p AltosUI.app/Contents/Resources/Java
+       cp $(RESOURCES) AltosUI.app/Contents/Resources/Java
+
+endif
+
+ifeq ($(OS),Linux)
+altosui:
+       echo "#!/bin/sh" > $@
+       echo "exec java -Djava.library.path=../libaltos -jar altosui.jar" >> $@
+endif
+
 clean:
        rm -f *.class $(FREETTSJAR) altosui.jar
+       rm -f AltosUI.app/Contents/Resources/Java/*
        rm -rf classes