Skip to content

Commit

Permalink
Updates for unst21
Browse files Browse the repository at this point in the history
  • Loading branch information
djoslin0 committed Mar 22, 2022
1 parent d386b24 commit bb3e17a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion coop-compiler/BuildUtil.cs
Expand Up @@ -313,7 +313,7 @@ public async Task<bool> BuildAsync(bool buildDirectX)
SetStage("making build");
string workingDir = environmentDir + "\\" + RepoUtil.game.ExtractedFolder();
string pathDir = environmentDir + @"\bin";
string makeParams = "WINDOWS_AUTO_BUILDER=1 -j2";
string makeParams = "WINDOWS_AUTO_BUILDER=1 -j2 CC=cc.exe CXX=g++.exe SHELL=sh.exe";
if (buildDirectX) { makeParams = "RENDER_API=D3D11 WINDOW_API=DXGI " + makeParams; }
if (is64bit) { makeParams += " TARGET_BITS=64"; } else { makeParams += " TARGET_BITS=32"; }
await RunProgram(
Expand Down
5 changes: 4 additions & 1 deletion coop-compiler/LogUtil.cs
Expand Up @@ -3,6 +3,7 @@
using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace coop_builder
Expand All @@ -15,6 +16,8 @@ class LogMessage
public Color color;
}

public static Regex ansiRegex = new Regex(@"\x1B\[[^@-~]*[@-~]");

public static Color stage = Color.DarkGoldenrod;
public static Color section = Color.CornflowerBlue;
public static Color subSection = Color.NavajoWhite;
Expand Down Expand Up @@ -45,7 +48,7 @@ private void WriteLogMessage(string line, Color color)
rtb.SelectionLength = 0;
rtb.SelectionColor = color;
}

line = ansiRegex.Replace(line, "");
rtb.AppendText(line);
cpb.Speed();
}
Expand Down
2 changes: 1 addition & 1 deletion coop-compiler/RestUtil.cs
Expand Up @@ -16,7 +16,7 @@ public static async Task<string> GetAsync(string url)
{
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/vnd.github.v3+json"));
client.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (compatible; AcmeInc/1.0)");
client.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36");

// HTTP GET
HttpResponseMessage response = await client.GetAsync(url);
Expand Down
2 changes: 1 addition & 1 deletion coop-compiler/coop-compiler.csproj
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>coop_builder</RootNamespace>
<UseWindowsForms>true</UseWindowsForms>
<PlatformTarget>x86</PlatformTarget>
<AssemblyVersion>1.0.0.4</AssemblyVersion>
<AssemblyVersion>1.0.0.5</AssemblyVersion>
<Platforms>AnyCPU;x86;x64</Platforms>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
Expand Down

0 comments on commit bb3e17a

Please sign in to comment.