Some minor fixes
This commit is contained in:
parent
467d228e23
commit
97edf1b003
@ -43,6 +43,7 @@ options.protocols = [{name: "TeaSpeak - Connect", schemes: ["teaserver"]}];
|
||||
options.overwrite = true;
|
||||
options.derefSymlinks = true;
|
||||
options.buildVersion = version.toString(true);
|
||||
options.asar = true;
|
||||
|
||||
interface ProjectEntry {
|
||||
type: ProjectEntryType;
|
||||
@ -112,13 +113,14 @@ project_files.push({
|
||||
|
||||
if(process.argv.length < 4) {
|
||||
console.error("Missing process argument:");
|
||||
console.error("<win32/linux> <release/beta>");
|
||||
console.error("<win32/linux> <release/beta/nightly>");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
switch (process.argv[3]) {
|
||||
case "release":
|
||||
case "beta":
|
||||
case "nightly":
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -123,4 +123,4 @@ function deploy_client() {
|
||||
#compile_scripts
|
||||
#compile_native
|
||||
package_client
|
||||
#deploy_client
|
||||
deploy_client
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { app } from "electron";
|
||||
import { mainWindow } from "./main-window";
|
||||
import {getMainWindow} from "./windows/main-window/controller/MainWindow";
|
||||
|
||||
export function handleSecondInstanceCall(argv: string[], _workingDirectory: string) {
|
||||
const original_args = argv.slice(1).filter(e => !e.startsWith("--original-process-start-time=") && e != "--allow-file-access-from-files");
|
||||
console.log("Second instance: %o", original_args);
|
||||
|
||||
const mainWindow = getMainWindow()
|
||||
if(!mainWindow) {
|
||||
console.warn("Ignoring second instance call because we haven't yet started");
|
||||
return;
|
||||
@ -15,10 +16,10 @@ export function handleSecondInstanceCall(argv: string[], _workingDirectory: stri
|
||||
}
|
||||
|
||||
export function execute_connect_urls(argv: string[]) {
|
||||
const connect_urls = argv.filter(e => e.startsWith("teaclient://"));
|
||||
for(const url of connect_urls) {
|
||||
const connectUrls = argv.filter(e => e.startsWith("teaclient://"));
|
||||
for(const url of connectUrls) {
|
||||
console.log("Received connect url: %s", url);
|
||||
mainWindow.webContents.send('connect', url);
|
||||
getMainWindow().webContents.send('connect', url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,6 @@ export async function fetchRemoteUpdateData() : Promise<UpdateData> {
|
||||
export async function availableRemoteChannels() : Promise<string[]> {
|
||||
const versions = (await fetchRemoteUpdateData()).versions.map(e => e.channel);
|
||||
|
||||
versions.push("beta");
|
||||
return [...new Set(versions)];
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,6 @@ export let is_debug: boolean;
|
||||
export let allow_dev_tools: boolean;
|
||||
|
||||
import {Arguments, processArguments} from "../../shared/process-arguments";
|
||||
import * as url from "url";
|
||||
import {loadWindowBounds, startTrackWindowBounds} from "../../shared/window";
|
||||
import {referenceApp, dereferenceApp} from "../AppInstance";
|
||||
import {closeURLPreview, openURLPreview} from "../url-preview";
|
||||
import {
|
||||
getLoaderWindow,
|
||||
hideAppLoaderWindow,
|
||||
@ -17,20 +13,16 @@ import {
|
||||
} from "../windows/app-loader/controller/AppLoader";
|
||||
import {loadUiPack} from "../ui-loader/Loader";
|
||||
import {loadLocalUiCache} from "../ui-loader/Cache";
|
||||
import {showMainWindow} from "../windows/main-window/controller/MainWindow";
|
||||
import {closeMainWindow, showMainWindow} from "../windows/main-window/controller/MainWindow";
|
||||
import {showUpdateWindow} from "../windows/client-updater/controller/ClientUpdate";
|
||||
import {
|
||||
clientUpdateChannel,
|
||||
currentClientVersion,
|
||||
availableClientUpdate,
|
||||
setClientUpdateChannel,
|
||||
initializeAppUpdater
|
||||
} from "../app-updater";
|
||||
import * as app_updater from "../app-updater";
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
export let mainWindow: BrowserWindow = null;
|
||||
import {referenceApp} from "../AppInstance";
|
||||
|
||||
export async function execute() {
|
||||
console.log("Main app executed!");
|
||||
@ -50,10 +42,6 @@ export async function execute() {
|
||||
const version = await app_updater.currentClientVersion();
|
||||
global["app_version_client"] = version.toString();
|
||||
|
||||
/* FIXME! */
|
||||
await showUpdateWindow();
|
||||
return;
|
||||
|
||||
setAppLoaderStatus("Checking for updates", .1);
|
||||
try {
|
||||
if(processArguments.has_value(Arguments.UPDATER_CHANNEL)) {
|
||||
@ -101,11 +89,7 @@ export async function execute() {
|
||||
hideAppLoaderWindow();
|
||||
console.error("Failed to load ui: %o", error);
|
||||
|
||||
if(mainWindow) {
|
||||
mainWindow.close();
|
||||
mainWindow = undefined;
|
||||
}
|
||||
|
||||
closeMainWindow(true);
|
||||
await dialog.showMessageBox({
|
||||
type: "error",
|
||||
buttons: ["exit"],
|
||||
|
@ -9,10 +9,9 @@ import {
|
||||
newestRemoteClientVersion, prepareUpdateExecute, setClientUpdateChannel,
|
||||
UpdateVersion
|
||||
} from "../../../app-updater";
|
||||
import {mainWindow} from "../../../main-window";
|
||||
import {closeMainWindow} from "../../main-window/controller/MainWindow";
|
||||
|
||||
const kDeveloperTools = true;
|
||||
const kDeveloperTools = false;
|
||||
|
||||
let windowInstance: BrowserWindow;
|
||||
let windowSpawnPromise: Promise<void>;
|
||||
|
@ -108,4 +108,8 @@ export function closeMainWindow(force: boolean) {
|
||||
if(force) {
|
||||
windowInstance?.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
export function getMainWindow() : BrowserWindow {
|
||||
return windowInstance;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "TeaClient",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.0-1",
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
Loading…
Reference in New Issue
Block a user