mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-29 04:18:49 -04:00
Triforce v0.8.5
A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
@@ -43,21 +43,25 @@ public sealed class Tools
|
||||
try { return File.Exists(file) ? File.ReadLines(file).FirstOrDefault()?.Trim() : null; } catch (Exception) { return null; }
|
||||
}
|
||||
|
||||
/// <summary>The tools to run make_game with, null when there are none. Windows: <install>\tools with its python\python.exe (or
|
||||
/// "python" from the PATH when that file is missing); else, outside a test run, a development checkout above the exe
|
||||
/// (TRIFORCE_PYTHON or "python"). Linux: HOOKSHOT_TOOLS, with HOOKSHOT_PYTHON or the image's usr/python/bin/python3.</summary>
|
||||
/// <summary>The tools to run make_game with, null when there are none. Windows: <install>\tools with its python\python.exe;
|
||||
/// else, in a local build outside a test run, a development checkout above the exe (TRIFORCE_PYTHON or "python"). Linux:
|
||||
/// HOOKSHOT_TOOLS, with HOOKSHOT_PYTHON or the image's usr/python/bin/python3.</summary>
|
||||
public ToolSet? Find()
|
||||
{
|
||||
var bundled = Folder;
|
||||
if (File.Exists(Path.Combine(bundled, "nx2", "make_game.py")))
|
||||
{
|
||||
// ((Triforce, 11-26) Windows: the tools' own Python, by its full path even when it is missing (antivirus: GameIntake says
|
||||
// so, and the start fails plainly). A bare "python" was looked up in the launcher's folder and the current folder first,
|
||||
// where any python.exe would have run, or found the Store's alias, which ran nothing)
|
||||
var py = ctx.IsWindows ? Path.Combine(bundled, "python", "python.exe") : Path.Combine(bundled, "python", "bin", "python3");
|
||||
return new ToolSet(bundled, File.Exists(py) ? py : ctx.IsWindows ? "python" : "python3");
|
||||
return new ToolSet(bundled, File.Exists(py) || ctx.IsWindows ? py : "python3");
|
||||
}
|
||||
if (!ctx.IsWindows && LinuxTools() is { } lt) return lt;
|
||||
// (a development copy: the launcher run from inside a checkout uses its sources and the PC's Python. Never in a test run,
|
||||
// which has its own tools or none)
|
||||
if (ctx.TestRoot != null) return null;
|
||||
// which has its own tools or none; ((Triforce, 11-26) and only for a local build or TRIFORCE_DEV=1: a release looked in
|
||||
// every folder above its own, up to the drive's root, where another account could have put an nx2\make_game.py)
|
||||
if (ctx.TestRoot != null || !(BuildInfo.IsDev || ctx.Env("TRIFORCE_DEV") == "1")) return null;
|
||||
for (var d = new DirectoryInfo(ctx.SelfDir); d != null; d = d.Parent)
|
||||
if (File.Exists(Path.Combine(d.FullName, "nx2", "make_game.py")))
|
||||
return new ToolSet(d.FullName, ctx.Env("TRIFORCE_PYTHON") ?? (ctx.IsWindows ? "python" : "python3"));
|
||||
|
||||
Reference in New Issue
Block a user