Slight tweaks to app.ts, added environment var that displays renderer logs in console
This commit is contained in:
parent
7318aa8aab
commit
6dad815d48
3 changed files with 15 additions and 21 deletions
|
@ -15,9 +15,8 @@
|
||||||
"buildResources": "resources",
|
"buildResources": "resources",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"init": "install --force",
|
|
||||||
"watch": "tsc --watch",
|
"watch": "tsc --watch",
|
||||||
"start": "npm run build && electron ./build/index.js --enable-accelerated-mjpeg-decode --enable-accelerated-video --disable-gpu-driver-bug-workarounds --ignore-gpu-blacklist --enable-native-gpu-memory-buffers",
|
"start": "npm run build && ELECTRON_ENABLE_LOGGING=true electron ./build/index.js --enable-accelerated-mjpeg-decode --enable-accelerated-video --disable-gpu-driver-bug-workarounds --ignore-gpu-blacklist --enable-native-gpu-memory-buffers",
|
||||||
"pack": "electron-builder --dir",
|
"pack": "electron-builder --dir",
|
||||||
"dist": "npm run build && electron-builder",
|
"dist": "npm run build && electron-builder",
|
||||||
"msft": "electron-builder -c msft-package.json",
|
"msft": "electron-builder -c msft-package.json",
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
import * as electron from 'electron';
|
import * as electron from 'electron';
|
||||||
|
|
||||||
export class App {
|
export class AppEvents {
|
||||||
constructor() {
|
constructor(store: any) {
|
||||||
console.log('App started');
|
console.log('App started');
|
||||||
|
|
||||||
|
AppEvents.start(store);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all actions that occur for the app on start (Mainly commandline arguments)
|
* Handles all actions that occur for the app on start (Mainly commandline arguments)
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
public start(store: any): void {
|
private static start(store: any): void {
|
||||||
console.log('App started');
|
console.log('App started');
|
||||||
|
|
||||||
switch (store.get("visual.hw_acceleration")) {
|
switch (store.get("visual.hw_acceleration")) {
|
||||||
|
@ -38,7 +40,7 @@ export class App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public stop() {
|
public quit() {
|
||||||
console.log('App stopped');
|
console.log('App stopped');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,16 @@
|
||||||
require('v8-compile-cache');
|
require('v8-compile-cache');
|
||||||
|
|
||||||
import { app } from 'electron';
|
|
||||||
// import { resolve } from 'path';
|
|
||||||
|
|
||||||
// Analytics for debugging fun yeah.
|
// Analytics for debugging fun yeah.
|
||||||
// const ElectronSentry = require("@sentry/electron");
|
const ElectronSentry = require("@sentry/electron");
|
||||||
// ElectronSentry.init({ dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214" });
|
ElectronSentry.init({dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214"});
|
||||||
//
|
|
||||||
// // const {Init} = require("./src/main/cider-base");
|
|
||||||
// // Init()
|
|
||||||
//
|
|
||||||
|
|
||||||
|
import {app} from 'electron';
|
||||||
import {Win} from "./base/win";
|
import {Win} from "./base/win";
|
||||||
import {ConfigStore} from "./base/store";
|
import {ConfigStore} from "./base/store";
|
||||||
|
import {AppEvents} from "./base/app";
|
||||||
|
|
||||||
const config = new ConfigStore();
|
const config = new ConfigStore();
|
||||||
console.log(config)
|
const App = new AppEvents(config.store);
|
||||||
|
|
||||||
const Cider = new Win(app, config.store)
|
const Cider = new Win(app, config.store)
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -24,7 +18,7 @@ const Cider = new Win(app, config.store)
|
||||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
|
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
|
App.ready();
|
||||||
|
|
||||||
console.log('[Cider] Application is Ready. Creating Window.')
|
console.log('[Cider] Application is Ready. Creating Window.')
|
||||||
if (!app.isPackaged) {
|
if (!app.isPackaged) {
|
||||||
|
@ -32,10 +26,9 @@ app.on('ready', () => {
|
||||||
require('vue-devtools').install()
|
require('vue-devtools').install()
|
||||||
}
|
}
|
||||||
|
|
||||||
Cider.createWindow();
|
Cider.createWindow();
|
||||||
|
|
||||||
// CiderBase.Start()
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// app.on('before-quit', () => {
|
// app.on('before-quit', () => {
|
||||||
// app.isQuiting = true;
|
// app.isQuiting = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue