Fixed Domain.getInfo() method work

This commit is contained in:
Observer KRypt0n_ 2022-01-02 03:06:01 +02:00
parent becb7db124
commit 2587b29b40
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
7 changed files with 20 additions and 20 deletions

View file

@ -141,27 +141,25 @@ This is our current roadmap goals. You can find older ones [here](ROADMAP.md)
* <s>Ability to get current installed patch</s>
* <s>Ability to get latest available patch</s>
* <s>Ability to download and install it</s>
* Add project binaries bundling
* <s>AppImage</s> *(seems to be impossible)*
* One-time small installation script because then launcher will have auto updates
* <s>Add project binaries bundling</s>
* <s>AppImage</s>
#### Launcher functions
* Make `Launcher` class to manage launcher-related features
* <s>Make `Launcher` class to manage launcher-related features</s>
* <s>Downloading progress</s>
* Launcher state functionality
* <s>Launcher state functionality</s>
* <s>Game launch available</s>
* <s>Game update (installation) required</s>
* <s>Voice data update (installation) required</s>
* Patch unavailable
* Test patch available
* <s>Patch unavailable</s>
* <s>Test patch available</s>
* Make Svelte components
* <s>Checkbox</s>
* <s>Selectbox</s>
* <s>SelectionList</s>
* SelectableCheckbox
* PropertiesEditor
* Rewrite sass code, provide more flexible theming ability
* <s>Add `svelte-i18n`</s>
* <s>Telemetry checking</s>
* <s>Tooltips for some options</s>
@ -174,6 +172,7 @@ This is our current roadmap goals. You can find older ones [here](ROADMAP.md)
* Ability to change the temp directory where the launcher should download some files
* Launcher auto-updates
* Changelog window
* Rewrite sass code, provide more flexible theming ability
### Features

View file

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

View file

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

View file

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

View file

@ -24,16 +24,16 @@ export default class Domain
const regex = /PING (.*) \(([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\) from ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}) : [\d]+\([\d]+\) bytes of data/gm.exec(output);
if (regex !== null)
if (regex !== null || output.includes('Name or service not known'))
{
process.outputInterval = null;
process.runningInterval = null;
const info: DomainInfo = {
uri: regex[1],
remoteIp: regex[2],
localIp: regex[3],
available: regex[2] !== regex[3]
uri: regex ? regex[1] : uri,
remoteIp: regex ? regex[2] : undefined,
localIp: regex ? regex[3] : undefined,
available: regex ? regex[2] !== regex[3] : false
};
debugThread.log({ message: info });

View file

@ -26,14 +26,15 @@ export default class State
protected events = {
'runner-installation-required': import('./states/InstallWine'),
'dxvk-installation-required': import('./states/InstallDXVK'),
'game-launch-available': import('./states/Launch'),
'game-installation-available': import('./states/Install'),
'game-update-available': import('./states/Install'),
'game-voice-update-required': import('./states/InstallVoice'),
'test-patch-available': import('./states/ApplyPatch'),
'patch-available': import('./states/ApplyPatch')
'patch-available': import('./states/ApplyPatch'),
'game-launch-available': import('./states/Launch')
};
public constructor(launcher: Launcher)

View file

@ -1,7 +1,7 @@
type DomainInfo = {
uri: string;
remoteIp: string;
localIp: string;
remoteIp?: string;
localIp?: string;
available: boolean;
};