-
Notifications
You must be signed in to change notification settings - Fork 5
/
linux-pkg.sh
executable file
·58 lines (47 loc) · 2.14 KB
/
linux-pkg.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
# This script must be run from make! Use `make linux-pkg`
cd linux-build
# download latest AppImageTool if not downloaded
if [ ! -f "appimagetool.AppImage" ]; then
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-`uname --m`.AppImage -O appimagetool.AppImage
chmod +x appimagetool.AppImage
fi
appimagepath=AppDir
mkdir -p $appimagepath
# copy necessary pieces
cp ../$build_dir/$name $appimagepath # executable
cp ../$src/wxlin.xpm $appimagepath # icon
lib_dir=../$lib_dir
# copy dynamic libraries (uncomment the following if using dynamic wx build)
if [[ "$Dynamic" -eq 1 ]]; then
echo Copying Dynamic Libraries
cp $lib_dir/libwx_baseu-3.1.so $appimagepath
cp $lib_dir/libwx_baseu-3.1.so.3 $appimagepath
cp $lib_dir/libwx_baseu-3.1.so.3.0.0 $appimagepath
cp $lib_dir/libwx_baseu_net-3.1.so $appimagepath
cp $lib_dir/libwx_baseu_net-3.1.so.3 $appimagepath
cp $lib_dir/libwx_baseu_net-3.1.so.3.0.0 $appimagepath
cp $lib_dir/libwx_baseu_xml-3.1.so $appimagepath
cp $lib_dir/libwx_baseu_xml-3.1.so.3 $appimagepath
cp $lib_dir/libwx_baseu_xml-3.1.so.3.0.0 $appimagepath
cp $lib_dir/libwx_gtk3u_core-3.1.so $appimagepath
cp $lib_dir/libwx_gtk3u_core-3.1.so.3 $appimagepath
cp $lib_dir/libwx_gtk3u_core-3.1.so.3.0.0 $appimagepath
cp $lib_dir/libwx_gtk3u_html-3.1.so $appimagepath
cp $lib_dir/libwx_gtk3u_html-3.1.so.3 $appimagepath
cp $lib_dir/libwx_gtk3u_html-3.1.so.3.0.0 $appimagepath
cp $lib_dir/libwx_gtk3u_qa-3.1.so $appimagepath
cp $lib_dir/libwx_gtk3u_qa-3.1.so.3 $appimagepath
cp $lib_dir/libwx_gtk3u_qa-3.1.so.3.0.0 $appimagepath
cp $lib_dir/libwx_gtk3u_xrc-3.1.so $appimagepath
cp $lib_dir/libwx_gtk3u_xrc-3.1.so.3 $appimagepath
cp $lib_dir/libwx_gtk3u_xrc-3.1.so.3.0.0 $appimagepath
fi
# generate AppImage pieces
printf "#!/bin/sh\ncd \"\$(dirname \"\$0\")\"; echo 'starting!'; LD_LIBRARY_PATH=. ./$name" > $appimagepath/AppRun
chmod +x $appimagepath/AppRun
printf "[Desktop Entry]\nType=Application\nName=$name\nIcon=wxlin\nCategories=X-None;" > $appimagepath/$name.desktop
# run AppImageTool
ARCH=`uname --m` ./appimagetool.AppImage $appimagepath
#copy to linux build folder
#cleanup
rm -r $appimagepath