Skip to content
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

AvaloniaUI Porting Project [Archive Editors] #441

Closed
wants to merge 18 commits into from
Closed

AvaloniaUI Porting Project [Archive Editors] #441

wants to merge 18 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 22, 2021

This has been talked about over and over again. Might as well do it now. It may be impossible to do soon.

This PR aims to remake all of the WPF and WinForms-based tools in AvaloniaUI, whilst breaking off dependencies on System.Windows and Xe.Tools to both ensure X-Platform compatibility and to get rid of Xe.Tools in general since it has started causing issues for tool maintenance.

The first tool to be affected by this change is "OpenKh.Tools.BarEditor". It's AvaloniaUI counterpart has been renamed to "OpenKh.Tools.BarTool" to avoid collisions. This may be temporary or permanent depending on the input on this issue.

Every tool that uses WPF and WinForms is to be affected by this change. Tests are welcome and are encouraged. Below, you will find a comment with a checklist to every individual tool that is currently being worked on. Below on this thread, you will find a checklist of all of the tools completely transitioned to AvaloniaUI.

This PR aims to port all of the Archive Editors to AvaloniaUI.

Feedbacks are appreciated.
Do note that any checks made by the buildbots may fail during this time until finalization.

Completed Checklist (Plz do tell if I missed/wrongfully added any):
Any one of the Italic entries are optional and not necessary for a tool's completion

BAR Editor

  • Fix BAR's "Index" variable to "Duplicate" variable.
  • Ensure that the fix above works as intended with CLI tools.
  • Handle Opening and Saving.
  • Handle Imports and Extraction.
  • Handle GUI Updates following the MVVM Standard.
  • Implement a save-safe mechanism.
  • Implement drag-drop functionality.
  • Implement the About dialog.
  • Ensure MSET Compatibility.
  • Ensure Xe.Tools is no longer necessary.
  • Complete the About Dialog
  • Handle Opening of Files within BAR Files.

IMG-IDX

  • Handle Opening and Saving.
  • Handle all kinds of Extractions.
  • Handle all kinds of Importing operations.
  • Implement a save-safe mechanism.
  • Implement drag-drop functionality.
  • Implement the About dialog.

@ghost ghost added Enhancement Request for, or a pull request of, a new feature or enhancement to an existing one. GUI Tools Concerning OpenKH.Tools.* labels Feb 22, 2021
@ghost ghost self-assigned this Feb 22, 2021
@ghost ghost added the Overhaul This is a pull request initiating an overhaul. label Feb 22, 2021
@Xeeynamo
Copy link
Contributor

What is the purpose of this commit? 68183b3

I see that loads of stuff has been renamed and most of them is out of scope from this PR and unwanted changes.

@ghost
Copy link
Author

ghost commented Feb 25, 2021

What is the purpose of this commit? 68183b3

I see that loads of stuff has been renamed and most of them is out of scope from this PR and unwanted changes.

Multiple purposes.

AvaloniaUI requires all enums to be absolute for it's bindings. Some unknowns without a value given to them have offset the list,
making the type list confused.

@Vladabdf has requested some of the terminology changed like Imgd and Seqd since we know what they are supposed to be called now, so I obliged. Terminology like SonyADPCM and PS2Image come from me and terminology like ImageData and SequenceData come from him.

@Xeeynamo
Copy link
Contributor

What is the purpose of this commit? 68183b3
I see that loads of stuff has been renamed and most of them is out of scope from this PR and unwanted changes.

Multiple purposes.

AvaloniaUI requires all enums to be absolute for it's bindings. Some unknowns without a value given to them have offset the list,
making the type list confused.

@Vladabdf has requested some of the terminology changed like Imgd and Seqd since we know what they are supposed to be called now, so I obliged. Terminology like SonyADPCM and PS2Image come from me and terminology like ImageData and SequenceData come from him.

What do you mean by requiring the enums to be absolute?

The new namings are more confusing. IMD is clearer that ImageData as it's clear it is about the same IMD that is found elsewhere. TM2 is not only used for PlayStation 2 but also for PSP and some PS3 games. ImageZip is not really a "zip" archive and in general I disagree on renaming everything uppercase (eg. from Bdx to BDX).

@ghost
Copy link
Author

ghost commented Feb 25, 2021

What do you mean by requiring the enums to be absolute?

The new namings are more confusing. IMD is clearer that ImageData as it's clear it is about the same IMD that is found elsewhere. TM2 is not only used for PlayStation 2 but also for PSP and some PS3 games. ImageZip is not really a "zip" archive and in general I disagree on renaming everything uppercase (eg. from Bdx to BDX).

Some unknowns are missing and some unknowns were not given a value, putting back the missing unknowns makes the enum absolute since there are no missing entries in the middle. Removing all the unknowns would also make the enum absolute but that broke some stuff.

As for the naming schemes, I can name PS2Image to PSImage since that is what TIM2 is. PlayStation Image File.
As for the others like ImageData and ImageZip, you may have to consult Vlad about it. Because I do not know what common ground you two can reach. I just did what someone with collaborator rights requested.
As for the renames from PascalCase to Uppercase, that is the standard naming scheme for extensions. Either lower or UPPER case naming. However, this can be altered.

@Xeeynamo
Copy link
Contributor

What do you mean by requiring the enums to be absolute?
The new namings are more confusing. IMD is clearer that ImageData as it's clear it is about the same IMD that is found elsewhere. TM2 is not only used for PlayStation 2 but also for PSP and some PS3 games. ImageZip is not really a "zip" archive and in general I disagree on renaming everything uppercase (eg. from Bdx to BDX).

Some unknowns are missing and some unknowns were not given a value, putting back the missing unknowns makes the enum absolute since there are no missing entries in the middle. Removing all the unknowns would also make the enum absolute but that broke some stuff.

As for the naming schemes, I can name PS2Image to PSImage since that is what TIM2 is. PlayStation Image File.
As for the others like ImageData and ImageZip, you may have to consult Vlad about it. Because I do not know what common ground you two can reach. I just did what someone with collaborator rights requested.
As for the renames from PascalCase to Uppercase, that is the standard naming scheme for extensions. Either lower or UPPER case naming. However, this can be altered.

I suggest to minimise the amount of changes globally and focus on the scope of this PR. Renaming those BAR entries can be easily done in a separate pull request to have more control on the changes we merge in.

@ghost
Copy link
Author

ghost commented Feb 25, 2021

I suggest to minimise the amount of changes globally and focus on the scope of this PR. Renaming those BAR entries can be easily done in a separate pull request to have more control on the changes we merge in.

I am trying to do so as best as possible, but since the enum was being changed as Avalonia required it, we figured we might as well go for it.
Sorry for the inconvenience. I will make sure to make the least global changes as possible.

@ghost ghost changed the title Remake all of the GUI tools in AvaloniaUI AvaloniaUI Porting Project [Archive Editors] Feb 25, 2021
@Vladabdf Vladabdf marked this pull request as ready for review September 25, 2021 04:39
@OpenKH OpenKH locked and limited conversation to collaborators Sep 25, 2021
@Vladabdf Vladabdf closed this Sep 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement Request for, or a pull request of, a new feature or enhancement to an existing one. GUI Tools Concerning OpenKH.Tools.* Overhaul This is a pull request initiating an overhaul.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Incorrect Compile Date Ensure tools are portable across different systems
2 participants