Deploy file into App Directory when bundled #10535
Unanswered
eric-cosme
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there! I would like to know if there is any way to achieve the following:
I have a JSON file that I want to deploy with the app when the build command is executed, for the MacOS is the following:
/src-tauri/target/release/bundle/macos
In this folder the .app file is located, I have deployed the app with the JSON file inside the .app under the assets folder using the tauri.conf.json ("resources": ["assets/*"]), but I actually want to deploy the file in the same folder as the macos .app file, for example:
/src-tauri/target/release/bundle/macos/
The following screenshot is how the deployed directory is:
My JSON file is currently located inside the /src-tauri/assets folder:
My current tauri.conf.json:
{ "build": { "devPath": "../jsviewer", "distDir": "../jsviewer", "withGlobalTauri": true }, "package": { "productName": "mdtimeline-ohif-viewer", "version": "0.0.0" }, "tauri": { "allowlist": { "app": { "all": true }, "path": { "all": true }, "fs": { "all": true, "scope": ["$RESOURCE/**"] }, "protocol": { "asset": true, "assetScope": [""] }, "all": false, "shell": { "all": false, "open": true } }, "windows": [ { "title": "MDTIMELINE JS Viewer", "width": 1200, "height": 900 } ], "security": { "csp": null }, "bundle": { "active": true, "targets": "all", "identifier": "mdtimeline-ohif-viewer", "icon": [ "icons/32x32.png", "icons/128x128.png", "icons/[email protected]", "icons/icon.icns", "icons/icon.ico" ], "resources": ["assets/*"] } } }
I am using rust in the backend to read the fs files, so, is there anyway I could complete this?
Beta Was this translation helpful? Give feedback.
All reactions