mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 12:55:45 +00:00
Compare commits
184 commits
0.0.1-pre-
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
9dfe3cece0 | ||
|
d125994270 | ||
|
d42d379733 | ||
|
7cb8a1acd3 | ||
|
1a35aef644 | ||
|
2aab37b516 | ||
|
108daeeb39 | ||
|
a538126eb7 | ||
|
d7574b2878 | ||
|
e9ca3f4c06 | ||
|
a8564a09b7 | ||
|
2e092010e6 | ||
|
be59b4f15f | ||
|
2be7df287a | ||
|
492903cc7a | ||
|
f99488fe3e | ||
|
7b23cd0df4 | ||
![]() |
fe4f5a3860 | ||
|
a0a208db57 | ||
![]() |
c47f6615d3 | ||
|
1cd51d6545 | ||
|
5091759a47 | ||
|
03351a4f8b | ||
|
55a7797378 | ||
|
d5c58342e0 | ||
|
ae02310bdf | ||
|
cd394fc40f | ||
|
3df06da02c | ||
|
7f48f4efb6 | ||
|
e5074c90ad | ||
|
2f421923a6 | ||
|
5402773631 | ||
|
64f40c8b88 | ||
|
591a446bd1 | ||
|
312b3d4743 | ||
|
5bf1199feb | ||
|
97587d5dc9 | ||
|
ba9e0cd2b9 | ||
|
02baf03ad4 | ||
|
3e44389bfc | ||
|
693404bf37 | ||
|
347d54bc26 | ||
|
9d60900ecf | ||
|
789dacedca | ||
|
35f6afb031 | ||
|
38561cd7e3 | ||
|
05f536694a | ||
|
444109c251 | ||
|
0ce2ec3b36 | ||
|
d8bfc691d1 | ||
|
39a46d755f | ||
|
b60d0aabf0 | ||
|
aeb2aec13b | ||
|
cb3521272f | ||
|
64fe103afd | ||
|
5d4c6e085d | ||
|
a002730d68 | ||
|
c4a26be180 | ||
|
94c66f98bf | ||
|
2fe728766e | ||
|
fa600b88b1 | ||
|
09194cc5c3 | ||
|
b8150060c7 | ||
|
996400953e | ||
|
2bb54b422f | ||
|
5ddc889d8d | ||
|
11b152ab58 | ||
|
91a662431c | ||
|
b5b1d20e1e | ||
|
cac4345db9 | ||
|
43a22546cf | ||
|
1bdbe2071f | ||
|
e0501bfd74 | ||
|
fa423c68e8 | ||
|
cc9c3dd5a3 | ||
|
a1087ddec8 | ||
|
726e1e756d | ||
|
c88d0b3967 | ||
|
dceb3c2206 | ||
|
f121df0aa3 | ||
|
20bf141faa | ||
|
059d89441e | ||
|
e7ddc647f3 | ||
|
3f03ff46b4 | ||
|
03794d4773 | ||
|
37f890ec16 | ||
|
2e6a289a0b | ||
|
b2e602325c | ||
|
77b226a162 | ||
|
846ec85f24 | ||
|
59e69d91f4 | ||
|
02603abbdc | ||
|
2f01c69710 | ||
|
2946cdbd2d | ||
|
8c33b0bb5d | ||
|
6bf5ae700a | ||
|
704d4e4428 | ||
|
6aeba9de66 | ||
|
eae819f0d6 | ||
|
a4123200c0 | ||
|
5591ce30c9 | ||
|
af923c92eb | ||
|
cf00554d23 | ||
|
cee222f0e6 | ||
|
b2d16cb3dd | ||
|
ef2d0a9076 | ||
|
f3e00b633e | ||
|
cc7f2808ed | ||
|
6b46aca0b7 | ||
|
1037bff8ac | ||
|
b54e7a8e5e | ||
|
c4ca8d2367 | ||
|
8ff1b9d282 | ||
|
c6a87a661a | ||
|
5b361338c1 | ||
|
96afab0299 | ||
|
2665c5cc24 | ||
|
9bbf2c3df2 | ||
|
e6fc5f07d9 | ||
|
d37d47c0ab | ||
|
9755eb32b3 | ||
|
a9f9b207c2 | ||
|
5c1fc12d88 | ||
|
321bb5a17f | ||
|
4758e126b8 | ||
|
1240cd43d7 | ||
|
76fa525592 | ||
|
7e13da47af | ||
|
d2364ae1f7 | ||
|
4cc39b98d6 | ||
|
972576d2c5 | ||
|
810df8d01c | ||
|
6397bb0809 | ||
|
2d0f15ccac | ||
|
a793433da4 | ||
|
7eb5710f35 | ||
|
78fc80376b | ||
|
af8396808e | ||
|
fb3988a78a | ||
|
2a8ff1a59c | ||
|
eed703bc81 | ||
|
6c655321e6 | ||
|
c0cceff365 | ||
|
aaeaa884eb | ||
|
568ac9f7de | ||
|
621d1c3d8a | ||
|
7f16f12202 | ||
|
b78089e978 | ||
|
ed47533be8 | ||
|
54bfb6e905 | ||
|
e9e17b8fc2 | ||
|
e2f4c16d27 | ||
|
4235492079 | ||
|
71df7b1451 | ||
|
7df3692bcd | ||
|
334ba28225 | ||
|
0329234c25 | ||
|
15fb1f78b3 | ||
|
bad2232874 | ||
|
c79b7f82c8 | ||
|
b1b6e0064f | ||
|
28e05a5108 | ||
|
ce6b506b02 | ||
|
ebd3605313 | ||
|
1b2bccf51f | ||
|
1f8b8e0fa1 | ||
|
bc55ed496f | ||
|
244c07c999 | ||
|
ed4b011cad | ||
|
3cad73dad6 | ||
|
89c06a7383 | ||
|
ea7b9519c7 | ||
|
a776f5bc3b | ||
|
cda9f32b16 | ||
|
ce5d5d2aff | ||
|
049cc54f4c | ||
|
9d7075254d | ||
|
8254a0e0de | ||
|
daab352512 | ||
|
e14a42b6ba | ||
|
343c620250 | ||
|
dbd745138e | ||
|
5608ab1cd4 | ||
|
7e943732bf |
4541 changed files with 1262874 additions and 45260 deletions
|
@ -5,10 +5,10 @@
|
|||
|
||||
export NDK_CCACHE=$(which ccache)
|
||||
|
||||
# keystore & pass are stored locally
|
||||
export ANDROID_KEYSTORE_FILE=~/android.keystore
|
||||
export ANDROID_KEYSTORE_PASS=`cat ~/android.pass`
|
||||
export ANDROID_KEY_ALIAS=`cat ~/android.alias`
|
||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
|
||||
base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
|
||||
fi
|
||||
|
||||
cd src/android
|
||||
chmod +x ./gradlew
|
||||
|
@ -16,4 +16,6 @@ chmod +x ./gradlew
|
|||
./gradlew assembleRelease
|
||||
./gradlew bundleRelease
|
||||
|
||||
ccache -s -v
|
||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||
rm "${ANDROID_KEYSTORE_FILE}"
|
||||
fi
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
license_header = <<~EOF
|
||||
// SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
EOF
|
||||
|
||||
|
|
84
.ci/license-header.sh
Executable file
84
.ci/license-header.sh
Executable file
|
@ -0,0 +1,84 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
HEADER="$(cat "$PWD/.ci/license/header.txt")"
|
||||
|
||||
echo "Getting branch changes"
|
||||
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
COMMITS=`git log ${BRANCH} --not master --pretty=format:"%h"`
|
||||
RANGE="${COMMITS[${#COMMITS[@]}-1]}^..${COMMITS[0]}"
|
||||
FILES=`git diff-tree --no-commit-id --name-only ${RANGE} -r`
|
||||
|
||||
#FILES=$(git diff --name-only master)
|
||||
|
||||
echo "Done"
|
||||
|
||||
for file in $FILES; do
|
||||
EXTENSION="${file##*.}"
|
||||
case "$EXTENSION" in
|
||||
kts|kt|cpp|h)
|
||||
CONTENT="`cat $file`"
|
||||
case "$CONTENT" in
|
||||
"$HEADER"*) ;;
|
||||
*) BAD_FILES="$BAD_FILES $file" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$BAD_FILES" = "" ]; then
|
||||
echo
|
||||
echo "All good."
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "The following files have incorrect license headers:"
|
||||
echo
|
||||
|
||||
for file in $BAD_FILES; do echo $file; done
|
||||
|
||||
cat << EOF
|
||||
|
||||
The following license header should be added to the start of all offending files:
|
||||
|
||||
=== BEGIN ===
|
||||
$HEADER
|
||||
=== END ===
|
||||
|
||||
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.
|
||||
If this happens, this PR requirement can be bypassed once all other files are addressed.
|
||||
EOF
|
||||
|
||||
if [ "$FIX" = "true" ]; then
|
||||
echo
|
||||
echo "FIX set to true. Fixing headers."
|
||||
echo
|
||||
|
||||
for file in $BAD_FILES; do
|
||||
cat $file > $file.bak
|
||||
|
||||
cat .ci/license/header.txt > $file
|
||||
echo >> $file
|
||||
cat $file.bak >> $file
|
||||
|
||||
rm $file.bak
|
||||
|
||||
git add $file
|
||||
done
|
||||
|
||||
echo "License headers fixed."
|
||||
|
||||
if [ "$COMMIT" = "true" ]; then
|
||||
echo
|
||||
echo "COMMIT set to true. Committing changes."
|
||||
echo
|
||||
|
||||
git commit -m "Fix license headers"
|
||||
|
||||
echo "Changes committed. You may now push."
|
||||
fi
|
||||
else
|
||||
exit 1
|
||||
fi
|
2
.ci/license/header.txt
Normal file
2
.ci/license/header.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
@ -1,70 +1,100 @@
|
|||
#!/bin/bash -ex
|
||||
#!/bin/bash -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
export ARCH="$(uname -m)"
|
||||
|
||||
if [ "$ARCH" = 'x86_64' ]; then
|
||||
if [ "$1" = 'v3' ]; then
|
||||
echo "Making x86-64-v3 optimized build of eden"
|
||||
ARCH="${ARCH}_v3"
|
||||
ARCH_FLAGS="-march=x86-64-v3 -O3"
|
||||
else
|
||||
echo "Making x86-64 generic build of eden"
|
||||
ARCH_FLAGS="-march=x86-64 -mtune=generic -O3"
|
||||
fi
|
||||
else
|
||||
echo "Making aarch64 build of eden"
|
||||
ARCH_FLAGS="-march=armv8-a -mtune=generic -O3"
|
||||
fi
|
||||
case "$1" in
|
||||
amd64|"")
|
||||
echo "Making amd64-v3 optimized build of Eden"
|
||||
ARCH="amd64_v3"
|
||||
ARCH_FLAGS="-march=x86-64-v3"
|
||||
;;
|
||||
steamdeck)
|
||||
echo "Making Steam Deck (Zen 2) optimized build of Eden"
|
||||
ARCH="steamdeck"
|
||||
ARCH_FLAGS="-march=znver2 -mtune=znver2"
|
||||
;;
|
||||
rog-ally|allyx)
|
||||
echo "Making ROG Ally X (Zen 4) optimized build of Eden"
|
||||
ARCH="rog-ally-x"
|
||||
ARCH_FLAGS="-march=znver3 -mtune=znver4" # GH actions runner is a Zen 3 CPU, so a small workaround
|
||||
;;
|
||||
legacy)
|
||||
echo "Making amd64 generic build of Eden"
|
||||
ARCH=amd64
|
||||
ARCH_FLAGS="-march=x86-64 -mtune=generic"
|
||||
;;
|
||||
aarch64)
|
||||
echo "Making armv8-a build of Eden"
|
||||
ARCH=aarch64
|
||||
ARCH_FLAGS="-march=armv8-a -mtune=generic -w"
|
||||
;;
|
||||
armv9)
|
||||
echo "Making armv9-a build of Eden"
|
||||
ARCH=armv9
|
||||
ARCH_FLAGS="-march=armv9-a -mtune=generic -w"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid target $1 specified, must be one of amd64, steamdeck, allyx, rog-ally, legacy, aarch64, armv9"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
export ARCH_FLAGS="$ARCH_FLAGS -O3"
|
||||
|
||||
NPROC="$2"
|
||||
if [ -z "$NPROC" ]; then
|
||||
NPROC="$(nproc)"
|
||||
fi
|
||||
|
||||
if [ "$1" != "" ]; then shift; fi
|
||||
|
||||
if [ "$TARGET" = "appimage" ]; then
|
||||
# Compile the AppImage we distribute with Clang.
|
||||
export EXTRA_CMAKE_FLAGS=(-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=/etc/bin/ld.lld)
|
||||
# Bundle required QT wayland libraries
|
||||
export EXTRA_QT_PLUGINS="waylandcompositor"
|
||||
export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so"
|
||||
export EXTRA_CMAKE_FLAGS=(-DCMAKE_INSTALL_PREFIX=/usr -DYUZU_ROOM=ON -DYUZU_ROOM_STANDALONE=OFF -DYUZU_CMD=OFF)
|
||||
else
|
||||
# For the linux-fresh verification target, verify compilation without PCH as well.
|
||||
export EXTRA_CMAKE_FLAGS=(-DCITRA_USE_PRECOMPILED_HEADERS=OFF)
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_USE_PRECOMPILED_HEADERS=OFF)
|
||||
fi
|
||||
|
||||
if [ "$GITHUB_REF_TYPE" == "tag" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=($EXTRA_CMAKE_FLAGS -DENABLE_QT_UPDATE_CHECKER=ON)
|
||||
if [ "$DEVEL" != "true" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON)
|
||||
fi
|
||||
|
||||
if [ "$USE_WEBENGINE" = "true" ]; then
|
||||
WEBENGINE=ON
|
||||
else
|
||||
WEBENGINE=OFF
|
||||
fi
|
||||
|
||||
if [ "$USE_MULTIMEDIA" = "false" ]; then
|
||||
MULTIMEDIA=OFF
|
||||
else
|
||||
MULTIMEDIA=ON
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_TYPE" ]; then
|
||||
export BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DUSE_CCACHE=ON \
|
||||
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \
|
||||
-DCMAKE_C_FLAGS="$ARCH_FLAGS" \
|
||||
-DYUZU_USE_BUNDLED_VCPKG=OFF \
|
||||
-DYUZU_USE_BUNDLED_QT=OFF \
|
||||
-DUSE_SYSTEM_QT=ON \
|
||||
-DYUZU_USE_BUNDLED_FFMPEG=OFF \
|
||||
-DYUZU_USE_BUNDLED_SDL2=OFF \
|
||||
-DYUZU_USE_EXTERNAL_SDL2=ON \
|
||||
-DYUZU_TESTS=OFF \
|
||||
-DYUZU_USE_LLVM_DEMANGLE=OFF \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=OFF \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=OFF \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=OFF \
|
||||
-DBUNDLE_SPEEX=ON \
|
||||
-DYUZU_USE_FASTER_LD=OFF \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||
-DYUZU_USE_FASTER_LD=ON \
|
||||
-DYUZU_ENABLE_LTO=ON \
|
||||
-DCMAKE_LINKER=/usr/bin/mold \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
|
||||
ninja -j${NPROC}
|
||||
|
@ -74,11 +104,3 @@ if [ -d "bin/Release" ]; then
|
|||
else
|
||||
strip -s bin/*
|
||||
fi
|
||||
|
||||
if [ "$TARGET" = "appimage" ]; then
|
||||
ccache -s
|
||||
else
|
||||
ccache -s -v
|
||||
fi
|
||||
|
||||
#ctest -VV -C Release
|
||||
|
|
|
@ -1,219 +1,150 @@
|
|||
AppRun
|
||||
eden.desktop
|
||||
org.eden_emu.eden.desktop
|
||||
bin/eden
|
||||
shared/bin/eden
|
||||
shared/lib/lib.path
|
||||
shared/lib/ld-linux-x86-64.so.2
|
||||
shared/lib/libQt6Widgets.so.6.9.0
|
||||
shared/lib/libQt6Network.so.6.9.0
|
||||
shared/lib/libusb-1.0.so.0.5.0
|
||||
shared/lib/libenet.so.7.0.6
|
||||
shared/lib/libbrotlicommon.so.1.1.0
|
||||
shared/lib/libbrotlienc.so.1.1.0
|
||||
shared/lib/libbrotlidec.so.1.1.0
|
||||
shared/lib/libz.so.1.3.1
|
||||
shared/lib/libQt6Widgets.so.6.4.2
|
||||
shared/lib/libQt6DBus.so.6.4.2
|
||||
shared/lib/libudev.so.1.7.5
|
||||
shared/lib/libbrotlienc.so.1.0.9
|
||||
shared/lib/libbrotlidec.so.1.0.9
|
||||
shared/lib/libssl.so.3
|
||||
shared/lib/libcrypto.so.3
|
||||
shared/lib/libavcodec.so.61.19.100
|
||||
shared/lib/libavdevice.so.61.3.100
|
||||
shared/lib/libavfilter.so.10.4.100
|
||||
shared/lib/libavformat.so.61.7.100
|
||||
shared/lib/libavutil.so.59.39.100
|
||||
shared/lib/libswresample.so.5.3.100
|
||||
shared/lib/libswscale.so.8.3.100
|
||||
shared/lib/libva.so.2.2200.0
|
||||
shared/lib/libboost_context.so.1.87.0
|
||||
shared/lib/liblz4.so.1.10.0
|
||||
shared/lib/libzstd.so.1.5.7
|
||||
shared/lib/libSDL2-2.0.so.0.3200.54
|
||||
shared/lib/libfmt.so.11.1.4
|
||||
shared/lib/libopus.so.0.10.1
|
||||
shared/lib/libQt6Gui.so.6.9.0
|
||||
shared/lib/libQt6DBus.so.6.9.0
|
||||
shared/lib/libGLX.so.0.0.0
|
||||
shared/lib/libOpenGL.so.0.0.0
|
||||
shared/lib/libQt6Core.so.6.9.0
|
||||
shared/lib/libstdc++.so.6.0.33
|
||||
shared/lib/libavcodec.so.59.37.100
|
||||
shared/lib/libavutil.so.57.28.100
|
||||
shared/lib/libQt6Gui.so.6.4.2
|
||||
shared/lib/libQt6Core.so.6.4.2
|
||||
shared/lib/libstdc++.so.6.0.30
|
||||
shared/lib/libm.so.6
|
||||
shared/lib/libgcc_s.so.1
|
||||
shared/lib/libc.so.6
|
||||
shared/lib/libgssapi_krb5.so.2.2
|
||||
shared/lib/libproxy.so.0.5.9
|
||||
shared/lib/libudev.so.1.7.10
|
||||
shared/lib/libvpx.so.9.1.0
|
||||
shared/lib/libwebpmux.so.3.1.1
|
||||
shared/lib/liblzma.so.5.8.1
|
||||
shared/lib/libdav1d.so.7.0.0
|
||||
shared/lib/libopencore-amrwb.so.0.0.5
|
||||
shared/lib/librsvg-2.so.2.60.0
|
||||
shared/lib/libcairo.so.2.11804.4
|
||||
shared/lib/libgobject-2.0.so.0.8400.1
|
||||
shared/lib/libglib-2.0.so.0.8400.1
|
||||
shared/lib/libsnappy.so.1.2.2
|
||||
shared/lib/libaom.so.3.12.0
|
||||
shared/lib/libgsm.so.1.0.22
|
||||
shared/lib/libjxl.so.0.11.1
|
||||
shared/lib/libjxl_threads.so.0.11.1
|
||||
shared/lib/libdbus-1.so.3.32.4
|
||||
shared/lib/libbrotlicommon.so.1.0.9
|
||||
shared/lib/libswresample.so.4.7.100
|
||||
shared/lib/libvpx.so.7.1.0
|
||||
shared/lib/libwebpmux.so.3.0.10
|
||||
shared/lib/libwebp.so.7.1.5
|
||||
shared/lib/liblzma.so.5.4.1
|
||||
shared/lib/libdav1d.so.6.6.0
|
||||
shared/lib/librsvg-2.so.2.48.0
|
||||
shared/lib/libgobject-2.0.so.0.7400.6
|
||||
shared/lib/libglib-2.0.so.0.7400.6
|
||||
shared/lib/libcairo.so.2.11600.0
|
||||
shared/lib/libzvbi.so.0.13.2
|
||||
shared/lib/libz.so.1.2.13
|
||||
shared/lib/libsnappy.so.1.1.9
|
||||
shared/lib/libaom.so.3.6.0
|
||||
shared/lib/libcodec2.so.1.0
|
||||
shared/lib/libgsm.so.1.0.19
|
||||
shared/lib/libjxl.so.0.7.0
|
||||
shared/lib/libjxl_threads.so.0.7.0
|
||||
shared/lib/libmp3lame.so.0.0.0
|
||||
shared/lib/libopencore-amrnb.so.0.0.5
|
||||
shared/lib/libopenjp2.so.2.5.3
|
||||
shared/lib/libopenjp2.so.2.5.0
|
||||
shared/lib/libopus.so.0.8.0
|
||||
shared/lib/librav1e.so.0.5.1
|
||||
shared/lib/libshine.so.3.0.1
|
||||
shared/lib/libspeex.so.1.5.2
|
||||
shared/lib/libSvtAv1Enc.so.1.4.1
|
||||
shared/lib/libtheoraenc.so.1.1.2
|
||||
shared/lib/libtheoradec.so.1.1.4
|
||||
shared/lib/libtwolame.so.0.0.0
|
||||
shared/lib/libvorbis.so.0.4.9
|
||||
shared/lib/libvorbisenc.so.2.0.12
|
||||
shared/lib/libwebp.so.7.1.10
|
||||
shared/lib/libx264.so.164
|
||||
shared/lib/libx265.so.199
|
||||
shared/lib/libxvidcore.so.4.3
|
||||
shared/lib/libvpl.so.2.14
|
||||
shared/lib/libraw1394.so.11.1.0
|
||||
shared/lib/libavc1394.so.0.3.0
|
||||
shared/lib/librom1394.so.0.3.0
|
||||
shared/lib/libiec61883.so.0.1.1
|
||||
shared/lib/libjack.so.0.1.0
|
||||
shared/lib/libdrm.so.2.124.0
|
||||
shared/lib/libxcb.so.1.1.0
|
||||
shared/lib/libxcb-shm.so.0.0.0
|
||||
shared/lib/libxcb-shape.so.0.0.0
|
||||
shared/lib/libxcb-xfixes.so.0.0.0
|
||||
shared/lib/libasound.so.2.0.0
|
||||
shared/lib/libGL.so.1.7.0
|
||||
shared/lib/libpulse.so.0.24.3
|
||||
shared/lib/libv4l2.so.0.0.0
|
||||
shared/lib/libXv.so.1.0.0
|
||||
shared/lib/libX11.so.6.4.0
|
||||
shared/lib/libXext.so.6.4.0
|
||||
shared/lib/libpostproc.so.58.3.100
|
||||
shared/lib/libbs2b.so.0.0.0
|
||||
shared/lib/librubberband.so.3.0.0
|
||||
shared/lib/libharfbuzz.so.0.61101.0
|
||||
shared/lib/libfribidi.so.0.4.0
|
||||
shared/lib/libplacebo.so.349
|
||||
shared/lib/libvmaf.so.3.0.0
|
||||
shared/lib/libass.so.9.3.1
|
||||
shared/lib/libvidstab.so.1.2
|
||||
shared/lib/libzmq.so.5.2.5
|
||||
shared/lib/libzimg.so.2.0.0
|
||||
shared/lib/libglslang.so.15.2.0
|
||||
shared/lib/libOpenCL.so.1.0.0
|
||||
shared/lib/libfontconfig.so.1.15.0
|
||||
shared/lib/libfreetype.so.6.20.2
|
||||
shared/lib/libdvdnav.so.4.3.0
|
||||
shared/lib/libdvdread.so.8.0.0
|
||||
shared/lib/libxml2.so.2.13.5
|
||||
shared/lib/libbz2.so.1.0.8
|
||||
shared/lib/libmodplug.so.1.0.0
|
||||
shared/lib/libopenmpt.so.0.4.4
|
||||
shared/lib/libbluray.so.2.4.3
|
||||
shared/lib/libgmp.so.10.5.0
|
||||
shared/lib/libgnutls.so.30.40.3
|
||||
shared/lib/libsrt.so.1.5.4
|
||||
shared/lib/libssh.so.4.10.1
|
||||
shared/lib/libva-drm.so.2.2200.0
|
||||
shared/lib/libva-x11.so.2.2200.0
|
||||
shared/lib/libva.so.2.1700.0
|
||||
shared/lib/libmfx.so.1.35
|
||||
shared/lib/libva-drm.so.2.1700.0
|
||||
shared/lib/libva-x11.so.2.1700.0
|
||||
shared/lib/libvdpau.so.1.0.0
|
||||
shared/lib/libsoxr.so.0.1.2
|
||||
shared/lib/libX11.so.6.4.0
|
||||
shared/lib/libdrm.so.2.4.0
|
||||
shared/lib/libOpenCL.so.1.0.0
|
||||
shared/lib/libEGL.so.1.1.0
|
||||
shared/lib/libxkbcommon.so.0.8.1
|
||||
shared/lib/libpng16.so.16.47.0
|
||||
shared/lib/libmd4c.so.0.5.2
|
||||
shared/lib/libdbus-1.so.3.38.3
|
||||
shared/lib/libGLdispatch.so.0.0.0
|
||||
shared/lib/libdouble-conversion.so.3.3.0
|
||||
shared/lib/libfontconfig.so.1.12.0
|
||||
shared/lib/libxkbcommon.so.0.0.0
|
||||
shared/lib/libGLX.so.0.0.0
|
||||
shared/lib/libOpenGL.so.0.0.0
|
||||
shared/lib/libpng16.so.16.39.0
|
||||
shared/lib/libharfbuzz.so.0.60000.0
|
||||
shared/lib/libmd4c.so.0.4.8
|
||||
shared/lib/libfreetype.so.6.18.3
|
||||
shared/lib/libicui18n.so.72.1
|
||||
shared/lib/libicuuc.so.72.1
|
||||
shared/lib/libdouble-conversion.so.3.1
|
||||
shared/lib/libb2.so.1.0.4
|
||||
shared/lib/libpcre2-16.so.0.14.0
|
||||
shared/lib/libkrb5.so.3.3
|
||||
shared/lib/libk5crypto.so.3.1
|
||||
shared/lib/libcom_err.so.2.1
|
||||
shared/lib/libkrb5support.so.0.1
|
||||
shared/lib/libkeyutils.so.1.10
|
||||
shared/lib/libresolv.so.2
|
||||
shared/lib/libproxy/libpxbackend-1.0.so
|
||||
shared/lib/libcap.so.2.75
|
||||
shared/lib/libgio-2.0.so.0.8400.1
|
||||
shared/lib/libgdk_pixbuf-2.0.so.0.4200.12
|
||||
shared/lib/libpangocairo-1.0.so.0.5600.3
|
||||
shared/lib/libpango-1.0.so.0.5600.3
|
||||
shared/lib/libXrender.so.1.3.0
|
||||
shared/lib/libpcre2-16.so.0.11.2
|
||||
shared/lib/libzstd.so.1.5.4
|
||||
shared/lib/libsystemd.so.0.35.0
|
||||
shared/lib/libsoxr.so.0.1.2
|
||||
shared/lib/libcairo-gobject.so.2.11600.0
|
||||
shared/lib/libgdk_pixbuf-2.0.so.0.4200.10
|
||||
shared/lib/libgio-2.0.so.0.7400.6
|
||||
shared/lib/libxml2.so.2.9.14
|
||||
shared/lib/libpangocairo-1.0.so.0.5000.12
|
||||
shared/lib/libpango-1.0.so.0.5000.12
|
||||
shared/lib/libffi.so.8.1.2
|
||||
shared/lib/libpcre2-8.so.0.11.2
|
||||
shared/lib/libpixman-1.so.0.42.2
|
||||
shared/lib/libxcb-shm.so.0.0.0
|
||||
shared/lib/libxcb.so.1.1.0
|
||||
shared/lib/libxcb-render.so.0.0.0
|
||||
shared/lib/libpixman-1.so.0.44.2
|
||||
shared/lib/libffi.so.8.1.4
|
||||
shared/lib/libpcre2-8.so.0.14.0
|
||||
shared/lib/libjxl_cms.so.0.11.1
|
||||
shared/lib/libhwy.so.1.2.0
|
||||
shared/lib/libXrender.so.1.3.0
|
||||
shared/lib/libXext.so.6.4.0
|
||||
shared/lib/libhwy.so.1.0.3
|
||||
shared/lib/liblcms2.so.2.0.14
|
||||
shared/lib/libogg.so.0.8.5
|
||||
shared/lib/libsharpyuv.so.0.1.1
|
||||
shared/lib/libdb-5.3.so
|
||||
shared/lib/libXau.so.6.0.0
|
||||
shared/lib/libXdmcp.so.6.0.0
|
||||
shared/lib/pulseaudio/libpulsecommon-17.0.so
|
||||
shared/lib/libv4lconvert.so.0.0.0
|
||||
shared/lib/libfftw3.so.3.6.10
|
||||
shared/lib/libsamplerate.so.0.2.2
|
||||
shared/lib/libgraphite2.so.3.2.1
|
||||
shared/lib/libunwind.so.8.1.0
|
||||
shared/lib/libshaderc_shared.so.1
|
||||
shared/lib/libglslang-default-resource-limits.so.15.2.0
|
||||
shared/lib/libvulkan.so.1.4.309
|
||||
shared/lib/liblcms2.so.2.0.17
|
||||
shared/lib/libdovi.so.3.3.1
|
||||
shared/lib/libunibreak.so.6.0.1
|
||||
shared/lib/libgomp.so.1.0.0
|
||||
shared/lib/libsodium.so.26.2.0
|
||||
shared/lib/libpgm-5.3.so.0.0.128
|
||||
shared/lib/libSPIRV-Tools-opt.so
|
||||
shared/lib/libSPIRV-Tools.so
|
||||
shared/lib/libexpat.so.1.10.2
|
||||
shared/lib/libmpg123.so.0.48.3
|
||||
shared/lib/libvorbisfile.so.3.3.8
|
||||
shared/lib/libleancrypto.so.1
|
||||
shared/lib/libp11-kit.so.0.4.1
|
||||
shared/lib/libidn2.so.0.4.0
|
||||
shared/lib/libunistring.so.5.2.0
|
||||
shared/lib/libtasn1.so.6.6.4
|
||||
shared/lib/libhogweed.so.6.10
|
||||
shared/lib/libnettle.so.8.10
|
||||
shared/lib/libnuma.so.1.0.0
|
||||
shared/lib/libpthread.so.0
|
||||
shared/lib/libXfixes.so.3.1.0
|
||||
shared/lib/libX11-xcb.so.1.0.0
|
||||
shared/lib/libxcb-dri3.so.0.1.0
|
||||
shared/lib/libsystemd.so.0.40.0
|
||||
shared/lib/libcurl.so.4.8.0
|
||||
shared/lib/libduktape.so.207.20700
|
||||
shared/lib/libgmodule-2.0.so.0.8400.1
|
||||
shared/lib/libGLdispatch.so.0.0.0
|
||||
shared/lib/libexpat.so.1.8.10
|
||||
shared/lib/libgraphite2.so.3.2.1
|
||||
shared/lib/libicudata.so.72.1
|
||||
shared/lib/libgomp.so.1.0.0
|
||||
shared/lib/libcap.so.2.66
|
||||
shared/lib/libgcrypt.so.20.4.1
|
||||
shared/lib/liblz4.so.1.9.4
|
||||
shared/lib/libgmodule-2.0.so.0.7400.6
|
||||
shared/lib/libjpeg.so.62.3.0
|
||||
shared/lib/libmount.so.1.1.0
|
||||
shared/lib/libjpeg.so.8.3.2
|
||||
shared/lib/libtiff.so.6.1.0
|
||||
shared/lib/libpangoft2-1.0.so.0.5600.3
|
||||
shared/lib/libselinux.so.1
|
||||
shared/lib/libpangoft2-1.0.so.0.5000.12
|
||||
shared/lib/libfribidi.so.0.4.0
|
||||
shared/lib/libthai.so.0.3.1
|
||||
shared/lib/libsndfile.so.1.0.37
|
||||
shared/lib/libasyncns.so.0.3.1
|
||||
shared/lib/libnghttp3.so.9.2.6
|
||||
shared/lib/libnghttp2.so.14.28.4
|
||||
shared/lib/libssh2.so.1.0.1
|
||||
shared/lib/libpsl.so.5.3.5
|
||||
shared/lib/libXau.so.6.0.0
|
||||
shared/lib/libXdmcp.so.6.0.0
|
||||
shared/lib/libgpg-error.so.0.33.1
|
||||
shared/lib/libblkid.so.1.1.0
|
||||
shared/lib/libjbig.so.2.1
|
||||
shared/lib/libdatrie.so.1.4.0
|
||||
shared/lib/libFLAC.so.14.0.0
|
||||
shared/lib/libSDL3.so.0.2.10
|
||||
shared/lib/libbsd.so.0.11.7
|
||||
shared/lib/libmd.so.0.0.5
|
||||
shared/lib/libvulkan.so.1.3.239
|
||||
share/vulkan/icd.d/intel_hasvk_icd.x86_64.json
|
||||
shared/lib/libvulkan_intel_hasvk.so
|
||||
shared/lib/libwayland-client.so.0.21.0
|
||||
shared/lib/libxcb-present.so.0.0.0
|
||||
shared/lib/libxcb-xfixes.so.0.0.0
|
||||
shared/lib/libxcb-sync.so.1.0.0
|
||||
shared/lib/libxcb-randr.so.0.1.0
|
||||
shared/lib/libxshmfence.so.1.0.0
|
||||
shared/lib/libxcb-keysyms.so.1.0.0
|
||||
shared/lib/libwayland-client.so.0.23.1
|
||||
share/vulkan/icd.d/intel_icd.x86_64.json
|
||||
shared/lib/libvulkan_intel.so
|
||||
share/vulkan/icd.d/nouveau_icd.x86_64.json
|
||||
shared/lib/libvulkan_nouveau.so
|
||||
share/vulkan/icd.d/lvp_icd.x86_64.json
|
||||
shared/lib/libvulkan_lvp.so
|
||||
shared/lib/libLLVM-15.so.1
|
||||
shared/lib/libedit.so.2.0.70
|
||||
shared/lib/libz3.so.4
|
||||
shared/lib/libtinfo.so.6.4
|
||||
share/vulkan/icd.d/radeon_icd.x86_64.json
|
||||
shared/lib/libvulkan_radeon.so
|
||||
shared/lib/libLLVM.so.19.1
|
||||
shared/lib/libelf-0.192.so
|
||||
shared/lib/libdrm_amdgpu.so.1.124.0
|
||||
shared/lib/libedit.so.0.0.75
|
||||
shared/lib/libncursesw.so.6.5
|
||||
shared/lib/libdrm_amdgpu.so.1.0.0
|
||||
shared/lib/libelf-0.188.so
|
||||
shared/lib/libVkLayer_MESA_device_select.so
|
||||
bin/qt.conf
|
||||
shared/lib/qt6/plugins/platforms/libqeglfs.so
|
||||
shared/lib/qt6/plugins/platforms/libqlinuxfb.so
|
||||
|
@ -225,29 +156,57 @@ shared/lib/qt6/plugins/platforms/libqvnc.so
|
|||
shared/lib/qt6/plugins/platforms/libqwayland-egl.so
|
||||
shared/lib/qt6/plugins/platforms/libqwayland-generic.so
|
||||
shared/lib/qt6/plugins/platforms/libqxcb.so
|
||||
shared/lib/libQt6XcbQpa.so.6.9.0
|
||||
shared/lib/libxcb-cursor.so.0.0.0
|
||||
shared/lib/libxcb-icccm.so.4.0.0
|
||||
shared/lib/libxcb-image.so.0.0.0
|
||||
shared/lib/libxcb-render-util.so.0.0.0
|
||||
shared/lib/libxcb-xkb.so.1.0.0
|
||||
shared/lib/libSM.so.6.0.1
|
||||
shared/lib/libICE.so.6.3.0
|
||||
shared/lib/libxcb-xinput.so.0.1.0
|
||||
shared/lib/libxkbcommon-x11.so.0.8.1
|
||||
shared/lib/libxcb-util.so.1.0.0
|
||||
shared/lib/libuuid.so.1.3.0
|
||||
shared/lib/libQt6WaylandClient.so.6.4.2
|
||||
shared/lib/libwayland-cursor.so.0.21.0
|
||||
shared/lib/qt6/plugins/platformthemes/libqgtk3.so
|
||||
shared/lib/qt6/plugins/platformthemes/libqt6ct.so
|
||||
shared/lib/qt6/plugins/platformthemes/libqxdgdesktopportal.so
|
||||
shared/lib/libqt6ct-common.so.0.10
|
||||
etc/fonts/fonts.conf
|
||||
shared/lib/libgtk-3.so.0.2406.32
|
||||
shared/lib/libgdk-3.so.0.2406.32
|
||||
shared/lib/libatk-1.0.so.0.24609.1
|
||||
shared/lib/libepoxy.so.0.0.0
|
||||
shared/lib/libXi.so.6.1.0
|
||||
shared/lib/libwayland-cursor.so.0.23.1
|
||||
shared/lib/libwayland-egl.so.1.23.1
|
||||
shared/lib/libatk-bridge-2.0.so.0.0.0
|
||||
shared/lib/libwayland-egl.so.1.21.0
|
||||
shared/lib/libXcursor.so.1.0.2
|
||||
shared/lib/libXdamage.so.1.1.0
|
||||
shared/lib/libXcomposite.so.1.0.0
|
||||
shared/lib/libXrandr.so.2.2.0
|
||||
shared/lib/qt6/plugins/styles/libqt6ct-style.so
|
||||
shared/lib/libXinerama.so.1.0.0
|
||||
shared/lib/libdl.so.2
|
||||
shared/lib/libatspi.so.0.0.1
|
||||
share/glib-2.0/schemas/gschemas.compiled
|
||||
shared/lib/gio/modules/giomodule.cache
|
||||
shared/lib/gio/modules/libdconfsettings.so
|
||||
shared/lib/gio/modules/libgvfsdbus.so
|
||||
shared/lib/gvfs/libgvfscommon.so
|
||||
share/X11/xkb/rules/evdev
|
||||
share/X11/xkb/keycodes/evdev
|
||||
share/X11/xkb/keycodes/aliases
|
||||
share/X11/xkb/types/complete
|
||||
share/X11/xkb/types/basic
|
||||
share/X11/xkb/types/mousekeys
|
||||
share/X11/xkb/types/pc
|
||||
share/X11/xkb/types/iso9995
|
||||
share/X11/xkb/types/level5
|
||||
share/X11/xkb/types/extra
|
||||
share/X11/xkb/types/numpad
|
||||
share/X11/xkb/compat/complete
|
||||
share/X11/xkb/compat/basic
|
||||
share/X11/xkb/compat/ledcaps
|
||||
share/X11/xkb/compat/lednum
|
||||
share/X11/xkb/compat/iso9995
|
||||
share/X11/xkb/compat/mousekeys
|
||||
share/X11/xkb/compat/accessx
|
||||
share/X11/xkb/compat/misc
|
||||
share/X11/xkb/compat/ledscroll
|
||||
share/X11/xkb/compat/xfree86
|
||||
share/X11/xkb/compat/level5
|
||||
share/X11/xkb/compat/caps
|
||||
share/X11/xkb/symbols/pc
|
||||
share/X11/xkb/symbols/srvr_ctrl
|
||||
share/X11/xkb/symbols/keypad
|
||||
share/X11/xkb/symbols/altwin
|
||||
share/X11/xkb/symbols/us
|
||||
share/X11/xkb/symbols/inet
|
||||
shared/lib/qt6/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
|
||||
shared/lib/qt6/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
|
||||
shared/lib/qt6/plugins/iconengines/libqsvgicon.so
|
||||
|
@ -255,5 +214,37 @@ shared/lib/qt6/plugins/imageformats/libqgif.so
|
|||
shared/lib/qt6/plugins/imageformats/libqico.so
|
||||
shared/lib/qt6/plugins/imageformats/libqjpeg.so
|
||||
shared/lib/qt6/plugins/imageformats/libqsvg.so
|
||||
shared/lib/libQt6Svg.so.6.9.0
|
||||
shared/lib/libQt6Svg.so.6.4.2
|
||||
etc/fonts/fonts.conf
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libfullscreen-shell-v1.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libivi-shell.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libqt-shell.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libwl-shell-plugin.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libxdg-shell.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libdmabuf-server.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libdrm-egl-server.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libshm-emulation-server.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libvulkan-server.so
|
||||
shared/lib/libQt6WaylandEglClientHwIntegration.so.6.4.2
|
||||
shared/lib/libQt6OpenGL.so.6.4.2
|
||||
share/glvnd/egl_vendor.d/50_mesa.json
|
||||
shared/lib/libEGL_mesa.so.0.0.0
|
||||
shared/lib/libgbm.so.1.0.0
|
||||
shared/lib/libglapi.so.0.0.0
|
||||
shared/lib/libxcb-dri2.so.0.0.0
|
||||
shared/lib/libwayland-server.so.0.21.0
|
||||
shared/lib/dri/swrast_dri.so
|
||||
shared/lib/libsensors.so.5.0.0
|
||||
shared/lib/libdrm_radeon.so.1.0.1
|
||||
shared/lib/libdrm_nouveau.so.2.0.0
|
||||
shared/lib/libdrm_intel.so.1.0.0
|
||||
shared/lib/libpciaccess.so.0.11.1
|
||||
shared/lib/qt6/plugins/wayland-decoration-client/libbradient.so
|
||||
shared/lib/gtk-3.0/modules/libcanberra-gtk3-module.so
|
||||
shared/lib/libcanberra-gtk3.so.0.1.9
|
||||
shared/lib/libcanberra.so.0.2.5
|
||||
shared/lib/libvorbisfile.so.3.3.8
|
||||
shared/lib/libtdb.so.1.4.8
|
||||
shared/lib/libltdl.so.7.3.2
|
||||
shared/lib/libXss.so.1.0.0
|
||||
|
|
|
@ -1,66 +1,93 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This script assumes you're in the source directory
|
||||
set -ex
|
||||
|
||||
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||
export BASE_ARCH="$(uname -m)"
|
||||
export ARCH="$BASE_ARCH"
|
||||
|
||||
LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
|
||||
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
|
||||
SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-${BASE_ARCH}-aio"
|
||||
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-${BASE_ARCH}"
|
||||
|
||||
if [ "$ARCH" = 'x86_64' ]; then
|
||||
if [ "$1" = 'v3' ]; then
|
||||
ARCH="${ARCH}_v3"
|
||||
fi
|
||||
case "$1" in
|
||||
amd64|"")
|
||||
echo "Packaging amd64-v3 optimized build of Eden"
|
||||
ARCH="amd64_v3"
|
||||
;;
|
||||
steamdeck)
|
||||
echo "Packaging Steam Deck (Zen 2) optimized build of Eden"
|
||||
ARCH="steamdeck"
|
||||
;;
|
||||
rog-ally|allyx)
|
||||
echo "Packaging ROG Ally X (Zen 4) optimized build of Eden"
|
||||
ARCH="rog-ally-x"
|
||||
;;
|
||||
legacy)
|
||||
echo "Packaging amd64 generic build of Eden"
|
||||
ARCH=amd64
|
||||
;;
|
||||
aarch64)
|
||||
echo "Packaging armv8-a build of Eden"
|
||||
ARCH=aarch64
|
||||
;;
|
||||
armv9)
|
||||
echo "Packaging armv9-a build of Eden"
|
||||
ARCH=armv9
|
||||
;;
|
||||
esac
|
||||
|
||||
export BUILDDIR="$2"
|
||||
|
||||
if [ "$BUILDDIR" = '' ]
|
||||
then
|
||||
BUILDDIR=build
|
||||
fi
|
||||
|
||||
EDEN_TAG=$(git describe --tags --abbrev=0)
|
||||
echo "Making stable \"$EDEN_TAG\" build"
|
||||
git checkout "$EDEN_TAG"
|
||||
echo "Making \"$EDEN_TAG\" build"
|
||||
# git checkout "$EDEN_TAG"
|
||||
VERSION="$(echo "$EDEN_TAG")"
|
||||
|
||||
# NOW MAKE APPIMAGE
|
||||
mkdir -p ./AppDir
|
||||
cd ./AppDir
|
||||
|
||||
cat > org.eden_emu.eden.desktop << EOL
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Eden
|
||||
Icon=org.eden_emu.eden
|
||||
Exec=eden
|
||||
Categories=Game;Emulator;
|
||||
EOL
|
||||
cp ../dist/org.eden_emu.eden.desktop .
|
||||
cp ../dist/org.eden_emu.eden.svg .
|
||||
|
||||
cp ../dist/eden.svg ./org.eden_emu.eden.svg
|
||||
ln -sf ./org.eden_emu.eden.svg ./.DirIcon
|
||||
|
||||
ln -sf ./org.eden_emu.eden.svg.svg ./.DirIcon
|
||||
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync'
|
||||
|
||||
if [ "$DEVEL" = 'true' ]; then
|
||||
sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop
|
||||
UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')"
|
||||
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')"
|
||||
fi
|
||||
|
||||
LIBDIR="/usr/lib"
|
||||
# some distros are weird and use a subdir
|
||||
|
||||
if [ ! -f "/usr/lib/libGL.so" ]
|
||||
# Workaround for Gentoo
|
||||
if [ ! -d "$LIBDIR/qt6" ]
|
||||
then
|
||||
LIBDIR="/usr/lib64"
|
||||
fi
|
||||
|
||||
# Workaround for Debian
|
||||
if [ ! -d "$LIBDIR/qt6" ]
|
||||
then
|
||||
LIBDIR="/usr/lib/${BASE_ARCH}-linux-gnu"
|
||||
fi
|
||||
|
||||
# Bundle all libs
|
||||
wget --retry-connrefused --tries=30 "$LIB4BN" -O ./lib4bin
|
||||
chmod +x ./lib4bin
|
||||
xvfb-run -a -- ./lib4bin -p -v -e -s -k \
|
||||
../build/bin/eden* \
|
||||
|
||||
wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio
|
||||
chmod +x ./sharun-aio
|
||||
xvfb-run -a ./sharun-aio l -p -v -e -s -k \
|
||||
../$BUILDDIR/bin/eden* \
|
||||
$LIBDIR/lib*GL*.so* \
|
||||
$LIBDIR/libSDL2*.so* \
|
||||
$LIBDIR/libSDL2*.so* \
|
||||
$LIBDIR/dri/* \
|
||||
$LIBDIR/vdpau/* \
|
||||
$LIBDIR/libvulkan* \
|
||||
|
@ -82,14 +109,18 @@ xvfb-run -a -- ./lib4bin -p -v -e -s -k \
|
|||
$LIBDIR/spa-0.2/*/* \
|
||||
$LIBDIR/alsa-lib/*
|
||||
|
||||
rm -f ./sharun-aio
|
||||
|
||||
# Prepare sharun
|
||||
if [ "$ARCH" = 'aarch64' ]; then
|
||||
# allow the host vulkan to be used for aarch64 given the sed situation
|
||||
# allow the host vulkan to be used for aarch64 given the sad situation
|
||||
echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./.env
|
||||
fi
|
||||
|
||||
wget https://github.com/VHSgunzo/sharun/releases/download/v0.6.3/sharun-x86_64 -O sharun
|
||||
chmod a+x sharun
|
||||
# Workaround for Gentoo
|
||||
if [ -d "shared/libproxy" ]; then
|
||||
cp shared/libproxy/* lib/
|
||||
fi
|
||||
|
||||
ln -f ./sharun ./AppRun
|
||||
./sharun -g
|
||||
|
@ -115,9 +146,4 @@ echo "Generating AppImage..."
|
|||
|
||||
echo "Generating zsync file..."
|
||||
zsyncmake *.AppImage -u *.AppImage
|
||||
echo "All Done!"
|
||||
|
||||
# Cleanup
|
||||
|
||||
rm -rf AppDir
|
||||
rm uruntime
|
||||
echo "All Done!"
|
11
.ci/translate.sh
Executable file
11
.ci/translate.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
for i in dist/languages/*.ts; do
|
||||
SRC=en_US
|
||||
TARGET=`head -n1 $i | awk -F 'language="' '{split($2, a, "\""); print a[1]}'`
|
||||
|
||||
# requires fd
|
||||
SOURCES=`fd . src/yuzu -tf -e ui -e cpp -e h -e plist`
|
||||
|
||||
lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts /data/code/eden/$i
|
||||
done
|
|
@ -1,27 +0,0 @@
|
|||
echo off
|
||||
|
||||
set chain=%1
|
||||
|
||||
if not defined DevEnvDir (
|
||||
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain%
|
||||
)
|
||||
|
||||
mkdir build
|
||||
|
||||
cmake -S . -B build\%chain% ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DYUZU_USE_BUNDLED_QT=ON ^
|
||||
-DENABLE_QT_TRANSLATION=ON ^
|
||||
-DUSE_DISCORD_PRESENCE=ON ^
|
||||
-DYUZU_USE_BUNDLED_VCPKG=ON ^
|
||||
-DYUZU_USE_BUNDLED_SDL2=ON ^
|
||||
-G "Ninja" ^
|
||||
-DYUZU_TESTS=OFF ^
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache ^
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
|
||||
-DCMAKE_TOOLCHAIN_FILE="%CD%\CMakeModules\MSVCCache.cmake" ^
|
||||
-DUSE_CCACHE=ON
|
||||
|
||||
cmake --build build\%chain%
|
||||
|
||||
ccache -s -v
|
|
@ -1,31 +0,0 @@
|
|||
echo off
|
||||
|
||||
set chain=%1
|
||||
set qt_ver=%2
|
||||
|
||||
if not defined DevEnvDir (
|
||||
CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain%
|
||||
)
|
||||
|
||||
CALL mkdir build
|
||||
|
||||
CALL cmake -S . -B build\%chain% ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DYUZU_USE_BUNDLED_QT=ON ^
|
||||
-DENABLE_QT_TRANSLATION=ON ^
|
||||
-DUSE_DISCORD_PRESENCE=ON ^
|
||||
-DYUZU_USE_BUNDLED_VCPKG=ON ^
|
||||
-DYUZU_USE_BUNDLED_SDL2=ON ^
|
||||
-G "Ninja" ^
|
||||
-DYUZU_TESTS=OFF ^
|
||||
-DUSE_BUNDLED_QT=OFF ^
|
||||
-DUSE_SYSTEM_QT=ON ^
|
||||
-DCMAKE_PREFIX_PATH=C:\Qt\%qt_ver%\msvc2022_64 ^
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache ^
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
|
||||
-DCMAKE_TOOLCHAIN_FILE="%CD%\CMakeModules\MSVCCache.cmake" ^
|
||||
-DUSE_CCACHE=ON
|
||||
|
||||
CALL cmake --build build\%chain%
|
||||
|
||||
CALL ccache -s -v
|
65
.ci/windows/build.sh
Normal file
65
.ci/windows/build.sh
Normal file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if [ "$DEVEL" != "true" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON)
|
||||
fi
|
||||
|
||||
if [ "$CCACHE" = "true" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DUSE_CCACHE=ON)
|
||||
fi
|
||||
|
||||
if [ "$BUNDLE_QT" = "true" ]; then
|
||||
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
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DYUZU_USE_BUNDLED_SDL2=OFF \
|
||||
-DYUZU_USE_EXTERNAL_SDL2=ON \
|
||||
-DYUZU_TESTS=OFF \
|
||||
-DYUZU_CMD=OFF \
|
||||
-DYUZU_ROOM_STANDALONE=OFF \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||
-DYUZU_ENABLE_LTO=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
|
||||
ninja
|
||||
|
||||
set +e
|
||||
rm -f bin/*.pdb
|
||||
set -e
|
||||
|
||||
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
||||
cp bin/* pkg
|
|
@ -1,42 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
$target=$args[0]
|
||||
$debug=$args[1]
|
||||
|
||||
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-", ""
|
||||
$GITREV = $(git show -s --format='%h')
|
||||
$RELEASE_DIST = "eden-windows-msvc"
|
||||
$ARTIFACTS_DIR = "artifacts"
|
||||
|
||||
New-Item -ItemType Directory -Path $ARTIFACTS_DIR -Force
|
||||
New-Item -ItemType Directory -Path $RELEASE_DIST -Force
|
||||
|
||||
if ($debug -eq "yes") {
|
||||
mkdir -p pdb
|
||||
$BUILD_PDB = "eden-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip"
|
||||
Get-ChildItem "build/$target/bin/" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb -ErrorAction SilentlyContinue
|
||||
|
||||
if (Test-Path -Path ".\pdb\*.pdb") {
|
||||
7z a -tzip $BUILD_PDB .\pdb\*.pdb
|
||||
Move-Item $BUILD_PDB $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue
|
||||
}
|
||||
} else {
|
||||
Remove-Item -Force "$RELEASE_DIST\*.pdb"
|
||||
}
|
||||
|
||||
|
||||
Copy-Item "build/$target/bin/Release/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue
|
||||
if (-not $?) {
|
||||
# Try without Release subfolder if that doesn't exist
|
||||
Copy-Item "build/$target/bin/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
|
||||
$BUILD_ZIP = "eden-windows-msvc-$GITDATE-$GITREV.zip"
|
||||
|
||||
7z a -tzip $BUILD_ZIP $RELEASE_DIST\*
|
||||
|
||||
Move-Item $BUILD_ZIP $ARTIFACTS_DIR/ -Force #-ErrorAction SilentlyContinue
|
||||
Copy-Item "LICENSE*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue
|
||||
Copy-Item "README*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue
|
13
.ci/windows/package.sh
Normal file
13
.ci/windows/package.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
GITDATE=$(git show -s --date=short --format='%ad' | tr -d "-")
|
||||
GITREV=$(git show -s --format='%h')
|
||||
|
||||
ZIP_NAME="Eden-Windows-${ARCH}-${GITDATE}-${GITREV}.zip"
|
||||
|
||||
mkdir -p artifacts
|
||||
mkdir -p pack
|
||||
|
||||
cp -r build/pkg/* pack
|
||||
|
||||
cp LICENSE* README* pack/
|
||||
|
||||
7z a -tzip artifacts/$ZIP_NAME pack/*
|
7
.ci/windows/qt-envvars.sh
Executable file
7
.ci/windows/qt-envvars.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
# This is specific to the CI runner and is unlikely to work on your machine.
|
||||
QTDIR="/c/Qt/6.9.0/msvc2022_64"
|
||||
|
||||
export QT_ROOT_DIR="$QTDIR"
|
||||
export QT_PLUGIN_PATH="$QTDIR/plugins"
|
||||
export QML2_IMPORT_PATH="$QTDIR/qml"
|
||||
export PATH="${PATH};$QTDIR/bin"
|
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
|
@ -5,23 +5,24 @@ name: eden-build
|
|||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
# TODO: combine build.yml into trigger_release.yml
|
||||
jobs:
|
||||
source:
|
||||
if: ${{ !github.head_ref }}
|
||||
runs-on: linux
|
||||
runs-on: source
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Pack
|
||||
run: ./.ci/source.sh
|
||||
|
||||
- name: Upload
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: source.zip
|
||||
path: artifacts/
|
||||
|
||||
|
@ -66,17 +67,21 @@ jobs:
|
|||
run: ./.ci/windows/cygwin.bat
|
||||
|
||||
- name: Configure & Build
|
||||
id: cmake
|
||||
shell: cmd
|
||||
run: ./.ci/windows/build-bqt.bat amd64 yes
|
||||
shell: bash
|
||||
run: |
|
||||
./.ci/windows/qt-envvars.sh
|
||||
DEVEL=true WINDEPLOYQT="/c/Qt/6.9.0/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh -DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6
|
||||
|
||||
- name: Package artifacts
|
||||
shell: powershell
|
||||
run: ./.ci/windows/package.ps1 amd64 yes
|
||||
shell: bash
|
||||
run: |
|
||||
./.ci/windows/qt-envvars.sh
|
||||
./.ci/windows/package.sh
|
||||
|
||||
- name: Upload Windows artifacts
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: ${{ matrix.target }}.zip
|
||||
path: artifacts/*
|
||||
|
||||
|
@ -96,14 +101,15 @@ jobs:
|
|||
fetch-tags: true
|
||||
|
||||
- name: Build
|
||||
run: ./.ci/linux/build.sh v3 8
|
||||
run: TARGET=appimage DEVEL=true ./.ci/linux/build.sh
|
||||
|
||||
- name: Package AppImage
|
||||
run: ./.ci/linux/package.sh v3 &> /dev/null
|
||||
run: DEVEL=true ./.ci/linux/package.sh &> /dev/null
|
||||
|
||||
- name: Upload Linux artifacts
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 3
|
||||
name: linux.zip
|
||||
path: ./*.AppImage
|
||||
|
||||
|
@ -111,9 +117,6 @@ jobs:
|
|||
runs-on: android
|
||||
|
||||
env:
|
||||
CCACHE_DIR: /home/runner/.cache/ccache
|
||||
CCACHE_COMPILERCHECK: content
|
||||
CCACHE_SLOPPINESS: time_macros
|
||||
OS: android
|
||||
TARGET: universal
|
||||
|
||||
|
@ -132,7 +135,11 @@ jobs:
|
|||
echo $GIT_TAG_NAME
|
||||
|
||||
- name: Build
|
||||
run: ANDROID_HOME=/opt/android-sdk ./.ci/android/build.sh
|
||||
run: ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
|
||||
- name: Package Android artifacts
|
||||
run: ./.ci/android/package.sh
|
||||
|
@ -140,5 +147,6 @@ jobs:
|
|||
- name: Upload Android artifacts
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: android.zip
|
||||
path: artifacts/*
|
||||
|
|
10
.github/workflows/license-header.yml
vendored
10
.github/workflows/license-header.yml
vendored
|
@ -1,22 +1,22 @@
|
|||
name: eden-license
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
license-header:
|
||||
runs-on: linux
|
||||
runs-on: source
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fetch master branch
|
||||
- name: Fetch
|
||||
run: git fetch origin master:master
|
||||
|
||||
- name: Make script executable
|
||||
run: chmod +x ./.ci/license-header.rb
|
||||
run: chmod +x ./.ci/license-header.sh
|
||||
|
||||
- name: Check license headers
|
||||
run: ./.ci/license-header.rb
|
||||
run: ./.ci/license-header.sh
|
||||
|
|
28
.github/workflows/trigger_release.yml
vendored
28
.github/workflows/trigger_release.yml
vendored
|
@ -9,7 +9,7 @@ permissions:
|
|||
|
||||
jobs:
|
||||
source:
|
||||
runs-on: linux
|
||||
runs-on: source
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
@ -19,6 +19,7 @@ jobs:
|
|||
- name: Upload
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: source.zip
|
||||
path: artifacts/
|
||||
|
||||
|
@ -63,17 +64,19 @@ jobs:
|
|||
run: ./.ci/windows/cygwin.bat
|
||||
|
||||
- name: Configure & Build
|
||||
id: cmake
|
||||
shell: cmd
|
||||
run: ./.ci/windows/build-bqt.bat amd64 no
|
||||
shell: bash
|
||||
run: DEVEL=false ./.ci/windows/build.sh
|
||||
|
||||
- name: Package artifacts
|
||||
shell: powershell
|
||||
run: ./.ci/windows/package.ps1 amd64 no
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="${PATH}:/c/Qt/6.9.0/msvc2022_64/bin"
|
||||
./.ci/windows/package.sh
|
||||
|
||||
- name: Upload Windows artifacts
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: ${{ matrix.target }}.zip
|
||||
path: artifacts/*
|
||||
|
||||
|
@ -93,7 +96,7 @@ jobs:
|
|||
fetch-tags: true
|
||||
|
||||
- name: Build
|
||||
run: ./.ci/linux/build.sh v3 8
|
||||
run: TARGET=appimage RELEASE=1 ./.ci/linux/build.sh v3 8
|
||||
|
||||
- name: Package AppImage
|
||||
run: ./.ci/linux/package.sh v3 &> /dev/null
|
||||
|
@ -101,8 +104,9 @@ jobs:
|
|||
- name: Upload Linux artifacts
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: linux.zip
|
||||
path: ./*.AppImage
|
||||
path: ./*.AppImage*
|
||||
|
||||
android:
|
||||
runs-on: android
|
||||
|
@ -129,7 +133,11 @@ jobs:
|
|||
echo $GIT_TAG_NAME
|
||||
|
||||
- name: Build
|
||||
run: ANDROID_HOME=/opt/android-sdk ./.ci/android/build.sh
|
||||
run: ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
|
||||
- name: Package Android artifacts
|
||||
run: ./.ci/android/package.sh
|
||||
|
@ -137,6 +145,7 @@ jobs:
|
|||
- name: Upload Android artifacts
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 2
|
||||
name: android.zip
|
||||
path: artifacts/*
|
||||
|
||||
|
@ -177,6 +186,7 @@ jobs:
|
|||
mkdir -p dist
|
||||
|
||||
cp linux.zip/Eden-*.AppImage dist/Eden-Linux-${{ env.VERSION }}-amd64.AppImage
|
||||
cp linux.zip/Eden-*.AppImage.zsync dist/Eden-Linux-${{ env.VERSION }}-amd64.AppImage.zsync
|
||||
cp msvc.zip/eden-windows-msvc*.zip dist/Eden-Windows-MSVC-${{ env.VERSION }}-amd64.zip
|
||||
cp android.zip/eden-android*.apk dist/Eden-Android-${{ env.VERSION }}.apk
|
||||
cp android.zip/eden-android*.aab dist/Eden-Android-${{ env.VERSION }}.aab
|
||||
|
|
16
.gitignore
vendored
16
.gitignore
vendored
|
@ -1,9 +1,14 @@
|
|||
# SPDX-FileCopyrightText: 2013 Citra Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Build directory
|
||||
[Bb]uild*/
|
||||
doc-build/
|
||||
AppDir/
|
||||
uruntime
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
|
@ -14,14 +19,21 @@ dist/english_plurals/generated_en.ts
|
|||
.idea/
|
||||
.vs/
|
||||
.vscode/
|
||||
.cache/
|
||||
profile.json.gz
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# kdevelop
|
||||
.kdev4/
|
||||
*.kdev4
|
||||
|
||||
# *nix related
|
||||
# Common convention for backup or temporary files
|
||||
*~
|
||||
|
||||
# Visual Studio CMake settings
|
||||
CMakeSettings.json
|
||||
.cache/
|
||||
|
||||
# OSX global filetypes
|
||||
# Created by Finder or Spotlight in directories for various OS functionality (indexing, etc)
|
||||
|
@ -36,3 +48,7 @@ CMakeSettings.json
|
|||
# Windows global filetypes
|
||||
Thumbs.db
|
||||
|
||||
# Artifacts
|
||||
eden-windows-msvc
|
||||
artifacts
|
||||
*.AppImage*
|
||||
|
|
86
.gitmodules
vendored
86
.gitmodules
vendored
|
@ -1,75 +1,69 @@
|
|||
# SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
[submodule "enet"]
|
||||
path = externals/enet
|
||||
url = https://git.eden-emu.dev/eden-emu/enet.git
|
||||
[submodule "cubeb"]
|
||||
path = externals/cubeb
|
||||
url = https://git.eden-emu.dev/eden-emu/cubeb.git
|
||||
[submodule "dynarmic"]
|
||||
path = externals/dynarmic
|
||||
url = https://git.eden-emu.dev/eden-emu/dynarmic.git
|
||||
url = https://github.com/mozilla/cubeb.git
|
||||
[submodule "libusb"]
|
||||
path = externals/libusb/libusb
|
||||
url = https://git.eden-emu.dev/eden-emu/libusb.git
|
||||
[submodule "discord-rpc"]
|
||||
path = externals/discord-rpc
|
||||
url = https://git.eden-emu.dev/eden-emu/discord-rpc.git
|
||||
url = https://github.com/libusb/libusb.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://git.eden-emu.dev/eden-emu/Vulkan-Headers.git
|
||||
[submodule "sirit"]
|
||||
path = externals/sirit
|
||||
url = https://git.eden-emu.dev/eden-emu/sirit.git
|
||||
[submodule "mbedtls"]
|
||||
path = externals/mbedtls
|
||||
url = https://git.eden-emu.dev/eden-emu/mbedtls.git
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://git.eden-emu.dev/eden-emu/xbyak.git
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
[submodule "opus"]
|
||||
path = externals/opus
|
||||
url = https://git.eden-emu.dev/eden-emu/opus.git
|
||||
url = https://github.com/xiph/opus.git
|
||||
[submodule "SDL"]
|
||||
path = externals/SDL
|
||||
url = https://git.eden-emu.dev/eden-emu/SDL.git
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "cpp-httplib"]
|
||||
path = externals/cpp-httplib
|
||||
url = https://git.eden-emu.dev/eden-emu/cpp-httplib.git
|
||||
url = https://github.com/yhirose/cpp-httplib.git
|
||||
[submodule "ffmpeg"]
|
||||
path = externals/ffmpeg/ffmpeg
|
||||
url = https://git.eden-emu.dev/eden-emu/FFmpeg.git
|
||||
url = https://github.com/FFmpeg/FFmpeg.git
|
||||
[submodule "vcpkg"]
|
||||
path = externals/vcpkg
|
||||
url = https://git.eden-emu.dev/eden-emu/vcpkg.git
|
||||
url = https://github.com/microsoft/vcpkg.git
|
||||
[submodule "cpp-jwt"]
|
||||
path = externals/cpp-jwt
|
||||
url = https://git.eden-emu.dev/eden-emu/cpp-jwt.git
|
||||
[submodule "libadrenotools"]
|
||||
path = externals/libadrenotools
|
||||
url = https://git.eden-emu.dev/eden-emu/libadrenotools.git
|
||||
[submodule "tzdb_to_nx"]
|
||||
path = externals/nx_tzdb/tzdb_to_nx
|
||||
url = https://git.eden-emu.dev/eden-emu/tzdb_to_nx.git
|
||||
url = https://github.com/arun11299/cpp-jwt.git
|
||||
[submodule "VulkanMemoryAllocator"]
|
||||
path = externals/VulkanMemoryAllocator
|
||||
url = https://git.eden-emu.dev/eden-emu/VulkanMemoryAllocator.git
|
||||
[submodule "breakpad"]
|
||||
path = externals/breakpad
|
||||
url = https://git.eden-emu.dev/eden-emu/breakpad.git
|
||||
[submodule "simpleini"]
|
||||
path = externals/simpleini
|
||||
url = https://git.eden-emu.dev/eden-emu/simpleini.git
|
||||
[submodule "oaknut"]
|
||||
path = externals/oaknut
|
||||
url = https://git.eden-emu.dev/eden-emu/oaknut.git
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "Vulkan-Utility-Libraries"]
|
||||
path = externals/Vulkan-Utility-Libraries
|
||||
url = https://git.eden-emu.dev/eden-emu/Vulkan-Utility-Libraries.git
|
||||
[submodule "oboe"]
|
||||
path = externals/oboe
|
||||
url = https://git.eden-emu.dev/eden-emu/oboe.git
|
||||
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
|
||||
[submodule "externals/boost-headers"]
|
||||
path = externals/boost-headers
|
||||
url = https://git.eden-emu.dev/eden-emu/headers.git
|
||||
url = https://github.com/boostorg/headers.git
|
||||
[submodule "externals/dynarmic/externals/catch"]
|
||||
path = externals/dynarmic/externals/catch
|
||||
url = https://github.com/catchorg/Catch2.git
|
||||
[submodule "externals/dynarmic/externals/fmt"]
|
||||
path = externals/dynarmic/externals/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "externals/dynarmic/externals/unordered_dense"]
|
||||
path = externals/dynarmic/externals/unordered_dense
|
||||
url = https://github.com/Lizzie841/unordered_dense.git
|
||||
[submodule "externals/dynarmic/externals/xbyak"]
|
||||
path = externals/dynarmic/externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
[submodule "externals/dynarmic/externals/zycore-c"]
|
||||
path = externals/dynarmic/externals/zycore-c
|
||||
url = https://github.com/zyantific/zycore-c.git
|
||||
[submodule "externals/dynarmic/externals/zydis"]
|
||||
path = externals/dynarmic/externals/zydis
|
||||
url = https://github.com/zyantific/zydis.git
|
||||
[submodule "externals/nx_tzdb/tzdb_to_nx/externals/tz/tz"]
|
||||
path = externals/nx_tzdb/tzdb_to_nx/externals/tz/tz
|
||||
url = https://github.com/eggert/tz.git
|
||||
[submodule "externals/sirit/externals/SPIRV-Headers"]
|
||||
path = externals/sirit/externals/SPIRV-Headers
|
||||
url = https://github.com/KhronosGroup/SPIRV-Headers.git
|
||||
[submodule "externals/SPIRV-Tools"]
|
||||
path = externals/SPIRV-Tools
|
||||
url = https://github.com/KhronosGroup/SPIRV-Tools.git
|
||||
|
|
80
.patch/quazip/0001-strict.patch
Normal file
80
.patch/quazip/0001-strict.patch
Normal file
|
@ -0,0 +1,80 @@
|
|||
diff --git a/quazip/quazipdir.cpp b/quazip/quazipdir.cpp
|
||||
index d43f1c1..eb24bf1 100644
|
||||
--- a/quazip/quazipdir.cpp
|
||||
+++ b/quazip/quazipdir.cpp
|
||||
@@ -293,8 +293,8 @@ bool QuaZipDirComparator::operator()(const QuaZipFileInfo64 &info1,
|
||||
}
|
||||
|
||||
template<typename TFileInfoList>
|
||||
-bool QuaZipDirPrivate::entryInfoList(QStringList nameFilters,
|
||||
- QDir::Filters filter, QDir::SortFlags sort, TFileInfoList &result) const
|
||||
+bool QuaZipDirPrivate::entryInfoList(QStringList _nameFilters,
|
||||
+ QDir::Filters _filter, QDir::SortFlags sort, TFileInfoList &result) const
|
||||
{
|
||||
QString basePath = simplePath();
|
||||
if (!basePath.isEmpty())
|
||||
@@ -305,12 +305,12 @@ bool QuaZipDirPrivate::entryInfoList(QStringList nameFilters,
|
||||
if (!zip->goToFirstFile()) {
|
||||
return zip->getZipError() == UNZ_OK;
|
||||
}
|
||||
- QDir::Filters fltr = filter;
|
||||
+ QDir::Filters fltr = _filter;
|
||||
if (fltr == QDir::NoFilter)
|
||||
fltr = this->filter;
|
||||
if (fltr == QDir::NoFilter)
|
||||
fltr = QDir::AllEntries;
|
||||
- QStringList nmfltr = nameFilters;
|
||||
+ QStringList nmfltr = _nameFilters;
|
||||
if (nmfltr.isEmpty())
|
||||
nmfltr = this->nameFilters;
|
||||
QSet<QString> dirsFound;
|
||||
diff --git a/quazip/quazipfile.cpp b/quazip/quazipfile.cpp
|
||||
index 4a5f2f9..f7865f5 100644
|
||||
--- a/quazip/quazipfile.cpp
|
||||
+++ b/quazip/quazipfile.cpp
|
||||
@@ -241,14 +241,14 @@ void QuaZipFile::setFileName(const QString& fileName, QuaZip::CaseSensitivity cs
|
||||
p->caseSensitivity=cs;
|
||||
}
|
||||
|
||||
-void QuaZipFilePrivate::setZipError(int zipError) const
|
||||
+void QuaZipFilePrivate::setZipError(int _zipError) const
|
||||
{
|
||||
QuaZipFilePrivate *fakeThis = const_cast<QuaZipFilePrivate*>(this); // non-const
|
||||
- fakeThis->zipError=zipError;
|
||||
- if(zipError==UNZ_OK)
|
||||
+ fakeThis->zipError = _zipError;
|
||||
+ if(_zipError == UNZ_OK)
|
||||
q->setErrorString(QString());
|
||||
else
|
||||
- q->setErrorString(QuaZipFile::tr("ZIP/UNZIP API error %1").arg(zipError));
|
||||
+ q->setErrorString(QuaZipFile::tr("ZIP/UNZIP API error %1").arg(_zipError));
|
||||
}
|
||||
|
||||
bool QuaZipFile::open(OpenMode mode)
|
||||
diff --git a/quazip/unzip.c b/quazip/unzip.c
|
||||
index a39365d..ee7b487 100644
|
||||
--- a/quazip/unzip.c
|
||||
+++ b/quazip/unzip.c
|
||||
@@ -1054,7 +1054,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
||||
/* ZIP64 extra fields */
|
||||
if (headerId == 0x0001)
|
||||
{
|
||||
- uLong uL;
|
||||
+ uLong _uL;
|
||||
|
||||
if(file_info.uncompressed_size == (ZPOS64_T)0xFFFFFFFFu)
|
||||
{
|
||||
@@ -1078,7 +1078,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
||||
if(file_info.disk_num_start == 0xFFFFFFFFu)
|
||||
{
|
||||
/* Disk Start Number */
|
||||
- if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
|
||||
+ if (unz64local_getLong(&s->z_filefunc, s->filestream, &_uL) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
||||
@@ -2151,3 +2151,4 @@ int ZEXPORT unzClearFlags(unzFile file, unsigned flags)
|
||||
s->flags &= ~flags;
|
||||
return UNZ_OK;
|
||||
}
|
||||
+
|
26
.patch/quazip/0002-oldstyle.patch
Normal file
26
.patch/quazip/0002-oldstyle.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff --git a/quazip/minizip_crypt.h b/quazip/minizip_crypt.h
|
||||
index 2e833f7..ea9d277 100644
|
||||
--- a/quazip/minizip_crypt.h
|
||||
+++ b/quazip/minizip_crypt.h
|
||||
@@ -90,13 +90,14 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t FAR
|
||||
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
||||
# endif
|
||||
|
||||
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
|
||||
- const char *passwd; /* password string */
|
||||
- unsigned char *buf; /* where to write header */
|
||||
- int bufSize;
|
||||
- unsigned long* pkeys;
|
||||
- const z_crc_t FAR * pcrc_32_tab;
|
||||
- unsigned long crcForCrypting;
|
||||
+static int crypthead(
|
||||
+ const char *passwd, /* password string */
|
||||
+ unsigned char *buf, /* where to write header */
|
||||
+ int bufSize,
|
||||
+ unsigned long* pkeys,
|
||||
+ const z_crc_t FAR * pcrc_32_tab,
|
||||
+ unsigned long crcForCrypting
|
||||
+)
|
||||
{
|
||||
int n; /* index in random header */
|
||||
int t; /* temporary */
|
19
.patch/quazip/0003-predecls.patch
Normal file
19
.patch/quazip/0003-predecls.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
diff --git a/quazip/zip.c b/quazip/zip.c
|
||||
index 7788b88..f4e21aa 100644
|
||||
--- a/quazip/zip.c
|
||||
+++ b/quazip/zip.c
|
||||
@@ -645,6 +645,14 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
||||
return relativeOffset;
|
||||
}
|
||||
|
||||
+// compilers hate this ONE SIMPLE TRICK!
|
||||
+static int LoadCentralDirectoryRecord(zip64_internal* pziinit);
|
||||
+static int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local, uLong version_to_extract);
|
||||
+static int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip);
|
||||
+static int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip);
|
||||
+static int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip);
|
||||
+static int Write_GlobalComment(zip64_internal* zi, const char* global_comment);
|
||||
+
|
||||
int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
{
|
||||
int err=ZIP_OK;
|
400
.patch/quazip/0004-qt6-only.patch
Normal file
400
.patch/quazip/0004-qt6-only.patch
Normal file
|
@ -0,0 +1,400 @@
|
|||
"Debloats" QuaZip by removing some unneeded stuff (Qt <6, bzip2, emscripten...)
|
||||
|
||||
This is completely optional.
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b376fb2..4aac4ec 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3,64 +3,16 @@ cmake_minimum_required(VERSION 3.15...3.18)
|
||||
|
||||
project(QuaZip VERSION 1.5)
|
||||
|
||||
-include(cmake/clone-repo.cmake)
|
||||
-
|
||||
set(QUAZIP_LIB_VERSION ${QuaZip_VERSION})
|
||||
set(QUAZIP_LIB_SOVERSION 1.5.0)
|
||||
|
||||
-if(EMSCRIPTEN)
|
||||
- #option(ZLIB_INCLUDE "Path to include dir" "")
|
||||
- #option(ZLIB_LIBRARY "Path to library dir" "")
|
||||
- option(BUILD_SHARED_LIBS "" OFF)
|
||||
- option(QUAZIP_INSTALL "" OFF)
|
||||
- option(QUAZIP_USE_QT_ZLIB "" OFF)
|
||||
- option(QUAZIP_ENABLE_TESTS "Build QuaZip tests" OFF)
|
||||
-else()
|
||||
- option(BUILD_SHARED_LIBS "" ON)
|
||||
- option(QUAZIP_INSTALL "" ON)
|
||||
- option(QUAZIP_USE_QT_ZLIB "" OFF)
|
||||
- option(QUAZIP_ENABLE_TESTS "Build QuaZip tests" OFF)
|
||||
-endif()
|
||||
+option(BUILD_SHARED_LIBS "" ON)
|
||||
+option(QUAZIP_INSTALL "" ON)
|
||||
+option(QUAZIP_ENABLE_TESTS "Build QuaZip tests" OFF)
|
||||
|
||||
OPTION(ZLIB_CONST "Sets ZLIB_CONST preprocessor definition" OFF)
|
||||
|
||||
-# Make BZIP2 optional
|
||||
-option(QUAZIP_BZIP2 "Enables BZIP2 compression" ON)
|
||||
-option(QUAZIP_BZIP2_STDIO "Output BZIP2 errors to stdio" ON)
|
||||
-
|
||||
-option(QUAZIP_FETCH_LIBS "Enables fetching third-party libraries if not found" ${WIN32})
|
||||
-option(QUAZIP_FORCE_FETCH_LIBS "Enables fetching third-party libraries always" OFF)
|
||||
-
|
||||
-if (QUAZIP_USE_QT_ZLIB AND BUILD_SHARED_LIBS)
|
||||
- message(FATAL_ERROR "Using BUILD_SHARED_LIBS=ON together with QUAZIP_USE_QT_ZLIB=ON is not supported." )
|
||||
-endif()
|
||||
-
|
||||
-# Set the default value of `${QUAZIP_QT_MAJOR_VERSION}`.
|
||||
-# We search quietly for Qt6, Qt5 and Qt4 in that order.
|
||||
-# Qt6 and Qt5 provide config files for CMake.
|
||||
-# Qt4 relies on `FindQt4.cmake`.
|
||||
-find_package(
|
||||
- QT NAMES Qt6 Qt5
|
||||
- QUIET COMPONENTS Core
|
||||
-)
|
||||
-if (NOT QT_FOUND)
|
||||
- find_package(Qt4 QUIET COMPONENTS QtCore)
|
||||
- if (Qt4_FOUND)
|
||||
- set(QT_VERSION_MAJOR 4)
|
||||
- else()
|
||||
- # If neither 6, 5 nor 4 are found, we default to 5.
|
||||
- # The setup will fail further down.
|
||||
- set(QT_VERSION_MAJOR 5)
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(QUAZIP_QT_MAJOR_VERSION ${QT_VERSION_MAJOR} CACHE STRING "Qt version to use (4, 5 or 6), defaults to ${QT_VERSION_MAJOR}")
|
||||
-
|
||||
-if (QUAZIP_QT_MAJOR_VERSION EQUAL 6)
|
||||
- set(CMAKE_CXX_STANDARD 17)
|
||||
-else()
|
||||
- set(CMAKE_CXX_STANDARD 14)
|
||||
-endif()
|
||||
+set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE RELEASE)
|
||||
@@ -77,92 +29,17 @@ set(QUAZIP_LIB_TARGET_NAME QuaZip)
|
||||
set(QUAZIP_DIR_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION}-${QUAZIP_LIB_VERSION})
|
||||
set(QUAZIP_PACKAGE_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION})
|
||||
|
||||
-message(STATUS "QUAZIP_QT_MAJOR_VERSION set to ${QUAZIP_QT_MAJOR_VERSION}")
|
||||
-message(STATUS "CMAKE_CXX_STANDARD set to ${CMAKE_CXX_STANDARD}")
|
||||
-
|
||||
-if(QUAZIP_QT_MAJOR_VERSION EQUAL 6)
|
||||
- find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat
|
||||
- OPTIONAL_COMPONENTS Network Test)
|
||||
- message(STATUS "Found Qt version ${Qt6_VERSION} at ${Qt6_DIR}")
|
||||
- set(QUAZIP_QT_ZLIB_COMPONENT BundledZLIB)
|
||||
- set(QUAZIP_QT_ZLIB_HEADER_COMPONENT ZlibPrivate)
|
||||
- set(QUAZIP_LIB_LIBRARIES Qt6::Core Qt6::Core5Compat)
|
||||
- set(QUAZIP_TEST_QT_LIBRARIES Qt6::Core Qt6::Core5Compat Qt6::Network Qt6::Test)
|
||||
- set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt6Core")
|
||||
-elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 5)
|
||||
- find_package(Qt5 REQUIRED COMPONENTS Core
|
||||
- OPTIONAL_COMPONENTS Network Test)
|
||||
- message(STATUS "Found Qt version ${Qt5_VERSION} at ${Qt5_DIR}")
|
||||
- set(QUAZIP_QT_ZLIB_COMPONENT Zlib)
|
||||
- set(QUAZIP_LIB_LIBRARIES Qt5::Core)
|
||||
- set(QUAZIP_TEST_QT_LIBRARIES Qt5::Core Qt5::Network Qt5::Test)
|
||||
- set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt5Core")
|
||||
-elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 4)
|
||||
- find_package(Qt4 4.5.0 REQUIRED COMPONENTS QtCore
|
||||
- OPTIONAL_COMPONENTS QtNetwork QtTest)
|
||||
- set(QUAZIP_QT_ZLIB_COMPONENT Zlib)
|
||||
- set(QUAZIP_LIB_LIBRARIES Qt4::QtCore)
|
||||
- set(QUAZIP_TEST_QT_LIBRARIES Qt4::QtCore Qt4::QtNetwork Qt4::QtTest)
|
||||
- set(QUAZIP_PKGCONFIG_REQUIRES "zlib, QtCore")
|
||||
-else()
|
||||
- message(FATAL_ERROR "Qt version ${QUAZIP_QT_MAJOR_VERSION} is not supported")
|
||||
-endif()
|
||||
-
|
||||
-message(STATUS "Using Qt version ${QUAZIP_QT_MAJOR_VERSION}")
|
||||
-
|
||||
-set(QUAZIP_QT_ZLIB_USED OFF)
|
||||
-if(QUAZIP_USE_QT_ZLIB)
|
||||
- find_package(Qt${QUAZIP_QT_MAJOR_VERSION} OPTIONAL_COMPONENTS ${QUAZIP_QT_ZLIB_COMPONENT})
|
||||
- set(QUAZIP_QT_ZLIB_COMPONENT_FOUND Qt${QUAZIP_QT_MAJOR_VERSION}${QUAZIP_QT_ZLIB_COMPONENT}_FOUND)
|
||||
- if (DEFINED QUAZIP_QT_ZLIB_HEADER_COMPONENT)
|
||||
- find_package(Qt${QUAZIP_QT_MAJOR_VERSION} OPTIONAL_COMPONENTS ${QUAZIP_QT_ZLIB_HEADER_COMPONENT})
|
||||
- set(QUAZIP_QT_ZLIB_HEADER_COMPONENT_FOUND Qt${QUAZIP_QT_MAJOR_VERSION}${QUAZIP_QT_ZLIB_HEADER_COMPONENT}_FOUND)
|
||||
- else()
|
||||
- set(QUAZIP_QT_ZLIB_HEADER_COMPONENT_FOUND ON)
|
||||
- endif()
|
||||
- if(QUAZIP_QT_ZLIB_COMPONENT_FOUND AND QUAZIP_QT_ZLIB_HEADER_COMPONENT_FOUND)
|
||||
- message(STATUS "Qt component ${QUAZIP_QT_ZLIB_COMPONENT} found")
|
||||
- set(QUAZIP_LIB_LIBRARIES ${QUAZIP_LIB_LIBRARIES} Qt${QUAZIP_QT_MAJOR_VERSION}::${QUAZIP_QT_ZLIB_COMPONENT})
|
||||
- if(DEFINED QUAZIP_QT_ZLIB_HEADER_COMPONENT)
|
||||
- message(STATUS "Qt component ${QUAZIP_QT_ZLIB_HEADER_COMPONENT} found")
|
||||
- set(QUAZIP_LIB_LIBRARIES ${QUAZIP_LIB_LIBRARIES} Qt${QUAZIP_QT_MAJOR_VERSION}::${QUAZIP_QT_ZLIB_HEADER_COMPONENT})
|
||||
- endif()
|
||||
- set(QUAZIP_QT_ZLIB_USED ON)
|
||||
- else()
|
||||
- message(FATAL_ERROR "QUAZIP_USE_QT_ZLIB was set but bundled zlib was not found. Terminating to prevent accidental linking to system libraries.")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-if(QUAZIP_QT_ZLIB_USED AND QUAZIP_QT_ZLIB_COMPONENT STREQUAL BundledZLIB)
|
||||
- # Qt's new BundledZLIB uses z-prefix in zlib
|
||||
- add_compile_definitions(Z_PREFIX)
|
||||
-endif()
|
||||
-
|
||||
-if(NOT QUAZIP_QT_ZLIB_USED)
|
||||
-
|
||||
- if(EMSCRIPTEN)
|
||||
- if(NOT DEFINED ZLIB_LIBRARY)
|
||||
- message(WARNING "ZLIB_LIBRARY is not set")
|
||||
- endif()
|
||||
+find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat
|
||||
+ OPTIONAL_COMPONENTS Network Test)
|
||||
+message(STATUS "Found Qt version ${Qt6_VERSION} at ${Qt6_DIR}")
|
||||
+set(QUAZIP_QT_ZLIB_COMPONENT BundledZLIB)
|
||||
+set(QUAZIP_QT_ZLIB_HEADER_COMPONENT ZlibPrivate)
|
||||
+set(QUAZIP_LIB_LIBRARIES Qt6::Core Qt6::Core5Compat)
|
||||
+set(QUAZIP_TEST_QT_LIBRARIES Qt6::Core Qt6::Core5Compat Qt6::Network Qt6::Test)
|
||||
+set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt6Core")
|
||||
|
||||
- if(NOT DEFINED ZLIB_INCLUDE)
|
||||
- message(WARNING "ZLIB_INCLUDE is not set")
|
||||
- else()
|
||||
- include_directories(${ZLIB_INCLUDE})
|
||||
- endif()
|
||||
-
|
||||
- if(NOT DEFINED ZCONF_INCLUDE)
|
||||
- message(WARNING "ZCONF_INCLUDE is not set")
|
||||
- else()
|
||||
- include_directories(${ZCONF_INCLUDE})
|
||||
- endif()
|
||||
-
|
||||
- set(QUAZIP_LIB_LIBRARIES ${QUAZIP_LIB_LIBRARIES} ${ZLIB_LIBRARY})
|
||||
- else()
|
||||
- find_package(ZLIB REQUIRED)
|
||||
- set(QUAZIP_LIB_LIBRARIES ${QUAZIP_LIB_LIBRARIES} ZLIB::ZLIB)
|
||||
- endif()
|
||||
-endif()
|
||||
+find_package(ZLIB REQUIRED)
|
||||
+set(QUAZIP_LIB_LIBRARIES ${QUAZIP_LIB_LIBRARIES} ZLIB::ZLIB)
|
||||
|
||||
if (ZLIB_CONST)
|
||||
add_compile_definitions(ZLIB_CONST)
|
||||
@@ -173,65 +50,4 @@ set(QUAZIP_INC)
|
||||
set(QUAZIP_LIB)
|
||||
set(QUAZIP_LBD)
|
||||
|
||||
-if(QUAZIP_BZIP2)
|
||||
- # Check if bzip2 is present
|
||||
- set(QUAZIP_BZIP2 ON)
|
||||
-
|
||||
- if(NOT QUAZIP_FORCE_FETCH_LIBS)
|
||||
- find_package(BZip2 QUIET)
|
||||
- endif()
|
||||
-
|
||||
- if(BZIP2_FOUND AND NOT QUAZIP_FORCE_FETCH_LIBS)
|
||||
- message(STATUS "Using BZIP2 ${BZIP2_VERSION_STRING}")
|
||||
-
|
||||
- list(APPEND QUAZIP_INC ${BZIP2_INCLUDE_DIRS})
|
||||
- list(APPEND QUAZIP_LIB ${BZIP2_LIBRARIES})
|
||||
- list(APPEND QUAZIP_LBD ${BZIP2_LIBRARY_DIRS})
|
||||
-
|
||||
- set(PC_PRIVATE_LIBS "${PC_PRIVATE_LIBS} -lbzip2")
|
||||
- elseif(QUAZIP_FETCH_LIBS)
|
||||
- clone_repo(bzip2 https://sourceware.org/git/bzip2.git)
|
||||
-
|
||||
- # BZip2 repository does not support cmake so we have to create
|
||||
- # the bzip2 library ourselves
|
||||
- set(BZIP2_SRC
|
||||
- ${BZIP2_SOURCE_DIR}/blocksort.c
|
||||
- ${BZIP2_SOURCE_DIR}/bzlib.c
|
||||
- ${BZIP2_SOURCE_DIR}/compress.c
|
||||
- ${BZIP2_SOURCE_DIR}/crctable.c
|
||||
- ${BZIP2_SOURCE_DIR}/decompress.c
|
||||
- ${BZIP2_SOURCE_DIR}/huffman.c
|
||||
- ${BZIP2_SOURCE_DIR}/randtable.c)
|
||||
-
|
||||
- set(BZIP2_HDR
|
||||
- ${BZIP2_SOURCE_DIR}/bzlib.h
|
||||
- ${BZIP2_SOURCE_DIR}/bzlib_private.h)
|
||||
-
|
||||
- add_library(bzip2 STATIC ${BZIP2_SRC} ${BZIP2_HDR})
|
||||
-
|
||||
- if(NOT QUAZIP_BZIP2_STDIO)
|
||||
- target_compile_definitions(bzip2 PRIVATE -DBZ_NO_STDIO)
|
||||
- endif()
|
||||
-
|
||||
- list(APPEND QUAZIP_DEP bzip2)
|
||||
- list(APPEND QUAZIP_LIB bzip2)
|
||||
- list(APPEND QUAZIP_INC ${BZIP2_SOURCE_DIR})
|
||||
- else()
|
||||
- message(STATUS "BZip2 library not found")
|
||||
-
|
||||
- set(QUAZIP_BZIP2 OFF)
|
||||
- endif()
|
||||
-
|
||||
- if(QUAZIP_BZIP2)
|
||||
- find_package(BZip2)
|
||||
- add_compile_definitions(HAVE_BZIP2)
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
add_subdirectory(quazip)
|
||||
-
|
||||
-if(QUAZIP_ENABLE_TESTS)
|
||||
- message(STATUS "Building QuaZip tests")
|
||||
- enable_testing()
|
||||
- add_subdirectory(qztest)
|
||||
-endif()
|
||||
diff --git a/quazip/CMakeLists.txt b/quazip/CMakeLists.txt
|
||||
index 6cfdf4e..66bc4cb 100644
|
||||
--- a/quazip/CMakeLists.txt
|
||||
+++ b/quazip/CMakeLists.txt
|
||||
@@ -46,10 +46,6 @@ set(QUAZIP_INCLUDE_PATH ${QUAZIP_DIR_NAME}/quazip)
|
||||
set(QUAZIP_INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||
set(QUAZIP_PKGCONFIG_NAME quazip${QuaZip_VERSION_MAJOR}-qt${QUAZIP_QT_MAJOR_VERSION})
|
||||
|
||||
-if(EMSCRIPTEN)
|
||||
- set(BUILD_SHARED_LIBS OFF)
|
||||
-endif()
|
||||
-
|
||||
add_library(${QUAZIP_LIB_TARGET_NAME} ${QUAZIP_SOURCES})
|
||||
add_library(QuaZip::QuaZip ALIAS ${QUAZIP_LIB_TARGET_NAME})
|
||||
|
||||
diff --git a/quazip/quazip_qt_compat.h b/quazip/quazip_qt_compat.h
|
||||
index 0dde011..41f9dd1 100644
|
||||
--- a/quazip/quazip_qt_compat.h
|
||||
+++ b/quazip/quazip_qt_compat.h
|
||||
@@ -14,16 +14,11 @@
|
||||
|
||||
// Legacy encodings are still everywhere, but the Qt team decided we
|
||||
// don't need them anymore and moved them out of Core in Qt 6.
|
||||
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
-# include <QtCore5Compat/QTextCodec>
|
||||
-#else
|
||||
-# include <QtCore/QTextCodec>
|
||||
-#endif
|
||||
+#include <QtCore5Compat/QTextCodec>
|
||||
|
||||
// QSaveFile terribly breaks the is-a idiom (Liskov substitution principle):
|
||||
// QSaveFile is-a QIODevice, but it makes close() private and aborts
|
||||
// if you call it through the base class. Hence this ugly hack:
|
||||
-#if (QT_VERSION >= 0x050100)
|
||||
#include <QtCore/QSaveFile>
|
||||
inline bool quazip_close(QIODevice *device) {
|
||||
QSaveFile *file = qobject_cast<QSaveFile*>(device);
|
||||
@@ -34,74 +29,35 @@ inline bool quazip_close(QIODevice *device) {
|
||||
device->close();
|
||||
return true;
|
||||
}
|
||||
-#else
|
||||
-inline bool quazip_close(QIODevice *device) {
|
||||
- device->close();
|
||||
- return true;
|
||||
-}
|
||||
-#endif
|
||||
|
||||
-// this is yet another stupid move and deprecation
|
||||
-#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
using Qt::SkipEmptyParts;
|
||||
-#else
|
||||
-#include <QtCore/QString>
|
||||
-const auto SkipEmptyParts = QString::SplitBehavior::SkipEmptyParts;
|
||||
-#endif
|
||||
|
||||
// and yet another... (why didn't they just make qSort delegate to std::sort?)
|
||||
#include <QtCore/QList>
|
||||
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
#include <algorithm>
|
||||
template<typename T, typename C>
|
||||
inline void quazip_sort(T begin, T end, C comparator) {
|
||||
std::sort(begin, end, comparator);
|
||||
}
|
||||
-#else
|
||||
-#include <QtCore/QtAlgorithms>
|
||||
-template<typename T, typename C>
|
||||
-inline void quazip_sort(T begin, T end, C comparator) {
|
||||
- qSort(begin, end, comparator);
|
||||
-}
|
||||
-#endif
|
||||
|
||||
// this is a stupid rename...
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QFileInfo>
|
||||
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
inline QDateTime quazip_ctime(const QFileInfo &fi) {
|
||||
return fi.birthTime();
|
||||
}
|
||||
-#else
|
||||
-inline QDateTime quazip_ctime(const QFileInfo &fi) {
|
||||
- return fi.created();
|
||||
-}
|
||||
-#endif
|
||||
|
||||
// this is just a slightly better alternative
|
||||
#include <QtCore/QFileInfo>
|
||||
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
inline bool quazip_is_symlink(const QFileInfo &fi) {
|
||||
return fi.isSymbolicLink();
|
||||
}
|
||||
-#else
|
||||
-inline bool quazip_is_symlink(const QFileInfo &fi) {
|
||||
- // also detects *.lnk on Windows, but better than nothing
|
||||
- return fi.isSymLink();
|
||||
-}
|
||||
-#endif
|
||||
|
||||
// I'm not even sure what this one is, but nevertheless
|
||||
#include <QtCore/QFileInfo>
|
||||
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
|
||||
inline QString quazip_symlink_target(const QFileInfo &fi) {
|
||||
return fi.symLinkTarget();
|
||||
}
|
||||
-#else
|
||||
-inline QString quazip_symlink_target(const QFileInfo &fi) {
|
||||
- return fi.readLink(); // What's the difference? I've no idea.
|
||||
-}
|
||||
-#endif
|
||||
|
||||
// deprecation
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
@@ -125,40 +81,19 @@ inline QDateTime quazip_since_epoch_ntfs() {
|
||||
|
||||
// this is not a deprecation but an improvement, for a change
|
||||
#include <QtCore/QDateTime>
|
||||
-#if (QT_VERSION >= 0x040700)
|
||||
inline quint64 quazip_ntfs_ticks(const QDateTime &time, int fineTicks) {
|
||||
QDateTime base = quazip_since_epoch_ntfs();
|
||||
return base.msecsTo(time) * 10000 + fineTicks;
|
||||
}
|
||||
-#else
|
||||
-inline quint64 quazip_ntfs_ticks(const QDateTime &time, int fineTicks) {
|
||||
- QDateTime base = quazip_since_epoch_ntfs();
|
||||
- QDateTime utc = time.toUTC();
|
||||
- return (static_cast<qint64>(base.date().daysTo(utc.date()))
|
||||
- * Q_INT64_C(86400000)
|
||||
- + static_cast<qint64>(base.time().msecsTo(utc.time())))
|
||||
- * Q_INT64_C(10000) + fineTicks;
|
||||
-}
|
||||
-#endif
|
||||
|
||||
// yet another improvement...
|
||||
#include <QtCore/QDateTime>
|
||||
-#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) // Yay! Finally a way to get time as qint64!
|
||||
inline qint64 quazip_to_time64_t(const QDateTime &time) {
|
||||
return time.toSecsSinceEpoch();
|
||||
}
|
||||
-#else
|
||||
-inline qint64 quazip_to_time64_t(const QDateTime &time) {
|
||||
- return static_cast<qint64>(time.toTime_t()); // 32 bits only, but better than nothing
|
||||
-}
|
||||
-#endif
|
||||
|
||||
#include <QtCore/QTextStream>
|
||||
-// and another stupid move
|
||||
-#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
const auto quazip_endl = Qt::endl;
|
||||
-#else
|
||||
-const auto quazip_endl = endl;
|
||||
-#endif
|
||||
|
||||
#endif // QUAZIP_QT_COMPAT_H
|
||||
+
|
197
CMakeLists.txt
197
CMakeLists.txt
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
@ -17,6 +17,10 @@ if (MSVC)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX-")
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
|
||||
endif()
|
||||
|
||||
# Check if SDL2::SDL2 target exists; if not, create an alias
|
||||
if (TARGET SDL2::SDL2-static)
|
||||
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
|
||||
|
@ -25,49 +29,87 @@ elseif (TARGET SDL2::SDL2-shared)
|
|||
endif()
|
||||
|
||||
# Set bundled sdl2/qt as dependent options.
|
||||
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
|
||||
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
|
||||
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF)
|
||||
else()
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
|
||||
endif()
|
||||
|
||||
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
|
||||
|
||||
option(ENABLE_OPENGL "Enable OpenGL" ON)
|
||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||
|
||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||
option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||
|
||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
||||
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" OFF)
|
||||
else()
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON)
|
||||
endif()
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" OFF)
|
||||
else()
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
|
||||
endif()
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" OFF)
|
||||
else()
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" OFF)
|
||||
else()
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ON)
|
||||
endif()
|
||||
|
||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||
|
||||
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
|
||||
|
||||
set(YUZU_QT_MIRROR "" CACHE STRING "What mirror to use for downloading the bundled Qt libraries")
|
||||
|
||||
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
||||
|
||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
|
||||
|
||||
option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
|
||||
|
||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
|
||||
else()
|
||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
endif()
|
||||
|
||||
option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM_STANDALONE "Enable standalone room executable" ON "YUZU_ROOM" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_CMD "Compile the eden-cli executable" ON "NOT ANDROID" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF)
|
||||
|
||||
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
||||
|
||||
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" OFF)
|
||||
else()
|
||||
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON)
|
||||
endif()
|
||||
|
||||
option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||
|
||||
|
@ -105,13 +147,13 @@ if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
|
|||
file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip"
|
||||
"${vvl_zip_file}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
endif()
|
||||
|
||||
# Copy the arm64 binary to src/android/app/main/jniLibs
|
||||
set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/")
|
||||
file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
|
||||
DESTINATION "${vvl_lib_path}")
|
||||
DESTINATION "${vvl_lib_path}")
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
|
@ -209,7 +251,7 @@ function(check_submodules_present)
|
|||
string(REGEX REPLACE "path *= *" "" module ${module})
|
||||
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git")
|
||||
message(FATAL_ERROR "Git submodule ${module} not found. "
|
||||
"Please run: \ngit submodule update --init --recursive")
|
||||
"Please run: \ngit submodule update --init --recursive")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@ -218,12 +260,12 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules AND YUZU_CHECK_SUBMODULES)
|
|||
check_submodules_present()
|
||||
endif()
|
||||
configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
|
||||
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
|
||||
COPYONLY)
|
||||
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
|
||||
COPYONLY)
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json)
|
||||
configure_file("${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json"
|
||||
"${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json"
|
||||
COPYONLY)
|
||||
"${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json"
|
||||
COPYONLY)
|
||||
endif()
|
||||
if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
|
||||
message(STATUS "Downloading compatibility list for yuzu...")
|
||||
|
@ -285,6 +327,10 @@ if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
|
|||
add_definitions(-DHAS_NCE=1)
|
||||
endif()
|
||||
|
||||
if (YUZU_ROOM)
|
||||
add_definitions(-DYUZU_ROOM)
|
||||
endif()
|
||||
|
||||
# Configure C++ standard
|
||||
# ===========================
|
||||
|
||||
|
@ -299,7 +345,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
|||
|
||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||
find_package(enet 1.3 MODULE)
|
||||
find_package(fmt 10 REQUIRED)
|
||||
find_package(fmt 8 REQUIRED)
|
||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||
find_package(lz4 REQUIRED)
|
||||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
|
@ -319,8 +365,17 @@ if (NOT YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES)
|
|||
find_package(VulkanUtilityLibraries REQUIRED)
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SPIRV-Tools REQUIRED SPIRV-Tools)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LIBUSB)
|
||||
find_package(libusb 1.0.24 MODULE)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
find_package(libusb MODULE)
|
||||
else()
|
||||
find_package(libusb 1.0.24 MODULE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||
|
@ -345,6 +400,9 @@ endif()
|
|||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
find_package(cpp-jwt 1.4 CONFIG)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
|
||||
find_package(httplib 0.12 MODULE COMPONENTS OpenSSL)
|
||||
endif()
|
||||
|
||||
|
@ -360,17 +418,12 @@ if (UNIX AND NOT APPLE)
|
|||
find_package(gamemode 1.7 MODULE)
|
||||
endif()
|
||||
|
||||
# Please consider this as a stub
|
||||
if(ENABLE_QT6 AND Qt6_LOCATION)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
|
||||
endif()
|
||||
|
||||
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the YUZU_find_package
|
||||
if (ENABLE_SDL2)
|
||||
if (YUZU_USE_BUNDLED_SDL2)
|
||||
# Detect toolchain and platform
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920) AND ARCHITECTURE_x86_64)
|
||||
set(SDL2_VER "SDL2-2.28.2")
|
||||
set(SDL2_VER "SDL2-2.32.8")
|
||||
else()
|
||||
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
|
||||
endif()
|
||||
|
@ -394,15 +447,31 @@ if (ENABLE_SDL2)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# List of all FFmpeg components required
|
||||
set(FFmpeg_COMPONENTS
|
||||
avcodec
|
||||
avfilter
|
||||
avutil
|
||||
swscale)
|
||||
|
||||
add_subdirectory(externals)
|
||||
|
||||
|
||||
if (ENABLE_QT)
|
||||
if (NOT USE_SYSTEM_QT)
|
||||
download_qt(6.7.3)
|
||||
if (YUZU_USE_BUNDLED_QT)
|
||||
download_qt(6.8.3)
|
||||
else()
|
||||
message(STATUS "Using system Qt")
|
||||
if (NOT Qt6_DIR)
|
||||
set(Qt6_DIR "" CACHE PATH "Additional path to search for Qt6 libraries like C:/Qt/6.8.3/msvc2022_64/lib/cmake/Qt6")
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH "${Qt6_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
|
||||
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
||||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
find_package(Qt6 REQUIRED COMPONENTS DBus)
|
||||
|
@ -426,54 +495,49 @@ if (ENABLE_QT)
|
|||
if (NOT DEFINED QT_HOST_PATH)
|
||||
set(QT_HOST_PATH "${QT_TARGET_PATH}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using target Qt at ${QT_TARGET_PATH}")
|
||||
message(STATUS "Using host Qt at ${QT_HOST_PATH}")
|
||||
endif()
|
||||
|
||||
function(set_yuzu_qt_components)
|
||||
# Best practice is to ask for all components at once, so they are from the same version
|
||||
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
list(APPEND YUZU_QT_COMPONENTS2 DBus)
|
||||
endif()
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 Multimedia)
|
||||
# Best practice is to ask for all components at once, so they are from the same version
|
||||
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
list(APPEND YUZU_QT_COMPONENTS2 DBus)
|
||||
endif()
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 Multimedia)
|
||||
endif()
|
||||
if (YUZU_USE_QT_WEB_ENGINE)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets)
|
||||
endif()
|
||||
if (ENABLE_QT_TRANSLATION)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 LinguistTools)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 LinguistTools)
|
||||
endif()
|
||||
if (USE_DISCORD_PRESENCE)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 Network)
|
||||
list(APPEND YUZU_QT_COMPONENTS2 Network)
|
||||
endif()
|
||||
set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE)
|
||||
endfunction(set_yuzu_qt_components)
|
||||
endfunction(set_yuzu_qt_components)
|
||||
|
||||
# List of all FFmpeg components required
|
||||
set(FFmpeg_COMPONENTS
|
||||
avcodec
|
||||
avfilter
|
||||
avutil
|
||||
swscale)
|
||||
|
||||
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBVA libva)
|
||||
endif()
|
||||
if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
||||
# Use system installed FFmpeg
|
||||
find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||
#find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||
find_package(FFmpeg REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_QT)
|
||||
set_yuzu_qt_components()
|
||||
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
# Qt6 sets cxx_std_17 and we need to undo that
|
||||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
endif()
|
||||
set_yuzu_qt_components()
|
||||
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
# Qt6 sets cxx_std_17 and we need to undo that
|
||||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
endif()
|
||||
|
||||
if (WIN32 AND YUZU_CRASH_DUMPS)
|
||||
set(BREAKPAD_VER "breakpad-c89f9dd")
|
||||
|
@ -498,6 +562,8 @@ if (APPLE)
|
|||
# Umbrella framework for everything GUI-related
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
|
||||
find_library(ICONV_LIBRARY iconv REQUIRED)
|
||||
list(APPEND PLATFORM_LIBRARIES ${ICONV_LIBRARY})
|
||||
elseif (WIN32)
|
||||
# Target Windows 10
|
||||
add_definitions(-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
||||
|
@ -517,7 +583,7 @@ endif()
|
|||
set(CLANG_FORMAT_POSTFIX "-15")
|
||||
find_program(CLANG_FORMAT
|
||||
NAMES clang-format${CLANG_FORMAT_POSTFIX}
|
||||
clang-format
|
||||
clang-format
|
||||
PATHS ${PROJECT_BINARY_DIR}/externals)
|
||||
# if find_program doesn't find it, try to download from externals
|
||||
if (NOT CLANG_FORMAT)
|
||||
|
@ -641,13 +707,14 @@ endif()
|
|||
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
|
||||
# https://www.freedesktop.org/software/appstream/docs/
|
||||
if(ENABLE_QT AND UNIX AND NOT APPLE)
|
||||
install(FILES "dist/org.yuzu_emu.yuzu.desktop"
|
||||
DESTINATION "share/applications")
|
||||
install(FILES "dist/eden.svg"
|
||||
DESTINATION "share/icons/hicolor/scalable/apps"
|
||||
RENAME "org.yuzu_emu.eden.svg")
|
||||
install(FILES "dist/org.yuzu_emu.yuzu.xml"
|
||||
DESTINATION "share/mime/packages")
|
||||
install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml"
|
||||
DESTINATION "share/metainfo")
|
||||
install(FILES "dist/org.eden_emu.eden.desktop"
|
||||
DESTINATION "share/applications")
|
||||
install(FILES "dist/org.eden_emu.eden.svg"
|
||||
DESTINATION "share/icons/hicolor/scalable/apps")
|
||||
|
||||
# TODO: these files need to be updated.
|
||||
install(FILES "dist/org.eden_emu.eden.xml"
|
||||
DESTINATION "share/mime/packages")
|
||||
install(FILES "dist/org.eden_emu.eden.metainfo.xml"
|
||||
DESTINATION "share/metainfo")
|
||||
endif()
|
||||
|
|
24
CMakeModules/CPM.cmake
Normal file
24
CMakeModules/CPM.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
|
||||
|
||||
set(CPM_DOWNLOAD_VERSION 0.42.0)
|
||||
set(CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")
|
||||
|
||||
if(CPM_SOURCE_CACHE)
|
||||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
||||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
else()
|
||||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
endif()
|
||||
|
||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
||||
|
||||
file(DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
|
||||
)
|
||||
|
||||
include(${CPM_DOWNLOAD_LOCATION})
|
|
@ -16,7 +16,7 @@ function(copy_yuzu_Qt6_deps target_dir)
|
|||
set(PLATFORMS ${DLL_DEST}plugins/platforms/)
|
||||
set(STYLES ${DLL_DEST}plugins/styles/)
|
||||
set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/)
|
||||
|
||||
set(RESOURCES ${DLL_DEST}resources/)
|
||||
if (MSVC)
|
||||
windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST}
|
||||
Qt6Core$<$<CONFIG:Debug>:d>.*
|
||||
|
@ -31,20 +31,31 @@ function(copy_yuzu_Qt6_deps target_dir)
|
|||
endif()
|
||||
if (YUZU_USE_QT_WEB_ENGINE)
|
||||
windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST}
|
||||
Qt6OpenGL$<$<CONFIG:Debug>:d>.*
|
||||
Qt6Positioning$<$<CONFIG:Debug>:d>.*
|
||||
Qt6PrintSupport$<$<CONFIG:Debug>:d>.*
|
||||
Qt6Qml$<$<CONFIG:Debug>:d>.*
|
||||
Qt6QmlMeta$<$<CONFIG:Debug>:d>.*
|
||||
Qt6QmlModels$<$<CONFIG:Debug>:d>.*
|
||||
Qt6QmlWorkerScript$<$<CONFIG:Debug>:d>.*
|
||||
Qt6Quick$<$<CONFIG:Debug>:d>.*
|
||||
Qt6QuickWidgets$<$<CONFIG:Debug>:d>.*
|
||||
Qt6WebChannel$<$<CONFIG:Debug>:d>.*
|
||||
Qt6WebEngineCore$<$<CONFIG:Debug>:d>.*
|
||||
Qt6WebEngineWidgets$<$<CONFIG:Debug>:d>.*
|
||||
QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
|
||||
QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
|
||||
)
|
||||
windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${DLL_DEST}
|
||||
windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${RESOURCES}
|
||||
icudtl.dat
|
||||
qtwebengine_devtools_resources.pak
|
||||
qtwebengine_resources.pak
|
||||
qtwebengine_resources_100p.pak
|
||||
qtwebengine_resources_200p.pak
|
||||
v8_context_snapshot.bin
|
||||
)
|
||||
endif()
|
||||
windows_copy_files(yuzu ${Qt6_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
|
||||
windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
|
||||
windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qmodernwindowsstyle$<$<CONFIG:Debug>:d>.*)
|
||||
windows_copy_files(yuzu ${Qt6_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
|
||||
qjpeg$<$<CONFIG:Debug>:d>.*
|
||||
qgif$<$<CONFIG:Debug>:d>.*
|
||||
|
@ -52,9 +63,6 @@ function(copy_yuzu_Qt6_deps target_dir)
|
|||
else()
|
||||
# Update for non-MSVC platforms if needed
|
||||
endif()
|
||||
|
||||
# Create an empty qt.conf file
|
||||
add_custom_command(TARGET yuzu POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${DLL_DEST}qt.conf
|
||||
)
|
||||
# Fixes dark mode being forced automatically even when light theme is set in app settings.
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/qt.conf" "[Platforms]\nWindowsArguments = darkmode=0")
|
||||
endfunction(copy_yuzu_Qt6_deps)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This function downloads a binary library package from our external repo.
|
||||
|
@ -15,10 +15,10 @@ if (WIN32)
|
|||
set(package_repo "ext-windows-bin/raw/master/")
|
||||
set(package_extension ".7z")
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(package_repo "ext-linux-bin/raw/main/")
|
||||
set(package_repo "ext-linux-bin/raw/master/")
|
||||
set(package_extension ".tar.xz")
|
||||
elseif (ANDROID)
|
||||
set(package_repo "ext-android-bin/raw/main/")
|
||||
set(package_repo "ext-android-bin/raw/master/")
|
||||
set(package_extension ".tar.xz")
|
||||
else()
|
||||
message(FATAL_ERROR "No package available for this platform")
|
||||
|
@ -68,22 +68,22 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
|
|||
set(arch_path "mingw_64")
|
||||
elseif (MSVC)
|
||||
if ("arm64" IN_LIST ARCHITECTURE)
|
||||
set(arch_path "msvc2019_arm64")
|
||||
set(arch_path "msvc2022_arm64")
|
||||
elseif ("x86_64" IN_LIST ARCHITECTURE)
|
||||
set(arch_path "msvc2019_64")
|
||||
set(arch_path "msvc2022_64")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported bundled Qt architecture. Enable USE_SYSTEM_QT and provide your own.")
|
||||
message(FATAL_ERROR "Unsupported bundled Qt architecture. Disable YUZU_USE_BUNDLED_QT and provide your own.")
|
||||
endif()
|
||||
set(arch "win64_${arch_path}")
|
||||
|
||||
if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
set(host_arch_path "msvc2019_64")
|
||||
set(host_arch_path "msvc2022_64")
|
||||
elseif (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
set(host_arch_path "msvc2019_64")
|
||||
set(host_arch_path "msvc2022_arm64")
|
||||
endif()
|
||||
set(host_arch "win64_${host_arch_path}")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported bundled Qt toolchain. Enable USE_SYSTEM_QT and provide your own.")
|
||||
message(FATAL_ERROR "Unsupported bundled Qt toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.")
|
||||
endif()
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
|
@ -94,7 +94,7 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
|
|||
else()
|
||||
set(host "linux")
|
||||
set(type "desktop")
|
||||
set(arch "gcc_64")
|
||||
set(arch "linux_gcc_64")
|
||||
set(arch_path "linux")
|
||||
endif()
|
||||
|
||||
|
@ -133,13 +133,26 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba
|
|||
set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target})
|
||||
else()
|
||||
set(prefix "${base_path}/${target}/${arch_path}")
|
||||
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch}
|
||||
-m qtmultimedia --archives qttranslations qttools qtsvg qtbase)
|
||||
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt_base)
|
||||
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
set(install_args ${install_args} qtmultimedia)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_QT_WEB_ENGINE)
|
||||
set(install_args ${install_args} qtpositioning qtwebchannel qtwebengine)
|
||||
endif()
|
||||
|
||||
if (NOT ${YUZU_QT_MIRROR} STREQUAL "")
|
||||
message(STATUS "Using Qt mirror ${YUZU_QT_MIRROR}")
|
||||
set(install_args ${install_args} -b ${YUZU_QT_MIRROR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Install Args ${install_args}")
|
||||
if (NOT EXISTS "${prefix}")
|
||||
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.1.18")
|
||||
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0")
|
||||
if (WIN32)
|
||||
set(aqt_path "${base_path}/aqt.exe")
|
||||
if (NOT EXISTS "${aqt_path}")
|
||||
|
|
|
@ -19,7 +19,7 @@ if (LLVM_FOUND AND LLVM_Demangle_FOUND AND NOT TARGET LLVM::Demangle)
|
|||
target_include_directories(LLVM::Demangle INTERFACE ${LLVM_INCLUDE_DIRS})
|
||||
# prefer shared LLVM: https://github.com/llvm/llvm-project/issues/34593
|
||||
# but use ugly hack because llvm_config doesn't support interface library
|
||||
add_library(_dummy_lib SHARED EXCLUDE_FROM_ALL src/yuzu/main.cpp)
|
||||
add_library(_dummy_lib SHARED EXCLUDE_FROM_ALL ${CMAKE_SOURCE_DIR}/src/yuzu/main.cpp)
|
||||
llvm_config(_dummy_lib USE_SHARED demangle)
|
||||
get_target_property(LLVM_LIBRARIES _dummy_lib LINK_LIBRARIES)
|
||||
target_link_libraries(LLVM::Demangle INTERFACE ${LLVM_LIBRARIES})
|
||||
|
|
29
CMakeModules/Findlibiw.cmake
Normal file
29
CMakeModules/Findlibiw.cmake
Normal file
|
@ -0,0 +1,29 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(IW QUIET IMPORTED_TARGET iw)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libiw
|
||||
REQUIRED_VARS IW_LIBRARIES IW_INCLUDE_DIRS
|
||||
VERSION_VAR IW_VERSION
|
||||
FAIL_MESSAGE "libiw (Wireless Tools library) not found. Please install libiw-dev (Debian/Ubuntu), wireless-tools-devel (Fedora), wireless_tools (Arch), or net-wireless/iw (Gentoo)."
|
||||
)
|
||||
|
||||
if (Libiw_FOUND AND TARGET PkgConfig::IW AND NOT TARGET iw::iw)
|
||||
add_library(iw::iw ALIAS PkgConfig::IW)
|
||||
endif()
|
||||
|
||||
if(Libiw_FOUND)
|
||||
mark_as_advanced(
|
||||
IW_INCLUDE_DIRS
|
||||
IW_LIBRARIES
|
||||
IW_LIBRARY_DIRS
|
||||
IW_LINK_LIBRARIES # Often set by pkg-config
|
||||
IW_LDFLAGS
|
||||
IW_CFLAGS
|
||||
IW_CFLAGS_OTHER
|
||||
IW_VERSION
|
||||
)
|
||||
endif()
|
|
@ -20,37 +20,19 @@ if (NOT GIT_BRANCH)
|
|||
endif()
|
||||
get_timestamp(BUILD_DATE)
|
||||
|
||||
# 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
|
||||
set(REPO_NAME "")
|
||||
set(BUILD_VERSION "0")
|
||||
set(BUILD_ID ${DISPLAY_VERSION})
|
||||
if (BUILD_REPOSITORY)
|
||||
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
||||
string(REGEX MATCH "yuzu-emu/yuzu-?(.*)" OUTVAR ${BUILD_REPOSITORY})
|
||||
if ("${CMAKE_MATCH_COUNT}" GREATER 0)
|
||||
# capitalize the first letter of each word in the repo name.
|
||||
string(REPLACE "-" ";" REPO_NAME_LIST ${CMAKE_MATCH_1})
|
||||
foreach(WORD ${REPO_NAME_LIST})
|
||||
string(SUBSTRING ${WORD} 0 1 FIRST_LETTER)
|
||||
string(SUBSTRING ${WORD} 1 -1 REMAINDER)
|
||||
string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
|
||||
set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER}")
|
||||
endforeach()
|
||||
if (BUILD_TAG)
|
||||
string(REGEX MATCH "${CMAKE_MATCH_1}-([0-9]+)" OUTVAR ${BUILD_TAG})
|
||||
if (${CMAKE_MATCH_COUNT} GREATER 0)
|
||||
set(BUILD_VERSION ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
if (BUILD_VERSION)
|
||||
# This leaves a trailing space on the last word, but we actually want that
|
||||
# because of how it's styled in the title bar.
|
||||
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
||||
else()
|
||||
set(BUILD_FULLNAME "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
git_get_exact_tag(GIT_TAG --tags)
|
||||
if (GIT_TAG MATCHES "NOTFOUND")
|
||||
set(BUILD_VERSION "${GIT_DESC}")
|
||||
set(IS_DEV_BUILD true)
|
||||
else()
|
||||
set(BUILD_VERSION ${GIT_TAG})
|
||||
set(IS_DEV_BUILD false)
|
||||
endif()
|
||||
|
||||
# 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
|
||||
set(REPO_NAME "Eden")
|
||||
set(BUILD_ID ${GIT_BRANCH})
|
||||
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
||||
|
||||
configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)
|
||||
|
|
16
README.md
16
README.md
|
@ -1,8 +1,9 @@
|
|||
<!--
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# SPDX-FileCopyrightText: 2025 EDEN Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<!-- lang: en-GB -->
|
||||
|
||||
|
@ -42,11 +43,11 @@ The emulator is capable of running most commercial games at full speed, provided
|
|||
|
||||
A list of supported games will be available in future. Please be patient.
|
||||
|
||||
Check out our [website](https://eden-emulator.github.io) 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!
|
||||
|
||||
## 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/ynGGJAN4Rx).
|
||||
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/edenemu).
|
||||
|
||||
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 to learn more about the current state of the emulator.
|
||||
|
@ -59,12 +60,11 @@ You can also contact any of the developers on Discord to learn more about the cu
|
|||
|
||||
## Download
|
||||
|
||||
You will be able to download the latest releases from [here](https://git.eden-emu.dev/eden-emu/eden/releases), or with MEGA and Archive links provided on Discord.
|
||||
You will be able to download the latest releases from [here](https://github.com/eden-emulator/Releases/releases).
|
||||
|
||||
## Support
|
||||
|
||||
If you enjoy the project and would like to support us financially, please check out our developers' donation pages!
|
||||
- [crueter/Camille](https://liberapay.com/crueter)
|
||||
If you enjoy the project and would like to support us financially, please check out our developers' [donation pages](https://eden-emu.dev/donations.html)!
|
||||
|
||||
Any donations received will go towards things such as:
|
||||
* Switch consoles to explore and reverse-engineer the hardware
|
||||
|
@ -73,7 +73,7 @@ Any donations received will go towards things such as:
|
|||
* Additional hardware (e.g. GPUs as needed to improve rendering support, other peripherals to add support for, etc.)
|
||||
* CI Infrastructure
|
||||
|
||||
If you would prefer to support us in a different way, please join our [Discord](https://discord.gg/ynGGJAN4Rx), once public, and talk to Camille or any of our other developers.
|
||||
If you would prefer to support us in a different way, please join our [Discord](https://discord.gg/edenemu), once public, and talk to Camille or any of our other developers.
|
||||
|
||||
## License
|
||||
|
||||
|
|
BIN
dist/eden.icns
vendored
Normal file
BIN
dist/eden.icns
vendored
Normal file
Binary file not shown.
3618
dist/languages/ar.ts
vendored
3618
dist/languages/ar.ts
vendored
File diff suppressed because it is too large
Load diff
3694
dist/languages/ca.ts
vendored
3694
dist/languages/ca.ts
vendored
File diff suppressed because it is too large
Load diff
3994
dist/languages/cs.ts
vendored
3994
dist/languages/cs.ts
vendored
File diff suppressed because it is too large
Load diff
4526
dist/languages/da.ts
vendored
4526
dist/languages/da.ts
vendored
File diff suppressed because it is too large
Load diff
3072
dist/languages/de.ts
vendored
3072
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load diff
4394
dist/languages/el.ts
vendored
4394
dist/languages/el.ts
vendored
File diff suppressed because it is too large
Load diff
2859
dist/languages/es.ts
vendored
2859
dist/languages/es.ts
vendored
File diff suppressed because it is too large
Load diff
8164
dist/languages/fi.ts
vendored
8164
dist/languages/fi.ts
vendored
File diff suppressed because it is too large
Load diff
2822
dist/languages/fr.ts
vendored
2822
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load diff
2914
dist/languages/hu.ts
vendored
2914
dist/languages/hu.ts
vendored
File diff suppressed because it is too large
Load diff
3726
dist/languages/id.ts
vendored
3726
dist/languages/id.ts
vendored
File diff suppressed because it is too large
Load diff
3067
dist/languages/it.ts
vendored
3067
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load diff
3211
dist/languages/ja_JP.ts
vendored
3211
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load diff
3192
dist/languages/ko_KR.ts
vendored
3192
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load diff
3188
dist/languages/nb.ts
vendored
3188
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load diff
3202
dist/languages/nl.ts
vendored
3202
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load diff
3375
dist/languages/pl.ts
vendored
3375
dist/languages/pl.ts
vendored
File diff suppressed because it is too large
Load diff
2835
dist/languages/pt_BR.ts
vendored
2835
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load diff
2819
dist/languages/pt_PT.ts
vendored
2819
dist/languages/pt_PT.ts
vendored
File diff suppressed because it is too large
Load diff
2861
dist/languages/ru_RU.ts
vendored
2861
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load diff
4323
dist/languages/sv.ts
vendored
4323
dist/languages/sv.ts
vendored
File diff suppressed because it is too large
Load diff
3275
dist/languages/tr_TR.ts
vendored
3275
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load diff
3241
dist/languages/uk.ts
vendored
3241
dist/languages/uk.ts
vendored
File diff suppressed because it is too large
Load diff
3178
dist/languages/vi.ts
vendored
3178
dist/languages/vi.ts
vendored
File diff suppressed because it is too large
Load diff
3177
dist/languages/vi_VN.ts
vendored
3177
dist/languages/vi_VN.ts
vendored
File diff suppressed because it is too large
Load diff
2820
dist/languages/zh_CN.ts
vendored
2820
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load diff
2818
dist/languages/zh_TW.ts
vendored
2818
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -7,7 +10,7 @@ Type=Application
|
|||
Name=eden
|
||||
GenericName=Switch Emulator
|
||||
Comment=Nintendo Switch video game console emulator
|
||||
Icon=org.yuzu_emu.eden
|
||||
Icon=org.eden_emu.eden
|
||||
TryExec=eden
|
||||
Exec=eden %f
|
||||
Categories=Game;Emulator;Qt;
|
0
dist/eden.svg → dist/org.eden_emu.eden.svg
vendored
0
dist/eden.svg → dist/org.eden_emu.eden.svg
vendored
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
12
dist/qt_themes/default/style.qss
vendored
12
dist/qt_themes/default/style.qss
vendored
|
@ -38,6 +38,18 @@ QPushButton#RendererStatusBarButton:!checked {
|
|||
color: #0066ff;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton {
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton {
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
|
|
12
dist/qt_themes/default_dark/style.qss
vendored
12
dist/qt_themes/default_dark/style.qss
vendored
|
@ -42,6 +42,18 @@ QPushButton#RendererStatusBarButton:!checked {
|
|||
color: #00ccdd;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton {
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton {
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
|
|
13
dist/qt_themes/qdarkstyle/style.qss
vendored
13
dist/qt_themes/qdarkstyle/style.qss
vendored
|
@ -1283,6 +1283,19 @@ QPushButton#RendererStatusBarButton:!checked {
|
|||
color: #00ccdd;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton {
|
||||
min-width: 0px;
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton {
|
||||
min-width: 0px;
|
||||
color: #656565;
|
||||
|
|
|
@ -2186,6 +2186,19 @@ QPushButton#RendererStatusBarButton:!checked {
|
|||
color: #00ccdd;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton {
|
||||
min-width: 0px;
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#RefreshButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton {
|
||||
min-width: 0px;
|
||||
color: #656565;
|
||||
|
|
8
externals/CMakeLists.txt
vendored
8
externals/CMakeLists.txt
vendored
|
@ -119,7 +119,7 @@ endif()
|
|||
add_subdirectory(sirit)
|
||||
|
||||
# httplib
|
||||
if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
|
||||
if ((ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER) AND NOT TARGET httplib::httplib)
|
||||
set(HTTPLIB_REQUIRE_OPENSSL ON)
|
||||
add_subdirectory(cpp-httplib)
|
||||
endif()
|
||||
|
@ -160,6 +160,12 @@ if (YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES)
|
|||
add_subdirectory(Vulkan-Utility-Libraries)
|
||||
endif()
|
||||
|
||||
# SPIRV-Tools
|
||||
if (YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
|
||||
set(SPIRV_SKIP_EXECUTABLES ON)
|
||||
add_subdirectory(SPIRV-Tools)
|
||||
endif()
|
||||
|
||||
# Boost headers
|
||||
add_subdirectory(boost-headers)
|
||||
|
||||
|
|
1
externals/SPIRV-Tools
vendored
Submodule
1
externals/SPIRV-Tools
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 40eb301f320e1d85ce3bc12798022149eae3eee3
|
2
externals/Vulkan-Headers
vendored
2
externals/Vulkan-Headers
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 409c16be502e39fe70dd6fe2d9ad4842ef2c9a53
|
||||
Subproject commit 16cedde3564629c43808401ad1eb3ca6ef24709a
|
2
externals/Vulkan-Utility-Libraries
vendored
2
externals/Vulkan-Utility-Libraries
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 4e246c56ec5afb5ad66b9b04374d39ac04675c8e
|
||||
Subproject commit f216bb107bfc6d99a9605572963613e828b10880
|
2
externals/VulkanMemoryAllocator
vendored
2
externals/VulkanMemoryAllocator
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 539c0a8d8e3733c9f25ea9a184c85c77504f1653
|
||||
Subproject commit 6ec8481c8a13db586d7b3ba58f4eb9bbf017edf0
|
1
externals/breakpad
vendored
1
externals/breakpad
vendored
|
@ -1 +0,0 @@
|
|||
Subproject commit c89f9dddc793f19910ef06c13e4fd240da4e7a59
|
9
externals/breakpad/.clang-format
vendored
Normal file
9
externals/breakpad/.clang-format
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Defines the Chromium style for automatic reformatting.
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
BasedOnStyle: Chromium
|
||||
|
||||
# This defaults to 'Auto'. Explicitly set it for a while, so that
|
||||
# 'vector<vector<int> >' in existing files gets formatted to
|
||||
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
|
||||
# 'int>>' if the file already contains at least one such instance.)
|
||||
Standard: Cpp11
|
73
externals/breakpad/.github/workflows/build-test-ci.yml
vendored
Normal file
73
externals/breakpad/.github/workflows/build-test-ci.yml
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
# GitHub actions workflow.
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
||||
|
||||
name: Build+Test CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
schedule:
|
||||
# The GH mirroring from Google GoB does not trigger push actions.
|
||||
# Fire it every other day to provide some coverage. This will run ~8 AM PT.
|
||||
- cron: '39 3 */2 * *'
|
||||
|
||||
# Allow for manual triggers from the web.
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
autotools:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
- os: ubuntu-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
- os: macos-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
|
||||
steps:
|
||||
- name: System settings
|
||||
run: |
|
||||
set -x
|
||||
$CC --version
|
||||
$CXX --version
|
||||
getconf _NPROCESSORS_ONLN
|
||||
getconf _NPROCESSORS_CONF
|
||||
true
|
||||
|
||||
- name: Checkout depot_tools
|
||||
run: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools
|
||||
|
||||
- name: Checkout breakpad
|
||||
run: |
|
||||
set -xe
|
||||
PATH+=:$PWD/../depot_tools
|
||||
gclient config --unmanaged --name=src https://github.com/${{ github.repository }}
|
||||
gclient sync --no-history --nohooks
|
||||
|
||||
# First build & test in-tree.
|
||||
- run: ./configure --disable-silent-rules
|
||||
working-directory: src
|
||||
- run: make -j$(getconf _NPROCESSORS_CONF)
|
||||
working-directory: src
|
||||
- run: make -j$(getconf _NPROCESSORS_CONF) check VERBOSE=1
|
||||
working-directory: src
|
||||
- run: make -j$(getconf _NPROCESSORS_CONF) distclean
|
||||
working-directory: src
|
||||
|
||||
# Then build & test out-of-tree.
|
||||
- run: mkdir -p src/build/native
|
||||
- run: ../../configure --disable-silent-rules
|
||||
working-directory: src/build/native
|
||||
- run: make -j$(getconf _NPROCESSORS_CONF) distcheck VERBOSE=1
|
||||
working-directory: src/build/native
|
22
externals/breakpad/.github/workflows/close-pull-request.yml
vendored
Normal file
22
externals/breakpad/.github/workflows/close-pull-request.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
# GitHub actions workflow.
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
||||
|
||||
# https://github.com/superbrothers/close-pull-request
|
||||
name: Close Pull Request
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: >
|
||||
Thanks for your contribution!
|
||||
Unfortunately, we don't use GitHub pull requests to manage code
|
||||
contributions to this repository.
|
||||
Instead, please see [README.md](../blob/HEAD/README.md) which
|
||||
provides full instructions on how to get involved.
|
43
externals/breakpad/.github/workflows/coverity.yml
vendored
Normal file
43
externals/breakpad/.github/workflows/coverity.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
# GitHub actions workflow.
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
||||
|
||||
# https://scan.coverity.com/projects/google-breakpad
|
||||
name: Coverity Scan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
schedule:
|
||||
# The GH mirroring from Google GoB does not trigger push actions.
|
||||
# Fire it once a week to provide some coverage.
|
||||
- cron: '39 2 * * WED'
|
||||
|
||||
# Allow for manual triggers from the web.
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
coverity:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
steps:
|
||||
- name: Checkout depot_tools
|
||||
run: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools
|
||||
|
||||
- name: Checkout breakpad
|
||||
run: |
|
||||
set -xe
|
||||
PATH+=:$PWD/../depot_tools
|
||||
gclient config --unmanaged --name=src https://github.com/${{ github.repository }}
|
||||
gclient sync --no-history --nohooks
|
||||
|
||||
- run: ./configure --disable-silent-rules
|
||||
working-directory: src
|
||||
|
||||
- uses: vapier/coverity-scan-action@v1
|
||||
with:
|
||||
command: make -C src -O -j$(getconf _NPROCESSORS_CONF)
|
||||
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
90
externals/breakpad/.gitignore
vendored
Normal file
90
externals/breakpad/.gitignore
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
# Copyright 2014 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Ignore other VCSs.
|
||||
.repo/
|
||||
.svn/
|
||||
|
||||
# Ignore common compiled artifacts.
|
||||
*~
|
||||
*.dwo
|
||||
*.o
|
||||
lib*.a
|
||||
/breakpad.pc
|
||||
/breakpad-client.pc
|
||||
/src/client/linux/linux_client_unittest_shlib
|
||||
/src/client/linux/linux_dumper_unittest_helper
|
||||
/src/common/linux/google_crashdump_uploader_test
|
||||
/src/processor/microdump_stackwalk
|
||||
/src/processor/minidump_dump
|
||||
/src/processor/minidump_stackwalk
|
||||
/src/tools/linux/core2md/core2md
|
||||
/src/tools/linux/core_handler/core_handler
|
||||
/src/tools/linux/dump_syms/dump_syms
|
||||
/src/tools/linux/md2core/minidump-2-core
|
||||
/src/tools/linux/pid2md/pid2md
|
||||
/src/tools/linux/symupload/minidump_upload
|
||||
/src/tools/linux/symupload/sym_upload
|
||||
/src/tools/mac/dump_syms/dump_syms
|
||||
/src/tools/mac/dump_syms/dump_syms_mac
|
||||
|
||||
# Ignore unit test artifacts.
|
||||
*_unittest
|
||||
*.log
|
||||
*.trs
|
||||
|
||||
# Ignore autotools generated artifacts.
|
||||
.deps
|
||||
.dirstamp
|
||||
autom4te.cache/
|
||||
/config.cache
|
||||
config.h
|
||||
/config.log
|
||||
/config.status
|
||||
/Makefile
|
||||
stamp-h1
|
||||
|
||||
# Ignore generated Visual Studio artifacts.
|
||||
*.filters
|
||||
*.sdf
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*.vcxproj
|
||||
|
||||
# Ignore generated Makefiles
|
||||
src/Makefile
|
||||
*.Makefile
|
||||
*.target.mk
|
||||
|
||||
# Ignore compiled Python files.
|
||||
*.pyc
|
||||
|
||||
# Ignore directories gclient syncs.
|
||||
src/testing
|
||||
src/third_party/protobuf
|
1
externals/breakpad/AUTHORS
vendored
Normal file
1
externals/breakpad/AUTHORS
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
opensource@google.com
|
0
externals/breakpad/ChangeLog
vendored
Normal file
0
externals/breakpad/ChangeLog
vendored
Normal file
58
externals/breakpad/DEPS
vendored
Normal file
58
externals/breakpad/DEPS
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Copyright 2010 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# This is used to mimic the svn:externals mechanism for gclient (both Git and
|
||||
# SVN) based checkouts of Breakpad. As such, its use is entirely optional. If
|
||||
# using a manually managed SVN checkout as opposed to a gclient managed checkout
|
||||
# you can still use the hooks mechanism for generating project files by calling
|
||||
# 'gclient runhooks' rather than 'gclient sync'.
|
||||
|
||||
deps = {
|
||||
# Testing libraries and utilities.
|
||||
"src/src/testing":
|
||||
"https://github.com/google/googletest.git" +
|
||||
"@release-1.11.0",
|
||||
|
||||
# Protobuf.
|
||||
"src/src/third_party/protobuf/protobuf":
|
||||
"https://github.com/google/protobuf.git" +
|
||||
"@cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac",
|
||||
|
||||
# Linux syscall support.
|
||||
"src/src/third_party/lss":
|
||||
"https://chromium.googlesource.com/linux-syscall-support/" +
|
||||
"@9719c1e1e676814c456b55f5f070eabad6709d31",
|
||||
}
|
||||
|
||||
hooks = [
|
||||
{
|
||||
# Keep the manifest up to date.
|
||||
"action": ["src/src/tools/python/deps-to-manifest.py",
|
||||
"src/DEPS", "src/default.xml"],
|
||||
},
|
||||
]
|
13
externals/breakpad/DIR_METADATA
vendored
Normal file
13
externals/breakpad/DIR_METADATA
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Metadata information for this directory.
|
||||
#
|
||||
# For more information on DIR_METADATA files, see:
|
||||
# https://source.chromium.org/chromium/infra/infra/+/HEAD:go/src/infra/tools/dirmd/README.md
|
||||
#
|
||||
# For the schema of this file, see Metadata message:
|
||||
# https://source.chromium.org/chromium/infra/infra/+/HEAD:go/src/infra/tools/dirmd/proto/dir_metadata.proto
|
||||
|
||||
monorail {
|
||||
project: "google-breakpad"
|
||||
}
|
||||
|
||||
team_email: "google-breakpad-dev@googlegroups.com"
|
370
externals/breakpad/INSTALL
vendored
Normal file
370
externals/breakpad/INSTALL
vendored
Normal file
|
@ -0,0 +1,370 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
1068
externals/breakpad/LICENSE
vendored
Normal file
1068
externals/breakpad/LICENSE
vendored
Normal file
File diff suppressed because it is too large
Load diff
1794
externals/breakpad/Makefile.am
vendored
Normal file
1794
externals/breakpad/Makefile.am
vendored
Normal file
File diff suppressed because it is too large
Load diff
10322
externals/breakpad/Makefile.in
vendored
Normal file
10322
externals/breakpad/Makefile.in
vendored
Normal file
File diff suppressed because it is too large
Load diff
0
externals/breakpad/NEWS
vendored
Normal file
0
externals/breakpad/NEWS
vendored
Normal file
13
externals/breakpad/OWNERS
vendored
Normal file
13
externals/breakpad/OWNERS
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Sorted alphabetically.
|
||||
# Please see README.md for contact info.
|
||||
|
||||
ivanpe@chromium.org
|
||||
jperaza@chromium.org
|
||||
mark@chromium.org
|
||||
nbilling@google.com
|
||||
primiano@chromium.org
|
||||
saugustine@google.com
|
||||
rsesek@chromium.org
|
||||
ted@mielczarek.org
|
||||
thestig@chromium.org
|
||||
vapier@chromium.org
|
139
externals/breakpad/README.ANDROID
vendored
Normal file
139
externals/breakpad/README.ANDROID
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
Google Breakpad for Android
|
||||
===========================
|
||||
|
||||
This document explains how to use the Google Breakpad client library
|
||||
on Android, and later generate valid stack traces from the minidumps
|
||||
it generates.
|
||||
|
||||
This release supports ARM, x86 and MIPS based Android systems.
|
||||
This release requires NDK release r11c or higher.
|
||||
|
||||
I. Building the client library:
|
||||
===============================
|
||||
|
||||
The Android client is built as a static library that you can
|
||||
link into your own Android native code. There are two ways to
|
||||
build it:
|
||||
|
||||
I.1. Building with ndk-build:
|
||||
-----------------------------
|
||||
|
||||
If you're using the ndk-build build system, you can follow
|
||||
these simple steps:
|
||||
|
||||
1/ Include android/google_breakpad/Android.mk from your own
|
||||
project's Android.mk
|
||||
|
||||
This can be done either directly, or using ndk-build's
|
||||
import-module feature.
|
||||
|
||||
2/ Link the library to one of your modules by using:
|
||||
|
||||
LOCAL_STATIC_LIBRARIES += breakpad_client
|
||||
|
||||
NOTE: The client library requires a C++ STL implementation,
|
||||
which you can select with APP_STL in your Application.mk
|
||||
|
||||
It has been tested succesfully with both STLport and GNU libstdc++
|
||||
|
||||
|
||||
I.2. Building with a standalone Android toolchain:
|
||||
--------------------------------------------------
|
||||
|
||||
All you need to do is configure your build with the right 'host'
|
||||
value, and disable the processor and tools, as in:
|
||||
|
||||
$GOOGLE_BREAKPAD_PATH/configure --host=arm-linux-androideabi \
|
||||
--disable-processor \
|
||||
--disable-tools
|
||||
make -j4
|
||||
|
||||
The library will be under src/client/linux/libbreakpad_client.a
|
||||
|
||||
You can also use 'make check' to run the test suite on a connected
|
||||
Android device. This requires the Android 'adb' tool to be in your
|
||||
path.
|
||||
|
||||
II. Using the client library in Android:
|
||||
========================================
|
||||
|
||||
The usage instructions are very similar to the Linux ones that are
|
||||
found at https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/linux_starter_guide.md
|
||||
|
||||
1/ You need to include "client/linux/handler/exception_handler.h" from a C++
|
||||
source file.
|
||||
|
||||
2/ If you're not using ndk-build, you also need to:
|
||||
|
||||
- add the following to your compiler include search paths:
|
||||
$GOOGLE_BREAKPAD_PATH/src
|
||||
$GOOGLE_BREAKPAD_PATH/src/common/android/include
|
||||
|
||||
- add -llog to your linker flags
|
||||
|
||||
Note that ndk-build does that for your automatically.
|
||||
|
||||
3/ Keep in mind that there is no /tmp directory on Android.
|
||||
|
||||
If you use the library from a regular Android applications, specify a
|
||||
path under your app-specific storage directory. An alternative is to
|
||||
store them on the SDCard, but this requires a specific permission.
|
||||
|
||||
For a concrete example, see the sample test application under
|
||||
android/sample_app. See its README for more information.
|
||||
|
||||
|
||||
III. Getting a stack trace on the host:
|
||||
=======================================
|
||||
|
||||
This process is similar to other platforms, but here's a quick example:
|
||||
|
||||
1/ Retrieve the minidumps on your development machine.
|
||||
|
||||
2/ Dump the symbols for your native libraries with the 'dump_syms' tool.
|
||||
This first requires building the host version of Google Breakpad, then
|
||||
calling:
|
||||
|
||||
dump_syms $PROJECT_PATH/obj/local/$ABI/libfoo.so > libfoo.so.sym
|
||||
|
||||
3/ Create the symbol directory hierarchy.
|
||||
|
||||
The first line of the generated libfoo.so.sym will have a "MODULE"
|
||||
entry that carries a hexadecimal version number, e.g.:
|
||||
|
||||
MODULE Linux arm D51B4A5504974FA6ECC1869CAEE3603B0 test_google_breakpad
|
||||
|
||||
Note: The second field could be either 'Linux' or 'Android'.
|
||||
|
||||
Extract the version number, and a 'symbol' directory, for example:
|
||||
|
||||
$PROJECT_PATH/symbols/libfoo.so/$VERSION/
|
||||
|
||||
Copy/Move your libfoo.sym file there.
|
||||
|
||||
4/ Invoke minidump_stackwalk to create the stack trace:
|
||||
|
||||
minidump_stackwalk $MINIDUMP_FILE $PROJECT_PATH/symbols
|
||||
|
||||
Note that various helper scripts can be found on the web to automate these
|
||||
steps.
|
||||
|
||||
IV. Verifying the Android build library:
|
||||
========================================
|
||||
|
||||
If you modify Google Breakpad and want to check that it still works correctly
|
||||
on Android, please run the android/run-checks.sh script which will do all
|
||||
necessary verifications for you. This includes:
|
||||
|
||||
- Rebuilding the full host binaries.
|
||||
- Rebuilding the full Android binaries with configure/make.
|
||||
- Rebuilding the client library unit tests, and running them on a device.
|
||||
- Rebuilding the client library with ndk-build.
|
||||
- Building, installing and running a test crasher program on a device.
|
||||
- Extracting the corresponding minidump, dumping the test program symbols
|
||||
and generating a stack trace.
|
||||
- Checking the generated stack trace for valid source locations.
|
||||
|
||||
For more details, please run:
|
||||
|
||||
android/run-checks.sh --help-all
|
82
externals/breakpad/README.md
vendored
Normal file
82
externals/breakpad/README.md
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
# Breakpad
|
||||
|
||||
Breakpad is a set of client and server components which implement a
|
||||
crash-reporting system.
|
||||
|
||||
* [Homepage](https://chromium.googlesource.com/breakpad/breakpad/)
|
||||
* [Documentation](./docs/)
|
||||
* [Bugs](https://bugs.chromium.org/p/google-breakpad/)
|
||||
* Discussion/Questions: [google-breakpad-discuss@googlegroups.com](https://groups.google.com/d/forum/google-breakpad-discuss)
|
||||
* Developer/Reviews: [google-breakpad-dev@googlegroups.com](https://groups.google.com/d/forum/google-breakpad-dev)
|
||||
* Tests: [](https://github.com/google/breakpad/actions/workflows/build-test-ci.yml) [](https://ci.appveyor.com/project/vapier/breakpad)
|
||||
* Coverage [](https://scan.coverity.com/projects/google-breakpad)
|
||||
|
||||
## Getting started (from main)
|
||||
|
||||
1. First, [download depot_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools)
|
||||
and ensure that they’re in your `PATH`.
|
||||
|
||||
2. Create a new directory for checking out the source code (it must be named
|
||||
breakpad).
|
||||
|
||||
```sh
|
||||
mkdir breakpad && cd breakpad
|
||||
```
|
||||
|
||||
3. Run the `fetch` tool from depot_tools to download all the source repos.
|
||||
|
||||
```sh
|
||||
fetch breakpad
|
||||
cd src
|
||||
```
|
||||
|
||||
4. Build the source.
|
||||
|
||||
```sh
|
||||
./configure && make
|
||||
```
|
||||
|
||||
You can also cd to another directory and run configure from there to build
|
||||
outside the source tree.
|
||||
|
||||
This will build the processor tools (`src/processor/minidump_stackwalk`,
|
||||
`src/processor/minidump_dump`, etc), and when building on Linux it will
|
||||
also build the client libraries and some tools
|
||||
(`src/tools/linux/dump_syms/dump_syms`,
|
||||
`src/tools/linux/md2core/minidump-2-core`, etc).
|
||||
|
||||
5. Optionally, run tests.
|
||||
|
||||
```sh
|
||||
make check
|
||||
```
|
||||
|
||||
6. Optionally, install the built libraries
|
||||
|
||||
```sh
|
||||
make install
|
||||
```
|
||||
|
||||
If you need to reconfigure your build be sure to run `make distclean` first.
|
||||
|
||||
To update an existing checkout to a newer revision, you can
|
||||
`git pull` as usual, but then you should run `gclient sync` to ensure that the
|
||||
dependent repos are up-to-date.
|
||||
|
||||
## To request change review
|
||||
|
||||
1. Follow the steps above to get the source and build it.
|
||||
|
||||
2. Make changes. Build and test your changes.
|
||||
For core code like processor use methods above.
|
||||
For linux/mac/windows, there are test targets in each project file.
|
||||
|
||||
3. Commit your changes to your local repo and upload them to the server.
|
||||
http://dev.chromium.org/developers/contributing-code
|
||||
e.g. `git commit ... && git cl upload ...`
|
||||
You will be prompted for credential and a description.
|
||||
|
||||
4. At https://chromium-review.googlesource.com/ you'll find your issue listed;
|
||||
click on it, then “Add reviewer”, and enter in the code reviewer. Depending
|
||||
on your settings, you may not see an email, but the reviewer has been
|
||||
notified with google-breakpad-dev@googlegroups.com always CC’d.
|
1273
externals/breakpad/aclocal.m4
vendored
Normal file
1273
externals/breakpad/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
371
externals/breakpad/android/common-functions.sh
vendored
Executable file
371
externals/breakpad/android/common-functions.sh
vendored
Executable file
|
@ -0,0 +1,371 @@
|
|||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Collection of common shell functions for 'run-checks.sh' et 'test-shell.sh'
|
||||
|
||||
# All internal variables and functions use an underscore as a prefix
|
||||
# (e.g. _VERBOSE, _ALL_CLEANUPS, etc..).
|
||||
|
||||
# Sanitize the environment
|
||||
export LANG=C
|
||||
export LC_ALL=C
|
||||
|
||||
if [ "$BASH_VERSION" ]; then
|
||||
set -o posix
|
||||
fi
|
||||
|
||||
# Utility functions
|
||||
|
||||
_ALL_CLEANUPS=
|
||||
|
||||
# Register a function to be called when the script exits, even in case of
|
||||
# Ctrl-C, logout, etc.
|
||||
# $1: function name.
|
||||
atexit () {
|
||||
if [ -z "$_ALL_CLEANUPS" ]; then
|
||||
_ALL_CLEANUPS=$1
|
||||
# Ensure a clean exit when the script is:
|
||||
# - Exiting normally (EXIT)
|
||||
# - Interrupted by Ctrl-C (INT)
|
||||
# - Interrupted by log out (HUP)
|
||||
# - Being asked to quit nicely (TERM)
|
||||
# - Being asked to quit and dump core (QUIT)
|
||||
trap "_exit_cleanups \$?" EXIT INT HUP QUIT TERM
|
||||
else
|
||||
_ALL_CLEANUPS="$_ALL_CLEANUPS $1"
|
||||
fi
|
||||
}
|
||||
|
||||
# Called on exit if at least one function was registered with atexit
|
||||
# $1: final exit status code
|
||||
_exit_cleanups () {
|
||||
local CLEANUP CLEANUPS
|
||||
# Ignore calls to atexit during cleanups
|
||||
CLEANUPS=$_ALL_CLEANUPS
|
||||
_ALL_CLEANUPS=
|
||||
for CLEANUP in $CLEANUPS; do
|
||||
($CLEANUP)
|
||||
done
|
||||
exit "$@"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Dump a panic message then exit.
|
||||
# $1+: message
|
||||
panic () {
|
||||
echo "ERROR: $@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# If the previous command failed, dump a panic message then exit.
|
||||
# $1+: message.
|
||||
fail_panic () {
|
||||
if [ $? != 0 ]; then
|
||||
panic "$@"
|
||||
fi;
|
||||
}
|
||||
|
||||
_VERBOSE=0
|
||||
|
||||
# Increase verbosity for dump/log/run/run2 functions
|
||||
increase_verbosity () {
|
||||
_VERBOSE=$(( $_VERBOSE + 1 ))
|
||||
}
|
||||
|
||||
# Decrease verbosity
|
||||
decrease_verbosity () {
|
||||
_VERBOSE=$(( $_VERBOSE - 1 ))
|
||||
}
|
||||
|
||||
# Returns success iff verbosity level is higher than a specific value
|
||||
# $1: verbosity level
|
||||
verbosity_is_higher_than () {
|
||||
[ "$_VERBOSE" -gt "$1" ]
|
||||
}
|
||||
|
||||
# Returns success iff verbosity level is lower than a specific value
|
||||
# $1: verbosity level
|
||||
verbosity_is_lower_than () {
|
||||
[ "$_VERBOSE" -le "$1" ]
|
||||
}
|
||||
|
||||
# Dump message to stdout, unless verbosity is < 0, i.e. --quiet was called
|
||||
# $1+: message
|
||||
dump () {
|
||||
if [ "$_VERBOSE" -ge 0 ]; then
|
||||
printf "%s\n" "$*"
|
||||
fi
|
||||
}
|
||||
|
||||
# If --verbose was used, dump a message to stdout.
|
||||
# $1+: message
|
||||
log () {
|
||||
if [ "$_VERBOSE" -ge 1 ]; then
|
||||
printf "%s\n" "$*"
|
||||
fi
|
||||
}
|
||||
|
||||
_RUN_LOG=
|
||||
|
||||
# Set a run log file that can be used to collect the output of commands that
|
||||
# are not displayed.
|
||||
set_run_log () {
|
||||
_RUN_LOG=$1
|
||||
}
|
||||
|
||||
# Run a command. Output depends on $_VERBOSE:
|
||||
# $_VERBOSE <= 0: Run command, store output into the run log
|
||||
# $_VERBOSE >= 1: Dump command, run it, output goest to stdout
|
||||
# Note: Ideally, the command's output would go to the run log for $_VERBOSE >= 1
|
||||
# but the 'tee' tool doesn't preserve the status code of its input pipe
|
||||
# in case of error.
|
||||
run () {
|
||||
local LOGILE
|
||||
if [ "$_RUN_LOG" ]; then
|
||||
LOGFILE=$_RUN_LOG
|
||||
else
|
||||
LOGFILE=/dev/null
|
||||
fi
|
||||
|
||||
if [ "$_VERBOSE" -ge 1 ]; then
|
||||
echo "COMMAND: $@"
|
||||
"$@"
|
||||
else
|
||||
"$@" >>$LOGFILE 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# Same as run(), but only dump command output for $_VERBOSE >= 2
|
||||
run2 () {
|
||||
local LOGILE
|
||||
if [ "$_RUN_LOG" ]; then
|
||||
LOGFILE=$_RUN_LOG
|
||||
else
|
||||
LOGFILE=/dev/null
|
||||
fi
|
||||
|
||||
if [ "$_VERBOSE" -ge 1 ]; then
|
||||
echo "COMMAND: $@"
|
||||
fi
|
||||
if [ "$_VERBOSE" -ge 2 ]; then
|
||||
"$@"
|
||||
else
|
||||
"$@" >>$LOGFILE 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# Extract number of cores to speed up the builds
|
||||
# Out: number of CPU cores
|
||||
get_core_count () {
|
||||
case $(uname -s) in
|
||||
Linux)
|
||||
grep -c -e '^processor' /proc/cpuinfo
|
||||
;;
|
||||
Darwin)
|
||||
sysctl -n hw.ncpu
|
||||
;;
|
||||
CYGWIN*|*_NT-*)
|
||||
echo $NUMBER_OF_PROCESSORS
|
||||
;;
|
||||
*)
|
||||
echo 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
# Check for the Android ADB program.
|
||||
#
|
||||
# On success, return nothing, but updates internal variables so later calls to
|
||||
# adb_shell, adb_push, etc.. will work. You can get the path to the ADB program
|
||||
# with adb_get_program if needed.
|
||||
#
|
||||
# On failure, returns 1, and updates the internal adb error message, which can
|
||||
# be retrieved with adb_get_error.
|
||||
#
|
||||
# $1: optional ADB program path.
|
||||
# Return: success or failure.
|
||||
_ADB=
|
||||
_ADB_STATUS=
|
||||
_ADB_ERROR=
|
||||
|
||||
adb_check () {
|
||||
# First, try to find the executable in the path, or the SDK install dir.
|
||||
_ADB=$1
|
||||
if [ -z "$_ADB" ]; then
|
||||
_ADB=$(which adb 2>/dev/null)
|
||||
if [ -z "$_ADB" -a "$ANDROID_SDK_ROOT" ]; then
|
||||
_ADB=$ANDROID_SDK_ROOT/platform-tools/adb
|
||||
if [ ! -f "$_ADB" ]; then
|
||||
_ADB=
|
||||
fi
|
||||
fi
|
||||
if [ -z "$_ADB" ]; then
|
||||
_ADB_STATUS=1
|
||||
_ADB_ERROR="The Android 'adb' tool is not in your path."
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
log "Found ADB program: $_ADB"
|
||||
|
||||
# Check that it works correctly
|
||||
local ADB_VERSION
|
||||
ADB_VERSION=$("$_ADB" version 2>/dev/null)
|
||||
case $ADB_VERSION in
|
||||
"Android Debug Bridge "*) # Pass
|
||||
log "Found ADB version: $ADB_VERSION"
|
||||
;;
|
||||
*) # Fail
|
||||
_ADB_ERROR="Your ADB binary reports a bad version ($ADB_VERSION): $_ADB"
|
||||
_ADB_STATUS=1
|
||||
return 1
|
||||
esac
|
||||
|
||||
_ADB_STATUS=0
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
# Return the path to the Android ADB program, if correctly detected.
|
||||
# On failure, return the empty string.
|
||||
# Out: ADB program path (or empty on failure)
|
||||
# Return: success or failure.
|
||||
adb_get_program () {
|
||||
# Return cached value as soon as possible.
|
||||
if [ -z "$_ADB_STATUS" ]; then
|
||||
adb_check $1
|
||||
fi
|
||||
echo "$_ADB"
|
||||
return $_ADB_STATUS
|
||||
}
|
||||
|
||||
# Return the error corresponding to the last ADB function failure.
|
||||
adb_get_error () {
|
||||
echo "$_ADB_ERROR"
|
||||
}
|
||||
|
||||
# Check that there is one device connected through ADB.
|
||||
# In case of failure, use adb_get_error to know why this failed.
|
||||
# $1: Optional adb program path
|
||||
# Return: success or failure.
|
||||
_ADB_DEVICE=
|
||||
_ADB_DEVICE_STATUS=
|
||||
adb_check_device () {
|
||||
if [ "$_ADB_DEVICE_STATUS" ]; then
|
||||
return $_ADB_DEVICE_STATUS
|
||||
fi
|
||||
|
||||
# Check for ADB.
|
||||
if ! adb_check $1; then
|
||||
_ADB_DEVICE_STATUS=$_ADB_STATUS
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ADB_DEVICES NUM_DEVICES FINGERPRINT
|
||||
|
||||
# Count the number of connected devices.
|
||||
ADB_DEVICES=$("$_ADB" devices 2>/dev/null | awk '$2 == "device" { print $1; }')
|
||||
NUM_DEVICES=$(echo "$ADB_DEVICES" | wc -l)
|
||||
case $NUM_DEVICES in
|
||||
0)
|
||||
_ADB_ERROR="No Android device connected. Please connect one to your machine."
|
||||
_ADB_DEVICE_STATUS=1
|
||||
return 1
|
||||
;;
|
||||
1) # Pass
|
||||
# Ensure the same device will be called in later adb_shell calls.
|
||||
export ANDROID_SERIAL=$ADB_DEVICES
|
||||
;;
|
||||
*) # 2 or more devices.
|
||||
if [ "$ANDROID_SERIAL" ]; then
|
||||
ADB_DEVICES=$ANDROID_SERIAL
|
||||
NUM_DEVICES=1
|
||||
else
|
||||
_ADB_ERROR="More than one Android device connected. \
|
||||
Please define ANDROID_SERIAL in your environment"
|
||||
_ADB_DEVICE_STATUS=1
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
_ADB_DEVICE_STATUS=0
|
||||
_ADB_DEVICE=$ADB_DEVICES
|
||||
|
||||
FINGERPRINT=$(adb_shell getprop ro.build.fingerprint)
|
||||
log "Using ADB device: $ANDROID_SERIAL ($FINGERPRINT)"
|
||||
return 0
|
||||
}
|
||||
|
||||
# The 'adb shell' command is pretty hopeless, try to make sense of it by:
|
||||
# 1/ Removing trailing \r from line endings.
|
||||
# 2/ Ensuring the function returns the command's status code.
|
||||
#
|
||||
# $1+: Command
|
||||
# Out: command output (stdout + stderr combined)
|
||||
# Return: command exit status
|
||||
adb_shell () {
|
||||
local RET ADB_LOG
|
||||
# Check for ADB device.
|
||||
adb_check_device || return 1
|
||||
ADB_LOG=$(mktemp "${TMPDIR:-/tmp}/adb-XXXXXXXX")
|
||||
"$_ADB" shell "$@" ";" echo \$? > "$ADB_LOG" 2>&1
|
||||
sed -i -e 's![[:cntrl:]]!!g' "$ADB_LOG" # Remove \r.
|
||||
RET=$(sed -e '$!d' "$ADB_LOG") # Last line contains status code.
|
||||
sed -e '$d' "$ADB_LOG" # Print everything except last line.
|
||||
rm -f "$ADB_LOG"
|
||||
return $RET
|
||||
}
|
||||
|
||||
# Push a file to a device.
|
||||
# $1: source file path
|
||||
# $2: device target file path
|
||||
# Return: success or failure.
|
||||
adb_push () {
|
||||
adb_check_device || return 1
|
||||
run "$_ADB" push "$1" "$2"
|
||||
}
|
||||
|
||||
# Pull a file from a device
|
||||
# $1: device file path
|
||||
# $2: target host file path
|
||||
# Return: success or failure.
|
||||
adb_pull () {
|
||||
adb_check_device || return 1
|
||||
run "$_ADB" pull "$1" "$2"
|
||||
}
|
||||
|
||||
# Same as adb_push, but will panic if the operations didn't succeed.
|
||||
adb_install () {
|
||||
adb_push "$@"
|
||||
fail_panic "Failed to install $1 to the Android device at $2"
|
||||
}
|
||||
|
104
externals/breakpad/android/google_breakpad/Android.mk
vendored
Normal file
104
externals/breakpad/android/google_breakpad/Android.mk
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# ndk-build module definition for the Google Breakpad client library
|
||||
#
|
||||
# To use this file, do the following:
|
||||
#
|
||||
# 1/ Include this file from your own Android.mk, either directly
|
||||
# or with through the NDK's import-module function.
|
||||
#
|
||||
# 2/ Use the client static library in your project with:
|
||||
#
|
||||
# LOCAL_STATIC_LIBRARIES += breakpad_client
|
||||
#
|
||||
# 3/ In your source code, include "src/client/linux/exception_handler.h"
|
||||
# and use the Linux instructions to use it.
|
||||
#
|
||||
# This module works with either the STLport or GNU libstdc++, but you need
|
||||
# to select one in your Application.mk
|
||||
#
|
||||
|
||||
# The top Google Breakpad directory.
|
||||
# We assume this Android.mk to be under 'android/google_breakpad'
|
||||
|
||||
LOCAL_PATH := $(call my-dir)/../..
|
||||
|
||||
# Defube the client library module, as a simple static library that
|
||||
# exports the right include path / linker flags to its users.
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := breakpad_client
|
||||
|
||||
LOCAL_CPP_EXTENSION := .cc
|
||||
|
||||
# Breakpad uses inline ARM assembly that requires the library
|
||||
# to be built in ARM mode. Otherwise, the build will fail with
|
||||
# cryptic assembler messages like:
|
||||
# Compile++ thumb : google_breakpad_client <= crash_generation_client.cc
|
||||
# /tmp/cc8aMSoD.s: Assembler messages:
|
||||
# /tmp/cc8aMSoD.s:132: Error: invalid immediate: 288 is out of range
|
||||
# /tmp/cc8aMSoD.s:244: Error: invalid immediate: 296 is out of range
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
# List of client source files, directly taken from Makefile.am
|
||||
LOCAL_SRC_FILES := \
|
||||
src/client/linux/crash_generation/crash_generation_client.cc \
|
||||
src/client/linux/dump_writer_common/thread_info.cc \
|
||||
src/client/linux/dump_writer_common/ucontext_reader.cc \
|
||||
src/client/linux/handler/exception_handler.cc \
|
||||
src/client/linux/handler/minidump_descriptor.cc \
|
||||
src/client/linux/log/log.cc \
|
||||
src/client/linux/microdump_writer/microdump_writer.cc \
|
||||
src/client/linux/minidump_writer/linux_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
|
||||
src/client/linux/minidump_writer/minidump_writer.cc \
|
||||
src/client/linux/minidump_writer/pe_file.cc \
|
||||
src/client/minidump_file_writer.cc \
|
||||
src/common/convert_UTF.cc \
|
||||
src/common/md5.cc \
|
||||
src/common/string_conversion.cc \
|
||||
src/common/linux/breakpad_getcontext.S \
|
||||
src/common/linux/elfutils.cc \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/guid_creator.cc \
|
||||
src/common/linux/linux_libc_support.cc \
|
||||
src/common/linux/memory_mapped_file.cc \
|
||||
src/common/linux/safe_readlink.cc
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/common/android/include \
|
||||
$(LOCAL_PATH)/src \
|
||||
$(LSS_PATH)
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
||||
LOCAL_EXPORT_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
# Done.
|
554
externals/breakpad/android/run-checks.sh
vendored
Executable file
554
externals/breakpad/android/run-checks.sh
vendored
Executable file
|
@ -0,0 +1,554 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Sanitize the environment
|
||||
export LANG=C
|
||||
export LC_ALL=C
|
||||
|
||||
if [ "$BASH_VERSION" ]; then
|
||||
set -o posix
|
||||
fi
|
||||
|
||||
PROGDIR=$(dirname "$0")
|
||||
PROGDIR=$(cd "$PROGDIR" && pwd)
|
||||
PROGNAME=$(basename "$0")
|
||||
|
||||
. $PROGDIR/common-functions.sh
|
||||
|
||||
DEFAULT_ABI="armeabi"
|
||||
VALID_ABIS="armeabi armeabi-v7a x86 mips"
|
||||
|
||||
ABI=
|
||||
ADB=
|
||||
ALL_TESTS=
|
||||
ENABLE_M32=
|
||||
HELP=
|
||||
HELP_ALL=
|
||||
NDK_DIR=
|
||||
NO_CLEANUP=
|
||||
NO_DEVICE=
|
||||
NUM_JOBS=$(get_core_count)
|
||||
TMPDIR=
|
||||
|
||||
for opt do
|
||||
# The following extracts the value if the option is like --name=<value>.
|
||||
optarg=$(expr -- $opt : '^--[^=]*=\(.*\)$')
|
||||
case $opt in
|
||||
--abi=*) ABI=$optarg;;
|
||||
--adb=*) ADB=$optarg;;
|
||||
--all-tests) ALL_TESTS=true;;
|
||||
--enable-m32) ENABLE_M32=true;;
|
||||
--help|-h|-?) HELP=TRUE;;
|
||||
--help-all) HELP_ALL=true;;
|
||||
--jobs=*) NUM_JOBS=$optarg;;
|
||||
--ndk-dir=*) NDK_DIR=$optarg;;
|
||||
--tmp-dir=*) TMPDIR=$optarg;;
|
||||
--no-cleanup) NO_CLEANUP=true;;
|
||||
--no-device) NO_DEVICE=true;;
|
||||
--quiet) decrease_verbosity;;
|
||||
--verbose) increase_verbosity;;
|
||||
-*) panic "Invalid option '$opt', see --help for details.";;
|
||||
*) panic "This script doesn't take any parameters. See --help for details."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$HELP" -o "$HELP_ALL" ]; then
|
||||
echo "\
|
||||
Usage: $PROGNAME [options]
|
||||
|
||||
This script is used to check that your Google Breakpad source tree can
|
||||
be properly built for Android, and that the client library and host tools
|
||||
work properly together.
|
||||
"
|
||||
if [ "$HELP_ALL" ]; then
|
||||
echo "\
|
||||
In more details, this script will:
|
||||
|
||||
- Rebuild the host version of Google Breakpad in a temporary
|
||||
directory (with the Auto-tools based build system).
|
||||
|
||||
- Rebuild the Android client library with the Google Breakpad build
|
||||
system (using autotools/configure). This requires that you define
|
||||
ANDROID_NDK_ROOT in your environment to point to a valid Android NDK
|
||||
installation directory, or use the --ndk-dir=<path> option.
|
||||
|
||||
- Rebuild the Android client library and a test crashing program with the
|
||||
Android NDK build system (ndk-build).
|
||||
|
||||
- Require an Android device connected to your machine, and the 'adb'
|
||||
tool in your path. They are used to:
|
||||
|
||||
- Install and run a test crashing program.
|
||||
- Extract the corresponding minidump from the device.
|
||||
- Dump the symbols from the test program on the host with 'dump_syms'
|
||||
- Generate a stack trace with 'minidump_stackwalk'
|
||||
- Check the stack trace content for valid source file locations.
|
||||
|
||||
You can however skip this requirement and only test the builds by using
|
||||
the --no-device flag.
|
||||
|
||||
By default, all generated files will be created in a temporary directory
|
||||
that is removed when the script completion. If you want to inspect the
|
||||
files, use the --no-cleanup option.
|
||||
|
||||
Finally, use --verbose to increase the verbosity level, this will help
|
||||
you see which exact commands are being issues and their result. Use the
|
||||
flag twice for even more output. Use --quiet to decrease verbosity
|
||||
instead and run the script silently.
|
||||
|
||||
If you have a device connected, the script will probe it to determine
|
||||
its primary CPU ABI, and build the test program for it. You can however
|
||||
use the --abi=<name> option to override this (this can be useful to check
|
||||
the secondary ABI, e.g. using --abi=armeabi to check that such a program
|
||||
works correctly on an ARMv7-A device).
|
||||
|
||||
If you don't have a device connected, the test program will be built (but
|
||||
not run) with the default '$DEFAULT_ABI' ABI. Again, you can use
|
||||
--abi=<name> to override this. Valid ABI names are:
|
||||
|
||||
$VALID_ABIS
|
||||
|
||||
The script will only run the client library unit test on the device
|
||||
by default. You can use --all-tests to also build and run the unit
|
||||
tests for the Breakpad tools and processor, but be warned that this
|
||||
adds several minutes of testing time. --all-tests will also run the
|
||||
host unit tests suite.
|
||||
"
|
||||
|
||||
fi # HELP_ALL
|
||||
|
||||
echo "\
|
||||
Valid options:
|
||||
|
||||
--help|-h|-? Display this message.
|
||||
--help-all Display extended help.
|
||||
--enable-m32 Build 32-bit version of host tools.
|
||||
--abi=<name> Specify target CPU ABI [auto-detected].
|
||||
--jobs=<count> Run <count> build tasks in parallel [$NUM_JOBS].
|
||||
--ndk-dir=<path> Specify NDK installation directory.
|
||||
--tmp-dir=<path> Specify temporary directory (will be wiped-out).
|
||||
--adb=<path> Specify adb program path.
|
||||
--no-cleanup Don't remove temporary directory after completion.
|
||||
--no-device Do not try to detect devices, nor run crash test.
|
||||
--all-tests Run all unit tests (i.e. tools and processor ones too).
|
||||
--verbose Increase verbosity.
|
||||
--quiet Decrease verbosity."
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TESTAPP_DIR=$PROGDIR/sample_app
|
||||
|
||||
# Select NDK install directory.
|
||||
if [ -z "$NDK_DIR" ]; then
|
||||
if [ -z "$ANDROID_NDK_ROOT" ]; then
|
||||
panic "Please define ANDROID_NDK_ROOT in your environment, or use \
|
||||
--ndk-dir=<path>."
|
||||
fi
|
||||
NDK_DIR="$ANDROID_NDK_ROOT"
|
||||
log "Found NDK directory: $NDK_DIR"
|
||||
else
|
||||
log "Using NDK directory: $NDK_DIR"
|
||||
fi
|
||||
# Small sanity check.
|
||||
NDK_BUILD="$NDK_DIR/ndk-build"
|
||||
if [ ! -f "$NDK_BUILD" ]; then
|
||||
panic "Your NDK directory is not valid (missing ndk-build): $NDK_DIR"
|
||||
fi
|
||||
|
||||
# Ensure the temporary directory is deleted on exit, except if the --no-cleanup
|
||||
# option is used.
|
||||
|
||||
clean_tmpdir () {
|
||||
if [ "$TMPDIR" ]; then
|
||||
if [ -z "$NO_CLEANUP" ]; then
|
||||
log "Cleaning up: $TMPDIR"
|
||||
rm -rf "$TMPDIR"
|
||||
else
|
||||
dump "Temporary directory contents preserved: $TMPDIR"
|
||||
fi
|
||||
fi
|
||||
exit "$@"
|
||||
}
|
||||
|
||||
atexit clean_tmpdir
|
||||
|
||||
# If --tmp-dir=<path> is not used, create a temporary directory.
|
||||
# Otherwise, start by cleaning up the user-provided path.
|
||||
if [ -z "$TMPDIR" ]; then
|
||||
TMPDIR=$(mktemp -d /tmp/$PROGNAME.XXXXXXXX)
|
||||
fail_panic "Can't create temporary directory!"
|
||||
log "Using temporary directory: $TMPDIR"
|
||||
else
|
||||
if [ ! -d "$TMPDIR" ]; then
|
||||
mkdir -p "$TMPDIR"
|
||||
fail_panic "Can't create temporary directory: $TMPDIR"
|
||||
else
|
||||
log "Cleaning up temporary directory: $TMPDIR"
|
||||
rm -rf "$TMPDIR"/*
|
||||
fail_panic "Cannot cleanup temporary directory!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$NO_DEVICE" ]; then
|
||||
if ! adb_check_device $ADB; then
|
||||
echo "$(adb_get_error)"
|
||||
echo "Use --no-device to build the code without running any tests."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
BUILD_LOG="$TMPDIR/build.log"
|
||||
RUN_LOG="$TMPDIR/run.log"
|
||||
CRASH_LOG="$TMPDIR/crash.log"
|
||||
|
||||
set_run_log "$RUN_LOG"
|
||||
|
||||
TMPHOST="$TMPDIR/host-local"
|
||||
|
||||
cd "$TMPDIR"
|
||||
|
||||
# Build host version of the tools
|
||||
dump "Building host binaries."
|
||||
CONFIGURE_FLAGS=
|
||||
if [ "$ENABLE_M32" ]; then
|
||||
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-m32"
|
||||
fi
|
||||
(
|
||||
run mkdir "$TMPDIR/build-host" &&
|
||||
run cd "$TMPDIR/build-host" &&
|
||||
run2 "$PROGDIR/../configure" --prefix="$TMPHOST" $CONFIGURE_FLAGS &&
|
||||
run2 make -j$NUM_JOBS install
|
||||
)
|
||||
fail_panic "Can't build host binaries!"
|
||||
|
||||
if [ "$ALL_TESTS" ]; then
|
||||
dump "Running host unit tests."
|
||||
(
|
||||
run cd "$TMPDIR/build-host" &&
|
||||
run2 make -j$NUM_JOBS check
|
||||
)
|
||||
fail_panic "Host unit tests failed!!"
|
||||
fi
|
||||
|
||||
TMPBIN=$TMPHOST/bin
|
||||
|
||||
# Generate a stand-alone NDK toolchain
|
||||
|
||||
# Extract CPU ABI and architecture from device, if any.
|
||||
if adb_check_device; then
|
||||
DEVICE_ABI=$(adb_shell getprop ro.product.cpu.abi)
|
||||
DEVICE_ABI2=$(adb_shell getprop ro.product.cpu.abi2)
|
||||
if [ -z "$DEVICE_ABI" ]; then
|
||||
panic "Can't extract ABI from connected device!"
|
||||
fi
|
||||
if [ "$DEVICE_ABI2" ]; then
|
||||
dump "Found device ABIs: $DEVICE_ABI $DEVICE_ABI2"
|
||||
else
|
||||
dump "Found device ABI: $DEVICE_ABI"
|
||||
DEVICE_ABI2=$DEVICE_ABI
|
||||
fi
|
||||
|
||||
# If --abi=<name> is used, check that the device supports it.
|
||||
if [ "$ABI" -a "$DEVICE_ABI" != "$ABI" -a "$DEVICE_ABI2" != "$ABI" ]; then
|
||||
dump "ERROR: Device ABI(s) do not match --abi command-line value ($ABI)!"
|
||||
panic "Please use --no-device to skip device tests."
|
||||
fi
|
||||
|
||||
if [ -z "$ABI" ]; then
|
||||
ABI=$DEVICE_ABI
|
||||
dump "Using CPU ABI: $ABI (device)"
|
||||
else
|
||||
dump "Using CPU ABI: $ABI (command-line)"
|
||||
fi
|
||||
else
|
||||
if [ -z "$ABI" ]; then
|
||||
# No device connected, choose default ABI
|
||||
ABI=$DEFAULT_ABI
|
||||
dump "Using CPU ABI: $ABI (default)"
|
||||
else
|
||||
dump "Using CPU ABI: $ABI (command-line)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check the ABI value
|
||||
VALID=
|
||||
for VALID_ABI in $VALID_ABIS; do
|
||||
if [ "$ABI" = "$VALID_ABI" ]; then
|
||||
VALID=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$VALID" ]; then
|
||||
panic "Unknown CPU ABI '$ABI'. Valid values are: $VALID_ABIS"
|
||||
fi
|
||||
|
||||
# Extract architecture name from ABI
|
||||
case $ABI in
|
||||
armeabi*) ARCH=arm;;
|
||||
*) ARCH=$ABI;;
|
||||
esac
|
||||
|
||||
# Extract GNU configuration name
|
||||
case $ARCH in
|
||||
arm)
|
||||
GNU_CONFIG=arm-linux-androideabi
|
||||
;;
|
||||
x86)
|
||||
GNU_CONFIG=i686-linux-android
|
||||
;;
|
||||
mips)
|
||||
GNU_CONFIG=mipsel-linux-android
|
||||
;;
|
||||
*)
|
||||
GNU_CONFIG="$ARCH-linux-android"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Generate standalone NDK toolchain installation
|
||||
NDK_STANDALONE="$TMPDIR/ndk-$ARCH-toolchain"
|
||||
echo "Generating NDK standalone toolchain installation"
|
||||
mkdir -p "$NDK_STANDALONE"
|
||||
# NOTE: The --platform=android-9 is required to provide <regex.h> for GTest.
|
||||
run "$NDK_DIR/build/tools/make-standalone-toolchain.sh" \
|
||||
--arch="$ARCH" \
|
||||
--platform=android-9 \
|
||||
--install-dir="$NDK_STANDALONE"
|
||||
fail_panic "Can't generate standalone NDK toolchain installation!"
|
||||
|
||||
# Rebuild the client library, processor and tools with the auto-tools based
|
||||
# build system. Even though it's not going to be used, this checks that this
|
||||
# still works correctly.
|
||||
echo "Building full Android binaries with configure/make"
|
||||
TMPTARGET="$TMPDIR/target-local"
|
||||
(
|
||||
PATH="$NDK_STANDALONE/bin:$PATH"
|
||||
run mkdir "$TMPTARGET" &&
|
||||
run mkdir "$TMPDIR"/build-target &&
|
||||
run cd "$TMPDIR"/build-target &&
|
||||
run2 "$PROGDIR"/../configure --prefix="$TMPTARGET" \
|
||||
--host="$GNU_CONFIG" &&
|
||||
run2 make -j$NUM_JOBS install
|
||||
)
|
||||
fail_panic "Could not rebuild Android binaries!"
|
||||
|
||||
# Build and/or run unit test suite.
|
||||
# If --no-device is used, only rebuild it, otherwise, run in on the
|
||||
# connected device.
|
||||
if [ "$NO_DEVICE" ]; then
|
||||
ACTION="Building"
|
||||
# This is a trick to force the Makefile to ignore running the scripts.
|
||||
TESTS_ENVIRONMENT="TESTS_ENVIRONMENT=true"
|
||||
else
|
||||
ACTION="Running"
|
||||
TESTS_ENVIRONMENT=
|
||||
fi
|
||||
|
||||
(
|
||||
PATH="$NDK_STANDALONE/bin:$PATH"
|
||||
run cd "$TMPDIR"/build-target &&
|
||||
# Reconfigure to only run the client unit test suite.
|
||||
# This one should _never_ fail.
|
||||
dump "$ACTION Android client library unit tests."
|
||||
run2 "$PROGDIR"/../configure --prefix="$TMPTARGET" \
|
||||
--host="$GNU_CONFIG" \
|
||||
--disable-tools \
|
||||
--disable-processor &&
|
||||
run make -j$NUM_JOBS check $TESTS_ENVIRONMENT || exit $?
|
||||
|
||||
if [ "$ALL_TESTS" ]; then
|
||||
dump "$ACTION Tools and processor unit tests."
|
||||
# Reconfigure to run the processor and tools tests.
|
||||
# Most of these fail for now, so do not worry about it.
|
||||
run2 "$PROGDIR"/../configure --prefix="$TMPTARGET" \
|
||||
--host="$GNU_CONFIG" &&
|
||||
run make -j$NUM_JOBS check $TESTS_ENVIRONMENT
|
||||
if [ $? != 0 ]; then
|
||||
dump "Tools and processor unit tests failed as expected. \
|
||||
Use --verbose for results."
|
||||
fi
|
||||
fi
|
||||
)
|
||||
fail_panic "Client library unit test suite failed!"
|
||||
|
||||
# Copy sources to temporary directory
|
||||
PROJECT_DIR=$TMPDIR/project
|
||||
dump "Copying test program sources to: $PROJECT_DIR"
|
||||
run cp -r "$TESTAPP_DIR" "$PROJECT_DIR" &&
|
||||
run rm -rf "$PROJECT_DIR/obj" &&
|
||||
run rm -rf "$PROJECT_DIR/libs"
|
||||
fail_panic "Could not copy test program sources to: $PROJECT_DIR"
|
||||
|
||||
# Build the test program with ndk-build.
|
||||
dump "Building test program with ndk-build"
|
||||
export NDK_MODULE_PATH="$PROGDIR"
|
||||
NDK_BUILD_FLAGS="-j$NUM_JOBS"
|
||||
if verbosity_is_higher_than 1; then
|
||||
NDK_BUILD_FLAGS="$NDK_BUILD_FLAGS NDK_LOG=1 V=1"
|
||||
fi
|
||||
run "$NDK_DIR/ndk-build" -C "$PROJECT_DIR" $NDK_BUILD_FLAGS APP_ABI=$ABI
|
||||
fail_panic "Can't build test program!"
|
||||
|
||||
# Unless --no-device was used, stop right here if ADB isn't in the path,
|
||||
# or there is no connected device.
|
||||
if [ "$NO_DEVICE" ]; then
|
||||
dump "Done. Please connect a device to run all tests!"
|
||||
clean_exit 0
|
||||
fi
|
||||
|
||||
# Push the program to the device.
|
||||
TESTAPP=test_google_breakpad
|
||||
TESTAPP_FILE="$PROJECT_DIR/libs/$ABI/test_google_breakpad"
|
||||
if [ ! -f "$TESTAPP_FILE" ]; then
|
||||
panic "Device requires '$ABI' binaries. None found!"
|
||||
fi
|
||||
|
||||
# Run the program there
|
||||
dump "Installing test program on device"
|
||||
DEVICE_TMP=/data/local/tmp
|
||||
adb_push "$TESTAPP_FILE" "$DEVICE_TMP/"
|
||||
fail_panic "Cannot push test program to device!"
|
||||
|
||||
dump "Running test program on device"
|
||||
adb_shell cd "$DEVICE_TMP" "&&" ./$TESTAPP > "$CRASH_LOG" 2>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
panic "Test program did *not* crash as expected!"
|
||||
fi
|
||||
if verbosity_is_higher_than 0; then
|
||||
echo -n "Crash log: "
|
||||
cat "$CRASH_LOG"
|
||||
fi
|
||||
|
||||
# Extract minidump from device
|
||||
MINIDUMP_NAME=$(awk '$1 == "Dump" && $2 == "path:" { print $3; }' "$CRASH_LOG")
|
||||
MINIDUMP_NAME=$(basename "$MINIDUMP_NAME")
|
||||
if [ -z "$MINIDUMP_NAME" ]; then
|
||||
panic "Test program didn't write minidump properly!"
|
||||
fi
|
||||
|
||||
dump "Extracting minidump: $MINIDUMP_NAME"
|
||||
adb_pull "$DEVICE_TMP/$MINIDUMP_NAME" .
|
||||
fail_panic "Can't extract minidump!"
|
||||
|
||||
dump "Parsing test program symbols"
|
||||
if verbosity_is_higher_than 1; then
|
||||
log "COMMAND: $TMPBIN/dump_syms \
|
||||
$PROJECT_DIR/obj/local/$ABI/$TESTAPP >$TESTAPP.sym"
|
||||
fi
|
||||
"$TMPBIN/dump_syms" "$PROJECT_DIR/obj/local/$ABI/$TESTAPP" > $TESTAPP.sym
|
||||
fail_panic "dump_syms doesn't work!"
|
||||
|
||||
VERSION=$(awk '$1 == "MODULE" { print $4; }' $TESTAPP.sym)
|
||||
dump "Found module version: $VERSION"
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "ERROR: Can't find proper module version from symbol dump!"
|
||||
head -n5 $TESTAPP.sym
|
||||
clean_exit 1
|
||||
fi
|
||||
|
||||
run mkdir -p "$TMPDIR/symbols/$TESTAPP/$VERSION"
|
||||
run mv $TESTAPP.sym "$TMPDIR/symbols/$TESTAPP/$VERSION/"
|
||||
|
||||
dump "Generating stack trace"
|
||||
# Don't use 'run' to be able to send stdout and stderr to two different files.
|
||||
log "COMMAND: $TMPBIN/minidump_stackwalk $MINIDUMP_NAME symbols"
|
||||
"$TMPBIN/minidump_stackwalk" $MINIDUMP_NAME \
|
||||
"$TMPDIR/symbols" \
|
||||
> "$BUILD_LOG" 2>>"$RUN_LOG"
|
||||
fail_panic "minidump_stackwalk doesn't work!"
|
||||
|
||||
dump "Checking stack trace content"
|
||||
|
||||
if verbosity_is_higher_than 1; then
|
||||
cat "$BUILD_LOG"
|
||||
fi
|
||||
|
||||
# The generated stack trace should look like the following:
|
||||
#
|
||||
# Thread 0 (crashed)
|
||||
# 0 test_google_breakpad!crash [test_breakpad.cpp : 17 + 0x4]
|
||||
# r4 = 0x00015530 r5 = 0xbea2cbe4 r6 = 0xffffff38 r7 = 0xbea2cb5c
|
||||
# r8 = 0x00000000 r9 = 0x00000000 r10 = 0x00000000 fp = 0x00000000
|
||||
# sp = 0xbea2cb50 lr = 0x00009025 pc = 0x00008f84
|
||||
# Found by: given as instruction pointer in context
|
||||
# 1 test_google_breakpad!main [test_breakpad.cpp : 25 + 0x3]
|
||||
# r4 = 0x00015530 r5 = 0xbea2cbe4 r6 = 0xffffff38 r7 = 0xbea2cb5c
|
||||
# r8 = 0x00000000 r9 = 0x00000000 r10 = 0x00000000 fp = 0x00000000
|
||||
# sp = 0xbea2cb50 pc = 0x00009025
|
||||
# Found by: call frame info
|
||||
# 2 libc.so + 0x164e5
|
||||
# r4 = 0x00008f64 r5 = 0xbea2cc34 r6 = 0x00000001 r7 = 0xbea2cc3c
|
||||
# r8 = 0x00000000 r9 = 0x00000000 r10 = 0x00000000 fp = 0x00000000
|
||||
# sp = 0xbea2cc18 pc = 0x400c34e7
|
||||
# Found by: call frame info
|
||||
# ...
|
||||
#
|
||||
# The most important part for us is ensuring that the source location could
|
||||
# be extracted, so look at the 'test_breakpad.cpp' references here.
|
||||
#
|
||||
# First, extract all the lines with test_google_breakpad! in them, and
|
||||
# dump the corresponding crash location.
|
||||
#
|
||||
# Note that if the source location can't be extracted, the second field
|
||||
# will only be 'test_google_breakpad' without the exclamation mark.
|
||||
#
|
||||
LOCATIONS=$(awk '$2 ~ "^test_google_breakpad!.*" { print $3; }' "$BUILD_LOG")
|
||||
|
||||
if [ -z "$LOCATIONS" ]; then
|
||||
if verbosity_is_lower_than 1; then
|
||||
cat "$BUILD_LOG"
|
||||
fi
|
||||
panic "No source location found in stack trace!"
|
||||
fi
|
||||
|
||||
# Now check that they all match "[<source file>"
|
||||
BAD_LOCATIONS=
|
||||
for LOCATION in $LOCATIONS; do
|
||||
case $LOCATION in
|
||||
# Escape the opening bracket, or some shells like Dash will not
|
||||
# match them properly.
|
||||
\[*.cpp|\[*.cc|\[*.h) # These are valid source locations in our executable
|
||||
;;
|
||||
*) # Everything else is not!
|
||||
BAD_LOCATIONS="$BAD_LOCATIONS $LOCATION"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$BAD_LOCATIONS" ]; then
|
||||
dump "ERROR: Generated stack trace doesn't contain valid source locations:"
|
||||
cat "$BUILD_LOG"
|
||||
echo "Bad locations are: $BAD_LOCATIONS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "All clear! Congratulations."
|
||||
|
32
externals/breakpad/android/sample_app/README
vendored
Normal file
32
externals/breakpad/android/sample_app/README
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
This is a sample Android executable that can be used to test the
|
||||
Google Breakpad client library on Android.
|
||||
|
||||
Its purpose is simply to crash and generate a minidump under /data/local/tmp.
|
||||
|
||||
Build instructions:
|
||||
|
||||
cd android/sample_app
|
||||
$NDK/ndk-build
|
||||
|
||||
Where $NDK points to a valid Android NDK installation.
|
||||
|
||||
Usage instructions:
|
||||
|
||||
After buildind the test program, send it to a device, then run it as
|
||||
the shell UID:
|
||||
|
||||
adb push libs/armeabi/test_google_breakpad /data/local/tmp
|
||||
adb shell /data/local/tmp/test_google_breakpad
|
||||
|
||||
This will simply crash after dumping the name of the generated minidump
|
||||
file.
|
||||
|
||||
See jni/test_breakpad.cpp for details.
|
||||
|
||||
Use 'armeabi-v7a' instead of 'armeabi' above to test the ARMv7-A version
|
||||
of the binary.
|
||||
|
||||
Note:
|
||||
If you plan to use the library in a regular Android application, store
|
||||
the minidump files either to your app-specific directory, or to the SDCard
|
||||
(the latter requiring a specific permission).
|
43
externals/breakpad/android/sample_app/jni/Android.mk
vendored
Normal file
43
externals/breakpad/android/sample_app/jni/Android.mk
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := test_google_breakpad
|
||||
LOCAL_SRC_FILES := test_breakpad.cpp
|
||||
LOCAL_STATIC_LIBRARIES += breakpad_client
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
# If NDK_MODULE_PATH is defined, import the module, otherwise do a direct
|
||||
# includes. This allows us to build in all scenarios easily.
|
||||
ifneq ($(NDK_MODULE_PATH),)
|
||||
$(call import-module,google_breakpad)
|
||||
else
|
||||
include $(LOCAL_PATH)/../../google_breakpad/Android.mk
|
||||
endif
|
31
externals/breakpad/android/sample_app/jni/Application.mk
vendored
Normal file
31
externals/breakpad/android/sample_app/jni/Application.mk
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
APP_STL := stlport_static
|
||||
APP_ABI := all
|
||||
APP_CXXFLAGS := -std=c++11 -D__STDC_LIMIT_MACROS
|
56
externals/breakpad/android/sample_app/jni/test_breakpad.cpp
vendored
Normal file
56
externals/breakpad/android/sample_app/jni/test_breakpad.cpp
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
// Copyright 2012 Google LLC
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google LLC nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "client/linux/handler/exception_handler.h"
|
||||
#include "client/linux/handler/minidump_descriptor.h"
|
||||
|
||||
namespace {
|
||||
|
||||
bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor,
|
||||
void* context,
|
||||
bool succeeded) {
|
||||
printf("Dump path: %s\n", descriptor.path());
|
||||
return succeeded;
|
||||
}
|
||||
|
||||
void Crash() {
|
||||
volatile int* a = reinterpret_cast<volatile int*>(NULL);
|
||||
*a = 1;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
google_breakpad::MinidumpDescriptor descriptor(".");
|
||||
google_breakpad::ExceptionHandler eh(descriptor, NULL, DumpCallback,
|
||||
NULL, true, -1);
|
||||
Crash();
|
||||
return 0;
|
||||
}
|
131
externals/breakpad/android/test-driver
vendored
Executable file
131
externals/breakpad/android/test-driver
vendored
Executable file
|
@ -0,0 +1,131 @@
|
|||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
# Slightly modified for Android, see ANDROID comment below.
|
||||
|
||||
scriptversion=2012-06-27.10; # UTC
|
||||
|
||||
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
# TODO: better error handling in option parsing (in particular, ensure
|
||||
# TODO: $log_file, $trs_file and $test_name are defined).
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
# ANDROID: old line was: "$@" > $log_file 2>&1
|
||||
progdir=$(dirname "$0")
|
||||
"$progdir/test-shell.sh" "$@" > $log_file 2>&1
|
||||
estatus=$?
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
estatus=1
|
||||
fi
|
||||
|
||||
case $estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
130
externals/breakpad/android/test-shell.sh
vendored
Executable file
130
externals/breakpad/android/test-shell.sh
vendored
Executable file
|
@ -0,0 +1,130 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2012 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Google LLC nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# A special shell wrapper that can be used to run the Google Breakpad unit
|
||||
# tests on a connected Android device.
|
||||
#
|
||||
# This is designed to be called from the Makefile during 'make check'
|
||||
#
|
||||
|
||||
PROGDIR=$(dirname "$0")
|
||||
PROGNAME=$(basename "$0")
|
||||
. $PROGDIR/common-functions.sh
|
||||
|
||||
# Extract test program name first.
|
||||
TEST_PROGRAM=$1
|
||||
shift
|
||||
|
||||
if [ -z "$TEST_PROGRAM" ]; then
|
||||
panic "No test program/script name on the command-line!"
|
||||
fi
|
||||
|
||||
if [ ! -f "$TEST_PROGRAM" ]; then
|
||||
panic "Can't find test program/script: $TEST_PROGRAM"
|
||||
fi
|
||||
|
||||
# Create test directory on the device
|
||||
TEST_DIR=/data/local/tmp/test-google-breakpad-$$
|
||||
adb_shell mkdir "$TEST_DIR" ||
|
||||
panic "Can't create test directory on device: $TEST_DIR"
|
||||
|
||||
# Ensure that it is always removed when the script exits.
|
||||
clean_test_dir () {
|
||||
# Don't care about success/failure, use '$ADB shell' directly.
|
||||
adb_shell rm -r "$TEST_DIR"
|
||||
}
|
||||
|
||||
atexit clean_test_dir
|
||||
|
||||
TEST_PROGRAM_NAME=$(basename "$TEST_PROGRAM")
|
||||
TEST_PROGRAM_DIR=$(dirname "$TEST_PROGRAM")
|
||||
|
||||
# Handle special case(s) here.
|
||||
DATA_FILES=
|
||||
case $TEST_PROGRAM_NAME in
|
||||
linux_client_unittest)
|
||||
# linux_client_unittest will call another executable at runtime, ensure
|
||||
# it is installed too.
|
||||
adb_install "$TEST_PROGRAM_DIR/linux_dumper_unittest_helper" "$TEST_DIR"
|
||||
# linux_client_unittest loads a shared library at runtime, ensure it is
|
||||
# installed too.
|
||||
adb_install "$TEST_PROGRAM_DIR/linux_client_unittest_shlib" "$TEST_DIR"
|
||||
;;
|
||||
basic_source_line_resolver_unittest)
|
||||
DATA_FILES="module1.out \
|
||||
module2.out \
|
||||
module3_bad.out \
|
||||
module4_bad.out"
|
||||
;;
|
||||
exploitability_unittest)
|
||||
DATA_FILES="scii_read_av.dmp \
|
||||
ascii_read_av_block_write.dmp \
|
||||
ascii_read_av_clobber_write.dmp \
|
||||
ascii_read_av_conditional.dmp \
|
||||
ascii_read_av_non_null.dmp \
|
||||
ascii_read_av_then_jmp.dmp \
|
||||
ascii_read_av_xchg_write.dmp \
|
||||
ascii_write_av.dmp \
|
||||
ascii_write_av_arg_to_call.dmp \
|
||||
exec_av_on_stack.dmp \
|
||||
null_read_av.dmp \
|
||||
null_write_av.dmp \
|
||||
read_av.dmp \
|
||||
null_read_av.dmp \
|
||||
write_av_non_null.dmp"
|
||||
;;
|
||||
fast_source_line_resolver_unittest)
|
||||
DATA_FILES="module0.out \
|
||||
module1.out \
|
||||
module2.out \
|
||||
module3_bad.out \
|
||||
module4_bad.out"
|
||||
;;
|
||||
minidump_processor_unittest|minidump_unittest)
|
||||
DATA_FILES="src/processor/testdata/minidump2.dmp"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Install the data files, their path is relative to the environment
|
||||
# variable 'srcdir'
|
||||
for FILE in $DATA_FILES; do
|
||||
FILEDIR=src/processor/testdata/$(dirname "$FILE")
|
||||
adb_shell mkdir -p "$TEST_DIR/$FILEDIR"
|
||||
adb_install "${srcdir:-.}/$FILE" "$TEST_DIR"/"$FILE"
|
||||
done
|
||||
|
||||
# Copy test program to device
|
||||
adb_install "$TEST_PROGRAM" "$TEST_DIR"
|
||||
|
||||
# Run it
|
||||
adb_shell "cd $TEST_DIR && LD_LIBRARY_PATH=. ./$TEST_PROGRAM_NAME $@"
|
||||
|
||||
# Note: exiting here will call cleanup_exit which will remove the temporary
|
||||
# files from the device.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue