Browse Source

mod:自动更新 test

panqiuyao 11 months ago
parent
commit
7d69ccb009
4 changed files with 16 additions and 5 deletions
  1. 1 1
      electron/config/builder.json
  2. 1 1
      electron/config/config.default.js
  3. 13 2
      electron/controller/utils.js
  4. 1 1
      package.json

+ 1 - 1
electron/config/builder.json

@@ -34,7 +34,7 @@
   "publish": [
   "publish": [
     {
     {
       "provider": "generic",
       "provider": "generic",
-      "url": "https://github.com/wallace5303/electron-egg"
+      "url": "http://tkkexe.pubdata.cn/tkk"
     }
     }
   ],
   ],
   "mac": {
   "mac": {

+ 1 - 1
electron/config/config.default.js

@@ -180,7 +180,7 @@ module.exports = (appInfo) => {
       linux: true,
       linux: true,
       options: {
       options: {
         provider: "generic",
         provider: "generic",
-        url: "https://ossimg.valimart.net/tkk/",
+        url: "http://tkkexe.pubdata.cn/tkk/",
       },
       },
       force: true,
       force: true,
     },
     },

+ 13 - 2
electron/controller/utils.js

@@ -3,6 +3,7 @@
 const { Controller } = require('ee-core');
 const { Controller } = require('ee-core');
 const { shell  } = require('electron');
 const { shell  } = require('electron');
 const Log = require('ee-core/log');
 const Log = require('ee-core/log');
+const autoUpdater = require('../addon/autoUpdater');
 
 
 /**
 /**
  * example
  * example
@@ -28,10 +29,20 @@ class UtilsController extends Controller {
     // const result = await Services.get('example').test('electron');
     // const result = await Services.get('example').test('electron');
     Log.info(params)
     Log.info(params)
     Log.info(decodeURIComponent(params))
     Log.info(decodeURIComponent(params))
-    shell.openPath(params);
+  //  shell.openPath(params);
   }
   }
   async shellFun (params) {
   async shellFun (params) {
-    shell[params.action](params.params)
+  //  shell[params.action](params.params)
+  }
+
+  async checkUpdate () {
+
+    let updaterAddon = new autoUpdater();
+    updaterAddon.create();
+
+    if(updaterAddon.checkUpdate()){
+      return
+    }
   }
   }
 }
 }
 
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "tkk",
   "name": "tkk",
-  "version": "1.0.0",
+  "version": "1.1.0",
   "description": "图扣扣,AI图片处理,图片编辑智能修图,在线图片优化,自动抠图,图片背景移除,照片美化,批量图片处理,高清图片还原,创意图片合成",
   "description": "图扣扣,AI图片处理,图片编辑智能修图,在线图片优化,自动抠图,图片背景移除,照片美化,批量图片处理,高清图片还原,创意图片合成",
   "main": "main.js",
   "main": "main.js",
   "scripts": {
   "scripts": {