From 7ab8a18a02e8948330cf9a103f90cffbcefbd783 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 5 Aug 2016 12:26:26 +0200 Subject: [PATCH] propagate product.urlProtocol --- build/gulpfile.vscode.js | 2 +- src/vs/platform/product.ts | 1 + src/vs/platform/url/electron-main/urlService.ts | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index ae2399c2d7b..9c6d5668aaa 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -111,7 +111,7 @@ const config = { darwinBundleURLTypes: [{ role: 'Viewer', name: product.nameLong, - urlSchemes: ['vscode'] + urlSchemes: [product.urlProtocol] }], darwinCredits: darwinCreditsTemplate ? new Buffer(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : void 0, linuxExecutableName: product.applicationName, diff --git a/src/vs/platform/product.ts b/src/vs/platform/product.ts index 57a7e510e83..720faaaad87 100644 --- a/src/vs/platform/product.ts +++ b/src/vs/platform/product.ts @@ -13,6 +13,7 @@ export interface IProductConfiguration { win32AppUserModelId: string; win32MutexName: string; darwinBundleIdentifier: string; + urlProtocol: string; dataFolderName: string; downloadUrl: string; updateUrl?: string; diff --git a/src/vs/platform/url/electron-main/urlService.ts b/src/vs/platform/url/electron-main/urlService.ts index 089843cc660..710c7bc4e1d 100644 --- a/src/vs/platform/url/electron-main/urlService.ts +++ b/src/vs/platform/url/electron-main/urlService.ts @@ -8,6 +8,7 @@ import Event, {mapEvent} from 'vs/base/common/event'; import {fromEventEmitter} from 'vs/base/node/event'; import {IURLService} from 'vs/platform/url/common/url'; +import product from 'vs/platform/product'; import {app} from 'electron'; export class URLService implements IURLService { @@ -24,6 +25,6 @@ export class URLService implements IURLService { return url; }); - // app.setAsDefaultProtocolClient('vscode'); + app.setAsDefaultProtocolClient(product.urlProtocol); } } \ No newline at end of file -- GitLab