添加依赖信息,解决版本发布编译问题

This commit is contained in:
dinglili 2024-01-26 14:22:27 +08:00 committed by wangpenglong
parent 9d14008d1c
commit 3709443b82
5 changed files with 1019 additions and 488 deletions

View File

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { app, BrowserWindow, contentTracing, dialog, ipcMain, protocol, session, Session, systemPreferences, WebFrameMain } from 'electron'; import { app, BrowserWindow, contentTracing, dialog, ipcMain, protocol, session, Session, systemPreferences, WebFrameMain, screen } from 'electron';
import { validatedIpcMain } from 'vs/base/parts/ipc/electron-main/ipcMain'; import { validatedIpcMain } from 'vs/base/parts/ipc/electron-main/ipcMain';
import { statSync } from 'fs'; import { statSync } from 'fs';
import { hostname, release } from 'os'; import { hostname, release } from 'os';
@ -104,11 +104,12 @@ import { PolicyChannel } from 'vs/platform/policy/common/policyIpc';
import * as installUtils from 'vs/code/electron-main/installUtils'; import * as installUtils from 'vs/code/electron-main/installUtils';
import axios from "axios"; import axios from "axios";
import { Semaphore } from "async-mutex"; // import { Semaphore } from "async-mutex";
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import { spawn, ChildProcess } from 'child_process'; import { spawn, ChildProcess } from 'child_process';
import { AbortController } from "@azure/abort-controller";
/** /**
* The main VS Code application. There will only ever be one instance, * The main VS Code application. There will only ever be one instance,
@ -1284,10 +1285,20 @@ export class CodeApplication extends Disposable {
const theme = this.configurationService.getValue('workbench.colorTheme') ? this.configurationService.getValue('workbench.colorTheme') : 'Visual Studio Dark'; const theme = this.configurationService.getValue('workbench.colorTheme') ? this.configurationService.getValue('workbench.colorTheme') : 'Visual Studio Dark';
console.log('get config color theme=' + this.configurationService.getValue('workbench.colorTheme')); console.log('get config color theme=' + this.configurationService.getValue('workbench.colorTheme'));
// 创建浏览器窗口 // 创建浏览器窗口
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
console.log("windowsize:", width, height, "size*", width * 0.8, height * 0.7);
const winwidth = width * 0.9 > 900 ? 900 : width * 0.9;
const winheight = height * 0.7 > 600 ? 600 : height * 0.7;
this.win = new BrowserWindow({ this.win = new BrowserWindow({
resizable: false, resizable: true,
height: 650, maxHeight: 600,
width: 900, maxWidth: 900,
minHeight: 400,
minWidth: 600,
height: winwidth,
width: winheight,
frame: false, frame: false,
transparent: false, transparent: false,
fullscreen: false, fullscreen: false,
@ -1324,8 +1335,8 @@ export class CodeApplication extends Disposable {
//封装发送给渲染进程的数据 //封装发送给渲染进程的数据
let initData = { let initData = {
restoreData: restoreData, restoreData: restoreData,
height: 650, height: winheight,
width: 900, width: winwidth,
theme: theme, theme: theme,
userDataPath: that.environmentMainService.userDataPath, userDataPath: that.environmentMainService.userDataPath,
isBeta: false, isBeta: false,
@ -1345,7 +1356,9 @@ export class CodeApplication extends Disposable {
let pkglogFsWatcher: fs.FSWatcher | null; let pkglogFsWatcher: fs.FSWatcher | null;
//执行安装脚本的进程号; //执行安装脚本的进程号;
let installProcessId: ChildProcess; let installProcessId: ChildProcess;
let cancelFlag = false;
let controller = new AbortController();
// let scriptList: {}[] = []; // let scriptList: {}[] = [];
//electron生命周期 监听did-finish-load事件 //electron生命周期 监听did-finish-load事件
this.win.webContents.on('did-finish-load', async function () { this.win.webContents.on('did-finish-load', async function () {
@ -1886,17 +1899,14 @@ export class CodeApplication extends Disposable {
}); });
ipcMain.on('kylinide.installWizard.downloadExt', async (event, message) => { ipcMain.on('kylinide.installWizard.downloadExt', async (event, message) => {
installQueue.splice(0);
let depObject = JSON.parse(fs.readFileSync(message.extAddressPath, 'utf-8')); let depObject = JSON.parse(fs.readFileSync(message.extAddressPath, 'utf-8'));
let extLatestDownloadUrlList = []; let extLatestDownloadUrlList = [];
let extDownloadUrlList = []; let extDownloadUrlList = [];
extDownloadPath = installConfig + '/Download/' extDownloadPath = installConfig + '/Download/'
const concurrencyLimit = 1; // 并发限制数量
const semaphore = new Semaphore(concurrencyLimit);
extList.forEach(async (val) => { extList.forEach(async (val) => {
await semaphore.acquire(); // 获取信号量,控制并发数量 // await semaphore.acquire(); // 获取信号量,控制并发数量
let gitInfo = depObject[val]['ext_links']['gitee']; let gitInfo = depObject[val]['ext_links']['gitee'];
let tempUrl = gitInfo.prefix + '/' + gitInfo.org + '/' + gitInfo.repo + '/' + 'releases/latest'; let tempUrl = gitInfo.prefix + '/' + gitInfo.org + '/' + gitInfo.repo + '/' + 'releases/latest';
@ -1909,7 +1919,8 @@ export class CodeApplication extends Disposable {
'User-Agent': 'axios', 'User-Agent': 'axios',
'Accept': '*/*', 'Accept': '*/*',
}, },
timeout: 10000 timeout: 10000,
signal: controller.signal
}); });
const downloadUrl = response.data.release.release.attach_files[0].download_url; const downloadUrl = response.data.release.release.attach_files[0].download_url;
const downloadUrlAddr = gitInfo.prefix + downloadUrl; const downloadUrlAddr = gitInfo.prefix + downloadUrl;
@ -1926,41 +1937,44 @@ export class CodeApplication extends Disposable {
extTotal: extList.length, extTotal: extList.length,
}; };
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', startDownloadMsg); if (that.win) that.win.webContents.send('kylinide.installWizard.msg', startDownloadMsg);
this.download_File(downloadUrlAddr, extDownloadPath + filename).then((result) => { if (!cancelFlag) {
const msg = { this.download_File(downloadUrlAddr, extDownloadPath + filename, controller).then((result) => {
type: 'downloadExtDone',
fileName: filename,
extName: val,
extMap: extMap,
extTotal: Object.keys(extMap).length,
};
if (result === 0) {
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg);
} else {
console.log(`Download ${val} failed0: `);
const msg = { const msg = {
type: 'downloadExtFail', type: 'downloadExtDone',
fileName: filename, fileName: filename,
extName: val, extName: val,
extMap: extMap, extMap: extMap,
extTotal: Object.keys(extMap).length, extTotal: Object.keys(extMap).length,
}; };
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg); if (result === 0) {
} if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg);
}).catch((error) => { } else {
console.log(`Download ${val} failed1: ${error}`); console.log(`Download ${val} failed0: `);
const msg = {
type: 'downloadExtFail',
fileName: filename ? filename : val,
extName: val,
extMap: extMap,
// extTotal: Object.keys(extMap).length,
extTotal: extList.length,
};
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg);
}); const msg = {
type: 'downloadExtFail',
fileName: filename,
extName: val,
extMap: extMap,
extTotal: Object.keys(extMap).length,
};
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg);
}
}).catch((error) => {
console.log(`Download ${val} failed1: ${error}`);
const msg = {
type: 'downloadExtFail',
fileName: filename ? filename : val,
extName: val,
extMap: extMap,
// extTotal: Object.keys(extMap).length,
extTotal: extList.length,
};
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg);
});
}
} catch (error) { } catch (error) {
console.log(`Download ${val} failed2: ${error}`); console.log(`Download ${val} failed2: ${error}`);
const msg = { const msg = {
@ -1974,7 +1988,7 @@ export class CodeApplication extends Disposable {
if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg); if (that.win) that.win.webContents.send('kylinide.installWizard.msg', msg);
} finally { } finally {
semaphore.release(); // 释放信号量 // semaphore.release(); // 释放信号量
} }
}); });
@ -2078,7 +2092,7 @@ export class CodeApplication extends Disposable {
if (depList.length === 0) return; if (depList.length === 0) return;
depList.forEach((packageName) => { depList.forEach((packageName) => {
const command = `apt-get install -y ${packageName} >> ${logFile0};\necho $? >> ${resultFile};\nsleep 2;\n`; const command = `apt-get install -y ${packageName} >> ${logFile0};\necho $? >> ${resultFile};\n`;
fs.appendFileSync(installFile, command); fs.appendFileSync(installFile, command);
}); });
@ -2149,6 +2163,7 @@ export class CodeApplication extends Disposable {
this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'extFile' }); this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'extFile' });
this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'pkgFile' }); this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'pkgFile' });
} }
controller.abort();
installQueue.splice(0); installQueue.splice(0);
//结束插件下载及安装 //结束插件下载及安装
if (that.win) { if (that.win) {
@ -2164,6 +2179,8 @@ export class CodeApplication extends Disposable {
this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'extFile' }); this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'extFile' });
this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'pkgFile' }); this.win.webContents.send("kylinide.installWizard.removeFileLister", { type: 'pkgFile' });
} }
controller.abort();
cancelFlag = true;
installQueue.splice(0); installQueue.splice(0);
//结束插件下载及安装 //结束插件下载及安装
if (that.win) { if (that.win) {
@ -2177,6 +2194,10 @@ export class CodeApplication extends Disposable {
if (installQueue.length === 0) { if (installQueue.length === 0) {
return; // 队列为空,结束执行 return; // 队列为空,结束执行
} }
if (cancelFlag) {
installQueue.splice(0);
return;
}
const { installCommand, msg } = installQueue[0]; const { installCommand, msg } = installQueue[0];
try { try {
const extlogFile = installConfig + '/log/extInstall.1.log'; const extlogFile = installConfig + '/log/extInstall.1.log';
@ -2340,9 +2361,9 @@ export class CodeApplication extends Disposable {
return isVerified return isVerified
} }
//下载文件 //下载文件
private async download_File(url_git: string, dst: string) { private async download_File(url_git: string, dst: string, controller?: AbortController) {
try { try {
const response = await axios.get(url_git, { responseType: 'stream', timeout: 10000 }); const response = await axios.get(url_git, { responseType: 'stream', timeout: 10000, signal: controller?.signal });
const directoryPath = path.dirname(dst); const directoryPath = path.dirname(dst);
// 判断目录是否存在 // 判断目录是否存在
if (!fs.existsSync(directoryPath)) { if (!fs.existsSync(directoryPath)) {

View File

@ -0,0 +1,492 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) kylinIDETeam. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
html,
body {
margin: 0;
padding: 0;
height: 100%;
font-family: "Segoe UI", "Helvetica Neue", "Helvetica", Arial, sans-serif;
overflow: hidden;
box-sizing: border-box;
}
:focus-visible {
outline: none;
border: solid 1px #ff9c00;
border-radius: 2px;
}
.container {
width: 100%;
height: 100%;
/* 很重要,不然flex不生效 */
display: flex;
flex-direction: column;
color: #333333;
flex: 1;
}
.overlay {
position: fixed;
/* top: 0;
left: 0; */
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
display: flex;
justify-content: center;
align-items: center;
z-index: 9999; /* 确保蒙版在最前面 */
}
.preparing-container {
display: flex;
margin-top:-200px ;
text-align: center;
color: #fff;
align-items: center;
justify-content: center;
height: 100vh;
flex-direction: column;
}
.wait-container{
display: block;
text-align: center;
width: 100%;
margin-top: 100px;
}
.header {
cursor: move;
height: 45px;
border-bottom: 1px solid #fff;
box-sizing: border-box;
padding: 5px 2px 9px;
-webkit-app-region: drag;
background-color: #f2f2f2;
}
#first ,#osInfoShow{
flex-direction: column;
}
.bodycontent {
display: flex;
width: 100%;
height: 100%;
flex:1;
}
.content{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.dark .header {
color: #c6c6c6;
background-color: #3C3C3C;
}
.title {
float: left;
text-align: center;
margin: 5px;
}
.close {
width: 25px;
height: 25px;
float: right;
-webkit-app-region: no-drag;
cursor: pointer;
margin: 5px;
text-align: center;
opacity:0.5;
background: url(../images/close_gray.png) no-repeat;
}
.close:hover{
opacity:1;
transform: scale(1.2);
}
.dark .close {
background: url(../images/close.png);
}
/*页面中间区域 start {*/
.center {
flex: 1;
padding: 10px;
overflow: auto;
color: #333333;
background-color: #F2F2F2;
position: relative;
padding-left: 25px;
}
.dark .center {
color: #c6c6c6;
background-color: #3C3C3C;
}
/* 默认隐藏所有步骤: */
.tab {
display: none;
flex-direction: column;
align-items: flex-start;
}
/* 默认隐藏所有步骤: */
.downloadtab {
display: none;
flex-direction: column;
align-items: flex-start;
}
.localinstalltab{
display: none;
flex-direction: column;
align-items: flex-start;
}
.devContent {
display: flex;
flex-direction: row;
}
.devContentCol{
display: flex;
flex-direction: column;
}
/* 用圆圈表示表格的步骤: */
.indicator {
position: absolute;
bottom: 5px;
text-align: center;
left: 50%;
transform: translate(-50%);
}
.step {
height: 15px;
width: 15px;
margin: 0 2px;
background-color: #bbbbbb;
border: none;
border-radius: 50%;
display: inline-block;
opacity: 0.5;
}
.step.active {
opacity: 1;
background-color: #1177BB;
}
/*页面中间区域 end}*/
/*以下为footer区域*/
.footer {
height: 60px;
line-height: 60px;
border-top: solid 1px #fff;
background-color: #f2f2f2;
}
.dark .footer {
border-top: solid 1px #cccccc;
background-color: #3C3C3C;
}
.btn-group {
margin-left: 10px;
margin-right: 10px;
}
.btn-group button {
background-color: #1177BB;
/* 蓝色背景 */
border: 1px solid #0e5483;
/* 蓝色边框 */
color: white;
/* 白色文本 */
/* padding: 8px 18px; */
/* 一些填充 */
cursor: pointer;
/* 指针/手形图标 */
/* width: 55px; */
}
.dark .btn-group button {
background-color: #0E639C;
/* 蓝色背景 */
}
/* 清除浮动clearfix hack*/
.btn-group:after {
content: "";
clear: both;
display: table;
}
.btn-group button:not(:last-child) {
border-right: none;
/* 防止双边框 */
}
/* 悬停时添加背景色 */
.btn-group button:hover {
background-color: #0E639C;
}
.dark .btn-group button:hover {
background-color: #1177BB;
}
.scenarioSelection {
font-size: h4; /* 调整字体大小为h3 */
/* font-weight: bold; 可选:设置字体加粗 */
}
h3{
font-size: 16px;
font-weight: bold;
margin-top:0px ;
margin-bottom: 0px;
}
.depOutputTextbox input[type="text"],
.depOutputTextbox #outputPre {
height: 360px ;
overflow:auto;
width: 600px;
margin-left: 40px;
background-color: transparent;
border-width: 1px solid black;
}
#depOutDesc {
margin-top: -30px;
width: 600px;
}
.depOutputTextbox {
margin-left: 20px;
}
.installSelection,
.updateInstallConfig,
.installInfoConfig {
font-size: 18px;
line-height: 2.0;
}
.installInfo1 {
height: auto;
}
#checkboxForm {
width: 180px;
}
.formSeparator {
border-left: 1px solid;
/* 设置竖线样式 */
height: 400px;
/* 设置竖线高度,可以根据需要调整 */
margin-left: 10px;
/* 设置与form之间的间距可以根据需要调整 */
}
input[readonly] {
background-color: rgba(255, 255, 255, 0.5);
width: 400px;
}
.progress-container {
display: flex;
align-items: center;
margin: -8px;
}
.progress-download,
.progress-install,
.pkg-progress-install,
.progressinfo
{
position: absolute; /* 添加绝对定位 */
margin-left: 18%;
color: #000000;
}
.download-view,
.install-view,
.pkg-install-view,
.progress-view
{
flex: 1;
height: 50px;
position: relative;
width: 800px;
margin-left: 8%;
}
.grey-progress-view {
flex: 1;
height: 26px;
position: relative;
width: 800px;
margin-left: 8%;
margin-top:10px;
margin-bottom: 8px;
border-radius: 30px;
background-color: grey;
border: 1px solid grey;
}
.detailInstallOutputTextbox{
margin-left: 8%;
font-weight: bold;
margin-top: 5px;
}
#detailInstallPre,
#installLogPre,
#extInstallLogPre {
height: 300px;
width: 700px;
flex: 1;
position: relative;
overflow-y: auto;
}
.dark{
color: #c6c6c6;
background-color: #3C3C3C;
}
pre .downloadHighlight::before {
content: "\2713"; /* Unicode对号字符 */
color: yellow;
margin-right: 5px;
}
pre .startHighlight::before {
content: "\25CF"; /* Unicode实心圆圈字符 */
color: gray;
margin-right: 5px;
}
pre .installedHighlight::before {
content: "\2713"; /* Unicode对号字符 */
color: green;
margin-right: 5px;
}
pre .depInstalledHighlight::before {
content: "\2713"; /* Unicode对号字符 */
color: green;
margin-right: 5px;
}
pre .depfailHighlight::before {
content: "\2717";
color: red;
margin-right: 5px;
}
.switchInstallOutput {
position: absolute;
bottom: 25px; /* 距离底部的距离,可以根据需要进行调整 */
}
.center div p {
margin-bottom: 0;
margin-top: 0;
font-size: 14px;
}
/* .graybt {
background-color:gray;
cursor:not-allowed;
}
button:disabled{
background-color:yellow;
}
.button.is-disabled, .button.is-disabled:focus, .button.is-disabled:hover{
background-color: gray;
border-color: transparent;
} */
button#prevStep:disabled ,
button#nextStep:disabled,
button#cancel:disabled
{
background-color: gray;
border-color: gray;
opacity: 0.5;
}
.checkbox {
-webkit-appearance:none;
-moz-appearance:none;
outline:none;
width:14px;
height:14px;
background:#fff;
vertical-align:middle;
}
.checkbox:checked{
background:#1177BB;
}
.checkbox:checked::after{
content:"";
height:5px;
width:8px;
border:#fff solid 2px;
position:absolute;
margin-top:2px;
margin-left:2px;
border-top:none;
border-right:none;
transform:rotate(-45deg);
}
.checkbox:disabled{
background: rgba(255, 255, 255, 0.5);
}
.checkboxselect {
-webkit-appearance:none;
-moz-appearance:none;
outline:none;
width:14px;
height:14px;
background:#1177BB;
vertical-align:middle;
}
.checkboxselect:checked{
background:#1177BB;
}
.checkboxselect:checked::after{
content:"";
height:5px;
width:8px;
border:#fff solid 2px;
position:absolute;
margin-top:2px;
margin-left:2px;
border-top:none;
border-right:none;
transform:rotate(-45deg);
}
.checkboxselect:disabled{
background: rgba(255, 255, 255, 0.5);
}

View File

@ -3,490 +3,503 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
html, html,
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100%; height: 100%;
font-family: "Segoe UI", "Helvetica Neue", "Helvetica", Arial, sans-serif; font-family: "Segoe UI", "Helvetica Neue", "Helvetica", Arial, sans-serif;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
} }
:focus-visible { :focus-visible {
outline: none; outline: none;
border: solid 1px #ff9c00; border: solid 1px #ff9c00;
border-radius: 2px; border-radius: 2px;
} }
.container { .container {
width: 100%; width: 100%;
height: 100%; height: 100%;
/* 很重要,不然flex不生效 */ /* 很重要,不然flex不生效 */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
color: #333333; color: #333333;
flex: 1; flex: 1;
} }
.overlay { .overlay {
position: fixed; position: fixed;
/* top: 0; /* top: 0;
left: 0; */ left: 0; */
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */ background: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
z-index: 9999; /* 确保蒙版在最前面 */ z-index: 9999; /* 确保蒙版在最前面 */
} }
.preparing-container { .preparing-container {
display: flex; display: flex;
margin-top:-200px ; margin-top:-200px ;
text-align: center; text-align: center;
color: #fff; color: #fff;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 100vh; height: 100vh;
flex-direction: column; flex-direction: column;
} }
.wait-container{ .wait-container{
display: block; display: block;
text-align: center; text-align: center;
width: 100%; width: 100%;
margin-top: 100px; margin-top: 100px;
} }
.header { .header {
cursor: move; cursor: move;
height: 45px; height: 45px;
border-bottom: 1px solid #fff; border-bottom: 1px solid #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 5px 2px 9px; padding: 5px 2px 9px;
-webkit-app-region: drag; -webkit-app-region: drag;
background-color: #f2f2f2; background-color: #f2f2f2;
} position:absolute;
#first ,#osInfoShow{ width:100%;
flex-direction: column; top:0px;
} }
.bodycontent { #first ,#osInfoShow{
display: flex; flex-direction: column;
width: 100%; }
height: 100%; .bodycontent {
flex:1; display: flex;
} width: 100%;
.content{ height: 100%;
width: 100%; flex:1;
height: 100%; top:45px;
display: flex; bottom: 65px;
flex-direction: column; position: absolute;
} }
.content{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
top:0px;
bottom: 0px;
position: absolute;
}
.dark .header { .dark .header {
color: #c6c6c6; color: #c6c6c6;
background-color: #3C3C3C; background-color: #3C3C3C;
} }
.title { .title {
float: left; float: left;
text-align: center; text-align: center;
margin: 5px; margin: 5px;
} }
.close { .close {
width: 25px; width: 25px;
height: 25px; height: 25px;
float: right; float: right;
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
cursor: pointer; cursor: pointer;
margin: 5px; margin: 5px;
text-align: center; text-align: center;
opacity:0.5; opacity:0.5;
background: url(../images/close_gray.png) no-repeat; background: url(../images/close_gray.png) no-repeat;
} }
.close:hover{ .close:hover{
opacity:1; opacity:1;
transform: scale(1.2); transform: scale(1.2);
} }
.dark .close { .dark .close {
background: url(../images/close.png); background: url(../images/close.png);
} }
/*页面中间区域 start {*/ /*页面中间区域 start {*/
.center { .center {
flex: 1; flex: 1;
padding: 10px; padding: 10px;
overflow: auto; overflow: auto;
color: #333333; color: #333333;
background-color: #F2F2F2; background-color: #F2F2F2;
position: relative; position: relative;
padding-left: 25px; padding-left: 25px;
} }
.dark .center { .dark .center {
color: #c6c6c6; color: #c6c6c6;
background-color: #3C3C3C; background-color: #3C3C3C;
} }
/* 默认隐藏所有步骤: */ /* 默认隐藏所有步骤: */
.tab { .tab {
display: none; display: none;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }
/* 默认隐藏所有步骤: */ /* 默认隐藏所有步骤: */
.downloadtab { .downloadtab {
display: none; display: none;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }
.localinstalltab{ .localinstalltab{
display: none; display: none;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }
.devContent { .devContent {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.devContentCol{ .devContentCol{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
/* 用圆圈表示表格的步骤: */ /* 用圆圈表示表格的步骤: */
.indicator { .indicator {
position: absolute; position: absolute;
bottom: 5px; bottom: 65px;
text-align: center; text-align: center;
left: 50%; left: 50%;
transform: translate(-50%); transform: translate(-50%);
} }
.step { .step {
height: 15px; height: 15px;
width: 15px; width: 15px;
margin: 0 2px; margin: 0 2px;
background-color: #bbbbbb; background-color: #bbbbbb;
border: none; border: none;
border-radius: 50%; border-radius: 50%;
display: inline-block; display: inline-block;
opacity: 0.5; opacity: 0.5;
} }
.step.active { .step.active {
opacity: 1; opacity: 1;
background-color: #1177BB; background-color: #1177BB;
} }
/*页面中间区域 end}*/ /*页面中间区域 end}*/
/*以下为footer区域*/ /*以下为footer区域*/
.footer { .footer {
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
border-top: solid 1px #fff; border-top: solid 1px #fff;
background-color: #f2f2f2; background-color: #f2f2f2;
} position:absolute;
bottom:0px;
width:100%;
}
.dark .footer { .dark .footer {
border-top: solid 1px #cccccc; border-top: solid 1px #cccccc;
background-color: #3C3C3C; background-color: #3C3C3C;
} }
.btn-group { .btn-group {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
} }
.btn-group button { .btn-group button {
background-color: #1177BB; background-color: #1177BB;
/* 蓝色背景 */ /* 蓝色背景 */
border: 1px solid #0e5483; border: 1px solid #0e5483;
/* 蓝色边框 */ /* 蓝色边框 */
color: white; color: white;
/* 白色文本 */ /* 白色文本 */
/* padding: 8px 18px; */ /* padding: 8px 18px; */
/* 一些填充 */ /* 一些填充 */
cursor: pointer; cursor: pointer;
/* 指针/手形图标 */ /* 指针/手形图标 */
/* width: 55px; */ /* width: 55px; */
} }
.dark .btn-group button { .dark .btn-group button {
background-color: #0E639C; background-color: #0E639C;
/* 蓝色背景 */ /* 蓝色背景 */
} }
/* 清除浮动clearfix hack*/ /* 清除浮动clearfix hack*/
.btn-group:after { .btn-group:after {
content: ""; content: "";
clear: both; clear: both;
display: table; display: table;
} }
.btn-group button:not(:last-child) { .btn-group button:not(:last-child) {
border-right: none; border-right: none;
/* 防止双边框 */ /* 防止双边框 */
} }
/* 悬停时添加背景色 */ /* 悬停时添加背景色 */
.btn-group button:hover { .btn-group button:hover {
background-color: #0E639C; background-color: #0E639C;
} }
.dark .btn-group button:hover { .dark .btn-group button:hover {
background-color: #1177BB; background-color: #1177BB;
} }
.scenarioSelection { .scenarioSelection {
font-size: h4; /* 调整字体大小为h3 */ font-size: h4; /* 调整字体大小为h3 */
/* font-weight: bold; 可选:设置字体加粗 */ /* font-weight: bold; 可选:设置字体加粗 */
} }
h3{ h3{
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
margin-top:0px ; margin-top:0px ;
margin-bottom: 0px; margin-bottom: 0px;
} }
.depOutputTextbox input[type="text"], .depOutputTextbox input[type="text"],
.depOutputTextbox #outputPre { .depOutputTextbox #outputPre {
height: 360px ; height: 330px ;
overflow:auto; overflow:auto;
width: 600px; width: 600px;
margin-left: 40px; margin-left: 40px;
background-color: transparent; background-color: transparent;
border-width: 1px solid black; border-width: 1px solid black;
} }
#depOutDesc { #depOutDesc {
margin-top: -30px; margin-top: -30px;
width: 600px; width: 600px;
} }
.depOutputTextbox { .depOutputTextbox {
margin-left: 20px; margin-left: 20px;
} }
.installSelection, .installSelection,
.updateInstallConfig, .updateInstallConfig,
.installInfoConfig { .installInfoConfig {
font-size: 18px; font-size: 18px;
line-height: 2.0; line-height: 2.0;
} }
.installInfo1 { .installInfo1 {
height: auto; height: auto;
} }
#checkboxForm { #checkboxForm {
width: 180px; width: 180px;
} }
.formSeparator { .formSeparator {
border-left: 1px solid; border-left: 1px solid;
/* 设置竖线样式 */ /* 设置竖线样式 */
height: 400px; height: 360px;
/* 设置竖线高度,可以根据需要调整 */ /* 设置竖线高度,可以根据需要调整 */
margin-left: 10px; margin-left: 10px;
/* 设置与form之间的间距可以根据需要调整 */ /* 设置与form之间的间距可以根据需要调整 */
} }
input[readonly] { input[readonly] {
background-color: rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.5);
width: 400px; width: 400px;
} }
.progress-container { .progress-container {
display: flex; display: flex;
align-items: center; align-items: center;
margin: -8px; margin: -8px;
} }
.progress-download, .progress-download,
.progress-install, .progress-install,
.pkg-progress-install, .pkg-progress-install,
.progressinfo .progressinfo
{ {
position: absolute; /* 添加绝对定位 */ position: absolute; /* 添加绝对定位 */
margin-left: 18%; margin-left: 18%;
color: #000000; color: #000000;
} }
.download-view, .download-view,
.install-view, .install-view,
.pkg-install-view, .pkg-install-view,
.progress-view .progress-view
{ {
flex: 1; flex: 1;
height: 50px; height: 50px;
position: relative; position: relative;
width: 800px; width: 800px;
margin-left: 8%; margin-left: 8%;
} }
.grey-progress-view { .grey-progress-view {
flex: 1; flex: 1;
height: 26px; height: 26px;
position: relative; position: relative;
width: 800px; width: 800px;
margin-left: 8%; margin-left: 8%;
margin-top:10px; margin-top:10px;
margin-bottom: 8px; margin-bottom: 8px;
border-radius: 30px; border-radius: 30px;
background-color: grey; background-color: grey;
border: 1px solid grey; border: 1px solid grey;
} }
.detailInstallOutputTextbox{ .detailInstallOutputTextbox{
margin-left: 8%; margin-left: 8%;
font-weight: bold; font-weight: bold;
margin-top: 5px; margin-top: 5px;
} }
#detailInstallPre, #detailInstallPre,
#installLogPre, #installLogPre,
#extInstallLogPre { #extInstallLogPre,
height: 300px; #finishPage
width: 700px; {
flex: 1; height: 300px;
position: relative; width: 700px;
overflow-y: auto; flex: 1;
} position: relative;
overflow-y: auto;
}
.dark{ .dark{
color: #c6c6c6; color: #c6c6c6;
background-color: #3C3C3C; background-color: #3C3C3C;
} }
pre .downloadHighlight::before { pre .downloadHighlight::before {
content: "\2713"; /* Unicode对号字符 */ content: "\2713"; /* Unicode对号字符 */
color: yellow; color: yellow;
margin-right: 5px; margin-right: 5px;
} }
pre .startHighlight::before { pre .startHighlight::before {
content: "\25CF"; /* Unicode实心圆圈字符 */ content: "\25CF"; /* Unicode实心圆圈字符 */
color: gray; color: gray;
margin-right: 5px; margin-right: 5px;
} }
pre .installedHighlight::before { pre .installedHighlight::before {
content: "\2713"; /* Unicode对号字符 */ content: "\2713"; /* Unicode对号字符 */
color: green; color: green;
margin-right: 5px; margin-right: 5px;
} }
pre .depInstalledHighlight::before { pre .depInstalledHighlight::before {
content: "\2713"; /* Unicode对号字符 */ content: "\2713"; /* Unicode对号字符 */
color: green; color: green;
margin-right: 5px; margin-right: 5px;
} }
pre .depfailHighlight::before { pre .depfailHighlight::before {
content: "\2717"; content: "\2717";
color: red; color: red;
margin-right: 5px; margin-right: 5px;
} }
.switchInstallOutput { .switchInstallOutput {
position: absolute; position: absolute;
bottom: 25px; /* 距离底部的距离,可以根据需要进行调整 */ }
} .center div p {
.center div p { margin-bottom: 0;
margin-bottom: 0; margin-top: 0;
margin-top: 0; font-size: 14px;
font-size: 14px; }
}
/* .graybt { /* .graybt {
background-color:gray; background-color:gray;
cursor:not-allowed; cursor:not-allowed;
} }
button:disabled{ button:disabled{
background-color:yellow; background-color:yellow;
} }
.button.is-disabled, .button.is-disabled:focus, .button.is-disabled:hover{ .button.is-disabled, .button.is-disabled:focus, .button.is-disabled:hover{
background-color: gray; background-color: gray;
border-color: transparent; border-color: transparent;
} */ } */
button#prevStep:disabled , button#prevStep:disabled ,
button#nextStep:disabled, button#nextStep:disabled,
button#cancel:disabled button#cancel:disabled
{ {
background-color: gray; background-color: gray;
border-color: gray; border-color: gray;
opacity: 0.5; opacity: 0.5;
} }
.checkbox { .checkbox {
-webkit-appearance:none; -webkit-appearance:none;
-moz-appearance:none; -moz-appearance:none;
outline:none; outline:none;
width:14px; width:14px;
height:14px; height:14px;
background:#fff; background:#fff;
vertical-align:middle; vertical-align:middle;
} }
.checkbox:checked{ .checkbox:checked{
background:#1177BB; background:#1177BB;
} }
.checkbox:checked::after{ .checkbox:checked::after{
content:""; content:"";
height:5px; height:5px;
width:8px; width:8px;
border:#fff solid 2px; border:#fff solid 2px;
position:absolute; position:absolute;
margin-top:2px; margin-top:2px;
margin-left:2px; margin-left:2px;
border-top:none; border-top:none;
border-right:none; border-right:none;
transform:rotate(-45deg); transform:rotate(-45deg);
} }
.checkbox:disabled{ .checkbox:disabled{
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
} }
.checkboxselect { .checkboxselect {
-webkit-appearance:none; -webkit-appearance:none;
-moz-appearance:none; -moz-appearance:none;
outline:none; outline:none;
width:14px; width:14px;
height:14px; height:14px;
background:#1177BB; background:#1177BB;
vertical-align:middle; vertical-align:middle;
} }
.checkboxselect:checked{ .checkboxselect:checked{
background:#1177BB; background:#1177BB;
} }
.checkboxselect:checked::after{ .checkboxselect:checked::after{
content:""; content:"";
height:5px; height:5px;
width:8px; width:8px;
border:#fff solid 2px; border:#fff solid 2px;
position:absolute; position:absolute;
margin-top:2px; margin-top:2px;
margin-left:2px; margin-left:2px;
border-top:none; border-top:none;
border-right:none; border-right:none;
transform:rotate(-45deg); transform:rotate(-45deg);
} }
.checkboxselect:disabled{ .checkboxselect:disabled{
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
} }

View File

@ -81,7 +81,7 @@
</div> </div>
<div class="tab" id="onlineInstallTab3"> <div class="tab" id="onlineInstallTab3">
<div class="installInfo1"> <div class="installInfo1">
<pre><h2>开发场景</h2><br></pre> <pre><h2>开发场景</h2></pre>
</div> </div>
<div class="devContent"> <div class="devContent">
<form id="checkboxForm"> <form id="checkboxForm">
@ -201,14 +201,9 @@
</div> </div>
<div class="localinstalltab" id="localInstallTab5"> <div class="localinstalltab" id="localInstallTab5">
</div> </div>
<div class="indicator" id="indicator">
<!-- <span class="step"></span>
<span class="step"></span>
<span class="step"></span>
<span class="step"></span> -->
</div>
</div> </div>
<div class="footer"> <!-- <div class="footer">
<div class="btn-group" style="float: left;"> <div class="btn-group" style="float: left;">
<button class="helpLink" id="helpLink"></button> <button class="helpLink" id="helpLink"></button>
<button class="skipAll" id="skipAll" style="display:none"></button> <button class="skipAll" id="skipAll" style="display:none"></button>
@ -218,16 +213,25 @@
<button class="cancel" id="cancel" style="display:none"></button> <button class="cancel" id="cancel" style="display:none"></button>
<button class="nextStep" id="nextStep" type="submit"></button> <button class="nextStep" id="nextStep" type="submit"></button>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
<div class="overlay" style="display:none"> <div class="indicator" id="indicator">
<!-- 准备工作消息容器 --> <!-- <span class="step"></span>
<div class="preparing-container"> <span class="step"></span>
<h3>请稍等片刻...</h3> <span class="step"></span>
<p>正在联网进行配置文件下载、检查、校验及本地配置文件的校验等工作</p> <span class="step"></span> -->
</div>
<div class="footer">
<div class="btn-group" style="float: left;">
<button class="helpLink" id="helpLink"></button>
<button class="skipAll" id="skipAll" style="display:none"></button>
</div>
<div class="btn-group right" style="float: right;">
<button class="prevStep" id="prevStep"></button>
<button class="cancel" id="cancel" style="display:none"></button>
<button class="nextStep" id="nextStep" type="submit"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -140,6 +140,7 @@ function setDisplayLanguage() {
document.getElementById("localInstall").innerText = setLanguage('localInstall'); document.getElementById("localInstall").innerText = setLanguage('localInstall');
document.getElementById("justDownload").innerText = setLanguage('justDownload'); document.getElementById("justDownload").innerText = setLanguage('justDownload');
document.getElementById('cancel').innerText = setLanguage('cancel'); document.getElementById('cancel').innerText = setLanguage('cancel');
document.getElementById('cancel').style.display = "none";
// document.getElementById("confirm").innerText = setLanguage('okStep'); // document.getElementById("confirm").innerText = setLanguage('okStep');
} }
@ -802,7 +803,7 @@ ipcRenderer.on('kylinide.installWizard.msg', (event, msg) => {
ipcRenderer.send('kylinide.installWizard.downloadExt', { ipcRenderer.send('kylinide.installWizard.downloadExt', {
extAddressPath: extAddressPath, extAddressPath: extAddressPath,
configList: configList configList: configList
}) });
} else if (msg.type === "scriptExecFail") { } else if (msg.type === "scriptExecFail") {
// console.log("kylinide.installWizard.msg:scriptExecFail"); // console.log("kylinide.installWizard.msg:scriptExecFail");
progressNum++; progressNum++;
@ -885,7 +886,7 @@ ipcRenderer.on('kylinide.installWizard.msg', (event, msg) => {
//检查所有的开发场景是否都安装成功 //检查所有的开发场景是否都安装成功
let writeKeyJson = []; let writeKeyJson = [];
let preFinish = document.getElementById("finishPage"); let preFinish = document.getElementById("finishPage");
let showContext = preFinish.innerHTML; let showContext = "";
showContext += "安装结束\n"; showContext += "安装结束\n";
for (let key in configList) { for (let key in configList) {
@ -950,7 +951,7 @@ ipcRenderer.on("kylinide.installWizard.cancelinstall", (event, msg) => {
if (msg.type == "cancelinstall") { if (msg.type == "cancelinstall") {
finishFlag = 0; finishFlag = 0;
let preFinish = document.getElementById("finishPage"); let preFinish = document.getElementById("finishPage");
let showContext = preFinish.innerHTML; let showContext = '';
showContext += "取消安装\n"; showContext += "取消安装\n";
showContext += "点击结束按钮退出安装向导\n" showContext += "点击结束按钮退出安装向导\n"
preFinish.innerHTML = showContext; preFinish.innerHTML = showContext;