aboutsummaryrefslogtreecommitdiff
path: root/src/utils.js
AgeCommit message (Collapse)Author
2023-01-29Merge branch 'main' into linux-launch0neGal
2023-01-12put mods Object into src/modules/mods.js0neGal
2023-01-12added: src/modules/json.js0neGal
This module makes it easier to read JSON files, simply returning false on errors, and attempting to repair the JSON automatically.
2023-01-12modularize settings Object0neGal
The reasoning behind this is obvious, I overall would like to make utils.js far smaller, and if not get entirely rid of it.
2023-01-12src/extras/ is now src/modules/0neGal
2023-01-12basically support thunderstore_author.txt0neGal
This doesn't entirely uphold support, as it doesn't use the author file for anything, however it does write it as intended.
2022-11-23remove testing error0neGal
This was only here to test the uncaught exception catching.
2022-11-23added more user friendly error message0neGal
When JavaScript errors occur outside of the renderer, they'll no longer display a big and confusingly detailed error stack, now they'll simply be shown a toast about the fact that an error happened. The user can then click this to get more details, but still without it being as invasive and obtuse as before.
2022-11-23actually fix duplicate mods0neGal
If a mod has multiple mod folders inside it, however all with the same name, they'll be merged together, this now fixes that, by adding "(dupe)" to the end of it, along with displaying an error, however it will install successfully. This also happens to add some duplicate toast protection, however this should be reworked, but I am not bothered to deal with it right now, and I instead will be putting this on future me.
2022-11-19ignore mod if mod.json isn't formatted correctly0neGal
If a mod has an incorrectly formatted mod.json it is ignored when trying to build/get the list of installed mods.
2022-10-23Merge branch 'main' into linux-launch0neGal
2022-09-14differentiation between update() and updatevp()0neGal
Some functions have been renamed: update() -> updateNorthstar() updatevp() -> updateViper() Overall these are far better function names...
2022-09-13fix: spawn game processes in separate shellsAlystrasz
2022-08-07fix: lintAlystrasz
2022-08-06feat: prevent Northstar update and update download link text if no InternetAlystrasz
2022-06-29added extract progress messages0neGal
When progress is made on extracting the Northstar zip file it'll update the "Extracting..." message to "Extracting... X%" replacing X with the amount that's been extracted.
2022-06-29fixed version number not updating after updates0neGal
2022-06-29Merge branch 'main' into deprecate-nsversiontxt0neGal
2022-06-29require NorthstarLauncher.exe to be found0neGal
Now, even if the core mods are installed it'll still make sure the NorthstarLauncher.exe exists, so if Northstar has only been half installed it'll be detected.
2022-06-07minor changes0neGal
Mostly syntax, but also a few fixes with how the settings system work, and also a change in localization strings.
2022-06-05removed auto formattingB
missed a few one last one
2022-06-02added setting for auto-killing origin, functionality workingB
2022-06-01add origin killB
2022-06-01added origin checkB
2022-05-30refactored event names0neGal
Quite a lot of them aren't in the same syntax/style, and it's quite bad to look at, this should fix them all without causing issues.
2022-05-30fixed missing commas and various syntax stuff0neGal
I know, commas aren't needed, however, going in and out of using commas and not using them also looks bad, so generally I try to always use them, with exceptions.
2022-05-29added checks to make sure the version is correct0neGal
We now check all the Northstar mods and make sure they've the same version number, and if not it's counted as an unknown version, as we can't reliable guess which version is the correct one. If Northstar Auto-Updates is enabled it'll then re-install.
2022-05-28fixed: Linux launch error alert not showing0neGal
This was supposed to always be there, however I somehow forgot to add the winAlert() function, and forgot about it, causing some verbose errors instead, not useful!
2022-05-24deprecate ns_version.txt0neGal
2022-05-12initial draft for supporting dependencies0neGal
This should allow you to install packages that have dependencies, however maybe not with the best UI/UX experience, as currently there's only an English localization, and we also install dependencies even if the dependency is already installed.
2022-05-03fixed various errors when reading modfile0neGal
2022-05-03hopefully fully implement everything?? i think?0neGal
Everything seems to be working just fine, and I can't find any problems, so I'll likely merge this soon.
2022-05-03simplified get() and made list() used get()0neGal
Instead of repeating code and everything, get() now only returns a boolean, based on the arg inputted into get(mod), it returns true if the mod is enabled and false if disabled. If the mod isn't found inside the enabledmods.json it is assumed that it's enabled, as Northstar doesn't update this unless you actually disable the mod first, and the mod won't be found in there. Then I used get() to simplify list() a whole lot, and adding that functionality of using the manifest for a version number if one couldn't be found in the mod.json.
2022-05-03modfile. enable(), disable() and toggle() now work0neGal
2022-05-02mods.modfile().get() is identical to mods.list()0neGal
Albeit mods.list() doesn't actually search the manifest file for a version number, and I'll implement that later.
2022-05-02Merge branch 'main' into enabledmods0neGal
2022-04-28added: error if config file isn't valid0neGal
Essentially just validates the config file and then prompts you about it, it allows you to reset it directly or just to exit and let yourself fix it. And because the error message appears directly in the renderer we have access to navigator.language, and can therefore still localize the string. However! We can't actually care if the user has disabled auto detection of their language, since... y'know, the config file where that's stored isn't able to be read properly. And so I added an argument to lang(), which allows you to force it to use a specific language if that language is available, if not it defaults back to English.
2022-04-21fixed Windows launch error0neGal
2022-04-20running status on buttons0neGal
When the game is running the buttons will go from saying "Launch" to "Running" and the buttons will also disable, so you can't run the game multiple times, avoiding a lot of issues.
2022-04-20find.proton() and more checks0neGal
Overall we should now be able to find the latest version of Proton, the Prefix, and everything a like, all automatically. Albeit launching is sort of iffy, and seems to work, but with some issues that seem to be caused mostly by my system.
2022-04-19basic Linux launch support0neGal
extras/findgame.js is now extras/find.js, as it now also is able to find the prefix of your Steam install and the path to Origin. Generally speaking you can technically launch the game right now, both Vanilla and Northstar (from what I can tell), albeit Wine is being weird for me currently and leads to the game freezing while it's loading, or simply never running because Origin is technically already running in the background. Maybe I should add a "kill" function to the launch screen. Besides that some status text would also be nice i.e change "Launch" to "Launching", to make sure the user doesn't think Viper isn't doing anything. On the Windows side of things I also made the NS Launch use "Titanfall2.exe -northstar" instead of "NorthstarLauncher.exe" to prevent some authentication issues, I haven't tested it yet, and will do later, we unfortunately can't do that on Linux as "-northstar" never gets passed, hence why we manually have to launch Origin and everything. Overall needs more testing, and not complete. As I'm still missing a way to find Proton, which would in the end lead to a hassle free experience.
2022-04-18first draft of Linux launch support0neGal
This only has GUI elements, and slight changes to the utils.launch() function, but none that would result in anything working yet.
2022-04-17fixed gamepathlost errors on first launchlinux-launch-testing0neGal
Because viper.json doesn't exist it also means settings.gamepath is null, which triggers the gamepathlost message.
2022-04-17fixed issue causing viper not open the GUI0neGal
I don't really understand why or how anything broke, all I know is this fixes it, and I don't know how to feel about this madness.
2022-04-13fixed --update not exiting if already on latest0neGal
2022-04-13check to make sure gamepath exists0neGal
When Viper starts up it'll check to make sure the gamepath still exists, and throws errors if not, it also redirects you to the first page (the one where you can set the gamepath), and gives you an informative error. This could happen because the user unmounted the drive the gamepath is on, or it could happen if the user moved their game location.
2022-04-13the user can now manually select a language0neGal
This allows someone to have their system in any language, and then have Viper in a separate language. This is also useful for testing.
2022-03-24removed excess debug console.log()0neGal
I forgot about this when merging the VDF fix
2022-03-22fix: VDF path searching not working on SteamDeck (#97)0neGal
* added debug messages * more debug logging * even more debug logging * removed debugging and fixed VDF problem maybe? Apparently the libraryfolders.vdf doesn't always come with the same values, sometimes it comes with the contentstatsid variable and other times not, we assumed it always was there, and never checked for it, this caused problems if it wasn't there. This should fix that...
2022-03-10fix nsargs being cleared when edited out of Viper (#93)0neGal
If the nsargs are edited by a third-party program or anything that isn't Viper, the next time you launch Viper it'll reset the nsargs back to what it was when you last opened it.