mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #362 from erri120/mo2-force-portable
Create portable.txt after installation in MO2 dir
This commit is contained in:
commit
3cdb9dd37a
@ -536,7 +536,8 @@ namespace Wabbajack.Lib
|
|||||||
new IgnoreEndsWith(this, "HavokBehaviorPostProcess.exe"),
|
new IgnoreEndsWith(this, "HavokBehaviorPostProcess.exe"),
|
||||||
// Theme file MO2 downloads somehow
|
// Theme file MO2 downloads somehow
|
||||||
new IgnoreEndsWith(this, "splash.png"),
|
new IgnoreEndsWith(this, "splash.png"),
|
||||||
|
// File to force MO2 into portable mode
|
||||||
|
new IgnoreEndsWith(this, "portable.txt"),
|
||||||
new IgnoreEndsWith(this, ".bin"),
|
new IgnoreEndsWith(this, ".bin"),
|
||||||
new IgnoreEndsWith(this, ".refcache"),
|
new IgnoreEndsWith(this, ".refcache"),
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ namespace Wabbajack.Lib
|
|||||||
if (cancel.IsCancellationRequested) return false;
|
if (cancel.IsCancellationRequested) return false;
|
||||||
var metric = Metrics.Send("begin_install", ModList.Name);
|
var metric = Metrics.Send("begin_install", ModList.Name);
|
||||||
|
|
||||||
ConfigureProcessor(18, await RecommendQueueSize());
|
ConfigureProcessor(19, await RecommendQueueSize());
|
||||||
var game = ModList.GameType.MetaData();
|
var game = ModList.GameType.MetaData();
|
||||||
|
|
||||||
if (GameFolder == null)
|
if (GameFolder == null)
|
||||||
@ -135,6 +135,9 @@ namespace Wabbajack.Lib
|
|||||||
UpdateTracker.NextStep("Generating Merges");
|
UpdateTracker.NextStep("Generating Merges");
|
||||||
await zEditIntegration.GenerateMerges(this);
|
await zEditIntegration.GenerateMerges(this);
|
||||||
|
|
||||||
|
UpdateTracker.NextStep("Set MO2 into portable");
|
||||||
|
ForcePortable();
|
||||||
|
|
||||||
UpdateTracker.NextStep("Updating System-specific ini settings");
|
UpdateTracker.NextStep("Updating System-specific ini settings");
|
||||||
SetScreenSizeInPrefs();
|
SetScreenSizeInPrefs();
|
||||||
|
|
||||||
@ -144,6 +147,20 @@ namespace Wabbajack.Lib
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ForcePortable()
|
||||||
|
{
|
||||||
|
var path = Path.Combine(OutputFolder, "portable.txt");
|
||||||
|
if (File.Exists(path)) return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.WriteAllText(path, "Created by Wabbajack");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Utils.Error(e, $"Could not create portable.txt in {OutputFolder}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async Task InstallIncludedDownloadMetas()
|
private async Task InstallIncludedDownloadMetas()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user