1 Commits
Author SHA1 Message Date
SSimco ab53e98288 Fixed conversion from native paths 2024-09-22 07:18:29 +03:00
919 changed files with 43589 additions and 46889 deletions
@@ -1,43 +0,0 @@
name: Set up a vcpkg binary cache
description: Bootstraps vcpkg and configures GitHub Packages as a binary cache.
inputs:
github-token:
description: Token for authenticating with GitHub Packages
required: true
runs:
using: composite
steps:
- name: Bootstrap vcpkg
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./dependencies/vcpkg/bootstrap-vcpkg.bat
else
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
fi
- name: Setup NuGet Credentials for vcpkg
shell: bash
run: |
function vcpkg_nuget() {
if [ "$RUNNER_OS" == "Windows" ]; then
`./dependencies/vcpkg/vcpkg.exe fetch nuget | tail -n 1` "$@"
else
mono `./dependencies/vcpkg/vcpkg fetch nuget | tail -n 1` "$@"
fi
}
vcpkg_nuget \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ inputs.github-token }}"
vcpkg_nuget \
setapikey "${{ inputs.github-token }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
+51
View File
@@ -0,0 +1,51 @@
name: Android build
on:
workflow_call:
workflow_dispatch:
push:
branches: ["android"]
pull_request:
branches: ["android"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Create store file
env:
ANDROID_STORE_FILE_BASE64: ${{ secrets.ANDROID_STORE_FILE_BASE64 }}
ANDROID_KEY_STORE_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
if: "${{ env.ANDROID_STORE_FILE_BASE64 != '' }}"
run: |
cd ./src/android
base64 --decode <<< "${ANDROID_STORE_FILE_BASE64}" > store.jks
ANDROID_STORE_FILE=$(pwd)/store.jks
echo -e "keyStorePassword=$ANDROID_KEY_STORE_PASSWORD\nkeyAlias=$ANDROID_KEY_ALIAS\nstoreFile=$ANDROID_STORE_FILE\n" > keystore.properties
- name: Build Cemu for Android
run: |
cd ./src/android
./gradlew assembleRelease
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cemu-android
path: |
./src/android/app/build/outputs/apk/release/*.apk
./src/android/app/build/outputs/apk/release/*.aab
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -1,6 +1,5 @@
name: Build check
on:
workflow_dispatch:
on:
pull_request:
paths-ignore:
- "*.md"
@@ -17,4 +16,3 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
-172
View File
@@ -1,172 +0,0 @@
name: Build vcpkg Android Dependencies
on:
workflow_dispatch:
jobs:
build-vcpkg-android:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install CMake
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build
- name: Setup Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r29
add-to-path: true
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: |
dependencies/vcpkg/installed
dependencies/vcpkg/buildtrees
dependencies/vcpkg/packages
key: vcpkg-android-arm64-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-android-arm64-
- name: Bootstrap vcpkg
run: |
cd dependencies/vcpkg
./bootstrap-vcpkg.sh
- name: Build vcpkg dependencies for arm64-v8a
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
VCPKG_ROOT: ${{ github.workspace }}/dependencies/vcpkg
run: |
cd dependencies/vcpkg
# Install dependencies for Android arm64-v8a
./vcpkg install \
--triplet=arm64-android \
--overlay-ports=${{ github.workspace }}/dependencies/vcpkg_overlay_ports \
--x-manifest-root=${{ github.workspace }} \
--x-install-root=${{ github.workspace }}/dependencies/vcpkg/installed
- name: Package vcpkg installed directory
run: |
cd dependencies/vcpkg
tar -czf vcpkg-android-arm64.tar.gz installed/arm64-android
- name: Upload vcpkg dependencies artifact
uses: actions/upload-artifact@v4
with:
name: vcpkg-android-arm64
path: dependencies/vcpkg/vcpkg-android-arm64.tar.gz
retention-days: 30
- name: Create installation instructions
run: |
cat > VCPKG_INSTALL_INSTRUCTIONS.md << 'EOF'
# vcpkg Android Dependencies Installation
## ABI: arm64-v8a (arm64-android triplet)
### Installation Steps:
1. Download the artifact `vcpkg-android-arm64.tar.gz` from the workflow run
2. Extract to your local repository:
**On Linux/macOS:**
```bash
cd /path/to/WeeU
tar -xzf vcpkg-android-arm64.tar.gz -C dependencies/vcpkg/
```
**On Windows (PowerShell):**
```powershell
cd C:\path\to\WeeU
tar -xzf vcpkg-android-arm64.tar.gz -C dependencies\vcpkg\
```
**On Windows (using 7-Zip or WinRAR):**
- Extract the .tar.gz file to get the .tar file
- Extract the .tar file
- Copy the `installed` folder to `dependencies\vcpkg\`
3. The dependencies will be extracted to:
```
dependencies/vcpkg/installed/arm64-android/
```
4. You can now build the Android app locally without vcpkg downloading dependencies:
**On Linux/macOS:**
```bash
cd src/android
./gradlew assembleRelease
```
**On Windows:**
```powershell
cd src\android
.\gradlew.bat assembleRelease
```
### What's included:
- All vcpkg dependencies specified in vcpkg.json for Android
- Pre-built libraries for arm64-v8a architecture (works on all platforms)
- Headers and CMake configuration files
- Boost, OpenSSL, libzip, curl, and all other dependencies
### Platform Compatibility:
- ✅ **Windows**: Fully supported - Android NDK builds work the same
- ✅ **Linux**: Fully supported
- ✅ **macOS**: Fully supported
- The dependencies are cross-platform because they're for Android target, not host OS
### Notes:
- This is for arm64-v8a only (the only ABI configured in the project)
- Dependencies are cached and will be reused if vcpkg.json hasn't changed
- Total size is approximately 500MB-1GB compressed
- Works on Windows, Linux, and macOS because Android builds are cross-platform
### Requirements:
- Android NDK r28 (or compatible version)
- CMake 3.25+
- Java 21+
### Troubleshooting:
**On Windows:**
- If build fails, ensure the extracted path matches: `dependencies\vcpkg\installed\arm64-android\`
- Verify extraction: `dir dependencies\vcpkg\installed\arm64-android\`
- Make sure you have Android NDK installed via Android Studio or standalone
- Set ANDROID_NDK_HOME environment variable if needed
**On Linux/macOS:**
- If build fails, ensure the extracted path matches: `dependencies/vcpkg/installed/arm64-android/`
- Verify extraction: `ls -la dependencies/vcpkg/installed/arm64-android/`
- Make sure you have Android NDK r28 installed
**General:**
- Clear the vcpkg cache if you encounter issues: `rm -rf dependencies/vcpkg/installed` (or `rmdir /s dependencies\vcpkg\installed` on Windows)
- The Android build uses CMake which is cross-platform
- Dependencies are built for Android ARM64, not your host OS
EOF
- name: Upload installation instructions
uses: actions/upload-artifact@v4
with:
name: vcpkg-installation-instructions
path: VCPKG_INSTALL_INSTRUCTIONS.md
retention-days: 30
@@ -1,4 +1,4 @@
name: Deploy release
name: Deploy experimental release
on:
workflow_dispatch:
inputs:
@@ -38,8 +38,8 @@ on:
description: 'Feature 9'
required: false
type: string
android_build_type:
description: 'Build type'
changelog9:
description: 'Feature 10'
required: false
type: string
@@ -50,13 +50,11 @@ jobs:
call-release-build:
uses: ./.github/workflows/build.yml
needs: calculate-version
secrets: inherit
with:
next_version_major: ${{ needs.calculate-version.outputs.next_version_major }}
next_version_minor: ${{ needs.calculate-version.outputs.next_version_minor }}
android_build_type: ${{ inputs.android_build_type }}
deploy:
name: Deploy release
name: Deploy experimental release
runs-on: ubuntu-22.04
needs: [call-release-build, calculate-version]
steps:
@@ -77,6 +75,7 @@ jobs:
if [ -n "${{ github.event.inputs.changelog6 }}" ]; then CHANGELOG="$CHANGELOG- ${{ github.event.inputs.changelog6 }}\n"; fi
if [ -n "${{ github.event.inputs.changelog7 }}" ]; then CHANGELOG="$CHANGELOG- ${{ github.event.inputs.changelog7 }}\n"; fi
if [ -n "${{ github.event.inputs.changelog8 }}" ]; then CHANGELOG="$CHANGELOG- ${{ github.event.inputs.changelog8 }}\n"; fi
if [ -n "${{ github.event.inputs.changelog9 }}" ]; then CHANGELOG="$CHANGELOG- ${{ github.event.inputs.changelog9 }}\n"; fi
echo -e "$CHANGELOG"
echo "RELEASE_BODY=$CHANGELOG" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
@@ -96,8 +95,8 @@ jobs:
- uses: actions/download-artifact@v4
with:
pattern: cemu-bin-macos*
path: cemu-macos
name: cemu-bin-macos-x64
path: cemu-bin-macos-x64
- name: Initialize
run: |
@@ -138,15 +137,7 @@ jobs:
rm -r ./${{ env.CEMU_FOLDER_NAME }}
- name: Create release from macos-bin
run: |
cd cemu-macos
for bin_dir in cemu-bin-macos-*; do
arch="${bin_dir##cemu-bin-macos-}"
cp $bin_dir/Cemu.dmg ../upload/cemu-${{ env.CEMU_VERSION }}-macos-12-$arch.dmg
done
- name: Create release from android-bin
run: cp cemu-bin-android/*.apk upload/cemu-${{ env.CEMU_VERSION }}.apk
run: cp cemu-bin-macos-x64/Cemu.dmg upload/cemu-${{ env.CEMU_VERSION }}-macos-12-x64.dmg
- name: Create release
run: |
@@ -0,0 +1,46 @@
name: Deploy experimental android release
on:
workflow_dispatch:
jobs:
call-release-build:
uses: ./.github/workflows/android_build.yml
secrets: inherit
deploy:
name: Deploy experimental release
runs-on: ubuntu-22.04
needs: [call-release-build]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: cemu-android
path: cemu-android
- name: Initialize
run: |
mkdir upload
sudo apt install zip
- name: Set version dependent vars
run: |
echo "CEMU_VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Create release from apk
run: |
VERSION=${{ env.CEMU_VERSION }}
echo "Cemu Version is $VERSION"
ls cemu-android
mv cemu-android/*.apk upload/Cemu-$VERSION.apk
- name: Create release
run: |
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz
tar xvzf ghr.tar.gz; rm ghr.tar.gz
echo "[INFO] Release tag: v${{ env.CEMU_VERSION }}"
RELEASE_BODY=$(printf "Experimental release\n%s" "Latest commit ${{ env.CEMU_VERSION }}")
ghr_v0.15.0_linux_amd64/ghr -b "$RELEASE_BODY" -t ${{ secrets.GITHUB_TOKEN }} -n "Cemu ${{ env.CEMU_VERSION }}" "${{ env.CEMU_VERSION }}" ./upload
@@ -0,0 +1,85 @@
name: Create new release
on:
workflow_dispatch:
inputs:
PlaceholderInput:
description: PlaceholderInput
required: false
jobs:
call-release-build:
uses: ./.github/workflows/build.yml
with:
deploymode: release
deploy:
name: Deploy release
runs-on: ubuntu-20.04
needs: call-release-build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
name: cemu-bin-linux-x64
path: cemu-bin-linux-x64
- uses: actions/download-artifact@v4
with:
name: cemu-appimage-x64
path: cemu-appimage-x64
- uses: actions/download-artifact@v4
with:
name: cemu-bin-windows-x64
path: cemu-bin-windows-x64
- uses: actions/download-artifact@v4
with:
name: cemu-bin-macos-x64
path: cemu-bin-macos-x64
- name: Initialize
run: |
mkdir upload
sudo apt update -qq
sudo apt install -y zip
- name: Get Cemu release version
run: |
gcc -o getversion .github/getversion.cpp
echo "Cemu CI version: $(./getversion)"
echo "CEMU_FOLDER_NAME=Cemu_$(./getversion)" >> $GITHUB_ENV
echo "CEMU_VERSION=$(./getversion)" >> $GITHUB_ENV
- name: Create release from windows-bin
run: |
ls ./
ls ./bin/
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
rm -r ./${{ env.CEMU_FOLDER_NAME }}
- name: Create appimage
run: |
VERSION=${{ env.CEMU_VERSION }}
echo "Cemu Version is $VERSION"
ls cemu-appimage-x64
mv cemu-appimage-x64/Cemu-*-x86_64.AppImage upload/Cemu-$VERSION-x86_64.AppImage
- name: Create release from ubuntu-bin
run: |
ls ./
ls ./bin/
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-20.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
rm -r ./${{ env.CEMU_FOLDER_NAME }}
- name: Create release from macos-bin
run: cp cemu-bin-macos-x64/Cemu.dmg upload/cemu-${{ env.CEMU_VERSION }}-macos-12-x64.dmg
- name: Create release
run: |
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz
tar xvzf ghr.tar.gz; rm ghr.tar.gz
ghr_v0.15.0_linux_amd64/ghr -t ${{ secrets.GITHUB_TOKEN }} -n "Cemu ${{ env.CEMU_VERSION }}" -b "Changelog:" v${{ env.CEMU_VERSION }} ./upload
@@ -29,7 +29,7 @@ jobs:
id: get_all_releases
run: |
# Fetch all releases and check for API errors
RESPONSE=$(curl -s -o response.json -w "%{http_code}" "https://api.github.com/repos/cemu-project/cemu/releases?per_page=100")
RESPONSE=$(curl -s -o response.json -w "%{http_code}" "https://api.github.com/repos/${{ github.repository }}/releases?per_page=100")
if [ "$RESPONSE" -ne 200 ]; then
echo "Failed to fetch releases. HTTP status: $RESPONSE"
cat response.json
+4 -17
View File
@@ -1,7 +1,6 @@
name: Generate translation template
on:
workflow_dispatch:
pull_request:
paths-ignore:
- "*.md"
@@ -20,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: "Install gettext"
run: |
@@ -32,24 +31,12 @@ jobs:
find src -name *.cpp -o -name *.hpp -o -name *.h |
xargs xgettext --from-code=utf-8 -w 100
--keyword="_" --keyword="wxTRANSLATE" --keyword="wxPLURAL:1,2"
--keyword="_tr" --keyword="TR_NOOP"
--check=space-ellipsis --omit-header
-o cemu_cpp.pot
- name: "Generate POT file from the Android App"
run: |
cemu_dir=$(pwd)
cd src/android/app
./gradlew gettext
mv cemu_kt.pot "$cemu_dir"
- name: "Combine the POT files"
run: |
xgettext cemu_cpp.pot cemu_kt.pot --omit-header -o cemu.pot
-o cemu.pot
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: POT file
path: ./cemu.pot
if-no-files-found: error
if-no-files-found: error
+1 -4
View File
@@ -54,7 +54,4 @@ bin/gameProfiles/*
bin/graphicPacks/*
# Ignore Finder view option files created by OS X
.DS_Store
.kilocode/mcp.json
vcpkg-android-arm64.tar.gz
src/android/app/src/main/assets/COVER_DOWNLOAD_README.md
.DS_Store
+1 -9
View File
@@ -1,6 +1,6 @@
[submodule "dependencies/ZArchive"]
path = dependencies/ZArchive
url = https://github.com/Exzap/ZArchive
url = https://github.com/SSimco/ZArchive
shallow = true
[submodule "dependencies/cubeb"]
path = dependencies/cubeb
@@ -21,11 +21,3 @@
[submodule "dependencies/xbyak_aarch64"]
path = dependencies/xbyak_aarch64
url = https://github.com/fujitsu/xbyak_aarch64
[submodule "dependencies/libadrenotools"]
path = dependencies/libadrenotools
url = https://github.com/bylaws/libadrenotools
shallow = true
[submodule "dependencies/libucontext/libucontext"]
path = dependencies/libucontext/src
url = https://github.com/kaniini/libucontext
shallow = true
+3 -85
View File
@@ -20,10 +20,6 @@
- [Installing Tool Dependencies](#installing-tool-dependencies)
- [Installing Library Dependencies](#installing-library-dependencies)
- [Build Cemu using CMake](#build-cemu-using-cmake)
- [Android](#android)
- [FreeBSD](#freebsd)
- [Installing Dependencies](#installing-dependencies)
- [Build Cemu on BSD with CMake](#build-cemu-on-bsd-with-cmake)
- [Updating Cemu and source code](#updating-cemu-and-source-code)
## Windows
@@ -50,10 +46,10 @@ To compile Cemu, a recent enough compiler and STL with C++20 support is required
### Dependencies
#### For Arch and derivatives:
`sudo pacman -S --needed base-devel bluez-libs clang cmake freeglut git glm gtk3 libgcrypt libpulse libsecret linux-headers llvm nasm ninja systemd unzip zip`
`sudo pacman -S --needed base-devel clang cmake freeglut git glm gtk3 libgcrypt libpulse libsecret linux-headers llvm nasm ninja systemd unzip zip`
#### For Debian, Ubuntu and derivatives:
`sudo apt install -y cmake curl clang-15 freeglut3-dev git libbluetooth-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev libtool nasm ninja-build`
`sudo apt install -y cmake curl clang-15 freeglut3-dev git libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev libtool nasm ninja-build`
You may also need to install `libusb-1.0-0-dev` as a workaround for an issue with the vcpkg hidapi package.
@@ -61,7 +57,7 @@ At Step 3 in [Build Cemu using cmake and clang](#build-cemu-using-cmake-and-clan
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-15 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`
#### For Fedora and derivatives:
`sudo dnf install bluez-libs-devel clang cmake cubeb-devel freeglut-devel git glm-devel gtk3-devel kernel-headers libgcrypt-devel libsecret-devel libtool libusb1-devel llvm nasm ninja-build perl-core systemd-devel wayland-protocols-devel zlib-devel zlib-static`
`sudo dnf install clang cmake cubeb-devel freeglut-devel git glm-devel gtk3-devel kernel-headers libgcrypt-devel libsecret-devel libtool libusb1-devel llvm nasm ninja-build perl-core systemd-devel zlib-devel zlib-static`
### Build Cemu
@@ -124,9 +120,6 @@ This section refers to running `cmake -S...` (truncated).
* Compiling failed during rebuild after `git pull` with an error that mentions RPATH
* Add the following and try running the command again:
* `-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON`
* Environment variable `VCPKG_FORCE_SYSTEM_BINARIES` must be set.
* Execute the folowing and then try running the command again:
* `export VCPKG_FORCE_SYSTEM_BINARIES=1`
* If you are getting a random error, read the [package-name-and-platform]-out.log and [package-name-and-platform]-err.log for the actual reason to see if you might be lacking the headers from a dependency.
@@ -189,43 +182,6 @@ Then install the dependencies:
#### Troubleshooting steps
- If step 3 gives you an error about not being able to find ninja, try appending `-DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja` to the command and running it again.
## Android
Prerequisites:
- git
- [Android studio](https://developer.android.com/studio)
Instructions:
1. Run `git clone --recursive https://github.com/cemu-project/Cemu`
2. Open the project located in `src/android` in Android Studio
3. Click Build > Make Project
## FreeBSD
The following instructions to build Cemu on FreeBSD are experimental. Some features available on other platforms are not available on FreeBSD (discord rich presence, bluetooth/support for actual Wii U controllers, auto-updates, etc.)
To compile Cemu, a recent enough compiler and STL with C++20 support is required! Clang-15 or higher is what we recommend. Any version of FreeBSD 13.3-RELEASE or higher comes bundled with LLVM > version 15 as part of the base system. However, if for whatever reason your system lacks a recent version of LLVM you can install one by executing:
`sudo pkg install llvm15`
Or a higher version as desired.
### Installing Dependencies
`sudo pkg install boost-libs cmake-core curl glslang gtk3 libzip ninja png pkgconf pugixml rapidjson sdl2 wayland wayland-protocols wx32-gtk3 xorg zstd`
### Build Cemu on BSD with CMake
```
git clone --recursive https://github.com/cemu-project/Cemu
cd Cemu
cmake -B build -DCMAKE_BUILD_TYPE=release -DENABLE_BLUEZ=OFF -DENABLE_DISCORD_RPC=OFF -DENABLE_FERAL_GAMEMODE=OFF -DENABLE_HIDAPI=OFF -DENABLE_VCPKG=OFF -G Ninja
cmake --build build
cd build && ninja install
```
You should now have a Cemu executable file in the /bin folder, which you can run using `./bin/Cemu_release`.
## Updating Cemu and source code
1. To update your Cemu local repository, use the command `git pull --recurse-submodules` (run this command on the Cemu root).
- This should update your local copy of Cemu and all of its dependencies.
@@ -233,41 +189,3 @@ You should now have a Cemu executable file in the /bin folder, which you can run
If CMake complains about Cemu already being compiled or another similar error, try deleting the `CMakeCache.txt` file inside the `build` folder and retry building.
## CMake configure flags
Some flags can be passed during CMake configure to customise which features are enabled on build.
Example usage: `cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DENABLE_SDL=ON -DENABLE_VULKAN=OFF`
### All platforms
| Flag | | Description | Default | Note |
|--------------------|:--|-----------------------------------------------------------------------------|---------|--------------------|
| ALLOW_PORTABLE | | Allow Cemu to use the `portable` directory to store configs and data | ON | |
| CEMU_CXX_FLAGS | | Flags passed straight to the compiler, e.g. `-march=native`, `-Wall`, `/W3` | "" | |
| ENABLE_CUBEB | | Enable cubeb audio backend | ON | |
| ENABLE_DISCORD_RPC | | Enable Discord Rich presence support | ON | |
| ENABLE_OPENGL | | Enable OpenGL graphics backend | ON | Currently required |
| ENABLE_HIDAPI | | Enable HIDAPI (used for Wiimote controller API) | ON | |
| ENABLE_SDL | | Enable SDLController controller API | ON | Currently required |
| ENABLE_VCPKG | | Use VCPKG package manager to obtain dependencies | ON | |
| ENABLE_VULKAN | | Enable the Vulkan graphics backend | ON | |
| ENABLE_WXWIDGETS | | Enable wxWidgets UI | ON | Currently required |
### Windows
| Flag | Description | Default | Note |
|--------------------|-----------------------------------|---------|--------------------|
| ENABLE_DIRECTAUDIO | Enable DirectAudio audio backend | ON | Currently required |
| ENABLE_DIRECTINPUT | Enable DirectInput controller API | ON | Currently required |
| ENABLE_XAUDIO | Enable XAudio audio backend | ON | |
| ENABLE_XINPUT | Enable XInput controller API | ON | |
### Linux
| Flag | Description | Default |
|-----------------------|----------------------------------------------------|---------|
| ENABLE_BLUEZ | Build with Bluez (used for Wiimote controller API) | ON |
| ENABLE_FERAL_GAMEMODE | Enable Feral Interactive GameMode support | ON |
| ENABLE_WAYLAND | Enable Wayland support | ON |
### macOS
| Flag | Description | Default |
|--------------|------------------------------------------------|---------|
| MACOS_BUNDLE | MacOS executable will be an application bundle | OFF |
+31 -31
View File
@@ -1,8 +1,7 @@
cmake_minimum_required(VERSION 3.25)
cmake_minimum_required(VERSION 3.21.1)
option(ENABLE_VCPKG "Enable the vcpkg package manager" ON)
option(MACOS_BUNDLE "The executable when built on macOS will be created as an application bundle" OFF)
option(ALLOW_PORTABLE "Allow Cemu to be run in portable mode" ON)
# used by CI script to set version:
set(EMULATOR_VERSION_MAJOR "0" CACHE STRING "")
@@ -38,11 +37,11 @@ if (ENABLE_VCPKG)
if(UNIX AND NOT APPLE AND NOT VCPKG_TARGET_ANDROID)
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux")
elseif(APPLE)
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_mac;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_mac")
else()
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_win;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
endif()
if(VCPKG_TARGET_ANDROID)
set(ENV{ANDROID_NDK_HOME} ${ANDROID_NDK})
@@ -78,8 +77,10 @@ add_definitions(-DEMULATOR_VERSION_PATCH=${EMULATOR_VERSION_PATCH})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# enable link time optimization for release builds
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON)
if(NOT ANDROID)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON)
endif()
if (MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CemuBin)
@@ -106,7 +107,6 @@ endif()
if (UNIX AND NOT APPLE)
option(ENABLE_WAYLAND "Build with Wayland support" ON)
option(ENABLE_FERAL_GAMEMODE "Enables Feral Interactive GameMode Support" ON)
option(ENABLE_BLUEZ "Build with Bluez support" ON)
endif()
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
@@ -131,6 +131,23 @@ if (WIN32)
endif()
option(ENABLE_CUBEB "Enabled cubeb backend" ON)
# usb hid backends
if (WIN32)
option(ENABLE_NSYSHID_WINDOWS_HID "Enables the native Windows HID backend for nsyshid" ON)
endif ()
# libusb and windows hid backends shouldn't be active at the same time; otherwise we'd see all devices twice!
if (NOT ENABLE_NSYSHID_WINDOWS_HID)
option(ENABLE_NSYSHID_LIBUSB "Enables the libusb backend for nsyshid" ON)
else ()
set(ENABLE_NSYSHID_LIBUSB OFF CACHE BOOL "" FORCE)
endif ()
if (ENABLE_NSYSHID_WINDOWS_HID)
add_compile_definitions(NSYSHID_ENABLE_BACKEND_WINDOWS_HID)
endif ()
if (ENABLE_NSYSHID_LIBUSB)
add_compile_definitions(NSYSHID_ENABLE_BACKEND_LIBUSB)
endif ()
option(ENABLE_WXWIDGETS "Build with wxWidgets UI (Currently required)" ON)
set(THREADS_PREFER_PTHREAD_FLAG true)
@@ -172,17 +189,11 @@ if (UNIX AND NOT APPLE AND NOT ANDROID)
BASENAME viewporter)
add_library(CemuWaylandProtocols STATIC ${WAYLAND_PROTOCOL_SRCS})
target_include_directories(CemuWaylandProtocols PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_include_directories(CemuWaylandProtocols PRIVATE ${Wayland_INCLUDE_DIRS})
add_compile_definitions(HAS_WAYLAND)
endif()
find_package(GTK3 REQUIRED)
if(ENABLE_BLUEZ)
find_package(bluez REQUIRED)
set(SUPPORTS_WIIMOTE ON)
add_compile_definitions(HAS_BLUEZ)
endif()
endif()
if (ENABLE_VULKAN)
@@ -195,11 +206,13 @@ endif()
if (ENABLE_DISCORD_RPC)
add_compile_definitions(ENABLE_DISCORD_RPC)
add_subdirectory(dependencies/discord-rpc EXCLUDE_FROM_ALL)
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
endif()
if (ENABLE_HIDAPI)
find_package(hidapi REQUIRED)
set(SUPPORTS_WIIMOTE ON)
set(ENABLE_WIIMOTE ON)
add_compile_definitions(HAS_HIDAPI)
endif ()
@@ -212,7 +225,7 @@ if(UNIX AND NOT APPLE AND NOT ANDROID)
endif()
if (ENABLE_WXWIDGETS)
find_package(wxWidgets 3.3 REQUIRED COMPONENTS base core gl propgrid xrc)
find_package(wxWidgets 3.2 REQUIRED COMPONENTS base core gl propgrid xrc)
endif()
if (ENABLE_CUBEB)
@@ -233,12 +246,7 @@ endif()
add_subdirectory("dependencies/ih264d" EXCLUDE_FROM_ALL)
if (CMAKE_OSX_ARCHITECTURES)
set(CEMU_ARCHITECTURE ${CMAKE_OSX_ARCHITECTURES})
else()
set(CEMU_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()
if(CEMU_ARCHITECTURE MATCHES "(aarch64)|(AARCH64)|(arm64)|(ARM64)")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64)|(AARCH64)")
add_subdirectory("dependencies/xbyak_aarch64" EXCLUDE_FROM_ALL)
endif()
@@ -247,12 +255,4 @@ if (NOT ZArchive_FOUND)
add_subdirectory("dependencies/ZArchive" EXCLUDE_FROM_ALL)
endif()
if(ANDROID)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64)|(AARCH64)")
add_subdirectory("dependencies/libadrenotools" EXCLUDE_FROM_ALL)
endif()
add_subdirectory("dependencies/libucontext" EXCLUDE_FROM_ALL)
add_subdirectory("dependencies/stb" EXCLUDE_FROM_ALL)
endif()
add_subdirectory(src)
-1
View File
@@ -2,7 +2,6 @@
# Coding style guidelines for Cemu
This document describes the latest version of our coding-style guidelines. Since we did not use this style from the beginning, older code may not adhere to these guidelines. Nevertheless, use these rules even if the surrounding code does not match.
These coding-style guidelines apply only to the C/C++ codebase. For Kotlin, we follow the official Kotlin Coding Conventions as outlined in the [Kotlin documentation](https://kotlinlang.org/docs/coding-conventions.html).
Cemu comes with a `.clang-format` file which is supported by most IDEs for formatting. Avoid auto-reformatting whole files, PRs with a lot of formatting changes are difficult to review.
+47 -7
View File
@@ -1,14 +1,54 @@
# **Cemu - Android Port (Wii U Emulator)**
# **Cemu - Wii U emulator**
This is the Android port of **Cemu**, a Wii U emulator written in C/C++.
It is still early and experimental. Stability, performance, and features are not guaranteed, and some functionality may be missing compared to the desktop version.
[![Build Process](https://github.com/cemu-project/Cemu/actions/workflows/build.yml/badge.svg)](https://github.com/cemu-project/Cemu/actions/workflows/build.yml)
[![Discord](https://img.shields.io/discord/286429969104764928?label=Cemu&logo=discord&logoColor=FFFFFF)](https://discord.gg/5psYsup)
[![Matrix Server](https://img.shields.io/matrix/cemu:cemu.info?server_fqdn=matrix.cemu.info&label=cemu:cemu.info&logo=matrix&logoColor=FFFFFF)](https://matrix.to/#/#cemu:cemu.info)
There is no timeline for when this port will be finished or when new features will be implemented.
This is the code repository of Cemu, a Wii U emulator that is able to run most Wii U games and homebrew in a playable state.
It's written in C/C++ and is being actively developed with new features and fixes.
**Please do not open issues or pull requests yet.**
Development is ongoing, and contributions will be welcome once the project is more stable.
Cemu is currently only available for 64-bit Windows, Linux & macOS devices.
For general information about Cemu, see the [official website](https://cemu.info) and [main repository](https://github.com/cemu-project/Cemu).
### Links:
- [Open Source Announcement](https://www.reddit.com/r/cemu/comments/wwa22c/cemu_20_announcement_linux_builds_opensource_and/)
- [Official Website](https://cemu.info)
- [Compatibility List/Wiki](https://wiki.cemu.info/wiki/Main_Page)
- [Official Subreddit](https://reddit.com/r/Cemu)
- [Official Discord](https://discord.gg/5psYsup)
- [Official Matrix Server](https://matrix.to/#/#cemu:cemu.info)
- [Setup Guide](https://cemu.cfw.guide)
#### Other relevant repositories:
- [Cemu-Language](https://github.com/cemu-project/Cemu-Language)
- [Cemu's Community Graphic Packs](https://github.com/cemu-project/cemu_graphic_packs)
## Download
You can download the latest Cemu releases for Windows, Linux and Mac from the [GitHub Releases](https://github.com/cemu-project/Cemu/releases/). For Linux you can also find Cemu on [flathub](https://flathub.org/apps/info.cemu.Cemu).
On Windows Cemu is currently only available in a portable format so no installation is required besides extracting it in a safe place.
The native macOS build is currently purely experimental and should not be considered stable or ready for issue-free gameplay. There are also known issues with degraded performance due to the use of MoltenVK and Rosetta for ARM Macs. We appreciate your patience while we improve Cemu for macOS.
Pre-2.0 releases can be found on Cemu's [changelog page](https://cemu.info/changelog.html).
## Build Instructions
To compile Cemu yourself on Windows, Linux or macOS, view [BUILD.md](/BUILD.md).
## Issues
Issues with the emulator should be filed using [GitHub Issues](https://github.com/cemu-project/Cemu/issues).
The old bug tracker can be found at [bugs.cemu.info](https://bugs.cemu.info) and still contains relevant issues and feature suggestions.
## Contributing
Pull requests are very welcome. For easier coordination you can visit the developer discussion channel on [Discord](https://discord.gg/5psYsup) or alternatively the [Matrix Server](https://matrix.to/#/#cemu:cemu.info).
Before submitting a pull request, please read and follow our code style guidelines listed in [CODING_STYLE.md](/CODING_STYLE.md).
If coding isn't your thing, testing games and making detailed bug reports or updating the (usually outdated) compatibility wiki is also appreciated!
Questions about Cemu's software architecture can also be answered on Discord (or through the Matrix bridge).
## License
Cemu is licensed under [Mozilla Public License 2.0](/LICENSE.txt). Exempt from this are all files in the dependencies directory for which the licenses of the original code apply as well as some individual files in the src folder, as specified in those file headers respectively.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More