瀏覽代碼

fix: update patches & install optional dependencies (#1115)

Baptiste Augrain 3 年之前
父節點
當前提交
bbaaed2ec1
共有 3 個文件被更改,包括 12 次插入12 次删除
  1. 6 6
      patches/binary-name.patch
  2. 4 4
      patches/custom-gallery.patch
  3. 2 2
      prepare_vscode.sh

+ 6 - 6
patches/binary-name.patch

@@ -1,21 +1,21 @@
 diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
 diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
-index 2f5a931..ac3d7e6 100644
+index 2686509..4fedec2 100644
 --- a/build/gulpfile.vscode.js
 --- a/build/gulpfile.vscode.js
 +++ b/build/gulpfile.vscode.js
 +++ b/build/gulpfile.vscode.js
-@@ -290,7 +290,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
- 			all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
+@@ -289,7 +289,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
  		} else if (platform === 'darwin') {
  		} else if (platform === 'darwin') {
  			const shortcut = gulp.src('resources/darwin/bin/code.sh')
  			const shortcut = gulp.src('resources/darwin/bin/code.sh')
+ 				.pipe(replace('@@APPNAME@@', product.applicationName))
 -				.pipe(rename('bin/code'));
 -				.pipe(rename('bin/code'));
 +				.pipe(rename('bin/' + product.applicationName));
 +				.pipe(rename('bin/' + product.applicationName));
  
  
  			all = es.merge(all, shortcut);
  			all = es.merge(all, shortcut);
  		}
  		}
 diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
 diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
-index 3bd0c57..d921c60 100644
+index f7bd477..a489ae4 100644
 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
 +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
 +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
-@@ -353,7 +353,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
+@@ -351,7 +351,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
  	}
  	}
  
  
  	private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> {
  	private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> {
@@ -24,7 +24,7 @@ index 3bd0c57..d921c60 100644
  		const source = `/usr/local/bin/${this.productService.applicationName}`;
  		const source = `/usr/local/bin/${this.productService.applicationName}`;
  
  
  		// Ensure source exists
  		// Ensure source exists
-@@ -563,7 +563,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
+@@ -545,7 +545,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
  
  
  		// macOS
  		// macOS
  		if (this.environmentMainService.isBuilt) {
  		if (this.environmentMainService.isBuilt) {

+ 4 - 4
patches/custom-gallery.patch

@@ -1,17 +1,17 @@
 diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
 diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
-index 1edc76f..4c0bf98 100644
+index f822373..30a0a66 100644
 --- a/src/vs/base/common/product.ts
 --- a/src/vs/base/common/product.ts
 +++ b/src/vs/base/common/product.ts
 +++ b/src/vs/base/common/product.ts
-@@ -69,6 +69,7 @@ export interface IProductConfiguration {
+@@ -70,6 +70,7 @@ export interface IProductConfiguration {
  
  
  	readonly extensionsGallery?: {
  	readonly extensionsGallery?: {
  		readonly serviceUrl: string;
  		readonly serviceUrl: string;
 +		readonly cacheUrl?: string;
 +		readonly cacheUrl?: string;
  		readonly itemUrl: string;
  		readonly itemUrl: string;
+ 		readonly publisherUrl: string;
  		readonly resourceUrlTemplate: string;
  		readonly resourceUrlTemplate: string;
- 		readonly controlUrl: string;
 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
-index e22b33e..98cec93 100644
+index 7e63a16..3bfeab8 100644
 --- a/src/vs/platform/product/common/product.ts
 --- a/src/vs/platform/product/common/product.ts
 +++ b/src/vs/platform/product/common/product.ts
 +++ b/src/vs/platform/product/common/product.ts
 @@ -4,11 +4,12 @@
 @@ -4,11 +4,12 @@

+ 2 - 2
prepare_vscode.sh

@@ -35,8 +35,8 @@ done
 set -x
 set -x
 
 
 if [[ "${OS_NAME}" == "osx" ]]; then
 if [[ "${OS_NAME}" == "osx" ]]; then
-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --ignore-optional
-  npm_config_argv='{"original":["--ignore-optional"]}' yarn postinstall
+  CHILD_CONCURRENCY=1 yarn --frozen-lockfile
+  yarn postinstall
 elif [[ "${npm_config_arch}" == "armv7l" || "${npm_config_arch}" == "ia32" ]]; then
 elif [[ "${npm_config_arch}" == "armv7l" || "${npm_config_arch}" == "ia32" ]]; then
   # node-gyp@9.0.0 shipped with node@16.15.0 starts using config.gypi
   # node-gyp@9.0.0 shipped with node@16.15.0 starts using config.gypi
   # from the custom headers path if dist-url option was set instead of
   # from the custom headers path if dist-url option was set instead of