From b473e87259075cc782c51e800a94968b8b440f63 Mon Sep 17 00:00:00 2001 From: VinnyVynce Date: Sun, 17 Jan 2021 08:18:26 -0500 Subject: [PATCH] Adding linux flatpak support --- .appveyor/Build.sh | 23 ++++++ .appveyor/Install.sh | 16 +++- .flatpak/icon.png | Bin 0 -> 14672 bytes ...o.github.opendriver2.Redriver2.appdata.xml | 17 ++++ .../io.github.opendriver2.Redriver2.desktop | 6 ++ .flatpak/start.sh | 42 ++++++++++ appveyor.yml | 5 +- io.github.opendriver.redriver2.yaml | 74 ++++++++++++++++++ 8 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 .flatpak/icon.png create mode 100644 .flatpak/io.github.opendriver2.Redriver2.appdata.xml create mode 100644 .flatpak/io.github.opendriver2.Redriver2.desktop create mode 100644 .flatpak/start.sh create mode 100644 io.github.opendriver.redriver2.yaml diff --git a/.appveyor/Build.sh b/.appveyor/Build.sh index a0e5f909..412d0bd0 100755 --- a/.appveyor/Build.sh +++ b/.appveyor/Build.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -ex +# Creating flatpak directories +mkdir -p "${APPVEYOR_BUILD_FOLDER}/.flatpak/lib" "${APPVEYOR_BUILD_FOLDER}/.flatpak/data" "${APPVEYOR_BUILD_FOLDER}/.flatpak/bin" + cd "$APPVEYOR_BUILD_FOLDER/src_rebuild" ./premake5 gmake2 @@ -9,3 +12,23 @@ for config in debug_x86 release_x86 release_dev_x86 do make config=$config -j$(nproc) done + +find ${APPVEYOR_BUILD_FOLDER}/src_rebuild/bin -name 'REDRIVER2*' -exec cp -t ${APPVEYOR_BUILD_FOLDER}/.flatpak/bin {} + + +# Copy missing libraries in the runtime +for lib in libjpeg libopenal libsndio libbsd +do + cp -Lf $(ldd "${APPVEYOR_BUILD_FOLDER}/src_rebuild/bin/Release/REDRIVER2" | awk '/ => / { print $3 }' | grep ${lib}) "${APPVEYOR_BUILD_FOLDER}/.flatpak/lib" +done + +cp -r "${APPVEYOR_BUILD_FOLDER}/data" "${APPVEYOR_BUILD_FOLDER}/.flatpak/" +cd ${APPVEYOR_BUILD_FOLDER} + +# Editing metadatas with the current version +export APPVEYOR_BUILD_DATE=$(date "+%Y-%m-%d") +sed -i -e "s/V_VERSION/$APPVEYOR_BUILD_VERSION/g" -e "s/V_DATE/$APPVEYOR_BUILD_DATE/g" .flatpak/io.github.opendriver2.Redriver2.appdata.xml + +# Build the flatpak +flatpak-builder --user --install build io.github.opendriver.redriver2.yaml --force-clean --arch=x86_64 +flatpak build-bundle ~/.local/share/flatpak/repo io.github.opendriver2.Redriver2.flatpak io.github.opendriver2.Redriver2 +rm -rf build/ .flatpak-builder/ diff --git a/.appveyor/Install.sh b/.appveyor/Install.sh index 5ae323cc..17db01ac 100755 --- a/.appveyor/Install.sh +++ b/.appveyor/Install.sh @@ -8,7 +8,7 @@ cd "$APPVEYOR_BUILD_FOLDER/src_rebuild" curl "$linux_premake_url" -Lo premake5.tar.gz tar xvf premake5.tar.gz -sudo apt-get install --no-install-recommends -y g++-multilib +sudo apt-get install --no-install-recommends -y g++-7-multilib gcc-7-multilib sudo apt-get update -qq -y sudo apt-get install -qq aptitude -y @@ -17,5 +17,17 @@ sudo apt-get install -qq aptitude -y sudo aptitude install --quiet=2 \ libsdl2-dev:i386 \ libopenal-dev:i386 \ - libjpeg-turbo8-dev:i386 -y + libjpeg-turbo8-dev:i386 \ + flatpak flatpak-builder -y +# Setting XDG_DATA_DIRS environement variable for flatpak +export XDG_DATA_DIRS="/var/lib/flatpak/exports/share:${HOME}/.local/share/flatpak/exports/share:$XDG_DATA_DIRS" + +# Adding the flathub repo +flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + +# Adding Platform/SDK for the Linux flatpak release +flatpak --user install flathub org.freedesktop.Platform/x86_64/20.08 -y +flatpak --user install flathub org.freedesktop.Sdk/x86_64/20.08 -y +flatpak --user install flathub org.freedesktop.Sdk.Compat.i386/x86_64/20.08 -y +flatpak --user install flathub org.freedesktop.Sdk.Extension.toolchain-i386/x86_64/20.08 -y diff --git a/.flatpak/icon.png b/.flatpak/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b7a5946deca40a87268ba71719a95ba2cc01dff9 GIT binary patch literal 14672 zcmZ{LWmpv7`}Y7#r*texhjd9RpeQLI-5}B+-Mt`4he$UFNOz}{ba%6KcgKIezc+HMfZ>Hd&K^CD#gKd5iy*WKiQ`9k*2N&d$^z?#sj(#h1 zT{120!DS9DE4eOS!IBO&B!!ux2Q{3iT;-`#0Ivht%FF5f@EOI=5Hp!$H)SO3%9h*J zRmV8$TK;smSUyg+og?;P&PACTR8A&O8G!%qB7z@2)Gu$TXy%;Xxq6}VroV-vPWcm) z1TUm>{99B98D1dcoQJ(EA~QEDWFVF;81JljPI@jacWGE{+U>RV=Hn$q%8}nk{u~j; zY~wGhiP2H%m&@GIF*CK0P#rC*=;^hYpbtLT3rWdGe7OvMo~p443G z+E8vf*{kvY($JIRVl#0aUFL!1VcO7^TNlOx#DWk7$0?tW`wp>iG6NxlnVqHbUx~y3 zoRvwabrfYdNQ#^p-OwLE!yhH=TSzN846h5nayuLDqXHFs7hNs)+@OO3}? z6lQ_B^$Oik|L;9TVkL$wUfysXY^my7Rh1301TXmZXZVTdg>yzf37ELXgWE|AXg-b# zi0;=B&g19`Y9};ll%=@2=Oa7*`r^MugBFtW?)z&*y0|47u3~=2Ul1-%^yU-!EQNM7 zm{P)ftN+~zU&LJ%O2u4FBL#Doh`B`)j{zR~lA`dcX>u8U#su7d_FnQ&NGA$L&CE_TL=(#J5y`be zqZRktNcv`BP5P=bUUtqpsaKR*=$qvjFWaV5gGLDwAu`%HdFR$df;qPzHFJI#;X(BP z9DIeVg0kfz31to?nj()mF=Py1kv8q7bbX74Om)tlqJpm5mY;tfOW__1nCqVnS{(Pt zVd21#AT;C7{KPWX8Oqs4{N$08Z&MErgF@xGiuvBqDu$0-X~n`171$vId8l{A6}9w! zZzawodo;9b57~29soguKTKkuq!wnM$eNFn=;yTqD;KC#G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tM%4#p8Go{f&8F<^{hOTsks-_& z%y_9PnVu@%_&UumLp!aU_xz8^5c zE&2rGa(5kM@LtJgvDf^F1&Z6pcj|VlMId8NoBrh>^PjKsXZgsj*B+e4fmeLBC5fXi zV3D54AIUREIQV*&M-Q-;3v6nM7<2G+ms7uQ#NnSpQTA{XhmuWpJ6-%s0n`1sv-=l$ zC`C}E_0s|7_y2C;MtnT^j(o3?es8xL8?gV%JT+4ymmU8@2A%_INsWo|h{o#EmHMP{ z5JP0pC@A#!=)^55712BChE-Szj&U@J@TOdL?W(*6HrjVY_pDS0|GU!BRbUL?UJpMj zuOFVH&6CxW)0aM>@?6(MCpKFqx9(JcwLHuh77uPdvPB_2j>#7YI9Za!uJCXXBA?d$ z)%7DIUgfAM2kn1vnV)K6UAdsp!JKw#p`<5!*MAu_KI_TT>8VKmM9Y@9n3U9M+yO*p z2<4og@fnKEmOtjlF&hPf^K)#L;6PqQ0SkI&S9Tsa@E4Z+|9-rE28Se{pX(*R!zN-f R4ZuzSkdgZIzEsi>_J8K7g~tE@ literal 0 HcmV?d00001 diff --git a/.flatpak/io.github.opendriver2.Redriver2.appdata.xml b/.flatpak/io.github.opendriver2.Redriver2.appdata.xml new file mode 100644 index 00000000..52950d8f --- /dev/null +++ b/.flatpak/io.github.opendriver2.Redriver2.appdata.xml @@ -0,0 +1,17 @@ + + + io.github.opendriver2.Redriver2 + MIT + MIT + REDRIVER2 + Driver 2 Playstation game reverse engineering effort + +

Driver 2 Playstation game reverse engineering effort

+
+ + Game + + + + +
diff --git a/.flatpak/io.github.opendriver2.Redriver2.desktop b/.flatpak/io.github.opendriver2.Redriver2.desktop new file mode 100644 index 00000000..3235345b --- /dev/null +++ b/.flatpak/io.github.opendriver2.Redriver2.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=REDRIVER2 +Icon= +Exec=start.sh +Categories=Game; diff --git a/.flatpak/start.sh b/.flatpak/start.sh new file mode 100644 index 00000000..d268502f --- /dev/null +++ b/.flatpak/start.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +cd /app/game/data/ +AppVersion=$(cat /app/share/appdata/io.github.opendriver2.Redriver2.appdata.xml | awk -F'"' 'NR==15 {print $2":"$4}') + +function importDefaultData { + cp -rf `ls /app/game/data/ | grep -v '^config.ini$'` /var/data/ + if [ ! -f /var/data/config.ini ]; then + echo "Config file not found, importing default config." + cp /app/game/data/config.ini /var/data/config.ini + fi + echo "$AppVersion" > /var/cache/REDRIVER2.cache +} + +if [ ! -d /var/data/DRIVER2 ]; then + zenity --error --no-wrap --text="`printf "DRIVER2 files are missing! Add the folder in:\n ${HOME}/.var/io.github.opendriver2.Redriver2/data"`" + exit 0 +fi + +if [ ! -f /var/cache/REDRIVER2.cache ]; then + echo "Cache not found, overwriting files." + importDefaultData +fi + +if [[ $(< /var/cache/REDRIVER2.cache) != "$AppVersion" ]]; then + echo "REDRIVER2 version not matching, overwriting files." + importDefaultData +fi + +args="" +while [[ "$#" -gt 0 ]]; do + args+="$1 " + shift +done + +cd /app/game/bin/ +case $REDRIVER2_BUILD in + release) ./REDRIVER2 $([ ! -z "$args" ] && echo "$args"); shift;; + dev) ./REDRIVER2_dev $([ ! -z "$args" ] && echo "$args"); shift;; + debug) ./REDRIVER2_dbg $([ ! -z "$args" ] && echo "$args"); shift;; + *) ./REDRIVER2 $([ ! -z "$args" ] && echo "$args"); # Fallback +esac diff --git a/appveyor.yml b/appveyor.yml index 0d548482..c5aa474f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ skip_tags: true image: - Visual Studio 2019 -- Ubuntu +- Ubuntu2004 environment: data_folder: '%APPVEYOR_BUILD_FOLDER%\data' @@ -48,3 +48,6 @@ artifacts: - path: src_rebuild\bin\*\*.tar.gz name: Linux Binaries + + - path: io.github.opendriver2.Redriver2.flatpak + name: Linux Flatpak diff --git a/io.github.opendriver.redriver2.yaml b/io.github.opendriver.redriver2.yaml new file mode 100644 index 00000000..2fa0acf1 --- /dev/null +++ b/io.github.opendriver.redriver2.yaml @@ -0,0 +1,74 @@ +--- +app-id: io.github.opendriver2.Redriver2 +runtime: org.freedesktop.Platform +runtime-version: '20.08' +rename-icon: 'icon' +sdk: org.freedesktop.Sdk +command: start.sh +finish-args: +- "--socket=x11" +- "--socket=wayland" +- "--share=ipc" +- "--device=all" +- "--socket=pulseaudio" +- "--persist=." +- "--allow=multiarch" +- "--env=SDL_DYNAMIC_API=/app/lib/i386-linux-gnu/libSDL2-2.0.so.0" +add-extensions: + org.freedesktop.Platform.Compat.i386: + directory: lib/i386-linux-gnu + version: '20.08' + org.freedesktop.Platform.Compat.i386.Debug: + directory: lib/debug/lib/i386-linux-gnu + version: '20.08' + no-autodownload: true + org.freedesktop.Platform.GL32: + directory: lib/i386-linux-gnu/GL + version: '20.08' + subdirectories: true + no-autodownload: true + autodelete: false + add-ld-path: lib + merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d + download-if: active-gl-driver + enable-if: active-gl-driver +sdk-extensions: +- org.freedesktop.Sdk.Compat.i386 +- org.freedesktop.Sdk.Extension.toolchain-i386 +build-options: + prepend-pkg-config-path: "/app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig" + ldflags: "-L/app/lib32" + append-path: "/usr/lib/sdk/toolchain-i386/bin" + env: + CC: i686-unknown-linux-gnu-gcc + CXX: i686-unknown-linux-gnu-g++ + libdir: "/app/lib32" +cleanup: +- "/include" +modules: +- name: ld-i386 + buildsystem: simple + build-commands: + - mkdir -p /app/lib/i386-linux-gnu /app/lib/debug/lib/i386-linux-gnu + - install -Dm644 -t /app/etc ld.so.conf + sources: + - type: shell + commands: + - echo "/app/lib32" > ld.so.conf +- name: game + buildsystem: simple + build-commands: + - mkdir -p /app/game/bin /app/game/data /app/bin /app/lib /app/share/applications/ /app/share/appdata /var/data/DRIVER2/ /app/share/icons/hicolor/256x256/apps + - install start.sh /app/bin/ + - install bin/* /app/game/bin + - cp -r data/* /app/game/data + - install lib/* /app/lib/ + - install io.github.opendriver2.Redriver2.desktop /app/share/applications/ + - install -m644 io.github.opendriver2.Redriver2.appdata.xml /app/share/appdata/ + - install icon.png /app/share/icons/hicolor/256x256/apps/ + - chmod a+x -R /app/game/bin + - ln -s /var/data/config.ini /app/game/bin/config.ini + - ln -s /var/data/DRIVER2 /app/game/bin/DRIVER2 + sources: + - type: dir + path: .flatpak