Created
March 1, 2022 23:14
-
-
Save Jammyjamjamman/6ef98a1a8cb52fd3313f39cb74006640 to your computer and use it in GitHub Desktop.
Slightly broken script for making MegaGlest Appimage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# . /etc/os-release | |
# if [[ $ID != "ubuntu" || $VERSION_ID != "18.04" ]]; | |
# then | |
# echo "Ubuntu 18.04 is required! System found: $ID $VERSION_ID" | |
# fi; | |
AppImageMG="AppImageMG" | |
rm -rf $AppImageMG | |
mkdir $AppImageMG | |
echo | |
echo "Getting build deps..." | |
# sudo ./setupBuildDeps.sh | |
ec | |
echo "Building and installing MegaGlest..." | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_MEGAGLEST_MAP_EDITOR=OFF -DBUILD_MEGAGLEST_MODEL_VIEWER=OFF ../../.. | |
make -j8 && make install DESTDIR="../$AppImageMG" | |
strip "../$AppImageMG/usr/bin/megaglest" | |
strip "../$AppImageMG/usr/bin/megaglest_editor" | |
strip "../$AppImageMG/usr/bin/megaglest_g3dviewer" | |
echo | |
echo "installing data..." | |
# ../../linux/clone-data.sh | |
cd .. | |
mkdir build_data | |
cd build_data | |
cmake -DCMAKE_INSTALL_PREFIX=/usr ../../../data/glest_game | |
make && make install DESTDIR="../$AppImageMG" | |
cd .. | |
# rm -rf build | |
# Remove useless metainfo. | |
# rm Glest/usr/share/metainfo/io.glest.Editor.appdata.xml | |
wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" | |
echo | |
echo "Creating the AppImage..." | |
# Path to pulseaudio libs. | |
# export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/pulseaudio/ | |
# :/usr/lib/i386-linux-gnu/pulseaudio/:$LD_LIBRARY_PATH | |
chmod +x linuxdeploy-x86_64.AppImage | |
# rm $AppImageMG/usr/share/applications/megaglest_g3dviewer.desktop | |
# rm $AppImageMG/usr/share/applications/megaglest_editor.desktop | |
# rm $AppImageMG/usr/share/metainfo/megaglest_editor.appdata.xml | |
cp $AppImageMG/usr/bin/megaglest $AppImageMG/usr/bin/megaglest_editor | |
cp $AppImageMG/usr/bin/megaglest $AppImageMG/usr/bin/megaglest_g3dviewer | |
./linuxdeploy-x86_64.AppImage --appdir=$AppImageMG --output appimage | |
chmod +x Mega*.AppImage | |
echo | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment