mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-05-21 00:52:24 +00:00
Fix #258
This commit is contained in:
parent
750bcc0e8a
commit
a307b9b1ed
6 changed files with 7845 additions and 457 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
lib
|
lib
|
||||||
/videos/*.ts
|
/videos/*.ts
|
||||||
crunchy
|
|
||||||
build
|
build
|
||||||
BIN
build/Icon.png
BIN
build/Icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 16 KiB |
|
|
@ -1,4 +1,4 @@
|
||||||
import { app, BrowserWindow, dialog } from 'electron';
|
import { app, BrowserWindow, dialog, } from 'electron';
|
||||||
import path from 'path/posix';
|
import path from 'path/posix';
|
||||||
import registerMessageHandler from './messageHandler';
|
import registerMessageHandler from './messageHandler';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
@ -7,6 +7,14 @@ import express from "express";
|
||||||
import { Console } from 'console';
|
import { Console } from 'console';
|
||||||
import json from '../../../package.json';
|
import json from '../../../package.json';
|
||||||
|
|
||||||
|
process.on('uncaughtException', (er, or) => {
|
||||||
|
console.error(er, or);
|
||||||
|
});
|
||||||
|
|
||||||
|
process.on('unhandledRejection', (er, pr) => {
|
||||||
|
console.log(er, pr);
|
||||||
|
});
|
||||||
|
|
||||||
const getDataDirectory = () => {
|
const getDataDirectory = () => {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
|
|
@ -81,6 +89,8 @@ const createWindow = async () => {
|
||||||
icon,
|
icon,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mainWindow.webContents.on('crashed', (e) => console.log(e));
|
||||||
|
|
||||||
if (!process.env.TEST) {
|
if (!process.env.TEST) {
|
||||||
const response = dialog.showMessageBoxSync(mainWindow, {
|
const response = dialog.showMessageBoxSync(mainWindow, {
|
||||||
title: 'Test Version Information',
|
title: 'Test Version Information',
|
||||||
|
|
@ -94,7 +104,8 @@ const createWindow = async () => {
|
||||||
],
|
],
|
||||||
type: 'info'
|
type: 'info'
|
||||||
});
|
});
|
||||||
if (response !== 1)
|
console.log(`[INFO] Popup response: ${response}`);
|
||||||
|
if (response !== 1 && response !== -1)
|
||||||
app.quit();
|
app.quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ function getCommand(buildType: BuildTypes) {
|
||||||
case 'windows64':
|
case 'windows64':
|
||||||
return '--win';
|
return '--win';
|
||||||
case 'macos64':
|
case 'macos64':
|
||||||
return '--mac';
|
return '--mac dmg';
|
||||||
default:
|
default:
|
||||||
return '--error'
|
return '--error'
|
||||||
}
|
}
|
||||||
|
|
@ -50,7 +50,7 @@ function getOutputFileName(buildType: BuildTypes) {
|
||||||
case 'windows64':
|
case 'windows64':
|
||||||
return `${pkg.name} Setup ${pkg.version}.exe`;
|
return `${pkg.name} Setup ${pkg.version}.exe`;
|
||||||
case 'macos64':
|
case 'macos64':
|
||||||
return '';
|
return `${pkg.name}-${pkg.version}.dmg`;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unknown build type ${buildType}`);
|
throw new Error(`Unknown build type ${buildType}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8277
package-lock.json
generated
8277
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -44,6 +44,7 @@
|
||||||
"yargs": "^17.2.1"
|
"yargs": "^17.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.13",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/json5": "^2.2.0",
|
"@types/json5": "^2.2.0",
|
||||||
"@types/node": "^16.11.9",
|
"@types/node": "^16.11.9",
|
||||||
|
|
@ -53,7 +54,9 @@
|
||||||
"@vercel/webpack-asset-relocator-loader": "^1.7.0",
|
"@vercel/webpack-asset-relocator-loader": "^1.7.0",
|
||||||
"css-loader": "^6.5.1",
|
"css-loader": "^6.5.1",
|
||||||
"electron": "16.0.7",
|
"electron": "16.0.7",
|
||||||
"eslint": "^7.30.0",
|
"electron-builder": "^22.14.13",
|
||||||
|
"eslint": "^8.9.0",
|
||||||
|
"eslint-config-react-app": "^7.0.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.25.4",
|
||||||
"eslint-plugin-react": "^7.28.0",
|
"eslint-plugin-react": "^7.28.0",
|
||||||
"fork-ts-checker-webpack-plugin": "^6.5.0",
|
"fork-ts-checker-webpack-plugin": "^6.5.0",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue