diff --git a/.ci/android.sh b/.ci/android.sh index db3dac4196..79b1bc6732 100755 --- a/.ci/android.sh +++ b/.ci/android.sh @@ -2,18 +2,16 @@ export NDK_CCACHE=$(which ccache) -if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then - export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks" - base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}" -fi +# keystore & pass are stored locally +export ANDROID_KEYSTORE_FILE=~/android.keystore +export ANDROID_KEYSTORE_PASS=`cat ~/android.pass` +export ANDROID_KEY_ALIAS=`cat ~/android.alias` +export ANDROID_HOME=/opt/android-sdk/ cd src/android chmod +x ./gradlew + ./gradlew assembleRelease ./gradlew bundleRelease ccache -s -v - -if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then - rm "${ANDROID_KEYSTORE_FILE}" -fi diff --git a/.ci/eden.dwfsprof b/.ci/eden.dwfsprof new file mode 100644 index 0000000000..377d5fec89 --- /dev/null +++ b/.ci/eden.dwfsprof @@ -0,0 +1,259 @@ +AppRun +org.eden_emu.eden.desktop +bin/eden +shared/lib/lib.path +shared/lib/ld-linux-x86-64.so.2 +shared/lib/libQt6Widgets.so.6.9.0 +shared/lib/libQt6Network.so.6.9.0 +shared/lib/libusb-1.0.so.0.5.0 +shared/lib/libenet.so.7.0.6 +shared/lib/libbrotlicommon.so.1.1.0 +shared/lib/libbrotlienc.so.1.1.0 +shared/lib/libbrotlidec.so.1.1.0 +shared/lib/libz.so.1.3.1 +shared/lib/libssl.so.3 +shared/lib/libcrypto.so.3 +shared/lib/libavcodec.so.61.19.100 +shared/lib/libavdevice.so.61.3.100 +shared/lib/libavfilter.so.10.4.100 +shared/lib/libavformat.so.61.7.100 +shared/lib/libavutil.so.59.39.100 +shared/lib/libswresample.so.5.3.100 +shared/lib/libswscale.so.8.3.100 +shared/lib/libva.so.2.2200.0 +shared/lib/libboost_context.so.1.87.0 +shared/lib/liblz4.so.1.10.0 +shared/lib/libzstd.so.1.5.7 +shared/lib/libSDL2-2.0.so.0.3200.54 +shared/lib/libfmt.so.11.1.4 +shared/lib/libopus.so.0.10.1 +shared/lib/libQt6Gui.so.6.9.0 +shared/lib/libQt6DBus.so.6.9.0 +shared/lib/libGLX.so.0.0.0 +shared/lib/libOpenGL.so.0.0.0 +shared/lib/libQt6Core.so.6.9.0 +shared/lib/libstdc++.so.6.0.33 +shared/lib/libm.so.6 +shared/lib/libgcc_s.so.1 +shared/lib/libc.so.6 +shared/lib/libgssapi_krb5.so.2.2 +shared/lib/libproxy.so.0.5.9 +shared/lib/libudev.so.1.7.10 +shared/lib/libvpx.so.9.1.0 +shared/lib/libwebpmux.so.3.1.1 +shared/lib/liblzma.so.5.8.1 +shared/lib/libdav1d.so.7.0.0 +shared/lib/libopencore-amrwb.so.0.0.5 +shared/lib/librsvg-2.so.2.60.0 +shared/lib/libcairo.so.2.11804.4 +shared/lib/libgobject-2.0.so.0.8400.1 +shared/lib/libglib-2.0.so.0.8400.1 +shared/lib/libsnappy.so.1.2.2 +shared/lib/libaom.so.3.12.0 +shared/lib/libgsm.so.1.0.22 +shared/lib/libjxl.so.0.11.1 +shared/lib/libjxl_threads.so.0.11.1 +shared/lib/libmp3lame.so.0.0.0 +shared/lib/libopencore-amrnb.so.0.0.5 +shared/lib/libopenjp2.so.2.5.3 +shared/lib/libspeex.so.1.5.2 +shared/lib/libtheoraenc.so.1.1.2 +shared/lib/libtheoradec.so.1.1.4 +shared/lib/libvorbis.so.0.4.9 +shared/lib/libvorbisenc.so.2.0.12 +shared/lib/libwebp.so.7.1.10 +shared/lib/libx264.so.164 +shared/lib/libxvidcore.so.4.3 +shared/lib/libvpl.so.2.14 +shared/lib/libraw1394.so.11.1.0 +shared/lib/libavc1394.so.0.3.0 +shared/lib/librom1394.so.0.3.0 +shared/lib/libiec61883.so.0.1.1 +shared/lib/libjack.so.0.1.0 +shared/lib/libdrm.so.2.124.0 +shared/lib/libxcb.so.1.1.0 +shared/lib/libxcb-shm.so.0.0.0 +shared/lib/libxcb-shape.so.0.0.0 +shared/lib/libxcb-xfixes.so.0.0.0 +shared/lib/libasound.so.2.0.0 +shared/lib/libGL.so.1.7.0 +shared/lib/libpulse.so.0.24.3 +shared/lib/libv4l2.so.0.0.0 +shared/lib/libXv.so.1.0.0 +shared/lib/libX11.so.6.4.0 +shared/lib/libXext.so.6.4.0 +shared/lib/libpostproc.so.58.3.100 +shared/lib/libbs2b.so.0.0.0 +shared/lib/librubberband.so.3.0.0 +shared/lib/libharfbuzz.so.0.61101.0 +shared/lib/libfribidi.so.0.4.0 +shared/lib/libplacebo.so.349 +shared/lib/libvmaf.so.3.0.0 +shared/lib/libass.so.9.3.1 +shared/lib/libvidstab.so.1.2 +shared/lib/libzmq.so.5.2.5 +shared/lib/libzimg.so.2.0.0 +shared/lib/libglslang.so.15.2.0 +shared/lib/libOpenCL.so.1.0.0 +shared/lib/libfontconfig.so.1.15.0 +shared/lib/libfreetype.so.6.20.2 +shared/lib/libdvdnav.so.4.3.0 +shared/lib/libdvdread.so.8.0.0 +shared/lib/libxml2.so.2.13.5 +shared/lib/libbz2.so.1.0.8 +shared/lib/libmodplug.so.1.0.0 +shared/lib/libopenmpt.so.0.4.4 +shared/lib/libbluray.so.2.4.3 +shared/lib/libgmp.so.10.5.0 +shared/lib/libgnutls.so.30.40.3 +shared/lib/libsrt.so.1.5.4 +shared/lib/libssh.so.4.10.1 +shared/lib/libva-drm.so.2.2200.0 +shared/lib/libva-x11.so.2.2200.0 +shared/lib/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/libsharpyuv.so.0.1.1 +shared/lib/libdb-5.3.so +shared/lib/libXau.so.6.0.0 +shared/lib/libXdmcp.so.6.0.0 +shared/lib/pulseaudio/libpulsecommon-17.0.so +shared/lib/libv4lconvert.so.0.0.0 +shared/lib/libfftw3.so.3.6.10 +shared/lib/libsamplerate.so.0.2.2 +shared/lib/libgraphite2.so.3.2.1 +shared/lib/libunwind.so.8.1.0 +shared/lib/libshaderc_shared.so.1 +shared/lib/libglslang-default-resource-limits.so.15.2.0 +shared/lib/libvulkan.so.1.4.309 +shared/lib/liblcms2.so.2.0.17 +shared/lib/libdovi.so.3.3.1 +shared/lib/libunibreak.so.6.0.1 +shared/lib/libgomp.so.1.0.0 +shared/lib/libsodium.so.26.2.0 +shared/lib/libpgm-5.3.so.0.0.128 +shared/lib/libSPIRV-Tools-opt.so +shared/lib/libSPIRV-Tools.so +shared/lib/libexpat.so.1.10.2 +shared/lib/libmpg123.so.0.48.3 +shared/lib/libvorbisfile.so.3.3.8 +shared/lib/libleancrypto.so.1 +shared/lib/libp11-kit.so.0.4.1 +shared/lib/libidn2.so.0.4.0 +shared/lib/libunistring.so.5.2.0 +shared/lib/libtasn1.so.6.6.4 +shared/lib/libhogweed.so.6.10 +shared/lib/libnettle.so.8.10 +shared/lib/libXfixes.so.3.1.0 +shared/lib/libX11-xcb.so.1.0.0 +shared/lib/libxcb-dri3.so.0.1.0 +shared/lib/libsystemd.so.0.40.0 +shared/lib/libcurl.so.4.8.0 +shared/lib/libduktape.so.207.20700 +shared/lib/libgmodule-2.0.so.0.8400.1 +shared/lib/libmount.so.1.1.0 +shared/lib/libjpeg.so.8.3.2 +shared/lib/libtiff.so.6.1.0 +shared/lib/libpangoft2-1.0.so.0.5600.3 +shared/lib/libthai.so.0.3.1 +shared/lib/libsndfile.so.1.0.37 +shared/lib/libasyncns.so.0.3.1 +shared/lib/libnghttp3.so.9.2.6 +shared/lib/libnghttp2.so.14.28.4 +shared/lib/libssh2.so.1.0.1 +shared/lib/libpsl.so.5.3.5 +shared/lib/libblkid.so.1.1.0 +shared/lib/libjbig.so.2.1 +shared/lib/libdatrie.so.1.4.0 +shared/lib/libFLAC.so.14.0.0 +shared/lib/libSDL3.so.0.2.10 +share/vulkan/icd.d/intel_hasvk_icd.x86_64.json +shared/lib/libvulkan_intel_hasvk.so +shared/lib/libxcb-present.so.0.0.0 +shared/lib/libxcb-sync.so.1.0.0 +shared/lib/libxcb-randr.so.0.1.0 +shared/lib/libxshmfence.so.1.0.0 +shared/lib/libxcb-keysyms.so.1.0.0 +shared/lib/libwayland-client.so.0.23.1 +share/vulkan/icd.d/intel_icd.x86_64.json +shared/lib/libvulkan_intel.so +share/vulkan/icd.d/nouveau_icd.x86_64.json +shared/lib/libvulkan_nouveau.so +share/vulkan/icd.d/radeon_icd.x86_64.json +shared/lib/libvulkan_radeon.so +shared/lib/libLLVM.so.19.1 +shared/lib/libelf-0.192.so +shared/lib/libdrm_amdgpu.so.1.124.0 +shared/lib/libedit.so.0.0.75 +shared/lib/libncursesw.so.6.5 +bin/qt.conf +shared/lib/qt6/plugins/platforms/libqeglfs.so +shared/lib/qt6/plugins/platforms/libqlinuxfb.so +shared/lib/qt6/plugins/platforms/libqminimal.so +shared/lib/qt6/plugins/platforms/libqminimalegl.so +shared/lib/qt6/plugins/platforms/libqoffscreen.so +shared/lib/qt6/plugins/platforms/libqvkkhrdisplay.so +shared/lib/qt6/plugins/platforms/libqvnc.so +shared/lib/qt6/plugins/platforms/libqwayland-egl.so +shared/lib/qt6/plugins/platforms/libqwayland-generic.so +shared/lib/qt6/plugins/platforms/libqxcb.so +shared/lib/libQt6XcbQpa.so.6.9.0 +shared/lib/libxcb-cursor.so.0.0.0 +shared/lib/libxcb-icccm.so.4.0.0 +shared/lib/libxcb-image.so.0.0.0 +shared/lib/libxcb-render-util.so.0.0.0 +shared/lib/libxcb-xkb.so.1.0.0 +shared/lib/libSM.so.6.0.1 +shared/lib/libICE.so.6.3.0 +shared/lib/libxcb-xinput.so.0.1.0 +shared/lib/libxkbcommon-x11.so.0.8.1 +shared/lib/libxcb-util.so.1.0.0 +shared/lib/libuuid.so.1.3.0 +shared/lib/qt6/plugins/platformthemes/libqgtk3.so +shared/lib/qt6/plugins/platformthemes/libqt6ct.so +shared/lib/qt6/plugins/platformthemes/libqxdgdesktopportal.so +shared/lib/libqt6ct-common.so.0.10 +etc/fonts/fonts.conf +shared/lib/libXi.so.6.1.0 +shared/lib/libwayland-cursor.so.0.23.1 +shared/lib/libwayland-egl.so.1.23.1 +shared/lib/libXcursor.so.1.0.2 +shared/lib/libXrandr.so.2.2.0 +shared/lib/qt6/plugins/styles/libqt6ct-style.so +shared/lib/qt6/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so +shared/lib/qt6/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so +shared/lib/qt6/plugins/iconengines/libqsvgicon.so +shared/lib/qt6/plugins/imageformats/libqgif.so +shared/lib/qt6/plugins/imageformats/libqico.so +shared/lib/qt6/plugins/imageformats/libqjpeg.so +shared/lib/qt6/plugins/imageformats/libqsvg.so +shared/lib/libQt6Svg.so.6.9.0 +shared/lib/libXss.so.1.0.0 diff --git a/.ci/linux.sh b/.ci/linux.sh index e152c1b962..d5d316b26c 100755 --- a/.ci/linux.sh +++ b/.ci/linux.sh @@ -1,5 +1,26 @@ #!/bin/bash -ex +export ARCH="$(uname -m)" + +if [ "$ARCH" = 'x86_64' ]; then + if [ "$1" = 'v3' ]; then + echo "Making x86-64-v3 optimized build of eden" + ARCH="${ARCH}_v3" + ARCH_FLAGS="-march=x86-64-v3 -O3" + else + echo "Making x86-64 generic build of eden" + ARCH_FLAGS="-march=x86-64 -mtune=generic -O3" + fi +else + echo "Making aarch64 build of eden" + ARCH_FLAGS="-march=armv8-a -mtune=generic -O3" +fi + +NPROC="$2" +if [ -z "$NPROC" ]; then + NPROC="$(nproc)" +fi + if [ "$TARGET" = "appimage" ]; then # Compile the AppImage we distribute with Clang. export EXTRA_CMAKE_FLAGS=(-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=/etc/bin/ld.lld) @@ -22,9 +43,28 @@ cmake .. -G Ninja \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DENABLE_QT_TRANSLATION=ON \ -DUSE_DISCORD_PRESENCE=ON \ - -DYUZU_USE_BUNDLED_VCPKG=ON \ + -DUSE_CCACHE=ON \ + -DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \ + -DCMAKE_C_FLAGS="$ARCH_FLAGS" \ + -DYUZU_USE_BUNDLED_VCPKG=OFF \ + -DYUZU_USE_BUNDLED_QT=OFF \ + -DUSE_SYSTEM_QT=ON \ + -DYUZU_USE_BUNDLED_FFMPEG=OFF \ + -DYUZU_USE_BUNDLED_SDL2=ON \ + -DYUZU_USE_EXTERNAL_SDL2=OFF \ + -DYUZU_TESTS=OFF \ + -DYUZU_USE_LLVM_DEMANGLE=OFF \ + -DYUZU_USE_QT_MULTIMEDIA=OFF \ + -DYUZU_USE_QT_WEB_ENGINE=OFF \ + -DENABLE_QT_TRANSLATION=ON \ + -DUSE_DISCORD_PRESENCE=OFF \ + -DBUNDLE_SPEEX=ON \ + -DYUZU_USE_FASTER_LD=OFF \ + -DYUZU_ENABLE_LTO=ON \ "${EXTRA_CMAKE_FLAGS[@]}" -ninja + +ninja -j${NPROC} + if [ -d "bin/Release" ]; then strip -s bin/Release/* else @@ -37,4 +77,4 @@ else ccache -s -v fi -ctest -VV -C Release +#ctest -VV -C Release diff --git a/.ci/package-appimage.sh b/.ci/package-appimage.sh index 1a4f0bf775..240bde517a 100755 --- a/.ci/package-appimage.sh +++ b/.ci/package-appimage.sh @@ -1,120 +1,120 @@ -#!/bin/bash -ex +#!/bin/sh -GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')" -GITREV="$(git show -s --format='%h')" -ARTIFACTS_DIR="$PWD/artifacts" -mkdir -p "${ARTIFACTS_DIR}/" +# This script assumes you're in the source directory +set -ex -if [ "$1" == "master" ]; then - RELEASE_NAME="mainline" -else - RELEASE_NAME="$1" +export APPIMAGE_EXTRACT_AND_RUN=1 +export ARCH="$(uname -m)" + +LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin" +URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" + +if [ "$ARCH" = 'x86_64' ]; then + if [ "$1" = 'v3' ]; then + ARCH="${ARCH}_v3" + fi fi -BASE_NAME="eden-linux" -REV_NAME="${BASE_NAME}-${GITDATE}-${GITREV}" -ARCHIVE_NAME="${REV_NAME}.tar.xz" -COMPRESSION_FLAGS="-cJvf" +#if [ "$DEVEL" = 'true' ]; then +# YUZU_TAG="$(git rev-parse --short HEAD)" +# echo "Making nightly \"$YUZU_TAG\" build" +# VERSION="$YUZU_TAG" +#else +# YUZU_TAG=$(git describe --tags) +# echo "Making stable \"$YUZU_TAG\" build" +# git checkout "$YUZU_TAG" +# VERSION="$(echo "$YUZU_TAG" | awk -F'-' '{print $1}')" +#fi -if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then - DIR_NAME="${BASE_NAME}-${RELEASE_NAME}" -else - DIR_NAME="${REV_NAME}-${RELEASE_NAME}" -fi +# TODO: use real tags +YUZU_TAG="0.0.0" -mkdir -p "$DIR_NAME" +# NOW MAKE APPIMAGE +mkdir -p ./AppDir +cd ./AppDir - -cp LICENSE.txt "$DIR_NAME/" || echo "LICENSE.txt not found" -cp README.md "$DIR_NAME/" || echo "README.md not found" - -create_appimage() { - local binary_name="$1" - local display_name="$2" - local needs_qt="$3" - local app_dir="build/AppDir-${binary_name}" - local appimage_output="${binary_name}.AppImage" - - echo "Creating AppImage for ${binary_name}..." - - mkdir -p "${app_dir}/usr/bin" - mkdir -p "${app_dir}/usr/lib" - mkdir -p "${app_dir}/usr/share/applications" - mkdir -p "${app_dir}/usr/share/icons/hicolor/scalable/apps" - mkdir -p "${app_dir}/usr/optional/libstdc++" - mkdir -p "${app_dir}/usr/optional/libgcc_s" - - if [ -d "build/bin/Release" ]; then - cp "build/bin/Release/${binary_name}" "${app_dir}/usr/bin/" || echo "${binary_name} not found for AppDir" - else - cp "build/bin/${binary_name}" "${app_dir}/usr/bin/" || echo "${binary_name} not found for AppDir" - fi - - strip -s "${app_dir}/usr/bin/${binary_name}" - - cat > "${app_dir}/org.yuzu_emu.${binary_name}.desktop" << EOL +cat > org.eden_emu.eden.desktop << EOL [Desktop Entry] Type=Application -Name=${display_name} -Icon=org.yuzu_emu.${binary_name} -Exec=${binary_name} +Name=Eden +Icon=org.eden_emu.eden +Exec=eden Categories=Game;Emulator; EOL - - cp "${app_dir}/org.yuzu_emu.${binary_name}.desktop" "${app_dir}/usr/share/applications/" - - cp "dist/yuzu.svg" "${app_dir}/org.yuzu_emu.${binary_name}.svg" - cp "dist/yuzu.svg" "${app_dir}/usr/share/icons/hicolor/scalable/apps/org.yuzu_emu.${binary_name}.svg" - - cd build - wget -nc https://raw.githubusercontent.com/eden-emulator/ext-linux-bin/main/appimage/deploy-linux.sh || echo "Failed to download deploy script" - wget -nc https://raw.githubusercontent.com/eden-emulator/AppImageKit-checkrt/old/AppRun.sh || echo "Failed to download AppRun script" - wget -nc https://github.com/eden-emulator/ext-linux-bin/raw/main/appimage/exec-x86_64.so || echo "Failed to download exec wrapper" - chmod +x deploy-linux.sh - - cd .. - if [ "$needs_qt" = "true" ]; then - echo "Deploying with Qt dependencies for ${binary_name}..." - DEPLOY_QT=1 build/deploy-linux.sh "${app_dir}/usr/bin/${binary_name}" "${app_dir}" - else - echo "Deploying without Qt dependencies for ${binary_name}..." - build/deploy-linux.sh "${app_dir}/usr/bin/${binary_name}" "${app_dir}" - fi - - cp --dereference /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${app_dir}/usr/optional/libstdc++/libstdc++.so.6" || true - cp --dereference /lib/x86_64-linux-gnu/libgcc_s.so.1 "${app_dir}/usr/optional/libgcc_s/libgcc_s.so.1" || true - - cp build/exec-x86_64.so "${app_dir}/usr/optional/exec.so" || true - cp build/AppRun.sh "${app_dir}/AppRun" - chmod +x "${app_dir}/AppRun" - - find "${app_dir}" -type f -regex '.*libwayland-client\.so.*' -delete -print || true - - cd build - - if [ ! -f "appimagetool-x86_64.AppImage" ]; then - wget -nc https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage - chmod +x appimagetool-x86_64.AppImage - fi - - if ! ./appimagetool-x86_64.AppImage --version; then - echo "FUSE not available, using extract and run mode" - export APPIMAGE_EXTRACT_AND_RUN=1 - fi - - echo "Generating AppImage: ${appimage_output}" - ./appimagetool-x86_64.AppImage "AppDir-${binary_name}" "${appimage_output}" || echo "AppImage generation failed for ${binary_name}" - - cp "${appimage_output}" "../${DIR_NAME}/" || echo "AppImage not copied to DIR_NAME for ${binary_name}" - cp "${appimage_output}" "../${ARTIFACTS_DIR}/" || echo "AppImage not copied to artifacts for ${binary_name}" - cd .. -} -create_appimage "eden" "Eden" "true" -create_appimage "eden-cli" "Eden-CLI" "false" -create_appimage "eden-room" "Eden-Room" "false" +cp ../dist/eden.svg ./org.eden_emu.eden.svg -tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$DIR_NAME" -mv "$ARCHIVE_NAME" "${ARTIFACTS_DIR}/" +ln -sf ./org.eden_emu.eden.svg.svg ./.DirIcon -ls -la "${ARTIFACTS_DIR}/" \ No newline at end of file +if [ "$DEVEL" = 'true' ]; then + sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop + UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')" +fi + +# Bundle all libs +wget --retry-connrefused --tries=30 "$LIB4BN" -O ./lib4bin +chmod +x ./lib4bin +xvfb-run -a -- ./lib4bin -p -v -e -s -k \ + ../build/bin/eden* \ + /usr/lib/libGLX* \ + /usr/lib/libGL.so* \ + /usr/lib/libEGL* \ + /usr/lib/dri/* \ + /usr/lib/vdpau/* \ + /usr/lib/libvulkan* \ + /usr/lib/libXss.so* \ + /usr/lib/libdecor-0.so* \ + /usr/lib/libgamemode.so* \ + /usr/lib/qt6/plugins/audio/* \ + /usr/lib/qt6/plugins/bearer/* \ + /usr/lib/qt6/plugins/imageformats/* \ + /usr/lib/qt6/plugins/iconengines/* \ + /usr/lib/qt6/plugins/platforms/* \ + /usr/lib/qt6/plugins/platformthemes/* \ + /usr/lib/qt6/plugins/platforminputcontexts/* \ + /usr/lib/qt6/plugins/styles/* \ + /usr/lib/qt6/plugins/xcbglintegrations/* \ + /usr/lib/qt6/plugins/wayland-*/* \ + /usr/lib/pulseaudio/* \ + /usr/lib/pipewire-0.3/* \ + /usr/lib/spa-0.2/*/* \ + /usr/lib/alsa-lib/* + +# Prepare sharun +if [ "$ARCH" = 'aarch64' ]; then + # allow the host vulkan to be used for aarch64 given the sed situation + echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./.env +fi + +wget https://github.com/VHSgunzo/sharun/releases/download/v0.6.3/sharun-x86_64 -O sharun +chmod a+x sharun + +ln -f ./sharun ./AppRun +./sharun -g + +# turn appdir into appimage +cd .. +wget -q "$URUNTIME" -O ./uruntime +chmod +x ./uruntime + +#Add udpate info to runtime +echo "Adding update information \"$UPINFO\" to runtime..." +./uruntime --appimage-addupdinfo "$UPINFO" + +echo "Generating AppImage..." +./uruntime --appimage-mkdwarfs -f \ + --set-owner 0 --set-group 0 \ + --no-history --no-create-timestamp \ + --categorize=hotness --hotness-list=.ci/eden.dwfsprof \ + --compression zstd:level=22 -S26 -B32 \ + --header uruntime \ + -i ./AppDir -o Eden-"$VERSION"-"$ARCH".AppImage + +echo "Generating zsync file..." +zsyncmake *.AppImage -u *.AppImage +echo "All Done!" + +# Cleanup + +rm -rf AppDir +rm uruntime diff --git a/.ci/source.sh b/.ci/source.sh index 1928d7df99..cbdacd1cd7 100755 --- a/.ci/source.sh +++ b/.ci/source.sh @@ -1,5 +1,8 @@ #!/bin/bash -ex +# git-archive-all +export PATH="$PATH:/home/$USER/.local/bin" + GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`" GITREV="`git show -s --format='%h'`" REV_NAME="eden-unified-source-${GITDATE}-${GITREV}" @@ -8,11 +11,10 @@ COMPAT_LIST='dist/compatibility_list/compatibility_list.json' mkdir artifacts -pip3 install git-archive-all touch "${COMPAT_LIST}" git describe --abbrev=0 --always HEAD > GIT-COMMIT git describe --tags HEAD > GIT-TAG || echo 'unknown' > GIT-TAG -git archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar" +git-archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar" cd artifacts/ xz -T0 -9 "${REV_NAME}.tar" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd25eab10d..b67fa71119 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,18 @@ +# TODO: This document needs to be formatted, +# some stuff needs cleaned up etc name: eden-build on: push: - branches: [ "*" ] + branches: [ "master" ] tags: [ "*" ] - pull_request_target: + pull_request: branches: [ master ] jobs: source: if: ${{ !github.head_ref }} - runs-on: ubuntu-latest + runs-on: linux steps: - uses: actions/checkout@v4 with: @@ -18,12 +20,12 @@ jobs: - name: Pack run: ./.ci/source.sh - name: Upload - uses: actions/upload-artifact@v4 + uses: forgejo/upload-artifact@v4 with: - name: source + name: source.zip path: artifacts/ windows: - runs-on: windows-latest + runs-on: windows strategy: matrix: target: ["msvc"] # TODO: Add msys2 @@ -31,7 +33,7 @@ jobs: run: shell: ${{ (matrix.target == 'msys2' && 'msys2') || 'bash' }} {0} env: - CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_DIR: ${{ runner.workspace }}/.cache/.ccache CCACHE_COMPILERCHECK: content CCACHE_SLOPPINESS: time_macros OS: windows @@ -41,13 +43,7 @@ jobs: with: submodules: recursive fetch-depth: 0 - - name: Set up ccache - uses: actions/cache@v4 - with: - path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-${{ matrix.target }}-ccache-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ matrix.target }}-ccache- + - name: Set up vcpkg cache uses: actions/cache@v4 with: @@ -58,34 +54,39 @@ jobs: key: ${{ runner.os }}-${{ matrix.target }}-vcpkg-${{ hashFiles('**/CMakeLists.txt', '**/vcpkg.json') }}-${{ github.run_id }} restore-keys: | ${{ runner.os }}-${{ matrix.target }}-vcpkg- + - name: Set up MSVC - uses: ilammy/msvc-dev-cmd@v1 + uses: https://github.com/ilammy/msvc-dev-cmd@v1 if: ${{ matrix.target == 'msvc' }} - - name: Install extra tools - run: choco install ccache ninja wget cygwin - if: ${{ matrix.target == 'msvc' }} - - name: Install vulkan-SDK - run: ./.ci/install-vulkan-sdk.ps1 - shell: pwsh + +# - name: Install extra tools +# run: choco install ccache ninja wget cygwin +# if: ${{ matrix.target == 'msvc' }} + +# - name: Install vulkan-SDK +# run: ./.ci/install-vulkan-sdk.ps1 +# shell: powershell + - name: Cygwin with autoconf # NEEDED FOR LIBUSB shell: cmd run: | C:\tools\cygwin\cygwinsetup.exe -q -P autoconf,automake,libtool,make,pkg-config - + REM Create wrapper batch files for Cygwin tools in a directory that will be in PATH - mkdir C:\cygwin-wrappers - + REM mkdir C:\cygwin-wrappers + REM Create autoconf.bat wrapper echo @echo off > C:\cygwin-wrappers\autoconf.bat echo C:\tools\cygwin\bin\bash.exe -l -c "autoconf %%*" >> C:\cygwin-wrappers\autoconf.bat - + REM Add other wrappers if needed for other Cygwin tools echo @echo off > C:\cygwin-wrappers\automake.bat echo C:\tools\cygwin\bin\bash.exe -l -c "automake %%*" >> C:\cygwin-wrappers\automake.bat - + REM Add the wrappers directory to PATH echo C:\cygwin-wrappers>>"%GITHUB_PATH%" echo C:\tools\cygwin\bin>>"%GITHUB_PATH%" + - name: CMake Configure id: cmake shell: cmd @@ -93,166 +94,143 @@ jobs: mkdir build cd build cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_TOOLCHAIN_FILE="%CD%\..\CMakeModules\MSVCCache.cmake" -DYUZU_USE_BUNDLED_QT=ON -DENABLE_QT_TRANSLATION=ON -DUSE_DISCORD_PRESENCE=ON -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_USE_BUNDLED_SDL2=ON -DUSE_CCACHE=ON + - name: Build id: build shell: cmd run: | cd build ninja yuzu yuzu-cmd yuzu-room tests - ccache -s -v + ccache -s -v + - name: Package artifacts if: steps.build.outcome == 'success' - shell: pwsh + shell: powershell run: | $GITDATE = $(git show -s --date=short --format='%ad') -replace "-", "" $GITREV = $(git show -s --format='%h') $RELEASE_DIST = "eden-windows-msvc" $ARTIFACTS_DIR = "${{ github.workspace }}/artifacts" - + mkdir -p $ARTIFACTS_DIR mkdir -p $RELEASE_DIST mkdir -p pdb - + Copy-Item "build/bin/Release/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue if (-not $?) { # Try without Release subfolder if that doesn't exist Copy-Item "build/bin/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue } - + Get-ChildItem "build/bin/" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb -ErrorAction SilentlyContinue - + $BUILD_ZIP = "eden-windows-msvc-$GITDATE-$GITREV.zip" $BUILD_PDB = "eden-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" $BUILD_7Z = "eden-windows-msvc-$GITDATE-$GITREV.7z" - + 7z a -tzip $BUILD_ZIP $RELEASE_DIST\* - + if (Test-Path -Path ".\pdb\*.pdb") { 7z a -tzip $BUILD_PDB .\pdb\*.pdb Move-Item $BUILD_PDB $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue } - + 7z a $BUILD_7Z $RELEASE_DIST - + Move-Item $BUILD_ZIP $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue Move-Item $BUILD_7Z $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue - + Copy-Item "LICENSE*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue Copy-Item "README*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue + - name: Upload Windows artifacts if: steps.build.outcome == 'success' - uses: actions/upload-artifact@v4 + uses: forgejo/upload-artifact@v4 with: - name: ${{ matrix.target }} + name: ${{ matrix.target }}.zip path: artifacts/* linux: - runs-on: ubuntu-latest + runs-on: linux env: - CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_DIR: /home/runner/.cache/ccache CCACHE_COMPILERCHECK: content CCACHE_SLOPPINESS: time_macros OS: linux - TARGET: fresh - container: - image: icybriar/eden-build-environment:latest - options: -u 1001 + TARGET: fresh steps: - uses: actions/checkout@v4 with: submodules: recursive - fetch-depth: 0 - - name: Set up cache - uses: actions/cache@v4 - with: - path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-fresh-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-fresh- - - - name: Set up vcpkg cache - uses: actions/cache@v4 - with: - path: | - ${{ github.workspace }}/build/vcpkg_installed - ${{ github.workspace }}/build/externals - ${{ github.workspace }}/.vcpkg - key: ${{ runner.os }}-fresh-vcpkg-${{ hashFiles('**/CMakeLists.txt', '**/vcpkg.json') }}-${{ github.run_id }} - restore-keys: | - ${{ runner.os }}-fresh-vcpkg- + fetch-depth: 1 + fetch-tags: true - name: Build - run: ./.ci/linux.sh - - - name: Package AppImages run: | - ./.ci/package-appimage.sh "${{ github.ref_name }}" - + ./.ci/linux.sh v3 4 + + - name: Package AppImage + run: | + ./.ci/package-appimage.sh v3 + - name: Upload Linux artifacts - uses: actions/upload-artifact@v4 + uses: forgejo/upload-artifact@v4 with: - name: linux - path: artifacts/* + name: linux.zip + path: ./*.AppImage + android: - runs-on: ubuntu-latest + runs-on: android + env: - CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_DIR: /home/runner/.cache/ccache CCACHE_COMPILERCHECK: content CCACHE_SLOPPINESS: time_macros OS: android TARGET: universal + steps: - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - - name: Set up cache - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-android-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-android- + - name: Set tag name run: | if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV fi echo $GIT_TAG_NAME + - name: Deps run: | sudo apt-get update -y sudo apt-get install ccache glslang-dev glslang-tools apksigner -y + - name: Build run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android.sh - env: - ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }} - ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} - ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} + - name: Package Android artifacts run: | GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')" GITREV="$(git show -s --format='%h')" ARTIFACTS_DIR="$PWD/artifacts" mkdir -p "${ARTIFACTS_DIR}/" - + REV_NAME="eden-android-${GITDATE}-${GITREV}" BUILD_FLAVOR="mainline" BUILD_TYPE_LOWER="release" BUILD_TYPE_UPPER="Release" - + cp src/android/app/build/outputs/apk/"${BUILD_FLAVOR}/${BUILD_TYPE_LOWER}/app-${BUILD_FLAVOR}-${BUILD_TYPE_LOWER}.apk" \ "${ARTIFACTS_DIR}/${REV_NAME}.apk" || echo "APK not found" - + cp src/android/app/build/outputs/bundle/"${BUILD_FLAVOR}${BUILD_TYPE_UPPER}"/"app-${BUILD_FLAVOR}-${BUILD_TYPE_LOWER}.aab" \ "${ARTIFACTS_DIR}/${REV_NAME}.aab" || echo "AAB not found" - + ls -la "${ARTIFACTS_DIR}/" - + - name: Upload Android artifacts - uses: actions/upload-artifact@v4 + uses: forgejo/upload-artifact@v4 with: - name: android + name: android.zip path: artifacts/* diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml index 843b7c833d..e07be810dd 100644 --- a/.github/workflows/license-header.yml +++ b/.github/workflows/license-header.yml @@ -6,17 +6,17 @@ on: jobs: license-header: - runs-on: ubuntu-latest - container: - image: opensauce04/lime3ds-build:latest - options: -u 1001 + runs-on: linux steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Fetch master branch run: git fetch origin master:master + - name: Make script executable run: chmod +x ./.ci/license-header.rb + - name: Check license headers run: ./.ci/license-header.rb diff --git a/.reuse/dep5 b/.reuse/dep5 index b9ae96d0b1..79ea95781d 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -12,11 +12,11 @@ Files: dist/english_plurals/* Copyright: yuzu Emulator Project License: GPL-2.0-or-later -Files: dist/qt_themes/default/icons/256x256/yuzu.png +Files: dist/qt_themes/default/icons/256x256/eden.png dist/yuzu.bmp dist/yuzu.icns - dist/yuzu.ico - dist/yuzu.svg + dist/eden.ico + dist/eden.svg Copyright: yuzu Emulator Project License: GPL-2.0-or-later diff --git a/CMakeLists.txt b/CMakeLists.txt index 04e315ad99..b88ab64e53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,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 find_package(enet 1.3 MODULE) -find_package(fmt 11 REQUIRED) +find_package(fmt 10 REQUIRED) find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle) find_package(lz4 REQUIRED) find_package(nlohmann_json 3.8 REQUIRED) @@ -643,9 +643,9 @@ endif() if(ENABLE_QT AND UNIX AND NOT APPLE) install(FILES "dist/org.yuzu_emu.yuzu.desktop" DESTINATION "share/applications") - install(FILES "dist/yuzu.svg" + install(FILES "dist/eden.svg" DESTINATION "share/icons/hicolor/scalable/apps" - RENAME "org.yuzu_emu.yuzu.svg") + RENAME "org.yuzu_emu.eden.svg") install(FILES "dist/org.yuzu_emu.yuzu.xml" DESTINATION "share/mime/packages") install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml" diff --git a/README.md b/README.md index 826b885146..f52b564568 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@