π Is it possible to bundle external binaries with tauri setup? Or let me rephrase that, how does one bundle an external executable (e.g another binary) for setup-only? Say I have a media app dependent on gstreamer, and I dont want to 300+ MB to my app size, so I want to bundle the runtime setup of gstreamer, but not for runtime, just setup only. So it executes and installs to a separate location on the drive during setup but now avaiolable to the app on run
#Setup-only dependencies?
11 messages Β· Page 1 of 1 (latest)
Maybe download it from rust side and save its files where needed? Like, on tauri setup() function you check if it is available and, if not, you download it (don't know though, if that would work if your app is linking gstreamer libs).
That is assuming you're on windows. Because on linux you can add the needed libraries as dependency for the deb/rpm package and it will make them available before installing your app.
Yeah, this is for Windows. I am considering this, but I wanted to keep an option for an offline installer. My initial thought was using the NSIS and Wix installer hooks, hook into setup post install and run the external seup silently (bundled together), I just don't know how to make sure it doesnt get added to the final app
using the NSIS and Wix installer hooks
Yeah, that sounds like the way to go.
I just don't know how to make sure it doesnt get added to the final app
i don't think there's anything you have to do here. if you don't explicitly add it to the app it should not just magically appear there.
Thanks Fabian. Solved it using nsh hooks, basically bundled, and then post install, I delete from resources. So it gets bundled with setup, but gets removed immediately after π
π Could we please have hooks for these (standard support)?
"Put binary A,B,C in resources. Add to tauri.cconf.json (bundle.nsis.setupFiles). Set pre/post install, and it gets run on setup and cleared after" - Or maybe an entry in the windows installer docs
i don't think we can handle additional features like this at the moment. An entry to the docs would be cool though, that would also likely end up in the approach being refined via feedback before its turned into a feature.
would you mind working on a docs pr? or at least share your approach so someone else can do it?
Sure thing
https://github.com/tauri-apps/tauri-docs/pull/3357
π First direct tauri PR