From 60b7a4640e475bfe4a9846bb3f7bece4680f3111 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Fri, 10 Oct 2025 18:22:47 +0200 Subject: [PATCH] fix(1.105): move new feat/fixes to stable [skip ci] --- .github/workflows/stable-spearhead.yml | 7 +++ stores/snapcraft/insider/snap/snapcraft.yaml | 2 +- .../stable/snap/local/bin/electron-launch | 46 ++++++++++++------- stores/snapcraft/stable/snap/snapcraft.yaml | 9 ---- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/.github/workflows/stable-spearhead.yml b/.github/workflows/stable-spearhead.yml index 8ebd8f7..83dd3d2 100644 --- a/.github/workflows/stable-spearhead.yml +++ b/.github/workflows/stable-spearhead.yml @@ -71,6 +71,13 @@ jobs: run: ./prepare_src.sh if: env.SHOULD_BUILD == 'yes' + - name: Upload sourcemaps + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./upload_sourcemaps.sh + if: env.SHOULD_BUILD == 'yes' + - name: Release source env: GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} diff --git a/stores/snapcraft/insider/snap/snapcraft.yaml b/stores/snapcraft/insider/snap/snapcraft.yaml index 82b2837..86bdf29 100644 --- a/stores/snapcraft/insider/snap/snapcraft.yaml +++ b/stores/snapcraft/insider/snap/snapcraft.yaml @@ -96,7 +96,7 @@ parts: apps: codium: command: electron-launch $SNAP/usr/share/codium-insiders/bin/codium-insiders --no-sandbox - desktop: usr/share/applications/codium-insiders.desktop + common-id: codium-insiders.desktop url-handler: command: electron-launch $SNAP/usr/share/codium-insiders/bin/codium-insiders --open-url --no-sandbox diff --git a/stores/snapcraft/stable/snap/local/bin/electron-launch b/stores/snapcraft/stable/snap/local/bin/electron-launch index 674d2e0..ba7f293 100755 --- a/stores/snapcraft/stable/snap/local/bin/electron-launch +++ b/stores/snapcraft/stable/snap/local/bin/electron-launch @@ -109,7 +109,6 @@ copy_env_variable GDK_BACKEND copy_env_variable GTK_PATH copy_env_variable GTK_EXE_PREFIX copy_env_variable GTK_IM_MODULE_FILE -copy_env_variable LIBGL_DRIVERS_PATH # XDG Config prepend_dir XDG_CONFIG_DIRS "$SNAP/etc/xdg" @@ -121,16 +120,12 @@ prepend_dir XDG_DATA_DIRS "$SNAP/data-dir" prepend_dir XDG_DATA_DIRS "$SNAP_USER_DATA" # Set XDG_DATA_HOME to local path -ensure_dir_exists "$SNAP_USER_DATA/.local/share" +export XDG_DATA_HOME="$SNAP_USER_DATA/.local/share" +ensure_dir_exists "$XDG_DATA_HOME" # Workaround for GLib < 2.53.2 not searching for schemas in $XDG_DATA_HOME: # https://bugzilla.gnome.org/show_bug.cgi?id=741335 -prepend_dir XDG_DATA_DIRS "$SNAP_USER_DATA/.local/share" - -# Use the snap MESA drivers to launch the snap. -# This is required by wayland, but electron will make better use under X11 too -prepend_dir LIBGL_DRIVERS_PATH "$SNAP/usr/lib/dri" -prepend_dir LIBGL_DRIVERS_PATH "$SNAP/usr/lib/$ARCH/dri" +prepend_dir XDG_DATA_DIRS "$XDG_DATA_HOME" # Set cache folder to local path if [[ -d "$SNAP_USER_DATA/.cache" && ! -e "$SNAP_USER_COMMON/.cache" ]]; then @@ -158,28 +153,45 @@ if [[ -n "$XDG_RUNTIME_DIR" && -z "$DISABLE_WAYLAND" ]] && \ if [ -n "$WAYLAND_DISPLAY" ]; then wdisplay="$WAYLAND_DISPLAY" fi + wayland_sockpath="$XDG_RUNTIME_DIR/../$wdisplay" wayland_snappath="$XDG_RUNTIME_DIR/$wdisplay" - if [ -S "$wayland_snappath" ]; then + if [ -S "$wayland_sockpath" ]; then # if running under wayland, use it #export WAYLAND_DEBUG=1 # shellcheck disable=SC2034 wayland_available=true + # create the compat symlink for now + if [ ! -e "$wayland_snappath" ]; then + ln -s "$wayland_sockpath" "$wayland_snappath" + fi fi fi # Keep an array of data dirs, for looping through them IFS=':' read -r -a data_dirs_array <<< "$XDG_DATA_DIRS" -# Build mime.cache -# needed for gtk and qt icon +# Font Config +export FONTCONFIG_PATH="/etc/fonts" +export FONTCONFIG_FILE="/etc/fonts/fonts.conf" + +if [ "$needs_update" = true ]; then + rm -rf "$XDG_DATA_HOME"/fonts + + if [ -d "$SNAP_REAL_HOME/.local/share/fonts" ]; then + ln -s "$SNAP_REAL_HOME/.local/share/fonts" "$XDG_DATA_HOME/fonts" + fi +fi + +# Build mime.cache needed for gtk and qt icon +# @TODO: Re-enable this once we move to core22 if [ "$needs_update" = true ]; then rm -rf "$SNAP_USER_DATA/.local/share/mime" - if [ ! -f "$SNAP/usr/share/mime/mime.cache" ]; then - if command -v update-mime-database >/dev/null; then - cp --preserve=timestamps -dR "$SNAP/usr/share/mime" "$SNAP_USER_DATA/.local/share" - async_exec update-mime-database "$SNAP_USER_DATA/.local/share/mime" - fi - fi + # if [ ! -f "$SNAP/usr/share/mime/mime.cache" ]; then + # if command -v update-mime-database >/dev/null; then + # cp --preserve=timestamps -dR "$SNAP/usr/share/mime" "$SNAP_USER_DATA/.local/share" + # async_exec update-mime-database "$SNAP_USER_DATA/.local/share/mime" + # fi + # fi fi # Gio modules and cache (including gsettings module) diff --git a/stores/snapcraft/stable/snap/snapcraft.yaml b/stores/snapcraft/stable/snap/snapcraft.yaml index 54bdf30..15a0fb3 100644 --- a/stores/snapcraft/stable/snap/snapcraft.yaml +++ b/stores/snapcraft/stable/snap/snapcraft.yaml @@ -59,7 +59,6 @@ parts: - libnss3 - libpango-1.0-0 - libsecret-1-0 - - libvulkan1 - libwayland-egl1 - libxcomposite1 - libxdamage1 @@ -70,20 +69,14 @@ parts: - libxss1 - locales-all - packagekit-gtk3-module - - gnome-settings-daemon-common - xdg-utils prime: - - -lib/udev - - -usr/lib/systemd - -usr/share/doc - -usr/share/fonts - -usr/share/icons - -usr/share/lintian - -usr/share/man - -usr/share/codium/chrome-sandbox - - -usr/share/@@NAME@@/libEGL.so* - - -usr/share/@@NAME@@/libGLESv2.so* - - -usr/share/@@NAME@@/libvulkan.so* build-attributes: - enable-patchelf override-prime: | @@ -103,9 +96,7 @@ parts: apps: codium: command: electron-launch $SNAP/usr/share/codium/bin/codium --no-sandbox - desktop: usr/share/applications/codium.desktop common-id: codium.desktop url-handler: command: electron-launch $SNAP/usr/share/codium/bin/codium --open-url --no-sandbox - desktop: usr/share/applications/codium-url-handler.desktop