Skip to content

Conversation

@gmazoyer
Copy link
Contributor

@gmazoyer gmazoyer commented Mar 1, 2025

This version allows to install mods defined in a JSON formatted
file. Mods are installed one by one. Each of them are fetch from
a remote file and installed locally given a path. A checksum can be
optionaly defined to ensure that the proper files are installed. This
will also force them to be re-installed if checksums do not match.

The process of mods installation goes like:

  • Identify which mods are scheduled for installation
  • Start a go routine for each mod to install in which we check if the mod is already installed, if not the mod is download and installed
  • Wait for all go routines to complete

To know if a mod is already installed and needs re-installing, we leverage the checksum of each file if defined. If there is a checksum mismatch, the mod will be re-downloaded and only the files for which checksums mistmatch are re-installed.

Mods that can be installed are the ones marked as enabled and the ones these depend on. The provided mods.json file describe how to install KFPatcher and its dependency KFUnflect.

Some of the fields for mods are currently not used, but are useful to get a glance at what are those mods and where they are coming from. These fields may be useful in the future if we want to implement some kind of reporting for installed mods.

@gmazoyer gmazoyer force-pushed the dependency-management branch from a23f8cb to 981de59 Compare March 1, 2025 12:03
@gmazoyer gmazoyer changed the title Dependency management Mods management Mar 8, 2025
This version allows to install dependencies defined in a JSON formatted
file. Dependencies are installed one by one. Each of them are fetch from
a remote file and installed locally given a path. A checksum can be
optionaly defined to ensure that the proper files are installed. This
will also force them to be re-installed if checksums do not match.

Right now, dependencies are fetched and installed in a linear fashion.
We may improve this by introducing some parallelism in a near future.
Also provide a way to disable the installation of mods.
@gmazoyer gmazoyer force-pushed the dependency-management branch from 8ed158b to 6ec6bb7 Compare March 10, 2025 20:23
Also fix concurrency issue when reading from the slice of installed
mods before finishing consuming from channels.
@gmazoyer gmazoyer marked this pull request as ready for review March 16, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant