Skip to content

Conversation

@liushuyu
Copy link

This pull request integrates nedclib into the program by using the .NET P/Invoke system instead of spawning external executables.

An alternative build system file is also added for non-Windows platforms should a cross-platform version of the application be desired in the future.

A definition of GitHub Actions has also been added to get prebuilt binaries from GitHub.

@HunterRDev
Copy link
Owner

Appreciate the effort here! I started work porting the nedclib code directly to C# awhile back, but eventually stopped because I plan to deprecate this project and replace it with a newer version built off Avalonia UI. This newer project isn't released yet, but it combines the functionality of this tool with added support for Doubutsu no Mori e+ features. Even so, having this tool no longer rely on external binary/executable dependency is ideal in the meantime, so this is a welcome change.

Before I can merge your work here, I have a few requests. When reviewing and testing your changes, I ran into several issues when building with Visual Studio on Windows.

  • I'd prefer building through Visual Studio to be a single build that works out of the box. That is, I should be able to just clone the repository and simply start debugging immediately with no issues. However, as it stands, debugging immediately leads to the issue of nedclib.dll not being accessed correctly since it isn't copied to the build directory. I had to manually build and copy nedclib.dll to the debug directory or add a build action to do so automatically upon build. It looks like you tried to resolve this for release, but I don't think either build configuration can be ran as intended out of the box from a fresh clone.
  • When the above issue is resolved, the card doesn't seem to be writing properly, as saving to RAW results in a read error when scanning into Animal Crossing. Appears to be an issue with headerfix not properly adjusting the contents before converting to RAW file.
  • Trying to write multiple cards, or doing something like opening the dot code window, exiting it, and trying to save as a RAW file, will throw a System.IO.IOException since it seems card_data.bin isn't being properly closed. It remains in use by another process, which crashes the program.

These are just the points I found when testing this PR quickly. I can look into resolving these myself when I have more time, but figured I'd mention these now in case you want to review it again.

@HunterRDev HunterRDev self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants