mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-11-29 18:28:09 +08:00
chore: remove unuse code
This commit is contained in:
parent
976f3ff2bb
commit
08d5ed82bb
@ -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',
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user