Skip to content

Commit 0ae4fd5

Browse files
committed
Flatpak builder updates
1 parent a1895ce commit 0ae4fd5

File tree

5 files changed

+156
-9
lines changed

5 files changed

+156
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
- name: Run Flatpak Builder
193193
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
194194
with:
195-
manifest-path: Distribution/flatpak.yml
195+
manifest-path: Distribution/flatpak/flatpak.yml
196196
bundle: Project-Plus-Dolphin-${{ env.DOLPHINVER }}.flatpak
197197

198198
build_appimage:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>com.projectplusgame.project-plus-dolphin</id>
4+
<name>Project Plus Dolphin</name>
5+
<summary>GameCube / Wii / Triforce Emulator for Project Plus</summary>
6+
<metadata_license>CC-BY-SA-3.0</metadata_license>
7+
<project_license>GPL-2.0+</project_license>
8+
<supports>
9+
<control>pointing</control>
10+
<control>keyboard</control>
11+
<control>gamepad</control>
12+
</supports>
13+
<description>
14+
<p>
15+
A fork of the Dolphin emulator for playing the Brawl mod Project Plus.
16+
</p>
17+
</description>
18+
<provides>
19+
<binary>dolphin-emu</binary>
20+
<id>com.projectplusgame.project-plus-dolphin.desktop</id>
21+
</provides>
22+
<releases>
23+
<release version="3.1.2" date="2025-05-02"/>
24+
<release version="3.1.1" date="2025-05-02"/>
25+
<release version="3.1.0" date="2025-04-23"/>
26+
<release version="3.0.5" date="2024-09-23"/>
27+
<release version="3.0.2" date="2024-06-27"/>
28+
<release version="3.0.1" date="2024-06-24"/>
29+
<release version="3.0" date="2024-06-24"/>
30+
<release version="2.5.2" date="2024-06-15"/>
31+
</releases>
32+
<launchable type="desktop-id">com.projectplusgame.project-plus-dolphin.desktop</launchable>
33+
</component>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/Data/user/Config/Dolphin.ini b/Data/user/Config/Dolphin.ini
2+
index 63b33be4b3..945bda7667 100644
3+
--- a/Data/user/Config/Dolphin.ini
4+
+++ b/Data/user/Config/Dolphin.ini
5+
@@ -1,10 +1,9 @@
6+
[General]
7+
-ISOPaths = 2
8+
+ISOPaths = 1
9+
RecursiveISOPaths = False
10+
-WiiSDCardPath = ./user/Wii/sd.raw
11+
-WiiSDCardSyncFolder = ./user/Load/WiiSDSync/
12+
-ISOPath0 = ./Launcher
13+
-ISOPath1 = ./Games
14+
+WiiSDCardPath = /var/data/project-plus-dolphin/Load/WiiSD.raw
15+
+WiiSDCardSyncFolder = /var/data/project-plus-dolphin/Load/WiiSDSync/
16+
+ISOPath0 = /var/data/project-plus-dolphin/Wii/Launcher
17+
[NetPlay]
18+
SelectedHostGame = Project+ Netplay Launcher.dol
19+
TraversalChoice = traversal
20+
\ No newline at end of file
Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
app-id: org.DolphinEmu.project-plus-dolphin
1+
app-id: org.projectplusgame.project-plus-dolphin
22
branch: master
33
runtime: org.kde.Platform
44
runtime-version: 6.6
55
sdk: org.kde.Sdk
6-
command: project-plus-dolphin-wrapper
6+
command: project-plus-dolphin-wrapper.sh
77
rename-desktop-file: project-plus-dolphin.desktop
88
rename-icon: project-plus-dolphin
99
finish-args:
@@ -107,15 +107,41 @@ modules:
107107
- -DCPACK_PACKAGE_CONTACT=Project Plus Development Team
108108
cleanup:
109109
- /share/man
110-
post-install:
111-
- install -D -t ${FLATPAK_DEST}/bin/ project-plus-dolphin-wrapper
112-
- desktop-file-edit --set-key=Exec --set-value='/app/bin/project-plus-dolphin-wrapper'
113-
/app/share/applications/project-plus-dolphin.desktop
114-
- desktop-file-edit --set-key=Name --set-value='Project Plus Dolphin'
115-
/app/share/applications/project-plus-dolphin.desktop
116110
sources:
117111
- type: git
118112
url: https://github.com/Motobug/Project-Plus-Dolphin.git
113+
114+
# Patches Data/user/Config/Dolphin.ini to set proper paths for Flatpak to find stuff
115+
- type: patch
116+
path: Distribution/flatpak/dolphinini.patch
117+
118+
# TODO: Add x-checker-data
119+
# Project Plus SD card
120+
#- type: file
121+
# url: https://github.com/jlambert360/FPM-AppImage/releases/download/v3.1.2/sd.tar.gz
122+
# sha256: 389e4025ed3e0a79a1d0646dcc97bbd204fdfad371be72f913f59aa172f531fd # This is the hash of the tar.gz file not the uncompressed
123+
124+
# TODO: Add x-checker-data
125+
# Project Plus .dol files and icon
126+
- type: archive
127+
url: https://github.com/jlambert360/FPM-AppImage/releases/download/v3.1.2/Launcher.tar.gz
128+
sha256: 1b9dce2fb0eac3ad8cc809826b3b6bfd4ce30dbfc394eaa586e35dcd356fd189 # This is the hash of the tar.gz file not the uncompressed
129+
dest: Launcher
130+
131+
# TODO: Add x-checker-data
132+
# Project Plus ModPack that contains HD textures
133+
- type: archive
134+
url: https://github.com/jlambert360/PPlusReleases/releases/download/v3.1.2/Project+.v3.1.2.Modders.Pack.zip
135+
sha256: 291549549a88617f8f72cf549023da9af154493b75da7a8192245ed98c101ba3 # This is the hash of the zip file not the uncompressed
136+
dest: ModPack
137+
138+
# Script that is ran everytime the final Flatpak starts
139+
- type: file
140+
path: Distribution/flatpak/project-plus-dolphin-wrapper.sh
141+
142+
# Metadata file for Flatpak repos
143+
- type: file
144+
path: Distribution/flatpak/com.projectplusgame.project-plus-dolphin.metainfo.xml
119145

120146
# detects whether dolphin is running in a flatpak sandbox
121147
# and makes it use xdg directories if it is.
@@ -131,3 +157,17 @@ modules:
131157
done
132158
project-plus-dolphin "$@"
133159
dest-filename: project-plus-dolphin-wrapper
160+
post-install:
161+
- |
162+
- install -D -t ${FLATPAK_DEST}/bin/ project-plus-dolphin-wrapper
163+
- desktop-file-edit --set-key=Exec --set-value='/app/bin/project-plus-dolphin-wrapper'
164+
/app/share/applications/project-plus-dolphin.desktop
165+
- desktop-file-edit --set-key=Name --set-value='Project Plus Dolphin'
166+
/app/share/applications/project-plus-dolphin.desktop
167+
- rm -r ${FLATPAK_DEST}/share/project-plus-dolphin/sys # Remove preinstalled sys directory
168+
- mv Data/Sys ${FLATPAK_DEST}/share/project-plus-dolphin/sys/ # Move Sys directory to correct location (only use without the -DLINUX_LOCAL_DEV=true flag set)
169+
#- tar --transform="s|sd.raw|WiiSD.raw|" -xf sd.tar.gz -C ${FLATPAK_DEST}/share/project-plus-dolphin/sys/Load/ # Extract, rename and move SD card to correct location
170+
- mv Launcher ${FLATPAK_DEST}/share/dolphin-emu/sys/Wii/ # Move Launcher directory to correct location
171+
- mkdir -p ${FLATPAK_DEST}/share/dolphin-emu/sys/Load/Textures # Make directory for HD textures
172+
- mv "ModPack/Full Quality HD Textures" ${FLATPAK_DEST}/share/dolphin-emu/sys/Load/Textures/RSBE01/ # Move HD Textures from ModPack to correct location
173+
- install -Dm644 com.projectplusgame.project-plus-dolphin.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/ # Install metainfo file
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/sh
2+
3+
echo "Setup Discord rich presence"
4+
for i in {0..9}; do
5+
test -S $XDG_RUNTIME_DIR/discord-ipc-$i ||
6+
ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;
7+
done
8+
9+
echo "Make directory /var/data/project-plus-dolphin/Wii if it doesn't exist"
10+
mkdir -p /var/data/project-plus-dolphin/Wii
11+
12+
echo "Make directory /var/config/project-plus-dolphin if it doesn't exist"
13+
mkdir -p /var/config/project-plus-dolphin
14+
15+
# Create and set variables for the system and user SD card creation dates
16+
# SystemSDCardCreationDate=`stat --format="%W" /app/share/project-plus-dolphin/sys/Load/WiiSD.raw`
17+
# UserSDCardCreationDate=`stat --format="%W" /var/data/project-plus-dolphin/Load/WiiSD.raw`
18+
19+
# echo "Check if there is a newer SD card version"
20+
# if [ $SystemSDCardCreationDate -gt ${UserSDCardCreationDate:=0} ];
21+
# then
22+
# echo "Make directory /var/data/project-plus-dolphin/Load if it doesn't exist"
23+
# mkdir -p /var/data/project-plus-dolphin/Load
24+
25+
# echo "Copy newer SD card to user data directory"
26+
# cp /app/share/project-plus-dolphin/sys/Load/WiiSD.raw /var/data/project-plus-dolphin/Load/WiiSD.raw
27+
# else
28+
# echo "SD card is already at latest version"
29+
# fi
30+
31+
echo "Copy dol files to user data directory if they don't already exist"
32+
cp -nr /app/share/project-plus-dolphin/sys/Wii/Launcher /var/data/project-plus-dolphin/Wii/
33+
34+
echo "Copy user directory to Flatpak user data directory (Overwritting any files already there with any newer files)"
35+
cp -ru /app/share/project-plus-dolphin/user /var/data/project-plus-dolphin/
36+
37+
# Create and set variables for the system and user HD textures creation dates
38+
SystemHDTexturesCreationDate=`stat --format="%W" /app/share/project-plus-dolphin/sys/Load/Textures/RSBE01`
39+
UserHDTexturesCreationDate=`stat --format="%W" /var/data/project-plus-dolphin/Load/Textures/RSBE01`
40+
41+
echo "Check if there are newer HD textures"
42+
if [ $SystemHDTexturesCreationDate -gt ${UserHDTexturesCreationDate:=0} ];
43+
then
44+
echo "Make directory /var/data/project-plus-dolphin/Load/Textures if it doesn't exist"
45+
mkdir -p /var/data/project-plus-dolphin/Load/Textures
46+
47+
echo "Copy newer HD textures to user data directory"
48+
cp -r /app/share/project-plus-dolphin/sys/Load/Textures/RSBE01 /var/data/project-plus-dolphin/Load/Textures
49+
else
50+
echo "HD textures are already at latest version"
51+
fi
52+
53+
# Launch Dolphin and point it to the user directory
54+
project-plus-dolphin -u /var/data/project-plus-dolphin/user "$@"

0 commit comments

Comments
 (0)