-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·42 lines (36 loc) · 881 Bytes
/
build.sh
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
#!/bin/bash
VERSION=`grep '^VERSION' BtBatStat.py | sed -e "s/[A-Za-z=\s\ \']//g"`
cat > setup.py << EOF
from setuptools import setup
DATAFILES = ['icons', 'BtBatStat.icns']
setup(
app=["BtBatStat.py"],
data_files=DATAFILES,
options=dict(py2app=dict(
plist=dict(
LSUIElement=True,
CFBundleShortVersionString="$VERSION",
CFBundleVersion="$VERSION",
CFBundleIconFile="BtBatStat.icns",
CFBundleIdentifier="org.vandalon.btbatstat",
NSHumanReadableCopyright="Joris Vandalon",
),
)),
setup_requires=["py2app"],
)
EOF
#Remove build crap if exists
if [ -d build ] ; then
rm -rf build
fi
if [ -d dist ] ; then
rm -rf dist
fi
#Build App
python setup.py py2app
#Zip App
cd dist
zip -r ~/Desktop/BtBatStat.zip BtBatStat.app
#Remove build crap
cd ..
rm -rf dist build setup.py