Skip to content

Commit c9bcf59

Browse files
committed
linux script
1 parent be301d9 commit c9bcf59

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

release/linux_setup_builder.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/sh
2+
3+
# This script depends on the GNU script makeself.sh found at: http://megastep.org/makeself/
4+
# Note: The structure of this package depends on the -rpath,./lib to be set at compile/link time.
5+
6+
version="2.1.3"
7+
arch=`uname -i`
8+
9+
if [ "${arch}" = "x86_64" ]; then
10+
arch="64bit"
11+
QtLIBPATH="${HOME}/Qt/5.4/gcc_64"
12+
else
13+
arch="32bit"
14+
QtLIBPATH="${HOME}/Qt/5.4/gcc"
15+
fi
16+
17+
if [ -f solarcoin-qt ] && [ -f solarcoin.conf ] && [ -f README.md ]; then
18+
echo "Building SolarCoin_${version}_${arch}.run ...\n"
19+
if [ -d SolarCoin_${version}_${arch} ]; then
20+
rm -fr SolarCoin_${version}_${arch}/
21+
fi
22+
mkdir SolarCoin_${version}_${arch}
23+
mkdir SolarCoin_${version}_${arch}/libs
24+
mkdir SolarCoin_${version}_${arch}/platforms
25+
mkdir SolarCoin_${version}_${arch}/imageformats
26+
cp solarcoin-qt SolarCoin_${version}_${arch}/
27+
cp solarcoin.conf SolarCoin_${version}_${arch}/
28+
cp README.md SolarCoin_${version}_${arch}/
29+
cp SolarCoinEula.* SolarCoin_${version}_${arch}/
30+
ldd solarcoin-qt | grep libssl | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
31+
ldd solarcoin-qt | grep libdb_cxx | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
32+
ldd solarcoin-qt | grep libboost_system | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
33+
ldd solarcoin-qt | grep libboost_filesystem | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
34+
ldd solarcoin-qt | grep libboost_program_options | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
35+
ldd solarcoin-qt | grep libboost_thread | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
36+
ldd solarcoin-qt | grep libminiupnpc | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
37+
ldd solarcoin-qt | grep libqrencode | awk '{ printf("%s\0", $3); }' | xargs -0 -I{} cp {} SolarCoin_${version}_${arch}/libs/
38+
cp ${QtLIBPATH}/lib/libQt*.so.5 SolarCoin_${version}_${arch}/libs/
39+
cp ${QtLIBPATH}/lib/libicu*.so.53 SolarCoin_${version}_${arch}/libs/
40+
cp ${QtLIBPATH}/plugins/platforms/lib*.so SolarCoin_${version}_${arch}/platforms/
41+
cp ${QtLIBPATH}/plugins/imageformats/lib*.so SolarCoin_${version}_${arch}/imageformats/
42+
strip SolarCoin_${version}_${arch}/solarcoin-qt
43+
echo "Enter your sudo password to change the ownership of the archive: "
44+
sudo chown -R nobody:nogroup SolarCoin_${version}_${arch}
45+
46+
# now build the archive
47+
if [ -f SolarCoin_${version}_${arch}.run ]; then
48+
rm -f SolarCoin_${version}_${arch}.run
49+
fi
50+
makeself.sh --notemp SolarCoin_${version}_${arch} SolarCoin_${version}_${arch}.run "\nCopyright (c) 2014-2015 The SolarCoin Developers\nSolarCoin will start when the installation is complete...\n" ./solarcoin-qt \&
51+
sudo rm -fr SolarCoin_${version}_${arch}/
52+
echo "Package created in: $PWD/SolarCoin_${version}_${arch}.run\n"
53+
else
54+
echo "Error: Missing files!\n"
55+
echo "Copy this file to a setup folder along with solarcoin-qt, solarcoin.conf and README.md.\n"
56+
fi
57+

0 commit comments

Comments
 (0)