forked from HorizenOfficial/zencash-swing-wallet-ui
-
Notifications
You must be signed in to change notification settings - Fork 18
/
build-mac.sh
executable file
·85 lines (73 loc) · 2.09 KB
/
build-mac.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
############################################
# Created by @Pega88 && @Jon_S_Layton #
# v1.0.0 16 Feb 2018 #
############################################
echo "***************************"
echo "|| Checking dependencies ||"
echo "***************************"
echo ""
#fetch + install jar2app
if [ -e /usr/local/bin/jar2app ]
then
echo "jar2app already installed - OK"
else
git clone https://github.com/Jorl17/jar2app
cd jar2app
chmod +x install.sh uninstall.sh
sudo ./install.sh /usr/local/bin
cd ..
rm -rf jar2app
fi
#fetch + install dylibbundler
if [ -e /usr/local/bin/dylibbundler ]
then
echo "dylibbundler already installed - OK"
else
git clone https://github.com/auriamg/macdylibbundler
cd macdylibbundler
sudo make install
cd ..
rm -rf macdylibbundler
fi
if [ ! -e ./zcld ]
then
echo "please provide zcld in the root directory"
else
echo "found zcld - OK"
fi
if [ ! -e ./zcl-cli ]
then
echo "please provide zcl-cli in the root directory"
else
echo "found zcl-cli - OK"
fi
echo ""
echo "******************"
echo "|| building JAR ||"
echo "******************"
echo ""
#build the jar from source
ant jar -f src/build/build.xml
echo ""
echo "*******************"
echo "|| Packaging App ||"
echo "*******************"
echo ""
#package jar to app
jar2app build/jars/ZclassicSwingWallet.jar -n ZclassicDesktopWallet -i ./src/resources/images/zclassic-logo.icns
#add zcld and zcl-cli into the required Contents folder of the App
cp ./zcld ./ZclassicDesktopWallet.app/Contents/zcld
cp ./zcl-cli ./ZclassicDesktopWallet.app/Contents/zcl-cli
chmod +x ./ZclassicDesktopWallet.app/Contents/zcld
chmod +x ./ZclassicDesktopWallet.app/Contents/zcl-cli
echo ""
echo "**********************************"
echo "|| Statically linking libraries ||"
echo "**********************************"
echo ""
#statically build required libraries
dylibbundler -od -b -x ./ZclassicDesktopWallet.app/Contents/zcld \
-x ./ZclassicDesktopWallet.app/Contents/zcl-cli \
-d ./ZclassicDesktopWallet.app/Contents/libs \
-p @executable_path/libs