Save packages to the support dir by default, but continue to support mods/*/packages

This commit is contained in:
Paul Chote
2011-05-04 16:28:20 +12:00
parent 96c3679cc9
commit 4efebcd6b2
8 changed files with 23 additions and 17 deletions

View File

@@ -101,7 +101,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
if (Info.InstallMode != "ra")
ShowDownloadError(window, "Installing from CD not supported");
else if (InstallRAPackages(window, path, FileSystem.SpecialPackageRoot+Info.PackagePath))
else if (InstallRAPackages(window, path, Info.ResolvedPackagePath))
Game.RunAfterTick(ContinueLoading);
}
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
status.GetText = () => "Extracting...";
progress.Indeterminate = true;
if (ExtractZip(window, file, FileSystem.SpecialPackageRoot+Info.PackagePath))
if (ExtractZip(window, file, Info.ResolvedPackagePath))
Game.RunAfterTick(ContinueLoading);
}

View File

@@ -11,6 +11,7 @@
using OpenRA.Widgets;
using System;
using OpenRA.Mods.RA.Widgets.Delegates;
using System.IO;
namespace OpenRA.Mods.RA.Widgets
{
@@ -21,6 +22,8 @@ namespace OpenRA.Mods.RA.Widgets
public string PackageURL = "";
public string PackagePath = "";
public string InstallMode = "";
public string ResolvedPackagePath { get { return PackagePath.Replace("^", Game.SupportDir); } }
public override void DrawInner() {}
}