VortexCompiler: Added support for different staging/downloads folder

This commit is contained in:
erri120 2019-11-09 16:24:23 +01:00 committed by Timothy Baldridge
parent 00cacfd01f
commit 061e46572d

View File

@ -28,23 +28,29 @@ namespace Wabbajack.Lib
public VortexCompiler(string gameName, string gamePath)
{
_vortexCompiler = this;
_mo2Compiler = null;
ModManager = ModManager.Vortex;
// TODO: only for testing
IgnoreMissingFiles = true;
string[] args = Environment.GetCommandLineArgs();
GamePath = gamePath;
GameName = gameName;
Game = GameRegistry.GetByNexusName(GameName).Game;
// currently only works if staging and downloads folder is in the standard directory
// aka %APPDATADA%\Vortex\
//args: wabbajacke.exe gameName gamePath vortexfolder stagingfolder downloadsfolder
VortexFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Vortex");
StagingFolder = Path.Combine(VortexFolder, gameName, "mods");
DownloadsFolder = Path.Combine(VortexFolder, "downloads", gameName);
if (args.Length >= 4)
StagingFolder = args[3];
if (args.Length == 5)
DownloadsFolder = args[4];
ModListOutputFolder = "output_folder";
// TODO: add custom modlist name