diff options
-rw-r--r-- | .github/FUNDING.yml | 2 | ||||
-rw-r--r-- | src/app/main.js | 1 | ||||
-rw-r--r-- | src/extras/findgame.js | 6 | ||||
-rw-r--r-- | src/lang/en.json | 2 | ||||
-rw-r--r-- | src/utils.js | 2 |
5 files changed, 8 insertions, 5 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 96f466a..8991fb3 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ liberapay: 0neGal -custom: ["https://github.com/R2Northstar"] +custom: ["github.com/R2Northstar"] diff --git a/src/app/main.js b/src/app/main.js index 5f0cc9a..dab584e 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -32,7 +32,6 @@ if (fs.existsSync("viper.json")) { setpath(true); } } else { - alert(lang("general.missingpath")); setpath(); } diff --git a/src/extras/findgame.js b/src/extras/findgame.js index f7da1c0..42c9b85 100644 --- a/src/extras/findgame.js +++ b/src/extras/findgame.js @@ -41,17 +41,19 @@ module.exports = async () => { } } - let folder = ""; + let folder = null; switch (process.platform) { case "win32": folder = "C:\\Program Files (x86)\\Steam\\steamapps\\libraryfolders.vdf"; break case "linux": + case "openbsd": + case "freebsd": folder = path.join(app.getPath("home"), "/.steam/steam/steamapps/libraryfolders.vdf"); break } - if (fs.existsSync(folder)) { + if (fs.existsSync(folder) && folder) { let data = fs.readFileSync(folder) let read_vdf = readvdf(data.toString()) if (read_vdf ) {return read_vdf} diff --git a/src/lang/en.json b/src/lang/en.json index c2b6f98..8d4daeb 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -96,7 +96,7 @@ "general.mods.enabled": "Enabled mods:", "general.mods.disabled": "Disabled mods:", "general.mods.installed": "Installed mods:", - "general.missingpath": "Game path is not set!", + "general.missingpath": "Game location could not be found automatically! Please select it manually!", "general.notinstalled": "Northstar is not installed!", "general.launching": "Launching" } diff --git a/src/utils.js b/src/utils.js index a2c61d4..ef647fe 100644 --- a/src/utils.js +++ b/src/utils.js @@ -142,6 +142,8 @@ async function setpath(win) { return; } + alert(lang("general.missingpath")); + // Fallback to manual selection dialog.showOpenDialog({properties: ["openDirectory"]}).then(res => { if (res.canceled) { |