Skip to content

Add Disc Support - #3

Open
VTXG wants to merge 7 commits into
SMGCommunity:mainfrom
VTXG:disc
Open

Add Disc Support#3
VTXG wants to merge 7 commits into
SMGCommunity:mainfrom
VTXG:disc

Conversation

@VTXG

@VTXGVTXG commented Jan 17, 2025

Copy link
Copy Markdown
Contributor

Users can now input a path to output disc files of modules too.
This also makes a slight change to how the unibuild flag is checked, which prevents some issues.

@SuperHackio

Copy link
Copy Markdown
Member

This also makes a slight change to how the unibuild flag is checked, which prevents some issues.

Sorry, what issues? I was unable to figure out what the problem is

@VTXG

VTXG commented Jan 18, 2025

Copy link
Copy Markdown
ContributorAuthor

This was what I was refering to, it's not an issue, I just misphrased it, sorry about that.
image

@SuperHackio

Copy link
Copy Markdown
Member

Is the Disc Path supposed to be an optional argument? It looks that way, but the readme has it in the mandatory <> signs.

@VTXG

VTXG commented Jan 18, 2025

Copy link
Copy Markdown
ContributorAuthor

It is an optional argument yeah, should I replace it with [ ]?

@SuperHackio

Copy link
Copy Markdown
Member

If it's optional, then a system to have unordered arguments needs to be added as well, as -u [disc path] and [disc path] -u should both be valid because they are optional

@VTXG

VTXG commented Jan 18, 2025

Copy link
Copy Markdown
ContributorAuthor

Hmmm yeah, I'll get to implementing that.

@VTXG

VTXG commented Jan 18, 2025

Copy link
Copy Markdown
ContributorAuthor

Done! I've also made the optional argument parser a function in case anybody wants to add more optional arguments in the future.

Comment threadSyatiModuleBuildTool/Program.cs Outdated
if (args.Length > 4 && args[4] != "-u") { // Make sure the argument in the position of Path_To_Disc_Output_Folder isn't the unibuild flag
Console.WriteLine();
Console.WriteLine("Copying disc...");
// if (args.Length > 4 && args[4] != "-u") { // Make sure the argument in the position of Path_To_Disc_Output_Folder isn't the unibuild flag

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, left that in accidentally, I'll fix it rn

@SuperHackioSuperHackio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time ever writing a review lol.

Comment threadSyatiModuleBuildTool/Program.cs Outdated
Comment threadSyatiModuleBuildTool/Program.cs Outdated
Comment threadSyatiModuleBuildTool/Program.cs Outdated
Comment threadSyatiModuleBuildTool/DiscUtility.cs Outdated
Comment threadSyatiModuleBuildTool/DiscUtility.cs Outdated
Comment threadSyatiModuleBuildTool/DiscUtility.cs Outdated
Comment threadSyatiModuleBuildTool/DiscUtility.cs Outdated
@VTXG

VTXG commented Jan 19, 2025

Copy link
Copy Markdown
ContributorAuthor

Done!

@SuperHackio

Copy link
Copy Markdown
Member

Hey actually, what happens if two modules provide the same file? There should probably be a warning about that...

@VTXG

VTXG commented Jan 19, 2025

Copy link
Copy Markdown
ContributorAuthor

Currently the last file to be copied is the one that stays, but now that you mention it...
I'll add a warning real quick.

@SuperHackio

SuperHackio commented Jan 19, 2025

Copy link
Copy Markdown
Member

I would actually prefer that it be handled properly instead of just being a warning, if possible.
Granted, I don't know what goes into "handling it properly"

@VTXG

VTXG commented Jan 19, 2025

Copy link
Copy Markdown
ContributorAuthor

Yea, also not sure how to handle it.

@VTXG

VTXG commented Jan 19, 2025

Copy link
Copy Markdown
ContributorAuthor

Added a simple warning when a file is overwritten.

Comment threadSyatiModuleBuildTool/DiscUtility.cs Outdated

try {
if (Path.Exists(targetPath))
Console.WriteLine($" - File will replace {targetPath}");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand this error. what file will replace targetPath?

Comment threadSyatiModuleBuildTool/DiscUtility.cs Outdated
}
catch (Exception e) {
Console.WriteLine($"Error while copying \"{sourceDiscFolder}\": {e.Message}");
Console.WriteLine($"Error while copying {discFolder}: {e.Message}");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restore the quotation marks please

Sign up for freeto 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

@VTXG@SuperHackio