Merge from vscode 966b87dd4013be1a9c06e2b8334522ec61905cc2 (#4696)

This commit is contained in:
Anthony Dresser
2019-03-26 11:43:38 -07:00
committed by GitHub
parent b1393ae615
commit 0d8ef9583b
268 changed files with 5947 additions and 3422 deletions

View File

@@ -1,3 +1,34 @@
#!/bin/sh
#!/usr/bin/env bash
exec "$@" --executed-from="$(pwd)" --pid=$$
# On Fedora $SNAP is under /var and there is some magic to map it to /snap.
# We need to handle that case and reset $SNAP
SNAP=$(echo $SNAP | sed -e "s|/var/lib/snapd||g")
if [ "$SNAP_ARCH" == "amd64" ]; then
ARCH="x86_64-linux-gnu"
elif [ "$SNAP_ARCH" == "armhf" ]; then
ARCH="arm-linux-gnueabihf"
elif [ "$SNAP_ARCH" == "arm64" ]; then
ARCH="aarch64-linux-gnu"
else
ARCH="$SNAP_ARCH-linux-gnu"
fi
export XDG_CACHE_HOME=$SNAP_USER_COMMON/.cache
if [[ -d $SNAP_USER_DATA/.cache && ! -e $XDG_CACHE_HOME ]]; then
# the .cache directory used to be stored under $SNAP_USER_DATA, migrate it
mv $SNAP_USER_DATA/.cache $SNAP_USER_COMMON/
fi
mkdir -p $XDG_CACHE_HOME
# Gdk-pixbuf loaders
export GDK_PIXBUF_MODULE_FILE=$XDG_CACHE_HOME/gdk-pixbuf-loaders.cache
export GDK_PIXBUF_MODULEDIR=$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders
if [ -f $SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders ]; then
$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders > $GDK_PIXBUF_MODULE_FILE
fi
# Create $XDG_RUNTIME_DIR if not exists (to be removed when https://pad.lv/1656340 is fixed)
[ -n "$XDG_RUNTIME_DIR" ] && mkdir -p $XDG_RUNTIME_DIR -m 700
exec "$@"

View File

@@ -10,33 +10,54 @@ grade: stable
confinement: classic
parts:
gnome:
plugin: nil
build-packages:
- software-properties-common
override-pull: |
add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
apt -y update
code:
after:
- gnome
plugin: dump
source: .
stage-packages:
- fcitx-frontend-gtk3
- gvfs-libs
- libasound2
- libc++1
- libgconf-2-4
- libglib2.0-bin
- libgnome-keyring0
- libgtk-3-0
- libnotify4
- libnspr4
- libnss3
- libpcre3
- libpulse0
- libsecret-1-0
- libxss1
- libxtst6
# desktop-gtk2 deps below
- libxkbcommon0
- libgtk2.0-0
# - unity-gtk2-module
- libappindicator1
- zlib1g
prime:
- -usr/share/dh-python
electron-launch:
plugin: dump
source: .
organize:
electron-launch: bin/electron-launch
- -usr/share/doc
- -usr/share/fonts
- -usr/share/icons
- -usr/share/lintian
- -usr/share/man
apps:
@@NAME@@:
command: bin/electron-launch ${SNAP}/usr/share/@@NAME@@/bin/@@NAME@@
desktop: usr/share/applications/@@NAME@@.desktop
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@
desktop: usr/share/applications/@@NAME@@.desktop
environment:
DISABLE_WAYLAND: 1
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
url-handler:
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url
desktop: usr/share/applications/@@NAME@@-url-handler.desktop
environment:
DISABLE_WAYLAND: 1
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas