From d5ae22072ded1843cf2aea7318ccf297cc23ceb0 Mon Sep 17 00:00:00 2001 From: chriswang521 Date: Fri, 10 May 2024 15:40:21 +0800 Subject: [PATCH] =?UTF-8?q?chore:=E4=BF=AE=E6=94=B9=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E4=BA=8C=E8=BF=9B=E5=88=B6=E5=90=8D=E7=A7=B0=E4=B8=BAkylin-cod?= =?UTF-8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 2 +- .vscode/launch.json | 60 ++-- build/builtin/browser-main.js | 2 +- build/gulpfile.vscode.js | 2 +- build/gulpfile.vscode.linux.js | 4 +- build/lib/builtInExtensions.js | 4 +- build/lib/builtInExtensions.ts | 2 +- build/lib/electron.js | 14 +- build/lib/electron.ts | 4 +- build/npm/gyp/package.json | 2 +- build/package.json | 2 +- build/win32/code.iss | 10 +- .../github-authentication/src/common/env.ts | 1 + .../src/common/experimentationService.ts | 1 + .../src/typescriptServiceClient.ts | 2 +- package.json | 10 +- product.json | 270 ++++++++++++++++-- resources/linux/bin/code.sh | 2 +- resources/linux/code-url-handler.desktop | 3 +- resources/linux/code.appdata.xml | 10 +- resources/linux/code.desktop | 3 +- resources/linux/debian/control.template | 14 +- resources/linux/debian/postinst.template | 59 +--- resources/linux/debian/postrm.template | 7 + resources/linux/rpm/code.spec.template | 17 +- resources/linux/snap/snapcraft.yaml | 2 +- resources/server/manifest.json | 4 +- resources/win32/VisualElementsManifest.xml | 4 +- scripts/code.sh | 4 +- .../common/extensionsScannerService.ts | 2 +- .../node/extensionsScannerService.test.ts | 4 +- .../electron-main/nativeHostMainService.ts | 4 +- src/vs/platform/product/common/product.ts | 16 +- .../electron-main/windowsStateHandler.test.ts | 12 +- .../workspacesHistoryStorage.test.ts | 4 +- .../server/node/extensionsScannerService.ts | 2 +- test/integration/browser/package.json | 2 +- test/smoke/package.json | 2 +- test/unit/electron/index.js | 10 +- 39 files changed, 382 insertions(+), 197 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f5adc4e1..4f951d03 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "Code - OSS", + "name": "Kylin-Code", "build": { "dockerfile": "Dockerfile" }, diff --git a/.vscode/launch.json b/.vscode/launch.json index b2e25927..07c252aa 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -78,7 +78,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code Emmet Tests", + "name": "Kylin Code Emmet Tests", "runtimeExecutable": "${execPath}", "args": [ "${workspaceFolder}/extensions/emmet/test-workspace", @@ -96,7 +96,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code Configuration Editing Tests", + "name": "Kylin Code Configuration Editing Tests", "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}/extensions/configuration-editing", @@ -113,7 +113,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code Git Tests", + "name": "Kylin Code Git Tests", "runtimeExecutable": "${execPath}", "args": [ "/tmp/my4g9l", @@ -131,7 +131,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code Github Tests", + "name": "Kylin Code Github Tests", "runtimeExecutable": "${execPath}", "args": [ "${workspaceFolder}/extensions/github/testWorkspace", @@ -149,7 +149,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code API Tests (single folder)", + "name": "Kylin Code API Tests (single folder)", "runtimeExecutable": "${execPath}", "args": [ // "${workspaceFolder}", // Uncomment for running out of sources. @@ -169,7 +169,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code API Tests (workspace)", + "name": "Kylin Code API Tests (workspace)", "runtimeExecutable": "${execPath}", "args": [ "${workspaceFolder}/extensions/vscode-api-tests/testworkspace.code-workspace", @@ -187,7 +187,7 @@ { "type": "extensionHost", "request": "launch", - "name": "VS Code Tokenizer Tests", + "name": "Kylin Code Tokenizer Tests", "runtimeExecutable": "${execPath}", "args": [ "${workspaceFolder}/extensions/vscode-colorize-tests/test", @@ -205,7 +205,7 @@ { "type": "chrome", "request": "attach", - "name": "Attach to VS Code", + "name": "Attach to Kylin Code", "browserAttachLocation": "workspace", "port": 9222, "outFiles": [ @@ -219,7 +219,7 @@ { "type": "chrome", "request": "launch", - "name": "Launch VS Code Internal", + "name": "Launch Kylin Code Internal", "windows": { "runtimeExecutable": "${workspaceFolder}/scripts/code.bat" }, @@ -265,7 +265,7 @@ { "type": "node", "request": "launch", - "name": "VS Code Server (Web)", + "name": "Kylin Code Server (Web)", "runtimeExecutable": "${workspaceFolder}/scripts/code-server.sh", "windows": { "runtimeExecutable": "${workspaceFolder}/scripts/code-server.bat", @@ -305,7 +305,7 @@ "request": "launch", "outFiles": [], "perScriptSourcemaps": "yes", - "name": "VS Code Server (Web, Chrome)", + "name": "Kylin Code Server (Web, Chrome)", "url": "http://localhost:8080?tkn=dev-token", "preLaunchTask": "Run code server", "presentation": { @@ -318,7 +318,7 @@ "request": "launch", "outFiles": [], "perScriptSourcemaps": "yes", - "name": "VS Code Server (Web, Edge)", + "name": "Kylin Code Server (Web, Edge)", "url": "http://localhost:8080?tkn=dev-token", "pauseForSourceMap": false, "preLaunchTask": "Run code server", @@ -332,7 +332,7 @@ "request": "launch", "outFiles": [], "perScriptSourcemaps": "yes", - "name": "VS Code Web (Chrome)", + "name": "Kylin Code Web (Chrome)", "url": "http://localhost:8080", "preLaunchTask": "Run code web", "presentation": { @@ -345,7 +345,7 @@ "request": "launch", "outFiles": [], "perScriptSourcemaps": "yes", - "name": "VS Code Web (Edge)", + "name": "Kylin Code Web (Edge)", "url": "http://localhost:8080", "pauseForSourceMap": false, "preLaunchTask": "Run code web", @@ -440,12 +440,12 @@ "request": "launch", "name": "Run Unit Tests", "program": "${workspaceFolder}/test/unit/electron/index.js", - "runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", + "runtimeExecutable": "${workspaceFolder}/.build/electron/Kylin-Code.app/Contents/MacOS/Electron", "windows": { - "runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.exe" + "runtimeExecutable": "${workspaceFolder}/.build/electron/Kylin-Code.exe" }, "linux": { - "runtimeExecutable": "${workspaceFolder}/.build/electron/code-oss" + "runtimeExecutable": "${workspaceFolder}/.build/electron/kylin-code" }, "outputCapture": "std", "args": [ @@ -456,7 +456,7 @@ "${workspaceFolder}/out/**/*.js" ], "cascadeTerminateToConfigurations": [ - "Attach to VS Code" + "Attach to Kylin Code" ], "env": { "MOCHA_COLORS": "true" @@ -470,15 +470,15 @@ "request": "launch", "name": "Run Unit Tests For Current File", "program": "${workspaceFolder}/test/unit/electron/index.js", - "runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", + "runtimeExecutable": "${workspaceFolder}/.build/electron/Kylin-Code.app/Contents/MacOS/Electron", "windows": { - "runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.exe" + "runtimeExecutable": "${workspaceFolder}/.build/electron/Kylin-Code.exe" }, "linux": { - "runtimeExecutable": "${workspaceFolder}/.build/electron/code-oss" + "runtimeExecutable": "${workspaceFolder}/.build/electron/kylin-code" }, "cascadeTerminateToConfigurations": [ - "Attach to VS Code" + "Attach to Kylin Code" ], "outputCapture": "std", "args": [ @@ -506,7 +506,7 @@ "timeout": 240000, "args": [ "-l", - "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron" + "${workspaceFolder}/.build/electron/Kylin-Code.app/Contents/MacOS/Electron" ], "outFiles": [ "${cwd}/out/**/*.js" @@ -540,10 +540,10 @@ ], "compounds": [ { - "name": "VS Code", + "name": "Kylin Code", "stopAll": true, "configurations": [ - "Launch VS Code Internal", + "Launch Kylin Code Internal", "Attach to Main Process", "Attach to Extension Host", "Attach to Shared Process", @@ -557,7 +557,7 @@ { "name": "Search, Renderer, and Main processes", "configurations": [ - "Launch VS Code Internal", + "Launch Kylin Code Internal", "Attach to Main Process", "Attach to Search Process" ], @@ -569,7 +569,7 @@ { "name": "Renderer, Extension Host, and Main processes", "configurations": [ - "Launch VS Code Internal", + "Launch Kylin Code Internal", "Attach to Main Process", "Attach to Extension Host" ], @@ -581,7 +581,7 @@ { "name": "Debug Unit Tests", "configurations": [ - "Attach to VS Code", + "Attach to Kylin Code", "Run Unit Tests" ], "presentation": { @@ -592,7 +592,7 @@ { "name": "Debug Unit Tests (Current File)", "configurations": [ - "Attach to VS Code", + "Attach to Kylin Code", "Run Unit Tests For Current File" ], "presentation": { @@ -604,7 +604,7 @@ "name": "Renderer and Main processes", "stopAll": true, "configurations": [ - "Launch VS Code Internal", + "Launch Kylin Code Internal", "Attach to Main Process" ], "preLaunchTask": "Ensure Prelaunch Dependencies" diff --git a/build/builtin/browser-main.js b/build/builtin/browser-main.js index cf95c12c..7642ecd5 100644 --- a/build/builtin/browser-main.js +++ b/build/builtin/browser-main.js @@ -10,7 +10,7 @@ const os = require('os'); const { ipcRenderer } = require('electron'); const builtInExtensionsPath = path.join(__dirname, '..', '..', 'product.json'); -const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json'); +const controlFilePath = path.join(os.homedir(), '.kylin-code-dev', 'extensions', 'control.json'); /** * @param {string} filePath diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 857114fe..ade7724d 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -331,7 +331,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op } else if (platform === 'darwin') { const shortcut = gulp.src('resources/darwin/bin/code.sh') .pipe(replace('@@APPNAME@@', product.applicationName)) - .pipe(rename('bin/code')); + .pipe(rename('bin/' + product.applicationName)); all = es.merge(all, shortcut); } diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index a2a4bf50..e3e6cd4a 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -48,7 +48,7 @@ function prepareDebPackage(arch) { .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) - .pipe(replace('@@EXEC@@', `/usr/share/${product.applicationName}/${product.applicationName}`)) + .pipe(replace('@@EXEC@@', `/opt/apps/${product.applicationName}/${product.applicationName}`)) .pipe(replace('@@ICON@@', product.linuxIconName)) .pipe(replace('@@URLPROTOCOL@@', product.urlProtocol)); @@ -75,7 +75,7 @@ function prepareDebPackage(arch) { .pipe(rename('usr/share/zsh/vendor-completions/_' + product.applicationName)); const code = gulp.src(binaryDir + '/**/*', { base: binaryDir }) - .pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; })); + .pipe(rename(function (p) { p.dirname = 'opt/apps/' + product.applicationName + '/' + p.dirname; })); let size = 0; const control = code.pipe(es.through( diff --git a/build/lib/builtInExtensions.js b/build/lib/builtInExtensions.js index 1b0adc48..4fd8f0f1 100644 --- a/build/lib/builtInExtensions.js +++ b/build/lib/builtInExtensions.js @@ -20,7 +20,7 @@ const root = path.dirname(path.dirname(__dirname)); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); const builtInExtensions = productjson.builtInExtensions || []; const webBuiltInExtensions = productjson.webBuiltInExtensions || []; -const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json'); +const controlFilePath = path.join(os.homedir(), '.kylin-ide-dev', 'extensions', 'control.json'); const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE']; function log(...messages) { if (ENABLE_LOGGING) { @@ -134,4 +134,4 @@ if (require.main === module) { process.exit(1); }); } -//# sourceMappingURL=builtInExtensions.js.map \ No newline at end of file +//# sourceMappingURL=builtInExtensions.js.map diff --git a/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts index fefed436..1779c1e4 100644 --- a/build/lib/builtInExtensions.ts +++ b/build/lib/builtInExtensions.ts @@ -39,7 +39,7 @@ const root = path.dirname(path.dirname(__dirname)); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); const builtInExtensions = productjson.builtInExtensions || []; const webBuiltInExtensions = productjson.webBuiltInExtensions || []; -const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json'); +const controlFilePath = path.join(os.homedir(), '.kylin-code-dev', 'extensions', 'control.json'); const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE']; function log(...messages: string[]): void { diff --git a/build/lib/electron.js b/build/lib/electron.js index df6473c3..b7036804 100644 --- a/build/lib/electron.js +++ b/build/lib/electron.js @@ -86,8 +86,8 @@ exports.config = { version: electronVersion, tag: product.electronRepository ? `v${electronVersion}-${msBuildId}` : undefined, productAppName: product.nameLong, - companyName: 'Microsoft Corporation', - copyright: 'Copyright (C) 2023 Microsoft. All rights reserved', + companyName: 'KylinIdeTeam', + copyright: 'Copyright (C) 2023 KylinIdeTeam. All rights reserved', darwinIcon: 'resources/darwin/code.icns', darwinBundleIdentifier: product.darwinBundleIdentifier, darwinApplicationCategoryType: 'public.app-category.developer-tools', @@ -172,10 +172,10 @@ exports.config = { darwinBundleDocumentType([], 'default', 'Folder', ['public.folder']) ], darwinBundleURLTypes: [{ - role: 'Viewer', - name: product.nameLong, - urlSchemes: [product.urlProtocol] - }], + role: 'Viewer', + name: product.nameLong, + urlSchemes: [product.urlProtocol] + }], darwinForceDarkModeSupport: true, darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined, linuxExecutableName: product.applicationName, @@ -219,4 +219,4 @@ if (require.main === module) { process.exit(1); }); } -//# sourceMappingURL=electron.js.map \ No newline at end of file +//# sourceMappingURL=electron.js.map diff --git a/build/lib/electron.ts b/build/lib/electron.ts index 33b40739..5f96a5c9 100644 --- a/build/lib/electron.ts +++ b/build/lib/electron.ts @@ -103,8 +103,8 @@ export const config = { version: electronVersion, tag: product.electronRepository ? `v${electronVersion}-${msBuildId}` : undefined, productAppName: product.nameLong, - companyName: 'Microsoft Corporation', - copyright: 'Copyright (C) 2023 Microsoft. All rights reserved', + companyName: 'KylinIdeTeam', + copyright: 'Copyright (C) 2023 KylinIdeTeam. All rights reserved', darwinIcon: 'resources/darwin/code.icns', darwinBundleIdentifier: product.darwinBundleIdentifier, darwinApplicationCategoryType: 'public.app-category.developer-tools', diff --git a/build/npm/gyp/package.json b/build/npm/gyp/package.json index 3961e955..a9839d1d 100644 --- a/build/npm/gyp/package.json +++ b/build/npm/gyp/package.json @@ -1,5 +1,5 @@ { - "name": "code-oss-dev-build", + "name": "kylin-code-dev-build", "version": "1.0.0", "private": true, "license": "MIT", diff --git a/build/package.json b/build/package.json index a06baecb..fe91d33c 100644 --- a/build/package.json +++ b/build/package.json @@ -1,5 +1,5 @@ { - "name": "code-oss-dev-build", + "name": "kylin-code-dev-build", "version": "1.0.0", "license": "MIT", "devDependencies": { diff --git a/build/win32/code.iss b/build/win32/code.iss index cca821e6..a8f82712 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -8,10 +8,10 @@ AppId={#AppId} AppName={#NameLong} AppVerName={#NameVersion} -AppPublisher=Microsoft Corporation -AppPublisherURL=https://code.visualstudio.com/ -AppSupportURL=https://code.visualstudio.com/ -AppUpdatesURL=https://code.visualstudio.com/ +AppPublisher=KylinIdeTeam +AppPublisherURL=https://gitee.com/openkylin/kylin-code +AppSupportURL=https://gitee.com/openkylin/kylin-code +AppUpdatesURL=https://gitee.com/openkylin/kylin-code DefaultGroupName={#NameLong} AllowNoIcons=yes OutputDir={#OutputDir} @@ -26,7 +26,7 @@ SetupIconFile={#RepoDir}\resources\win32\code.ico UninstallDisplayIcon={app}\{#ExeBasename}.exe ChangesEnvironment=true ChangesAssociations=true -MinVersion=10.0 +MinVersion=6.1.7600 SourceDir={#SourceDir} AppVersion={#Version} VersionInfoVersion={#RawVersion} diff --git a/extensions/github-authentication/src/common/env.ts b/extensions/github-authentication/src/common/env.ts index ebc47493..6af5f137 100644 --- a/extensions/github-authentication/src/common/env.ts +++ b/extensions/github-authentication/src/common/env.ts @@ -7,6 +7,7 @@ import { AuthProviderType } from '../github'; const VALID_DESKTOP_CALLBACK_SCHEMES = [ 'vscode', + 'kylin-code', 'vscode-insiders', // On Windows, some browsers don't seem to redirect back to OSS properly. // As a result, you get stuck in the auth flow. We exclude this from the diff --git a/extensions/github-authentication/src/common/experimentationService.ts b/extensions/github-authentication/src/common/experimentationService.ts index 16923309..170742d5 100644 --- a/extensions/github-authentication/src/common/experimentationService.ts +++ b/extensions/github-authentication/src/common/experimentationService.ts @@ -17,6 +17,7 @@ export class ExperimentationTelemetry implements IExperimentationTelemetry { let targetPopulation: TargetPopulation; switch (vscode.env.uriScheme) { case 'vscode': + case 'kylin-code': targetPopulation = TargetPopulation.Public; break; case 'vscode-insiders': diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index a3891426..ae5e7b91 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -647,7 +647,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType } } } - } else if (['vscode-insiders', 'code-oss'].includes(vscode.env.uriScheme)) { + } else if (['kylin-code-insiders', 'kylin-code'].includes(vscode.env.uriScheme)) { // Prompt after a single restart this.numberRestarts = 0; if (!this._isPromptingAfterCrash) { diff --git a/package.json b/package.json index 012ddefc..0e63719a 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "code-oss-dev", + "name": "kylin-code-dev", "version": "1.85.2", - "distro": "2da261a80a39be375a7a51cf9382b9c7e8e83166", + "distro": "2a9156d789cce5d8227e05edd507270b4053c0b5", "author": { - "name": "Microsoft Corporation" + "name": "KylinIdeTeam" }, "license": "MIT", "main": "./out/main", @@ -220,10 +220,10 @@ }, "repository": { "type": "git", - "url": "https://github.com/microsoft/vscode.git" + "url": "https://gitee.com/openkylin/kylin-code.git" }, "bugs": { - "url": "https://github.com/microsoft/vscode/issues" + "url": "https://gitee.com/openkylin/kylin-code/issues" }, "optionalDependencies": { "windows-foreground-love": "0.5.0" diff --git a/product.json b/product.json index 49b692f2..66cac743 100644 --- a/product.json +++ b/product.json @@ -1,36 +1,132 @@ { - "nameShort": "Code - OSS", - "nameLong": "Code - OSS", - "applicationName": "code-oss", - "dataFolderName": ".vscode-oss", - "win32MutexName": "vscodeoss", + "nameShort": "Kylin-Code", + "nameLong": "Kylin-Code", + "applicationName": "kylin-code", + "dataFolderName": ".kylin-code", + "win32MutexName": "kylincode", "licenseName": "MIT", - "licenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt", - "serverLicenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt", + "licenseUrl": "https://gitee.com/openkylin/kylin-code/blob/master/LICENSE.txt", "serverGreeting": [], "serverLicense": [], "serverLicensePrompt": "", - "serverApplicationName": "code-server-oss", - "serverDataFolderName": ".vscode-server-oss", - "tunnelApplicationName": "code-tunnel-oss", - "win32DirName": "Microsoft Code OSS", - "win32NameVersion": "Microsoft Code OSS", - "win32RegValueName": "CodeOSS", + "serverApplicationName": "kylin-code-server", + "serverDataFolderName": ".kylin-code-server", + "tunnelApplicationName": "kylin-tunnel-code", + "win32DirName": "KylinIdeTeam Kylin Code", + "win32NameVersion": "KylinIdeTeam Kylin Code", + "win32RegValueName": "KylinCode", "win32x64AppId": "{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}", "win32arm64AppId": "{{D1ACE434-89C5-48D1-88D3-E2991DF85475}", "win32x64UserAppId": "{{CC6B787D-37A0-49E8-AE24-8559A032BE0C}", "win32arm64UserAppId": "{{3AEBF0C8-F733-4AD4-BADE-FDB816D53D7B}", - "win32AppUserModelId": "Microsoft.CodeOSS", - "win32ShellNameShort": "C&ode - OSS", - "win32TunnelServiceMutex": "vscodeoss-tunnelservice", - "win32TunnelMutex": "vscodeoss-tunnel", - "darwinBundleIdentifier": "com.visualstudio.code.oss", - "linuxIconName": "code-oss", + "win32AppUserModelId": "KylinIdeTeam.KylinCode", + "win32ShellNameShort": "K&ylin-Code", + "win32TunnelServiceMutex": "kylincode-tunnelservice", + "win32TunnelMutex": "kylincode-tunnel", + "darwinBundleIdentifier": "KylinIdeTeam.KylinCode", + "linuxIconName": "KylinIdeTeam.KylinCode", "licenseFileName": "LICENSE.txt", - "reportIssueUrl": "https://github.com/microsoft/vscode/issues/new", "nodejsRepository": "https://nodejs.org", - "urlProtocol": "code-oss", + "urlProtocol": "kylin-code", "webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/", + "extensionEnabledApiProposals": { + "ms-vscode.vscode-selfhost-test-provider": [ + "testObserver", + "testCoverage" + ], + "ms-vscode.extension-test-runner": [ + "testCoverage" + ], + "VisualStudioExptTeam.vscodeintellicode-completions": [ + "inlineCompletionsAdditions" + ], + "ms-vsliveshare.vsliveshare": [ + "contribMenuBarHome", + "contribShareMenu", + "contribStatusBarItems", + "diffCommand", + "documentFiltersExclusive", + "fileSearchProvider", + "findTextInFiles", + "notebookCellExecutionState", + "notebookLiveShare", + "terminalDimensions", + "terminalDataWriteEvent", + "textSearchProvider" + ], + "ms-vscode.js-debug": [ + "portsAttributes", + "findTextInFiles", + "workspaceTrust", + "tunnels" + ], + "vscjava.vscode-java-test": [ + "testCoverage" + ], + "ms-python.python": [ + "contribEditorContentMenu", + "quickPickSortByLabel", + "portsAttributes", + "handleIssueUri", + "testObserver", + "quickPickItemTooltip", + "terminalDataWriteEvent", + "terminalExecuteCommandEvent" + ], + "ms-vscode.js-debug-nightly": [ + "portsAttributes", + "findTextInFiles", + "workspaceTrust", + "tunnels" + ], + "ms-vscode.lsif-browser": [ + "documentFiltersExclusive" + ], + "ms-vscode.vscode-speech": [ + "speech" + ], + "ms-python.gather": [ + "notebookCellExecutionState" + ], + "ms-python.vscode-pylance": [ + "notebookCellExecutionState" + ], + "ms-python.debugpy": [ + "portsAttributes" + ], + "ms-toolsai.jupyter-renderers": [ + "contribNotebookStaticPreloads" + ], + "ms-toolsai.jupyter": [ + "notebookDeprecated", + "notebookMessaging", + "notebookMime", + "notebookCellExecutionState", + "portsAttributes", + "quickPickSortByLabel", + "notebookKernelSource", + "interactiveWindow", + "notebookControllerAffinityHidden", + "contribNotebookStaticPreloads", + "quickPickItemTooltip", + "notebookExecution", + "notebookVariableProvider" + ], + "dbaeumer.vscode-eslint": [ + "notebookCellExecutionState" + ], + "ms-vscode.anycode": [ + "extensionsAny" + ], + "ms-vscode.cpptools": [ + "terminalDataWriteEvent" + ], + "redhat.java": [ + "documentPaste" + ], + "KylinIDETeam.js-debug": ["portsAttributes", "findTextInFiles", "workspaceTrust", "resolvers"], + "KylinIDETeam.python": ["quickPickSortByLabel", "testObserver", "notebookEditor"] + }, "builtInExtensions": [ { "name": "ms-vscode.js-debug-companion", @@ -80,5 +176,135 @@ "publisherDisplayName": "Microsoft" } } - ] + ], + "quality": "stable", + "extensionsGallery": { + "serviceUrl": "https://open-vsx.org/vscode/gallery", + "itemUrl": "https://open-vsx.org/vscode/item" + }, + "linkProtectionTrustedDomains": [ + "https://open-vsx.org" + ], + "helpDocUrl":"https://gitee.com/openkylin/extensions-repo/blob/master/user-guide/%E7%9B%AE%E5%BD%95.md", + "updateCheckUrl":"https://kylinhorn.cn/updateCheck/kylincode", + "extensionsControlManifest":{ + "malicious": [], + "deprecated": { + "ms-ceintl.vscode-language-pack-zh-hans": { + "disallowInstall": true, + "extension": { + "id": "KylinIdeTeam.vscode-language-pack-zh-hans", + "displayName": "Chinese (Simplified) (简体中文) Language Pack for Kylin-Code" + } + }, + "zhanghua.vscodium-language-pack-zh-cn": { + "disallowInstall": true, + "extension": { + "id": "KylinIdeTeam.vscode-language-pack-zh-hans", + "displayName": "Chinese (Simplified) (简体中文) Language Pack for Kylin-Code" + } + }, + "eamodio.gitlens": { + "disallowInstall": true, + "extension": { + "id": "KylinIdeTeam.gitlens", + "displayName": "Gitlens lower version for friendly licence" + } + } + }, + "search": [ + { + "query": "c", + "preferredResults": [ + "KylinIdeTeam.vscode-clangd", + "KylinIdeTeam.deadlock-detect" + ] + }, + { + "query": "c++", + "preferredResults": [ + "KylinIdeTeam.vscode-clangd", + "KylinIdeTeam.deadlock-detect" + ] + }, + { + "query": "java", + "preferredResults": [ + "KylinIdeTeam.vscode-java-pack", + "KylinIdeTeam.java", + "KylinIdeTeam.vscode-maven", + "KylinIdeTeam.vscode-gradle", + "KylinIdeTeam.vscode-java-dependency", + "KylinIdeTeam.vscode-java-debug", + "KylinIdeTeam.vscode-java-test" + ] + }, + { + "query": "go", + "preferredResults": [ + "KylinIdeTeam.go" + ] + }, + { + "query": "python", + "preferredResults": [ + "KylinIdeTeam.python" + ] + }, + { + "query": "js", + "preferredResults": [ + "KylinIDETeam.js-debug" + ] + }, + { + "query": "cmake", + "preferredResults": [ + "KylinIdeTeam.cmake-intellisence" + ] + }, + { + "query": "project", + "preferredResults": [ + "KylinIdeTeam.project-manager", + "KylinIdeTeam.vscode-java-dependency", + "KylinIdeTeam.vscode-maven" + ] + }, + { + "query": "debug", + "preferredResults": [ + "KylinIdeTeam.debug", + "KylinIDETeam.js-debug", + "KylinIdeTeam.vscode-java-debug", + "KylinIdeTeam.historydebug" + ] + }, + { + "query": "remote", + "preferredResults": [ + "xhafei.remote-dev" + ] + }, + { + "query": "depend", + "preferredResults": [ + "KylinIdeTeam.extension-dependency", + "KylinIdeTeam.vscode-java-dependency" + ] + }, + { + "query": "extension", + "preferredResults": [ + "KylinIdeTeam.extension-dependency" + ] + }, + { + "query": "extensions", + "preferredResults": [ + "KylinIdeTeam.offline-extensions-manager" + ] + } + ] + } } diff --git a/resources/linux/bin/code.sh b/resources/linux/bin/code.sh index 5fe68cb4..9a4d6a41 100755 --- a/resources/linux/bin/code.sh +++ b/resources/linux/bin/code.sh @@ -53,7 +53,7 @@ else VSCODE_PATH="$(dirname "$(readlink -f "$0")")/.." else # else use the standard install location - VSCODE_PATH="/usr/share/@@APPNAME@@" + VSCODE_PATH="/opt/apps/@@APPNAME@@" fi fi diff --git a/resources/linux/code-url-handler.desktop b/resources/linux/code-url-handler.desktop index 7106e0e0..dac0a902 100644 --- a/resources/linux/code-url-handler.desktop +++ b/resources/linux/code-url-handler.desktop @@ -1,5 +1,6 @@ [Desktop Entry] Name=@@NAME_LONG@@ - URL Handler +Name[zh_CN]=@@NAME_LONG@@ - URL Handler Comment=Code Editing. Redefined. GenericName=Text Editor Exec=@@EXEC@@ --open-url %U @@ -9,4 +10,4 @@ NoDisplay=true StartupNotify=true Categories=Utility;TextEditor;Development;IDE; MimeType=x-scheme-handler/@@URLPROTOCOL@@; -Keywords=vscode; +Keywords=@@NAME_LONG@@; diff --git a/resources/linux/code.appdata.xml b/resources/linux/code.appdata.xml index ab9df8c2..8cc92f11 100644 --- a/resources/linux/code.appdata.xml +++ b/resources/linux/code.appdata.xml @@ -4,15 +4,15 @@ @@LICENSE@@ @@LICENSE@@ @@NAME_LONG@@ - https://code.visualstudio.com - Visual Studio Code. Code editing. Redefined. + https://gitee.com/openkylin/kylin-code + Kylin Code. Code editing. Redefined. -

Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ.

+

Kylin Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://gitee.com/openkylin/kylin-code/releases for installation instructions and FAQ.

- https://code.visualstudio.com/home/home-screenshot-linux-lg.png - Editing TypeScript and searching for extensions + https://gitee.com/openkylin/kylin-code/raw/master/imgs/home/home-screenshot-linux-lg.png + Editing C++, TypeScript and searching for extensions diff --git a/resources/linux/code.desktop b/resources/linux/code.desktop index e2e3f534..377fe98f 100755 --- a/resources/linux/code.desktop +++ b/resources/linux/code.desktop @@ -1,5 +1,6 @@ [Desktop Entry] Name=@@NAME_LONG@@ +Name[zh_CN]=@@NAME_LONG@@ Comment=Code Editing. Redefined. GenericName=Text Editor Exec=@@EXEC@@ --unity-launch %F @@ -10,7 +11,7 @@ StartupWMClass=@@NAME_SHORT@@ Categories=TextEditor;Development;IDE; MimeType=text/plain;inode/directory;application/x-@@NAME@@-workspace; Actions=new-empty-window; -Keywords=vscode; +Keywords=@@NAME_LONG@@; [Desktop Action new-empty-window] Name=New Empty Window diff --git a/resources/linux/debian/control.template b/resources/linux/debian/control.template index 1a5981bb..4a48c199 100644 --- a/resources/linux/debian/control.template +++ b/resources/linux/debian/control.template @@ -5,14 +5,14 @@ Depends: @@DEPENDS@@ Recommends: @@RECOMMENDS@@ Priority: optional Architecture: @@ARCHITECTURE@@ -Maintainer: Microsoft Corporation -Homepage: https://code.visualstudio.com/ +Maintainer: KylinIDETeam https://gitee.com/openkylin/kylin-code/contributors?ref=master +Homepage: https://gitee.com/openkylin/kylin-code Installed-Size: @@INSTALLEDSIZE@@ -Provides: visual-studio-@@NAME@@ -Conflicts: visual-studio-@@NAME@@ -Replaces: visual-studio-@@NAME@@ +Provides: kylinideteam-@@NAME@@ +Conflicts: kylinideteam-@@NAME@@ +Replaces: kylinideteam-@@NAME@@ Description: Code editing. Redefined. - Visual Studio Code is a new choice of tool that combines the simplicity of + Kylin Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. - See https://code.visualstudio.com/docs/setup/linux for installation + See https://gitee.com/openkylin/kylin-code/releases for installation instructions and FAQ. diff --git a/resources/linux/debian/postinst.template b/resources/linux/debian/postinst.template index 9e91489d..a8089c04 100755 --- a/resources/linux/debian/postinst.template +++ b/resources/linux/debian/postinst.template @@ -5,7 +5,7 @@ # Symlink bin command to /usr/bin rm -f /usr/bin/@@NAME@@ -ln -s /usr/share/@@NAME@@/bin/@@NAME@@ /usr/bin/@@NAME@@ +ln -s /opt/apps/@@NAME@@/bin/@@NAME@@ /usr/bin/@@NAME@@ # Register code in the alternatives system # Priority of 0 should never make code the default editor in auto mode as most @@ -21,60 +21,3 @@ fi if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime fi - -if [ "@@NAME@@" != "code-oss" ]; then - # Remove the legacy bin command if this is the stable build - if [ "@@NAME@@" = "code" ]; then - rm -f /usr/local/bin/code - fi - - # Register apt repository - eval $(apt-config shell APT_SOURCE_PARTS Dir::Etc::sourceparts/d) - CODE_SOURCE_PART=${APT_SOURCE_PARTS}vscode.list - - eval $(apt-config shell APT_TRUSTED_PARTS Dir::Etc::trustedparts/d) - CODE_TRUSTED_PART=${APT_TRUSTED_PARTS}microsoft.gpg - - # Install repository source list - WRITE_SOURCE=0 - if [ ! -f $CODE_SOURCE_PART ] && [ ! -f /etc/rpi-issue ]; then - # Write source list if it does not exist and we're not running on Raspberry Pi OS - WRITE_SOURCE=1 - elif grep -Eq "http:\/\/packages\.microsoft\.com\/repos\/vscode" $CODE_SOURCE_PART; then - # Migrate from old repository - WRITE_SOURCE=1 - elif grep -q "# disabled on upgrade to" $CODE_SOURCE_PART; then - # Write source list if it was disabled by OS upgrade - WRITE_SOURCE=1 - fi - - if [ "$WRITE_SOURCE" -eq "1" ]; then - echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ### -# You may comment out this entry, but any other modifications may be lost. -deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main" > $CODE_SOURCE_PART - - # Sourced from https://packages.microsoft.com/keys/microsoft.asc - if [ ! -f $CODE_TRUSTED_PART ]; then - echo "-----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQENBFYxWIwBCADAKoZhZlJxGNGWzqV+1OG1xiQeoowKhssGAKvd+buXCGISZJwT -LXZqIcIiLP7pqdcZWtE9bSc7yBY2MalDp9Liu0KekywQ6VVX1T72NPf5Ev6x6DLV -7aVWsCzUAF+eb7DC9fPuFLEdxmOEYoPjzrQ7cCnSV4JQxAqhU4T6OjbvRazGl3ag -OeizPXmRljMtUUttHQZnRhtlzkmwIrUivbfFPD+fEoHJ1+uIdfOzZX8/oKHKLe2j -H632kvsNzJFlROVvGLYAk2WRcLu+RjjggixhwiB+Mu/A8Tf4V6b+YppS44q8EvVr -M+QvY7LNSOffSO6Slsy9oisGTdfE39nC7pVRABEBAAG0N01pY3Jvc29mdCAoUmVs -ZWFzZSBzaWduaW5nKSA8Z3Bnc2VjdXJpdHlAbWljcm9zb2Z0LmNvbT6JATUEEwEC -AB8FAlYxWIwCGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEOs+lK2+EinPGpsH -/32vKy29Hg51H9dfFJMx0/a/F+5vKeCeVqimvyTM04C+XENNuSbYZ3eRPHGHFLqe -MNGxsfb7C7ZxEeW7J/vSzRgHxm7ZvESisUYRFq2sgkJ+HFERNrqfci45bdhmrUsy -7SWw9ybxdFOkuQoyKD3tBmiGfONQMlBaOMWdAsic965rvJsd5zYaZZFI1UwTkFXV -KJt3bp3Ngn1vEYXwijGTa+FXz6GLHueJwF0I7ug34DgUkAFvAs8Hacr2DRYxL5RJ -XdNgj4Jd2/g6T9InmWT0hASljur+dJnzNiNCkbn9KbX7J/qK1IbR8y560yRmFsU+ -NdCFTW7wY0Fb1fWJ+/KTsC4= -=J6gs ------END PGP PUBLIC KEY BLOCK----- -" | gpg --dearmor > $CODE_TRUSTED_PART - fi - fi -fi diff --git a/resources/linux/debian/postrm.template b/resources/linux/debian/postrm.template index fb36d522..a70a269a 100755 --- a/resources/linux/debian/postrm.template +++ b/resources/linux/debian/postrm.template @@ -14,3 +14,10 @@ fi if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime fi + +case "$1" in + purge|P) + rm -rf /home/${SUDO_USER}/.config/Kylin-Code + rm -rf /home/${SUDO_USER}/.kylin-code + ;; +esac diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template index 2df117d1..c313ca4f 100644 --- a/resources/linux/rpm/code.spec.template +++ b/resources/linux/rpm/code.spec.template @@ -3,10 +3,10 @@ Version: @@VERSION@@ Release: @@RELEASE@@.el7 Summary: Code editing. Redefined. Group: Development/Tools -Vendor: Microsoft Corporation -Packager: Visual Studio Code Team +Vendor: KylinIdeTeam +Packager: KylinIDETeam https://gitee.com/openkylin/kylin-code/contributors?ref=master License: @@LICENSE@@ -URL: https://code.visualstudio.com/ +URL: https://gitee.com/openkylin/kylin-code Icon: @@NAME@@.xpm Requires: @@DEPENDENCIES@@ AutoReq: 0 @@ -14,7 +14,7 @@ AutoReq: 0 %global __provides_exclude_from ^%{_datadir}/%{name}/.*\\.so.*$ %description -Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ. +Kylin Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ. # Don't generate build_id links to prevent conflicts when installing multiple # versions of VS Code alongside each other (e.g. `code` and `code-insiders`) @@ -45,8 +45,8 @@ cp usr/share/zsh/site-functions/_%{name} %{buildroot}%{_datadir}/zsh/site-functi %post # Remove the legacy bin command if this is the stable build -if [ "%{name}" = "code" ]; then - rm -f /usr/local/bin/code +if [ "%{name}" = "Kylin-Code" ]; then + rm -f /usr/local/bin/kylin-code fi # Register yum repository @@ -68,6 +68,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %postun # Uninstall the desktop entry update-desktop-database &> /dev/null || : +if [ $1 = 0 ]; then + rm -f /usr/bin/@@NAME@@ + rm -rf /home/${SUDO_USER}/.config/Kylin-Code + rm -rf /home/${SUDO_USER}/.kylin-code +fi # Update mimetype database for removed workspace mimetype update-mime-database %{_datadir}/mime &> /dev/null || : diff --git a/resources/linux/snap/snapcraft.yaml b/resources/linux/snap/snapcraft.yaml index b7b93f4c..5374eb7d 100644 --- a/resources/linux/snap/snapcraft.yaml +++ b/resources/linux/snap/snapcraft.yaml @@ -2,7 +2,7 @@ name: @@NAME@@ version: '@@VERSION@@' summary: Code editing. Redefined. description: | - Visual Studio Code is a new choice of tool that combines the + Kylin-Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. diff --git a/resources/server/manifest.json b/resources/server/manifest.json index d92ca7ac..926ae85f 100644 --- a/resources/server/manifest.json +++ b/resources/server/manifest.json @@ -1,6 +1,6 @@ { - "name": "Code - OSS", - "short_name": "Code- OSS", + "name": "Kylin-Code", + "short_name": "Kylin-Code", "start_url": "/", "lang": "en-US", "display_override": [ diff --git a/resources/win32/VisualElementsManifest.xml b/resources/win32/VisualElementsManifest.xml index 40efd0a3..1d7fa639 100644 --- a/resources/win32/VisualElementsManifest.xml +++ b/resources/win32/VisualElementsManifest.xml @@ -4,6 +4,6 @@ ShowNameOnSquare150x150Logo="on" Square150x150Logo="resources\app\resources\win32\code_150x150.png" Square70x70Logo="resources\app\resources\win32\code_70x70.png" - ForegroundText="light" - ShortDisplayName="Code - OSS" /> + ForegroundText="light" + ShortDisplayName="Kylin-Code" /> diff --git a/scripts/code.sh b/scripts/code.sh index 2b97aa42..6be6246f 100755 --- a/scripts/code.sh +++ b/scripts/code.sh @@ -52,13 +52,13 @@ function code-wsl() export DISPLAY="$HOST_IP:0" # in a wsl shell - ELECTRON="$ROOT/.build/electron/Code - OSS.exe" + ELECTRON="$ROOT/.build/electron/Kylin-Code.exe" if [ -f "$ELECTRON" ]; then local CWD=$(pwd) cd $ROOT export WSLENV=ELECTRON_RUN_AS_NODE/w:VSCODE_DEV/w:$WSLENV local WSL_EXT_ID="ms-vscode-remote.remote-wsl" - local WSL_EXT_WLOC=$(echo "" | VSCODE_DEV=1 ELECTRON_RUN_AS_NODE=1 "$ROOT/.build/electron/Code - OSS.exe" "out/cli.js" --ms-enable-electron-run-as-node --locate-extension $WSL_EXT_ID) + local WSL_EXT_WLOC=$(echo "" | VSCODE_DEV=1 ELECTRON_RUN_AS_NODE=1 "$ROOT/.build/electron/Kylin-Code.exe" "out/cli.js" --locate-extension $WSL_EXT_ID) cd $CWD if [ -n "$WSL_EXT_WLOC" ]; then # replace \r\n with \n in WSL_EXT_WLOC diff --git a/src/vs/platform/extensionManagement/common/extensionsScannerService.ts b/src/vs/platform/extensionManagement/common/extensionsScannerService.ts index 4ac28d17..559d5b63 100644 --- a/src/vs/platform/extensionManagement/common/extensionsScannerService.ts +++ b/src/vs/platform/extensionManagement/common/extensionsScannerService.ts @@ -986,7 +986,7 @@ export class NativeExtensionsScannerService extends AbstractExtensionsScannerSer super( systemExtensionsLocation, userExtensionsLocation, - joinPath(userHome, '.vscode-oss-dev', 'extensions', 'control.json'), + joinPath(userHome, '.kylin-code-dev', 'extensions', 'control.json'), currentProfile, userDataProfilesService, extensionsProfileScannerService, fileService, logService, environmentService, productService, uriIdentityService, instantiationService); this.translationsPromise = (async () => { diff --git a/src/vs/platform/extensionManagement/test/node/extensionsScannerService.test.ts b/src/vs/platform/extensionManagement/test/node/extensionsScannerService.test.ts index 8994ead0..81fbccd8 100644 --- a/src/vs/platform/extensionManagement/test/node/extensionsScannerService.test.ts +++ b/src/vs/platform/extensionManagement/test/node/extensionsScannerService.test.ts @@ -42,7 +42,7 @@ class ExtensionsScannerService extends AbstractExtensionsScannerService implemen super( URI.file(nativeEnvironmentService.builtinExtensionsPath), URI.file(nativeEnvironmentService.extensionsPath), - joinPath(nativeEnvironmentService.userHome, '.vscode-oss-dev', 'extensions', 'control.json'), + joinPath(nativeEnvironmentService.userHome, '.kylin-code-dev', 'extensions', 'control.json'), userDataProfilesService.defaultProfile, userDataProfilesService, extensionsProfileScannerService, fileService, logService, nativeEnvironmentService, productService, uriIdentityService, instantiationService); } @@ -272,7 +272,7 @@ suite('NativeExtensionsScanerService Test', () => { await anExtension(anExtensionManifest({ 'name': 'name2', 'publisher': 'pub' }), joinPath(ROOT, 'additional')); const extensionLocation = await anExtension(anExtensionManifest({ 'name': 'name', 'publisher': 'pub' }), joinPath(ROOT, 'additional')); await aSystemExtension(anExtensionManifest({ 'name': 'name', 'publisher': 'pub', version: '1.0.1' })); - await instantiationService.get(IFileService).writeFile(joinPath(instantiationService.get(INativeEnvironmentService).userHome, '.vscode-oss-dev', 'extensions', 'control.json'), VSBuffer.fromString(JSON.stringify({ 'pub.name2': 'disabled', 'pub.name': extensionLocation.fsPath }))); + await instantiationService.get(IFileService).writeFile(joinPath(instantiationService.get(INativeEnvironmentService).userHome, '.kylin-code-dev', 'extensions', 'control.json'), VSBuffer.fromString(JSON.stringify({ 'pub.name2': 'disabled', 'pub.name': extensionLocation.fsPath }))); const testObject: IExtensionsScannerService = disposables.add(instantiationService.createInstance(ExtensionsScannerService)); const actual = await testObject.scanSystemExtensions({ checkControlFile: true }); diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts index 79c91287..e86f9bcb 100644 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts @@ -382,7 +382,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain } private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> { - const target = resolve(this.environmentMainService.appRoot, 'bin', 'code'); + const target = resolve(this.environmentMainService.appRoot, 'bin', this.productService.applicationName); const source = `/usr/local/bin/${this.productService.applicationName}`; // Ensure source exists @@ -562,7 +562,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain // macOS if (this.environmentMainService.isBuilt) { - return join(this.environmentMainService.appRoot, 'bin', 'code'); + return join(this.environmentMainService.appRoot, 'bin', `${this.productService.applicationName}`); } return join(this.environmentMainService.appRoot, 'scripts', 'code-cli.sh'); diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts index 9482a2c9..254f2cfb 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -59,15 +59,15 @@ else { if (Object.keys(product).length === 0) { Object.assign(product, { version: '1.82.0-dev', - nameShort: 'Code - OSS Dev', - nameLong: 'Code - OSS Dev', - applicationName: 'code-oss', - dataFolderName: '.vscode-oss', - urlProtocol: 'code-oss', - reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new', + nameShort: 'Kylin-Code Dev', + nameLong: 'Kylin-Code Dev', + applicationName: 'kylin-code', + dataFolderName: '.kylin-code', + urlProtocol: 'kylin-code', + reportIssueUrl: 'https://gitee.com/openkylin/kylin-code/issues', licenseName: 'MIT', - licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt', - serverLicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt' + licenseUrl: 'https://gitee.com/openkylin/kylin-code/blob/master/LICENSE.txt', + serverLicenseUrl: 'https://gitee.com/openkylin/kylin-code/blob/master/LICENSE.txt' }); } } diff --git a/src/vs/platform/windows/test/electron-main/windowsStateHandler.test.ts b/src/vs/platform/windows/test/electron-main/windowsStateHandler.test.ts index 0b96b1bf..19d12d58 100644 --- a/src/vs/platform/windows/test/electron-main/windowsStateHandler.test.ts +++ b/src/vs/platform/windows/test/electron-main/windowsStateHandler.test.ts @@ -125,7 +125,7 @@ suite('Windows State Storing', () => { "id": "53b714b46ef1a2d4346568b4f591028c", "configURIPath": "file:///home/user/workspaces/testing/custom.code-workspace" }, - "backupPath": "/home/user/.config/code-oss-dev/Backups/53b714b46ef1a2d4346568b4f591028c", + "backupPath": "/home/user/.config/kylin-code-dev/Backups/53b714b46ef1a2d4346568b4f591028c", "uiState": { "mode": 0, "x": 0, @@ -140,7 +140,7 @@ suite('Windows State Storing', () => { let expected: IWindowsState = { openedWindows: [], lastActiveWindow: { - backupPath: '/home/user/.config/code-oss-dev/Backups/53b714b46ef1a2d4346568b4f591028c', + backupPath: '/home/user/.config/kylin-code-dev/Backups/53b714b46ef1a2d4346568b4f591028c', uiState: { mode: WindowMode.Maximized, x: 0, y: 27, width: 2560, height: 1364 }, workspace: { id: '53b714b46ef1a2d4346568b4f591028c', configPath: URI.parse('file:///home/user/workspaces/testing/custom.code-workspace') } } @@ -152,7 +152,7 @@ suite('Windows State Storing', () => { "openedWindows": [], "lastActiveWindow": { "folder": "file:///home/user/workspaces/testing/folding", - "backupPath": "/home/user/.config/code-oss-dev/Backups/1daac1621c6c06f9e916ac8062e5a1b5", + "backupPath": "/home/user/.config/kylin-code-dev/Backups/1daac1621c6c06f9e916ac8062e5a1b5", "uiState": { "mode": 1, "x": 625, @@ -167,7 +167,7 @@ suite('Windows State Storing', () => { expected = { openedWindows: [], lastActiveWindow: { - backupPath: '/home/user/.config/code-oss-dev/Backups/1daac1621c6c06f9e916ac8062e5a1b5', + backupPath: '/home/user/.config/kylin-code-dev/Backups/1daac1621c6c06f9e916ac8062e5a1b5', uiState: { mode: WindowMode.Normal, x: 625, y: 263, width: 1718, height: 953 }, folderUri: URI.parse('file:///home/user/workspaces/testing/folding') } @@ -178,7 +178,7 @@ suite('Windows State Storing', () => { "openedWindows": [ ], "lastActiveWindow": { - "backupPath": "/home/user/.config/code-oss-dev/Backups/1549539668998", + "backupPath": "/home/user/.config/kylin-code-dev/Backups/1549539668998", "uiState": { "mode": 1, "x": 768, @@ -193,7 +193,7 @@ suite('Windows State Storing', () => { expected = { openedWindows: [], lastActiveWindow: { - backupPath: '/home/user/.config/code-oss-dev/Backups/1549539668998', + backupPath: '/home/user/.config/kylin-code-dev/Backups/1549539668998', uiState: { mode: WindowMode.Normal, x: 768, y: 336, width: 1024, height: 768 } } }; diff --git a/src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts b/src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts index 2677ffba..d1d571df 100644 --- a/src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts +++ b/src/vs/platform/workspaces/test/electron-main/workspacesHistoryStorage.test.ts @@ -126,7 +126,7 @@ suite('History Storage', () => { "label": "abc" }, { - "fileUri": "file:///home/user/.config/code-oss-dev/storage.json", + "fileUri": "file:///home/user/.config/kylin-code-dev/storage.json", "label": "def" } ] @@ -134,7 +134,7 @@ suite('History Storage', () => { const windowsState = restoreRecentlyOpened(JSON.parse(v1_55), new NullLogService()); const expected: IRecentlyOpened = { - files: [{ label: 'def', fileUri: URI.parse('file:///home/user/.config/code-oss-dev/storage.json') }], + files: [{ label: 'def', fileUri: URI.parse('file:///home/user/.config/kylin-code-dev/storage.json') }], workspaces: [ { folderUri: URI.parse('foo://bar/23/43'), remoteAuthority: 'test+test' }, { workspace: { id: '53b714b46ef1a2d4346568b4f591028c', configPath: URI.parse('file:///home/user/workspaces/testing/custom.code-workspace') } }, diff --git a/src/vs/server/node/extensionsScannerService.ts b/src/vs/server/node/extensionsScannerService.ts index 5430ae19..2701aaf6 100644 --- a/src/vs/server/node/extensionsScannerService.ts +++ b/src/vs/server/node/extensionsScannerService.ts @@ -31,7 +31,7 @@ export class ExtensionsScannerService extends AbstractExtensionsScannerService i super( URI.file(nativeEnvironmentService.builtinExtensionsPath), URI.file(nativeEnvironmentService.extensionsPath), - joinPath(nativeEnvironmentService.userHome, '.vscode-oss-dev', 'extensions', 'control.json'), + joinPath(nativeEnvironmentService.userHome, '.kylin-code-dev', 'extensions', 'control.json'), userDataProfilesService.defaultProfile, userDataProfilesService, extensionsProfileScannerService, fileService, logService, nativeEnvironmentService, productService, uriIdentityService, instantiationService); } diff --git a/test/integration/browser/package.json b/test/integration/browser/package.json index e39606d6..f688e053 100644 --- a/test/integration/browser/package.json +++ b/test/integration/browser/package.json @@ -1,5 +1,5 @@ { - "name": "code-oss-dev-integration-test", + "name": "kylin-code-dev-integration-test", "version": "0.1.0", "license": "MIT", "main": "./index.js", diff --git a/test/smoke/package.json b/test/smoke/package.json index 13728583..92f6117f 100644 --- a/test/smoke/package.json +++ b/test/smoke/package.json @@ -1,5 +1,5 @@ { - "name": "code-oss-dev-smoke-test", + "name": "kylin-code-dev-smoke-test", "version": "0.1.0", "license": "MIT", "main": "./src/main.js", diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index 81c57521..94132bf8 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -200,11 +200,11 @@ app.on('ready', () => { return { product: { version: '1.x.y', - nameShort: 'Code - OSS Dev', - nameLong: 'Code - OSS Dev', - applicationName: 'code-oss', - dataFolderName: '.vscode-oss', - urlProtocol: 'code-oss', + nameShort: 'Kylin-Code Dev', + nameLong: 'Kylin-Code Dev', + applicationName: 'kylin-code', + dataFolderName: '.kylin-code', + urlProtocol: 'kylin-code', } }; });