#Tauri v1 Include .dll file

48 messages · Page 1 of 1 (latest)

small summit
#

I added rusqlite to my cargo list and added a custom sqlite3mc.lib and .dll

The .lib seems to be linked against rust, but the .dll causes the app to not startup when not present.

I added the .dll to the resources, but of course it doesn't add it into the portable .exe file...
I don't want to have to use the .msi file. Any idea how to include the .dll into the binary and make it paste it before the app starts or is this not possible?

vernal atlas
#

Wait

#

I got something hold on

#

Maybe, this?

small summit
#

Yeah, it would be nice if I could just only ship the portable .exe, as I am using google drive shared file to automatically update the executable for all the users

vernal atlas
#

Always check source code of it.

#

Since I lost the one someone sent me.

#

This one I found

#

Wait

#

Don't use this

#

Need to find proper one

#

I think I can find, 1s.

small summit
#

oke

vernal atlas
#

I think it is this one?

#

Try, and see if it works.

#

Again, I'd honestly prefer if you just made a zip file.

#

It's much easier.

vernal atlas
#

I never tried it with Tauri

small summit
#

well I can run it inside a batch file, which is fine

vernal atlas
#

And just make installer of it.

#

Or you can just code it in, no need for a DLL

small summit
#

well rusqlite requires me to use a .lib file, and that .lib file requires the .dll but the .lib file is already 'included' in the binary

vernal atlas
#

Hm

small summit
#

and on whatever drive and computer

vernal atlas
#

I mean, you don't need an installer

#

You can just drag the contents anywhere.

small summit
#

its called rusqlite

#

not sqlite

#

-# that preview looks clean

small summit
#

I don't think I can say to it: only add support for rusqlite if the .dll is there

#

cause like the feature that makes use of it, is kinda an 'opt-in' as it requires someone to have an external program installed which contains an encrypted database that I need to read out.

(not doing anything illegal, I promise)

small summit
# vernal atlas https://github.com/dotnet/ILMerge

it doesnt want to work. Also tried dotnet-ilrepack, but no luck as it doesnt want to work with non .NET projects

ERROR: Loading src-tauri\target\release\app.exe failed: ILRepack does not support merging non-.NET libraries (e.g.: native libraries)

vernal atlas
#

Yeah, then it can't be possible.

#

At least not as far as I know

atomic holly
#

It's possible and the term for it is "reflective DLL injection".

(not doing anything illegal, I promise)
I don't think anti-virus vendors will believe you 😅

#

I would recommend you package the DLL in the installer and then have runtime code to check for updates.

small summit
# atomic holly I would recommend you package the DLL in the installer and then have runtime cod...

but HOW? that's the question. How in the world do I do that?

Btw, no need to check for updates on the .dll, its just sqlite3mc_x64.dll, so no real need to check for updates, as I won't update it anyways, since I don't need to.

And still, I don't want to use an installer, I just want it to be portable as 1 file without installation steps...
So a self extracting thing that cleans up after itself might also be fine

atomic holly
small summit
#

The thing is that I need sqlite3mc (sqlite3 multipleciphers), which is NOT inside the bundled feature!

I need multipleciphers cause the original program runs with C# and they used the System.Data.SQLite: RC4 Chipher to encrypt a database that I need to use.
I just want to read out that database from within my tauri app.

atomic holly
#

The only discussion I could find about that particular extension was https://github.com/rusqlite/rusqlite/issues/219#issuecomment-1553755788. In the same issue, there was a proposal to support all encryption extensions (https://github.com/rusqlite/rusqlite/issues/219#issuecomment-297110332) but I suspect that went nowhere because it wouldn't work with bundled unless they include the bindings for every single extension. You could fork their libsqlite3-sys, add the bindgen bundled version yourself, and use Cargo's patch (https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section).