Skip to content

Commit

Permalink
[visual-studio-code-bin] URI handler support
Browse files Browse the repository at this point in the history
  • Loading branch information
dcelasun committed Dec 14, 2018
1 parent 600f2ff commit 2f7c2e1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
12 changes: 8 additions & 4 deletions visual-studio-code-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
# Wed Dec 12 21:35:37 UTC 2018
# Fri Dec 14 16:44:01 UTC 2018
pkgbase = visual-studio-code-bin
pkgdesc = Visual Studio Code (vscode): Editor for building and debugging modern web and cloud applications (official binary version)
pkgver = 1.30.0
pkgrel = 1
pkgrel = 2
url = https://code.visualstudio.com/
arch = x86_64
arch = i686
Expand All @@ -27,12 +27,16 @@ pkgbase = visual-studio-code-bin
conflicts = code
source_x86_64 = code_x64_1.30.0.tar.gz::https://vscode-update.azurewebsites.net/1.30.0/linux-x64/stable
source_x86_64 = visual-studio-code.desktop
source_x86_64 = visual-studio-code-url-handler.desktop
sha256sums_x86_64 = 818ab50bd1e1d0c93ca2cbb21d3bd8697563fd7399049de79ebd040c9cf376fd
sha256sums_x86_64 = 488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212
sha256sums_x86_64 = 2072dcb0d7e54ea5c2221ca95c0da517186ad4e39e2a20243adb0ec583265a41
sha256sums_x86_64 = 727adaf263801462744c65bc0fad1b64ab31b3c96ed1a11e5b61bffbd5d71bc7
source_i686 = code_ia32_1.30.0.tar.gz::https://vscode-update.azurewebsites.net/1.30.0/linux-ia32/stable
source_i686 = visual-studio-code.desktop
source_i686 = visual-studio-code-url-handler.desktop
sha256sums_i686 = 414a02532374e219b990255a14eee06ec4467ef58b148f7586cbee636c93a22d
sha256sums_i686 = 488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212
sha256sums_i686 = 2072dcb0d7e54ea5c2221ca95c0da517186ad4e39e2a20243adb0ec583265a41
sha256sums_i686 = 727adaf263801462744c65bc0fad1b64ab31b3c96ed1a11e5b61bffbd5d71bc7

pkgname = visual-studio-code-bin

13 changes: 8 additions & 5 deletions visual-studio-code-bin/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgname=visual-studio-code-bin
_pkgname=visual-studio-code
pkgver=1.30.0
pkgrel=1
pkgrel=2
pkgdesc="Visual Studio Code (vscode): Editor for building and debugging modern web and cloud applications (official binary version)"
arch=('x86_64' 'i686')
url="https://code.visualstudio.com/"
Expand All @@ -14,15 +14,17 @@ depends=(fontconfig libxtst gtk3 python cairo alsa-lib nss gcc-libs libnotify li
optdepends=('gvfs: Needed for move to trash functionality'
'libdbusmenu-glib: Needed for KDE global menu')
source_x86_64=(code_x64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/${pkgver}/linux-x64/stable
${_pkgname}.desktop
${_pkgname}.desktop ${_pkgname}-url-handler.desktop
)
source_i686=(code_ia32_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/${pkgver}/linux-ia32/stable
${_pkgname}.desktop
${_pkgname}.desktop ${_pkgname}-url-handler.desktop
)
sha256sums_x86_64=('818ab50bd1e1d0c93ca2cbb21d3bd8697563fd7399049de79ebd040c9cf376fd'
'488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212')
'2072dcb0d7e54ea5c2221ca95c0da517186ad4e39e2a20243adb0ec583265a41'
'727adaf263801462744c65bc0fad1b64ab31b3c96ed1a11e5b61bffbd5d71bc7')
sha256sums_i686=('414a02532374e219b990255a14eee06ec4467ef58b148f7586cbee636c93a22d'
'488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212')
'2072dcb0d7e54ea5c2221ca95c0da517186ad4e39e2a20243adb0ec583265a41'
'727adaf263801462744c65bc0fad1b64ab31b3c96ed1a11e5b61bffbd5d71bc7')
package() {
_pkg=VSCode-linux-x64
if [ "${CARCH}" = "i686" ]; then
Expand All @@ -38,6 +40,7 @@ package() {
install -m644 "${srcdir}/${_pkg}/resources/app/LICENSE.txt" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
install -m644 "${srcdir}/${_pkg}/resources/app/resources/linux/code.png" "${pkgdir}/usr/share/icons/${_pkgname}.png"
install -m644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
install -m644 "${srcdir}/${_pkgname}-url-handler.desktop" "${pkgdir}/usr/share/applications/${_pkgname}-url-handler.desktop"

cp -r "${srcdir}/${_pkg}/"* "${pkgdir}/opt/${_pkgname}" -R
ln -s /opt/${_pkgname}/bin/code "${pkgdir}"/usr/bin/code
Expand Down
12 changes: 12 additions & 0 deletions visual-studio-code-bin/visual-studio-code-url-handler.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Name=Visual Studio Code - URL Handler
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/opt/visual-studio-code/code --open-url %U
Icon=visual-studio-code
Type=Application
NoDisplay=true
StartupNotify=true
Categories=Development;WebDevelopment;IDE;Utility;TextEditor;
MimeType=x-scheme-handler/vscode
Keywords=vscode;
1 change: 0 additions & 1 deletion visual-studio-code-bin/visual-studio-code.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Comment=Editor for building and debugging modern web and cloud applications
Categories=Development;WebDevelopment;IDE;Utility;TextEditor;
MimeType=text/plain;inode/directory;
StartupNotify=true
StartupWMClass=code

0 comments on commit 2f7c2e1

Please sign in to comment.