This commit is contained in:
Izuco 2022-02-20 19:51:42 +01:00
parent 750bcc0e8a
commit a307b9b1ed
6 changed files with 7845 additions and 457 deletions

View file

@ -1,4 +1,3 @@
lib
/videos/*.ts
crunchy
build

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,4 +1,4 @@
import { app, BrowserWindow, dialog } from 'electron';
import { app, BrowserWindow, dialog, } from 'electron';
import path from 'path/posix';
import registerMessageHandler from './messageHandler';
import fs from 'fs';
@ -7,6 +7,14 @@ import express from "express";
import { Console } from 'console';
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 = () => {
switch (process.platform) {
case "darwin": {
@ -81,6 +89,8 @@ const createWindow = async () => {
icon,
});
mainWindow.webContents.on('crashed', (e) => console.log(e));
if (!process.env.TEST) {
const response = dialog.showMessageBoxSync(mainWindow, {
title: 'Test Version Information',
@ -94,7 +104,8 @@ const createWindow = async () => {
],
type: 'info'
});
if (response !== 1)
console.log(`[INFO] Popup response: ${response}`);
if (response !== 1 && response !== -1)
app.quit();
}

View file

@ -37,7 +37,7 @@ function getCommand(buildType: BuildTypes) {
case 'windows64':
return '--win';
case 'macos64':
return '--mac';
return '--mac dmg';
default:
return '--error'
}
@ -50,7 +50,7 @@ function getOutputFileName(buildType: BuildTypes) {
case 'windows64':
return `${pkg.name} Setup ${pkg.version}.exe`;
case 'macos64':
return '';
return `${pkg.name}-${pkg.version}.dmg`;
default:
throw new Error(`Unknown build type ${buildType}`);
}

8277
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -44,6 +44,7 @@
"yargs": "^17.2.1"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/fs-extra": "^9.0.13",
"@types/json5": "^2.2.0",
"@types/node": "^16.11.9",
@ -53,7 +54,9 @@
"@vercel/webpack-asset-relocator-loader": "^1.7.0",
"css-loader": "^6.5.1",
"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-react": "^7.28.0",
"fork-ts-checker-webpack-plugin": "^6.5.0",