Skip to content

Commit

Permalink
fixing build for 1.55 (#690)
Browse files Browse the repository at this point in the history
* Fix patch for builds after 1.55

* Remove no longer needed centos7 patch

* updating patches for 1.55

Co-authored-by: Atesca <2404098-atesca@users.noreply.gitlab.com>
  • Loading branch information
daiyam and Atesca committed Apr 1, 2021
1 parent 62a7dce commit d8a91cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion patches/binary-name.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ index 50c4460..bf73260 100644
// macOS
if (this.environmentMainService.isBuilt) {
- return join(this.environmentMainService.appRoot, 'bin', 'code');
+ return join(this.environmentMainService.appRoot, 'bin', `${product.applicationName}`);
+ return join(this.environmentMainService.appRoot, 'bin', `${this.productService.applicationName}`);
}
diff --git a/src/vs/workbench/contrib/cli/node/cli.contribution.ts b/src/vs/workbench/contrib/cli/node/cli.contribution.ts
index 30972a4..0a9435c 100644
Expand Down
14 changes: 7 additions & 7 deletions patches/custom-gallery.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
index 2730ee7..4d46c23 100644
index 251ed36..8065c6f 100644
--- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts
@@ -8,6 +8,7 @@ import { isWeb } from 'vs/base/common/platform';
import { env } from 'vs/base/common/process';
import { FileAccess } from 'vs/base/common/network';
import { dirname, joinPath } from 'vs/base/common/resources';
+import { getDefaultUserDataPath } from 'vs/base/node/userDataPath';
import { IProductConfiguration } from 'vs/platform/product/common/productService';
+import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';

let product: IProductConfiguration;

@@ -47,6 +48,29 @@ else {
@@ -49,6 +50,29 @@ else {
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string; };

Expand All @@ -31,7 +31,7 @@ index 2730ee7..4d46c23 100644
+ return result;
+ }, {}) as any;
+
+ const userProduct = require.__$__nodeRequire(joinPath(FileAccess.asFileUri(getDefaultUserDataPath(), require), 'product.json').fsPath);
+ const userProduct = require.__$__nodeRequire(joinPath(FileAccess.asFileUri(getUserDataPath({} as any), require), 'product.json').fsPath);
+
+ product = merge(product, userProduct)
+ } catch (ex) {
Expand All @@ -40,7 +40,7 @@ index 2730ee7..4d46c23 100644
// Running out of sources
if (env['VSCODE_DEV']) {
Object.assign(product, {
@@ -56,6 +80,19 @@ else {
@@ -58,6 +82,19 @@ else {
});
}

Expand All @@ -61,7 +61,7 @@ index 2730ee7..4d46c23 100644
version: pkg.version
});
diff --git a/src/vs/platform/product/common/productService.ts b/src/vs/platform/product/common/productService.ts
index 07263ca..0328f58 100644
index 34acc14..d3a2764 100644
--- a/src/vs/platform/product/common/productService.ts
+++ b/src/vs/platform/product/common/productService.ts
@@ -67,6 +67,7 @@ export interface IProductConfiguration {
Expand Down
8 changes: 0 additions & 8 deletions patches/fix-rpm-spec.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
--- vscode/resources/linux/rpm/code.spec.template 2021-03-02 19:26:53.000000000 +0100
+++ vscode/resources/linux/rpm/code.spec.template.new 2021-03-02 19:28:12.000000000 +0100
@@ -1,6 +1,6 @@
Name: @@NAME@@
Version: @@VERSION@@
-Release: @@RELEASE@@.el7
+Release: @@RELEASE@@.el8
Summary: Code editing. Redefined.
Group: Development/Tools
Vendor: Microsoft Corporation
@@ -69,3 +69,5 @@
/usr/share/pixmaps/@@ICON@@.png
/usr/share/bash-completion/completions/@@NAME@@
Expand Down
14 changes: 9 additions & 5 deletions patches/update-cache-path.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
--- vscode/src/vs/platform/update/electron-main/updateService.win32.ts 2021-02-05 11:59:17.564060663 -0600
+++ src/src/vs/platform/update/electron-main/updateService.win32.ts 2021-02-05 11:59:39.780745778 -0600
@@ -56,3 +56,3 @@
--- a/src/vs/platform/update/electron-main/updateService.win32.ts
+++ b/src/vs/platform/update/electron-main/updateService.win32.ts
@@ -55,7 +55,7 @@ export class Win32UpdateService extends AbstractUpdateService {

@memoize
get cachePath(): Promise<string> {
- const result = path.join(tmpdir(), `vscode-update-${product.target}-${process.arch}`);
+ const result = path.join(tmpdir(), `vscodium-update-${product.target}-${process.arch}`);
- const result = path.join(tmpdir(), `vscode-update-${this.productService.target}-${process.arch}`);
+ const result = path.join(tmpdir(), `${this.productService.nameShort.toLowerCase()}-update-${this.productService.target}-${process.arch}`);
return fs.promises.mkdir(result, { recursive: true }).then(() => result);
}

1 comment on commit d8a91cf

@Talon1024
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No x86_64/amd64 Linux build for this?

Please sign in to comment.