Compare commits

..

No commits in common. "master" and "0.0.2-pre-alpha" have entirely different histories.

4505 changed files with 44674 additions and 1262271 deletions

View file

@ -5,10 +5,10 @@
export NDK_CCACHE=$(which ccache) export NDK_CCACHE=$(which ccache)
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then # keystore & pass are stored locally
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks" export ANDROID_KEYSTORE_FILE=~/android.keystore
base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}" export ANDROID_KEYSTORE_PASS=`cat ~/android.pass`
fi export ANDROID_KEY_ALIAS=`cat ~/android.alias`
cd src/android cd src/android
chmod +x ./gradlew chmod +x ./gradlew
@ -16,6 +16,4 @@ chmod +x ./gradlew
./gradlew assembleRelease ./gradlew assembleRelease
./gradlew bundleRelease ./gradlew bundleRelease
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then ccache -s -v
rm "${ANDROID_KEYSTORE_FILE}"
fi

View file

@ -2,7 +2,7 @@
# frozen_string_literal: true # frozen_string_literal: true
license_header = <<~EOF license_header = <<~EOF
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
EOF EOF

View file

@ -1,84 +0,0 @@
#!/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

View file

@ -1,2 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -1,100 +1,69 @@
#!/bin/bash -e #!/bin/bash -ex
# SPDX-FileCopyrightText: 2025 eden Emulator Project # SPDX-FileCopyrightText: 2025 eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
export ARCH="$(uname -m)" export ARCH="$(uname -m)"
case "$1" in if [ "$ARCH" = 'x86_64' ]; then
amd64|"") if [ "$1" = 'v3' ]; then
echo "Making amd64-v3 optimized build of Eden" echo "Making x86-64-v3 optimized build of eden"
ARCH="amd64_v3" ARCH="${ARCH}_v3"
ARCH_FLAGS="-march=x86-64-v3" ARCH_FLAGS="-march=x86-64-v3 -O3"
;; else
steamdeck) echo "Making x86-64 generic build of eden"
echo "Making Steam Deck (Zen 2) optimized build of Eden" ARCH_FLAGS="-march=x86-64 -mtune=generic -O3"
ARCH="steamdeck" fi
ARCH_FLAGS="-march=znver2 -mtune=znver2" else
;; echo "Making aarch64 build of eden"
rog-ally|allyx) ARCH_FLAGS="-march=armv8-a -mtune=generic -O3"
echo "Making ROG Ally X (Zen 4) optimized build of Eden" fi
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 if [ -z "$NPROC" ]; then
NPROC="$(nproc)" NPROC="$(nproc)"
fi fi
if [ "$1" != "" ]; then shift; fi
if [ "$TARGET" = "appimage" ]; then if [ "$TARGET" = "appimage" ]; then
export EXTRA_CMAKE_FLAGS=(-DCMAKE_INSTALL_PREFIX=/usr -DYUZU_ROOM=ON -DYUZU_ROOM_STANDALONE=OFF -DYUZU_CMD=OFF) # 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"
else else
# For the linux-fresh verification target, verify compilation without PCH as well. # For the linux-fresh verification target, verify compilation without PCH as well.
export EXTRA_CMAKE_FLAGS=(-DYUZU_USE_PRECOMPILED_HEADERS=OFF) export EXTRA_CMAKE_FLAGS=(-DCITRA_USE_PRECOMPILED_HEADERS=OFF)
fi fi
if [ "$DEVEL" != "true" ]; then if [ "$GITHUB_REF_TYPE" == "tag" ]; then
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON) export EXTRA_CMAKE_FLAGS=($EXTRA_CMAKE_FLAGS -DENABLE_QT_UPDATE_CHECKER=ON)
fi 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 mkdir -p build && cd build
cmake .. -G Ninja \ cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_QT_TRANSLATION=ON \ -DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=ON \ -DUSE_DISCORD_PRESENCE=ON \
-DUSE_CCACHE=ON \
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \ -DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \
-DCMAKE_C_FLAGS="$ARCH_FLAGS" \ -DCMAKE_C_FLAGS="$ARCH_FLAGS" \
-DYUZU_USE_BUNDLED_VCPKG=OFF \ -DYUZU_USE_BUNDLED_VCPKG=OFF \
-DYUZU_USE_BUNDLED_QT=OFF \ -DYUZU_USE_BUNDLED_QT=OFF \
-DUSE_SYSTEM_QT=ON \
-DYUZU_USE_BUNDLED_FFMPEG=OFF \
-DYUZU_USE_BUNDLED_SDL2=OFF \ -DYUZU_USE_BUNDLED_SDL2=OFF \
-DYUZU_USE_EXTERNAL_SDL2=ON \ -DYUZU_USE_EXTERNAL_SDL2=ON \
-DYUZU_TESTS=OFF \ -DYUZU_TESTS=OFF \
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \ -DYUZU_USE_LLVM_DEMANGLE=OFF \
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \ -DYUZU_USE_QT_MULTIMEDIA=OFF \
-DYUZU_USE_FASTER_LD=ON \ -DYUZU_USE_QT_WEB_ENGINE=OFF \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=OFF \
-DYUZU_USE_FASTER_LD=OFF \
-DYUZU_ENABLE_LTO=ON \ -DYUZU_ENABLE_LTO=ON \
-DCMAKE_LINKER=/usr/bin/mold \
"${EXTRA_CMAKE_FLAGS[@]}" "${EXTRA_CMAKE_FLAGS[@]}"
ninja -j${NPROC} ninja -j${NPROC}
@ -104,3 +73,11 @@ if [ -d "bin/Release" ]; then
else else
strip -s bin/* strip -s bin/*
fi fi
if [ "$TARGET" = "appimage" ]; then
ccache -s
else
ccache -s -v
fi
#ctest -VV -C Release

View file

@ -1,150 +1,219 @@
AppRun AppRun
eden.desktop
org.eden_emu.eden.desktop org.eden_emu.eden.desktop
shared/bin/eden bin/eden
shared/lib/lib.path shared/lib/lib.path
shared/lib/ld-linux-x86-64.so.2 shared/lib/ld-linux-x86-64.so.2
shared/lib/libQt6Widgets.so.6.4.2 shared/lib/libQt6Widgets.so.6.9.0
shared/lib/libQt6DBus.so.6.4.2 shared/lib/libQt6Network.so.6.9.0
shared/lib/libudev.so.1.7.5 shared/lib/libusb-1.0.so.0.5.0
shared/lib/libbrotlienc.so.1.0.9 shared/lib/libenet.so.7.0.6
shared/lib/libbrotlidec.so.1.0.9 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/libssl.so.3 shared/lib/libssl.so.3
shared/lib/libcrypto.so.3 shared/lib/libcrypto.so.3
shared/lib/libavcodec.so.59.37.100 shared/lib/libavcodec.so.61.19.100
shared/lib/libavutil.so.57.28.100 shared/lib/libavdevice.so.61.3.100
shared/lib/libQt6Gui.so.6.4.2 shared/lib/libavfilter.so.10.4.100
shared/lib/libQt6Core.so.6.4.2 shared/lib/libavformat.so.61.7.100
shared/lib/libstdc++.so.6.0.30 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/libm.so.6 shared/lib/libm.so.6
shared/lib/libgcc_s.so.1 shared/lib/libgcc_s.so.1
shared/lib/libc.so.6 shared/lib/libc.so.6
shared/lib/libdbus-1.so.3.32.4 shared/lib/libgssapi_krb5.so.2.2
shared/lib/libbrotlicommon.so.1.0.9 shared/lib/libproxy.so.0.5.9
shared/lib/libswresample.so.4.7.100 shared/lib/libudev.so.1.7.10
shared/lib/libvpx.so.7.1.0 shared/lib/libvpx.so.9.1.0
shared/lib/libwebpmux.so.3.0.10 shared/lib/libwebpmux.so.3.1.1
shared/lib/libwebp.so.7.1.5 shared/lib/liblzma.so.5.8.1
shared/lib/liblzma.so.5.4.1 shared/lib/libdav1d.so.7.0.0
shared/lib/libdav1d.so.6.6.0 shared/lib/libopencore-amrwb.so.0.0.5
shared/lib/librsvg-2.so.2.48.0 shared/lib/librsvg-2.so.2.60.0
shared/lib/libgobject-2.0.so.0.7400.6 shared/lib/libcairo.so.2.11804.4
shared/lib/libglib-2.0.so.0.7400.6 shared/lib/libgobject-2.0.so.0.8400.1
shared/lib/libcairo.so.2.11600.0 shared/lib/libglib-2.0.so.0.8400.1
shared/lib/libzvbi.so.0.13.2 shared/lib/libsnappy.so.1.2.2
shared/lib/libz.so.1.2.13 shared/lib/libaom.so.3.12.0
shared/lib/libsnappy.so.1.1.9 shared/lib/libgsm.so.1.0.22
shared/lib/libaom.so.3.6.0 shared/lib/libjxl.so.0.11.1
shared/lib/libcodec2.so.1.0 shared/lib/libjxl_threads.so.0.11.1
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/libmp3lame.so.0.0.0
shared/lib/libopenjp2.so.2.5.0 shared/lib/libopencore-amrnb.so.0.0.5
shared/lib/libopus.so.0.8.0 shared/lib/libopenjp2.so.2.5.3
shared/lib/librav1e.so.0.5.1
shared/lib/libshine.so.3.0.1
shared/lib/libspeex.so.1.5.2 shared/lib/libspeex.so.1.5.2
shared/lib/libSvtAv1Enc.so.1.4.1
shared/lib/libtheoraenc.so.1.1.2 shared/lib/libtheoraenc.so.1.1.2
shared/lib/libtheoradec.so.1.1.4 shared/lib/libtheoradec.so.1.1.4
shared/lib/libtwolame.so.0.0.0
shared/lib/libvorbis.so.0.4.9 shared/lib/libvorbis.so.0.4.9
shared/lib/libvorbisenc.so.2.0.12 shared/lib/libvorbisenc.so.2.0.12
shared/lib/libwebp.so.7.1.10
shared/lib/libx264.so.164 shared/lib/libx264.so.164
shared/lib/libx265.so.199
shared/lib/libxvidcore.so.4.3 shared/lib/libxvidcore.so.4.3
shared/lib/libva.so.2.1700.0 shared/lib/libvpl.so.2.14
shared/lib/libmfx.so.1.35 shared/lib/libraw1394.so.11.1.0
shared/lib/libva-drm.so.2.1700.0 shared/lib/libavc1394.so.0.3.0
shared/lib/libva-x11.so.2.1700.0 shared/lib/librom1394.so.0.3.0
shared/lib/libvdpau.so.1.0.0 shared/lib/libiec61883.so.0.1.1
shared/lib/libX11.so.6.4.0 shared/lib/libjack.so.0.1.0
shared/lib/libdrm.so.2.4.0 shared/lib/libdrm.so.2.124.0
shared/lib/libOpenCL.so.1.0.0
shared/lib/libEGL.so.1.1.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.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.so.1.1.0
shared/lib/libxcb-render.so.0.0.0 shared/lib/libxcb-shm.so.0.0.0
shared/lib/libXrender.so.1.3.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/libXext.so.6.4.0
shared/lib/libhwy.so.1.0.3 shared/lib/libpostproc.so.58.3.100
shared/lib/liblcms2.so.2.0.14 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/libvdpau.so.1.0.0
shared/lib/libsoxr.so.0.1.2
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/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/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/libogg.so.0.8.5 shared/lib/libogg.so.0.8.5
shared/lib/libnuma.so.1.0.0 shared/lib/libsharpyuv.so.0.1.1
shared/lib/libpthread.so.0 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/libXfixes.so.3.1.0 shared/lib/libXfixes.so.3.1.0
shared/lib/libX11-xcb.so.1.0.0 shared/lib/libX11-xcb.so.1.0.0
shared/lib/libxcb-dri3.so.0.1.0 shared/lib/libxcb-dri3.so.0.1.0
shared/lib/libGLdispatch.so.0.0.0 shared/lib/libsystemd.so.0.40.0
shared/lib/libexpat.so.1.8.10 shared/lib/libcurl.so.4.8.0
shared/lib/libgraphite2.so.3.2.1 shared/lib/libduktape.so.207.20700
shared/lib/libicudata.so.72.1 shared/lib/libgmodule-2.0.so.0.8400.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/libmount.so.1.1.0
shared/lib/libselinux.so.1 shared/lib/libjpeg.so.8.3.2
shared/lib/libpangoft2-1.0.so.0.5000.12 shared/lib/libtiff.so.6.1.0
shared/lib/libfribidi.so.0.4.0 shared/lib/libpangoft2-1.0.so.0.5600.3
shared/lib/libthai.so.0.3.1 shared/lib/libthai.so.0.3.1
shared/lib/libXau.so.6.0.0 shared/lib/libsndfile.so.1.0.37
shared/lib/libXdmcp.so.6.0.0 shared/lib/libasyncns.so.0.3.1
shared/lib/libgpg-error.so.0.33.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/libblkid.so.1.1.0 shared/lib/libblkid.so.1.1.0
shared/lib/libjbig.so.2.1
shared/lib/libdatrie.so.1.4.0 shared/lib/libdatrie.so.1.4.0
shared/lib/libbsd.so.0.11.7 shared/lib/libFLAC.so.14.0.0
shared/lib/libmd.so.0.0.5 shared/lib/libSDL3.so.0.2.10
shared/lib/libvulkan.so.1.3.239
share/vulkan/icd.d/intel_hasvk_icd.x86_64.json share/vulkan/icd.d/intel_hasvk_icd.x86_64.json
shared/lib/libvulkan_intel_hasvk.so 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-present.so.0.0.0
shared/lib/libxcb-xfixes.so.0.0.0
shared/lib/libxcb-sync.so.1.0.0 shared/lib/libxcb-sync.so.1.0.0
shared/lib/libxcb-randr.so.0.1.0 shared/lib/libxcb-randr.so.0.1.0
shared/lib/libxshmfence.so.1.0.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 share/vulkan/icd.d/intel_icd.x86_64.json
shared/lib/libvulkan_intel.so shared/lib/libvulkan_intel.so
share/vulkan/icd.d/lvp_icd.x86_64.json share/vulkan/icd.d/nouveau_icd.x86_64.json
shared/lib/libvulkan_lvp.so shared/lib/libvulkan_nouveau.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 share/vulkan/icd.d/radeon_icd.x86_64.json
shared/lib/libvulkan_radeon.so shared/lib/libvulkan_radeon.so
shared/lib/libdrm_amdgpu.so.1.0.0 shared/lib/libLLVM.so.19.1
shared/lib/libelf-0.188.so shared/lib/libelf-0.192.so
shared/lib/libVkLayer_MESA_device_select.so shared/lib/libdrm_amdgpu.so.1.124.0
shared/lib/libedit.so.0.0.75
shared/lib/libncursesw.so.6.5
bin/qt.conf bin/qt.conf
shared/lib/qt6/plugins/platforms/libqeglfs.so shared/lib/qt6/plugins/platforms/libqeglfs.so
shared/lib/qt6/plugins/platforms/libqlinuxfb.so shared/lib/qt6/plugins/platforms/libqlinuxfb.so
@ -156,57 +225,29 @@ shared/lib/qt6/plugins/platforms/libqvnc.so
shared/lib/qt6/plugins/platforms/libqwayland-egl.so shared/lib/qt6/plugins/platforms/libqwayland-egl.so
shared/lib/qt6/plugins/platforms/libqwayland-generic.so shared/lib/qt6/plugins/platforms/libqwayland-generic.so
shared/lib/qt6/plugins/platforms/libqxcb.so shared/lib/qt6/plugins/platforms/libqxcb.so
shared/lib/libQt6WaylandClient.so.6.4.2 shared/lib/libQt6XcbQpa.so.6.9.0
shared/lib/libwayland-cursor.so.0.21.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/qt6/plugins/platformthemes/libqgtk3.so shared/lib/qt6/plugins/platformthemes/libqgtk3.so
shared/lib/libgtk-3.so.0.2406.32 shared/lib/qt6/plugins/platformthemes/libqt6ct.so
shared/lib/libgdk-3.so.0.2406.32 shared/lib/qt6/plugins/platformthemes/libqxdgdesktopportal.so
shared/lib/libatk-1.0.so.0.24609.1 shared/lib/libqt6ct-common.so.0.10
shared/lib/libepoxy.so.0.0.0 etc/fonts/fonts.conf
shared/lib/libXi.so.6.1.0 shared/lib/libXi.so.6.1.0
shared/lib/libatk-bridge-2.0.so.0.0.0 shared/lib/libwayland-cursor.so.0.23.1
shared/lib/libwayland-egl.so.1.21.0 shared/lib/libwayland-egl.so.1.23.1
shared/lib/libXcursor.so.1.0.2 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/libXrandr.so.2.2.0
shared/lib/libXinerama.so.1.0.0 shared/lib/qt6/plugins/styles/libqt6ct-style.so
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/libcomposeplatforminputcontextplugin.so
shared/lib/qt6/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so shared/lib/qt6/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
shared/lib/qt6/plugins/iconengines/libqsvgicon.so shared/lib/qt6/plugins/iconengines/libqsvgicon.so
@ -214,37 +255,5 @@ shared/lib/qt6/plugins/imageformats/libqgif.so
shared/lib/qt6/plugins/imageformats/libqico.so shared/lib/qt6/plugins/imageformats/libqico.so
shared/lib/qt6/plugins/imageformats/libqjpeg.so shared/lib/qt6/plugins/imageformats/libqjpeg.so
shared/lib/qt6/plugins/imageformats/libqsvg.so shared/lib/qt6/plugins/imageformats/libqsvg.so
shared/lib/libQt6Svg.so.6.4.2 shared/lib/libQt6Svg.so.6.9.0
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 shared/lib/libXss.so.1.0.0

View file

@ -1,91 +1,65 @@
#!/bin/sh -e #!/bin/sh
# SPDX-FileCopyrightText: 2025 eden Emulator Project # SPDX-FileCopyrightText: 2025 eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# This script assumes you're in the source directory # This script assumes you're in the source directory
set -ex
export APPIMAGE_EXTRACT_AND_RUN=1 export APPIMAGE_EXTRACT_AND_RUN=1
export BASE_ARCH="$(uname -m)" export BASE_ARCH="$(uname -m)"
export ARCH="$BASE_ARCH"
SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-${BASE_ARCH}-aio" LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-${BASE_ARCH}" URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
case "$1" in if [ "$ARCH" = 'x86_64' ]; then
amd64|"") if [ "$1" = 'v3' ]; then
echo "Packaging amd64-v3 optimized build of Eden" ARCH="${ARCH}_v3"
ARCH="amd64_v3" fi
;;
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 fi
EDEN_TAG=$(git describe --tags --abbrev=0) EDEN_TAG=$(git describe --tags --abbrev=0)
echo "Making \"$EDEN_TAG\" build" echo "Making stable \"$EDEN_TAG\" build"
# git checkout "$EDEN_TAG" git checkout "$EDEN_TAG"
VERSION="$(echo "$EDEN_TAG")" VERSION="$(echo "$EDEN_TAG")"
# NOW MAKE APPIMAGE # NOW MAKE APPIMAGE
mkdir -p ./AppDir mkdir -p ./AppDir
cd ./AppDir cd ./AppDir
cp ../dist/org.eden_emu.eden.desktop . cat > eden.desktop << EOL
cp ../dist/org.eden_emu.eden.svg . [Desktop Entry]
Type=Application
Name=Eden
Icon=eden
StartupWMClass=eden
Exec=eden
Categories=Game;Emulator;
EOL
ln -sf ./org.eden_emu.eden.svg ./.DirIcon cp ../dist/eden.svg ./eden.svg
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync' ln -sf ./eden.svg ./.DirIcon
if [ "$DEVEL" = 'true' ]; then if [ "$DEVEL" = 'true' ]; then
sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop sed -i 's|Name=Eden|Name=Eden Nightly|' ./eden.desktop
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')" UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')"
fi fi
LIBDIR="/usr/lib" LIBDIR="/usr/lib"
# some distros are weird and use a subdir
# Workaround for Gentoo if [ ! -f "/usr/lib/libGL.so" ]
if [ ! -d "$LIBDIR/qt6" ]
then
LIBDIR="/usr/lib64"
fi
# Workaround for Debian
if [ ! -d "$LIBDIR/qt6" ]
then then
LIBDIR="/usr/lib/${BASE_ARCH}-linux-gnu" LIBDIR="/usr/lib/${BASE_ARCH}-linux-gnu"
fi fi
# Bundle all libs # Bundle all libs
wget --retry-connrefused --tries=30 "$LIB4BN" -O ./lib4bin
wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio chmod +x ./lib4bin
chmod +x ./sharun-aio xvfb-run -a -- ./lib4bin -p -v -e -s -k \
xvfb-run -a ./sharun-aio l -p -v -e -s -k \ ../build/bin/eden* \
../$BUILDDIR/bin/eden* \
$LIBDIR/lib*GL*.so* \ $LIBDIR/lib*GL*.so* \
$LIBDIR/libSDL2*.so* \ $LIBDIR/libSDL2*.so* \
$LIBDIR/dri/* \ $LIBDIR/dri/* \
@ -109,18 +83,14 @@ xvfb-run -a ./sharun-aio l -p -v -e -s -k \
$LIBDIR/spa-0.2/*/* \ $LIBDIR/spa-0.2/*/* \
$LIBDIR/alsa-lib/* $LIBDIR/alsa-lib/*
rm -f ./sharun-aio
# Prepare sharun # Prepare sharun
if [ "$ARCH" = 'aarch64' ]; then if [ "$ARCH" = 'aarch64' ]; then
# allow the host vulkan to be used for aarch64 given the sad situation # allow the host vulkan to be used for aarch64 given the sed situation
echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./.env echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./.env
fi fi
# Workaround for Gentoo wget https://github.com/VHSgunzo/sharun/releases/download/v0.6.3/sharun-x86_64 -O sharun
if [ -d "shared/libproxy" ]; then chmod a+x sharun
cp shared/libproxy/* lib/
fi
ln -f ./sharun ./AppRun ln -f ./sharun ./AppRun
./sharun -g ./sharun -g
@ -147,3 +117,8 @@ echo "Generating AppImage..."
echo "Generating zsync file..." echo "Generating zsync file..."
zsyncmake *.AppImage -u *.AppImage zsyncmake *.AppImage -u *.AppImage
echo "All Done!" echo "All Done!"
# Cleanup
rm -rf AppDir
rm uruntime

View file

@ -1,11 +0,0 @@
#!/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

27
.ci/windows/build-bqt.bat Executable file
View file

@ -0,0 +1,27 @@
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

31
.ci/windows/build.bat Executable file
View file

@ -0,0 +1,31 @@
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

View file

@ -1,65 +0,0 @@
#!/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

42
.ci/windows/package.ps1 Executable file
View file

@ -0,0 +1,42 @@
# 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

View file

@ -1,13 +0,0 @@
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/*

View file

@ -1,7 +0,0 @@
# 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"

View file

@ -5,24 +5,23 @@ name: eden-build
on: on:
push: push:
branches: [ "master" ] branches: [ "master" ]
pull_request:
branches: [ master ]
# TODO: combine build.yml into trigger_release.yml # TODO: combine build.yml into trigger_release.yml
jobs: jobs:
source: source:
if: ${{ !github.head_ref }} if: ${{ !github.head_ref }}
runs-on: source runs-on: linux
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
- name: Pack - name: Pack
run: ./.ci/source.sh run: ./.ci/source.sh
- name: Upload - name: Upload
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: source.zip name: source.zip
path: artifacts/ path: artifacts/
@ -67,21 +66,17 @@ jobs:
run: ./.ci/windows/cygwin.bat run: ./.ci/windows/cygwin.bat
- name: Configure & Build - name: Configure & Build
shell: bash id: cmake
run: | shell: cmd
./.ci/windows/qt-envvars.sh run: ./.ci/windows/build-bqt.bat amd64 yes
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 - name: Package artifacts
shell: bash shell: powershell
run: | run: ./.ci/windows/package.ps1 amd64 yes
./.ci/windows/qt-envvars.sh
./.ci/windows/package.sh
- name: Upload Windows artifacts - name: Upload Windows artifacts
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: ${{ matrix.target }}.zip name: ${{ matrix.target }}.zip
path: artifacts/* path: artifacts/*
@ -101,15 +96,14 @@ jobs:
fetch-tags: true fetch-tags: true
- name: Build - name: Build
run: TARGET=appimage DEVEL=true ./.ci/linux/build.sh run: ./.ci/linux/build.sh v3 8
- name: Package AppImage - name: Package AppImage
run: DEVEL=true ./.ci/linux/package.sh &> /dev/null run: ./.ci/linux/package.sh v3 &> /dev/null
- name: Upload Linux artifacts - name: Upload Linux artifacts
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 3
name: linux.zip name: linux.zip
path: ./*.AppImage path: ./*.AppImage
@ -117,6 +111,9 @@ jobs:
runs-on: android runs-on: android
env: env:
CCACHE_DIR: /home/runner/.cache/ccache
CCACHE_COMPILERCHECK: content
CCACHE_SLOPPINESS: time_macros
OS: android OS: android
TARGET: universal TARGET: universal
@ -135,11 +132,7 @@ jobs:
echo $GIT_TAG_NAME echo $GIT_TAG_NAME
- name: Build - name: Build
run: ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh run: ANDROID_HOME=/opt/android-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 - name: Package Android artifacts
run: ./.ci/android/package.sh run: ./.ci/android/package.sh
@ -147,6 +140,5 @@ jobs:
- name: Upload Android artifacts - name: Upload Android artifacts
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: android.zip name: android.zip
path: artifacts/* path: artifacts/*

View file

@ -1,22 +1,22 @@
name: eden-license name: eden-license
on: on:
pull_request: pull_request_target:
branches: [ master ] branches: [ master ]
jobs: jobs:
license-header: license-header:
runs-on: source runs-on: linux
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Fetch - name: Fetch master branch
run: git fetch origin master:master run: git fetch origin master:master
- name: Make script executable - name: Make script executable
run: chmod +x ./.ci/license-header.sh run: chmod +x ./.ci/license-header.rb
- name: Check license headers - name: Check license headers
run: ./.ci/license-header.sh run: ./.ci/license-header.rb

View file

@ -9,7 +9,7 @@ permissions:
jobs: jobs:
source: source:
runs-on: source runs-on: linux
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -19,7 +19,6 @@ jobs:
- name: Upload - name: Upload
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: source.zip name: source.zip
path: artifacts/ path: artifacts/
@ -64,19 +63,17 @@ jobs:
run: ./.ci/windows/cygwin.bat run: ./.ci/windows/cygwin.bat
- name: Configure & Build - name: Configure & Build
shell: bash id: cmake
run: DEVEL=false ./.ci/windows/build.sh shell: cmd
run: ./.ci/windows/build-bqt.bat amd64 no
- name: Package artifacts - name: Package artifacts
shell: bash shell: powershell
run: | run: ./.ci/windows/package.ps1 amd64 no
export PATH="${PATH}:/c/Qt/6.9.0/msvc2022_64/bin"
./.ci/windows/package.sh
- name: Upload Windows artifacts - name: Upload Windows artifacts
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: ${{ matrix.target }}.zip name: ${{ matrix.target }}.zip
path: artifacts/* path: artifacts/*
@ -96,7 +93,7 @@ jobs:
fetch-tags: true fetch-tags: true
- name: Build - name: Build
run: TARGET=appimage RELEASE=1 ./.ci/linux/build.sh v3 8 run: ./.ci/linux/build.sh v3 8
- name: Package AppImage - name: Package AppImage
run: ./.ci/linux/package.sh v3 &> /dev/null run: ./.ci/linux/package.sh v3 &> /dev/null
@ -104,7 +101,6 @@ jobs:
- name: Upload Linux artifacts - name: Upload Linux artifacts
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: linux.zip name: linux.zip
path: ./*.AppImage* path: ./*.AppImage*
@ -133,11 +129,7 @@ jobs:
echo $GIT_TAG_NAME echo $GIT_TAG_NAME
- name: Build - name: Build
run: ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh run: ANDROID_HOME=/opt/android-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 - name: Package Android artifacts
run: ./.ci/android/package.sh run: ./.ci/android/package.sh
@ -145,7 +137,6 @@ jobs:
- name: Upload Android artifacts - name: Upload Android artifacts
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
retention-days: 2
name: android.zip name: android.zip
path: artifacts/* path: artifacts/*

16
.gitignore vendored
View file

@ -1,14 +1,9 @@
# SPDX-FileCopyrightText: 2013 Citra Emulator Project # SPDX-FileCopyrightText: 2013 Citra Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# Build directory # Build directory
[Bb]uild*/ [Bb]uild*/
doc-build/ doc-build/
AppDir/
uruntime
# Generated source files # Generated source files
src/common/scm_rev.cpp src/common/scm_rev.cpp
@ -19,21 +14,14 @@ dist/english_plurals/generated_en.ts
.idea/ .idea/
.vs/ .vs/
.vscode/ .vscode/
.cache/
profile.json.gz
CMakeLists.txt.user* CMakeLists.txt.user*
# kdevelop
.kdev4/
*.kdev4
# *nix related # *nix related
# Common convention for backup or temporary files # Common convention for backup or temporary files
*~ *~
# Visual Studio CMake settings # Visual Studio CMake settings
CMakeSettings.json CMakeSettings.json
.cache/
# OSX global filetypes # OSX global filetypes
# Created by Finder or Spotlight in directories for various OS functionality (indexing, etc) # Created by Finder or Spotlight in directories for various OS functionality (indexing, etc)
@ -48,7 +36,3 @@ CMakeSettings.json
# Windows global filetypes # Windows global filetypes
Thumbs.db Thumbs.db
# Artifacts
eden-windows-msvc
artifacts
*.AppImage*

86
.gitmodules vendored
View file

@ -1,69 +1,75 @@
# SPDX-FileCopyrightText: 2014 Citra Emulator Project # SPDX-FileCopyrightText: 2014 Citra Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later # 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"] [submodule "cubeb"]
path = externals/cubeb path = externals/cubeb
url = https://github.com/mozilla/cubeb.git 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
[submodule "libusb"] [submodule "libusb"]
path = externals/libusb/libusb path = externals/libusb/libusb
url = https://github.com/libusb/libusb.git 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
[submodule "Vulkan-Headers"] [submodule "Vulkan-Headers"]
path = externals/Vulkan-Headers path = externals/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git 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
[submodule "xbyak"] [submodule "xbyak"]
path = externals/xbyak path = externals/xbyak
url = https://github.com/herumi/xbyak.git url = https://git.eden-emu.dev/eden-emu/xbyak.git
[submodule "opus"] [submodule "opus"]
path = externals/opus path = externals/opus
url = https://github.com/xiph/opus.git url = https://git.eden-emu.dev/eden-emu/opus.git
[submodule "SDL"] [submodule "SDL"]
path = externals/SDL path = externals/SDL
url = https://github.com/libsdl-org/SDL.git url = https://git.eden-emu.dev/eden-emu/SDL.git
[submodule "cpp-httplib"] [submodule "cpp-httplib"]
path = externals/cpp-httplib path = externals/cpp-httplib
url = https://github.com/yhirose/cpp-httplib.git url = https://git.eden-emu.dev/eden-emu/cpp-httplib.git
[submodule "ffmpeg"] [submodule "ffmpeg"]
path = externals/ffmpeg/ffmpeg path = externals/ffmpeg/ffmpeg
url = https://github.com/FFmpeg/FFmpeg.git url = https://git.eden-emu.dev/eden-emu/FFmpeg.git
[submodule "vcpkg"] [submodule "vcpkg"]
path = externals/vcpkg path = externals/vcpkg
url = https://github.com/microsoft/vcpkg.git url = https://git.eden-emu.dev/eden-emu/vcpkg.git
[submodule "cpp-jwt"] [submodule "cpp-jwt"]
path = externals/cpp-jwt path = externals/cpp-jwt
url = https://github.com/arun11299/cpp-jwt.git 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
[submodule "VulkanMemoryAllocator"] [submodule "VulkanMemoryAllocator"]
path = externals/VulkanMemoryAllocator path = externals/VulkanMemoryAllocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git 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
[submodule "Vulkan-Utility-Libraries"] [submodule "Vulkan-Utility-Libraries"]
path = externals/Vulkan-Utility-Libraries path = externals/Vulkan-Utility-Libraries
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git 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
[submodule "externals/boost-headers"] [submodule "externals/boost-headers"]
path = externals/boost-headers path = externals/boost-headers
url = https://github.com/boostorg/headers.git url = https://git.eden-emu.dev/eden-emu/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

View file

@ -1,80 +0,0 @@
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;
}
+

View file

@ -1,26 +0,0 @@
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 */

View file

@ -1,19 +0,0 @@
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;

View file

@ -1,400 +0,0 @@
"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
+

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project # SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.22)
@ -17,10 +17,6 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX-") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX-")
endif() 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 # Check if SDL2::SDL2 target exists; if not, create an alias
if (TARGET SDL2::SDL2-static) if (TARGET SDL2::SDL2-static)
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static) add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
@ -29,87 +25,49 @@ elseif (TARGET SDL2::SDL2-shared)
endif() endif()
# Set bundled sdl2/qt as dependent options. # 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) option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF) CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") # 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" OFF "ENABLE_SDL2;NOT MSVC" OFF) CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "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) cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
option(ENABLE_OPENGL "Enable OpenGL" ON) option(ENABLE_OPENGL "Enable OpenGL" ON)
mark_as_advanced(FORCE ENABLE_OPENGL) 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)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" 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(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" OFF)
else()
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON)
endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
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()
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
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_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" 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(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}") option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
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) option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON)
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF) CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" 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) 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_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON)
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) option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
@ -327,10 +285,6 @@ if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
add_definitions(-DHAS_NCE=1) add_definitions(-DHAS_NCE=1)
endif() endif()
if (YUZU_ROOM)
add_definitions(-DYUZU_ROOM)
endif()
# Configure C++ standard # Configure C++ standard
# =========================== # ===========================
@ -345,7 +299,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# Enforce the search mode of non-required packages for better and shorter failure messages # Enforce the search mode of non-required packages for better and shorter failure messages
find_package(enet 1.3 MODULE) find_package(enet 1.3 MODULE)
find_package(fmt 8 REQUIRED) find_package(fmt 10 REQUIRED)
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle) find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
find_package(lz4 REQUIRED) find_package(lz4 REQUIRED)
find_package(nlohmann_json 3.8 REQUIRED) find_package(nlohmann_json 3.8 REQUIRED)
@ -365,17 +319,8 @@ if (NOT YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES)
find_package(VulkanUtilityLibraries REQUIRED) find_package(VulkanUtilityLibraries REQUIRED)
endif() 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) if (ENABLE_LIBUSB)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
find_package(libusb MODULE)
else()
find_package(libusb 1.0.24 MODULE) find_package(libusb 1.0.24 MODULE)
endif()
endif() endif()
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
@ -400,9 +345,6 @@ endif()
if (ENABLE_WEB_SERVICE) if (ENABLE_WEB_SERVICE)
find_package(cpp-jwt 1.4 CONFIG) 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) find_package(httplib 0.12 MODULE COMPONENTS OpenSSL)
endif() endif()
@ -418,12 +360,17 @@ if (UNIX AND NOT APPLE)
find_package(gamemode 1.7 MODULE) find_package(gamemode 1.7 MODULE)
endif() 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 # 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 (ENABLE_SDL2)
if (YUZU_USE_BUNDLED_SDL2) if (YUZU_USE_BUNDLED_SDL2)
# Detect toolchain and platform # Detect toolchain and platform
if ((MSVC_VERSION GREATER_EQUAL 1920) AND ARCHITECTURE_x86_64) if ((MSVC_VERSION GREATER_EQUAL 1920) AND ARCHITECTURE_x86_64)
set(SDL2_VER "SDL2-2.32.8") set(SDL2_VER "SDL2-2.28.2")
else() else()
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
endif() endif()
@ -447,31 +394,15 @@ if (ENABLE_SDL2)
endif() endif()
endif() endif()
# List of all FFmpeg components required
set(FFmpeg_COMPONENTS
avcodec
avfilter
avutil
swscale)
add_subdirectory(externals) add_subdirectory(externals)
if (ENABLE_QT) if (ENABLE_QT)
if (YUZU_USE_BUNDLED_QT) if (NOT USE_SYSTEM_QT)
download_qt(6.8.3) download_qt(6.7.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() endif()
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent) find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent)
if (YUZU_USE_QT_MULTIMEDIA)
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
endif()
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
find_package(Qt6 REQUIRED COMPONENTS DBus) find_package(Qt6 REQUIRED COMPONENTS DBus)
@ -495,7 +426,6 @@ if (ENABLE_QT)
if (NOT DEFINED QT_HOST_PATH) if (NOT DEFINED QT_HOST_PATH)
set(QT_HOST_PATH "${QT_TARGET_PATH}") set(QT_HOST_PATH "${QT_TARGET_PATH}")
endif() endif()
message(STATUS "Using target Qt at ${QT_TARGET_PATH}") message(STATUS "Using target Qt at ${QT_TARGET_PATH}")
message(STATUS "Using host Qt at ${QT_HOST_PATH}") message(STATUS "Using host Qt at ${QT_HOST_PATH}")
endif() endif()
@ -521,14 +451,20 @@ function(set_yuzu_qt_components)
set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE) 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) find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBVA libva) pkg_check_modules(LIBVA libva)
endif() endif()
if (NOT YUZU_USE_BUNDLED_FFMPEG) if (NOT YUZU_USE_BUNDLED_FFMPEG)
# Use system installed 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() endif()
if(ENABLE_QT) if(ENABLE_QT)
@ -562,8 +498,6 @@ if (APPLE)
# Umbrella framework for everything GUI-related # Umbrella framework for everything GUI-related
find_library(COCOA_LIBRARY Cocoa) find_library(COCOA_LIBRARY Cocoa)
set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
find_library(ICONV_LIBRARY iconv REQUIRED)
list(APPEND PLATFORM_LIBRARIES ${ICONV_LIBRARY})
elseif (WIN32) elseif (WIN32)
# Target Windows 10 # Target Windows 10
add_definitions(-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00) add_definitions(-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
@ -707,14 +641,13 @@ endif()
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html # https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
# https://www.freedesktop.org/software/appstream/docs/ # https://www.freedesktop.org/software/appstream/docs/
if(ENABLE_QT AND UNIX AND NOT APPLE) if(ENABLE_QT AND UNIX AND NOT APPLE)
install(FILES "dist/org.eden_emu.eden.desktop" install(FILES "dist/org.yuzu_emu.yuzu.desktop"
DESTINATION "share/applications") DESTINATION "share/applications")
install(FILES "dist/org.eden_emu.eden.svg" install(FILES "dist/eden.svg"
DESTINATION "share/icons/hicolor/scalable/apps") DESTINATION "share/icons/hicolor/scalable/apps"
RENAME "org.yuzu_emu.eden.svg")
# TODO: these files need to be updated. install(FILES "dist/org.yuzu_emu.yuzu.xml"
install(FILES "dist/org.eden_emu.eden.xml"
DESTINATION "share/mime/packages") DESTINATION "share/mime/packages")
install(FILES "dist/org.eden_emu.eden.metainfo.xml" install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml"
DESTINATION "share/metainfo") DESTINATION "share/metainfo")
endif() endif()

View file

@ -1,24 +0,0 @@
# 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})

View file

@ -16,7 +16,7 @@ function(copy_yuzu_Qt6_deps target_dir)
set(PLATFORMS ${DLL_DEST}plugins/platforms/) set(PLATFORMS ${DLL_DEST}plugins/platforms/)
set(STYLES ${DLL_DEST}plugins/styles/) set(STYLES ${DLL_DEST}plugins/styles/)
set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/)
set(RESOURCES ${DLL_DEST}resources/)
if (MSVC) if (MSVC)
windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST}
Qt6Core$<$<CONFIG:Debug>:d>.* Qt6Core$<$<CONFIG:Debug>:d>.*
@ -31,31 +31,20 @@ function(copy_yuzu_Qt6_deps target_dir)
endif() endif()
if (YUZU_USE_QT_WEB_ENGINE) if (YUZU_USE_QT_WEB_ENGINE)
windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} 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>.* Qt6WebEngineCore$<$<CONFIG:Debug>:d>.*
Qt6WebEngineWidgets$<$<CONFIG:Debug>:d>.* Qt6WebEngineWidgets$<$<CONFIG:Debug>:d>.*
QtWebEngineProcess$<$<CONFIG:Debug>:d>.* QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
) )
windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${RESOURCES} windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${DLL_DEST}
icudtl.dat icudtl.dat
qtwebengine_devtools_resources.pak qtwebengine_devtools_resources.pak
qtwebengine_resources.pak qtwebengine_resources.pak
qtwebengine_resources_100p.pak qtwebengine_resources_100p.pak
qtwebengine_resources_200p.pak qtwebengine_resources_200p.pak
v8_context_snapshot.bin
) )
endif() endif()
windows_copy_files(yuzu ${Qt6_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) windows_copy_files(yuzu ${Qt6_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qmodernwindowsstyle$<$<CONFIG:Debug>:d>.*) windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
windows_copy_files(yuzu ${Qt6_IMAGEFORMATS_DIR} ${IMAGEFORMATS} windows_copy_files(yuzu ${Qt6_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
qjpeg$<$<CONFIG:Debug>:d>.* qjpeg$<$<CONFIG:Debug>:d>.*
qgif$<$<CONFIG:Debug>:d>.* qgif$<$<CONFIG:Debug>:d>.*
@ -63,6 +52,9 @@ function(copy_yuzu_Qt6_deps target_dir)
else() else()
# Update for non-MSVC platforms if needed # Update for non-MSVC platforms if needed
endif() endif()
# 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") # Create an empty qt.conf file
add_custom_command(TARGET yuzu POST_BUILD
COMMAND ${CMAKE_COMMAND} -E touch ${DLL_DEST}qt.conf
)
endfunction(copy_yuzu_Qt6_deps) endfunction(copy_yuzu_Qt6_deps)

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project # SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# This function downloads a binary library package from our external repo. # 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_repo "ext-windows-bin/raw/master/")
set(package_extension ".7z") set(package_extension ".7z")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(package_repo "ext-linux-bin/raw/master/") set(package_repo "ext-linux-bin/raw/main/")
set(package_extension ".tar.xz") set(package_extension ".tar.xz")
elseif (ANDROID) elseif (ANDROID)
set(package_repo "ext-android-bin/raw/master/") set(package_repo "ext-android-bin/raw/main/")
set(package_extension ".tar.xz") set(package_extension ".tar.xz")
else() else()
message(FATAL_ERROR "No package available for this platform") 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") set(arch_path "mingw_64")
elseif (MSVC) elseif (MSVC)
if ("arm64" IN_LIST ARCHITECTURE) if ("arm64" IN_LIST ARCHITECTURE)
set(arch_path "msvc2022_arm64") set(arch_path "msvc2019_arm64")
elseif ("x86_64" IN_LIST ARCHITECTURE) elseif ("x86_64" IN_LIST ARCHITECTURE)
set(arch_path "msvc2022_64") set(arch_path "msvc2019_64")
else() else()
message(FATAL_ERROR "Unsupported bundled Qt architecture. Disable YUZU_USE_BUNDLED_QT and provide your own.") message(FATAL_ERROR "Unsupported bundled Qt architecture. Enable USE_SYSTEM_QT and provide your own.")
endif() endif()
set(arch "win64_${arch_path}") set(arch "win64_${arch_path}")
if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(host_arch_path "msvc2022_64") set(host_arch_path "msvc2019_64")
elseif (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64") elseif (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
set(host_arch_path "msvc2022_arm64") set(host_arch_path "msvc2019_64")
endif() endif()
set(host_arch "win64_${host_arch_path}") set(host_arch "win64_${host_arch_path}")
else() else()
message(FATAL_ERROR "Unsupported bundled Qt toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.") message(FATAL_ERROR "Unsupported bundled Qt toolchain. Enable USE_SYSTEM_QT and provide your own.")
endif() endif()
endif() endif()
elseif (APPLE) elseif (APPLE)
@ -94,7 +94,7 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
else() else()
set(host "linux") set(host "linux")
set(type "desktop") set(type "desktop")
set(arch "linux_gcc_64") set(arch "gcc_64")
set(arch_path "linux") set(arch_path "linux")
endif() endif()
@ -133,26 +133,13 @@ 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}) set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target})
else() else()
set(prefix "${base_path}/${target}/${arch_path}") set(prefix "${base_path}/${target}/${arch_path}")
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt_base) set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch}
-m qtmultimedia --archives qttranslations qttools qtsvg qtbase)
if (YUZU_USE_QT_MULTIMEDIA)
set(install_args ${install_args} qtmultimedia)
endif() 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}") if (NOT EXISTS "${prefix}")
message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}") message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}")
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0") set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.18")
if (WIN32) if (WIN32)
set(aqt_path "${base_path}/aqt.exe") set(aqt_path "${base_path}/aqt.exe")
if (NOT EXISTS "${aqt_path}") if (NOT EXISTS "${aqt_path}")

View file

@ -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}) target_include_directories(LLVM::Demangle INTERFACE ${LLVM_INCLUDE_DIRS})
# prefer shared LLVM: https://github.com/llvm/llvm-project/issues/34593 # prefer shared LLVM: https://github.com/llvm/llvm-project/issues/34593
# but use ugly hack because llvm_config doesn't support interface library # but use ugly hack because llvm_config doesn't support interface library
add_library(_dummy_lib SHARED EXCLUDE_FROM_ALL ${CMAKE_SOURCE_DIR}/src/yuzu/main.cpp) add_library(_dummy_lib SHARED EXCLUDE_FROM_ALL src/yuzu/main.cpp)
llvm_config(_dummy_lib USE_SHARED demangle) llvm_config(_dummy_lib USE_SHARED demangle)
get_target_property(LLVM_LIBRARIES _dummy_lib LINK_LIBRARIES) get_target_property(LLVM_LIBRARIES _dummy_lib LINK_LIBRARIES)
target_link_libraries(LLVM::Demangle INTERFACE ${LLVM_LIBRARIES}) target_link_libraries(LLVM::Demangle INTERFACE ${LLVM_LIBRARIES})

View file

@ -1,29 +0,0 @@
# 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()

View file

@ -20,19 +20,37 @@ if (NOT GIT_BRANCH)
endif() endif()
get_timestamp(BUILD_DATE) get_timestamp(BUILD_DATE)
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 # Generate cpp with Git revision from template
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well # Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
set(REPO_NAME "Eden") set(REPO_NAME "")
set(BUILD_ID ${GIT_BRANCH}) set(BUILD_VERSION "0")
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ") 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()
endif()
configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY) configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)

View file

@ -1,9 +1,8 @@
<!-- <!--
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project # SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2025 EDEN Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
--> -->
<!-- lang: en-GB --> <!-- lang: en-GB -->
@ -43,11 +42,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. A list of supported games will be available in future. Please be patient.
Check out our [website](https://eden-emu.dev) for the latest news on exciting features, monthly progress reports, and more! Check out our [website](https://eden-emulator.github.io) for the latest news on exciting features, monthly progress reports, and more!
## Development ## Development
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/edenemu). 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).
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. 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. You can also contact any of the developers on Discord to learn more about the current state of the emulator.
@ -60,11 +59,12 @@ You can also contact any of the developers on Discord to learn more about the cu
## Download ## Download
You will be able to download the latest releases from [here](https://github.com/eden-emulator/Releases/releases). 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.
## Support ## Support
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)! 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)
Any donations received will go towards things such as: Any donations received will go towards things such as:
* Switch consoles to explore and reverse-engineer the hardware * 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.) * Additional hardware (e.g. GPUs as needed to improve rendering support, other peripherals to add support for, etc.)
* CI Infrastructure * CI Infrastructure
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. 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.
## License ## License

BIN
dist/eden.icns vendored

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

3590
dist/languages/ar.ts vendored

File diff suppressed because it is too large Load diff

3658
dist/languages/ca.ts vendored

File diff suppressed because it is too large Load diff

3934
dist/languages/cs.ts vendored

File diff suppressed because it is too large Load diff

4492
dist/languages/da.ts vendored

File diff suppressed because it is too large Load diff

3036
dist/languages/de.ts vendored

File diff suppressed because it is too large Load diff

4412
dist/languages/el.ts vendored

File diff suppressed because it is too large Load diff

2847
dist/languages/es.ts vendored

File diff suppressed because it is too large Load diff

8208
dist/languages/fi.ts vendored

File diff suppressed because it is too large Load diff

2812
dist/languages/fr.ts vendored

File diff suppressed because it is too large Load diff

2900
dist/languages/hu.ts vendored

File diff suppressed because it is too large Load diff

3690
dist/languages/id.ts vendored

File diff suppressed because it is too large Load diff

3033
dist/languages/it.ts vendored

File diff suppressed because it is too large Load diff

3175
dist/languages/ja_JP.ts vendored

File diff suppressed because it is too large Load diff

3158
dist/languages/ko_KR.ts vendored

File diff suppressed because it is too large Load diff

3154
dist/languages/nb.ts vendored

File diff suppressed because it is too large Load diff

3180
dist/languages/nl.ts vendored

File diff suppressed because it is too large Load diff

3319
dist/languages/pl.ts vendored

File diff suppressed because it is too large Load diff

2823
dist/languages/pt_BR.ts vendored

File diff suppressed because it is too large Load diff

2807
dist/languages/pt_PT.ts vendored

File diff suppressed because it is too large Load diff

2849
dist/languages/ru_RU.ts vendored

File diff suppressed because it is too large Load diff

4267
dist/languages/sv.ts vendored

File diff suppressed because it is too large Load diff

3245
dist/languages/tr_TR.ts vendored

File diff suppressed because it is too large Load diff

3219
dist/languages/uk.ts vendored

File diff suppressed because it is too large Load diff

3144
dist/languages/vi.ts vendored

File diff suppressed because it is too large Load diff

3143
dist/languages/vi_VN.ts vendored

File diff suppressed because it is too large Load diff

2808
dist/languages/zh_CN.ts vendored

File diff suppressed because it is too large Load diff

2806
dist/languages/zh_TW.ts vendored

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,3 @@
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project # SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
@ -10,7 +7,7 @@ Type=Application
Name=eden Name=eden
GenericName=Switch Emulator GenericName=Switch Emulator
Comment=Nintendo Switch video game console emulator Comment=Nintendo Switch video game console emulator
Icon=org.eden_emu.eden Icon=org.yuzu_emu.eden
TryExec=eden TryExec=eden
Exec=eden %f Exec=eden %f
Categories=Game;Emulator;Qt; Categories=Game;Emulator;Qt;

View file

@ -38,18 +38,6 @@ QPushButton#RendererStatusBarButton:!checked {
color: #0066ff; 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 { QPushButton#GPUStatusBarButton {
color: #656565; color: #656565;
border: 1px solid transparent; border: 1px solid transparent;

View file

@ -42,18 +42,6 @@ QPushButton#RendererStatusBarButton:!checked {
color: #00ccdd; 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 { QPushButton#GPUStatusBarButton {
color: #656565; color: #656565;
border: 1px solid transparent; border: 1px solid transparent;

View file

@ -1283,19 +1283,6 @@ QPushButton#RendererStatusBarButton:!checked {
color: #00ccdd; 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 { QPushButton#GPUStatusBarButton {
min-width: 0px; min-width: 0px;
color: #656565; color: #656565;

View file

@ -2186,19 +2186,6 @@ QPushButton#RendererStatusBarButton:!checked {
color: #00ccdd; 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 { QPushButton#GPUStatusBarButton {
min-width: 0px; min-width: 0px;
color: #656565; color: #656565;

View file

@ -119,7 +119,7 @@ endif()
add_subdirectory(sirit) add_subdirectory(sirit)
# httplib # httplib
if ((ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER) AND NOT TARGET httplib::httplib) if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
set(HTTPLIB_REQUIRE_OPENSSL ON) set(HTTPLIB_REQUIRE_OPENSSL ON)
add_subdirectory(cpp-httplib) add_subdirectory(cpp-httplib)
endif() endif()
@ -160,12 +160,6 @@ if (YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES)
add_subdirectory(Vulkan-Utility-Libraries) add_subdirectory(Vulkan-Utility-Libraries)
endif() endif()
# SPIRV-Tools
if (YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
set(SPIRV_SKIP_EXECUTABLES ON)
add_subdirectory(SPIRV-Tools)
endif()
# Boost headers # Boost headers
add_subdirectory(boost-headers) add_subdirectory(boost-headers)

@ -1 +0,0 @@
Subproject commit 40eb301f320e1d85ce3bc12798022149eae3eee3

@ -1 +1 @@
Subproject commit 16cedde3564629c43808401ad1eb3ca6ef24709a Subproject commit 409c16be502e39fe70dd6fe2d9ad4842ef2c9a53

@ -1 +1 @@
Subproject commit f216bb107bfc6d99a9605572963613e828b10880 Subproject commit 4e246c56ec5afb5ad66b9b04374d39ac04675c8e

@ -1 +1 @@
Subproject commit 6ec8481c8a13db586d7b3ba58f4eb9bbf017edf0 Subproject commit 539c0a8d8e3733c9f25ea9a184c85c77504f1653

1
externals/breakpad vendored Submodule

@ -0,0 +1 @@
Subproject commit c89f9dddc793f19910ef06c13e4fd240da4e7a59

View file

@ -1,9 +0,0 @@
# 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

View file

@ -1,73 +0,0 @@
# 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

View file

@ -1,22 +0,0 @@
# 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.

View file

@ -1,43 +0,0 @@
# 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 }}

View file

@ -1,90 +0,0 @@
# 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

View file

@ -1 +0,0 @@
opensource@google.com

View file

View file

@ -1,58 +0,0 @@
# 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"],
},
]

View file

@ -1,13 +0,0 @@
# 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"

View file

@ -1,370 +0,0 @@
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.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

View file

@ -1,13 +0,0 @@
# 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

View file

@ -1,139 +0,0 @@
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

View file

@ -1,82 +0,0 @@
# 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: [![Build+Test CI](https://github.com/google/breakpad/actions/workflows/build-test-ci.yml/badge.svg)](https://github.com/google/breakpad/actions/workflows/build-test-ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/eguv4emv2rhq68u2?svg=true)](https://ci.appveyor.com/project/vapier/breakpad)
* Coverage [![Coverity Status](https://scan.coverity.com/projects/9215/badge.svg)](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 theyre 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 CCd.

File diff suppressed because it is too large Load diff

View file

@ -1,371 +0,0 @@
# 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"
}

View file

@ -1,104 +0,0 @@
# 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.

View file

@ -1,554 +0,0 @@
#!/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."

View file

@ -1,32 +0,0 @@
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).

View file

@ -1,43 +0,0 @@
# 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

View file

@ -1,31 +0,0 @@
# 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

View file

@ -1,56 +0,0 @@
// 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;
}

View file

@ -1,131 +0,0 @@
#! /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='' # Red.
grn='' # Green.
lgn='' # Light green.
blu='' # Blue.
mgn='' # Magenta.
std='' # 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:

View file

@ -1,130 +0,0 @@
#!/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