Skip to content

Commit

Permalink
chore: remove unuse code
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 2, 2023
1 parent 976f3ff commit 08d5ed8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
1 change: 0 additions & 1 deletion publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
35 changes: 0 additions & 35 deletions src/app/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ 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';
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';

Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 08d5ed8

Please sign in to comment.