Repository navigation
Conversation
The 613 Lua files under Lib/original are Nintendo's firmware scripts: they are not part of the open source packages the company publishes, so they should not be in the repository or inside the executable. The app now asks for them once per console, the way MiniThemeStudio does, and reads only the Lua files: - from the console over SSH (hakchi): the untouched /var/squashfs/<ui folder> first, then the live one; only the Lua files travel (tar of find ... -name '*.lua') - from a firmware file: a squashfs / .hsqs image (xz), a .tar or a .tar.gz - from a folder: the console's UI folder, its resources folder, or anything above Files are LuaJIT bytecode checked by their header (a decoded theme in text is refused), are read into a staging folder first (a failed import keeps the originals already there) and are kept in %AppData%/SNESMiniLuaCompiler/Originals. The dialog opens the first time a console is picked; cancelling deselects the console. LTRData.DiscUtils.SquashFs and SharpCompress read the squashfs image; both work with Native AOT. Lib/original is removed from the repository and the executable; the README explains the import.
…e console; fix GitVersion on feature branches
- A folder with the consoles side by side (a "base UI" folder: hvc, hvcj-shonen, nes, shvc, sneseur, snesusa) takes the
one named like the console picked; with no match it asks for the console's own folder. A folder that is itself a
console (or has its own resources folder) is used as is.
- Whatever the source, the files must be those of the console: a file only that family has (colors_nes.lua,
scripts/env/colors_*.lua, constants.lua for the Shonen Jump edition) is required, and the Famicom refuses the
Shonen Jump files, so a NES is not imported as a SNES by mistake.
- GitVersion.yml: the feature branch regex has the BranchName group its label uses; without it the version was
"2.1.0-{BranchName}.1" and the Windows build of every feature/* branch failed to start.
… for them A firmware image or a folder (a "base UI" folder with the consoles side by side) can hold the UI of several consoles. The import now reads them all in one pass (a tar.gz is read once) and keeps every console whose files are valid, so the app does not ask for the others later; the console the user asked for must be one of them. - ConsoleTarget: the folder a console's files are collected in, what was found and why not - A firmware: each console's UI folder is looked up (the NES and the Famicom share usr/share/clover-ui: their characteristic file tells them apart); a console the firmware lacks is skipped, unless it is the one asked for - A folder with several consoles: each takes the folder named like it - Staging folders as before: a failed import keeps every original already there; the window says how many consoles were kept
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1: it targets
development/avalonia, so the diff is only this change. After #1 is merged, retarget it tomaster.Why
The 613 Lua files under
Lib/originalare Nintendo's firmware scripts. The open source packages Nintendo publishes for the consoles (Linux, busybox, glibc, SDL2, LuaJIT...) contain no.luafile, so the license in Nintendo's OSS notice does not cover them, and they should not be in the repository or inside the executable. The user's own files also match their firmware version: thebase-uifolder I checked has 11 more Lua files per console than the copies we shipped.What
The app asks for the original Lua files once per console (a dialog opens the first time a console is clicked), like MiniThemeStudio does. Only the Lua files are read, never images, fonts or sounds:
169.254.13.37by default): the untouched/var/squashfs/<ui folder>first, then the live one; only the Lua files travel..hsqs(xz),.taror.tar.gz.resourcesfolder, or a folder with several consoles side by side (takes the one named like the console).Details:
colors_nes.lua,scripts/env/colors_*.lua,constants.luafor the Shonen Jump edition), so a NES is not imported as a SNES by mistake.%AppData%/SNESMiniLuaCompiler/Originals(Linux:~/.config/...).Lib/originalis removed (−3 MB in the executable); README and TODO updated.LTRData.DiscUtils.SquashFsandSharpCompress(squashfs reading), both work with Native AOT.GitVersion.ymlfeature-branch regex had noBranchNamegroup, so the Windows build of everyfeature/*branch failed with the version2.1.0-{BranchName}.1.Tests
build,build-linuxandpre-commitpassbase-uifolder, other-console files refused, text Lua refused, a failed import keeps the originals, SSH (against a test host: only the Lua files come over, a missing folder, an unreachable host), an option-like address refused<ui folder>/resources/scripts(as MiniThemeStudio's registry implies)