修改软件的名称为Kylin-Code.

This commit is contained in:
chriswang521 2023-05-30 16:24:14 +08:00
parent 36e6e6769a
commit ba38805fcb
29 changed files with 77 additions and 75 deletions

View File

@ -1,5 +1,5 @@
{
"name": "Code - OSS",
"name": "Kylin-Code",
// Image contents: https://github.com/microsoft/vscode-dev-containers/blob/master/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile
"image": "mcr.microsoft.com/vscode/devcontainers/repos/microsoft/vscode:branch-main",

14
.vscode/launch.json vendored
View File

@ -411,12 +411,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": [
@ -441,12 +441,12 @@
"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"
@ -478,7 +478,7 @@
"port": 9999,
"args": [
"-l",
"${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron"
"${workspaceFolder}/.build/electron/Kylin-Code.app/Contents/MacOS/Electron"
],
"outFiles": [
"${cwd}/out/**/*.js"

View File

@ -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

View File

@ -289,7 +289,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);
}

View File

@ -38,7 +38,7 @@ const root = path.dirname(path.dirname(__dirname));
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
const builtInExtensions = <IExtensionDefinition[]>productjson.builtInExtensions || [];
const webBuiltInExtensions = <IExtensionDefinition[]>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 {

View File

@ -1,5 +1,5 @@
{
"name": "code-oss-dev-build",
"name": "kylin-code-dev-build",
"version": "1.0.0",
"private": true,
"license": "MIT",

View File

@ -1,5 +1,5 @@
{
"name": "code-oss-dev-build",
"name": "kylin-code-dev-build",
"version": "1.0.0",
"license": "MIT",
"devDependencies": {

View File

@ -6,6 +6,7 @@ import { Uri } from 'vscode';
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

View File

@ -17,6 +17,7 @@ export class ExperimentationTelemetry implements IExperimentationTelemetry {
let targetPopulation: TargetPopulation;
switch (vscode.env.uriScheme) {
case 'vscode':
case 'kylin-code':
targetPopulation = TargetPopulation.Public;
case 'vscode-insiders':
targetPopulation = TargetPopulation.Insiders;

View File

@ -617,7 +617,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
localize('serverDied', 'The TypeScript language service died unexpectedly 5 times in the last 5 Minutes.'),
reportIssueItem);
}
} else if (['vscode-insiders', 'code-oss'].includes(vscode.env.uriScheme)) {
} else if (['vscode-insiders', 'kylin-code'].includes(vscode.env.uriScheme)) {
// Prompt after a single restart
if (!this._isPromptingAfterCrash && previousState.type === ServerState.Type.Errored && previousState.error instanceof TypeScriptServerError) {
this.numberRestarts = 0;

View File

@ -1,5 +1,5 @@
{
"name": "code-oss-dev",
"name": "kylin-code-dev",
"IDEVersion": "10.0.1",
"version": "1.68.0",
"distro": "2966cd72fc1a3a5fb89bf2d85a1a66e56206961a",
@ -216,10 +216,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": {
"@vscode/windows-registry": "1.0.6",

View File

@ -1,31 +1,31 @@
{
"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://gitee.com/openkylin/kylin-code/blob/master/LICENSE.txt",
"serverGreeting": [],
"serverLicense": [],
"serverLicensePrompt": "",
"serverApplicationName": "code-server-oss",
"serverDataFolderName": ".vscode-server-oss",
"win32DirName": "KylinIdeTeam Code OSS",
"win32NameVersion": "KylinIdeTeam Code OSS",
"win32RegValueName": "CodeOSS",
"serverApplicationName": "kylin-code-oss",
"serverDataFolderName": ".kylin-code-oss",
"win32DirName": "KylinIdeTeam Kylin Code",
"win32NameVersion": "KylinIdeTeam Kylin Code",
"win32RegValueName": "KylinCode",
"win32AppId": "{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}",
"win32x64AppId": "{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}",
"win32arm64AppId": "{{D1ACE434-89C5-48D1-88D3-E2991DF85475}",
"win32UserAppId": "{{C6065F05-9603-4FC4-8101-B9781A25D88E}",
"win32x64UserAppId": "{{CC6B787D-37A0-49E8-AE24-8559A032BE0C}",
"win32arm64UserAppId": "{{3AEBF0C8-F733-4AD4-BADE-FDB816D53D7B}",
"win32AppUserModelId": "KylinIdeTeam.CodeOSS",
"win32ShellNameShort": "C&ode - OSS",
"darwinBundleIdentifier": "com.visualstudio.code.oss",
"linuxIconName": "com.visualstudio.code.oss",
"win32AppUserModelId": "KylinIdeTeam.KylinCode",
"win32ShellNameShort": "K&ylin-Code",
"darwinBundleIdentifier": "kylinIdeTeam.kylin.code",
"linuxIconName": "kylinIdeTeam.kylin.code",
"licenseFileName": "LICENSE.txt",
"urlProtocol": "code-oss",
"urlProtocol": "kylin-code",
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/3c8520fab514b9f56070214496b26ff68d1b1cb5/out/vs/workbench/contrib/webview/browser/pre/",
"extensionEnabledApiProposals": {
"KylinIDETeam.js-debug": ["portsAttributes", "findTextInFiles", "workspaceTrust", "resolvers"],

View File

@ -4,10 +4,10 @@
<metadata_license>@@LICENSE@@</metadata_license>
<project_license>@@LICENSE@@</project_license>
<name>@@NAME_LONG@@</name>
<url type="homepage">https://code.visualstudio.com</url>
<summary>Visual Studio Code. Code editing. Redefined.</summary>
<url type="homepage">https://gitee.com/openkylin/kylin-code</url>
<summary>Kylin Code. Code editing. Redefined.</summary>
<description>
<p>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.</p>
<p>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.</p>
</description>
<screenshots>
<screenshot type="default">

View File

@ -4,14 +4,14 @@ Section: devel
Depends: libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libxss1, libgbm1
Priority: optional
Architecture: @@ARCHITECTURE@@
Maintainer: KylinIdeTeam
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@@
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.

View File

@ -22,7 +22,7 @@ if hash update-mime-database 2>/dev/null; then
update-mime-database /usr/share/mime
fi
if [ "@@NAME@@" != "code-oss" ]; then
if [ "@@NAME@@" != "kylin-code" ]; then
# Remove the legacy bin command if this is the stable build
if [ "@@NAME@@" = "code" ]; then
rm -f /usr/local/bin/code

View File

@ -4,7 +4,7 @@ Release: @@RELEASE@@.el7
Summary: Code editing. Redefined.
Group: Development/Tools
Vendor: KylinIdeTeam
Packager: KylinIdeTeam
Packager: KylinIdeTeam https://gitee.com/openkylin/kylin-code/contributors?ref=master
License: @@LICENSE@@
URL: https://gitee.com/openkylin/kylin-code
Icon: @@NAME@@.xpm
@ -12,7 +12,7 @@ Requires: @@DEPENDENCIES@@
AutoReq: 0
%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`)

View File

@ -1,6 +1,6 @@
{
"name": "Code - OSS",
"short_name": "Code- OSS",
"name": "Kylin-Code",
"short_name": "Kylin-Code",
"start_url": "/",
"lang": "en-US",
"display": "standalone",

View File

@ -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" />
</Application>

View File

@ -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" --ms-enable-electron-run-as-node --locate-extension $WSL_EXT_ID)
cd $CWD
if [ -n "$WSL_EXT_WLOC" ]; then
# replace \r\n with \n in WSL_EXT_WLOC

View File

@ -854,7 +854,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'),
joinPath(userDataPath, MANIFEST_CACHE_FOLDER),
fileService, logService, environmentService, productService);
this.translationsPromise = (async () => {

View File

@ -31,7 +31,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'),
joinPath(ROOT, MANIFEST_CACHE_FOLDER),
fileService, logService, nativeEnvironmentService, productService);
}
@ -256,7 +256,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 = instantiationService.createInstance(ExtensionsScannerService);
const actual = await testObject.scanSystemExtensions({ checkControlFile: true });

View File

@ -351,7 +351,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
@ -545,7 +545,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');

View File

@ -60,14 +60,14 @@ else {
if (Object.keys(product).length === 0) {
Object.assign(product, {
version: '1.67.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'
licenseUrl: 'https://gitee.com/openkylin/kylin-code/blob/master/LICENSE.txt'
});
}
}

View File

@ -124,7 +124,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,
@ -139,7 +139,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') }
}
@ -151,7 +151,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,
@ -166,7 +166,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')
}
@ -177,7 +177,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,
@ -192,7 +192,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 }
}
};

View File

@ -125,7 +125,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"
}
]
@ -133,7 +133,7 @@ suite('History Storage', () => {
let windowsState = restoreRecentlyOpened(JSON.parse(v1_55), new NullLogService());
let 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') } },

View File

@ -24,7 +24,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'),
joinPath(URI.file(nativeEnvironmentService.userDataPath), MANIFEST_CACHE_FOLDER),
fileService, logService, nativeEnvironmentService, productService);
}

View File

@ -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",

View File

@ -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",

View File

@ -165,11 +165,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',
}
};
});