mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-20 17:01:47 +03:00
Fixed actions execution issues in the launcher's core libraries
This commit is contained in:
parent
6257c7fab4
commit
081a330830
5 changed files with 25 additions and 20 deletions
|
@ -11,7 +11,7 @@
|
|||
"check": "svelte-check --tsconfig ./tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@empathize/framework": "^1.4.2",
|
||||
"@empathize/framework": "^1.4.3",
|
||||
"js-md5": "^0.7.3",
|
||||
"semver": "^7.3.5",
|
||||
"svelte-i18n": "^3.3.13",
|
||||
|
|
|
@ -3,8 +3,8 @@ import { Configs, promisify } from './empathize';
|
|||
import constants from './ts/Constants';
|
||||
import Locales from './ts/launcher/Locales';
|
||||
|
||||
promisify(async () => {
|
||||
Configs.defaults({
|
||||
export default new Promise<void>(async (resolve) => {
|
||||
await Configs.defaults({
|
||||
lang: {
|
||||
launcher: await Locales.system(),
|
||||
voice: [
|
||||
|
@ -199,4 +199,6 @@ promisify(async () => {
|
|||
launcher: '5d'
|
||||
}
|
||||
});
|
||||
|
||||
resolve();
|
||||
});
|
||||
|
|
|
@ -17,16 +17,6 @@
|
|||
import GearActive from './assets/images/gear-active.png';
|
||||
import Download from './assets/images/cloud-download.png';
|
||||
|
||||
constants.paths.launcherDir.then((dir) => {
|
||||
// Create launcher folder if it doesn't exist
|
||||
Neutralino.filesystem.getStats(dir)
|
||||
.catch(() => Neutralino.filesystem.createDirectory(dir));
|
||||
|
||||
// Create logs folder if it doesn't exist
|
||||
Neutralino.filesystem.getStats(`${dir}/logs`)
|
||||
.catch(() => Neutralino.filesystem.createDirectory(`${dir}/logs`));
|
||||
});
|
||||
|
||||
const launcher = new Launcher(onMount);
|
||||
|
||||
Neutralino.events.on('ready', () => {
|
||||
|
|
|
@ -5,8 +5,6 @@ declare const Neutralino;
|
|||
|
||||
Neutralino.init();
|
||||
|
||||
Neutralino.events.on('ready', () => import('../defaultSettings'));
|
||||
|
||||
const app = new App({
|
||||
target: document.getElementById('app')!
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ import { locale } from 'svelte-i18n';
|
|||
|
||||
import {
|
||||
Windows, Process, Tray,
|
||||
Configs, Debug, IPC
|
||||
Configs, Debug, IPC, fs, path
|
||||
} from '../empathize';
|
||||
|
||||
import constants from './Constants';
|
||||
|
@ -36,11 +36,26 @@ export default class Launcher
|
|||
this.tray = new Tray(`/public/icons/256x256.png`);
|
||||
this.tray.update();
|
||||
|
||||
this.updateDiscordRPC('in-launcher');
|
||||
onMount(async () => {
|
||||
const launcherDir = await constants.paths.launcherDir;
|
||||
|
||||
onMount(() => {
|
||||
this.progressBar = new ProgressBar(this);
|
||||
this.state = new State(this);
|
||||
// Create launcher folder if it doesn't exist
|
||||
if (!await fs.exists(launcherDir))
|
||||
await fs.mkdir(launcherDir);
|
||||
|
||||
// Create logs folder if it doesn't exist
|
||||
if (!await fs.exists(path.join(launcherDir, 'logs')))
|
||||
await fs.mkdir(path.join(launcherDir, 'logs'));
|
||||
|
||||
// Applying default settings
|
||||
const defaultSetings = (await import('../defaultSettings')).default;
|
||||
|
||||
defaultSetings.then(() => {
|
||||
this.updateDiscordRPC('in-launcher');
|
||||
|
||||
this.progressBar = new ProgressBar(this);
|
||||
this.state = new State(this);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue