aboutsummaryrefslogtreecommitdiff
path: root/src/modules
AgeCommit message (Collapse)Author
2024-04-30fixed #231 (hopefully)0neGal
Did an oopsie whoopsie doopsie, now its unoopsied
2024-02-05switch to unzip-stream over unzipperv1.11.00neGal
unzipper apparently has a bug that causes extracted files to be corrupted, switching to unzip-stream may not be the best long term, but it at least solves this corrupting problem!
2024-02-05fixed trying to remove core mods that dont exist0neGal
Some code relating to removing core mods when updating/installing didn't account for `R2Northstar/mods` not even existing, thought I made checks for that already, managed to mess them up, oopsie whoopsie.
2024-02-04removed use of "vipertmp" folder0neGal
Previously we downloaded the Northstar archive and packages to a folder named "vipertmp" in the system's cache folder, now that's just moved into "Viper/Temp" (still inside the system's cache folder) With this, all Viper cache is stored in the same folder in the system's cache folder... Wait... Why wasn't it always like this? Oh right, my past stupidity and lack of foresight. Oh well. "vipertmp" still gets deleted when clearing install cache, along with the new folder, so doing so will by itself clean up the old folder.
2024-02-04deleting request cache now deletes old cache file0neGal
We previously had a requests cache file just named `viper-requests.json` in the system's cache folder, we now also delete that alongside the current file, simply cleaning up a user's cache folder, as that file will not be used anymore. We also technically had a file named `requests.json`, however the name is too vague and could potentially (unlikely, but oh well) delete something that isn't actually Viper's older requests cache file.
2024-02-04fixed "Northstar is not installed!" when updating0neGal
After Northstar has been downloaded, we start extracting into the gamepath, this causes Viper to think Northstar isn't installed, which is fine, except it'd whine about it when many `src/modules/mods.js` functions we're called, some of which get run on an interval, so it'd often lead you to have multiple "Northstar is not installed!" messages whilst updating Northstar. Which is quite unneccesary and it may also, be able to confuse the user, as to whether something has gone wrong.
2024-02-04merge src/modules/window.js into src/win.js0neGal
I intended to do this when creating src/win.js, but wanted it to be in a different commit, as that commit made pretty large changes as well. So no more `main_win`, `win_show` and confusion between what `win` is.
2024-02-04remove newlines from version.titanfall()0neGal
2024-02-04move IPC events into their respective modules0neGal
I've not been able to find anything that breaks from this, as I've gone through every IPC event that got moved, to ensure it still functions, and all the breakage I found has since been fixed. IPC events that dont fit in any particular module is also now in the new file named `src/app/modules/ipc.js` There's also another module `src/win.js`, which lets you get the `BrowserWindow` outside of `src/index.js` I also took the oppertunity to clean up some of the code when moving it around, and adding a couple comments, as some of it was quite horrid.
2024-02-03requests.js ignores cache time when no internet0neGal
This means if you dont have any internet, but there's a cached requests, it'll use that, even if it was cached a very long time ago. This just attempts to eliminate errors. This can still be turned off for things where you dont want this to happen, notably the masterserver status.
2024-02-03src/modules/settings.js now provides a function0neGal
This fixes a couple issues where the main process wouldn't actually get changes made to the settings, this fixes that. On top of this, changing settings is now done with `settings.set()` There shouldn't be any breakage from this change, but I suppose it is possible. Especially because the `settings()` function still does contain backup options set, meaning `settings.nsargs` is technically still valid, but dont expect it to actually be updated when that variable is changed, its merely here to avoid any problems.
2024-01-29prevent multiple updates running simultaneously0neGal
We're the renderer to request for an update multiple times, then it'd simply start both updates, at the same time, causing all kinds of issues. This was only really realistically possible to happen if you were to manually check for updates whilst an update automatically were to be checked from right before then. As an example, when Viper starts up, it'll by default check for updates for itself, then Northstar, if you within that time frame checked for updates manually, it'll run both. Now however, we check if an existing update is occurring, and do nothing if so, this is both for Viper and Northstar updates.
2024-01-24entirely refactor src/modules/requests.js0neGal
Its now been split into 2, requests.js and releases.js, the latter simply gets relevant info from GitHub release pages. The prior however gives simple functions for doing `GET` requests, and caching the result, and then transparently it'll use that cache when you request it next time. On top of this, some requests made by the renderer will now also use this, and this in turn ends up making loading the mod browser much faster. As instead of having to request the list of packages from Thunderstore, we can simply load the result of an old request. The current lifetime of the cache is 5 minutes, however this can also easily be adjusted. This also moves the cached requests away from <cache_folder>/viper-requests.json, and over to <cache_folder>/Viper/cached-requests.json
2024-01-12deprecate ns_startup_args.txt0neGal
Ideally this has no side effects, however, I've not actually tested if the launching does properly use the launch arguments, due to not having a Windows device on hand. This will be tested later... We still attempt to load launch arguments from `ns_startup_args.txt` if none is set in the settings. However, this may be removed in the future.
2024-01-11updating Northstar now deletes existing core mods0neGal
This solves #223
2023-11-08added progress bar to download and extraction0neGal
This takes a bit of code from #220 to implement percentage progress on the download, then with the new pseudo element on the Launch button, we can have a slight progress bar inside the button, along with percentages, and it all works handy dandy. This may not be finished, but it's definitely far there.
2023-09-16added buttons for fixing some problems and alike0neGal
I will likely add more buttons in the future, but for now this is most of the ones a user could need to repair problems.
2023-09-16more minor fixes to the change in lang files0neGal
2023-09-16handle gamepaths with missing read/write perms0neGal
We now show an alert if the gamepath is detected to be missing read/write perms, both when selecting the gamepath initially, when it gets auto detected, but also after it's selected, passively.
2023-09-16made some lang keys far more logical0neGal
Most of these are from back when Viper was originally started, I also removed a few keys as they were no longer in use, but were forgotten about, most of these are from pre-v1.0.0 aka, the old smaller UI
2023-09-16added button to force kill game0neGal
2023-09-13fixed settings file refusing to save if invalid0neGal
This is quite counter intuitive, as, if it's invalid, how do we re-validate it, if we can't even save it again. This existed here because the idea was for the re-validation to occur somewhere else, and to make sure incorrectly formatted data wasn't being given to this function. Now the function simply resets the config, a restart may be required to add missing settings, in case the parsed `conf` doesn't have all keys.
2023-09-13synchronize changes to settings from main process0neGal
If the main process has changes to the settings, said settings will now also be sent to the renderer, making them synchronized.
2023-08-26fixed edge case where packages.list() still broke0neGal
Oopsie woopsie, my badddd, so sowwieeee, i wwwont doww it agaainnn!
2023-08-21properly detect outdated and up-to-date packages0neGal
2023-08-20fixed packages.list() assuming packages dir exists0neGal
This generally is fine, as the folder is created on startup... IF Northstar is installed! And so, if you start Viper for the first time or Viper as only just extracted/created the R2Northstar folder, then the folder wont exist, but it'll simply assume as such. Now we actually handle this correctly.
2023-08-07fixed Northstar startup arguments not applying0neGal
2023-07-31accidentally wrote console.status instead of .info0neGal
2023-07-31remove "error:" from console errors0neGal
Now they simply have the red color instead.
2023-07-25fixed packages having a "v" in their version0neGal
This messed with how Northstar searches for packages, as it doesn't conform to it's standard.
2023-07-24Fixed formatting issue in the up-to-date console message.someordinaryidiot#
2023-07-24fixed packages.js never requiring the lang module0neGal
whoopsie, i made an oopsie, doopsie doo, my bad uwu, im so sowwyyy, whoooppss, i caused an uncauwght exceptwion, ooowps ;w;
2023-07-24make sure profile exists, then create packages dirpackages-dir0neGal
If the gamepath isn't found or unmounted or similar, then the profile doesn't exist either, but we previously just assumed that it did, now we refuse to create the `packages` folder, fixing an error.
2023-07-24largely improve how we convert mods to packages0neGal
Convert is a strong word, in reality, when a user installs (and thereby also updates) a package, we attempt to search for a mod that we can with pretty high confidence, we could theoretically make this even better, but at some point you'll accidentally delete mods that are manually installed and weren't actually the right ones.
2023-07-24properly detect if a package has mods0neGal
2023-07-24fixed updating not removing older packages0neGal
2023-07-24fixed removing mods breaking when reading manifest0neGal
2023-07-24cleanup leftover files when installing packages0neGal
2023-07-24use prettier console logging for packages.js0neGal
2023-07-24Merge branch 'main' into packages-dir0neGal
2023-07-22colored console logging0neGal
Far prettier, and far more useful at a glance.
2023-07-22added English strings for plugin install prompt0neGal
2023-07-22mostly support installing packages through GUI0neGal
Install toasts, installing overall, dependencies and so forth, all seem to be fully functional, however more bug testing is probably required to concluce whether that is actually the case or not... This also doesn't break `src/modules/mods.js`, i.e dragging mods in to manually install them still functions the same as always.
2023-07-22unify all mods of a package into one0neGal
This means instead of showing the invididual mods inside a package, we simply show 1 mod/package, we then use the name, description, version and so forth from the `manifest.json` inside the package folder. Further we now also support a local `icon.png` file, instead of relying on remotely stored icons and trying to match names against each other.
2023-07-21mods from packages can be removed in the frontend0neGal
I also love how I spent a very long time trying to figure out why Electron's serializer was failing, turns out, it just throws errors when it encounters functions, instead of stripping them out, like `JSON.stringify()` does Oh well...
2023-07-21rename mods.list() properties to use snake case0neGal
I may or may not have missed some properties or something somewhere, perhaps we'll see if something ends up broken in the future...
2023-07-21basic support for showing packages in frontend0neGal
2023-07-16minor changes to packages.install()0neGal
2023-07-16remove mods in old folder if installing to new one0neGal
If you're now installing a mod that's currently in the `mods/` folder it'll remove that, then install the new one to `packages/` with the new naming scheme and everything.
2023-07-16fixed unzipper pre-maturily thinking it's finished0neGal
This caused errors where the folder would already be moved even though it's not entirely done unzipping.