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

How is the qmk_toolbox.exe 154MB? #480

Closed
Sainan opened this issue Jul 29, 2024 · 14 comments
Closed

How is the qmk_toolbox.exe 154MB? #480

Sainan opened this issue Jul 29, 2024 · 14 comments

Comments

@Sainan
Copy link

Sainan commented Jul 29, 2024

I thought it might be the resources, but those add up to only like 7MB.

@tzarc
Copy link
Member

tzarc commented Jul 29, 2024

.NET Framework.

@tzarc tzarc closed this as completed Jul 29, 2024
@Sainan
Copy link
Author

Sainan commented Jul 29, 2024

Doesn't .NET usually get redistributed/is already installed? I guess you wanted the EXE to be self-contained? That's a bit rough, tho.

@fauxpark
Copy link
Member

fauxpark commented Jul 29, 2024

Publishing as self-contained appears to be the only way for dotnet to generate a single .exe file, otherwise it also requires a .dll next to it. This would be fine if you're installing via the installer, but makes the "standalone" option less...standalone.

https://learn.microsoft.com/en-us/dotnet/core/deploying/

Well, I just tried it again and I was looking at the wrong thing, apparently. With --self-contained false the .exe under publish/ is only about 15MB. However I'm not sure this will work without .NET 6 installed. Currently setting up a 15H2 VM to test it out.

@fauxpark
Copy link
Member

Yep, it does not work:
image

@Sainan
Copy link
Author

Sainan commented Jul 29, 2024

It might be a fair assumption to make that a user does have .NET installed, tho. At least I have some .NET 4.5 apps that "just work" and they're <100KB.

@tzarc
Copy link
Member

tzarc commented Jul 29, 2024

.NET Framework 4.x is a completely different beast to .NET 5.x and above.

@Sainan
Copy link
Author

Sainan commented Jul 29, 2024

In a good way or in a bad way? Because from a developer POV, it seemed like a significant downgrade in terms of development experience, hence sticking with the much more usable .NET 4 series.

@fauxpark
Copy link
Member

.NET Framework was/is installed on Windows by default: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies

This is not the case starting with .NET 5. You must either install it yourself or have it bundled with the application.

@Sainan
Copy link
Author

Sainan commented Jul 29, 2024

Yet another reason to use the .NET 4 series? I admit, I'm not sure how feasable a "downgrade" would be, but might be worthwhile. 154MB is really chunky for an executable, especially one that has to be downloaded.

For reference, Google Chrome's chrome.dll is 211MB.

@tzarc
Copy link
Member

tzarc commented Jul 29, 2024

We see no reason to go backwards and won't be entertaining such a request.

@Sainan
Copy link
Author

Sainan commented Jul 29, 2024

Just because the version number is lower, doesn't mean you'd be going backwards.

@fauxpark
Copy link
Member

That's kind of how version numbers work though...

For one thing, we'd lose out on a bunch of newer language features and various other things. You can see all the changes from the upgrade to .NET 6 here: #421

Also of note is that the Toolbox still uses Winforms, and that appears to be what's taking up a good amount of the filesize. Switching to probably anything else might help here, but I haven't had time to look into it.

@Sainan
Copy link
Author

Sainan commented Jul 31, 2024

With Microsoft, that is how version numbers work. No one using Windows 11 would decline an upgrade to Windows 10. No one writing C++ would purposefully use newer versions of Visual Studio lest they want "surprise crashes" for certain users. And I personally would not accept a downgrade from .NET 4 to .NET 5.

@tzarc
Copy link
Member

tzarc commented Jul 31, 2024

You're more than welcome to fork toolbox and maintain your own.
This discussion has completed. Locking.

@qmk qmk locked as resolved and limited conversation to collaborators Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants