Skip to content

Commit

Permalink
Fixed bin folder detection for Momentum Mod/Strata
Browse files Browse the repository at this point in the history
  • Loading branch information
Exactol committed Apr 7, 2023
1 parent d6c5244 commit 0c23d4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CompilePalX/Compiling/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -97,6 +98,7 @@ public static void LogDebug(string s)

public static void LogLineDebug(string s)
{
Trace.WriteLine(s);
LogDebug(s + Environment.NewLine);
}

Expand Down
6 changes: 6 additions & 0 deletions CompilePalX/GameConfiguration/GameConfigurationParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public static List<GameConfiguration> Parse(string binFolder)
var vbspinfo = FindPath("vbspinfo.exe", binFolder, vbspPath);
var vpk = FindPath("vpk.exe", binFolder, vbspPath);

if (Path.GetDirectoryName(bspzip) != binFolder)
{
CompilePalLogger.LogLineDebug($"Bin folder \"{binFolder}\" differs from compiler location \"{Path.GetDirectoryName(bspzip)}\"");
binFolder = Path.GetDirectoryName(bspzip);
}

GameConfiguration game = new GameConfiguration
{
Name = gamedb.name.Replace("\"", ""),
Expand Down

0 comments on commit 0c23d4e

Please sign in to comment.