Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Commit

Permalink
Bugfix - Hyper should run multiple distro side-by-side
Browse files Browse the repository at this point in the history
  • Loading branch information
rkttu committed May 1, 2019
1 parent f84f105 commit fd01c6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions WslManager/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -818,19 +818,19 @@ private void ShimGenerator_DoWork(object sender, DoWorkEventArgs e)

foreach (var eachItem in items)
{
var key = eachItem.DistroName;
var fileName = eachItem.DistroName;
var eachResult = WslShimGenerator.CreateWslShim(
key, false, targetDir);
eachItem.DistroName, false, targetDir, fileName);

if (eachResult.Errors.HasErrors)
result.Add(key, eachResult);
result.Add(fileName, eachResult);

key = eachItem.DistroName + "_simple";
fileName = eachItem.DistroName + "_simple";
eachResult = WslShimGenerator.CreateWslShim(
key, true, targetDir);
eachItem.DistroName, true, targetDir, fileName);

if (eachResult.Errors.HasErrors)
result.Add(key, eachResult);
result.Add(fileName, eachResult);
}
}

Expand Down
6 changes: 3 additions & 3 deletions WslManager/WslShimGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace WslManager
{
internal static class WslShimGenerator
{
public static CompilerResults CreateWslShim(string distroName, bool ignoreSwitches, string outputPath)
public static CompilerResults CreateWslShim(string distroName, bool ignoreSwitches, string outputPath, string outputFileName)
{
var codeCompileUnit = new CodeCompileUnit();

Expand Down Expand Up @@ -38,7 +38,7 @@ public static CompilerResults CreateWslShim(string distroName, bool ignoreSwitch

var declareDistroNameVariable = new CodeVariableDeclarationStatement(typeof(string), "distroName")
{
InitExpression = new CodePrimitiveExpression("Ubuntu1604"),
InitExpression = new CodePrimitiveExpression(distroName),
};

var declareWslPathVariable = new CodeVariableDeclarationStatement(typeof(string), "wslPath")
Expand Down Expand Up @@ -214,7 +214,7 @@ public static CompilerResults CreateWslShim(string distroName, bool ignoreSwitch
{
GenerateExecutable = true,
GenerateInMemory = false,
OutputAssembly = Path.Combine(outputPath, $"{distroName}.exe"),
OutputAssembly = Path.Combine(outputPath, $"{outputFileName}.exe"),
CompilerOptions = string.Join(" ", "/optimize+", iconCompilerOption),
};

Expand Down

0 comments on commit fd01c6d

Please sign in to comment.