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
feat(nsis): add an option to opt out tauri utils plugin #9526
Conversation
I need to take a look at the CheckIfAppIsRunning part, it's not actually detecting the app right now |
Should be fixed now |
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.
I still would like to explore reducing the size of our semverCompare and process utils, I believe we can probably make these two plugins really small that we wouldn't need to use the alternatives.
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
I compiled it without the download one, it's around 200 KB, not too bad but definitely something we could improve |
A 100kb of that are related to static CRT iirc |
Sorry for the long delay, I wanted to experiment a bit and see if we can avoid having this option. I have been doing some experiments and I have managed to reduce the size of some of our nsis plugins:
So I think we can keep using our The remaining bit here is the So I am proposing to remove it all together and use If that's not desired, we can make this PR add an opt-out option specifically for the |
I think requiring embedBootstrapper for windows 7 is fine. We shouldn't do more than the minimum for win7 at this point imo (and remove support for it in v3). One thing though, i am fairlyyy sure i've had issues without our download plugin on win10 too so we should triple check it! We should also check if using powershell will open a terminal window again which tbh would be a blocker for me too. |
using But the one thing I hate about this is that we lose the progress bar. |
no std version seem to be promising, 50 KB is acceptable To be honest, if we can't reduce the download plugin's size enough, there'll not be much benefit doing it this way, the bootstrap is only 1.5 MB
I'm pretty sure |
The problem i am thinking about is that when ms terminal is the default console host then the hidden window style doesn't work anymore. On win11 this isn't a problem as long as we're only downloading webview2 since all win11 installations should have that, but win10 added support for changing the default to ms terminal in later versions too and there we can't expect webview2 to be installed. |
I'm pretty sure |
I have been tinkering over the weekend a bit and I managed to get the dlls even smaller
I don't think I can get them smaller than this, so I will start looking into the |
I don't know how I missed this before but looks like nsis has a built-in download plugin that is able to download the webview2 installer which is also really small in size |
I apologize for initially asking you to open this PR then rejecting it. I have opened tauri-apps/nsis-tauri-utils#26 for the small dll size |
Its first line says
I did come across this but it says no HTTPS
It's fine, glad to accept a better solution 😃 |
That's probably why it works on win7 because https will fail, though i am surprised a http request against a https url works, probably only a matter of time until this breaks so we should keep an eye on it. |
Add an option to replace nsis util plugin with built-in ones, this can reduce the final bundle size by ~0.8 MB
Downsides including:
2.0.0-alpha.1
doesn't have curl installed by defaultdoesn't have tls 1.2 enabled by default (this option is not recommended for Windows 7 anyway)