fix
w1146869587
2022-03-09 f9b07877ce4e8a19322425a5dd24503c0bcd8892
fix
1个文件已修改
14 ■■■■ 已修改文件
mbsetup/packages/cm.xinhan.mbc/meta/installscript.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mbsetup/packages/cm.xinhan.mbc/meta/installscript.js
@@ -125,7 +125,8 @@
            component.addOperation("Execute", "@TargetDir@/mbwatch.exe", "start", ""); 
           
       } 
       console.log(systemInfo.kernelType );
       console.log("wwweeew");
       if(systemInfo.kernelType === "linux"){
            this.operationForLinux();
@@ -198,11 +199,18 @@
    var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
    if (widget != null) {
        var dir = widget.targetDirectory.text;
        if (installer.fileExists(dir) && installer.fileExists(dir + "/mbc.exe")) {
        var appName =  dir;
        if (systemInfo.productType === "windows"){
            appName +=  "/mbc.exe"
        }else{
             appName +=  "/mbc"
        }
        if (installer.fileExists(dir) && installer.fileExists(appName)) {
                widget.warning.setText("<p style=\"color: red\">检测到程序已安装,继续将会被覆盖。</p>");
        } else {
                widget.warning.setText("");
        }
        installer.setValue("TargetDir", dir); 
        widget.complete = true;
@@ -293,4 +301,4 @@
    if (widget != null)
        widget.complete = checked;