CabMaker icon indicating copy to clipboard operation
CabMaker copied to clipboard

Added auto-complete extension for the output file

Open akarapatakis opened this issue 2 years ago • 6 comments

CabMaker may be used not only to make .cab archives, as referenced in README

It's a helpful utility for scenarios like SharePoint and InfoPath development. Both of those rely on .cab files but with different file extensions (.wsp for SharePoint and .xsn for InfoPath).

And another scenario that this feature can be useful is when a user forgets to add the extension themselves, or they think that cabmaker does it automatically.

So, I added a combobox and modified the application accordingly in order to "request" from the user what file extension they want for they archive. After the user selects it (or it remains the default extension "cab") it modifies the output filename textbox with the file extension at the end. Here is a comparison between before and now εικόνα

εικόνα

akarapatakis avatar Jul 28 '23 09:07 akarapatakis

I like the idea, though I think it presents a couple of challenges that would need to be solved to make the UI/UX as intuitive and clear as possible.

First challenge: I tried typing a filename with a custom extension into the target filename box (while leaving CAB selected in the drop-down) and got this as the result:

CabMaker-PR-test

There's nothing wrong with that result, but I also had no idea what to expect which is where I think there's an opportunity to add clarity (like a label showing the "final target filename" that updates when the textbox or drop-down selections change).

Second challenge: What if I want to give my file an extension that's not one of the existing choices in the drop-down? There doesn't seem to be a way to do that unless I missed it when testing.

But all of that said, I really appreciate your interest in this little "5-minute project" of mine (how it started). I'm not only amazed this little app is still alive in 2023, but I'm also thrilled that someone else out there besides me is willing to spend time making it better!!

sapientcoder avatar Aug 15 '23 00:08 sapientcoder

Hello!

I started contributing to this project because of a game that my friend is making and wanted to find an one-click solution that would make a cab file easily and fast.

Now, in "First Challenge", maybe I wasn't clear enough on it, I will improve the label tomorrow 😄

But in "Second Challenge", the reason I didn't add a choice to add a customized choice, as it is based on the README file, it contains only these three extensions, but that's another thing I will fix tomorrow as well 😉!

Thanks for respecting my effort trying to improve this utility! 🔥

akarapatakis avatar Aug 15 '23 22:08 akarapatakis

Ah, okay. That makes sense.

On a related note, CAB files can actually have any file extension, not just the ones I listed in the README.

(For example, Microsoft used to have TSK files for its Windows Mobile operating system. Those were also CAB files but had a TSK extension.)

What makes it a CAB file is that it conforms to Microsoft's Cabinet File Specification which you can see here: https://download.microsoft.com/download/4/d/a/4da14f27-b4ef-4170-a6e6-5b1ef85b1baa/[ms-cab].pdf

It's possible there might be other files too which are "really" CAB files but use different extensions. I don't know for sure. But that's why I think allowing for custom extensions is probably still a good idea even if we provide a "shortcut" for the most common ones.

sapientcoder avatar Aug 17 '23 00:08 sapientcoder

Also, I'm just curious because I've never done game development... how are CAB files used in your friend's game?

sapientcoder avatar Aug 17 '23 00:08 sapientcoder

Nothing so special. All the game files are packed to a cab file and then on my installer, and updater, it extracts the cab to the installation directory. I told him today to start using compression since it is an online-based installer.

akarapatakis avatar Aug 17 '23 09:08 akarapatakis

Sorry for the late reply but i finally have time to spend on fixing the small problems on CabMaker. I recently switched only to Arch Linux and didn't have time to setup a windows virtual machine. I have changed the label that i had to from "File Type" to "Output File Extension" and added the none option on the extension combobox. I may push the commit later if i can!

akarapatakis avatar Sep 01 '23 17:09 akarapatakis