Closed samrg472 closed 1 month ago
Try **
instead. One *
in glob patterns typically only means one level.
And yes, in prior Tauris versions *
may have been enough but this was "fixed". We should update the docs to explain this I guess :)
Try
**
instead. One*
in glob patterns typically only means one level.And yes, in prior Tauris versions
*
may have been enough but this was "fixed". We should update the docs to explain this I guess :)
Forgot to mention, I did try this but I get an error during building.
Build output:
glob pattern ../resources/** path not found or didn't match any files.
Error failed to build app: failed to build app
I also tried with the path relative to package.json
which is where I run the build command.
Build output:
glob pattern ./resources/** path not found or didn't match any files.
Error failed to build app: failed to build app
Interestingly enough, if I force an error, it directs me with a helpful message.
Build output:
Pattern syntax error near position 15: wildcards are either regular `*` or recursive `**`: Pattern syntax error near position 15: wildcards are either regular `*` or recursive `**`
Error failed to build app: failed to build app
So I did try ** on Tuesday for another documentation guide (Info.plist localization) and there it worked so it's not completely broken at least.
I'll try your file layout when I'm not stuck with my phone (tomorrow).
And since you mentioned it, the paths are always relative to the tauri.conf.json file location.
Sorry for the delay, for your usecase ../resources/**/*
should work which honestly makes no sense to me, ** should match files too (and it used to). I'll move this issue back to the tauri repo.
Edit: I assume i was still on an older tauri version when i tested it for the above comment :/
The correct value is ../resources/**/*
, which matches bash globbing, you can test this by checking difference between echo ./dir/*
or echo ./dir/**
and echo ./dir/**/*
edit: lol you're right - i mixed up 2 different things
back to the docs repo then 👐
@amrbashir Do we have a way to keep the folder structure when using the object notation with globs? So conecpt wise something like this:
"resources": {
"../resources/*": "resources/*",
"../resources/**/*": "resources/**/*"
},
(using resources/
as a target only copies the files, not the folders - which is also a required logic so that's good)
ah okay, just "../resources/": "resources/"
works which i didn't notice because rust didn't re-run the build script, therefore not copying the files in target (was still copied into the installer fine)
Hey, I ran into a build issue that is because of files not being found.
error: failed to run custom build command for `package v0.0.0 (/some/path/package/src-tauri)`
Caused by:
process didn't exit successfully: `/some/path/com_package-0df4798ccf11efa9/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=TAURI_CONFIG
cargo:rerun-if-changed=tauri.conf.json
cargo:rustc-check-cfg=cfg(desktop)
cargo:rustc-cfg=desktop
cargo:rustc-check-cfg=cfg(mobile)
cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_APP_NAME=dev
cargo:rustc-env=TAURI_ANDROID_PACKAGE_NAME_PREFIX=com_package
cargo:rustc-check-cfg=cfg(dev)
cargo:rustc-cfg=dev
cargo:PERMISSION_FILES_PATH=/some/path/app-manifest/__app__-permission-files
cargo:rerun-if-changed=capabilities
cargo:rustc-env=TAURI_ENV_TARGET_TRIPLE=x86_64-unknown-linux-gnu
glob pattern bins/* path not found or didn't match any files.
I've run into so many build issues while trying to migrate so I assumed this was some incorrectly configured build environment, not the fact I have a bins/*
directory that I need access to without files in it. I may be mistaken but I think in previous versions you didn't need any files here at all and this wasn't an error. Any chance this error can be improved by specifying it is probably a problem with my tauri.conf.json
file with the values of bundle > resources
? Or make it describe a bit better how to go about fixing this for the developer?
(Also sorry if this is the wrong place for this)
Thanks.
Describe the bug
When creating installers, tested only on Windows, nsis and msi targets do not install all folders recursively specified under
resources
with the glob pattern. In the reproduction, thelibrary
folder is excluded from the installers.Reproduction
Folder layout:
Relevant config for
tauri.conf.json
Run
tauri build
to generate the installers.Expected behavior
I expect
../resources/*
to recursively install all files and folders during installation. However, only top-level files are installed, e.g._up_/resources/data.db
.Files expected to be installed:
_up_/resources/data.db
_up_/resources/library/static.json
Full
tauri info
outputAdditional context
This used to work on older versions of v2, I'm not sure which version broke this change since my last app release was with version v2-beta.23.
Workaround