Fixed game launching, removed excess code

This commit is contained in:
Observer KRypt0n_ 2022-01-03 23:18:00 +02:00
parent 8260d1b975
commit d2764d3d34
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
6 changed files with 5 additions and 25 deletions

View file

@ -1,6 +1,6 @@
{
"applicationId": "com.krypt0nn.an-anime-game-launcher",
"version": "2.0.0-beta-3",
"version": "2.0.0-beta-4",
"defaultMode": "window",
"port": 0,
"documentRoot": "/bundle/",

View file

@ -1,6 +1,6 @@
{
"name": "an-anime-game-launcher",
"version": "2.0.0-beta-3",
"version": "2.0.0-beta-4",
"license": "GPL-3.0",
"type": "module",
"scripts": {

View file

@ -39,7 +39,7 @@ const bundler = new Bundler({
output: path.join(__dirname, '../dist/An Anime Game Launcher.AppImage'),
// Application version
version: '2.0.0-beta-3'
version: '2.0.0-beta-4'
});
// Bundle project

View file

@ -10,7 +10,7 @@ export default class Domain
const debugThread = new DebugThread('Domain.getInfo', `Getting info about uri: ${uri}`);
return new Promise(async (resolve) => {
const process = await Process.run(`ping -n 1 -w 1 -B ${uri}`);
const process = await Process.run(`ping -n 1 -w 1 -B "${Process.addSlashes(uri)}"`);
// If something will be wrong - at least we'll have
// to wait 1.5 seconds instread of 2

View file

@ -43,22 +43,8 @@ export default (): Promise<void> => {
const runner = await Runners.current();
if (runner !== null)
{
wineExeutable = `${await constants.paths.runnersDir}/${runner.name}/${runner.files.wine}`;
try
{
Neutralino.filesystem.getStats(wineExeutable);
}
catch
{
wineExeutable = 'wine';
await Configs.set('runner', null);
}
}
debugThread.log(`Wine executable path: ${wineExeutable}`);
// Some special variables
@ -122,12 +108,6 @@ export default (): Promise<void> => {
if (await Configs.get('gamemode'))
command = `gamemoderun ${command}`;
console.log({
WINEPREFIX: await constants.paths.prefix.current,
...env,
...((await Configs.get('env') as object|null) ?? {})
});
/**
* Starting the game
*/

View file

@ -191,7 +191,7 @@ class Process
}
// Set output redirection to the temp file
command = `${command} > "${this.addSlashes(tmpFile)}" 2>&1 </dev/null &`;
command = `${command} > "${this.addSlashes(tmpFile)}" 2>&1 </dev/null`;
// Set current working directory
if (options.cwd)