tsMuxer/rebuild_linux_with_gui_docker.sh
Daniel Kamil Kozar fa8751d530
Place the main tsMuxeR binary inside AppDir (#105)
Since AppImage essentially creates a separate filesystem that the GUI binary
runs from, it's not possible for it to be aware of the existence of the main
binary that's alongside the actual AppImage file that's supposed to be run by
the end user.
The only solution to this that I can see now is copying the main binary into the
AppDir, which makes the file reside alongside the GUI binary inside the
filesystem that AppImage creates.

Fixes #103.
2020-01-03 00:58:42 +01:00

46 lines
1.1 KiB
Bash
Executable File

rm -rf build
mkdir build
cd build
cmake -DTSMUXER_GUI=ON -DTSMUXER_STATIC_BUILD=ON ../
make
cp tsMuxer/tsmuxer ../bin/tsMuxeR
cp tsMuxerGUI/tsMuxerGUI ../bin/tsMuxerGUI
cd ..
rm -rf build
mkdir ./bin/lnx
mv ./bin/tsMuxeR ./bin/lnx/tsMuxeR
# create AppImage of the GUI
mkdir -p ./bin/lnx/AppDir/usr/share/applications
mkdir -p ./bin/lnx/AppDir/usr/share/icons/hicolor/32x32/apps
mkdir -p ./bin/lnx/AppDir/usr/bin
cp ./bin/lnx/tsMuxeR ./bin/lnx/AppDir/usr/bin/
mv ./bin/tsMuxerGUI ./bin/lnx/AppDir/usr/bin/tsMuxerGUI
cp ./tsMuxerGUI/images/icon.png ./bin/lnx/AppDir/usr/share/icons/hicolor/32x32/apps/tsMuxerGUI.png
cat << EOF > ./bin/lnx/AppDir/usr/share/applications/tsmuxergui.desktop
[Desktop Entry]
Name=tsMuxerGUI
Comment=tsMuxerGUI
Exec=tsMuxerGUI
Icon=tsMuxerGUI
Terminal=false
Type=Application
Categories=AudioVideo;
StartupNotify=true
EOF
cd ./bin/lnx
/opt/linuxdeploy/usr/bin/linuxdeploy --appdir AppDir --plugin qt --output appimage
cd ../..
rm -rf ./bin/lnx/AppDir
zip -r ./bin/lnx.zip ./bin/lnx
ls ./bin/lnx/tsMuxeR && ls ./bin/lnx/tsMuxerGUI-*-x86_64.AppImage && ls ./bin/lnx.zip