summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2013-03-05 21:55:44 (GMT)
committer Jaromil <jaromil@dyne.org>2013-03-05 21:55:44 (GMT)
commit71c99e23e4cbba19e315b4b9d89ab2775b268d79 (patch)
tree739f57e148919a8261c5fc41e6d066b6d21e857a
parentbeea6407f25d25d23f0484c04f59201ec1f2706e (diff)
osx app packing
-rwxr-xr-xmac/AutOrg.command2
-rwxr-xr-xmac/pack.sh46
-rwxr-xr-xmac/rel/makerel.sh63
3 files changed, 110 insertions, 1 deletions
diff --git a/mac/AutOrg.command b/mac/AutOrg.command
index bb5a752..6f7e060 100755
--- a/mac/AutOrg.command
+++ b/mac/AutOrg.command
@@ -28,7 +28,7 @@ if [ -r $HOME/.emacs ]; then
cat $HOME/.emacs >> $appbase/$autorg/.emacs
fi
-export PATH=$PATH:$appbase/$autorg:/usr/texbin
+export PATH="$PATH:$appbase/$autorg:/usr/texbin:/Applications/LibreOffice.app/Contents/MacOS"
# export LANG=en_US
# export LC_CTYPE=UTF-8
cat <<EOF > $appbase/$autorg/.aspell.conf
diff --git a/mac/pack.sh b/mac/pack.sh
new file mode 100755
index 0000000..9442a5b
--- /dev/null
+++ b/mac/pack.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Transform an Emacs.app into AutOrg
+
+# to make a new dmg prepare a dir with link to /Applications and
+# the toasted AutOrg.app inside, adjust its visualization then use:
+# hdiutil create AutOrg-0.2.dmg -ov -volname "AutOrg-0.2" -fs HFS+ -srcfolder dist
+
+echo "Packing AutOrg.app"
+
+if [ -r AutOrg.app ]; then
+ echo "Using already packaged AutOrg.app in this directory"
+elif [ -r /Applications/Emacs.app ]; then
+ echo "Using Emacs.app found in Applications"
+ mkdir -p AutOrg.app
+ rsync -a /Applications/Emacs.app/* AutOrg.app/
+elif [ -r /Applications/AutOrg.app ]; then
+ echo "Using AutOrg.app found in Applications"
+ mkdir -p AutOrg.app
+ rsync -a /Applications/AutOrg.app/* AutOrg.app/
+else
+ echo "Emacs.app or AutOrg.app starting base not found on system"
+ exit 1
+fi
+
+# make sure we use our own org-mode
+if [ -r AutOrg.app/Contents/Resources/lisp/org ]; then
+ rm -rf AutOrg.app/Contents/Resources/lisp/org
+fi
+cp -f Info.plist AutOrg.app/Contents/
+cp -f AutOrg.command AutOrg.app/Contents/MacOS
+cp -f AutOrg.icns AutOrg.app/Contents/Resources/
+mkdir -p AutOrg.app/Contents/Resources/AutOrg
+rsync -a ../elisp/* AutOrg.app/Contents/Resources/AutOrg/
+
+# grammar parser
+rsync -r ../grammar/data/en AutOrg.app/Contents/Resources/AutOrg/
+cp ../grammar/grammar-filter/grammar-filter AutOrg.app/Contents/Resources/AutOrg/
+
+# aspell
+cp ../spell/aspell AutOrg.app/Contents/Resources/AutOrg/
+cp ../spell/ispell AutOrg.app/Contents/Resources/AutOrg/
+# cp ../spell/dictionaries.el AutOrg.app/Contents/Resources/AutOrg/
+rsync -ra ../spell/dict AutOrg.app/Contents/Resources/AutOrg/
+
+echo "Done."
diff --git a/mac/rel/makerel.sh b/mac/rel/makerel.sh
new file mode 100755
index 0000000..46bbb13
--- /dev/null
+++ b/mac/rel/makerel.sh
@@ -0,0 +1,63 @@
+#!/usr/bin/env zsh
+
+{ test "$1" = "" } && {
+ echo "usage: makerel.sh version"
+ return 1 }
+
+dir=AutOrg
+ver=$1
+out="`basename ${dir}`-${ver}.dmg"
+
+echo "Making AutOrg release v$ver"
+
+{ test -r ${dir} } || {
+ echo "error: dir not found: $dir"
+ return 0 }
+
+{ test "$ver" = "" } && {
+ echo "error: version not specified"
+ return 0 }
+
+# creating the directory and populating it
+mkdir -p AutOrg
+{ test -r ../AutOrg.app/Contents } && {
+ echo "updating to latest app build"
+ rm -rf AutOrg/AutOrg.app
+ mv ../AutOrg.app ./AutOrg/
+}
+echo "Source app: `du -hs AutOrg/AutOrg.app`"
+v=README; cp -f ../../${v} ./AutOrg/${v}.txt
+v=COPYING; cp -f ../../${v} ./AutOrg/${v}.txt
+v=AUTHORS; cp -f ../../${v} ./AutOrg/${v}.txt
+v=ChangeLog; cp -f ../../${v} ./AutOrg/${v}.txt
+v="Anonymous Pro.ttf"; cp ../../doc/${v} ./AutOrg/
+
+echo "Generating release: $out"
+echo "Source dir: `du -hs $dir`"
+echo "proceed? (y|n)"
+read -q ok
+echo
+{ test "$ok" = y } || {
+ echo "operation aborted."
+ return 0 }
+
+hdiutil create -fs HFS+ -volname "$dir $ver" -srcfolder \
+ ${dir} "${out}"
+
+{ test $? = 0 } || {
+ echo "error creating image: ${out}"
+ return 0 }
+
+ls -lh ${out}
+
+hdiutil internet-enable -yes ${out}
+
+shasum ${out} > ${out}.sha
+
+echo "sign release? (y|n)"
+read -q ok
+echo
+{ test "$ok" = y } || {
+ echo "done."
+ return 1 }
+gpg -b -a ${out}.sha