forked from lktsui/carbon_xs_gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_osx.sh
executable file
·26 lines (26 loc) · 1.27 KB
/
build_osx.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
#!/usr/bin/env bash
rm -rf build
rm -rf dist
pyinstaller -w carbonxs_pyinstaller_osx.spec
mkdir dist/CarbonXS_GUI.app/Contents/MacOs/carbonxs
mkdir dist/CarbonXS_GUI.app/Contents/MacOs/config
mkdir dist/CarbonXS_GUI.app/Contents/MacOs/fonts
cp -r config/fitting\ settings dist/CarbonXS_GUI.app/Contents/MacOs/config
cp -r config/fitting\ parameters dist/CarbonXS_GUI.app/Contents/MacOs/config
cp -r config/diffractometer\ settings dist/CarbonXS_GUI.app/Contents/MacOs/config
cp -r examples dist/CarbonXS_GUI.app/Contents/MacOs/
cp carbonxs/carbonxs_app dist/CarbonXS_GUI.app/Contents/MacOs/carbonxs
cp carbonxs/carbon.inp dist/CarbonXS_GUI.app/Contents/MacOs/carbonxs
cp fonts/SourceCodePro-Regular.ttf dist/CarbonXS_GUI.app/Contents/MacOs/fonts
cp fonts/OFL.txt dist/CarbonXS_GUI.app/Contents/MacOs/fonts
cp -r icons dist/CarbonXS_GUI.app/Contents/MacOs/
timestamp=`date +%Y%m%d-%H%M`
osx_version=`sw_vers -productVersion`
folder=build_osx${osx_version}_${timestamp}
mkdir dist/$folder
mv dist/CarbonXS_GUI.app dist/$folder/CarbonXS_GUI.app
cp readme.md dist/$folder
cp LICENSE dist/$folder
cp -r docs dist/$folder
git archive master --format zip -o dist/$folder/src.zip
hdiutil create -srcfolder dist/$folder -volname "CarbonXS_GUI" -fs HFS+ -format UDZO -imagekey zlib-level=9 -o dist/$folder.dmg