Skip to content

Commit

Permalink
MSI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
skaryshev committed Jan 13, 2016
1 parent ceb12b8 commit 65da942
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Squirrel/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static T Retry<T>(this Func<T> block, int retries = 2)
}
}

public static Task<Tuple<int, string>> InvokeProcessAsync(string fileName, string arguments, CancellationToken ct)
public static Task<Tuple<int, string>> InvokeProcessAsync(string fileName, string arguments, CancellationToken ct, string workingDirectory = null)
{
var psi = new ProcessStartInfo(fileName, arguments);
if (Environment.OSVersion.Platform != PlatformID.Win32NT && fileName.EndsWith (".exe", StringComparison.OrdinalIgnoreCase)) {
Expand All @@ -190,6 +190,7 @@ public static Task<Tuple<int, string>> InvokeProcessAsync(string fileName, strin
psi.CreateNoWindow = true;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.WorkingDirectory = workingDirectory;

return InvokeProcessAsync(psi, ct);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Update/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ static async Task createMsiPackage(string setupExe, IPackage package)

var candleParams = String.Format("-nologo -ext WixNetFxExtension -out \"{0}\" \"{1}\"", wxsTarget.Replace(".wxs", ".wixobj"), wxsTarget);
var processResult = await Utility.InvokeProcessAsync(
Path.Combine(pathToWix, "candle.exe"), candleParams, CancellationToken.None);
Path.Combine(pathToWix, "candle.exe"), candleParams, CancellationToken.None, setupExeDir);

if (processResult.Item1 != 0) {
var msg = String.Format(
Expand All @@ -675,7 +675,7 @@ static async Task createMsiPackage(string setupExe, IPackage package)

var lightParams = String.Format("-ext WixNetFxExtension -sval -out \"{0}\" \"{1}\"", wxsTarget.Replace(".wxs", ".msi"), wxsTarget.Replace(".wxs", ".wixobj"));
processResult = await Utility.InvokeProcessAsync(
Path.Combine(pathToWix, "light.exe"), lightParams, CancellationToken.None);
Path.Combine(pathToWix, "light.exe"), lightParams, CancellationToken.None, setupExeDir);

if (processResult.Item1 != 0) {
var msg = String.Format(
Expand Down

0 comments on commit 65da942

Please sign in to comment.