-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full Rewrite with Linux and (theoretically) MacOS Support #17
Conversation
Thank you for this. I originally wrote this when I was a lot less experienced than I am now haha, but this is really nicely done. I'll give the code a quick review and approve this if everything checks out. |
{ | ||
public static class Logger | ||
{ | ||
private static readonly string SourceRoot = "F:\\GitHub\\BotwSaveManager"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use hard-coded paths. If you want to have a logger, use AppDomain.CurrentDomain.BaseDirectory
to get the current application path, then add a folder for logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the log outputs folder, it's the path to the source code to shorten the source file paths in the logs. (See Line 29)
However, I may need to change it to reflect the workflow path, as I only tested this when building on my machine (and therefore my source code path).
BotwSaveManager.Console/Program.cs
Outdated
using BotwSaveManager.Core.Helpers; | ||
using System.Diagnostics; | ||
|
||
Console.WriteLine("Breath of the Wild Save Manager by Jordan Zeotni, fork of https://github.com/WemI0/BOTW_SaveConv, rewritten and updated by Arch Leaders\n\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update "Jordan Zeotni" to "Jordan Marine" I used to use a fake last name back in 2020. That's my fault.
BotwSaveManager/Resource.cs
Outdated
public Resource(byte[] data) => Data = data; | ||
public Resource(string name, string root) | ||
{ | ||
if (File.Exists($"{root}/{name}")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When combining paths in cross-platform applications, it is better to use Path.Combine
then to concatenate two paths, as there are a few (uncommon) cases where putting a slash between two paths causes issues.
I was bored, and I thought this was a cool tool that could be improved. So I rewrote it using AvaloniaUI (cross-platform UI framework) and .NET 6. It reflects the WinForms version, but with some QoL improvements like drag/drop and quick convert options.
Changelog:
File > Convert Save
git tag vX.Y.X && git push --tags
)To-do:
option.sav
to narrow down selection and prevent user errors.Notes:
If you wish to test the built application, there are releases on my fork with compiled executables.