Compare commits
174 commits
Author | SHA1 | Date | |
---|---|---|---|
8a017951aa | |||
776958c79d | |||
3656253262 | |||
b6241e4148 | |||
bfffafe68b | |||
3c6ef765af | |||
954c17c18a | |||
8078990b9b | |||
db65f10768 | |||
acd7d792a3 | |||
9acb6006b8 | |||
cf0628af46 | |||
dbeae7add0 | |||
62369aa2d5 | |||
badd913bee | |||
6a4fa11ac3 | |||
5d4cfe195b | |||
bc1d093fe9 | |||
f6d99e5032 | |||
a52ddf78a6 | |||
191dd892e5 | |||
9f385bf627 | |||
1a13e79c3d | |||
268918aece | |||
83730cd4c1 | |||
272df1fa83 | |||
71a87b2c55 | |||
f4f3425d86 | |||
9173eec402 | |||
de594c8792 | |||
2d8cb2d457 | |||
990a43a48c | |||
1a5b3fb239 | |||
24e6c62109 | |||
326865cba2 | |||
76b5d6778e | |||
61adc85c4b | |||
4be6d30cd9 | |||
020f1cdb1f | |||
dfe10bc851 | |||
9a098441de | |||
91fb1df624 | |||
43a7470a7d | |||
dfca07f4e3 | |||
2e0a4163cf | |||
815d85677a | |||
f422d855b7 | |||
03c7d6ce4a | |||
824dc6948e | |||
85b5e650cc | |||
324ace3cd6 | |||
33f93ad003 | |||
9f423a24b8 | |||
50ceb9a43a | |||
ecb811ad04 | |||
bf302d7917 | |||
d19a7c3782 | |||
c725641f13 | |||
02016697d6 | |||
c77ad128b9 | |||
cc50571275 | |||
ba20e5c2f5 | |||
020ad29a8c | |||
4982dcfaa5 | |||
677148bdca | |||
f088f028f3 | |||
19eb8272b1 | |||
86ddb51a87 | |||
10aca2f90c | |||
1d83ba733c | |||
fd21774aae | |||
42280f34d6 | |||
2482846cf6 | |||
bf4dce8d0b | |||
45263ee7aa | |||
f19bbda517 | |||
f5bb07341a | |||
3e299dc0f5 | |||
3ac9d65cdd | |||
4f9b670c93 | |||
1937286798 | |||
76a8a6e039 | |||
49ddf95c70 | |||
d4427d90ea | |||
aec7f19b7e | |||
7050b92d61 | |||
48f7387e3a | |||
49f29e5071 | |||
f33a771d58 | |||
191e4c75a1 | |||
34302300d9 | |||
cbbdfc75cc | |||
1ca35b7559 | |||
06dabbadcb | |||
8c9cdf0d70 | |||
d623e04606 | |||
4b558e5303 | |||
28b8159da1 | |||
87d42cf542 | |||
725407b989 | |||
6510818fca | |||
a487cea683 | |||
a3c0d59dc9 | |||
cf634d4d6f | |||
b1ce3c8dc1 | |||
e1ffeec212 | |||
249e006667 | |||
8ac495acee | |||
cda6958111 | |||
dac2efc4c8 | |||
3b3278f44b | |||
3ca0bde0e9 | |||
6699361b7e | |||
19036c59b5 | |||
80dfc3d76f | |||
f4386423e8 | |||
4c5d03f5de | |||
d207df959a | |||
28d26b0d76 | |||
ad6045d9a4 | |||
3fbfd64722 | |||
13ecc1e481 | |||
2502352180 | |||
9d2681ecc9 | |||
428f136a75 | |||
ecc99ce9ab | |||
2f82b63e6a | |||
43c41e4db5 | |||
10dd003d0f | |||
37e0b80766 | |||
718891d11f | |||
bbcd8aded6 | |||
2bc792e211 | |||
e7560183fa | |||
84fadd1506 | |||
be7a3e1e86 | |||
6aa8be1da8 | |||
![]() |
e28b0d2590 | ||
![]() |
6fcfe7f4f3 | ||
e60fd4b68b | |||
10c76568b8 | |||
8dba6a2cb4 | |||
4b5a8e0621 | |||
39e27bc954 | |||
21c77bdcac | |||
1c3ca17cfb | |||
7ca197d900 | |||
3b4c1beb0c | |||
76de9d6c8c | |||
ab015bc730 | |||
f005f6a3ab | |||
47b703067e | |||
03b4f57364 | |||
57fbdd516e | |||
f07309afd2 | |||
cf689a7a49 | |||
702a2beb7c | |||
d709771d67 | |||
428249cb01 | |||
8ed05425dd | |||
26b5286250 | |||
529f78b95f | |||
434bd42a5e | |||
8407510f76 | |||
7f482d0730 | |||
9d53933a95 | |||
7950c5cca0 | |||
09e77fa146 | |||
dae0d7bec6 | |||
37375220e8 | |||
9fae048a5a | |||
eb80a30c42 | |||
22847ec78a | |||
3cb8e6111a |
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
export NDK_CCACHE=$(which ccache)
|
export NDK_CCACHE=$(which ccache)
|
||||||
|
@ -13,8 +13,8 @@ fi
|
||||||
cd src/android
|
cd src/android
|
||||||
chmod +x ./gradlew
|
chmod +x ./gradlew
|
||||||
|
|
||||||
./gradlew assembleRelease
|
./gradlew assembleMainlineRelease
|
||||||
./gradlew bundleRelease
|
./gradlew bundleMainlineRelease
|
||||||
|
|
||||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||||
rm "${ANDROID_KEYSTORE_FILE}"
|
rm "${ANDROID_KEYSTORE_FILE}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')"
|
GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')"
|
||||||
|
|
|
@ -1,53 +1,102 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
HEADER="$(cat "$PWD/.ci/license/header.txt")"
|
HEADER="$(cat "$PWD/.ci/license/header.txt")"
|
||||||
|
HEADER_HASH="$(cat "$PWD/.ci/license/header-hash.txt")"
|
||||||
|
|
||||||
echo "Getting branch changes"
|
echo "Getting branch changes"
|
||||||
|
|
||||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
# BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||||
COMMITS=`git log ${BRANCH} --not master --pretty=format:"%h"`
|
# COMMITS=`git log ${BRANCH} --not master --pretty=format:"%h"`
|
||||||
RANGE="${COMMITS[${#COMMITS[@]}-1]}^..${COMMITS[0]}"
|
# RANGE="${COMMITS[${#COMMITS[@]}-1]}^..${COMMITS[0]}"
|
||||||
FILES=`git diff-tree --no-commit-id --name-only ${RANGE} -r`
|
# FILES=`git diff-tree --no-commit-id --name-only ${RANGE} -r`
|
||||||
|
|
||||||
|
BASE=`git merge-base master HEAD`
|
||||||
|
FILES=`git diff --name-only $BASE`
|
||||||
|
|
||||||
#FILES=$(git diff --name-only master)
|
#FILES=$(git diff --name-only master)
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
check_header() {
|
||||||
|
CONTENT="`head -n3 < $1`"
|
||||||
|
case "$CONTENT" in
|
||||||
|
"$HEADER"*) ;;
|
||||||
|
*) BAD_FILES="$BAD_FILES $1" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
check_cmake_header() {
|
||||||
|
CONTENT="`head -n3 < $1`"
|
||||||
|
|
||||||
|
case "$CONTENT" in
|
||||||
|
"$HEADER_HASH"*) ;;
|
||||||
|
*)
|
||||||
|
BAD_CMAKE="$BAD_CMAKE $1" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
for file in $FILES; do
|
for file in $FILES; do
|
||||||
[ -f "$file" ] || continue
|
[ -f "$file" ] || continue
|
||||||
|
|
||||||
|
if [ `basename -- "$file"` = "CMakeLists.txt" ]; then
|
||||||
|
check_cmake_header "$file"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
EXTENSION="${file##*.}"
|
EXTENSION="${file##*.}"
|
||||||
case "$EXTENSION" in
|
case "$EXTENSION" in
|
||||||
kts|kt|cpp|h)
|
kts|kt|cpp|h)
|
||||||
CONTENT="`cat $file`"
|
check_header "$file"
|
||||||
case "$CONTENT" in
|
;;
|
||||||
"$HEADER"*) ;;
|
cmake)
|
||||||
*) BAD_FILES="$BAD_FILES $file" ;;
|
check_cmake_header "$file"
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$BAD_FILES" = "" ]; then
|
if [ "$BAD_FILES" = "" ] && [ "$BAD_CMAKE" = "" ]; then
|
||||||
echo
|
echo
|
||||||
echo "All good."
|
echo "All good."
|
||||||
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The following files have incorrect license headers:"
|
if [ "$BAD_FILES" != "" ]; then
|
||||||
echo
|
echo "The following source files have incorrect license headers:"
|
||||||
|
echo
|
||||||
|
|
||||||
for file in $BAD_FILES; do echo $file; done
|
for file in $BAD_FILES; do echo $file; done
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
The following license header should be added to the start of all offending files:
|
The following license header should be added to the start of all offending SOURCE files:
|
||||||
|
|
||||||
=== BEGIN ===
|
=== BEGIN ===
|
||||||
$HEADER
|
$HEADER
|
||||||
=== END ===
|
=== END ===
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BAD_CMAKE" != "" ]; then
|
||||||
|
echo "The following CMake files have incorrect license headers:"
|
||||||
|
echo
|
||||||
|
|
||||||
|
for file in $BAD_CMAKE; do echo $file; done
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
The following license header should be added to the start of all offending CMake files:
|
||||||
|
|
||||||
|
=== BEGIN ===
|
||||||
|
$HEADER_HASH
|
||||||
|
=== END ===
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
If some of the code in this PR is not being contributed by the original author,
|
If some of the code in this PR is not being contributed by the original author,
|
||||||
the files which have been exclusively changed by that code can be ignored.
|
the files which have been exclusively changed by that code can be ignored.
|
||||||
If this happens, this PR requirement can be bypassed once all other files are addressed.
|
If this happens, this PR requirement can be bypassed once all other files are addressed.
|
||||||
|
@ -70,6 +119,17 @@ if [ "$FIX" = "true" ]; then
|
||||||
git add $file
|
git add $file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for file in $BAD_CMAKE; do
|
||||||
|
cat $file > $file.bak
|
||||||
|
|
||||||
|
cat .ci/license/header-hash.txt > $file
|
||||||
|
echo >> $file
|
||||||
|
cat $file.bak >> $file
|
||||||
|
|
||||||
|
rm $file.bak
|
||||||
|
|
||||||
|
git add $file
|
||||||
|
done
|
||||||
echo "License headers fixed."
|
echo "License headers fixed."
|
||||||
|
|
||||||
if [ "$COMMIT" = "true" ]; then
|
if [ "$COMMIT" = "true" ]; then
|
||||||
|
|
2
.ci/license/header-hash.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -104,6 +104,7 @@ cmake .. -G Ninja \
|
||||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||||
-DYUZU_USE_FASTER_LD=ON \
|
-DYUZU_USE_FASTER_LD=ON \
|
||||||
-DYUZU_ENABLE_LTO=ON \
|
-DYUZU_ENABLE_LTO=ON \
|
||||||
|
-DDYNARMIC_ENABLE_LTO=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||||
|
|
||||||
ninja -j${NPROC}
|
ninja -j${NPROC}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AppRun
|
AppRun
|
||||||
eden.desktop
|
eden.desktop
|
||||||
org.eden_emu.eden.desktop
|
dev.eden_emu.eden.desktop
|
||||||
shared/bin/eden
|
shared/bin/eden
|
||||||
shared/lib/lib.path
|
shared/lib/lib.path
|
||||||
shared/lib/ld-linux-x86-64.so.2
|
shared/lib/ld-linux-x86-64.so.2
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# This script assumes you're in the source directory
|
# This script assumes you're in the source directory
|
||||||
|
@ -59,15 +59,15 @@ VERSION="$(echo "$EDEN_TAG")"
|
||||||
mkdir -p ./AppDir
|
mkdir -p ./AppDir
|
||||||
cd ./AppDir
|
cd ./AppDir
|
||||||
|
|
||||||
cp ../dist/org.eden_emu.eden.desktop .
|
cp ../dist/dev.eden_emu.eden.desktop .
|
||||||
cp ../dist/org.eden_emu.eden.svg .
|
cp ../dist/dev.eden_emu.eden.svg .
|
||||||
|
|
||||||
ln -sf ./org.eden_emu.eden.svg ./.DirIcon
|
ln -sf ./dev.eden_emu.eden.svg ./.DirIcon
|
||||||
|
|
||||||
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync'
|
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync'
|
||||||
|
|
||||||
if [ "$DEVEL" = 'true' ]; then
|
if [ "$DEVEL" = 'true' ]; then
|
||||||
sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop
|
sed -i 's|Name=Eden|Name=Eden Nightly|' ./dev.eden_emu.eden.desktop
|
||||||
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')"
|
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ for i in dist/languages/*.ts; do
|
||||||
TARGET=`head -n1 $i | awk -F 'language="' '{split($2, a, "\""); print a[1]}'`
|
TARGET=`head -n1 $i | awk -F 'language="' '{split($2, a, "\""); print a[1]}'`
|
||||||
|
|
||||||
# requires fd
|
# requires fd
|
||||||
SOURCES=`fd . src/yuzu -tf -e ui -e cpp -e h -e plist`
|
SOURCES=`fd . src/yuzu src/qt_common -tf -e ui -e cpp -e h -e plist`
|
||||||
|
|
||||||
lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts /data/code/eden/$i
|
lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts /data/code/eden/$i
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,58 +1,45 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -ex
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
if [ "$DEVEL" != "true" ]; then
|
if [ "$COMPILER" == "clang" ]
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON)
|
then
|
||||||
|
EXTRA_CMAKE_FLAGS+=(
|
||||||
|
-DCMAKE_CXX_COMPILER=clang-cl
|
||||||
|
-DCMAKE_C_COMPILER=clang-cl
|
||||||
|
-DCMAKE_CXX_FLAGS="-O3"
|
||||||
|
-DCMAKE_C_FLAGS="-O3"
|
||||||
|
)
|
||||||
|
|
||||||
|
BUILD_TYPE="RelWithDebInfo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CCACHE" = "true" ]; then
|
[ -z "$WINDEPLOYQT" ] && { echo "WINDEPLOYQT environment variable required."; exit 1; }
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DUSE_CCACHE=ON)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BUNDLE_QT" = "true" ]; then
|
echo $EXTRA_CMAKE_FLAGS
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_BUNDLED_QT=ON)
|
|
||||||
else
|
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_BUNDLED_QT=OFF)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$BUILD_TYPE" ]; then
|
|
||||||
export BUILD_TYPE="Release"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$WINDEPLOYQT" == "" ]; then
|
|
||||||
echo "You must supply the WINDEPLOYQT environment variable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$USE_WEBENGINE" = "true" ]; then
|
|
||||||
WEBENGINE=ON
|
|
||||||
else
|
|
||||||
WEBENGINE=OFF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$USE_MULTIMEDIA" = "false" ]; then
|
|
||||||
MULTIMEDIA=OFF
|
|
||||||
else
|
|
||||||
MULTIMEDIA=ON
|
|
||||||
fi
|
|
||||||
|
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
|
||||||
|
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake .. -G Ninja \
|
cmake .. -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}" \
|
||||||
-DENABLE_QT_TRANSLATION=ON \
|
-DENABLE_QT_TRANSLATION=ON \
|
||||||
-DUSE_DISCORD_PRESENCE=ON \
|
-DUSE_DISCORD_PRESENCE=ON \
|
||||||
-DYUZU_USE_BUNDLED_SDL2=ON \
|
-DYUZU_USE_BUNDLED_SDL2=ON \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
-DYUZU_TESTS=OFF \
|
-DYUZU_TESTS=OFF \
|
||||||
|
-DDYNARMIC_TESTS=OFF \
|
||||||
-DYUZU_CMD=OFF \
|
-DYUZU_CMD=OFF \
|
||||||
-DYUZU_ROOM_STANDALONE=OFF \
|
-DYUZU_ROOM_STANDALONE=OFF \
|
||||||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
-DYUZU_USE_QT_MULTIMEDIA=${USE_MULTIMEDIA:-false} \
|
||||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
-DYUZU_USE_QT_WEB_ENGINE=${USE_WEBENGINE:-false} \
|
||||||
-DYUZU_ENABLE_LTO=ON \
|
-DYUZU_ENABLE_LTO=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
-DCMAKE_EXE_LINKER_FLAGS=" /LTCG" \
|
||||||
|
-DDYNARMIC_ENABLE_LTO=ON \
|
||||||
|
-DYUZU_USE_BUNDLED_QT=${BUNDLE_QT:-false} \
|
||||||
|
-DUSE_CCACHE=${CCACHE:-false} \
|
||||||
|
-DENABLE_QT_UPDATE_CHECKER=${DEVEL:-true} \
|
||||||
|
"${EXTRA_CMAKE_FLAGS[@]}" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
|
@ -61,4 +48,5 @@ rm -f bin/*.pdb
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
||||||
|
|
||||||
cp bin/* pkg
|
cp bin/* pkg
|
||||||
|
|
60
.ci/windows/install-msvc.ps1
Executable file
|
@ -0,0 +1,60 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
# Check if running as administrator
|
||||||
|
if (-not ([bool](net session 2>$null))) {
|
||||||
|
Write-Host "This script must be run with administrator privileges!"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$VSVer = "17"
|
||||||
|
$ExeFile = "vs_community.exe"
|
||||||
|
$Uri = "https://aka.ms/vs/$VSVer/release/$ExeFile"
|
||||||
|
$Destination = "./$ExeFile"
|
||||||
|
|
||||||
|
Write-Host "Downloading Visual Studio Build Tools from $Uri"
|
||||||
|
$WebClient = New-Object System.Net.WebClient
|
||||||
|
$WebClient.DownloadFile($Uri, $Destination)
|
||||||
|
Write-Host "Finished downloading $ExeFile"
|
||||||
|
|
||||||
|
$Arguments = @(
|
||||||
|
"--quiet", # Suppress installer UI
|
||||||
|
"--wait", # Wait for installation to complete
|
||||||
|
"--norestart", # Prevent automatic restart
|
||||||
|
"--force", # Force installation even if components are already installed
|
||||||
|
"--add Microsoft.VisualStudio.Workload.NativeDesktop", # Desktop development with C++
|
||||||
|
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64", # Core C++ compiler/tools for x86/x64
|
||||||
|
"--add Microsoft.VisualStudio.Component.Windows11SDK.26100",# Windows 11 SDK (26100)
|
||||||
|
"--add Microsoft.VisualStudio.Component.Windows10SDK.19041",# Windows 10 SDK (19041)
|
||||||
|
"--add Microsoft.VisualStudio.Component.VC.Llvm.Clang", # LLVM Clang compiler
|
||||||
|
"--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", # LLVM Clang integration toolset
|
||||||
|
"--add Microsoft.VisualStudio.Component.Windows11SDK.22621",# Windows 11 SDK (22621)
|
||||||
|
"--add Microsoft.VisualStudio.Component.VC.CMake.Project", # CMake project support
|
||||||
|
"--add Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64", # VC++ 14.2 toolset
|
||||||
|
"--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang" # LLVM Clang for native desktop
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Host "Installing Visual Studio Build Tools"
|
||||||
|
$InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -ArgumentList $Arguments
|
||||||
|
|
||||||
|
# Spinner while installing
|
||||||
|
$Spinner = "|/-\"
|
||||||
|
$i = 0
|
||||||
|
while (-not $InstallProcess.HasExited) {
|
||||||
|
Write-Host -NoNewline ("`rInstalling... " + $Spinner[$i % $Spinner.Length])
|
||||||
|
Start-Sleep -Milliseconds 250
|
||||||
|
$i++
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear spinner line
|
||||||
|
Write-Host "`rSetup completed! "
|
||||||
|
|
||||||
|
$ExitCode = $InstallProcess.ExitCode
|
||||||
|
if ($ExitCode -ne 0) {
|
||||||
|
Write-Host "Error installing Visual Studio Build Tools (Error: $ExitCode)"
|
||||||
|
Exit $ExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Finished installing Visual Studio Build Tools"
|
|
@ -3,6 +3,12 @@
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
# Check if running as administrator
|
||||||
|
if (-not ([bool](net session 2>$null))) {
|
||||||
|
Write-Host "This script must be run with administrator privileges!"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
|
||||||
$VulkanSDKVer = "1.4.321.1"
|
$VulkanSDKVer = "1.4.321.1"
|
||||||
$ExeFile = "vulkansdk-windows-X64-$VulkanSDKVer.exe"
|
$ExeFile = "vulkansdk-windows-X64-$VulkanSDKVer.exe"
|
||||||
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
||||||
|
|
1
.gitignore
vendored
|
@ -52,3 +52,4 @@ Thumbs.db
|
||||||
eden-windows-msvc
|
eden-windows-msvc
|
||||||
artifacts
|
artifacts
|
||||||
*.AppImage*
|
*.AppImage*
|
||||||
|
/install*
|
||||||
|
|
6
.gitmodules
vendored
|
@ -1,6 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
[submodule "libusb"]
|
|
||||||
path = externals/libusb/libusb
|
|
||||||
url = https://github.com/libusb/libusb.git
|
|
13
.patch/boost/0001-clang-cl.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/libs/cobalt/include/boost/cobalt/concepts.hpp b/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||||
|
index d49f2ec..a9bdb80 100644
|
||||||
|
--- a/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||||
|
+++ b/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||||
|
@@ -62,7 +62,7 @@ struct enable_awaitables
|
||||||
|
template <typename T>
|
||||||
|
concept with_get_executor = requires (T& t)
|
||||||
|
{
|
||||||
|
- {t.get_executor()} -> asio::execution::executor;
|
||||||
|
+ t.get_executor();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
11
.patch/boost/0002-use-marmasm.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/libs/context/CMakeLists.txt 2025-09-08 00:42:31.303651800 -0400
|
||||||
|
+++ b/libs/context/CMakeLists.txt 2025-09-08 00:42:40.592184300 -0400
|
||||||
|
@@ -146,7 +146,7 @@
|
||||||
|
set(ASM_LANGUAGE ASM)
|
||||||
|
endif()
|
||||||
|
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL armasm)
|
||||||
|
- set(ASM_LANGUAGE ASM_ARMASM)
|
||||||
|
+ set(ASM_LANGUAGE ASM_MARMASM)
|
||||||
|
else()
|
||||||
|
set(ASM_LANGUAGE ASM_MASM)
|
||||||
|
endif()
|
14
.patch/boost/0003-armasm-options.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/libs/context/CMakeLists.txt b/libs/context/CMakeLists.txt
|
||||||
|
index 8210f65..0e59dd7 100644
|
||||||
|
--- a/libs/context/CMakeLists.txt
|
||||||
|
+++ b/libs/context/CMakeLists.txt
|
||||||
|
@@ -186,7 +186,8 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
|
||||||
|
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/safeseh")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
- else() # masm
|
||||||
|
+ # armasm doesn't support most of these options
|
||||||
|
+ elseif(NOT BOOST_CONTEXT_ASSEMBLER STREQUAL armasm) # masm
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
@ -1,47 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 8c1761f..52c4ca4 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -69,42 +69,3 @@ endif()
|
|
||||||
if(CPP_JWT_BUILD_EXAMPLES)
|
|
||||||
add_subdirectory(examples)
|
|
||||||
endif()
|
|
||||||
-
|
|
||||||
-# ##############################################################################
|
|
||||||
-# INSTALL
|
|
||||||
-# ##############################################################################
|
|
||||||
-
|
|
||||||
-include(GNUInstallDirs)
|
|
||||||
-include(CMakePackageConfigHelpers)
|
|
||||||
-set(CPP_JWT_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME})
|
|
||||||
-
|
|
||||||
-install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets)
|
|
||||||
-install(
|
|
||||||
- EXPORT ${PROJECT_NAME}Targets
|
|
||||||
- DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
|
||||||
- NAMESPACE ${PROJECT_NAME}::
|
|
||||||
- COMPONENT dev)
|
|
||||||
-configure_package_config_file(cmake/Config.cmake.in ${PROJECT_NAME}Config.cmake
|
|
||||||
- INSTALL_DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
|
||||||
- NO_SET_AND_CHECK_MACRO)
|
|
||||||
-write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake
|
|
||||||
- COMPATIBILITY SameMajorVersion
|
|
||||||
- ARCH_INDEPENDENT)
|
|
||||||
-install(
|
|
||||||
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
|
||||||
- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
|
||||||
- DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
|
||||||
- COMPONENT dev)
|
|
||||||
-
|
|
||||||
-if(NOT CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
|
|
||||||
- set(CPP_JWT_VENDORED_NLOHMANN_JSON_INSTALL_PATTERN PATTERN "json" EXCLUDE)
|
|
||||||
-endif()
|
|
||||||
-install(
|
|
||||||
- DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/jwt/
|
|
||||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jwt
|
|
||||||
- COMPONENT dev
|
|
||||||
- FILES_MATCHING
|
|
||||||
- PATTERN "*.hpp"
|
|
||||||
- PATTERN "*.ipp"
|
|
||||||
- PATTERN "test" EXCLUDE
|
|
||||||
- ${CPP_JWT_VENDORED_NLOHMANN_JSON_INSTALL_PATTERN})
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/include/jwt/algorithm.hpp b/include/jwt/algorithm.hpp
|
|
||||||
index 0e3b843..1156e6a 100644
|
|
||||||
--- a/include/jwt/algorithm.hpp
|
|
||||||
+++ b/include/jwt/algorithm.hpp
|
|
||||||
@@ -64,6 +64,8 @@ using verify_func_t = verify_result_t (*) (const jwt::string_view key,
|
|
||||||
const jwt::string_view head,
|
|
||||||
const jwt::string_view jwt_sign);
|
|
||||||
|
|
||||||
+verify_result_t is_secret_a_public_key(const jwt::string_view secret);
|
|
||||||
+
|
|
||||||
namespace algo {
|
|
||||||
|
|
||||||
//Me: TODO: All these can be done using code generaion.
|
|
|
@ -1,10 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 5dad9e9..760a1b2 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-cmake_minimum_required (VERSION 3.2.0)
|
|
||||||
+cmake_minimum_required (VERSION 3.10)
|
|
||||||
project (DiscordRPC)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
|
@ -1,40 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 760a1b2..540d643 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -12,20 +12,6 @@ file(GLOB_RECURSE ALL_SOURCE_FILES
|
|
||||||
src/*.cpp src/*.h src/*.c
|
|
||||||
)
|
|
||||||
|
|
||||||
-# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0
|
|
||||||
-find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX})
|
|
||||||
-
|
|
||||||
-if (CLANG_FORMAT_CMD)
|
|
||||||
- add_custom_target(
|
|
||||||
- clangformat
|
|
||||||
- COMMAND ${CLANG_FORMAT_CMD}
|
|
||||||
- -i -style=file -fallback-style=none
|
|
||||||
- ${ALL_SOURCE_FILES}
|
|
||||||
- DEPENDS
|
|
||||||
- ${ALL_SOURCE_FILES}
|
|
||||||
- )
|
|
||||||
-endif(CLANG_FORMAT_CMD)
|
|
||||||
-
|
|
||||||
# thirdparty stuff
|
|
||||||
execute_process(
|
|
||||||
COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index 290d761..cd2cc92 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -120,10 +120,6 @@ if (${BUILD_SHARED_LIBS})
|
|
||||||
target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK)
|
|
||||||
endif(${BUILD_SHARED_LIBS})
|
|
||||||
|
|
||||||
-if (CLANG_FORMAT_CMD)
|
|
||||||
- add_dependencies(discord-rpc clangformat)
|
|
||||||
-endif(CLANG_FORMAT_CMD)
|
|
||||||
-
|
|
||||||
# install
|
|
||||||
|
|
||||||
install(
|
|
|
@ -1,31 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 540d643..5d12f3d 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -17,12 +17,14 @@ execute_process(
|
|
||||||
COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
|
||||||
ERROR_QUIET
|
|
||||||
)
|
|
||||||
+# new commit that fixes c++17
|
|
||||||
+set(RAPIDJSON_SHA 3b2441b87f99ab65f37b141a7b548ebadb607b96)
|
|
||||||
|
|
||||||
-find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
+find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
if (NOT RAPIDJSONTEST)
|
|
||||||
message("no rapidjson, download")
|
|
||||||
- set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz)
|
|
||||||
- file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE})
|
|
||||||
+ set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/${RAPIDJSON_SHA}.tar.gz)
|
|
||||||
+ file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/${RAPIDJSON_SHA}.tar.gz ${RJ_TAR_FILE})
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
|
||||||
@@ -30,7 +32,7 @@ if (NOT RAPIDJSONTEST)
|
|
||||||
file(REMOVE ${RJ_TAR_FILE})
|
|
||||||
endif(NOT RAPIDJSONTEST)
|
|
||||||
|
|
||||||
-find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
+find_file(RAPIDJSON NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
|
|
||||||
add_library(rapidjson STATIC IMPORTED ${RAPIDJSON})
|
|
||||||
|
|
1
.shellcheckrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
shell=sh
|
21
.tx/config
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
[main]
|
||||||
|
host = https://app.transifex.com
|
||||||
|
|
||||||
|
[o:edenemu:p:eden-emulator:r:android-translations]
|
||||||
|
file_filter = src/android/app/src/main/res/values-<lang>/strings.xml
|
||||||
|
source_file = src/android/app/src/main/res/values/strings.xml
|
||||||
|
type = ANDROID
|
||||||
|
minimum_perc = 0
|
||||||
|
resource_name = Android Translations
|
||||||
|
replace_edited_strings = false
|
||||||
|
keep_translations = false
|
||||||
|
lang_map = zh_CN: zh-rCN, zh_TW: zh-rTW, pt_BR: pt-rBR, pt_PT: pt-rPT, vi_VN: vi, ku: ckb, ja_JP: ja, ko_KR: ko, ru_RU: ru
|
||||||
|
|
||||||
|
[o:edenemu:p:eden-emulator:r:qt-translations]
|
||||||
|
file_filter = dist/languages/<lang>.ts
|
||||||
|
source_file = dist/languages/en.ts
|
||||||
|
type = QT
|
||||||
|
minimum_perc = 0
|
||||||
|
resource_name = Qt Translations
|
||||||
|
replace_edited_strings = false
|
||||||
|
keep_translations = false
|
956
CMakeLists.txt
|
@ -743,9 +743,11 @@ function(CPMAddPackage)
|
||||||
if(NOT DEFINED CPM_ARGS_NAME)
|
if(NOT DEFINED CPM_ARGS_NAME)
|
||||||
set(CPM_ARGS_NAME ${nameFromUrl})
|
set(CPM_ARGS_NAME ${nameFromUrl})
|
||||||
endif()
|
endif()
|
||||||
if(NOT DEFINED CPM_ARGS_VERSION)
|
|
||||||
set(CPM_ARGS_VERSION ${verFromUrl})
|
# this is dumb and should not be done
|
||||||
endif()
|
# if(NOT DEFINED CPM_ARGS_VERSION)
|
||||||
|
# set(CPM_ARGS_VERSION ${verFromUrl})
|
||||||
|
# endif()
|
||||||
|
|
||||||
list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS URL "${CPM_ARGS_URL}")
|
list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS URL "${CPM_ARGS_URL}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,32 +1,243 @@
|
||||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 crueter
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# Created-By: crueter
|
|
||||||
# Docs will come at a later date, mostly this is to just reduce boilerplate
|
|
||||||
# and some cmake magic to allow for runtime viewing of dependency versions
|
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
|
||||||
if (MSVC OR ANDROID)
|
if (MSVC OR ANDROID)
|
||||||
set(SYSTEM_DEFAULT OFF)
|
set(BUNDLED_DEFAULT ON)
|
||||||
else()
|
else()
|
||||||
set(SYSTEM_DEFAULT ON)
|
set(BUNDLED_DEFAULT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(CPMUTIL_DEFAULT_SYSTEM
|
option(CPMUTIL_FORCE_BUNDLED
|
||||||
"Allow usage of system packages for CPM dependencies" ${SYSTEM_DEFAULT}
|
"Force bundled packages for all CPM depdendencies" ${BUNDLED_DEFAULT})
|
||||||
"NOT ANDROID" OFF)
|
|
||||||
|
option(CPMUTIL_FORCE_SYSTEM
|
||||||
|
"Force system packages for all CPM dependencies (NOT RECOMMENDED)" OFF)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.22)
|
cmake_minimum_required(VERSION 3.22)
|
||||||
include(CPM)
|
include(CPM)
|
||||||
|
|
||||||
|
# cpmfile parsing
|
||||||
|
set(CPMUTIL_JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json")
|
||||||
|
|
||||||
|
if (EXISTS ${CPMUTIL_JSON_FILE})
|
||||||
|
file(READ ${CPMUTIL_JSON_FILE} CPMFILE_CONTENT)
|
||||||
|
else()
|
||||||
|
message(WARNING "[CPMUtil] cpmfile ${CPMUTIL_JSON_FILE} does not exist, AddJsonPackage will be a no-op")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Utility stuff
|
||||||
function(cpm_utils_message level name message)
|
function(cpm_utils_message level name message)
|
||||||
message(${level} "[CPMUtil] ${name}: ${message}")
|
message(${level} "[CPMUtil] ${name}: ${message}")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(array_to_list array length out)
|
||||||
|
math(EXPR range "${length} - 1")
|
||||||
|
|
||||||
|
foreach(IDX RANGE ${range})
|
||||||
|
string(JSON _element GET "${array}" "${IDX}")
|
||||||
|
|
||||||
|
list(APPEND NEW_LIST ${_element})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set("${out}" "${NEW_LIST}" PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(get_json_element object out member default)
|
||||||
|
string(JSON out_type ERROR_VARIABLE err TYPE "${object}" ${member})
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
set("${out}" "${default}" PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(JSON outvar GET "${object}" ${member})
|
||||||
|
|
||||||
|
if (out_type STREQUAL "ARRAY")
|
||||||
|
string(JSON _len LENGTH "${object}" ${member})
|
||||||
|
# array_to_list("${outvar}" ${_len} outvar)
|
||||||
|
set("${out}_LENGTH" "${_len}" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set("${out}" "${outvar}" PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# The preferred usage
|
||||||
|
function(AddJsonPackage)
|
||||||
|
set(oneValueArgs
|
||||||
|
NAME
|
||||||
|
|
||||||
|
# these are overrides that can be generated at runtime, so can be defined separately from the json
|
||||||
|
DOWNLOAD_ONLY
|
||||||
|
BUNDLED_PACKAGE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(multiValueArgs OPTIONS)
|
||||||
|
|
||||||
|
cmake_parse_arguments(JSON "" "${oneValueArgs}" "${multiValueArgs}"
|
||||||
|
"${ARGN}")
|
||||||
|
|
||||||
|
list(LENGTH ARGN argnLength)
|
||||||
|
|
||||||
|
# single name argument
|
||||||
|
if(argnLength EQUAL 1)
|
||||||
|
set(JSON_NAME "${ARGV0}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED CPMFILE_CONTENT)
|
||||||
|
cpm_utils_message(WARNING ${name} "No cpmfile, AddJsonPackage is a no-op")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED JSON_NAME)
|
||||||
|
cpm_utils_message(FATAL_ERROR "json package" "No name specified")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(JSON object ERROR_VARIABLE err GET "${CPMFILE_CONTENT}" "${JSON_NAME}")
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
cpm_utils_message(FATAL_ERROR ${JSON_NAME} "Not found in cpmfile")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_json_element("${object}" package package ${JSON_NAME})
|
||||||
|
get_json_element("${object}" repo repo "")
|
||||||
|
get_json_element("${object}" ci ci OFF)
|
||||||
|
get_json_element("${object}" version version "")
|
||||||
|
|
||||||
|
if (ci)
|
||||||
|
get_json_element("${object}" name name "${JSON_NAME}")
|
||||||
|
get_json_element("${object}" extension extension "tar.zst")
|
||||||
|
get_json_element("${object}" min_version min_version "")
|
||||||
|
get_json_element("${object}" raw_disabled disabled_platforms "")
|
||||||
|
|
||||||
|
if (raw_disabled)
|
||||||
|
array_to_list("${raw_disabled}" ${raw_disabled_LENGTH} disabled_platforms)
|
||||||
|
else()
|
||||||
|
set(disabled_platforms "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
AddCIPackage(
|
||||||
|
VERSION ${version}
|
||||||
|
NAME ${name}
|
||||||
|
REPO ${repo}
|
||||||
|
PACKAGE ${package}
|
||||||
|
EXTENSION ${extension}
|
||||||
|
MIN_VERSION ${min_version}
|
||||||
|
DISABLED_PLATFORMS ${disabled_platforms}
|
||||||
|
)
|
||||||
|
|
||||||
|
# pass stuff to parent scope
|
||||||
|
set(${package}_ADDED "${${package}_ADDED}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
set(${package}_SOURCE_DIR "${${package}_SOURCE_DIR}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
set(${package}_BINARY_DIR "${${package}_BINARY_DIR}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_json_element("${object}" hash hash "")
|
||||||
|
get_json_element("${object}" hash_suffix hash_suffix "")
|
||||||
|
get_json_element("${object}" sha sha "")
|
||||||
|
get_json_element("${object}" url url "")
|
||||||
|
get_json_element("${object}" key key "")
|
||||||
|
get_json_element("${object}" tag tag "")
|
||||||
|
get_json_element("${object}" artifact artifact "")
|
||||||
|
get_json_element("${object}" git_version git_version "")
|
||||||
|
get_json_element("${object}" git_host git_host "")
|
||||||
|
get_json_element("${object}" source_subdir source_subdir "")
|
||||||
|
get_json_element("${object}" bundled bundled "unset")
|
||||||
|
get_json_element("${object}" find_args find_args "")
|
||||||
|
get_json_element("${object}" raw_patches patches "")
|
||||||
|
|
||||||
|
# okay here comes the fun part: REPLACEMENTS!
|
||||||
|
# first: tag gets %VERSION% replaced if applicable, with either git_version (preferred) or version
|
||||||
|
# second: artifact gets %VERSION% and %TAG% replaced accordingly (same rules for VERSION)
|
||||||
|
|
||||||
|
if (git_version)
|
||||||
|
set(version_replace ${git_version})
|
||||||
|
else()
|
||||||
|
set(version_replace ${version})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO(crueter): fmt module for cmake
|
||||||
|
if (tag)
|
||||||
|
string(REPLACE "%VERSION%" "${version_replace}" tag ${tag})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (artifact)
|
||||||
|
string(REPLACE "%VERSION%" "${version_replace}" artifact ${artifact})
|
||||||
|
string(REPLACE "%TAG%" "${tag}" artifact ${artifact})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# format patchdir
|
||||||
|
if (raw_patches)
|
||||||
|
math(EXPR range "${raw_patches_LENGTH} - 1")
|
||||||
|
|
||||||
|
foreach(IDX RANGE ${range})
|
||||||
|
string(JSON _patch GET "${raw_patches}" "${IDX}")
|
||||||
|
|
||||||
|
set(full_patch "${CMAKE_SOURCE_DIR}/.patch/${JSON_NAME}/${_patch}")
|
||||||
|
if (NOT EXISTS ${full_patch})
|
||||||
|
cpm_utils_message(FATAL_ERROR ${JSON_NAME} "specifies patch ${full_patch} which does not exist")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND patches "${full_patch}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
# end format patchdir
|
||||||
|
|
||||||
|
# options
|
||||||
|
get_json_element("${object}" raw_options options "")
|
||||||
|
|
||||||
|
if (raw_options)
|
||||||
|
array_to_list("${raw_options}" ${raw_options_LENGTH} options)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(options ${options} ${JSON_OPTIONS})
|
||||||
|
# end options
|
||||||
|
|
||||||
|
# system/bundled
|
||||||
|
if (bundled STREQUAL "unset" AND DEFINED JSON_BUNDLED_PACKAGE)
|
||||||
|
set(bundled ${JSON_BUNDLED_PACKAGE})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
AddPackage(
|
||||||
|
NAME "${package}"
|
||||||
|
VERSION "${version}"
|
||||||
|
URL "${url}"
|
||||||
|
HASH "${hash}"
|
||||||
|
HASH_SUFFIX "${hash_suffix}"
|
||||||
|
SHA "${sha}"
|
||||||
|
REPO "${repo}"
|
||||||
|
KEY "${key}"
|
||||||
|
PATCHES "${patches}"
|
||||||
|
OPTIONS "${options}"
|
||||||
|
FIND_PACKAGE_ARGUMENTS "${find_args}"
|
||||||
|
BUNDLED_PACKAGE "${bundled}"
|
||||||
|
SOURCE_SUBDIR "${source_subdir}"
|
||||||
|
|
||||||
|
GIT_VERSION ${git_version}
|
||||||
|
GIT_HOST ${git_host}
|
||||||
|
|
||||||
|
ARTIFACT ${artifact}
|
||||||
|
TAG ${tag}
|
||||||
|
)
|
||||||
|
|
||||||
|
# pass stuff to parent scope
|
||||||
|
set(${package}_ADDED "${${package}_ADDED}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
set(${package}_SOURCE_DIR "${${package}_SOURCE_DIR}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
set(${package}_BINARY_DIR "${${package}_BINARY_DIR}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(AddPackage)
|
function(AddPackage)
|
||||||
cpm_set_policies()
|
cpm_set_policies()
|
||||||
|
|
||||||
# TODO(crueter): docs, git clone
|
# TODO(crueter): git clone?
|
||||||
|
|
||||||
#[[
|
#[[
|
||||||
URL configurations, descending order of precedence:
|
URL configurations, descending order of precedence:
|
||||||
|
@ -48,6 +259,7 @@ function(AddPackage)
|
||||||
NAME
|
NAME
|
||||||
VERSION
|
VERSION
|
||||||
GIT_VERSION
|
GIT_VERSION
|
||||||
|
GIT_HOST
|
||||||
|
|
||||||
REPO
|
REPO
|
||||||
TAG
|
TAG
|
||||||
|
@ -64,10 +276,9 @@ function(AddPackage)
|
||||||
GIT_URL
|
GIT_URL
|
||||||
|
|
||||||
KEY
|
KEY
|
||||||
DOWNLOAD_ONLY
|
|
||||||
FIND_PACKAGE_ARGUMENTS
|
|
||||||
SYSTEM_PACKAGE
|
|
||||||
BUNDLED_PACKAGE
|
BUNDLED_PACKAGE
|
||||||
|
FORCE_BUNDLED_PACKAGE
|
||||||
|
FIND_PACKAGE_ARGUMENTS
|
||||||
)
|
)
|
||||||
|
|
||||||
set(multiValueArgs OPTIONS PATCHES)
|
set(multiValueArgs OPTIONS PATCHES)
|
||||||
|
@ -79,11 +290,20 @@ function(AddPackage)
|
||||||
cpm_utils_message(FATAL_ERROR "package" "No package name defined")
|
cpm_utils_message(FATAL_ERROR "package" "No package name defined")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(${PKG_ARGS_NAME}_FORCE_SYSTEM "Force the system package for ${PKG_ARGS_NAME}")
|
||||||
|
option(${PKG_ARGS_NAME}_FORCE_BUNDLED "Force the bundled package for ${PKG_ARGS_NAME}")
|
||||||
|
|
||||||
|
if (NOT DEFINED PKG_ARGS_GIT_HOST)
|
||||||
|
set(git_host github.com)
|
||||||
|
else()
|
||||||
|
set(git_host ${PKG_ARGS_GIT_HOST})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_URL)
|
if (DEFINED PKG_ARGS_URL)
|
||||||
set(pkg_url ${PKG_ARGS_URL})
|
set(pkg_url ${PKG_ARGS_URL})
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_REPO)
|
if (DEFINED PKG_ARGS_REPO)
|
||||||
set(pkg_git_url https://github.com/${PKG_ARGS_REPO})
|
set(pkg_git_url https://${git_host}/${PKG_ARGS_REPO})
|
||||||
else()
|
else()
|
||||||
if (DEFINED PKG_ARGS_GIT_URL)
|
if (DEFINED PKG_ARGS_GIT_URL)
|
||||||
set(pkg_git_url ${PKG_ARGS_GIT_URL})
|
set(pkg_git_url ${PKG_ARGS_GIT_URL})
|
||||||
|
@ -92,7 +312,7 @@ function(AddPackage)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (DEFINED PKG_ARGS_REPO)
|
elseif (DEFINED PKG_ARGS_REPO)
|
||||||
set(pkg_git_url https://github.com/${PKG_ARGS_REPO})
|
set(pkg_git_url https://${git_host}/${PKG_ARGS_REPO})
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_TAG)
|
if (DEFINED PKG_ARGS_TAG)
|
||||||
set(pkg_key ${PKG_ARGS_TAG})
|
set(pkg_key ${PKG_ARGS_TAG})
|
||||||
|
@ -123,25 +343,23 @@ function(AddPackage)
|
||||||
|
|
||||||
cpm_utils_message(STATUS ${PKG_ARGS_NAME} "Download URL is ${pkg_url}")
|
cpm_utils_message(STATUS ${PKG_ARGS_NAME} "Download URL is ${pkg_url}")
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_GIT_VERSION)
|
|
||||||
set(git_version ${PKG_ARGS_VERSION})
|
|
||||||
elseif(DEFINED PKG_ARGS_VERSION)
|
|
||||||
set(git_version ${PKG_ARGS_GIT_VERSION})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED PKG_ARGS_KEY)
|
if (NOT DEFINED PKG_ARGS_KEY)
|
||||||
if (DEFINED PKG_ARGS_SHA)
|
if (DEFINED PKG_ARGS_SHA)
|
||||||
string(SUBSTRING ${PKG_ARGS_SHA} 0 4 pkg_key)
|
string(SUBSTRING ${PKG_ARGS_SHA} 0 4 pkg_key)
|
||||||
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
"No custom key defined, using ${pkg_key} from sha")
|
"No custom key defined, using ${pkg_key} from sha")
|
||||||
elseif (DEFINED git_version)
|
elseif(DEFINED PKG_ARGS_GIT_VERSION)
|
||||||
set(pkg_key ${git_version})
|
set(pkg_key ${PKG_ARGS_GIT_VERSION})
|
||||||
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
"No custom key defined, using ${pkg_key}")
|
"No custom key defined, using ${pkg_key}")
|
||||||
elseif (DEFINED PKG_ARGS_TAG)
|
elseif (DEFINED PKG_ARGS_TAG)
|
||||||
set(pkg_key ${PKG_ARGS_TAG})
|
set(pkg_key ${PKG_ARGS_TAG})
|
||||||
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
"No custom key defined, using ${pkg_key}")
|
"No custom key defined, using ${pkg_key}")
|
||||||
|
elseif (DEFINED PKG_ARGS_VERSION)
|
||||||
|
set(pkg_key ${PKG_ARGS_VERSION})
|
||||||
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
|
"No custom key defined, using ${pkg_key}")
|
||||||
else()
|
else()
|
||||||
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
||||||
"Could not determine cache key, using CPM defaults")
|
"Could not determine cache key, using CPM defaults")
|
||||||
|
@ -178,30 +396,67 @@ function(AddPackage)
|
||||||
if (DEFINED hash_url)
|
if (DEFINED hash_url)
|
||||||
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${PKG_ARGS_NAME}.hash)
|
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${PKG_ARGS_NAME}.hash)
|
||||||
|
|
||||||
file(DOWNLOAD ${hash_url} ${outfile})
|
# TODO(crueter): This is kind of a bad solution
|
||||||
file(READ ${outfile} pkg_hash_tmp)
|
# because "technically" the hash is invalidated each week
|
||||||
file(REMOVE ${outfile})
|
# but it works for now kjsdnfkjdnfjksdn
|
||||||
|
string(TOLOWER ${PKG_ARGS_NAME} lowername)
|
||||||
|
if (NOT EXISTS ${outfile} AND NOT EXISTS ${CPM_SOURCE_CACHE}/${lowername}/${pkg_key})
|
||||||
|
file(DOWNLOAD ${hash_url} ${outfile})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(pkg_hash "${hash_algo}=${pkg_hash_tmp}")
|
if (EXISTS ${outfile})
|
||||||
|
file(READ ${outfile} pkg_hash_tmp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED ${pkg_hash_tmp})
|
||||||
|
set(pkg_hash "${hash_algo}=${pkg_hash_tmp}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT CPMUTIL_DEFAULT_SYSTEM)
|
macro(set_precedence local force)
|
||||||
set(CPM_USE_LOCAL_PACKAGES OFF)
|
set(CPM_USE_LOCAL_PACKAGES ${local})
|
||||||
elseif (DEFINED PKG_ARGS_SYSTEM_PACKAGE)
|
set(CPM_LOCAL_PACKAGES_ONLY ${force})
|
||||||
set(CPM_USE_LOCAL_PACKAGES ${PKG_ARGS_SYSTEM_PACKAGE})
|
endmacro()
|
||||||
elseif (DEFINED PKG_ARGS_BUNDLED_PACKAGE)
|
|
||||||
|
#[[
|
||||||
|
Precedence:
|
||||||
|
- package_FORCE_SYSTEM
|
||||||
|
- package_FORCE_BUNDLED
|
||||||
|
- CPMUTIL_FORCE_SYSTEM
|
||||||
|
- CPMUTIL_FORCE_BUNDLED
|
||||||
|
- BUNDLED_PACKAGE
|
||||||
|
- default to allow local
|
||||||
|
]]#
|
||||||
|
if (PKG_ARGS_FORCE_BUNDLED_PACKAGE)
|
||||||
|
set_precedence(OFF OFF)
|
||||||
|
elseif (${PKG_ARGS_NAME}_FORCE_SYSTEM)
|
||||||
|
set_precedence(ON ON)
|
||||||
|
elseif (${PKG_ARGS_NAME}_FORCE_BUNDLED)
|
||||||
|
set_precedence(OFF OFF)
|
||||||
|
elseif (CPMUTIL_FORCE_SYSTEM)
|
||||||
|
set_precedence(ON ON)
|
||||||
|
elseif(CPMUTIL_FORCE_BUNDLED)
|
||||||
|
set_precedence(OFF OFF)
|
||||||
|
elseif (DEFINED PKG_ARGS_BUNDLED_PACKAGE AND NOT PKG_ARGS_BUNDLED_PACKAGE STREQUAL "unset")
|
||||||
if (PKG_ARGS_BUNDLED_PACKAGE)
|
if (PKG_ARGS_BUNDLED_PACKAGE)
|
||||||
set(CPM_USE_LOCAL_PACKAGES OFF)
|
set(local OFF)
|
||||||
else()
|
else()
|
||||||
set(CPM_USE_LOCAL_PACKAGES ON)
|
set(local ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set_precedence(${local} OFF)
|
||||||
else()
|
else()
|
||||||
set(CPM_USE_LOCAL_PACKAGES ON)
|
set_precedence(ON OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED PKG_ARGS_VERSION)
|
||||||
|
list(APPEND EXTRA_ARGS
|
||||||
|
VERSION ${PKG_ARGS_VERSION}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CPMAddPackage(
|
CPMAddPackage(
|
||||||
NAME ${PKG_ARGS_NAME}
|
NAME ${PKG_ARGS_NAME}
|
||||||
VERSION ${PKG_ARGS_VERSION}
|
|
||||||
URL ${pkg_url}
|
URL ${pkg_url}
|
||||||
URL_HASH ${pkg_hash}
|
URL_HASH ${pkg_hash}
|
||||||
CUSTOM_CACHE_KEY ${pkg_key}
|
CUSTOM_CACHE_KEY ${pkg_key}
|
||||||
|
@ -210,6 +465,9 @@ function(AddPackage)
|
||||||
|
|
||||||
OPTIONS ${PKG_ARGS_OPTIONS}
|
OPTIONS ${PKG_ARGS_OPTIONS}
|
||||||
PATCHES ${PKG_ARGS_PATCHES}
|
PATCHES ${PKG_ARGS_PATCHES}
|
||||||
|
EXCLUDE_FROM_ALL ON
|
||||||
|
|
||||||
|
${EXTRA_ARGS}
|
||||||
|
|
||||||
${PKG_ARGS_UNPARSED_ARGUMENTS}
|
${PKG_ARGS_UNPARSED_ARGUMENTS}
|
||||||
)
|
)
|
||||||
|
@ -221,12 +479,15 @@ function(AddPackage)
|
||||||
if (DEFINED PKG_ARGS_SHA)
|
if (DEFINED PKG_ARGS_SHA)
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
${PKG_ARGS_SHA})
|
${PKG_ARGS_SHA})
|
||||||
elseif(DEFINED git_version)
|
elseif (DEFINED PKG_ARGS_GIT_VERSION)
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
${git_version})
|
${PKG_ARGS_GIT_VERSION})
|
||||||
elseif (DEFINED PKG_ARGS_TAG)
|
elseif (DEFINED PKG_ARGS_TAG)
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
${PKG_ARGS_TAG})
|
${PKG_ARGS_TAG})
|
||||||
|
elseif(DEFINED PKG_ARGS_VERSION)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
|
${PKG_ARGS_VERSION})
|
||||||
else()
|
else()
|
||||||
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
||||||
"Package has no specified sha, tag, or version")
|
"Package has no specified sha, tag, or version")
|
||||||
|
@ -257,24 +518,22 @@ function(add_ci_package key)
|
||||||
set(ARTIFACT ${ARTIFACT_NAME}-${key}-${ARTIFACT_VERSION}.${ARTIFACT_EXT})
|
set(ARTIFACT ${ARTIFACT_NAME}-${key}-${ARTIFACT_VERSION}.${ARTIFACT_EXT})
|
||||||
|
|
||||||
AddPackage(
|
AddPackage(
|
||||||
NAME ${ARTIFACT_PACKAGE}-${key}
|
NAME ${ARTIFACT_PACKAGE}
|
||||||
REPO ${ARTIFACT_REPO}
|
REPO ${ARTIFACT_REPO}
|
||||||
TAG v${ARTIFACT_VERSION}
|
TAG v${ARTIFACT_VERSION}
|
||||||
VERSION ${ARTIFACT_VERSION}
|
GIT_VERSION ${ARTIFACT_VERSION}
|
||||||
ARTIFACT ${ARTIFACT}
|
ARTIFACT ${ARTIFACT}
|
||||||
|
|
||||||
KEY ${key}
|
KEY ${key}-${ARTIFACT_VERSION}
|
||||||
HASH_SUFFIX sha512sum
|
HASH_SUFFIX sha512sum
|
||||||
BUNDLED_PACKAGE ON
|
FORCE_BUNDLED_PACKAGE ON
|
||||||
DOWNLOAD_ONLY ON
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT ARTIFACT_FORCE_DOWNLOAD OR ARTIFACT_OVERRIDE)
|
set(ARTIFACT_DIR ${${ARTIFACT_PACKAGE}_SOURCE_DIR} PARENT_SCOPE)
|
||||||
set(ARTIFACT_DIR ${${ARTIFACT_PACKAGE}-${key}_SOURCE_DIR} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# TODO(crueter): doc
|
# TODO(crueter): we could do an AddMultiArchPackage, multiplatformpackage?
|
||||||
|
# name is the artifact name, package is for find_package override
|
||||||
function(AddCIPackage)
|
function(AddCIPackage)
|
||||||
set(oneValueArgs
|
set(oneValueArgs
|
||||||
VERSION
|
VERSION
|
||||||
|
@ -282,11 +541,8 @@ function(AddCIPackage)
|
||||||
REPO
|
REPO
|
||||||
PACKAGE
|
PACKAGE
|
||||||
EXTENSION
|
EXTENSION
|
||||||
FORCE_DOWNLOAD
|
|
||||||
MIN_VERSION
|
MIN_VERSION
|
||||||
DISABLED_PLATFORMS
|
DISABLED_PLATFORMS
|
||||||
CMAKE_FILENAME
|
|
||||||
TARGET
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "" ${ARGN})
|
cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "" ${ARGN})
|
||||||
|
@ -316,12 +572,6 @@ function(AddCIPackage)
|
||||||
set(ARTIFACT_EXT ${PKG_ARGS_EXTENSION})
|
set(ARTIFACT_EXT ${PKG_ARGS_EXTENSION})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED PKG_ARGS_FORCE_DOWNLOAD)
|
|
||||||
set(ARTIFACT_FORCE_DOWNLOAD OFF)
|
|
||||||
else()
|
|
||||||
set(ARTIFACT_FORCE_DOWNLOAD ${PKG_ARGS_FORCE_DOWNLOAD})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_MIN_VERSION)
|
if (DEFINED PKG_ARGS_MIN_VERSION)
|
||||||
set(ARTIFACT_MIN_VERSION ${PKG_ARGS_MIN_VERSION})
|
set(ARTIFACT_MIN_VERSION ${PKG_ARGS_MIN_VERSION})
|
||||||
endif()
|
endif()
|
||||||
|
@ -336,86 +586,42 @@ function(AddCIPackage)
|
||||||
set(ARTIFACT_REPO ${PKG_ARGS_REPO})
|
set(ARTIFACT_REPO ${PKG_ARGS_REPO})
|
||||||
set(ARTIFACT_PACKAGE ${PKG_ARGS_PACKAGE})
|
set(ARTIFACT_PACKAGE ${PKG_ARGS_PACKAGE})
|
||||||
|
|
||||||
if ((MSVC AND ARCHITECTURE_x86_64) OR ARTIFACT_FORCE_DOWNLOAD AND NOT "windows-amd64" IN_LIST DISABLED_PLATFORMS)
|
if ((MSVC AND ARCHITECTURE_x86_64) AND NOT "windows-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
# kinda hacky
|
|
||||||
if(MSVC AND ARCHITECTURE_x86_64)
|
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(windows-amd64)
|
add_ci_package(windows-amd64)
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ((MSVC AND ARCHITECTURE_arm64) OR ARTIFACT_FORCE_DOWNLOAD AND NOT "windows-arm64" IN_LIST DISABLED_PLATFORMS)
|
if ((MSVC AND ARCHITECTURE_arm64) AND NOT "windows-arm64" IN_LIST DISABLED_PLATFORMS)
|
||||||
if(MSVC AND ARCHITECTURE_arm64)
|
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(windows-arm64)
|
add_ci_package(windows-arm64)
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ANDROID OR ARTIFACT_FORCE_DOWNLOAD AND NOT "android" IN_LIST DISABLED_PLATFORMS)
|
if (ANDROID AND NOT "android" IN_LIST DISABLED_PLATFORMS)
|
||||||
if(ANDROID)
|
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(android)
|
add_ci_package(android)
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM_SUN OR ARTIFACT_FORCE_DOWNLOAD AND NOT "solaris" IN_LIST DISABLED_PLATFORMS)
|
if(PLATFORM_SUN AND NOT "solaris-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
if(PLATFORM_SUN)
|
add_ci_package(solaris-amd64)
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(solaris)
|
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM_FREEBSD OR ARTIFACT_FORCE_DOWNLOAD AND NOT "freebsd" IN_LIST DISABLED_PLATFORMS)
|
if(PLATFORM_FREEBSD AND NOT "freebsd-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
if(PLATFORM_FREEBSD)
|
add_ci_package(freebsd-amd64)
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(freebsd)
|
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) OR ARTIFACT_FORCE_DOWNLOAD AND NOT "linux" IN_LIST DISABLED_PLATFORMS)
|
if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
if(PLATFORM_LINUX AND ARCHITECTURE_x86_64)
|
add_ci_package(linux-amd64)
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(linux)
|
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((PLATFORM_LINUX AND ARCHITECTURE_arm64) OR ARTIFACT_FORCE_DOWNLOAD AND NOT "linux-aarch64" IN_LIST DISABLED_PLATFORMS)
|
if((PLATFORM_LINUX AND ARCHITECTURE_arm64) AND NOT "linux-aarch64" IN_LIST DISABLED_PLATFORMS)
|
||||||
if(PLATFORM_LINUX AND ARCHITECTURE_arm64)
|
|
||||||
set(ARTIFACT_OVERRIDE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_ci_package(linux-aarch64)
|
add_ci_package(linux-aarch64)
|
||||||
set(ARTIFACT_OVERRIDE OFF)
|
endif()
|
||||||
|
|
||||||
|
# TODO(crueter): macOS amd64/aarch64 split mayhaps
|
||||||
|
if (APPLE AND NOT "macos-universal" IN_LIST DISABLED_PLATFORMS)
|
||||||
|
add_ci_package(macos-universal)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DEFINED ARTIFACT_DIR)
|
if (DEFINED ARTIFACT_DIR)
|
||||||
if (NOT DEFINED PKG_ARGS_TARGET OR NOT TARGET "${PKG_ARGS_TARGET}")
|
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
|
||||||
include(${ARTIFACT_DIR}/${ARTIFACT_CMAKE}.cmake)
|
set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${ARTIFACT_DIR}" PARENT_SCOPE)
|
||||||
|
|
||||||
# Overrides find package
|
|
||||||
CPMAddPackage(
|
|
||||||
NAME ${ARTIFACT_PACKAGE}
|
|
||||||
SOURCE_DIR ${ARTIFACT_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_NAMES ${ARTIFACT_NAME})
|
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_URLS "https://github.com/${ARTIFACT_REPO}") # TODO(crueter) other hosts?
|
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS ${ARTIFACT_VERSION})
|
|
||||||
|
|
||||||
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
find_package(${ARTIFACT_PACKAGE} ${ARTIFACT_MIN_VERSION} REQUIRED)
|
find_package(${ARTIFACT_PACKAGE} ${ARTIFACT_MIN_VERSION} REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -10,11 +10,19 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
||||||
set(package_base_url "https://github.com/eden-emulator/")
|
set(package_base_url "https://github.com/eden-emulator/")
|
||||||
set(package_repo "no_platform")
|
set(package_repo "no_platform")
|
||||||
set(package_extension "no_platform")
|
set(package_extension "no_platform")
|
||||||
|
set(CACHE_KEY "")
|
||||||
|
|
||||||
|
# TODO(crueter): Need to convert ffmpeg to a CI.
|
||||||
if (WIN32 OR FORCE_WIN_ARCHIVES)
|
if (WIN32 OR FORCE_WIN_ARCHIVES)
|
||||||
set(CACHE_KEY "windows")
|
if (ARCHITECTURE_arm64)
|
||||||
set(package_repo "ext-windows-bin/raw/master/")
|
set(CACHE_KEY "windows")
|
||||||
set(package_extension ".7z")
|
set(package_repo "ext-windows-arm64-bin/raw/master/")
|
||||||
|
set(package_extension ".zip")
|
||||||
|
elseif(ARCHITECTURE_x86_64)
|
||||||
|
set(CACHE_KEY "windows")
|
||||||
|
set(package_repo "ext-windows-bin/raw/master/")
|
||||||
|
set(package_extension ".7z")
|
||||||
|
endif()
|
||||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
set(CACHE_KEY "linux")
|
set(CACHE_KEY "linux")
|
||||||
set(package_repo "ext-linux-bin/raw/master/")
|
set(package_repo "ext-linux-bin/raw/master/")
|
||||||
|
@ -26,9 +34,11 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "No package available for this platform")
|
message(FATAL_ERROR "No package available for this platform")
|
||||||
endif()
|
endif()
|
||||||
set(package_url "${package_base_url}${package_repo}")
|
string(CONCAT package_url "${package_base_url}" "${package_repo}")
|
||||||
set(full_url ${package_url}${remote_path}${lib_name}${package_extension})
|
string(CONCAT full_url "${package_url}" "${remote_path}" "${lib_name}" "${package_extension}")
|
||||||
|
message(STATUS "Resolved bundled URL: ${full_url}")
|
||||||
|
|
||||||
|
# TODO(crueter): DELETE THIS ENTIRELY, GLORY BE TO THE CI!
|
||||||
AddPackage(
|
AddPackage(
|
||||||
NAME ${cpm_key}
|
NAME ${cpm_key}
|
||||||
VERSION ${version}
|
VERSION ${version}
|
||||||
|
@ -39,35 +49,12 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
||||||
# TODO(crueter): hash
|
# TODO(crueter): hash
|
||||||
)
|
)
|
||||||
|
|
||||||
set(${prefix_var} "${${cpm_key}_SOURCE_DIR}" PARENT_SCOPE)
|
if (DEFINED ${cpm_key}_SOURCE_DIR)
|
||||||
message(STATUS "Using bundled binaries at ${${cpm_key}_SOURCE_DIR}")
|
set(${prefix_var} "${${cpm_key}_SOURCE_DIR}" PARENT_SCOPE)
|
||||||
endfunction()
|
message(STATUS "Using bundled binaries at ${${cpm_key}_SOURCE_DIR}")
|
||||||
|
else()
|
||||||
function(download_win_archives)
|
message(FATAL_ERROR "AddPackage did not set ${cpm_key}_SOURCE_DIR")
|
||||||
set(FORCE_WIN_ARCHIVES ON)
|
|
||||||
set(FFmpeg_EXT_NAME "ffmpeg-7.1.1")
|
|
||||||
|
|
||||||
download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "ffmpeg-bundled" "" 7.1.1)
|
|
||||||
|
|
||||||
set(FORCE_WIN_ARCHIVES OFF)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(download_moltenvk_external platform version)
|
|
||||||
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
|
||||||
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
|
||||||
if (NOT EXISTS ${MOLTENVK_DIR})
|
|
||||||
if (NOT EXISTS ${MOLTENVK_TAR})
|
|
||||||
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/${version}/MoltenVK-${platform}.tar
|
|
||||||
${MOLTENVK_TAR} SHOW_PROGRESS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
|
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add the MoltenVK library path to the prefix so find_library can locate it.
|
|
||||||
list(APPEND CMAKE_PREFIX_PATH "${MOLTENVK_DIR}/MoltenVK/dylib/${platform}")
|
|
||||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Determine installation parameters for OS, architecture, and compiler
|
# Determine installation parameters for OS, architecture, and compiler
|
||||||
|
@ -109,7 +96,7 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
|
||||||
set(host "linux")
|
set(host "linux")
|
||||||
set(type "desktop")
|
set(type "desktop")
|
||||||
set(arch "linux_gcc_64")
|
set(arch "linux_gcc_64")
|
||||||
set(arch_path "linux")
|
set(arch_path "gcc_64")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(${host_out} "${host}" PARENT_SCOPE)
|
set(${host_out} "${host}" PARENT_SCOPE)
|
||||||
|
@ -144,56 +131,79 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba
|
||||||
set(install_args -c "${CURRENT_MODULE_DIR}/aqt_config.ini")
|
set(install_args -c "${CURRENT_MODULE_DIR}/aqt_config.ini")
|
||||||
if (tool)
|
if (tool)
|
||||||
set(prefix "${base_path}/Tools")
|
set(prefix "${base_path}/Tools")
|
||||||
set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target})
|
list(APPEND install_args install-tool --outputdir "${base_path}" "${host}" desktop "${target}")
|
||||||
else()
|
else()
|
||||||
set(prefix "${base_path}/${target}/${arch_path}")
|
set(prefix "${base_path}/${target}/${arch_path}")
|
||||||
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt_base)
|
list(APPEND install_args install-qt --outputdir "${base_path}" "${host}" "${type}" "${target}" "${arch}" -m qt_base)
|
||||||
|
|
||||||
if (YUZU_USE_QT_MULTIMEDIA)
|
if (YUZU_USE_QT_MULTIMEDIA)
|
||||||
set(install_args ${install_args} qtmultimedia)
|
list(APPEND install_args qtmultimedia)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_USE_QT_WEB_ENGINE)
|
if (YUZU_USE_QT_WEB_ENGINE)
|
||||||
set(install_args ${install_args} qtpositioning qtwebchannel qtwebengine)
|
list(APPEND install_args qtpositioning qtwebchannel qtwebengine)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT ${YUZU_QT_MIRROR} STREQUAL "")
|
if (NOT "${YUZU_QT_MIRROR}" STREQUAL "")
|
||||||
message(STATUS "Using Qt mirror ${YUZU_QT_MIRROR}")
|
message(STATUS "Using Qt mirror ${YUZU_QT_MIRROR}")
|
||||||
set(install_args ${install_args} -b ${YUZU_QT_MIRROR})
|
list(APPEND install_args -b "${YUZU_QT_MIRROR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Install Args ${install_args}")
|
message(STATUS "Install Args: ${install_args}")
|
||||||
|
|
||||||
if (NOT EXISTS "${prefix}")
|
if (NOT EXISTS "${prefix}")
|
||||||
message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}")
|
message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}")
|
||||||
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0")
|
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(aqt_path "${base_path}/aqt.exe")
|
set(aqt_path "${base_path}/aqt.exe")
|
||||||
if (NOT EXISTS "${aqt_path}")
|
if (NOT EXISTS "${aqt_path}")
|
||||||
file(DOWNLOAD
|
file(DOWNLOAD "${AQT_PREBUILD_BASE_URL}/aqt.exe" "${aqt_path}" SHOW_PROGRESS)
|
||||||
${AQT_PREBUILD_BASE_URL}/aqt.exe
|
endif()
|
||||||
${aqt_path} SHOW_PROGRESS)
|
execute_process(COMMAND "${aqt_path}" ${install_args}
|
||||||
|
WORKING_DIRECTORY "${base_path}"
|
||||||
|
RESULT_VARIABLE aqt_res
|
||||||
|
OUTPUT_VARIABLE aqt_out
|
||||||
|
ERROR_VARIABLE aqt_err)
|
||||||
|
if (NOT aqt_res EQUAL 0)
|
||||||
|
message(FATAL_ERROR "aqt.exe failed: ${aqt_err}")
|
||||||
endif()
|
endif()
|
||||||
execute_process(COMMAND ${aqt_path} ${install_args}
|
|
||||||
WORKING_DIRECTORY ${base_path})
|
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
set(aqt_path "${base_path}/aqt-macos")
|
set(aqt_path "${base_path}/aqt-macos")
|
||||||
if (NOT EXISTS "${aqt_path}")
|
if (NOT EXISTS "${aqt_path}")
|
||||||
file(DOWNLOAD
|
file(DOWNLOAD "${AQT_PREBUILD_BASE_URL}/aqt-macos" "${aqt_path}" SHOW_PROGRESS)
|
||||||
${AQT_PREBUILD_BASE_URL}/aqt-macos
|
endif()
|
||||||
${aqt_path} SHOW_PROGRESS)
|
execute_process(COMMAND chmod +x "${aqt_path}")
|
||||||
|
execute_process(COMMAND "${aqt_path}" ${install_args}
|
||||||
|
WORKING_DIRECTORY "${base_path}"
|
||||||
|
RESULT_VARIABLE aqt_res
|
||||||
|
ERROR_VARIABLE aqt_err)
|
||||||
|
if (NOT aqt_res EQUAL 0)
|
||||||
|
message(FATAL_ERROR "aqt-macos failed: ${aqt_err}")
|
||||||
endif()
|
endif()
|
||||||
execute_process(COMMAND chmod +x ${aqt_path})
|
|
||||||
execute_process(COMMAND ${aqt_path} ${install_args}
|
|
||||||
WORKING_DIRECTORY ${base_path})
|
|
||||||
else()
|
else()
|
||||||
|
find_program(PYTHON3_EXECUTABLE python3)
|
||||||
|
if (NOT PYTHON3_EXECUTABLE)
|
||||||
|
message(FATAL_ERROR "python3 is required to install Qt using aqt (pip mode).")
|
||||||
|
endif()
|
||||||
set(aqt_install_path "${base_path}/aqt")
|
set(aqt_install_path "${base_path}/aqt")
|
||||||
file(MAKE_DIRECTORY "${aqt_install_path}")
|
file(MAKE_DIRECTORY "${aqt_install_path}")
|
||||||
|
|
||||||
execute_process(COMMAND python3 -m pip install --target=${aqt_install_path} aqtinstall
|
execute_process(COMMAND "${PYTHON3_EXECUTABLE}" -m pip install --target="${aqt_install_path}" aqtinstall
|
||||||
WORKING_DIRECTORY ${base_path})
|
WORKING_DIRECTORY "${base_path}"
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${aqt_install_path} python3 -m aqt ${install_args}
|
RESULT_VARIABLE pip_res
|
||||||
WORKING_DIRECTORY ${base_path})
|
ERROR_VARIABLE pip_err)
|
||||||
|
if (NOT pip_res EQUAL 0)
|
||||||
|
message(FATAL_ERROR "pip install aqtinstall failed: ${pip_err}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(COMMAND "${CMAKE_COMMAND}" -E env PYTHONPATH="${aqt_install_path}" "${PYTHON3_EXECUTABLE}" -m aqt ${install_args}
|
||||||
|
WORKING_DIRECTORY "${base_path}"
|
||||||
|
RESULT_VARIABLE aqt_res
|
||||||
|
ERROR_VARIABLE aqt_err)
|
||||||
|
if (NOT aqt_res EQUAL 0)
|
||||||
|
message(FATAL_ERROR "aqt (python) failed: ${aqt_err}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Downloaded Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path} to ${prefix}")
|
message(STATUS "Downloaded Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path} to ${prefix}")
|
||||||
|
@ -211,7 +221,7 @@ endfunction()
|
||||||
function(download_qt target)
|
function(download_qt target)
|
||||||
determine_qt_parameters("${target}" host type arch arch_path host_type host_arch host_arch_path)
|
determine_qt_parameters("${target}" host type arch arch_path host_type host_arch host_arch_path)
|
||||||
|
|
||||||
get_external_prefix(qt base_path)
|
set(base_path "${CMAKE_BINARY_DIR}/externals/qt")
|
||||||
file(MAKE_DIRECTORY "${base_path}")
|
file(MAKE_DIRECTORY "${base_path}")
|
||||||
|
|
||||||
download_qt_configuration(prefix "${target}" "${host}" "${type}" "${arch}" "${arch_path}" "${base_path}")
|
download_qt_configuration(prefix "${target}" "${host}" "${type}" "${arch}" "${arch_path}" "${base_path}")
|
||||||
|
@ -228,26 +238,34 @@ function(download_qt target)
|
||||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(download_moltenvk)
|
function(download_moltenvk version platform)
|
||||||
set(MOLTENVK_PLATFORM "macOS")
|
if(NOT version)
|
||||||
|
message(FATAL_ERROR "download_moltenvk: version argument is required")
|
||||||
|
endif()
|
||||||
|
if(NOT platform)
|
||||||
|
message(FATAL_ERROR "download_moltenvk: platform argument is required")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
||||||
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
||||||
if (NOT EXISTS ${MOLTENVK_DIR})
|
|
||||||
if (NOT EXISTS ${MOLTENVK_TAR})
|
|
||||||
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.10-rc2/MoltenVK-all.tar
|
|
||||||
${MOLTENVK_TAR} SHOW_PROGRESS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
|
if(NOT EXISTS "${MOLTENVK_DIR}")
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
if(NOT EXISTS "${MOLTENVK_TAR}")
|
||||||
endif()
|
file(DOWNLOAD "https://github.com/KhronosGroup/MoltenVK/releases/download/${version}/MoltenVK-${platform}.tar"
|
||||||
|
"${MOLTENVK_TAR}" SHOW_PROGRESS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Add the MoltenVK library path to the prefix so find_library can locate it.
|
execute_process(
|
||||||
list(APPEND CMAKE_PREFIX_PATH "${MOLTENVK_DIR}/MoltenVK/dylib/${MOLTENVK_PLATFORM}")
|
COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
|
||||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals"
|
||||||
|
RESULT_VARIABLE tar_res
|
||||||
|
ERROR_VARIABLE tar_err
|
||||||
|
)
|
||||||
|
if(NOT tar_res EQUAL 0)
|
||||||
|
message(FATAL_ERROR "Extracting MoltenVK failed: ${tar_err}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
list(APPEND CMAKE_PREFIX_PATH "${MOLTENVK_DIR}/MoltenVK/dylib/${platform}")
|
||||||
|
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(get_external_prefix lib_name prefix_var)
|
|
||||||
set(${prefix_var} "${CMAKE_BINARY_DIR}/externals/${lib_name}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
19
CMakeModules/FindSPIRV-Tools.cmake
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(SPIRV-Tools QUIET IMPORTED_TARGET SPIRV-Tools)
|
||||||
|
find_package_handle_standard_args(SPIRV-Tools
|
||||||
|
REQUIRED_VARS SPIRV-Tools_LINK_LIBRARIES
|
||||||
|
VERSION_VAR SPIRV-Tools_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (SPIRV-Tools_FOUND AND NOT TARGET SPIRV-Tools::SPIRV-Tools)
|
||||||
|
if (TARGET SPIRV-Tools)
|
||||||
|
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools)
|
||||||
|
else()
|
||||||
|
add_library(SPIRV-Tools::SPIRV-Tools ALIAS PkgConfig::SPIRV-Tools)
|
||||||
|
endif()
|
||||||
|
endif()
|
|
@ -3,24 +3,22 @@
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
find_package(zstd QUIET CONFIG)
|
find_package(PkgConfig QUIET)
|
||||||
if (zstd_CONSIDERED_CONFIGS)
|
pkg_search_module(ZSTD QUIET IMPORTED_TARGET libzstd)
|
||||||
find_package_handle_standard_args(zstd CONFIG_MODE)
|
find_package_handle_standard_args(zstd
|
||||||
else()
|
REQUIRED_VARS ZSTD_LINK_LIBRARIES
|
||||||
find_package(PkgConfig QUIET)
|
VERSION_VAR ZSTD_VERSION
|
||||||
pkg_search_module(ZSTD QUIET IMPORTED_TARGET libzstd)
|
)
|
||||||
find_package_handle_standard_args(zstd
|
|
||||||
REQUIRED_VARS ZSTD_LINK_LIBRARIES
|
|
||||||
VERSION_VAR ZSTD_VERSION
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (zstd_FOUND AND NOT TARGET zstd::zstd)
|
if (zstd_FOUND AND NOT TARGET zstd::zstd)
|
||||||
if (TARGET zstd::libzstd_shared)
|
if (TARGET zstd::libzstd_shared)
|
||||||
add_library(zstd::zstd ALIAS zstd::libzstd_shared)
|
add_library(zstd::zstd ALIAS zstd::libzstd_shared)
|
||||||
|
add_library(zstd::libzstd ALIAS zstd::libzstd_shared)
|
||||||
elseif (TARGET zstd::libzstd_static)
|
elseif (TARGET zstd::libzstd_static)
|
||||||
add_library(zstd::zstd ALIAS zstd::libzstd_static)
|
add_library(zstd::zstd ALIAS zstd::libzstd_static)
|
||||||
|
add_library(zstd::libzstd ALIAS zstd::libzstd_static)
|
||||||
else()
|
else()
|
||||||
add_library(zstd::zstd ALIAS PkgConfig::ZSTD)
|
add_library(zstd::zstd ALIAS PkgConfig::ZSTD)
|
||||||
|
add_library(zstd::libzstd ALIAS PkgConfig::ZSTD)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,38 +1,41 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
# Gets a UTC timestamp and sets the provided variable to it
|
# generate git/build information
|
||||||
|
include(GetSCMRev)
|
||||||
|
|
||||||
function(get_timestamp _var)
|
function(get_timestamp _var)
|
||||||
string(TIMESTAMP timestamp UTC)
|
string(TIMESTAMP timestamp UTC)
|
||||||
set(${_var} "${timestamp}" PARENT_SCOPE)
|
set(${_var} "${timestamp}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# generate git/build information
|
|
||||||
include(GetGitRevisionDescription)
|
|
||||||
if(NOT GIT_REF_SPEC)
|
|
||||||
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
|
||||||
endif()
|
|
||||||
if(NOT GIT_DESC)
|
|
||||||
git_describe(GIT_DESC --always --long --dirty)
|
|
||||||
endif()
|
|
||||||
if (NOT GIT_BRANCH)
|
|
||||||
git_branch_name(GIT_BRANCH)
|
|
||||||
endif()
|
|
||||||
get_timestamp(BUILD_DATE)
|
get_timestamp(BUILD_DATE)
|
||||||
|
|
||||||
git_get_exact_tag(GIT_TAG --tags)
|
if (DEFINED GIT_RELEASE)
|
||||||
if (GIT_TAG MATCHES "NOTFOUND")
|
set(BUILD_VERSION "${GIT_TAG}")
|
||||||
set(BUILD_VERSION "${GIT_DESC}")
|
set(GIT_REFSPEC "${GIT_RELEASE}")
|
||||||
set(IS_DEV_BUILD true)
|
|
||||||
else()
|
|
||||||
set(BUILD_VERSION ${GIT_TAG})
|
|
||||||
set(IS_DEV_BUILD false)
|
set(IS_DEV_BUILD false)
|
||||||
|
else()
|
||||||
|
string(SUBSTRING ${GIT_COMMIT} 0 10 BUILD_VERSION)
|
||||||
|
set(BUILD_VERSION "${BUILD_VERSION}-${GIT_REFSPEC}")
|
||||||
|
set(IS_DEV_BUILD true)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(GIT_DESC ${BUILD_VERSION})
|
||||||
|
|
||||||
# Generate cpp with Git revision from template
|
# Generate cpp with Git revision from template
|
||||||
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
||||||
set(REPO_NAME "Eden")
|
set(REPO_NAME "Eden")
|
||||||
set(BUILD_ID ${GIT_BRANCH})
|
set(BUILD_ID ${GIT_REFSPEC})
|
||||||
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
||||||
|
set(CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
|
|
||||||
|
# Auto-updater metadata! Must somewhat mirror GitHub API endpoint
|
||||||
|
set(BUILD_AUTO_UPDATE_WEBSITE "https://github.com")
|
||||||
|
set(BUILD_AUTO_UPDATE_API "http://api.github.com")
|
||||||
|
set(BUILD_AUTO_UPDATE_REPO "eden-emulator/Releases")
|
||||||
|
|
||||||
configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)
|
configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)
|
||||||
|
|
49
CMakeModules/GetSCMRev.cmake
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 crueter
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
|
||||||
|
function(trim var)
|
||||||
|
string(REGEX REPLACE "\n" "" new "${${var}}")
|
||||||
|
set(${var} ${new} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
set(TAG_FILE ${CMAKE_SOURCE_DIR}/GIT-TAG)
|
||||||
|
set(REF_FILE ${CMAKE_SOURCE_DIR}/GIT-REFSPEC)
|
||||||
|
set(COMMIT_FILE ${CMAKE_SOURCE_DIR}/GIT-COMMIT)
|
||||||
|
set(RELEASE_FILE ${CMAKE_SOURCE_DIR}/GIT-RELEASE)
|
||||||
|
|
||||||
|
if (EXISTS ${REF_FILE} AND EXISTS ${COMMIT_FILE})
|
||||||
|
file(READ ${REF_FILE} GIT_REFSPEC)
|
||||||
|
file(READ ${COMMIT_FILE} GIT_COMMIT)
|
||||||
|
else()
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_COMMIT)
|
||||||
|
git_branch_name(GIT_REFSPEC)
|
||||||
|
if (GIT_REFSPEC MATCHES "NOTFOUND")
|
||||||
|
set(GIT_REFSPEC 1.0.0)
|
||||||
|
set(GIT_COMMIT stable)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (EXISTS ${TAG_FILE})
|
||||||
|
file(READ ${TAG_FILE} GIT_TAG)
|
||||||
|
else()
|
||||||
|
git_describe(GIT_TAG --tags --abbrev=0)
|
||||||
|
if (GIT_TAG MATCHES "NOTFOUND")
|
||||||
|
set(GIT_TAG "${GIT_REFSPEC}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (EXISTS ${RELEASE_FILE})
|
||||||
|
file(READ ${RELEASE_FILE} GIT_RELEASE)
|
||||||
|
trim(GIT_RELEASE)
|
||||||
|
message(STATUS "Git release: ${GIT_RELEASE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
trim(GIT_REFSPEC)
|
||||||
|
trim(GIT_COMMIT)
|
||||||
|
trim(GIT_TAG)
|
||||||
|
|
||||||
|
message(STATUS "Git commit: ${GIT_COMMIT}")
|
||||||
|
message(STATUS "Git tag: ${GIT_TAG}")
|
||||||
|
message(STATUS "Git refspec: ${GIT_REFSPEC}")
|
|
@ -1,3 +1,6 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -12,16 +15,25 @@ set(__windows_copy_files YES)
|
||||||
|
|
||||||
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
|
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
|
||||||
# This copying happens post-build.
|
# This copying happens post-build.
|
||||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||||
# windows commandline expects the / to be \ so switch them
|
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||||
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
# windows commandline expects the / to be \ so switch them
|
||||||
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
||||||
|
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
||||||
|
|
||||||
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
|
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
|
||||||
# cmake adds an extra check for command success which doesn't work too well with robocopy
|
# cmake adds an extra check for command success which doesn't work too well with robocopy
|
||||||
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
||||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||||
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
|
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
else()
|
||||||
|
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||||
|
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||||
|
COMMAND cp -ra ${SOURCE_DIR}/. ${DEST_DIR}
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
|
endif()
|
||||||
|
|
15
README.md
|
@ -48,6 +48,8 @@ A list of supported games will be available in future. Please be patient.
|
||||||
|
|
||||||
Check out our [website](https://eden-emu.dev) for the latest news on exciting features, monthly progress reports, and more!
|
Check out our [website](https://eden-emu.dev) for the latest news on exciting features, monthly progress reports, and more!
|
||||||
|
|
||||||
|
[](https://repology.org/project/eden-emulator/versions)
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/kXAmGCXBGD) or [Revolt](https://rvlt.gg/qKgFEAbH).
|
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/kXAmGCXBGD) or [Revolt](https://rvlt.gg/qKgFEAbH).
|
||||||
|
@ -55,14 +57,15 @@ You can also follow us on [X (Twitter)](https://x.com/edenemuofficial) for updat
|
||||||
|
|
||||||
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord or Revolt to learn more about the current state of the emulator.
|
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord or Revolt to learn more about the current state of the emulator.
|
||||||
|
|
||||||
|
See the [sign-up instructions](docs/SIGNUP.md) for information on registration.
|
||||||
|
|
||||||
|
Alternatively, if you wish to add translations, go to the [Eden project on Transifex](https://app.transifex.com/edenemu/eden-emulator) and review [the translations README](./dist/languages).
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
* **Windows**: [Windows Building Guide](./docs/build/Windows.md)
|
See the [General Build Guide](docs/Build.md)
|
||||||
* **Linux**: [Linux Building Guide](./docs/build/Linux.md)
|
|
||||||
* **Android**: [Android Building Guide](./docs/build/Android.md)
|
For information on provided development tooling, see the [Tools directory](./tools)
|
||||||
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
|
|
||||||
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
|
|
||||||
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
|
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
|
|
98
cpmfile.json
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
{
|
||||||
|
"openssl": {
|
||||||
|
"ci": true,
|
||||||
|
"package": "OpenSSL",
|
||||||
|
"name": "openssl",
|
||||||
|
"repo": "crueter-ci/OpenSSL",
|
||||||
|
"version": "3.6.0",
|
||||||
|
"min_version": "1.1.1",
|
||||||
|
"disabled_platforms": [
|
||||||
|
"macos-universal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"boost": {
|
||||||
|
"package": "Boost",
|
||||||
|
"repo": "boostorg/boost",
|
||||||
|
"tag": "boost-%VERSION%",
|
||||||
|
"artifact": "%TAG%-cmake.tar.xz",
|
||||||
|
"hash": "4fb7f6fde92762305aad8754d7643cd918dd1f3f67e104e9ab385b18c73178d72a17321354eb203b790b6702f2cf6d725a5d6e2dfbc63b1e35f9eb59fb42ece9",
|
||||||
|
"git_version": "1.89.0",
|
||||||
|
"version": "1.57",
|
||||||
|
"find_args": "CONFIG",
|
||||||
|
"patches": [
|
||||||
|
"0001-clang-cl.patch",
|
||||||
|
"0002-use-marmasm.patch",
|
||||||
|
"0003-armasm-options.patch"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fmt": {
|
||||||
|
"repo": "fmtlib/fmt",
|
||||||
|
"tag": "%VERSION%",
|
||||||
|
"hash": "c4ab814c20fbad7e3f0ae169125a4988a2795631194703251481dc36b18da65c886c4faa9acd046b0a295005217b3689eb0126108a9ba5aac2ca909aae263c2f",
|
||||||
|
"version": "8",
|
||||||
|
"git_version": "12.0.0"
|
||||||
|
},
|
||||||
|
"lz4": {
|
||||||
|
"name": "lz4",
|
||||||
|
"repo": "lz4/lz4",
|
||||||
|
"sha": "ebb370ca83",
|
||||||
|
"hash": "43600e87b35256005c0f2498fa56a77de6783937ba4cfce38c099f27c03188d097863e8a50c5779ca0a7c63c29c4f7ed0ae526ec798c1fd2e3736861b62e0a37",
|
||||||
|
"source_subdir": "build/cmake"
|
||||||
|
},
|
||||||
|
"nlohmann": {
|
||||||
|
"package": "nlohmann_json",
|
||||||
|
"repo": "nlohmann/json",
|
||||||
|
"tag": "v%VERSION%",
|
||||||
|
"hash": "6cc1e86261f8fac21cc17a33da3b6b3c3cd5c116755651642af3c9e99bb3538fd42c1bd50397a77c8fb6821bc62d90e6b91bcdde77a78f58f2416c62fc53b97d",
|
||||||
|
"version": "3.8",
|
||||||
|
"git_version": "3.12.0"
|
||||||
|
},
|
||||||
|
"zlib": {
|
||||||
|
"package": "ZLIB",
|
||||||
|
"repo": "madler/zlib",
|
||||||
|
"tag": "v%VERSION%",
|
||||||
|
"hash": "8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9088",
|
||||||
|
"version": "1.2",
|
||||||
|
"git_version": "1.3.1",
|
||||||
|
"options": [
|
||||||
|
"ZLIB_BUILD_SHARED OFF",
|
||||||
|
"ZLIB_INSTALL OFF"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"zstd": {
|
||||||
|
"repo": "facebook/zstd",
|
||||||
|
"sha": "b8d6101fba",
|
||||||
|
"hash": "a6c8e5272214fd3e65e03ae4fc375f452bd2f646623886664ee23e239e35751cfc842db4d34a84a8039d89fc8f76556121f2a4ae350d017bdff5e22150f9c3de",
|
||||||
|
"version": "1.5",
|
||||||
|
"source_subdir": "build/cmake",
|
||||||
|
"find_args": "MODULE",
|
||||||
|
"options": [
|
||||||
|
"ZSTD_BUILD_SHARED OFF"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"opus": {
|
||||||
|
"package": "Opus",
|
||||||
|
"repo": "crueter/opus",
|
||||||
|
"sha": "ab19c44fad",
|
||||||
|
"hash": "79d0d015b19e74ce6076197fc32b86fe91d724a0b5a79e86adfc4bdcb946ece384e252adbbf742b74d03040913b70bb0e9556eafa59ef20e42d2f3f4d6f2859a",
|
||||||
|
"version": "1.3",
|
||||||
|
"find_args": "MODULE",
|
||||||
|
"options": [
|
||||||
|
"OPUS_PRESUME_NEON ON"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"boost_headers": {
|
||||||
|
"repo": "boostorg/headers",
|
||||||
|
"sha": "95930ca8f5",
|
||||||
|
"hash": "d1dece16f3b209109de02123c537bfe1adf07a62b16c166367e7e5d62e0f7c323bf804c89b3192dd6871bc58a9d879d25a1cc3f7b9da0e497cf266f165816e2a",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
|
"llvm-mingw": {
|
||||||
|
"repo": "misc/llvm-mingw",
|
||||||
|
"git_host": "git.crueter.xyz",
|
||||||
|
"tag": "%VERSION%",
|
||||||
|
"version": "20250828",
|
||||||
|
"artifact": "clang-rt-builtins.tar.zst",
|
||||||
|
"hash": "d902392caf94e84f223766e2cc51ca5fab6cae36ab8dc6ef9ef6a683ab1c483bfcfe291ef0bd38ab16a4ecc4078344fa8af72da2f225ab4c378dee23f6186181"
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ Type=Application
|
||||||
Name=Eden
|
Name=Eden
|
||||||
GenericName=Switch Emulator
|
GenericName=Switch Emulator
|
||||||
Comment=Nintendo Switch video game console emulator
|
Comment=Nintendo Switch video game console emulator
|
||||||
Icon=org.eden_emu.eden
|
Icon=dev.eden_emu.eden
|
||||||
TryExec=eden
|
TryExec=eden
|
||||||
Exec=eden %f
|
Exec=eden %f
|
||||||
Categories=Game;Emulator;Qt;
|
Categories=Game;Emulator;Qt;
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
BIN
dist/icons/controller/applet_dual_joycon.png
vendored
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
dist/icons/controller/applet_dual_joycon_dark.png
vendored
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
dist/icons/controller/applet_handheld.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/controller/applet_handheld_dark.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
dist/icons/controller/applet_handheld_disabled.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/controller/applet_handheld_midnight.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
dist/icons/controller/applet_pro_controller.png
vendored
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
dist/icons/controller/applet_pro_controller_dark.png
vendored
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
dist/icons/controller/applet_single_joycon_left.png
vendored
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/controller/applet_single_joycon_right.png
vendored
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
dist/icons/overlay/arrow_left.png
vendored
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 687 B |
BIN
dist/icons/overlay/arrow_left_dark.png
vendored
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 687 B |
BIN
dist/icons/overlay/arrow_right.png
vendored
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 656 B |
BIN
dist/icons/overlay/arrow_right_dark.png
vendored
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 656 B |
BIN
dist/icons/overlay/button_A_dark.png
vendored
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
dist/icons/overlay/button_B_dark.png
vendored
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
dist/icons/overlay/button_L.png
vendored
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 564 B |
BIN
dist/icons/overlay/button_L_dark.png
vendored
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 563 B |
BIN
dist/icons/overlay/button_R.png
vendored
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
dist/icons/overlay/button_R_dark.png
vendored
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
dist/icons/overlay/button_X_dark.png
vendored
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
dist/icons/overlay/button_Y_dark.png
vendored
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2 KiB |
BIN
dist/icons/overlay/button_minus.png
vendored
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
dist/icons/overlay/button_minus_dark.png
vendored
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
dist/icons/overlay/button_plus.png
vendored
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
dist/icons/overlay/button_plus_dark.png
vendored
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
dist/icons/overlay/button_press_stick_dark.png
vendored
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
dist/icons/overlay/osk_button_B.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_B_dark.png
vendored
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_B_dark_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_B_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y_dark.png
vendored
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y_dark_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_plus.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/overlay/osk_button_plus_dark.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/overlay/osk_button_plus_dark_disabled.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |