Skip to content

Commit

Permalink
Remove libretro core - core will now be maintained by libretro
Browse files Browse the repository at this point in the history
libretro have agreed to take over maintenance of the core.

Please see their fork at https://github.com/libretro/duckstation if you
wish to continue to use it.
  • Loading branch information
stenzek committed Jan 7, 2021
1 parent 573c837 commit 419726f
Show file tree
Hide file tree
Showing 42 changed files with 107 additions and 8,064 deletions.
197 changes: 35 additions & 162 deletions .github/workflows/rolling-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
del /Q bin\x64\*.iobj
del /Q bin\x64\*.ipdb
del /Q bin\x64\common-tests*
del /Q bin\x64\duckstation-libretro-*
rename bin\x64\updater-x64-ReleaseLTCG.exe updater.exe
- name: Create x64 release archive
Expand All @@ -76,6 +75,35 @@ jobs:
name: "windows"
path: "duckstation-windows-x64-release.zip"


windows-arm64-build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
submodules: true

- name: Tag as preview build
if: github.ref == 'refs/heads/master'
shell: cmd
run: |
echo #pragma once > src/scmversion/tag.h
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
- name: Tag as dev build
if: github.ref == 'refs/heads/dev'
shell: cmd
run: |
echo #pragma once > src/scmversion/tag.h
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
- name: Compile arm64 release build
shell: cmd
run: |
Expand All @@ -91,7 +119,6 @@ jobs:
del /Q bin\ARM64\*.iobj
del /Q bin\ARM64\*.ipdb
del /Q bin\ARM64\common-tests*
del /Q bin\ARM64\duckstation-libretro-*
rename bin\ARM64\updater-ARM64-ReleaseLTCG.exe updater.exe
- name: Create arm64 release archive
Expand All @@ -102,39 +129,10 @@ jobs:
- name: Upload arm64 release artifact
uses: actions/upload-artifact@v1
with:
name: "windows"
name: "windows-arm64"
path: "duckstation-windows-arm64-release.zip"


windows-libretro-build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0

- name: Compile release build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DCMAKE_C_COMPILER:FILEPATH="%VCToolsInstallDir%\bin\HostX64\x64\cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="%VCToolsInstallDir%\bin\HostX64\x64\cl.exe" ..
ninja
- name: Create libretro core archive
shell: cmd
run: |
cd build
"C:\Program Files\7-Zip\7z.exe" a -r duckstation_libretro.dll.zip ./duckstation_libretro.dll
- name: Upload release artifact
uses: actions/upload-artifact@v1
with:
name: "windows-libretro-x64"
path: "build/duckstation_libretro.dll.zip"


linux-build:
runs-on: ubuntu-18.04
steps:
Expand Down Expand Up @@ -182,95 +180,6 @@ jobs:
path: "build/duckstation-qt-x64.AppImage.zsync"


linux-libretro-build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0

- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- name: Compile and zip Linux x64 libretro core
shell: bash
run: |
mkdir build-libretro-linux-x64
cd build-libretro-linux-x64
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON ..
cmake --build . --parallel 2
zip -j duckstation_libretro_x64.so.zip duckstation_libretro.so
- name: Upload Linux x64 libretro core
uses: actions/upload-artifact@v1
with:
name: "linux-libretro"
path: "build-libretro-linux-x64/duckstation_libretro_x64.so.zip"

- name: Compile and zip Linux armv7 libretro core
shell: bash
run: |
mkdir build-libretro-linux-armv7
cd build-libretro-linux-armv7
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/armv7-cross-toolchain.cmake ..
cmake --build . --parallel 2
zip -j duckstation_libretro_linux_armv7.so.zip duckstation_libretro.so
- name: Upload Linux AArch64 libretro core
uses: actions/upload-artifact@v1
with:
name: "linux-libretro"
path: "build-libretro-linux-armv7/duckstation_libretro_linux_armv7.so.zip"

- name: Compile and zip Linux AArch64 libretro core
shell: bash
run: |
mkdir build-libretro-linux-aarch64
cd build-libretro-linux-aarch64
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/aarch64-cross-toolchain.cmake ..
cmake --build . --parallel 2
zip -j duckstation_libretro_linux_aarch64.so.zip duckstation_libretro.so
- name: Upload Linux AArch64 libretro core
uses: actions/upload-artifact@v1
with:
name: "linux-libretro"
path: "build-libretro-linux-aarch64/duckstation_libretro_linux_aarch64.so.zip"

- name: Compile and zip Android armv7 libretro core
shell: bash
run: |
mkdir build-libretro-android-armv7
cd build-libretro-android-armv7
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=ON -DCMAKE_TOOLCHAIN_FILE=${ANDROID_SDK_ROOT}/ndk-bundle/build/cmake/android.toolchain.cmake ..
cmake --build . --parallel 2
zip -j duckstation_libretro_android_armv7.so.zip duckstation_libretro_android.so
- name: Upload Android armv7 libretro core
uses: actions/upload-artifact@v1
with:
name: "linux-libretro"
path: "build-libretro-android-armv7/duckstation_libretro_android_armv7.so.zip"

- name: Compile and zip Android AArch64 libretro core
shell: bash
run: |
mkdir build-libretro-android-aarch64
cd build-libretro-android-aarch64
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE=${ANDROID_SDK_ROOT}/ndk-bundle/build/cmake/android.toolchain.cmake ..
cmake --build . --parallel 2
zip -j duckstation_libretro_android_aarch64.so.zip duckstation_libretro_android.so
- name: Upload Android AArch64 libretro core
uses: actions/upload-artifact@v1
with:
name: "linux-libretro"
path: "build-libretro-android-aarch64/duckstation_libretro_android_aarch64.so.zip"


android-build:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -342,25 +251,9 @@ jobs:
name: "macos-x64"
path: "build/bin/duckstation-mac-release.zip"

- name: Compile libretro core and zip
shell: bash
run: |
mkdir build-libretro
cd build-libretro
export MACOSX_DEPLOYMENT_TARGET=10.14
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON ..
cmake --build . --parallel 2
zip -j duckstation_libretro_mac.dylib.zip duckstation_libretro.dylib
- name: Upload macOS libretro core
uses: actions/upload-artifact@v1
with:
name: "macos-x64"
path: "build-libretro/duckstation_libretro_mac.dylib.zip"


create-release:
needs: [windows-build, windows-libretro-build, linux-build, linux-libretro-build, android-build, macos-build]
needs: [windows-build, windows-arm64-build, linux-build, android-build, macos-build]
runs-on: "ubuntu-latest"
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
steps:
Expand All @@ -369,10 +262,10 @@ jobs:
with:
name: "windows"

- name: Download Windows libretro x64 Artifact
- name: Download Windows ARM64 Artifact
uses: actions/download-artifact@v1
with:
name: "windows-libretro-x64"
name: "windows-arm64"

- name: Download SDL AppImage Artifact
uses: actions/download-artifact@v1
Expand All @@ -394,11 +287,6 @@ jobs:
with:
name: "linux-x64-appimage-qt-zsync"

- name: Download Linux libretro core
uses: actions/download-artifact@v1
with:
name: "linux-libretro"

- name: Download Android APK
uses: actions/download-artifact@v1
with:
Expand All @@ -419,20 +307,12 @@ jobs:
title: "Latest Preview Build"
files: |
windows/duckstation-windows-x64-release.zip
windows/duckstation-windows-arm64-release.zip
windows-libretro-x64/duckstation_libretro.dll.zip
windows-arm64/duckstation-windows-arm64-release.zip
linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage
linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync
linux-x64-appimage-qt/duckstation-qt-x64.AppImage
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
linux-libretro/duckstation_libretro_x64.so.zip
linux-libretro/duckstation_libretro_linux_armv7.so.zip
linux-libretro/duckstation_libretro_linux_aarch64.so.zip
linux-libretro/duckstation_libretro_android_armv7.so.zip
linux-libretro/duckstation_libretro_android_aarch64.so.zip
android/duckstation-android.apk
macos-x64/duckstation-mac-release.zip
macos-x64/duckstation_libretro_mac.dylib.zip
- name: Create dev release
if: github.ref == 'refs/heads/dev'
Expand All @@ -444,18 +324,11 @@ jobs:
title: "Latest Development Build"
files: |
windows/duckstation-windows-x64-release.zip
windows/duckstation-windows-arm64-release.zip
windows-libretro-x64/duckstation_libretro.dll.zip
windows-arm64/duckstation-windows-arm64-release.zip
linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage
linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync
linux-x64-appimage-qt/duckstation-qt-x64.AppImage
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
linux-libretro/duckstation_libretro_x64.so.zip
linux-libretro/duckstation_libretro_linux_armv7.so.zip
linux-libretro/duckstation_libretro_linux_aarch64.so.zip
linux-libretro/duckstation_libretro_android_armv7.so.zip
linux-libretro/duckstation_libretro_android_aarch64.so.zip
android/duckstation-android.apk
macos-x64/duckstation-mac-release.zip
macos-x64/duckstation_libretro_mac.dylib.zip
15 changes: 4 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14.0" CACHE STRING "")
if(NOT ANDROID)
option(BUILD_SDL_FRONTEND "Build the SDL frontend" ON)
option(BUILD_QT_FRONTEND "Build the Qt frontend" ON)
option(BUILD_LIBRETRO_CORE "Build a libretro core" OFF)
option(ENABLE_DISCORD_PRESENCE "Build with Discord Rich Presence support" ON)
option(USE_SDL2 "Link with SDL2 for controller support" ON)
endif()
Expand All @@ -42,8 +41,7 @@ if(USE_WAYLAND)
set(USE_EGL ON)
endif()

# When we're building for libretro, everything else is invalid because of PIC.
if(ANDROID OR BUILD_LIBRETRO_CORE)
if(ANDROID)
if(BUILD_SDL_FRONTEND)
message(WARNING "Building for Android or libretro core, disabling SDL frontend")
set(BUILD_SDL_FRONTEND OFF)
Expand All @@ -66,14 +64,9 @@ if(ANDROID OR BUILD_LIBRETRO_CORE)
if(USE_WAYLAND)
set(USE_WAYLAND OFF)
endif()
if(BUILD_LIBRETRO_CORE AND USE_EGL)
if(USE_EGL)
set(USE_EGL OFF)
endif()

# Force PIC when compiling a libretro core.
if(BUILD_LIBRETRO_CORE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
endif()


Expand Down Expand Up @@ -211,7 +204,7 @@ endif()


# Write binaries to a seperate directory.
if(WIN32 AND NOT BUILD_LIBRETRO_CORE)
if(WIN32)
# For Windows, use the source directory, except for libretro.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/${CPU_ARCH}")
else()
Expand All @@ -232,6 +225,6 @@ enable_testing()
add_subdirectory(dep)
add_subdirectory(src)

if(ANDROID AND NOT BUILD_LIBRETRO_CORE)
if(ANDROID)
add_subdirectory(android/app/src/cpp)
endif()
21 changes: 2 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# DuckStation - PlayStation 1, aka. PSX Emulator
[Latest News](#latest-news) | [Features](#features) | [Screenshots](#screenshots) | [Downloading and Running](#downloading-and-running) | [Libretro Core](#libretro-core) | [Building](#building) | [Disclaimers](#disclaimers)
[Latest News](#latest-news) | [Features](#features) | [Screenshots](#screenshots) | [Downloading and Running](#downloading-and-running) | [Building](#building) | [Disclaimers](#disclaimers)

**Discord Server:** https://discord.gg/Buktv3t

**Latest Windows, Linux (AppImage), Mac, Android, and Libretro Builds:** https://github.com/stenzek/duckstation/releases/tag/latest
**Latest Windows, Linux (AppImage), Mac, Android** https://github.com/stenzek/duckstation/releases/tag/latest

**Available on Google Play:** https://play.google.com/store/apps/details?id=com.github.stenzek.duckstation&hl=en_AU&gl=US

Expand Down Expand Up @@ -32,7 +32,6 @@ Older entries are available at https://github.com/stenzek/duckstation/blob/maste
- 2020/12/10: Translation support added for Android version. Currently Brazillian Portuguese, Italian, and Dutch are available.
- 2020/11/27: Cover support added for game list in Android version. Procedure is the same as the desktop version, except you should place cover images in `<storage>/duckstation/covers` (see [Adding Game Covers](https://github.com/stenzek/duckstation/wiki/Adding-Game-Covers)).
- 2020/11/27: Disc database is shipped with desktop and Android versions courtesy of redump.org. This will provide titles for games on Android, where it was not possible previously.
- 2020/11/27: Compatibility databases added to libretro core - broken enhancements will be automatically disabled. You can turn this off by disabling "Apply Compatibility Settings" in the core options.
- 2020/11/27: SDL game controller database is included with desktop versions courtesy of https://github.com/gabomdq/SDL_GameControllerDB.
- 2020/11/21: OpenGL ES 2.0 host display support added. You cannot use the hardware renderer with GLES2, it still requires GLES3, but GLES2 GPUs can now use the software renderer.
- 2020/11/21: Threaded renderer for software renderer added. Can result in a significant speed boost depending on the game.
Expand Down Expand Up @@ -270,22 +269,6 @@ Hotkeys:
- **Page Up/Down:** Increase/decrease resolution scale in hardware renderers
- **End:** Toggle software renderer

## Libretro Core

DuckStation is available as a libretro core, supporting most of the features of the full frontend within the constraints and limitations of being a libretro core.

As of December 2020, the libretro core is no longer supported by the developer. The core will remain in the tree, but fixing any issues will not be a priority,
and any bugs must be tested in the standalone version prior to being reported.

To build on Windows, use cmake using the following commands from a `x64 Native Tools Command Prompt for VS 2019`:
- mkdir build
- cd build
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON ..

You should then have a file named `duckstation_libretro.dll` which can be loaded as a core.

To build on Linux, follow the same instructions as for a normal build, but for cmake use `cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON ..`. The shared library will be named `duckstation_libretro.so` in the current directory.

## Tests
- Passes amidog's CPU and GTE tests in both interpreter and recompiler modes, partial passing of CPX tests

Expand Down
Loading

0 comments on commit 419726f

Please sign in to comment.