|
| 1 | +# This script must be run from make! Use `make linux-pkg` |
| 2 | + |
| 3 | +# download latest AppImageTool if not downloaded |
| 4 | +if [ ! -f "appimagetool.AppImage" ]; then |
| 5 | + wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-`uname --m`.AppImage -O appimagetool.AppImage |
| 6 | + chmod +x appimagetool.AppImage |
| 7 | +fi |
| 8 | + |
| 9 | +appimagepath=AppDir |
| 10 | + |
| 11 | +mkdir -p $appimagepath |
| 12 | + |
| 13 | +# copy necessary pieces |
| 14 | +cp $build_dir/$name $appimagepath # executable |
| 15 | +cp $src/wxlin.xpm $appimagepath # icon |
| 16 | +# copy libraries |
| 17 | +cp $lib_dir/libwx_baseu-3.1.so $appimagepath |
| 18 | +cp $lib_dir/libwx_baseu-3.1.so.3 $appimagepath |
| 19 | +cp $lib_dir/libwx_baseu-3.1.so.3.0.0 $appimagepath |
| 20 | +cp $lib_dir/libwx_baseu_net-3.1.so $appimagepath |
| 21 | +cp $lib_dir/libwx_baseu_net-3.1.so.3 $appimagepath |
| 22 | +cp $lib_dir/libwx_baseu_net-3.1.so.3.0.0 $appimagepath |
| 23 | +cp $lib_dir/libwx_baseu_xml-3.1.so $appimagepath |
| 24 | +cp $lib_dir/libwx_baseu_xml-3.1.so.3 $appimagepath |
| 25 | +cp $lib_dir/libwx_baseu_xml-3.1.so.3.0.0 $appimagepath |
| 26 | +cp $lib_dir/libwx_gtk3u_core-3.1.so $appimagepath |
| 27 | +cp $lib_dir/libwx_gtk3u_core-3.1.so.3 $appimagepath |
| 28 | +cp $lib_dir/libwx_gtk3u_core-3.1.so.3.0.0 $appimagepath |
| 29 | +cp $lib_dir/libwx_gtk3u_html-3.1.so $appimagepath |
| 30 | +cp $lib_dir/libwx_gtk3u_html-3.1.so.3 $appimagepath |
| 31 | +cp $lib_dir/libwx_gtk3u_html-3.1.so.3.0.0 $appimagepath |
| 32 | +cp $lib_dir/libwx_gtk3u_qa-3.1.so $appimagepath |
| 33 | +cp $lib_dir/libwx_gtk3u_qa-3.1.so.3 $appimagepath |
| 34 | +cp $lib_dir/libwx_gtk3u_qa-3.1.so.3.0.0 $appimagepath |
| 35 | +cp $lib_dir/libwx_gtk3u_xrc-3.1.so $appimagepath |
| 36 | +cp $lib_dir/libwx_gtk3u_xrc-3.1.so.3 $appimagepath |
| 37 | +cp $lib_dir/libwx_gtk3u_xrc-3.1.so.3.0.0 $appimagepath |
| 38 | + |
| 39 | + |
| 40 | +# generate AppImage pieces |
| 41 | +printf "#!/bin/sh\ncd \"\$(dirname \"\$0\")\"; echo 'starting!'; LD_LIBRARY_PATH=. ./$name" > $appimagepath/AppRun |
| 42 | +chmod +x $appimagepath/AppRun |
| 43 | +printf "[Desktop Entry]\nType=Application\nName=$name\nIcon=wxlin\nCategories=X-None;" > $appimagepath/$name.desktop |
| 44 | + |
| 45 | +# run AppImageTool |
| 46 | +ARCH=`uname --m` ./appimagetool.AppImage $appimagepath |
| 47 | + |
| 48 | +#copy to linux build folder |
| 49 | + |
| 50 | +#cleanup |
| 51 | +rm -r $appimagepath |
0 commit comments