Limo
A simple mod manager
Loading...
Searching...
No Matches
casematchingdeployer.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "deployer.h"
9
14{
15public:
23 CaseMatchingDeployer(const std::filesystem::path& source_path,
24 const std::filesystem::path& dest_path,
25 const std::string& name,
26 DeployMode deploy_mode = hard_link);
36 virtual std::map<int, unsigned long> deploy(
37 const std::vector<int>& loadorder,
38 std::optional<ProgressNode*> progress_node = {}) override;
40 using Deployer::deploy;
46 virtual void updateDeployedFilesForMod(
47 int mod_id,
48 std::optional<ProgressNode*> progress_node = {}) const override;
49
50private:
58 void adaptDirectoryFiles(const std::filesystem::path& path,
59 int mod_id,
60 const std::filesystem::path& target_path) const;
67 void adaptLoadorderFiles(const std::vector<int>& loadorder,
68 std::optional<ProgressNode*> progress_node = {}) const;
69};
void adaptDirectoryFiles(const std::filesystem::path &path, int mod_id, const std::filesystem::path &target_path) const
Recursively renames every file in source_path_/mod_id/path to the name of a file in dest_path_,...
Definition casematchingdeployer.cpp:62
CaseMatchingDeployer(const std::filesystem::path &source_path, const std::filesystem::path &dest_path, const std::string &name, DeployMode deploy_mode=hard_link)
Passes arguments to base class constructor.
Definition casematchingdeployer.cpp:10
virtual std::map< int, unsigned long > deploy(const std::vector< int > &loadorder, std::optional< ProgressNode * > progress_node={}) override
Iterates over every file and directory contained in the mods in the given load order....
Definition casematchingdeployer.cpp:19
virtual void updateDeployedFilesForMod(int mod_id, std::optional< ProgressNode * > progress_node={}) const override
Updates the deployed files for one mod to match those in the mod's source directory.
Definition casematchingdeployer.cpp:33
void adaptLoadorderFiles(const std::vector< int > &loadorder, std::optional< ProgressNode * > progress_node={}) const
Renames every file in every mod in the given load order such that all paths are case invariant and ma...
Definition casematchingdeployer.cpp:118
virtual std::map< int, unsigned long > deploy(const std::vector< int > &loadorder, std::optional< ProgressNode * > progress_node={})
Deploys all mods to the target directory using hard links. If any file already exists in the target d...
Definition deployer.cpp:45
DeployMode
Describes how files should be deployed to the target directory.
Definition deployer.h:27
@ hard_link
Create hard links for files.
Definition deployer.h:29
Deployer(const std::filesystem::path &source_path, const std::filesystem::path &dest_path, const std::string &name, DeployMode deploy_mode=hard_link)
Constructor.
Definition deployer.cpp:18
Header for the Deployer class.
char path[256]
Path to which to extract the file.
Definition lspakfilelistentry.h:1