Skip to content

Commit 81eb379

Browse files
committed
AppImage support ported from Template
1 parent 8066247 commit 81eb379

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ wxWidgets/build/linux/
367367
linux-build/
368368
wxWidgets/configure
369369
wxWidgets/autom4te*
370+
appimagetool.AppImage
371+
UnityHubNative-x86_64.AppImage
372+
editorPaths.txt
370373

371374
# Mac OS temporary and compiled data
372375
*.DS_STORE

linux-pkg.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ debug:
2020

2121
release:
2222
@make --no-print-directory mode=-O3 all
23+
24+
linux-pkg:
25+
@make --no-print-directory release
26+
name=$(target) build_dir=$(build_dir) src=$(source_dir) lib_dir=$(lib_build_path)/lib ./linux-pkg.sh
2327

2428
# Compiles the app, and the library if needed. Uses all the available processor cores.
2529
all: $(lib_build_path)/$(lib_file_detect)

0 commit comments

Comments
 (0)