Commit 4a094464 authored by Medicean's avatar Medicean

git 用户更新时使用 git 更新

parent 9f71bb15
......@@ -308,6 +308,12 @@ ipcRenderer
form.attachEvent("onButtonClick", (name)=>{
switch (name) {
case "updatebtn":
var workdir = antSword.remote.process.env.AS_WORKDIR;
if(fs.existsSync(path.join(workdir, ".git/"))){
win.close();
layer.alert(LANG["message"]["githint"](workdir));
return
}
const hash = (String(+new Date) + String(Math.random())).substr(10, 10).replace('.', '_');
//折叠
win.win.park();
......
......@@ -454,6 +454,7 @@ module.exports = {
}
},
message: {
githint: (workdir)=>`The current source is Git management, please close the program and go to ${workdir} to manually update`,
prepare: "Connecte to server...",
dling: (progress)=> `Downloading...${progress}%`,
dlingnp: (size)=> `Downloading...${size}`,
......
......@@ -455,6 +455,7 @@ module.exports = {
}
},
message: {
githint: (workdir)=>`当前源码为Git管理,请关闭程序并前往 ${workdir} 手动更新`,
prepare: "连接更新服务器...",
dling: (progress)=> `正在下载更新包...${progress}%`,
dlingnp: (size)=> `正在下载更新包...${size}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment