Skip to content

Commit

Permalink
Fix Patcher referencing /bin/Debug explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
bartico6 committed Dec 11, 2017
1 parent a82e02b commit 1ebf418
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
18 changes: 17 additions & 1 deletion TShock.Modifications.Bootstrapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,31 @@ static void Main(string[] args)
string sourceAsm = null;
string modificationGlob = null;
string outputPath = null;
string folder = null;

Console.WriteLine("TShock Mintaka Bootstrapper, Open Terraria API v2.0");

if (File.Exists("env.config"))
{
using (StreamReader sr = File.OpenText("env.config"))
{
folder = sr.ReadLine();
Console.WriteLine($"Folder set to: " + folder);
}
}
else
{
Console.WriteLine("Something went wrong! (env.config not found)");
Console.ReadLine();
return;
}

if (args.Length == 0)
{
args = new[]
{
"-in=OTAPI.dll",
"-mod=" + Path.Combine("..", "..", "..", "TShock.Modifications.**", "bin", "Debug", "TShock.Modifications.*.dll"),
"-mod=" + Path.Combine("..", "..", "..", "TShock.Modifications.**", "bin", folder, "TShock.Modifications.*.dll"),

This comment has been minimized.

Copy link
@hakusaro

hakusaro Dec 14, 2017

Member

@QuiCM this patch broke the build instructions. Now, you can't just run the patcher -- you have to make an env.config in the Debug or Release folder for the TShock.Modifications.Bootstrapper project otherwise it just dies.

This comment has been minimized.

Copy link
@hakusaro

hakusaro Dec 14, 2017

Member

I guess cc @bartico6 since he did a bad too

This comment has been minimized.

Copy link
@QuiCM

QuiCM Dec 14, 2017

Member

Uhhhhh the BeforeBuild line here should run that before the build takes place

This comment has been minimized.

Copy link
@hakusaro

hakusaro Dec 14, 2017

Member

Well, it doesn't on my VS. I can screenshare with you if you wanna see it in action.

"-o=" + Path.Combine("Output", "OTAPI.dll")
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,9 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="BeforeBuild">
<WriteLinesToFile File="$(OutputPath)\env.config"
Lines="$(ConfigurationName)" Overwrite="true">
</WriteLinesToFile>
</Target>
</Project>

0 comments on commit 1ebf418

Please sign in to comment.