Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ add_subdirectory(Source)
# Install shared data files
#
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN)
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/Sys PATTERN)
install(DIRECTORY Data/user/ DESTINATION ${datadir}/user PATTERN)
endif()
if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD|Darwin")
Expand Down
18 changes: 11 additions & 7 deletions Distribution/flatpak/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ modules:

- name: project-plus-dolphin
buildsystem: cmake-ninja
# Build out of tree; an in-source build writes CMake files into the submodule checkouts,
# which makes `git describe --dirty` add "-dirty" to the version string.
# Note: commands below (post-install) run from the _flatpak_build subdirectory.
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DENABLE_ALSA=OFF
Expand Down Expand Up @@ -156,15 +160,15 @@ modules:
# dest-filename: project-plus-dolphin-wrapper
post-install:
- |
- install -D -t ${FLATPAK_DEST}/bin/ project-plus-dolphin-wrapper.sh
- install -D -t ${FLATPAK_DEST}/bin/ ../project-plus-dolphin-wrapper.sh
- desktop-file-edit --set-key=Exec --set-value='/app/bin/project-plus-dolphin-wrapper.sh'
/app/share/applications/project-plus-dolphin.desktop
- desktop-file-edit --set-key=Name --set-value='Project Plus Dolphin'
/app/share/applications/project-plus-dolphin.desktop
- rm -r ${FLATPAK_DEST}/share/project-plus-dolphin/sys # Remove preinstalled sys directory
- 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
- rm -r ${FLATPAK_DEST}/share/project-plus-dolphin/Sys # Remove preinstalled Sys directory
- 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
#- tar --transform="s|sd.raw|WiiSD.raw|" -xf sd.tar.gz -C ${FLATPAK_DEST}/share/project-plus-dolphin/user/Wii/ # Extract, rename and move SD card to correct location
#- mv Launcher ${FLATPAK_DEST}/share/project-plus-dolphin/sys/Wii/ # Move Launcher directory to correct location
#- mkdir -p ${FLATPAK_DEST}/share/project-plus-dolphin/sys/Load/Textures # Make directory for HD textures
#- mv "ModPack/Full Quality HD Textures" ${FLATPAK_DEST}/share/project-plus-dolphin/sys/Load/Textures/RSBE01/ # Move HD Textures from ModPack to correct location
- install -Dm644 org.projectplusgame.project-plus-dolphin.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/ # Install metainfo file
#- mv Launcher ${FLATPAK_DEST}/share/project-plus-dolphin/Sys/Wii/ # Move Launcher directory to correct location
#- mkdir -p ${FLATPAK_DEST}/share/project-plus-dolphin/Sys/Load/Textures # Make directory for HD textures
#- mv "ModPack/Full Quality HD Textures" ${FLATPAK_DEST}/share/project-plus-dolphin/Sys/Load/Textures/RSBE01/ # Move HD Textures from ModPack to correct location
- install -Dm644 ../org.projectplusgame.project-plus-dolphin.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/ # Install metainfo file
10 changes: 5 additions & 5 deletions Distribution/flatpak/project-plus-dolphin-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo "Make directory /var/config/project-plus-dolphin if it doesn't exist"
mkdir -p /var/config/project-plus-dolphin

# Create and set variables for the system and user SD card creation dates
# SystemSDCardCreationDate=`stat --format="%W" /app/share/project-plus-dolphin/sys/Load/WiiSD.raw`
# SystemSDCardCreationDate=`stat --format="%W" /app/share/project-plus-dolphin/Sys/Load/WiiSD.raw`
# UserSDCardCreationDate=`stat --format="%W" /var/data/project-plus-dolphin/Load/WiiSD.raw`

# echo "Check if there is a newer SD card version"
Expand All @@ -23,19 +23,19 @@ mkdir -p /var/config/project-plus-dolphin
# mkdir -p /var/data/project-plus-dolphin/Load

# echo "Copy newer SD card to user data directory"
# cp /app/share/project-plus-dolphin/sys/Load/WiiSD.raw /var/data/project-plus-dolphin/Load/WiiSD.raw
# cp /app/share/project-plus-dolphin/Sys/Load/WiiSD.raw /var/data/project-plus-dolphin/Load/WiiSD.raw
# else
# echo "SD card is already at latest version"
# fi

echo "Copy dol files to user data directory if they don't already exist"
cp -nr /app/share/project-plus-dolphin/sys/Wii/Launcher /var/data/project-plus-dolphin/user/Wii/
cp -nr /app/share/project-plus-dolphin/Sys/Wii/Launcher /var/data/project-plus-dolphin/user/Wii/

echo "Copy user directory to Flatpak user data directory (Overwritting any files already there with any newer files)"
cp -ru /app/share/project-plus-dolphin/user /var/data/project-plus-dolphin/

# Create and set variables for the system and user HD textures creation dates
SystemHDTexturesCreationDate=`stat --format="%W" /app/share/project-plus-dolphin/sys/Load/Textures/RSBE01`
SystemHDTexturesCreationDate=`stat --format="%W" /app/share/project-plus-dolphin/Sys/Load/Textures/RSBE01`
UserHDTexturesCreationDate=`stat --format="%W" /var/data/project-plus-dolphin/user/Load/Textures/RSBE01`

echo "Check if there are newer HD textures"
Expand All @@ -45,7 +45,7 @@ then
mkdir -p /var/data/project-plus-dolphin/Load/Textures

echo "Copy newer HD textures to user data directory"
cp -r /app/share/project-plus-dolphin/sys/Load/Textures/RSBE01 /var/data/project-plus-dolphin/user/Load/Textures
cp -r /app/share/project-plus-dolphin/Sys/Load/Textures/RSBE01 /var/data/project-plus-dolphin/user/Load/Textures
else
echo "HD textures are already at latest version"
fi
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Common/FileUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,8 @@ static std::string CreateSysDirectoryPath()
const std::string local_sys_directory = GetExeDirectory() + DIR_SEP SYS_FOLDER_NAME DIR_SEP;
if (IsDirectory(local_sys_directory))
sys_directory = local_sys_directory;
else if (!IsDirectory(SYSDATA_DIR) && IsDirectory(DATA_DIR "sys"))
sys_directory = DATA_DIR "sys" DIR_SEP; // Installs packaged before the Sys rename
else
sys_directory = SYSDATA_DIR DIR_SEP;

Expand Down
6 changes: 5 additions & 1 deletion Source/Core/Core/WiiRoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,11 @@ void InitializeWiiRoot(bool use_temporary)
MoveToBackupIfExists(s_temp_redirect_root);

File::SetUserPath(D_SESSION_WIIROOT_IDX, s_temp_wii_root);
File::Copy(File::GetSysDirectory() + NETPLAY_SAVE_DIR, s_temp_wii_root);
const std::string netplay_save_dir = File::GetSysDirectory() + NETPLAY_SAVE_DIR;
if (!File::IsDirectory(netplay_save_dir))
ERROR_LOG_FMT(IOS_FS, "NetPlay save directory {} is missing", netplay_save_dir);
else if (!File::Copy(netplay_save_dir, s_temp_wii_root))
ERROR_LOG_FMT(IOS_FS, "Failed to copy NetPlay save from {}", netplay_save_dir);
}
else
{
Expand Down
Loading