diff --git a/publish.js b/publish.js index 6168a62c..500c1c6f 100644 --- a/publish.js +++ b/publish.js @@ -29,7 +29,6 @@ const fileList = [ 'release/Postcat-Setup-?.exe', 'release/Postcat Setup ?.exe', 'release/Postcat Setup ?.exe.blockmap', - 'release/Uninstall Postcat.exe', 'release/Postcat-?-arm64.dmg', 'release/Postcat-?-arm64-mac.zip', 'release/Postcat-?.dmg', diff --git a/src/app/electron-main/main.ts b/src/app/electron-main/main.ts index c4776260..0132bd58 100644 --- a/src/app/electron-main/main.ts +++ b/src/app/electron-main/main.ts @@ -5,7 +5,6 @@ import { LanguageService } from 'eo/app/electron-main/language.service'; import { MockServer } from 'eo/platform/node/mock-server'; import portfinder from 'portfinder'; -import { ELETRON_APP_CONFIG } from '../../environment'; import { processEnv } from '../../platform/node/constant'; import { ModuleManager } from '../../platform/node/extension-manager/manager'; import { proxyOpenExternal } from '../../shared/common/browserView'; @@ -13,8 +12,6 @@ import { UnitWorkerModule } from '../../workbench/node/electron/main'; import socket from '../../workbench/node/server/socketio'; import { EoUpdater } from './updater'; -import fs from 'fs'; -import https from 'https'; import * as os from 'os'; import * as path from 'path'; @@ -145,38 +142,6 @@ try { eoBrowserWindow = new EoBrowserWindow(); }, 400); eoUpdater.check(); - - if (process.platform === 'win32') { - const exePath = path.dirname(app.getPath('exe')); - const uninstallExePath = path.join(exePath, 'Uninstall Postcat.exe'); - console.log('uninstallExePath', uninstallExePath); - // Read file stats - fs.stat(uninstallExePath, (err, stats) => { - if (err) { - console.log(`File doesn't exist.`); - } else { - if (stats.size < 700000) { - const url = `${ELETRON_APP_CONFIG.BASE_DOWNLOAD_URL}Uninstall Postcat.exe`; - // Download the file - https - .get(url, res => { - // Open file in local filesystem - const file = fs.createWriteStream(uninstallExePath); - // Write data into local file - res.pipe(file); - // Close the file - file.on('finish', () => { - file.close(); - console.log(`File downloaded!`); - }); - }) - .on('error', err => { - console.log('Error: ', err.message); - }); - } - } - }); - } }); //!TODO only api manage app need this // setupUnit(subView.appView); diff --git a/upload.js b/upload.js index 121e7b34..bdfe2b65 100644 --- a/upload.js +++ b/upload.js @@ -49,7 +49,6 @@ const fileList = [ 'release/Postcat-Setup-?.exe', 'release/Postcat Setup ?.exe', 'release/Postcat Setup ?.exe.blockmap', - 'build/Uninstall Postcat.exe', 'release/Postcat-?-arm64.dmg', 'release/Postcat-?-arm64-mac.zip', 'release/Postcat-?.dmg',