Repository navigation
Conversation
Converted the project file to SDK-style format targeting .NET 8.0 for Windows, replacing legacy MSBuild properties and removing explicit references to older .NET Framework assemblies. Updated resource file handling to use the 'Update' directive and modernized Windows Forms settings. Removed obsolete files including AssemblyInfo.cs, Settingss.Designer.cs, and packages.config, consolidating package references into the project file. Cleaned up unused resource and license entries, streamlining the project structure for improved maintainability and compatibility with current .NET tooling.
Removed direct references to System.Configuration, System.Data.DataSetExtensions, and Microsoft.CSharp. Added a NuGet package reference to System.Configuration.ConfigurationManager (v9.0.10) to replace the removed System.Configuration reference. Retained the Microsoft.CodeAnalysis.NetAnalyzers package reference.
…ws.Forms.MethodInvoker' to resolve CS0104 ambiguity between 'System.Windows.Forms.MethodInvoker' and 'System.Reflection.MethodInvoker'.' in file 'Utils\AppUtils.cs'
Refactor: Transition to Avalonia UI with MVVM architecture Overhauled the project to use Avalonia UI for cross-platform support and implemented a modern MVVM architecture. Key changes include: - Migrated to .NET SDK-style project targeting `net8.0`. - Added Avalonia UI components and Fluent theme. - Introduced centralized utilities for file, process, and exception handling. - Implemented LuaJIT-based file encryption/decryption workflows. - Designed a user-friendly main window with console selection. - Added support for embedded resources and Ahead-of-Time (AOT) compilation. - Ensured compatibility with Windows 10 via application manifest.
Added several binary files to enhance the application's user interface: - `app_bg.png`: Background image for the application. - `icn_application.png`: Icon representing the application. - `icn_info.png`: Icon for informational messages. - `icn_noaccess.png`: Icon for restricted or no access. - `icn_ok.png`: Icon for successful or "OK" status. - `icn_option.png`: Icon for options or settings. - `icn_question.png`: Icon for questions or prompts. - `icn_stop.png`: Icon for stop or error conditions. - `icn_warn.png`: Icon for warnings. - `loading.gif`: Animated image for loading or processing state. These assets are intended to improve the visual feedback and user experience.
Updated the `.gitignore` file to exclude the `MigrationBackup/` directory from version control. Removed `lib/hashes` and `/bin` directories, and added the `/modules` directory. Modified `.vscode/settings.json` and `(S)NES Mini - Lua Compiler .sln` files. Added two new assets: `Assets/Lua-Logo.svg` and `Assets/avalonia-logo.ico` to the project.
Replaced the `MsgBox` implementation with a custom message box system using the `MessageBox.Avalonia` library. Added support for various message box types (confirmation, error, success, etc.) and custom button configurations. Updated Avalonia-related NuGet packages to version `11.3.8` and added new dependencies for `MessageBox.Avalonia` and `MessageBox.Avalonia.Markdown`. Refactored `OnSelectConsole` and `InitializeFirstRunCheck` methods to use asynchronous message boxes for user interactions. Improved null-checking practices and introduced new styles for buttons and text elements. Added a new helper class (`MessageBoxHelper`) and enums (`MessageBoxButtons`, `MessageBoxResult`) for managing message box functionality.
Modified the `Icon.ico` and `app_bg.png` files with updated binary content. Removed several unused binary files, including `icn_*.png` icons and the `loading.gif` animation, as part of an asset cleanup and redesign effort.
Refactored path and constants management in `AppUtils.cs` to use dynamic paths and added configuration management methods. Integrated Serilog logging in `ExceptionUtils.cs` for structured logging and improved exception handling with pattern matching. Simplified file utilities in `FileUtils.cs` by removing legacy code and adopting modern C# features. Enhanced process utilities in `ProcessUtils.cs` with a new `RunDecompiler` method and safer file checks. Replaced `MessageBoxHelper` with `NotificationHelper` for improved UI notifications. Refactored the `Consoles` model to support mutable properties and added change notifications. Improved error handling and logging in `ImageHelper.cs`. Conducted general code cleanup to remove unused code, standardize error handling, and improve readability.
- Replaced `FluentTheme` with `SemiTheme` for a modern UI. - Integrated `Serilog` for enhanced logging and error tracking. - Consolidated `<EmbeddedResource>` entries in the project file. - Replaced `RelayCommand` with `CommunityToolkit.Mvvm.Input`. - Updated `MainWindow` layout with theme toggle and `RadioButton` UI. - Added centralized resource management via `_index.axaml`. - Enhanced `MessageBox` with customizable icons and themes. - Refactored decryption/encryption logic for better maintainability. - Removed unused code and improved overall code readability.
Refactored `ExtractAllResources` in `AppUtils.cs` to use `GlobalTryCatch` for better error handling. Suppressed redundant logging in `ExceptionUtils.cs`. Added `LoadImage` method in `ImageHelper.cs` and refactored `LoadFromResource` for consistency. Simplified `NotificationHelper` methods by removing the `title` parameter. Fixed redundant log message in `Program.cs`. Introduced `RadioButton.axaml` with custom themes and updated `_index.axaml` to include it. Modified `ToggleSwitch.axaml` to update button content. Added `IsTrashButtonEnabled` property in `MainWindowViewModel.cs` and updated `UpdateButtonStates` logic. Enhanced `MainWindow.axaml` with a new "trash" button and styles for `Button > PathIcon`. Added `TrashButton_Click` handler in `MainWindow.axaml.cs` to delete temporary files and show notifications. Improved `EncryptButton_Click` to display success or warning notifications based on encryption results. Commented out unused or redundant code for better maintainability.
Refactored resource paths to use temporary directories for better flexibility and portability. Introduced progress tracking for encryption and decryption processes, enhancing user feedback. Added a `CountFilesRecursive` helper method to simplify file counting logic. Updated `MainWindowViewModel` with new properties for progress tracking and states, and introduced a delegate for triggering decryption logic from the ViewModel. Refactored `DecryptFilesAsync` and `EncryptFilesAsync` methods to include progress updates and handle edge cases. Removed redundant `Decrypt` and `Encrypt` methods, replacing them with inline logic. Updated the UI in `MainWindow.axaml` to include progress bars for encryption and decryption, and adjusted the layout for better usability. Removed unused code across multiple files to improve maintainability and clarity.
Removed unused methods, redundant logic, and legacy code across multiple files to improve clarity and maintainability. Refactored exception handling with a new `SafeFileOperation` method for centralized error handling and added file existence caching for performance. Simplified file operations in `FileUtils.cs` and removed outdated functionality. Updated UI components in `MainWindow.axaml` and streamlined logic in `MainWindow.axaml.cs`. Cleaned up styles and removed unused properties in `Consoles.cs`. Improved logging consistency in `ExceptionUtils` and removed redundant code in `Program.cs`. General cleanup across the codebase enhances readability, maintainability, and performance.
Added the `GitVersion.MsBuild` package to enable automated versioning. Configured GitVersion with branch-specific rules in `GitVersion.yml`. Introduced a GitHub Actions workflow (`build.yml`) for building, versioning, and optionally publishing artifacts. Removed the obsolete .NET 8.0 upgrade plan documentation (`dotnet-upgrade-plan.md`) as it is no longer needed.
Updated GitVersion.yml to refine branch configurations: - Added `assembly-informational-format` for detailed versioning. - Adjusted `master`, `main`, and `develop` branch settings. - Simplified `pull-request` branch configuration. - Removed redundant comments and re-added `tag-prefix`. Refactored `GetAppVersion` in AppUtils.cs to use `AssemblyInformationalVersionAttribute` for enhanced version metadata. Made minor formatting adjustments for consistency. Simplified `LoadFromResource` in ImageHelper.cs by removing unnecessary logging.
Enhanced the application by introducing the `IsEnabled` property to manage the enabled/disabled state of consoles during encryption and decryption processes. Updated the UI to dynamically reflect these state changes. Added a new method `SaveGitVersionToConfig` to save the Git version to the configuration file during application startup. Updated `GitVersion.yml` to refine versioning and branch handling. Improved the user experience by binding the `IsEnabled` property to UI elements and ensuring proper state management throughout the application lifecycle.
Updated `build.yml` to use GitVersion actions `v4.2.0` and `actions/checkout@v4` with `fetch-depth: 0` for full Git history. Configured `GitVersion.yml` with custom commit message patterns for version bumps, enabled `commit-message-incrementing`, and added `update-build-number: true`. Adjusted `assembly-informational-format` and refined `master` branch settings for versioning.
…port - Use luajit-decompiler-v2 (MIT) instead of the Python LJD; Python is no longer required - Pick LuaJIT and decompiler binaries per OS (TargetOs in the csproj, Lib/*-linux embedded as Lib/luajit and Lib/decompiler); resources are now named by their real path - Set the exec bit on extracted tools and use xdg-open on Linux - Run from the app folder so relative paths work when launched from elsewhere - Decompile into a short temp folder (the Windows build fails above MAX_PATH) - scripts/build-luajit-linux.sh builds a static LuaJIT 2.0.x; CI builds the Linux package
Add .editorconfig with the .NET coding conventions and naming rules, and fix the analyzer warnings in FileUtils.
- .pre-commit-config.yaml: line endings (LF), whitespace, YAML/JSON, large files and dotnet format whitespace; Lib/ is excluded because it holds LuaJIT bytecode and binaries - .gitattributes: LF in the working tree (.sln keeps CRLF); CI job running the same hooks - .editorconfig: end_of_line = lf, BOM for C# files, IDE0008 as warning - csproj: GenerateDocumentationFile so IDE0005 runs in the build - README: requirements, build and development notes; TODO updated
…sed usings Result of the IDE0008, IDE0005 and dotnet format fixes; no behaviour change.
- TargetFramework net10.0 and dotnet-version 10.0.x in the CI jobs - Drop the System.Text.Json package (part of the framework now) - Pin Tmds.DBus.Protocol 0.21.3, the patched release of the version Avalonia pulls in (GHSA-xrw6-gwf8-vvr9)
- Remove unused helpers (FindExePath, OpenDirectory, AreDecodedAndRecodedDirsPresent, SafeRead/Write/Append*, ImageHelper.LoadImage/LoadFromWeb) and the 1 s File.Exists cache in ExceptionUtils - Utility classes are static; SHA256.HashData, LINQ instead of hand-written loops - MainWindow: one call instead of a switch whose cases all did the same, SetConsolesEnabled helper, AppUtils.DecodedPath instead of the "decoded" literal; the file is now plain UTF-8 (its only non-UTF-8 byte was a Portuguese comment, now English) No behaviour change.
- lib/luajit/jit keeps only bcsave.lua, the one file "luajit -b" loads (the disassemblers, dump.lua... never ran); the Linux build script copies only that too - RunLuaJit: drop LUA_CPATH, the PATH prefix and the working directory (nothing loads C modules, lua51.dll sits next to the exe); LUA_PATH is one entry; CreateNoWindow instead of a hidden window - Drop the ReactiveUI.Avalonia package (only .UseReactiveUI() used it; the view models use CommunityToolkit.Mvvm) - Remove the unused ConsoleItem model and the PTVS (Python) block of .gitignore - README: no longer describes the app as a GUI for the old Python script
- MainWindowViewModel owns the status text and the busy state (BeginDecryption/EndDecryption/BeginEncryption/EndEncryption, CanEncode); the window binds to them instead of setting status.Text and btn_encrypt.IsEnabled (which also replaced the existing IsEnabled binding) - MessageBox: one ShowWithIcon for the four Show* methods, drop the never-read ButtonTheme, and ShowAsync moves to the UI thread when called from a background thread (error handlers run on the decrypt/encrypt tasks)
The file kept every type of the app from being trimmed ("Can be removed if CompiledBinding and no reflection
are used"). The app uses compiled bindings everywhere (AvaloniaUseCompiledBindingsByDefault, x:CompileBindings).
Revert this commit if a published (Native AOT) build misses a type at run time.
…runs in the build)
…r Encode - Header with a controller icon, the title, a Ready/Working pill, the delete and theme buttons - Rounded console cards, the selected one highlighted with the primary colour; one-line and two-line names align; each card has an accessible name (FullName) - A panel under the cards: the selected console, a progress bar while working, and the result of the last decode/encode with an Open folder button (replaces the "open the folder?" question) - A large Encode button with a sub-title, navy backdrop in the dark theme - OpenDirectory shows an error instead of crashing when there is no file manager (xdg-open missing)
- Icons from Lucide.Avalonia (controller, check, clock, folder, package, trash, moon/sun, info, alert) - Colours from the Defkorns logo: teal (#2CB4CF dark / #038DA8 light) for the selection and the selected console, the logo button's gold-to-orange gradient for Encode, a near-neutral dark backdrop (#0B0B16) - The theme switch is a button (moon in the dark theme, sun in the light one) because the Semi IconBorderless themes cannot show a control as content; the status pill has colours for both themes - Avalonia 11.3.8 -> 11.3.22 (Lucide.Avalonia needs 11.3.17 or newer)
- third_party/luajit: the ext-luajit folder of the NES/SNES Classic Edition open source packages (official LuaJIT 2.0.4 + Nintendo's build changes), with its license and a note on where it comes from - scripts/build-luajit-linux.sh builds it (static) instead of cloning the latest 2.0 branch; scripts/build-luajit-windows.bat builds a static luajit.exe with Visual Studio. Lib/luajit now holds luajit.exe (2.0.4, no lua51.dll) and jit/bcsave.lua - The bytecode is byte for byte what the previous Windows luajit.exe (2.0.2) produced on the 613 console files (the Linux build from the latest 2.0 branch differed on 199 of them) - README: open source credits and Nintendo's OSS notice; hooks and git leave third_party untouched
3 of 5 tasks
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.
What changes
Decompiler and encoder
third_party/luajit: official LuaJIT 2.0.4 + Nintendo's build changes), with the license, a note on its origin and Nintendo's OSS notice in the README. Bytecode is byte for byte what the previousluajit.exe(2.0.2) produced on the 613 files.Linux
TargetOsin the csproj). The CI builds and uploads alinux-x64package.UI
Project
Roots.xmlremoved (the Linux executable went from 43 MB to 24 MB); dead code removed..editorconfigand the Roslyn analyzers (0 warnings);pre-commithooks (also run by the CI), same as MiniThemeStudio.Tests
build(Windows),build-linuxandpre-commitpassNotes
Lib/originaland the vendored LuaJIT source.TODO.md(encode with-sor not, release asset for the Linux package, proposing the Linux port upstream).