diff --git a/contrib/linux/com.dosbox_x.DOSBox-X-sdl2.yaml b/contrib/linux/com.dosbox_x.DOSBox-X-sdl2.yaml new file mode 100644 index 000000000..0208c4224 --- /dev/null +++ b/contrib/linux/com.dosbox_x.DOSBox-X-sdl2.yaml @@ -0,0 +1,96 @@ +app-id: com.dosbox_x.DOSBox-X-sdl2 +runtime: org.freedesktop.Platform +runtime-version: '20.08' +sdk: org.freedesktop.Sdk + +command: dosbox-x-sdl2 + +finish-args: # flatpak permissions + - --device=all # needed for gamepads and serial/parallel + - --share=ipc # needed for X11 + - --share=network # needed for networking (NE2000, IPX) + - --socket=x11 + - --socket=wayland + - --socket=pulseaudio + - --filesystem=home + +cleanup: + - '/include' + - '/lib/pkgconfig' + - '/share/aclocal' + - '/share/man' + - '*.la' + - '*.a' + - '/share/doc' + +modules: + +# Build Mesa / GLU + - name: GLU + config-opts: + - --disable-static + sources: + - type: archive + url: https://mesa.freedesktop.org/archive/glu/glu-9.0.1.tar.xz + sha256: fb5a4c2dd6ba6d1c21ab7c05129b0769544e1d68e1e3b0ffecb18e73c93055bc + cleanup: + - /include + - /lib/*.a + - /lib/*.la + - /lib/pkgconfig + +# Build final FluidSynth 1.x release +# FluidSynth 2.x causes "checking for fluid_synth_sysex in -lfluidsynth... no" + - name: FluidSynth + buildsystem: cmake-ninja + config-opts: + - -DLIB_SUFFIX= + cleanup: + - /bin + - /include + - /lib/pkgconfig + - /share/man + - "*.so" + sources: + - type: archive + url: https://github.com/FluidSynth/fluidsynth/archive/v1.1.11.tar.gz + sha256: da8878ff374d12392eecf87e96bad8711b8e76a154c25a571dd8614d1af80de8 + +# Build libpcap for NE2000 (and run setcap at the end) + - name: libpcap + cleanup: + - "/include" + - "/share" + - "/lib/pkgconfig" + sources: + - type: archive + url: https://www.tcpdump.org/release/libpcap-1.9.1.tar.gz + sha256: 635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094 + +# Build DOSBox-X + - name: dosbox-x + rm-configure: true + sources: + - type: dir + path: ../.. + - type: file + path: ../icons/dosbox-x.svg + - type: file + path: dosbox-x.appdata.xml + - type: file + path: dosbox-x.desktop + buildsystem: simple + build-commands: + # Build the SDL2 debugger enabled version of DOSBox-X + - ./build-debug-sdl2 + post-install: + - install -D src/dosbox-x /app/bin/dosbox-x-sdl2 +# - setcap cap_net_raw+ep /app/bin/dosbox-x # fails due to needing root permission + - install -Dm644 dosbox-x.svg /app/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg + - install -Dm644 dosbox-x.appdata.xml /app/share/metainfo/${FLATPAK_ID}.appdata.xml + - sed -i 's/com.dosbox_x.DOSBox-Xcom.dosbox_x.DOSBox-X-sdl2DOSBox-XDOSBox-X SDL2 - dosbox-x.desktop + com.dosbox_x.DOSBox-X GPL-2.0 CC0-1.0 DOSBox-X @@ -40,5 +40,5 @@ With the help of DOSBox-X, it can run plenty of the old classics that don't run on your new computer! https://www.dosbox-x.com - https://github.com/joncampbell123/dosbox-x/wiki + https://github.com/joncampbell123/dosbox-x/issues diff --git a/make-flatpak-sdl2.sh b/make-flatpak-sdl2.sh new file mode 100755 index 000000000..70dbcd79a --- /dev/null +++ b/make-flatpak-sdl2.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# flatpak build will fail immediately if it cannot find the appdata.xml file +# But we have a dosbox-x.appdata.xml.in file that first needs processing by autotools +./autogen.sh +./configure + +cd contrib/linux +flatpak-builder --repo=../../repo --force-clean ../../build-flatpak com.dosbox_x.DOSBox-X-sdl2.yaml +if [ $? -eq 0 ]; then + echo If the build was successful, you can now install the flatpak by running the following commands: + echo + echo flatpak --user remote-add --no-gpg-verify myrepo repo + echo flatpak --user install myrepo com.dosbox_x.DOSBox-X-sdl2 + echo + echo Or you can test it without installing by running: + echo flatpak-builder --run build-flatpak contrib/linux/com.dosbox_x.DOSBox-X-sdl2.yaml dosbox-x-sdl2 +fi + +cd ../.. diff --git a/make-flatpak.sh b/make-flatpak.sh new file mode 100755 index 000000000..9f8766ca6 --- /dev/null +++ b/make-flatpak.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# flatpak build will fail immediately if it cannot find the appdata.xml file +# But we have a dosbox-x.appdata.xml.in file that first needs processing by autotools +./autogen.sh +./configure + +cd contrib/linux +flatpak-builder --repo=../../repo --force-clean ../../build-flatpak com.dosbox_x.DOSBox-X.yaml +if [ $? -eq 0 ]; then + echo If the build was successful, you can now install the flatpak by running the following commands: + echo + echo flatpak --user remote-add --no-gpg-verify myrepo repo + echo flatpak --user install myrepo com.dosbox_x.DOSBox-X + echo + echo Or you can test it without installing by running: + echo flatpak-builder --run build-flatpak contrib/linux/com.dosbox_x.DOSBox-X.yaml dosbox-x +fi +cd ../.. diff --git a/update-build-timestamp.pl b/update-build-timestamp.pl index 0b14a69fd..9cbf4c502 100755 --- a/update-build-timestamp.pl +++ b/update-build-timestamp.pl @@ -34,7 +34,7 @@ while (my $line = ) { if ($line =~ /date=/) { push @lines, (" \n"); } elsif ($line =~ /\n"); + push @lines, ("\n"); } else { push @lines, $line; }