diff --git a/appimage/alephone.desktop b/appimage/alephone.desktop new file mode 100644 index 000000000..3311e9377 --- /dev/null +++ b/appimage/alephone.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Aleph One +Exec=alephone +Icon=alephone +Categories=Game; + diff --git a/appimage/alephone.png b/appimage/alephone.png new file mode 100644 index 000000000..1d43f8402 Binary files /dev/null and b/appimage/alephone.png differ diff --git a/appimage/apprun-marathon-infinity.sh b/appimage/apprun-marathon-infinity.sh new file mode 100644 index 000000000..b555704a7 --- /dev/null +++ b/appimage/apprun-marathon-infinity.sh @@ -0,0 +1,3 @@ +#!/bin/sh +approot="$(realpath "$(dirname "$0")")" +"$approot/usr/bin/alephone" "$approot/usr/share/Marathon Infinity" diff --git a/appimage/apprun-marathon.sh b/appimage/apprun-marathon.sh new file mode 100644 index 000000000..de3a12897 --- /dev/null +++ b/appimage/apprun-marathon.sh @@ -0,0 +1,3 @@ +#!/bin/sh +approot="$(realpath "$(dirname "$0")")" +"$approot/usr/bin/alephone" "$approot/usr/share/Marathon" diff --git a/appimage/apprun-marathon2.sh b/appimage/apprun-marathon2.sh new file mode 100644 index 000000000..47dd93235 --- /dev/null +++ b/appimage/apprun-marathon2.sh @@ -0,0 +1,3 @@ +#!/bin/sh +approot="$(realpath "$(dirname "$0")")" +"$approot/usr/bin/alephone" "$approot/usr/share/Marathon 2" diff --git a/appimage/build.sh b/appimage/build.sh new file mode 100755 index 000000000..b138d797e --- /dev/null +++ b/appimage/build.sh @@ -0,0 +1,126 @@ +#!/bin/bash +set -e + +cat </dev/null +sudo apt install --no-install-recommends \ + build-essential autoconf autoconf-archive nasm wget git fuse3 \ + libboost-all-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev \ + libzzip-dev zlib1g-dev libpng-dev libvpx-dev libvorbis-dev \ + libcurl4-gnutls-dev libminiupnpc-dev libopenal-dev libsndfile1-dev \ + libglu1-mesa-dev +EOL + +set -x + +cd "$(dirname "$0")" + +#ffmpeg_tag="n6.0" + +export LD_LIBRARY_PATH="$PWD/ffmpeg/usr/lib:$LD_LIBRARY_PATH" +export PKG_CONFIG_PATH="$PWD/ffmpeg/usr/lib/pkgconfig" + +# build FFmpeg from source to avoid unneeded dependencies +# https://github.com/Aleph-One-Marathon/mac-frameworks/blob/master/ffmpeg/ffmpeg.mk + +#if [ ! -d ffmpeg ]; then +# git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg +# cd ffmpeg +# git checkout $ffmpeg_tag +# cd .. +#fi +if [ ! -f ffmpeg/usr/lib/pkgconfig/libavcodec.pc ]; then + cd ffmpeg + ./configure --prefix="$PWD/usr" \ + --disable-programs \ + --disable-doc \ + --enable-gpl \ + --enable-version3 \ + --disable-static \ + --enable-shared \ + --enable-postproc \ + --enable-libvorbis \ + --enable-libvpx \ + --disable-everything \ + --enable-muxer=webm \ + --enable-encoder=libvorbis \ + --enable-encoder=libvpx_vp8 \ + --enable-demuxer=aiff \ + --enable-demuxer=mp3 \ + --enable-demuxer=mpegps \ + --enable-demuxer=mpegts \ + --enable-demuxer=mpegtsraw \ + --enable-demuxer=mpegvideo \ + --enable-demuxer=ogg \ + --enable-demuxer=wav \ + --enable-parser=mpegaudio \ + --enable-parser=mpegvideo \ + --enable-decoder=adpcm_ima_wav \ + --enable-decoder=adpcm_ms \ + --enable-decoder=gsm \ + --enable-decoder=gsm_ms \ + --enable-decoder=mp1 \ + --enable-decoder=mp1float \ + --enable-decoder=mp2 \ + --enable-decoder=mp2float \ + --enable-decoder=mp3 \ + --enable-decoder=mp3float \ + --enable-decoder=mpeg1video \ + --enable-decoder=pcm_alaw \ + --enable-decoder=pcm_f32be \ + --enable-decoder=pcm_f32le \ + --enable-decoder=pcm_f64be \ + --enable-decoder=pcm_f64le \ + --enable-decoder=pcm_mulaw \ + --enable-decoder=pcm_s8 \ + --enable-decoder=pcm_s8_planar \ + --enable-decoder=pcm_s16be \ + --enable-decoder=pcm_s16le \ + --enable-decoder=pcm_s16le_planar \ + --enable-decoder=pcm_s24be \ + --enable-decoder=pcm_s24le \ + --enable-decoder=pcm_s32be \ + --enable-decoder=pcm_s32le \ + --enable-decoder=pcm_u8 \ + --enable-decoder=theora \ + --enable-decoder=vorbis \ + --enable-decoder=vp8 \ + --enable-protocol=file \ + | tee config.log + make -j$(nproc) + make install + cd .. +fi + +# build AlephOne +if [ ! -f build/Source_Files/alephone ]; then + rm -rf build + mkdir build + cd build + test -f ../../configure || autoreconf -if ../.. + CFLAGS=-O2 CXXFLAGS=-O2 LDFLAGS=-s ../../configure --without-smpeg + make -j$(nproc) V=0 + #wget -q -O linuxdeploy.AppImage -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + #chmod a+x linuxdeploy.AppImage + cd .. +fi + +# create AppDirs +rm -rf out +mkdir -p out/appdir/usr/bin out/appdir/usr/share/doc/{alephone,ffmpeg} +cp build/Source_Files/alephone out/appdir/usr/bin +cp ../{AUTHORS,COPYING,THANKS} out/appdir/usr/share/doc/alephone +cp ffmpeg/{*.md,MAINTAINERS,Changelog} out/appdir/usr/share/doc/ffmpeg +cp -r out/appdir out/alephone.appdir +cp -r out/appdir out/marathon.appdir +cp -r out/appdir out/marathon2.appdir +cp -r out/appdir out/marathon-infinity.appdir +cp -r ../data/Scenarios/Marathon out/marathon.appdir/usr/share +cp -r ../data/Scenarios/"Marathon 2" out/marathon2.appdir/usr/share +cp -r ../data/Scenarios/"Marathon Infinity" out/marathon-infinity.appdir/usr/share + +# create AppImages +cd out +../linuxdeploy.AppImage -oappimage --appdir=alephone.appdir -d../alephone.desktop -i../alephone.png +../linuxdeploy.AppImage -oappimage --appdir=marathon.appdir -d../marathon.desktop -i../marathon.png --custom-apprun=../apprun-marathon.sh +../linuxdeploy.AppImage -oappimage --appdir=marathon2.appdir -d../marathon2.desktop -i../marathon2.png --custom-apprun=../apprun-marathon2.sh +../linuxdeploy.AppImage -oappimage --appdir=marathon-infinity.appdir -d../marathon-infinity.desktop -i../marathon-infinity.png --custom-apprun=../apprun-marathon-infinity.sh diff --git a/appimage/fetch-sources.sh b/appimage/fetch-sources.sh new file mode 100755 index 000000000..c4e2aaefa --- /dev/null +++ b/appimage/fetch-sources.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -e +set -x + +wget -q -O linuxdeploy.AppImage -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage +chmod a+x linuxdeploy.AppImage + +#URL=https://git.ffmpeg.org/ffmpeg.git +URL=https://github.com/FFmpeg/FFmpeg +git clone --depth 1 $URL ffmpeg + +set +x +set +e + +if [ "x$(ls ../data/Scenarios/Marathon)" = "x" ]; then + echo "Warning: no game files in \`../data/Scenarios'!" +fi \ No newline at end of file diff --git a/appimage/marathon-infinity.desktop b/appimage/marathon-infinity.desktop new file mode 100644 index 000000000..cfa55df80 --- /dev/null +++ b/appimage/marathon-infinity.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Marathon Infinity +Exec=marathon-infinity +Icon=marathon-infinity +Categories=Game; + diff --git a/appimage/marathon-infinity.png b/appimage/marathon-infinity.png new file mode 100644 index 000000000..24ecd26a0 Binary files /dev/null and b/appimage/marathon-infinity.png differ diff --git a/appimage/marathon.desktop b/appimage/marathon.desktop new file mode 100644 index 000000000..e279854d2 --- /dev/null +++ b/appimage/marathon.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Marathon +Exec=marathon +Icon=marathon +Categories=Game; + diff --git a/appimage/marathon.png b/appimage/marathon.png new file mode 100644 index 000000000..d08b5b6dc Binary files /dev/null and b/appimage/marathon.png differ diff --git a/appimage/marathon2.desktop b/appimage/marathon2.desktop new file mode 100644 index 000000000..b0c5ac3dc --- /dev/null +++ b/appimage/marathon2.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Marathon 2 - Durandal +Exec=marathon2 +Icon=marathon2 +Categories=Game; + diff --git a/appimage/marathon2.png b/appimage/marathon2.png new file mode 100644 index 000000000..a8067b618 Binary files /dev/null and b/appimage/marathon2.png differ