Triforce v0.3.6

This commit is contained in:
ruckus7382sfgsgdf
2026-11-14 00:33:23 -06:00
parent 2f1e350320
commit a02bcb21a9
106 changed files with 7683 additions and 1422 deletions

View File

@@ -9,6 +9,7 @@ sealed class BuilderSettings
public string? Exefs { get; set; }
public bool Dlss { get; set; } // (NVIDIA DLSS ticked: NVIDIA's license was accepted)
public bool Fsr { get; set; } // (AMD FSR 4 ticked)
public bool Renodx { get; set; } // (RenoDX HDR ticked)
public bool PrepareLater { get; set; } // ("Prepare shaders now" unticked)
public static BuilderSettings? Load(string path)

View File

@@ -189,6 +189,12 @@
Content="AMD FSR 4 (AMD's files are not included: see the readme)"/>
<TextBlock Style="{StaticResource Note}" FontSize="12" Margin="26,4,0,0" TextWrapping="Wrap"
Text="For AMD Radeon graphics cards. It is chosen in the game's Insert menu, as the Upscaler."/>
<!-- RenoDX's HDR: off unless ticked. Its shaders and the Slang compiler are downloaded and compiled by the build
(make_game.py's renodx switch, scripts/renodx_shaders.py): never part of the builder or its downloads -->
<CheckBox x:Name="RenodxTick" Style="{StaticResource Tick}" IsChecked="False" Margin="0,10,0,0"
Content="RenoDX HDR (downloads RenoDX's shaders and the Slang compiler, about 60 MB)"/>
<TextBlock Style="{StaticResource Note}" FontSize="12" Margin="26,4,0,0" TextWrapping="Wrap"
Text="For HDR displays: RenoDX's tone mapping with the Insert menu's HDR set to Native. Its shaders stay on this PC: never share a game folder built with them."/>
</StackPanel>
</Grid>

View File

@@ -264,6 +264,7 @@ public partial class MainWindow : Window
if (!string.IsNullOrEmpty(s.Out)) OutPath.Text = s.Out;
DlssTick.IsChecked = s.Dlss;
FsrTick.IsChecked = s.Fsr;
RenodxTick.IsChecked = s.Renodx;
if (s.Romfs != null && s.Exefs != null && Directory.Exists(s.Romfs) && File.Exists(System.IO.Path.Combine(s.Exefs, "main")))
{
romfs = s.Romfs;
@@ -287,6 +288,7 @@ public partial class MainWindow : Window
{
var s = new BuilderSettings { Out = OutPath.Text, Nup = romfs == null ? chosenNup : null, Romfs = romfs, Exefs = exefs,
Dlss = DlssTick.IsChecked == true, Fsr = FsrTick.IsChecked == true,
Renodx = RenodxTick.IsChecked == true,
PrepareLater = PrepareTick.IsChecked != true };
Directory.CreateDirectory(System.IO.Path.GetDirectoryName(SettingsPath)!);
File.WriteAllText(SettingsPath, System.Text.Json.JsonSerializer.Serialize(s));
@@ -703,6 +705,7 @@ public partial class MainWindow : Window
else return;
args.AddRange(new[] { "--out", OutPath.Text, "--language", lang.Code });
if (FsrTick.IsChecked == true) args.Add("--fsr"); // (an --update of the folder keeps it: make_game.py's mark)
if (RenodxTick.IsChecked == true) args.Add("--renodx"); // (the same: its shaders are fetched and compiled by the build)
prepareNow = PrepareTick.IsChecked == true;
Run(tools, ShaderStep.Args(args, prepareNow), dlss: DlssTick.IsChecked == true);
}

View File

@@ -23,11 +23,14 @@ import zipfile
from part_links import SYSROOT_PART, is_absolute_link, relative_sysroot_link
LIST_NAME = "triforce-linux.txt"
REPO = "ruckus7382sfgsgdf/CBeta0.2" # (Triforce's releases)
LATEST_LIST = "https://github.com/%s/releases/latest/download/%s" % (REPO, LIST_NAME)
# (11-13: Triforce's own home. Releases are in triforce/downloads on its Forgejo: the list is asked on the main domain,
# which passes /api/v1 on; a release's files are the Forgejo's own links. Up to v0.3.5: github.com/ruckus7382sfgsgdf/CBeta0.2)
HOME_API = "https://triforceproject.com/api/v1/repos/triforce/downloads"
DOWNLOADS = "https://git.triforceproject.com/triforce/downloads"
LATEST_LIST = "%s/releases/latest/download/%s" % (DOWNLOADS, LIST_NAME)
# (Triforce: the newest release, pre-releases too, as the Windows side asks: /releases/latest skips pre-releases, and
# every Triforce release so far is one. The answer is a list of one release)
LATEST_API = "https://api.github.com/repos/%s/releases?per_page=1" % REPO
LATEST_API = HOME_API + "/releases?limit=1"
# (the game folder's names, nx2/make_game.py's; Hookshot's after them, for a folder that still has those)
GAME_NAMES = ("triforce", "hookshot")
VERSION_FILES = ("triforce_version.txt", "hookshot_version.txt")
@@ -551,7 +554,7 @@ def fetch_manifest(get=None):
body = body[0] if body else {}
tag = body.get("tag_name") or ""
if tag and all(ch.isalnum() or ch in "._-" for ch in tag):
url = "https://github.com/%s/releases/download/%s/%s" % (REPO, tag, LIST_NAME)
url = "%s/releases/download/%s/%s" % (DOWNLOADS, tag, LIST_NAME)
return parse_list(get(url).decode("utf-8"), local=False)
except Exception:
pass