mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-20 17:01:47 +03:00
Fixed game launching, removed excess code
This commit is contained in:
parent
8260d1b975
commit
d2764d3d34
6 changed files with 5 additions and 25 deletions
|
@ -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/",
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue