Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaposfos13 committed Nov 14, 2024
2 parents a657e22 + 7be35c3 commit e215530
Show file tree
Hide file tree
Showing 61 changed files with 2,085 additions and 595 deletions.
4 changes: 2 additions & 2 deletions .github/linux-appimage-qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh

cp -a "$GITHUB_WORKSPACE/build/translations" AppDir/usr/bin

./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --plugin qt
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --plugin qt
rm AppDir/usr/plugins/multimedia/libgstreamermediaplugin.so
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
mv Shadps4-x86_64.AppImage Shadps4-qt.AppImage
mv shadPS4-x86_64.AppImage Shadps4-qt.AppImage
4 changes: 2 additions & 2 deletions .github/linux-appimage-sdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
# Build AppImage
./linuxdeploy-x86_64.AppImage --appdir AppDir
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --output appimage
mv Shadps4-x86_64.AppImage Shadps4-sdl.AppImage
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --output appimage
mv shadPS4-x86_64.AppImage Shadps4-sdl.AppImage
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
arch: amd64

- name: Configure CMake
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
Expand All @@ -162,7 +162,7 @@ jobs:
path: upload/

macos-sdl:
runs-on: macos-latest
runs-on: macos-15
needs: get-info
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
path: shadps4-macos-sdl.tar.gz

macos-qt:
runs-on: macos-latest
runs-on: macos-15
needs: get-info
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:
variant: sccache

- name: Configure CMake
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}

- name: Configure CMake
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel3
Expand Down
28 changes: 22 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ endif()

option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
option(ENABLE_DISCORD_RPC "Enable the Discord RPC integration" ON)
option(ENABLE_UPDATER "Enables the options to updater" ON)

# First, determine whether to use CMAKE_OSX_ARCHITECTURES or CMAKE_SYSTEM_PROCESSOR.
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
Expand Down Expand Up @@ -365,6 +366,10 @@ set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp
src/core/libraries/videodec/videodec2.cpp
src/core/libraries/videodec/videodec2.h
src/core/libraries/videodec/videodec2_avc.h
src/core/libraries/videodec/videodec.cpp
src/core/libraries/videodec/videodec.h
src/core/libraries/videodec/videodec_impl.cpp
src/core/libraries/videodec/videodec_impl.h
)

set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
Expand Down Expand Up @@ -732,15 +737,19 @@ set(EMULATOR src/emulator.cpp
if(ENABLE_QT_GUI)
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)

if (ENABLE_UPDATER)
set(UPDATER src/qt_gui/check_update.cpp
src/qt_gui/check_update.h
)
endif()

set(QT_GUI src/qt_gui/about_dialog.cpp
src/qt_gui/about_dialog.h
src/qt_gui/about_dialog.ui
src/qt_gui/background_music_player.cpp
src/qt_gui/background_music_player.h
src/qt_gui/cheats_patches.cpp
src/qt_gui/cheats_patches.h
src/qt_gui/check_update.cpp
src/qt_gui/check_update.h
src/qt_gui/main_window_ui.h
src/qt_gui/main_window.cpp
src/qt_gui/main_window.h
Expand Down Expand Up @@ -771,6 +780,7 @@ set(QT_GUI src/qt_gui/about_dialog.cpp
${EMULATOR}
${RESOURCE_FILES}
${TRANSLATIONS}
${UPDATER}
)
endif()

Expand Down Expand Up @@ -843,8 +853,11 @@ else()
endif()

if (ENABLE_QT_GUI)
target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network Qt6::Multimedia)
add_definitions(-DENABLE_QT_GUI)
target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network Qt6::Multimedia)
add_definitions(-DENABLE_QT_GUI)
if (ENABLE_UPDATER)
add_definitions(-DENABLE_UPDATER)
endif()
endif()

if (WIN32)
Expand Down Expand Up @@ -930,6 +943,9 @@ endif()
install(TARGETS shadps4 BUNDLE DESTINATION .)

if (ENABLE_QT_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(FILES ".github/shadps4.desktop" DESTINATION "share/applications")
install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps")
install(FILES "dist/net.shadps4.shadPS4.desktop" DESTINATION "share/applications")
install(FILES "dist/net.shadps4.shadPS4.releases.xml" DESTINATION "share/metainfo/releases")
install(FILES "dist/net.shadps4.shadPS4.metainfo.xml" DESTINATION "share/metainfo")
install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps" RENAME "net.shadps4.shadPS4.png")
install(FILES "src/images/net.shadps4.shadPS4.svg" DESTINATION "share/icons/hicolor/scalable/apps")
endif()
6 changes: 5 additions & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ path = [
"REUSE.toml",
"CMakeSettings.json",
".github/FUNDING.yml",
".github/shadps4.desktop",
".github/shadps4.png",
".gitmodules",
"dist/net.shadps4.shadPS4.desktop",
"dist/net.shadps4.shadPS4_metadata.pot",
"dist/net.shadps4.shadPS4.metainfo.xml",
"dist/net.shadps4.shadPS4.releases.xml",
"documents/changelog.txt",
"documents/Quickstart/2.png",
"documents/Screenshots/*",
Expand Down Expand Up @@ -35,6 +38,7 @@ path = [
"src/images/stop_icon.png",
"src/images/shadPS4.icns",
"src/images/shadps4.ico",
"src/images/net.shadps4.shadPS4.svg",
"src/images/themes_icon.png",
"src/images/update_icon.png",
"src/shadps4.qrc",
Expand Down
6 changes: 3 additions & 3 deletions .github/shadps4.desktop → dist/net.shadps4.shadPS4.desktop
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[Desktop Entry]
Name=Shadps4
Name=shadPS4
Exec=shadps4
Terminal=false
Type=Application
Icon=shadps4
Comment=shadps4 emulator
Icon=net.shadps4.shadPS4
Comment=PlayStation 4 emulator
Categories=Game;
StartupWMClass=shadps4;
63 changes: 63 additions & 0 deletions dist/net.shadps4.shadPS4.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id translate="no">net.shadps4.shadPS4</id>
<name translate="no">shadPS4</name>
<developer id="net.shadps4.shadPS4">
<name>shadPS4 Contributors</name>
<url translate="no">https://github.com/shadps4-emu/shadps4/graphs/contributors</url>
</developer>
<summary>PS4 Emulator</summary>
<metadata_license translate="no">CC0-1.0</metadata_license>
<project_license translate="no">GPL-2.0</project_license>
<launchable type="desktop-id" translate="no">net.shadps4.shadPS4.desktop</launchable>
<url type="homepage" translate="no">https://shadps4.net/</url>
<description>
<p>shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++.</p>
<p>The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games.</p>
</description>
<screenshots>
<screenshot type="default">
<image type="source" translate="no" >https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/1.png</image>
<caption>Bloodborne</caption>
</screenshot>
<screenshot>
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/2.png</image>
<caption>Hatsune Miku: Project DIVA Future Tone</caption>
</screenshot>
<screenshot>
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/3.png</image>
<caption>Yakuza Kiwami</caption>
</screenshot>
<screenshot>
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/4.png</image>
<caption>Persona 4 Golden</caption>
</screenshot>
</screenshots>
<categories>
<category translate="no">Game</category>
</categories>
<releases type="external" url="https://cdn.jsdelivr.net/gh/fpiesche/flatpak-builds/apps/net.shadps4.shadPS4/net.shadps4.shadPS4.releases.xml">
<release version="v.0.4.0" date="2024-11-03">
<description></description>
</release>
</releases>
<content_rating type="oars-1.1"/>
<supports>
<control translate="no">keyboard</control>
</supports>
<recommends>
<control translate="no">gamepad</control>
</recommends>
<requires>
<internet translate="no">offline-only</internet>
</requires>
<provides>
<binary translate="no">shadps4</binary>
</provides>
<keywords>
<keyword>emulator</keyword>
<keyword>emulation</keyword>
<keyword translate="no">playstation</keyword>
<keyword translate="no">ps4</keyword>
</keywords>
</component>
23 changes: 23 additions & 0 deletions dist/net.shadps4.shadPS4.releases.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<releases>
<release version="0.4.0" date="2024-10-31">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.4.0</url>
</release>
<release version="0.3.0" date="2024-09-23">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.3.0</url>
</release>
<release version="0.2.0" date="2024-08-15">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.2.0</url>
</release>
<release version="0.1.0" date="2024-07-01">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/0.1.0</url>
</release>
<release version="0.0.3" date="2024-03-23">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.3</url>
</release>
<release version="0.0.2" date="2023-10-21">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.2</url>
</release>
<release version="0.0.1" date="2024-09-29">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.1</url>
</release>
</releases>
65 changes: 65 additions & 0 deletions dist/net.shadps4.shadPS4_metadata.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-11-08 09:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. (itstool) path: component/name
#: ./net.shadps4.shadPS4.metainfo.xml:4
msgid "shadPS4"
msgstr ""

#. (itstool) path: developer/name
#: ./net.shadps4.shadPS4.metainfo.xml:6
msgid "shadPS4 Contributors"
msgstr ""

#. (itstool) path: component/summary
#: ./net.shadps4.shadPS4.metainfo.xml:9
msgid "PS4 Emulator"
msgstr ""

#. (itstool) path: description/p
#: ./net.shadps4.shadPS4.metainfo.xml:16
msgid "shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++."
msgstr ""

#. (itstool) path: description/p
#: ./net.shadps4.shadPS4.metainfo.xml:17
msgid "The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games."
msgstr ""

#. (itstool) path: screenshot/caption
#: ./net.shadps4.shadPS4.metainfo.xml:22
msgid "Bloodborne"
msgstr ""

#. (itstool) path: screenshot/caption
#: ./net.shadps4.shadPS4.metainfo.xml:26
msgid "Hatsune Miku: Project DIVA Future Tone"
msgstr ""

#. (itstool) path: screenshot/caption
#: ./net.shadps4.shadPS4.metainfo.xml:30
msgid "Yakuza Kiwami"
msgstr ""

#. (itstool) path: screenshot/caption
#: ./net.shadps4.shadPS4.metainfo.xml:34
msgid "Persona 4 Golden"
msgstr ""

#. (itstool) path: keywords/keyword
#: ./net.shadps4.shadPS4.metainfo.xml:59
msgid "emulator"
msgstr ""

#. (itstool) path: keywords/keyword
#: ./net.shadps4.shadPS4.metainfo.xml:60
msgid "emulation"
msgstr ""
2 changes: 1 addition & 1 deletion src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ void save(const std::filesystem::path& path) {
// TODO Migration code, after a major release this should be removed.
data.at("GUI").as_table().erase("installDir");

std::ofstream file(path, std::ios::out);
std::ofstream file(path, std::ios::binary);
file << data;
file.close();
}
Expand Down
1 change: 1 addition & 0 deletions src/common/logging/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
SUB(Lib, SharePlay) \
SUB(Lib, Fiber) \
SUB(Lib, Vdec2) \
SUB(Lib, Videodec) \
CLS(Frontend) \
CLS(Render) \
SUB(Render, Vulkan) \
Expand Down
1 change: 1 addition & 0 deletions src/common/logging/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ enum class Class : u8 {
Lib_SharePlay, ///< The LibSceSharePlay implemenation
Lib_Fiber, ///< The LibSceFiber implementation.
Lib_Vdec2, ///< The LibSceVideodec2 implementation.
Lib_Videodec, ///< The LibSceVideodec implementation.
Frontend, ///< Emulator UI
Render, ///< Video Core
Render_Vulkan, ///< Vulkan backend
Expand Down
Loading

0 comments on commit e215530

Please sign in to comment.