summaryrefslogtreecommitdiff
path: root/src/spawn.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-19 10:07:52 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-09-19 10:07:52 -0400
commitc603681115b6071f241f6931685d36a92b6403f8 (patch)
tree85ddd436f5a4a25c05f456a3d33edd38c0e17c1d /src/spawn.h
parent09b95e39434b9efc49a606957c94cd42309b7fb6 (diff)
moved helper stuff to spawn so it can reuse error handling
removed unused helper::init() removed logging when deleting a credential that doesn't exist, happens all the time
Diffstat (limited to 'src/spawn.h')
-rw-r--r--src/spawn.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/spawn.h b/src/spawn.h
index 9398b6cc..da626329 100644
--- a/src/spawn.h
+++ b/src/spawn.h
@@ -71,5 +71,30 @@ HANDLE startBinary(QWidget* parent, const SpawnParameters& sp);
} // namespace
+
+// convenience functions to work with the external helper program, which is used
+// to make changes on the system that require administrative rights, so that
+// ModOrganizer itself can run without special privileges
+//
+namespace helper
+{
+
+/**
+* @brief sets the last modified time for all .bsa-files in the target directory well into the past
+* @param moPath absolute path to the modOrganizer base directory
+* @param dataPath the path taht contains the .bsa-files, usually the data directory of the game
+**/
+bool backdateBSAs(const std::wstring &moPath, const std::wstring &dataPath);
+
+/**
+* @brief waits for the current process to exit and restarts it as an administrator
+* @param moPath absolute path to the modOrganizer base directory
+* @param moFile file name of modOrganizer
+* @param workingDir current working directory
+**/
+bool adminLaunch(const std::wstring &moPath, const std::wstring &moFile, const std::wstring &workingDir);
+
+} // namespace
+
#endif // SPAWN_H