#Resources glob pattern error

9 messages · Page 1 of 1 (latest)

heavy wyvern
#

I'm trying a workaround solution to bundle dynamic libraries with my app until this issue is resolved: https://github.com/tauri-apps/tauri/issues/6802. I have a script that places all the libraries in the src-tauri directory, then in the tauri.conf.json's bundle section I've added

"resources": [
    "*.{so,dylib,dll}"
]

Unfortunately, it doesn't seem to recognize this pattern and can't find any files. Does it not use glob patterns?

Note that they have to be placed in the src-tauri directory and not src-tauri/nativelibs (some subfolder) because on Windows the .dll files need to be next to the .exe file, not in a subfolder. Unfortunately, tauri doesn't seem to allow choosing the directory the resource should end up in. I would also be ok if someone could figure out how to add the subfolder to the windows PATH variable when running the tauri app.

flint coral
#

Does it not use glob patterns?
Not the {} part, /*/ and *.so should work (not actually 100% sure about the last part)
Unfortunately, tauri doesn't seem to allow choosing the directory the resource should end up in
working on it https://github.com/tauri-apps/tauri/pull/5950
I would also be ok if someone could figure out how to add the subfolder to the windows PATH variable when running the tauri app.
That depends on what needs it. Your tauri/rust app itself? No chance afaik.
A sidecar? somewhat easy since the Commands have a env api.

heavy wyvern
flint coral
#

i meant whatever needs those dlls

#

if it's the sidecar needing them then you could set the $PATH for the sidecar

#

but for the main app that's not possible afaik because there must be some kind of "parent" process setting the $PATH for the exe.

heavy wyvern
heavy wyvern
heavy wyvern
#

I did this and it seemed to work. But I still see this as an issue. Do you think I should add this as a feature request on github?