forked from theprodco/trelby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen_osx_dist.sh
More file actions
executable file
·33 lines (27 loc) · 876 Bytes
/
gen_osx_dist.sh
File metadata and controls
executable file
·33 lines (27 loc) · 876 Bytes
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
#!/bin/bash
#
# this script handles preparing the Mac OS X installable package
#
# You need to have py2app installed as well as python 2.7, wxpython 2.9, and lxml
VER=$(grep 'version =' src/misc.py | cut -d'"' -f2)
APP_DIR="osx-dist/Trelby-MacOSX-$VER/Trelby.app"
# clean old stuff
rm -rf osx-dist
rm -rf dist
# make the app
python setup.py py2app
# mv it to osx-dist
mkdir osx-dist
mv dist osx-dist/Trelby-MacOSX-$VER
# now copy the needed resources, include files, licenses, etc.
mkdir -p $APP_DIR/src
cp -r src/*.py $APP_DIR/src/
mkdir -p $APP_DIR/resources
cp -r resources/ $APP_DIR/resources
cp names.txt.gz dict_en.dat.gz manual.html LICENSE README $APP_DIR
cp README LICENSE fileformat.txt sample.trelby osx-dist/Trelby-MacOSX-$VER
cd osx-dist
#remove any pyc files
find . -name '*.pyc' -delete
#now zip it!
tar -czvf Trelby-MacOSX-${VER}.gz Trelby-MacOSX-${VER}