From 05aa96d20ca726908a7d8b1943f86f0c4e11bf18 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 17 Jun 2026 01:46:09 -0500 Subject: Prepare Nexus-safe release cleanup --- .../installer/lib/FileInstaller.h | 94 ---------------------- 1 file changed, 94 deletions(-) delete mode 100644 libs/installer_fomod_plus/installer/lib/FileInstaller.h (limited to 'libs/installer_fomod_plus/installer/lib/FileInstaller.h') diff --git a/libs/installer_fomod_plus/installer/lib/FileInstaller.h b/libs/installer_fomod_plus/installer/lib/FileInstaller.h deleted file mode 100644 index 1c122a7..0000000 --- a/libs/installer_fomod_plus/installer/lib/FileInstaller.h +++ /dev/null @@ -1,94 +0,0 @@ -#pragma once - -#include -#include - -#include "ConditionTester.h" -#include "FlagMap.h" -#include "Logger.h" -#include "xml/ModuleConfiguration.h" - - -/* This is what legacy fomodInstaller does: - modName.update(dialog.getName(), GUESS_USER); - return dialog.updateTree(tree); - - This is a link to the legacy updateTree method: - https://github.com/ModOrganizer2/modorganizer-installer_fomod/blob/fc263f2d923c704b4853c11ed4f8b8cf3920f30d/src/fomodinstallerdialog.cpp#L546 - -*/ - -// Things this should do: -// - Copy all requiredInstall files -// - Copy all conditionalInstall files -// - Copy all selected files from steps that were visible to the user at the point of install - -using namespace MOBase; - -using FileGlobalIndex = int; -using FileDescriptor = std::pair; - -class StepViewModel; - -class FileInstaller { -public: - FileInstaller( - IOrganizer* organizer, - QString fomodPath, - const std::shared_ptr& fileTree, - std::unique_ptr fomodFile, - const std::shared_ptr& flagMap, - const std::vector >& steps); - - std::shared_ptr install() const; - - /** - * @brief Create a 'fomod.json' file to add to the base of the installTree. Functionally similar to MO2's meta.ini. - * - * Until there's more utility in the JSON structure itself, it will simply be of this format: - * @code - * { - * "steps": [ - * { - * "name": "Step 1", - * "groups": [ - * { - * "name": "Group 1", - * "plugins: [ - * "Plugin1.esp", - * "Plugin2.esp" - * ] - * } - * ] - * } - * ] - * } - * @endcode - * - * @return nhlohmann::json - */ - nlohmann::json generateFomodJson() const; - - std::string getQualifiedFilePath(const std::string& treePath) const; - - std::vector collectPositiveFileNamesFromDependencyPatterns(const std::vector &patterns); - - void addFiles(std::vector& main, std::vector toAdd) const; - -private: - IOrganizer* mOrganizer; - Logger& log = Logger::getInstance(); - QString mFomodPath; - std::shared_ptr mFileTree; - std::unique_ptr mFomodFile; - std::shared_ptr mFlagMap; - ConditionTester mConditionTester; - std::vector > mSteps; // TODO: Maybe this is nasty. Idk. - - std::vector collectFilesToInstall() const; - - void logMessage(LogLevel level, const std::string& message) const - { - log.logMessage(level, "[INSTALLER] " + message); - } -}; -- cgit v1.3.1