mirror of
https://github.com/RetroDECK/io.github.shiiion.primehack.git
synced 2025-04-10 19:15:11 +00:00
Initial commit
This commit is contained in:
parent
746ea89cc4
commit
5d608a70e8
27
appdata.xml
Normal file
27
appdata.xml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<application>
|
||||||
|
<id type="desktop">dolphin-emu.desktop</id>
|
||||||
|
<name>PrimeHack</name>
|
||||||
|
<summary>Dolphin Emu fork for various Metroid Prime mods</summary>
|
||||||
|
<metadata_license>CC-BY-SA-3.0</metadata_license>
|
||||||
|
<project_license>GPL-2.0+</project_license>
|
||||||
|
<content_rating type="oars-1.0" />
|
||||||
|
<description><p>PrimeHack is a fork of Dolphin Emulator to bring modern Mouse & Keyboard controls, as well as Dual-Stick gamepad controls to the Metroid Prime Trilogy. PrimeHack also offers many other features such as increased FoV and various new cheats.</p></description>
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">https://raw.githubusercontent.com/flathub/org.DolphinEmu.dolphin-emu/master/screenshots/1.png</screenshot>
|
||||||
|
<screenshot>https://raw.githubusercontent.com/flathub/org.DolphinEmu.dolphin-emu/master/screenshots/2.png</screenshot>
|
||||||
|
<screenshot>https://raw.githubusercontent.com/flathub/org.DolphinEmu.dolphin-emu/master/screenshots/3.png</screenshot>
|
||||||
|
<screenshot>https://raw.githubusercontent.com/flathub/org.DolphinEmu.dolphin-emu/master/screenshots/4.png</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
<provides>
|
||||||
|
<binary>dolphin-emu</binary>
|
||||||
|
<id>dolphin-emu.desktop</id>
|
||||||
|
</provides>
|
||||||
|
<releases>
|
||||||
|
<release date="2022-03-22" version="1.0.5"/>
|
||||||
|
</releases>
|
||||||
|
<url type="homepage">https://github.com/shiiion/dolphin</url>
|
||||||
|
<url type="help">https://github.com/shiiion/dolphin/wiki</url>
|
||||||
|
<url type="faq">https://github.com/shiiion/dolphin/wiki/Frequently-Asked-Questions</url>
|
||||||
|
<url type="bugtracker">https://github.com/shiiion/dolphin/issues</url>
|
||||||
|
</application>
|
45
forcexdg.patch
Normal file
45
forcexdg.patch
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
|
||||||
|
index 2055c4d863..163a15f8a5 100644
|
||||||
|
--- a/Source/Core/UICommon/UICommon.cpp
|
||||||
|
+++ b/Source/Core/UICommon/UICommon.cpp
|
||||||
|
@@ -273,28 +273,11 @@ void SetUserDirectory(const std::string& custom_path)
|
||||||
|
user_path = home_path + DOLPHIN_DATA_DIR DIR_SEP;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
- // We are on a non-Apple and non-Android POSIX system, there are 4 cases:
|
||||||
|
- // 1. GetExeDirectory()/portable.txt exists
|
||||||
|
- // -> Use GetExeDirectory()/User
|
||||||
|
- // 2. $DOLPHIN_EMU_USERPATH is set
|
||||||
|
- // -> Use $DOLPHIN_EMU_USERPATH
|
||||||
|
- // 3. ~/.dolphin-emu directory exists
|
||||||
|
- // -> Use ~/.dolphin-emu
|
||||||
|
// 4. Default
|
||||||
|
// -> Use XDG basedir, see
|
||||||
|
// http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
user_path = home_path + "." DOLPHIN_DATA_DIR DIR_SEP;
|
||||||
|
std::string exe_path = File::GetExeDirectory();
|
||||||
|
- if (File::Exists(exe_path + DIR_SEP "portable.txt"))
|
||||||
|
- {
|
||||||
|
- user_path = exe_path + DIR_SEP "User" DIR_SEP;
|
||||||
|
- }
|
||||||
|
- else if (env_path)
|
||||||
|
- {
|
||||||
|
- user_path = env_path;
|
||||||
|
- }
|
||||||
|
- else if (!File::Exists(user_path))
|
||||||
|
- {
|
||||||
|
const char* data_home = getenv("XDG_DATA_HOME");
|
||||||
|
std::string data_path =
|
||||||
|
std::string(data_home && data_home[0] == '/' ? data_home :
|
||||||
|
@@ -316,11 +299,9 @@ void SetUserDirectory(const std::string& custom_path)
|
||||||
|
File::SetUserPath(D_CONFIG_IDX, config_path);
|
||||||
|
File::SetUserPath(D_CACHE_IDX, cache_path);
|
||||||
|
return;
|
||||||
|
- }
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
- File::SetUserPath(D_USER_IDX, std::move(user_path));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveWiimoteSources()
|
13
nodirtyversion.patch
Normal file
13
nodirtyversion.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 9af66009a1..2acd3bed9a 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -149,7 +149,7 @@ if(GIT_FOUND)
|
||||||
|
OUTPUT_VARIABLE DOLPHIN_WC_REVISION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# defines DOLPHIN_WC_DESCRIBE
|
||||||
|
- execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
|
||||||
|
+ execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long
|
||||||
|
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
133
org.shiiion.primehack.yml
Normal file
133
org.shiiion.primehack.yml
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
app-id: org.shiiion.primehack
|
||||||
|
branch: master
|
||||||
|
runtime: org.kde.Platform
|
||||||
|
runtime-version: 5.15-21.08
|
||||||
|
sdk: org.kde.Sdk
|
||||||
|
command: dolphin-emu-wrapper
|
||||||
|
rename-desktop-file: dolphin-emu.desktop
|
||||||
|
rename-icon: dolphin-emu
|
||||||
|
rename-appdata-file: dolphin-emu.appdata.xml
|
||||||
|
finish-args:
|
||||||
|
- --device=all
|
||||||
|
# the file picker uses portals but the set
|
||||||
|
# game directory feature still needs this
|
||||||
|
- --filesystem=host:ro
|
||||||
|
- --socket=pulseaudio
|
||||||
|
- --env=QT_QPA_PLATFORM=xcb
|
||||||
|
- --socket=x11
|
||||||
|
- --share=network
|
||||||
|
- --share=ipc
|
||||||
|
# along with the bluez module, required for the
|
||||||
|
# emulated bluetooth adapter feature to work.
|
||||||
|
- --allow=bluetooth
|
||||||
|
- --filesystem=xdg-run/app/com.discordapp.Discord:create
|
||||||
|
- --talk-name=org.freedesktop.ScreenSaver
|
||||||
|
modules:
|
||||||
|
# needed for the bluetooth passthrough feature to work
|
||||||
|
- name: libusb
|
||||||
|
config-opts:
|
||||||
|
- --disable-static
|
||||||
|
cleanup:
|
||||||
|
- /include
|
||||||
|
- /lib/*.la
|
||||||
|
- /lib/pkgconfig
|
||||||
|
sources:
|
||||||
|
- type: archive
|
||||||
|
url: https://github.com/libusb/libusb/releases/download/v1.0.25/libusb-1.0.25.tar.bz2
|
||||||
|
sha256: 8a28ef197a797ebac2702f095e81975e2b02b2eeff2774fa909c78a74ef50849
|
||||||
|
x-checker-data:
|
||||||
|
type: anitya
|
||||||
|
project-id: 1749
|
||||||
|
url-template: https://github.com/libusb/libusb/releases/download/v$version/libusb-$version.tar.bz2
|
||||||
|
|
||||||
|
# needed for the emulate bluetooth adapter feature to work
|
||||||
|
- name: bluez
|
||||||
|
config-opts:
|
||||||
|
- --enable-library
|
||||||
|
- --disable-manpages
|
||||||
|
- --disable-udev
|
||||||
|
- --disable-tools
|
||||||
|
- --disable-cups
|
||||||
|
- --disable-monitor
|
||||||
|
- --disable-client
|
||||||
|
- --disable-systemd
|
||||||
|
- --disable-a2dp
|
||||||
|
- --disable-avrcp
|
||||||
|
- --disable-network
|
||||||
|
- --with-dbusconfdir=/app/etc
|
||||||
|
- --with-dbussessionbusdir=/app/usr/lib/system-services
|
||||||
|
sources:
|
||||||
|
- type: archive
|
||||||
|
url: https://www.kernel.org/pub/linux/bluetooth/bluez-5.63.tar.xz
|
||||||
|
sha256: 9349e11e8160bb3d720835d271250d8a7424d3690f5289e6db6fe07cc66c6d76
|
||||||
|
x-checker-data:
|
||||||
|
type: anitya
|
||||||
|
project-id: 10029
|
||||||
|
url-template: https://www.kernel.org/pub/linux/bluetooth/bluez-$version.tar.xz
|
||||||
|
|
||||||
|
# enables motion controls on non-wii controllers (switch, ps4, etc)
|
||||||
|
# requires a udev rule enabling Motion Sensors access
|
||||||
|
- name: libevdev
|
||||||
|
buildsystem: meson
|
||||||
|
config-opts:
|
||||||
|
- -Dtests=disabled
|
||||||
|
- -Ddocumentation=disabled
|
||||||
|
sources:
|
||||||
|
- type: archive
|
||||||
|
url: https://www.freedesktop.org/software/libevdev/libevdev-1.12.0.tar.xz
|
||||||
|
sha256: 2f729e3480695791f9482e8388bd723402b89f0eaf118057bbdea3cecee9b237
|
||||||
|
x-checker-data:
|
||||||
|
type: anitya
|
||||||
|
project-id: 20540
|
||||||
|
url-template: https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz
|
||||||
|
|
||||||
|
# needed for screensaver inhibition
|
||||||
|
- name: xdg-screensaver-shim
|
||||||
|
buildsystem: meson
|
||||||
|
sources:
|
||||||
|
- type: archive
|
||||||
|
url: https://github.com/Unrud/xdg-screensaver-shim/archive/0.0.2.tar.gz
|
||||||
|
sha256: 0ed2a69fe6ee6cbffd2fe16f85116db737f17fb1e79bfb812d893cf15c728399
|
||||||
|
|
||||||
|
- name: dolphin-emu
|
||||||
|
buildsystem: cmake-ninja
|
||||||
|
config-opts:
|
||||||
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
- -DENABLE_ALSA=OFF
|
||||||
|
- -DENABLE_SDL=ON
|
||||||
|
- -DENABLE_EVDEV=ON
|
||||||
|
- -DDISTRIBUTOR=Flathub
|
||||||
|
build-options:
|
||||||
|
arch:
|
||||||
|
arm:
|
||||||
|
config-opts:
|
||||||
|
- -DENABLE_GENERIC=ON
|
||||||
|
cleanup:
|
||||||
|
- /share/man
|
||||||
|
post-install:
|
||||||
|
- install -D dolphin-emu-wrapper /app/bin/dolphin-emu-wrapper
|
||||||
|
- install -Dm644 appdata.xml /app/share/appdata/dolphin-emu.appdata.xml
|
||||||
|
- sed -i -e 's/"2048"/"512"/g' /app/share/icons/hicolor/scalable/apps/dolphin-emu.svg
|
||||||
|
- desktop-file-edit --set-key=Exec --set-value='/app/bin/dolphin-emu-wrapper'
|
||||||
|
/app/share/applications/dolphin-emu.desktop
|
||||||
|
sources:
|
||||||
|
- type: git
|
||||||
|
url: https://github.com/shiiion/dolphin.git
|
||||||
|
commit: 9ca0eb888bd6f8ed13a4efb92d808fbf0705ffa4
|
||||||
|
# prevents dolphin from attempting to write conf files
|
||||||
|
# in non-writable paths, typically happens when a user
|
||||||
|
# has leftover files from a previous non-flatpak install
|
||||||
|
- type: patch
|
||||||
|
path: forcexdg.patch
|
||||||
|
# version strings must match exactly for online multiplayer
|
||||||
|
- type: patch
|
||||||
|
path: nodirtyversion.patch
|
||||||
|
- type: file
|
||||||
|
path: appdata.xml
|
||||||
|
- type: script
|
||||||
|
commands:
|
||||||
|
- for i in {0..9}; do
|
||||||
|
- test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;
|
||||||
|
- done
|
||||||
|
- dolphin-emu "$@"
|
||||||
|
dest-filename: dolphin-emu-wrapper
|
Loading…
Reference in a new issue