summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD23
-rw-r--r--startup_script.patch23
-rw-r--r--visual-studio-code-oss.desktop4
4 files changed, 46 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0f1032e7b6e7..5f1416d469cf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu Apr 6 16:27:08 UTC 2017
+# Tue Apr 11 18:02:17 UTC 2017
pkgbase = visual-studio-code-oss
pkgdesc = Visual Studio Code for Linux, Open Source version
pkgver = 1.11.1
- pkgrel = 1
+ pkgrel = 2
url = https://code.visualstudio.com/
install = visual-studio-code-oss.nonfree.install
arch = i686
@@ -27,10 +27,12 @@ pkgbase = visual-studio-code-oss
provides = vscode-oss
conflicts = vscode-oss
source = vscode::git+https://github.com/Microsoft/vscode#commit=d9484d12b38879b7f4cdd1150efeb2fd2c1fbf39
+ source = startup_script.patch
source = visual-studio-code-oss.desktop
source = product_json.patch
sha256sums = SKIP
- sha256sums = 2ce2c6033667092c5e854036b676533fd433e9daf9ac8ce0f00606193420e72d
+ sha256sums = 8b2feded3382e5bf6b5b292c14083bfc536c05cd00f3235dd22b75b67fba134d
+ sha256sums = f853d7d998251223b0516928a2189e1e68a312bd732f18dc8d59892659beeae9
sha256sums = e90f9d69bd42c0d9fc5f081d3bf7ca307df53e3553efadf00d62ced66b1bb070
pkgname = visual-studio-code-oss
diff --git a/PKGBUILD b/PKGBUILD
index 43ecf9712e28..5776dc0e2de7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
pkgname=visual-studio-code-oss
pkgdesc='Visual Studio Code for Linux, Open Source version'
pkgver=1.11.1
-pkgrel=1
+pkgrel=2
_commit=d9484d12b38879b7f4cdd1150efeb2fd2c1fbf39
arch=('i686' 'x86_64' 'armv7h')
url='https://code.visualstudio.com/'
@@ -21,9 +21,11 @@ conflicts=('vscode-oss')
provides=('vscode-oss')
source=("vscode::git+https://github.com/Microsoft/vscode#commit=${_commit}"
+ "startup_script.patch"
"${pkgname}.desktop")
sha256sums=('SKIP'
- '2ce2c6033667092c5e854036b676533fd433e9daf9ac8ce0f00606193420e72d')
+ '8b2feded3382e5bf6b5b292c14083bfc536c05cd00f3235dd22b75b67fba134d'
+ 'f853d7d998251223b0516928a2189e1e68a312bd732f18dc8d59892659beeae9')
if (( VSCODE_NONFREE )); then
source+=('product_json.patch')
@@ -69,15 +71,22 @@ build() {
# change it if this number still doesn't work for your system.
#mem_limit="--max_old_space_size=2048"
node $mem_limit /usr/bin/gulp vscode-linux-${_vscode_arch}
+
+ # Patch the startup script to know where the app is installed, rather
+ # than guessing...
+ ( cd "${srcdir}/VSCode-linux-${_vscode_arch}" && \
+ patch -p1 -i "${srcdir}/startup_script.patch" )
}
package() {
- install -m 0755 -d "${pkgdir}/opt/VSCode-OSS"
- cp -r "${srcdir}/VSCode-linux-${_vscode_arch}"/* "${pkgdir}/opt/VSCode-OSS"
+ install -m 0755 -d "${pkgdir}/usr/share/code-oss"
+ cp -r "${srcdir}/VSCode-linux-${_vscode_arch}"/* "${pkgdir}/usr/share/code-oss"
+
+ # Put the startup script in /usr/bin
+ mv "${pkgdir}/usr/share/code-oss/bin" "${pkgdir}/usr"
- # Include symlink in system bin directory
- install -m 0755 -d "${pkgdir}/usr/bin"
- ln -s '/opt/VSCode-OSS/bin/code-oss' "${pkgdir}/usr/bin/${pkgname}"
+ # Add symlink to the name we provided in older versions of this package
+ ln -s code-oss "${pkgdir}/usr/bin/${pkgname}"
# Add .desktop file
install -D -m644 "${srcdir}/${pkgname}.desktop" \
diff --git a/startup_script.patch b/startup_script.patch
new file mode 100644
index 000000000000..a88aee3b27c6
--- /dev/null
+++ b/startup_script.patch
@@ -0,0 +1,23 @@
+diff -rupN a/bin/code-oss b/bin/code-oss
+--- a/bin/code-oss 2017-04-10 14:45:30.501186879 -0700
++++ b/bin/code-oss 2017-04-11 09:02:09.934505159 -0700
+@@ -17,18 +17,7 @@ if [ "$(id -u)" = "0" ]; then
+ fi
+ fi
+
+-if [ ! -L $0 ]; then
+- # if path is not a symlink, find relatively
+- VSCODE_PATH="$(dirname $0)/.."
+-else
+- if which readlink >/dev/null; then
+- # if readlink exists, follow the symlink and find relatively
+- VSCODE_PATH="$(dirname $(readlink -f $0))/.."
+- else
+- # else use the standard install location
+- VSCODE_PATH="/usr/share/code-oss"
+- fi
+-fi
++VSCODE_PATH="/usr/share/code-oss"
+
+ ELECTRON="$VSCODE_PATH/code-oss"
+ CLI="$VSCODE_PATH/resources/app/out/cli.js"
diff --git a/visual-studio-code-oss.desktop b/visual-studio-code-oss.desktop
index df090409ea06..76dd9c926c80 100644
--- a/visual-studio-code-oss.desktop
+++ b/visual-studio-code-oss.desktop
@@ -3,7 +3,7 @@ Encoding=UTF-8
Name=Visual Studio Code (Open Source)
Comment=Source code editor and debugger for modern web and cloud applications
Version=1.0
-Exec="/opt/VSCode-OSS/bin/code-oss" %F
-Icon=/opt/VSCode-OSS/resources/app/resources/linux/code.png
+Exec="/usr/bin/code-oss" %F
+Icon=/usr/share/code-oss/resources/app/resources/linux/code.png
Type=Application
Categories=Development;