malgreen / NexNux

NexNux is a cross-platform mod manager built with C# and Avalonia
GNU General Public License v3.0
4 stars 0 forks source link

Mod deployment (v1) #8

Closed malgreen closed 2 years ago

malgreen commented 2 years ago

'Deployment' of mods means that we link each file in our chosen 'mods' directory to our 'deploy' directory. There should be a cache of what was in the 'deploy' directory before anything was done to it, which would allow for this type of deployment:

  1. Pre-deploy cache is restored to 'deploy' directory, by: a. Removing all links whose path is in the 'DeployedFiles.json' b. Moving every file that is in the 'deploy cache' to the 'deploy' directory
  2. Each file for each enabled mod is linked to the 'deploy' directory, starting with index 0 a. If a file with that name already exist in the 'deploy' directory, and isn't in the new 'deploy cache', add it to the new 'deploy cache' b. If file link is succesful, add its path to a .json file by writing a List<> of files to a 'DeployedFiles.json' (existing filenames are replaced)
  3. Done
malgreen commented 2 years ago

First version of mod deployment implemented in 5191b01bde167ed7b304ca48ed92cda7f2b6d500