aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/mod_management
AgeCommit message (Collapse)Author
2024-08-08feat: Prevent installation of Vanilla+ mod (#996)GeckoEidechse
as it has special installation requirements that makes it not installable like common Northstar mods.
2024-07-27chore: bump libthermite from 0.7.1 to 0.8.1 in /src-tauri (#954)dependabot[bot]
* chore: bump libthermite from 0.7.1 to 0.8.1 in /src-tauri Bumps libthermite from 0.7.1 to 0.8.1. --- updated-dependencies: - dependency-name: libthermite dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix: Adjust logic for new libthermite release Not the nicest implementation but does the trick --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GeckoEidechse <gecko.eidechse+git@pm.me>
2024-05-02fix: Address clippy warning around direct `ToString` implementation (#914)GeckoEidechse
fix: Address clippy warning https://rust-lang.github.io/rust-clippy/master/index.html#/to_string_trait_impl
2024-02-13fix: Remove most leftover dbg prints (#803)GeckoEidechse
Removes all but one leftover `dbg!()` prints. The remaining one is in a function that is yet to be implemented.
2023-10-13refactor: Move `install_mod_wrapper` (#627)GeckoEidechse
Move `install_mod_wrapper` to `mod_management` module to clean up `main.rs`.
2023-08-08fix: Fix typo in commentGeckoEidechse
2023-08-01refactor Generalise temporary directory structure (#458)Jan
The temp folder we create could be reused for a lot more things, like extracting Northstar before moving files into the correct place. As such adjust the naming and structure to accommodate this.
2023-07-30refactor: Add Profile to GameInstall (#453)Jan
Add Profile to GameInstall Replace hardcoded uses of R2Northstar with profile attribute
2023-07-23feat: Add basic warning on plugin install (#441)GeckoEidechse
Plugins in Northstar have unrestricted device access. As such we want to warn user before installing one with an option to abort.
2023-07-22feat: Prevent mods with plugins to be installed (#438)GeckoEidechse
This is a temporary measure until a proper implementation exists that properly warns user before installing plugin
2023-07-21feat: Support installing Thunderstore packages (#426)GeckoEidechse
Support for installing mods from Thunderstore directly into the `packages` folder. Adds some basic sanity check during installation. After successful installation, the old version of the mod is removed. This includes both from `packages` and from `mods`.
2023-07-19feat: Add ability to delete package (#425)GeckoEidechse
Adds ability to delete mods from `packages` directory.
2023-07-19feat: Support reading mods from Northstar `packages` directory (#417)GeckoEidechse
2023-07-18refactor: Move code for legacy TS mod deletion to separate file (#424)GeckoEidechse
2023-07-17fix: Add regex check for parsing TS mod string (#421)GeckoEidechse
Otherwise we accept improper formatted Thunderstore mod strings like `AUTHOR-MOD-VERSION-RANDOM_STUFF`
2023-07-17feat: Implement `to_string` for `ParsedThunderstoreModString` (#420)GeckoEidechse
Allows printing `ParsedThunderstoreModString` in the Thunderstore mod string format
2023-07-16refactor: Move code for legacy mod install reading to separate file (#416)GeckoEidechse
Moves some logic related to reading legacy installed mods to new file in order to clean up code before adding new logic.
2023-07-07chore: Bump libthermite to `0.6.5` (#409)GeckoEidechse
And update code accordingly Co-authored-by: AnActualEmerald <emerald_actual@protonmail.com>
2023-06-28fix: Use empty map for enabled mods (#397)GeckoEidechse
if treating enabledmods.json as object fails
2023-06-01feat: Log folder names when indexing mods (#373)GeckoEidechse
2023-05-29fix: Return error on TS package index fetch fail (#371)GeckoEidechse
instead of panicking
2023-05-17feat: Better logging regarding mod installation (#363)GeckoEidechse
* fix: Make log comment more specific * feat: Log attempting to create temp dir * feat: Log mod to install and GameInstall struct * refactor: Replace `dbg` with proper logging * refactor: Replace `dbg` with proper logging * feat: Warning log mod install error * style: Fix formatting * feat: Log libthermite error and modstring when mod install fails
2023-05-10refactor: Move code from `lib.rs` into `main.rs` (#330)GeckoEidechse
Move remaining logic in one big move
2023-05-10refactor: Move `get_enabled_mods` to different source file (#311)GeckoEidechse
Move `get_enabled_mods` into the mod management module.
2023-05-10refactor: Import constants from crate rootGeckoEidechse
Instead of lib
2023-05-09refactor: Move `get_enabled_mods` to `main.rs` (#333)GeckoEidechse
Part of #329
2023-05-06refactor: Always remove zip files (#304)cat_or_not
* refactor: Always remove zip files * docs: Add comment explaining the use of the struct
2023-04-30refactor: Use error in `ParsedThunderstoreModString::FromStr` instead of ↵cat_or_not
panic (#295) report error instead of panic
2023-04-16Use pass-by-reference where possible (#266)cat_or_not
Use pass-by-reference where possible also contains some other small changes
2023-04-16fix: Fix incorrect is_empty check (#270)GeckoEidechse
Fixes a regression introduced in #244 that prevented any Thunderstore mods from being uninstalled Closes #269
2023-03-27fix: Various clippy fixes (#243)GeckoEidechse
* fix: Remove redundant return * fix: Remove unnecessary borrow * fix: Remove unnecessary import * fix: Use char for single character replacement instead of string * fix: Iterate over values directly instead of key-value pair * fix: Remove unnecessary let binding * fix: Remove unnecessary return statement * fix: Use char for single character replacement instead of string * refactor: Use struct short hand initialization
2023-03-27fix: Replace `<=0` with `.is_empty()` (#244)GeckoEidechse
2023-03-26fix: Remove redundant string conversions (#242)GeckoEidechse
As pointed out by clippy
2023-03-26refactor: Replace all `println!()` with log statements (#236)GeckoEidechse
* refactor: Replace all println with calls to logger in `do_install()` * refactor: Replace all println with calls to logger in `verify_install_location()` * refactor: Replace all println with calls to logger in `get_northstar_release_notes()` * refactor: Replace all println with calls to logger in `update_northstar_caller()` * refactor: Replace all println with calls to logger in `install_northstar_caller()` * refactor: Replace all println with calls to logger in `apply_launcher_pr()` * refactor: Replace all println with calls to logger in `apply_mods_pr()` * refactor: Replace all println with calls to logger in `find_game_install_location()` * refactor: Replace all println with calls to logger in `install_mod_caller()` * refactor: Replace all println with calls to logger in `set_mod_enabled_status()` * refactor: Replace all println with calls to logger in `parse_installed_mods()` * refactor: Replace all println with calls to logger in `origin_install_location_detection()` * refactor: Replace all println with calls to logger in `query_thunderstore_packages_api()` * refactor: Replace all println with calls to logger in `add_batch_file()` * refactor: Replace all println with calls to logger in `extract()` * refactor: Replace all println with calls to logger in `check_is_northstar_outdated()`
2023-02-11refactor: Move various consts to `constants.rs` (#162)GeckoEidechse
* refactor: Move list of core mods to consts source Move the list of core Northstar mods to constants.rs * fix: Add missing newline * refactor: Move list of blacklisted mods to consts source file * refactor: Move list of TF2 Origin IDs to consts source file
2023-02-07feat: Show mod version in LocalMods View (#159)GeckoEidechse
* refactor: Parse using serde deserialisation * refactor: Parse using serde deserial. (TS mod str) Reduce code by making use of serde deserialisation. Still supports legacy method * chore: Remove commented out fields While useful, it just made the code messy... * feat: Show mod version in LocalMods view * refactor: Move mod version to new line in source code Makes diffing in git easier * fix: Hide version number if not available
2023-02-06chore: Bump libthermite version to 0.5.2 (#163)GeckoEidechse
And fix corresponding code that broke in the process Basically just removing `await`s as the networking functions are no longer async.
2023-02-06refactor: Parse using serde deserialisation (#158)GeckoEidechse
* refactor: Parse using serde deserialisation * refactor: Parse using serde deserial. (TS mod str) Reduce code by making use of serde deserialisation. Still supports legacy method * chore: Remove commented out fields While useful, it just made the code messy...
2023-02-02fix: Prevent ModsView from crashing if Northstar is not installed (#152)Jan
2023-01-22chore: Autoformat Rust source files (#143)GeckoEidechse
2023-01-22fix: Properly parse mod string (#141)GeckoEidechse
2023-01-13refactor: Bump libthermite (#133)GeckoEidechse
* chore: Bump libthermite to v0.4.0-rc.1 And update broken code in FlightCore accordingly * chore: Bump libthermite to v0.4.0 And update broken code in FlightCore accordingly * feat: Parse TS mod string using new standard Instead of reading `mod.json`, we now build Thunderstore mod string using `manifest.json` and `thunderstore_author.txt`. The old method for reading is still supported for now but will likely be replaced by a converted function in the future. See also discussion in https://github.com/0neGal/viper/issues/165
2023-01-08feat: Delete given Thunderstore mod (#111)GeckoEidechse
* feat: Expose installed NS mod directory This allows other functions to get a mod directory directly which is useful for e.g. deleting a mod. * feat: Add button to delete Northstar mod * refactor: Return vector of NorthstarMod instead of unnamed Tuples * feat: Delete given Thunderstore mod * refactor: replace information button by a dropdown menu with remove item * refactor: only display removal mod option if said mod is installed * feat: only display dropdown menu for installed mods * refactor: Remove leftover print statement * chore: Remove leftover todo comment * feat: Show confirm warning before deleting mod * refactor: Call func directly instead of proxy Removes the `func_caller` pattern * fix: Call reloading mods after attempted delete * feat: Hook up deleting mod backend function Now clicking "Remove Mod" calls the appropriate backend function that removes the corresponding mod. * refactor: Call func directly instead of proxy Removes the `func_caller` pattern * style: Autoformat * feat: Support removing outdated mods No longer include the version number in the comparison check * fix: Rephrase error message * feat: Show pop-up confirmation before deleting mod for Thunderstore mod in ThunderstoreView Co-authored-by: Alystrasz <contact@remyraes.com> Co-authored-by: Remy Raes <raes.remy@gmail.com>
2023-01-04feat: Add button to delete Northstar mod (#110)GeckoEidechse
* feat: Expose installed NS mod directory This allows other functions to get a mod directory directly which is useful for e.g. deleting a mod. * feat: Add button to delete Northstar mod * refactor: Return vector of NorthstarMod instead of unnamed Tuples * refactor: Remove leftover print statement * chore: Remove leftover todo comment * feat: Show confirm warning before deleting mod * refactor: Call func directly instead of proxy Removes the `func_caller` pattern * fix: Call reloading mods after attempted delete
2023-01-04refactor: Remove unnecessary caller function pattern (#128)GeckoEidechse
* refactor: Remove unnecessary caller function Instead call `disable_all_but_core` directly * refactor: Remove unnecessary caller function Instead call `get_installed_mods_and_properties` directly * refactor: Remove unused exposed backend function * refactor: Remove unnecessary caller function Instead call `set_mod_enabled_status` directly * refactor: Remove unnecessary caller function Instead call `verify_game_files` directly * refactor: Remove unnecessary caller function Instead call `get_log_list` directly
2022-12-12feat: Expose installed NS mod directory (#109)GeckoEidechse
* feat: Expose installed NS mod directory This allows other functions to get a mod directory directly which is useful for e.g. deleting a mod. * refactor: Return vector of NorthstarMod instead of unnamed Tuples
2022-12-05refactor: Move variable to global const (#85)GeckoEidechse
Makes it easier to update/re-use in the future Co-authored-by: Remy Raes <contact@remyraes.com>
2022-11-28style: Auto-format all Rust code (#84)GeckoEidechse
2022-11-28feat: Rebuild `enabledmods.json` if value not found (#69)GeckoEidechse
* feat: Rebuild enabledmods.json if value not found When toggling a mod on enabled mods that is not present in `enabledmods.json` we would previously just error out. Now we rebuild the `enabledmods.json` file in a Northstar compatible format and then toggle the mod in question. * feat: Handle missing or corrupted enabledmods.json * chore: Remove leftover print statement
2022-11-19feat: Return Thunderstore mod string of installed mods. (#56)GeckoEidechse
* refactor: Rename function to better differentiate what it does * refactor: Add TS mod string field to NS mod struct This allows us to expose to frontend which Thunderstore mod a Northstar mod may belong to. Field is optional as not all mods may contain a Thunderstore mod string for example when they were installed manually. * feat: Add TS mod string field to NS mod interace * feat: Parse TS mod string and expose to frontend * fix: Mark unused variable as such