2019-06-26 16:09:01 -04:00
|
|
|
import * as electron from "electron";
|
|
|
|
import * as os from "os";
|
|
|
|
|
|
|
|
{
|
|
|
|
const app_path = electron.app.getAppPath();
|
|
|
|
console.log("Native module path: %s", app_path + "/native/build/" + os.platform() + "_" + os.arch() + "/");
|
|
|
|
}
|
|
|
|
|
|
|
|
import * as crash_handler from "./modules/crash_handler";
|
|
|
|
|
|
|
|
const is_electron_run = process.argv[0].endsWith("electron") || process.argv[0].endsWith("electron.exe");
|
|
|
|
const process_arguments = is_electron_run ? process.argv.slice(2) : process.argv.slice(1);
|
|
|
|
if(process_arguments.length > 0 && process_arguments[0] === "crash-handler") {
|
|
|
|
/* crash handler callback */
|
|
|
|
crash_handler.handle_crash_callback(process_arguments.slice(1));
|
|
|
|
} else {
|
2019-09-06 04:22:47 -04:00
|
|
|
if(process_arguments.length > 0 && process_arguments[0] == "--main-crash-handler")
|
|
|
|
crash_handler.initialize_handler("main", is_electron_run);
|
2019-06-26 16:09:01 -04:00
|
|
|
/* app execute */
|
|
|
|
{
|
|
|
|
const versions = process.versions;
|
|
|
|
console.log("Versions:");
|
|
|
|
console.log(" TeaSpeak Client: " + electron.app.getVersion());
|
|
|
|
|
|
|
|
for (const key of Object.keys(versions))
|
|
|
|
console.log(" %s: %s", key, versions[key]);
|
|
|
|
}
|
|
|
|
|
|
|
|
const tea_client = require("./modules/core/main.js");
|
|
|
|
tea_client.execute();
|
|
|
|
}
|