Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff86de7ce2 | |||
| c34afb7187 | |||
| 6940f74acd | |||
| 9263186458 | |||
| 45e6f8097a | |||
| f511f64c11 | |||
| 66949e2490 | |||
| a2c43553ad | |||
| c4539e9571 | |||
| 80a5dd478e | |||
| a1738b2401 | |||
| 2b9ddbe29a | |||
| 8e8ba52766 | |||
| 454428cd50 | |||
| eccd6f977a | |||
| 2409b01fe7 | |||
| 903361100c | |||
| 4e2cef9b70 | |||
| 70e535abd5 | |||
| 2cb0fa719b | |||
| 319de692bf | |||
| 1a94e73db7 | |||
| e510f2fe4c | |||
| d0c0084859 | |||
| 265dbc02e3 | |||
| aec17a90fc | |||
| 12adc1dbec | |||
| 553c87bde0 | |||
| d74fc0a097 | |||
| d5a7c77a8d | |||
| 4ab90f048e | |||
| 84133b57b8 | |||
| 5b3210c224 | |||
| be591d2feb | |||
| 7d9df7297a | |||
| 7f2e2dd5b8 | |||
| 6f01bc11ab | |||
| aba07c27b8 | |||
| 0bba6932c0 | |||
| 52ef0addd8 | |||
| 5fd597ddaf | |||
| 56d455d343 | |||
| a79d6d94bd | |||
| 83abea3cae | |||
| 0417b7ad60 | |||
| 1cb831183c | |||
| db7f4f9a41 | |||
| c8c3191565 | |||
| 2fc420ba37 | |||
| c81dff292a | |||
| 32c2a441c3 | |||
| 9359b5b138 | |||
| 84b3612393 | |||
| c73049d3ed | |||
| 1091d6d6ac | |||
| 91ffc01a91 | |||
| 0413ed3ce6 | |||
| b3d7d11ae3 | |||
| d8b4aca69f | |||
| 29bf8a2ab4 | |||
| 393667b547 | |||
| cf5864266e | |||
| 0f480d0985 | |||
| a7cba0dac7 | |||
| 7906397c64 | |||
| 7d71ad4e58 | |||
| 94b3747a9c | |||
| b259baa17e | |||
| eb79eea9b7 | |||
| db900f6650 | |||
| 490aee9634 | |||
| 8f689bcc11 | |||
| 6a12952688 | |||
| b2ae7204b0 | |||
| adda363798 | |||
| 0782a6eb48 | |||
| b5e33203f9 | |||
| b7257e1f13 | |||
| 082fc62205 | |||
| 1d81316841 | |||
| fc1c7830c1 | |||
| f4669a79fa | |||
| e1f38cdecd | |||
| c6b587629c | |||
| 648bccb7da | |||
| f5bc5ce4cd | |||
| 2f3dde35b3 |
@@ -39,9 +39,10 @@
|
|||||||
"publish": false,
|
"publish": false,
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"app",
|
"app",
|
||||||
|
"barcode-scanner",
|
||||||
"log-plugin",
|
"log-plugin",
|
||||||
"cli",
|
"cli",
|
||||||
"clipboard",
|
"clipboard-manager",
|
||||||
"dialog",
|
"dialog",
|
||||||
"fs",
|
"fs",
|
||||||
"global-shortcut",
|
"global-shortcut",
|
||||||
@@ -60,9 +61,10 @@
|
|||||||
"publish": false,
|
"publish": false,
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"app-js",
|
"app-js",
|
||||||
|
"barcode-scanner-js",
|
||||||
"log-js",
|
"log-js",
|
||||||
"cli-js",
|
"cli-js",
|
||||||
"clipboard-js",
|
"clipboard-manager-js",
|
||||||
"dialog-js",
|
"dialog-js",
|
||||||
"fs-js",
|
"fs-js",
|
||||||
"global-shortcut-js",
|
"global-shortcut-js",
|
||||||
@@ -73,7 +75,16 @@
|
|||||||
"shell-js",
|
"shell-js",
|
||||||
"updater-js",
|
"updater-js",
|
||||||
"window-js"
|
"window-js"
|
||||||
]
|
],
|
||||||
|
"postversion": "pnpm install --no-frozen-lockfile"
|
||||||
|
},
|
||||||
|
|
||||||
|
"deep-link-example-js": {
|
||||||
|
"path": "./plugins/deep-link/examples/app",
|
||||||
|
"manager": "javascript",
|
||||||
|
"publish": false,
|
||||||
|
"dependencies": ["deep-link-js"],
|
||||||
|
"postversion": "pnpm install --no-frozen-lockfile"
|
||||||
},
|
},
|
||||||
|
|
||||||
"app": {
|
"app": {
|
||||||
@@ -103,6 +114,15 @@
|
|||||||
"manager": "javascript"
|
"manager": "javascript"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"barcode-scanner": {
|
||||||
|
"path": "./plugins/barcode-scanner",
|
||||||
|
"manager": "rust"
|
||||||
|
},
|
||||||
|
"barcode-scanner-js": {
|
||||||
|
"path": "./plugins/barcode-scanner",
|
||||||
|
"manager": "javascript"
|
||||||
|
},
|
||||||
|
|
||||||
"cli": {
|
"cli": {
|
||||||
"path": "./plugins/cli",
|
"path": "./plugins/cli",
|
||||||
"manager": "rust"
|
"manager": "rust"
|
||||||
@@ -112,12 +132,30 @@
|
|||||||
"manager": "javascript"
|
"manager": "javascript"
|
||||||
},
|
},
|
||||||
|
|
||||||
"clipboard": {
|
"clipboard-manager": {
|
||||||
"path": "./plugins/clipboard",
|
"path": "./plugins/clipboard-manager",
|
||||||
"manager": "rust"
|
"manager": "rust"
|
||||||
},
|
},
|
||||||
"clipboard-js": {
|
"clipboard-manager-js": {
|
||||||
"path": "./plugins/clipboard",
|
"path": "./plugins/clipboard-manager",
|
||||||
|
"manager": "javascript"
|
||||||
|
},
|
||||||
|
|
||||||
|
"deep-link": {
|
||||||
|
"path": "./plugins/deep-link",
|
||||||
|
"manager": "rust"
|
||||||
|
},
|
||||||
|
"deep-link-js": {
|
||||||
|
"path": "./plugins/deep-link",
|
||||||
|
"manager": "javascript"
|
||||||
|
},
|
||||||
|
|
||||||
|
"fs": {
|
||||||
|
"path": "./plugins/fs",
|
||||||
|
"manager": "rust"
|
||||||
|
},
|
||||||
|
"fs-js": {
|
||||||
|
"path": "./plugins/fs",
|
||||||
"manager": "javascript"
|
"manager": "javascript"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -131,15 +169,6 @@
|
|||||||
"manager": "javascript"
|
"manager": "javascript"
|
||||||
},
|
},
|
||||||
|
|
||||||
"fs": {
|
|
||||||
"path": "./plugins/fs",
|
|
||||||
"manager": "rust"
|
|
||||||
},
|
|
||||||
"fs-js": {
|
|
||||||
"path": "./plugins/fs",
|
|
||||||
"manager": "javascript"
|
|
||||||
},
|
|
||||||
|
|
||||||
"global-shortcut": {
|
"global-shortcut": {
|
||||||
"path": "./plugins/global-shortcut",
|
"path": "./plugins/global-shortcut",
|
||||||
"manager": "rust"
|
"manager": "rust"
|
||||||
@@ -231,7 +260,28 @@
|
|||||||
|
|
||||||
"sql": {
|
"sql": {
|
||||||
"path": "./plugins/sql",
|
"path": "./plugins/sql",
|
||||||
"manager": "rust"
|
"manager": "rust",
|
||||||
|
"publish": [
|
||||||
|
{
|
||||||
|
"command": "cargo package --no-verify",
|
||||||
|
"dryRunCommand": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
|
||||||
|
"dryRunCommand": true,
|
||||||
|
"pipe": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cargo publish --features sqlite",
|
||||||
|
"dryRunCommand": "cargo publish --features sqlite --dry-run",
|
||||||
|
"pipe": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "echo '```\n\n</details>\n'",
|
||||||
|
"dryRunCommand": true,
|
||||||
|
"pipe": true
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sql-js": {
|
"sql-js": {
|
||||||
"path": "./plugins/sql",
|
"path": "./plugins/sql",
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"deep-link": major
|
||||||
|
"deep-link-js": major
|
||||||
|
---
|
||||||
|
|
||||||
|
Initial release.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"dialog": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
On non-Linux system, use `AsyncMessageDialog` instead of `MessageDialog`. [(tauri#7182)](https://github.com/tauri-apps/tauri/issues/7182)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-js": "minor:feat"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the `maximizable`, `minimizable` and `closable` fields on `WindowOptions`.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"window": "minor:feat"
|
||||||
|
"window-js": "minor:feat"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the `setMaximizable`, `setMinimizable`, `setClosable`, `isMaximizable`, `isMinimizable` and `isClosable` methods.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
"app": patch
|
||||||
|
"authenticator": patch
|
||||||
|
"autostart": patch
|
||||||
|
"cli": patch
|
||||||
|
"clipboard-manager": patch
|
||||||
|
"dialog": patch
|
||||||
|
"fs": patch
|
||||||
|
"global-shortcut": patch
|
||||||
|
"http": patch
|
||||||
|
"localhost": patch
|
||||||
|
"log-plugin": patch
|
||||||
|
"notification": patch
|
||||||
|
"os": patch
|
||||||
|
"persisted-scope": patch
|
||||||
|
"positioner": patch
|
||||||
|
"process": patch
|
||||||
|
"shell": patch
|
||||||
|
"single-instance": patch
|
||||||
|
"sql": patch
|
||||||
|
"store": patch
|
||||||
|
"stronghold": patch
|
||||||
|
"updater": patch
|
||||||
|
"upload": patch
|
||||||
|
"websocket": patch
|
||||||
|
"window": patch
|
||||||
|
"window-state": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes docs.rs build by enabling the `tauri/dox` feature flag.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"fs-js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix `writeBinaryFile` crashing with `command 'write_binary_file' not found`
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"http-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Multipart requests are now handled in JavaScript by the `Request` JavaScript class so you just need to use a `FormData` body and not set the content-type header to `multipart/form-data`. `application/x-www-form-urlencoded` requests must be done manually.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"http": minor
|
||||||
|
"http-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
The http plugin has been rewritten from scratch and now only exposes a `fetch` function in Javascript and Re-exports `reqwest` crate in Rust. The new `fetch` method tries to be as close and compliant to the `fetch` Web API as possible.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"http": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove `cmd` property which breaks invoke call.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"http": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve response performance by using the new IPC streaming data.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"notification": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use `window.__TAURI_INVOKE__` instead of `window.__TAURI__` in init.js, fixes usage in apps without `withGlobalTauri` enabled.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"notification": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Revert [7d71ad4e5](https://github.com/tauri-apps/plugins-workspace/commit/7d71ad4e587bcf47ea34645f5b226945e487b765) which added a default sound for notifications on Windows. This introduced inconsistency with other platforms that has silent notifications by default. In the upcoming releases, we will add support for modifying the notification sound across all platforms.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"notification": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Play a default sound when showing a notification on Windows.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"os-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix `macss -> macos` typo in `OsType` type.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
"os": minor
|
||||||
|
"os-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
The os plugin is recieving a few changes to improve consistency and add new features:
|
||||||
|
|
||||||
|
- Renamed `Kind` enum to `OsType` and `kind()` function to `os_type()`.
|
||||||
|
- Added `family()`,`exe_extension()`, and `hostname()` functions and their equivalents for JS.
|
||||||
|
- Removed `tempdir()` function and its equivalent on JS, use `std::env::temp_dir` instead of `temp_dir` from `tauri::path::PathResolver::temp_dir` and `path.tempDir` on JS.
|
||||||
|
- Modified `platform()` implementation to return `windows` instead of `win32` and `macos` instead of `darwin` to align with Rust's `std::env::consts::OS`
|
||||||
|
- `EOL` const in JS has been modified into a function `eol()` fix import issues in frameworks like `next.js`
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"persisted-scope": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Split up fs and asset scopes. **This will reset the asset protocol scope once!**
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"persisted-scope": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix usage of directory patterns by removing glob asterisks at the end before allowing/forbidding them. This was causing them to be escaped, and so undesirable paths were allowed/forbidden while polluting the `.persisted-scope` file.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"positioner": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Change `system-tray` feature flag to `tray-icon`.
|
||||||
@@ -1,4 +1,41 @@
|
|||||||
{
|
{
|
||||||
"tag": "alpha",
|
"tag": "alpha",
|
||||||
"changes": [".changes/persisted-scope-fix-oom.md", ".changes/v2-alpha.md"]
|
"changes": [
|
||||||
|
".changes/deep-link-initial-release.md",
|
||||||
|
".changes/dialog-async-message-dialog.md",
|
||||||
|
".changes/disable-window-controls-api-options.md",
|
||||||
|
".changes/disable-window-controls-api.md",
|
||||||
|
".changes/fix-docs-build.md",
|
||||||
|
".changes/fs-wiret-binary-file.md",
|
||||||
|
".changes/http-multipart-refactor.md",
|
||||||
|
".changes/http-plugin-refactor.md",
|
||||||
|
".changes/http-remove-cmd-property.md",
|
||||||
|
".changes/http-response.md",
|
||||||
|
".changes/notification-init-script.md",
|
||||||
|
".changes/notification-revert-sound.md",
|
||||||
|
".changes/notification-sound.md",
|
||||||
|
".changes/os-OsType.md",
|
||||||
|
".changes/os-plugin-refactor.md",
|
||||||
|
".changes/persisted-scope-asset.md",
|
||||||
|
".changes/persisted-scope-glob.md",
|
||||||
|
".changes/positioner-tray-flag.md",
|
||||||
|
".changes/scanner-initial-release.md",
|
||||||
|
".changes/shell-command-apis.md",
|
||||||
|
".changes/shell-detached.md",
|
||||||
|
".changes/stronghold-arg-name.md",
|
||||||
|
".changes/stronghold-constructor.md",
|
||||||
|
".changes/tauri-alpha.11.md",
|
||||||
|
".changes/tauri-alpha.12.md",
|
||||||
|
".changes/updater-nsis-admin.md",
|
||||||
|
".changes/updater-nsis.md",
|
||||||
|
".changes/updater-plugin-refactor.md",
|
||||||
|
".changes/v2-alpha.md",
|
||||||
|
".changes/window-incognito.md",
|
||||||
|
".changes/window-is-focused.md",
|
||||||
|
".changes/window-plugin-refactor.md",
|
||||||
|
".changes/window-set-effects.md",
|
||||||
|
".changes/window-state-decorated.md",
|
||||||
|
".changes/window-state-promise.md",
|
||||||
|
".changes/window-tap-drag-region-detection.md"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"barcode-scanner": major
|
||||||
|
"barcode-scanner-js": major
|
||||||
|
---
|
||||||
|
|
||||||
|
Initial release.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"shell": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added `Command::arg`, `Command::env` and changed `Command::new` input type.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"shell": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Ensure the launched process is detached so it can out-live your tauri app and does not shutdown with it.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"stronghold-js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Change the argument name of the `Stronghold.remove` from `location` to `recordPath` to match the Stronghold command argument
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"stronghold-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Added `Stronghold.load` and removed its constructor.
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
"app": patch
|
||||||
|
"app-js": patch
|
||||||
|
"authenticator": patch
|
||||||
|
"authenticator-js": patch
|
||||||
|
"autostart": patch
|
||||||
|
"autostart-js": patch
|
||||||
|
"cli": patch
|
||||||
|
"cli-js": patch
|
||||||
|
"clipboard-manager": patch
|
||||||
|
"clipboard-manager-js": patch
|
||||||
|
"dialog": patch
|
||||||
|
"dialog-js": patch
|
||||||
|
"fs": patch
|
||||||
|
"fs-js": patch
|
||||||
|
"global-shortcut": patch
|
||||||
|
"global-shortcut-js": patch
|
||||||
|
"http": patch
|
||||||
|
"http-js": patch
|
||||||
|
"localhost": patch
|
||||||
|
"log-plugin": patch
|
||||||
|
"log-js": patch
|
||||||
|
"notification": patch
|
||||||
|
"notification-js": patch
|
||||||
|
"os": patch
|
||||||
|
"os-js": patch
|
||||||
|
"persisted-scope": patch
|
||||||
|
"positioner": patch
|
||||||
|
"positioner-js": patch
|
||||||
|
"process": patch
|
||||||
|
"process-js": patch
|
||||||
|
"shell": patch
|
||||||
|
"shell-js": patch
|
||||||
|
"single-instance": patch
|
||||||
|
"sql": patch
|
||||||
|
"sql-js": patch
|
||||||
|
"store": patch
|
||||||
|
"store-js": patch
|
||||||
|
"stronghold": patch
|
||||||
|
"stronghold-js": patch
|
||||||
|
"updater": patch
|
||||||
|
"updater-js": patch
|
||||||
|
"upload": patch
|
||||||
|
"upload-js": patch
|
||||||
|
"websocket": patch
|
||||||
|
"websocket-js": patch
|
||||||
|
"window": patch
|
||||||
|
"window-js": patch
|
||||||
|
"window-state": patch
|
||||||
|
"window-state-js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update to alpha.11.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
"app": patch
|
||||||
|
"authenticator": patch
|
||||||
|
"autostart": patch
|
||||||
|
"cli": patch
|
||||||
|
"clipboard-manager": patch
|
||||||
|
"dialog": patch
|
||||||
|
"fs": patch
|
||||||
|
"global-shortcut": patch
|
||||||
|
"http": patch
|
||||||
|
"localhost": patch
|
||||||
|
"log-plugin": patch
|
||||||
|
"notification": patch
|
||||||
|
"os": patch
|
||||||
|
"persisted-scope": patch
|
||||||
|
"positioner": patch
|
||||||
|
"process": patch
|
||||||
|
"shell": patch
|
||||||
|
"single-instance": patch
|
||||||
|
"sql": patch
|
||||||
|
"store": patch
|
||||||
|
"stronghold": patch
|
||||||
|
"updater": patch
|
||||||
|
"upload": patch
|
||||||
|
"websocket": patch
|
||||||
|
"window": patch
|
||||||
|
"window-state": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update to alpha.12.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"updater": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"updater": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Implement passive mode on NSIS and automatically restart after NSIS update.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"updater": minor
|
||||||
|
"updater-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
The updater plugin is recieving a few changes to improve consistency and ergonomics of the Rust and JS APIs
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
"autostart-js": major
|
"autostart-js": major
|
||||||
"cli": major
|
"cli": major
|
||||||
"cli-js": major
|
"cli-js": major
|
||||||
"clipboard": major
|
"clipboard-manager": major
|
||||||
"clipboard-js": major
|
"clipboard-manager-js": major
|
||||||
"dialog": major
|
"dialog": major
|
||||||
"dialog-js": major
|
"dialog-js": major
|
||||||
"fs": major
|
"fs": major
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-js": "minor"
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `incognito` window configuration option
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"window": "minor:feat"
|
||||||
|
"window-js": "minor:feat"
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `WebviewWindow.is_focused` and `WebviewWindow.getFocusedWindow` getters.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
"window": "patch"
|
||||||
|
"window-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
The window plugin is recieving a few changes to improve consistency and add new features:
|
||||||
|
|
||||||
|
- Removed `appWindow` variable from JS module, use `getCurrent` or `Window.getCurrent`.
|
||||||
|
- Removed `WindowManager`, `WebviewWindow` and `WebviewHandle` types and merged them into one `Window` type that matches the name of the rust window type.
|
||||||
|
- Added `Window.getCurrent` and `Window.getAll` which is a convenient method for `getCurrent` and `getAll` functions.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"window": "patch"
|
||||||
|
"window-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the `setEffects` and `clearEffects` API.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-state": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Correctly set decoration state if no saved state xists
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-state-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Correctly propagate the promise inside `saveWindowState`, `restoreState` and `restoreStateCurrent` so callers can choose to `await` them.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
On macOS, fixed tapping on custom title bar doesn't maximize the window.
|
||||||
@@ -2,4 +2,5 @@ target
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-js
|
dist-js
|
||||||
api-iife.js
|
api-iife.js
|
||||||
|
init.js
|
||||||
@@ -41,10 +41,10 @@ jobs:
|
|||||||
- .github/workflows/check-generated-files.yml
|
- .github/workflows/check-generated-files.yml
|
||||||
- plugins/cli/guest-js/**
|
- plugins/cli/guest-js/**
|
||||||
- plugins/cli/src/api-iife.js
|
- plugins/cli/src/api-iife.js
|
||||||
clipboard:
|
clipboard-manager:
|
||||||
- .github/workflows/check-generated-files.yml
|
- .github/workflows/check-generated-files.yml
|
||||||
- plugins/clipboard/guest-js/**
|
- plugins/clipboard-manager/guest-js/**
|
||||||
- plugins/clipboard/src/api-iife.js
|
- plugins/clipboard-manager/src/api-iife.js
|
||||||
dialog:
|
dialog:
|
||||||
- .github/workflows/check-generated-files.yml
|
- .github/workflows/check-generated-files.yml
|
||||||
- plugins/dialog/guest-js/**
|
- plugins/dialog/guest-js/**
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
name: integration tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v1
|
||||||
|
- v2
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/integration-tests.yml"
|
||||||
|
- "plugins/updater/src/**"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- v1
|
||||||
|
- v2
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/integration-tests.yml"
|
||||||
|
- "plugins/updater/src/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-integration-tests:
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: install stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: install Linux dependencies
|
||||||
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: install Tauri CLI
|
||||||
|
run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch dev
|
||||||
|
|
||||||
|
- name: run integration tests
|
||||||
|
run: cargo test --test '*' -- --ignored
|
||||||
@@ -53,9 +53,9 @@ jobs:
|
|||||||
tauri-plugin-cli:
|
tauri-plugin-cli:
|
||||||
- .github/workflows/lint-rust.yml
|
- .github/workflows/lint-rust.yml
|
||||||
- plugins/cli/**
|
- plugins/cli/**
|
||||||
tauri-plugin-clipboard:
|
tauri-plugin-clipboard-manager:
|
||||||
- .github/workflows/lint-rust.yml
|
- .github/workflows/lint-rust.yml
|
||||||
- plugins/clipboard/**
|
- plugins/clipboard-manager/**
|
||||||
tauri-plugin-dialog:
|
tauri-plugin-dialog:
|
||||||
- .github/workflows/lint-rust.yml
|
- .github/workflows/lint-rust.yml
|
||||||
- plugins/dialog/**
|
- plugins/dialog/**
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ jobs:
|
|||||||
tauri-plugin-cli:
|
tauri-plugin-cli:
|
||||||
- .github/workflows/test-rust.yml
|
- .github/workflows/test-rust.yml
|
||||||
- plugins/cli/**
|
- plugins/cli/**
|
||||||
tauri-plugin-clipboard:
|
tauri-plugin-clipboard-manager:
|
||||||
- .github/workflows/test-rust.yml
|
- .github/workflows/test-rust.yml
|
||||||
- plugins/clipboard/**
|
- plugins/clipboard-manager/**
|
||||||
tauri-plugin-dialog:
|
tauri-plugin-dialog:
|
||||||
- .github/workflows/test-rust.yml
|
- .github/workflows/test-rust.yml
|
||||||
- plugins/dialog/**
|
- plugins/dialog/**
|
||||||
@@ -193,6 +193,11 @@ jobs:
|
|||||||
working-directory: examples/api
|
working-directory: examples/api
|
||||||
run: mkdir dist
|
run: mkdir dist
|
||||||
|
|
||||||
|
- name: Downgrade crates with MSRV conflict
|
||||||
|
# The --precise flag can only be used once per invocation.
|
||||||
|
run: |
|
||||||
|
cargo update -p time@0.3.24 --precise 0.3.23
|
||||||
|
|
||||||
- name: test ${{ matrix.package }}
|
- name: test ${{ matrix.package }}
|
||||||
if: matrix.package != 'tauri-plugin-sql'
|
if: matrix.package != 'tauri-plugin-sql'
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|||||||
@@ -5,4 +5,6 @@ dist-js
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
.build
|
.build
|
||||||
api-iife.js
|
build
|
||||||
|
api-iife.js
|
||||||
|
intermediates/
|
||||||
@@ -21,12 +21,13 @@ const ignore = [
|
|||||||
"dist-js",
|
"dist-js",
|
||||||
".svelte-kit",
|
".svelte-kit",
|
||||||
"api-iife.js",
|
"api-iife.js",
|
||||||
|
".build",
|
||||||
];
|
];
|
||||||
|
|
||||||
async function checkFile(file) {
|
async function checkFile(file) {
|
||||||
if (
|
if (
|
||||||
extensions.some((e) => file.endsWith(e)) &&
|
extensions.some((e) => file.endsWith(e)) &&
|
||||||
!ignore.some((i) => file.endsWith(i))
|
!ignore.some((i) => file.includes(i))
|
||||||
) {
|
) {
|
||||||
const fileStream = fs.createReadStream(file);
|
const fileStream = fs.createReadStream(file);
|
||||||
const rl = readline.createInterface({
|
const rl = readline.createInterface({
|
||||||
@@ -70,7 +71,9 @@ async function checkFile(file) {
|
|||||||
async function check(src) {
|
async function check(src) {
|
||||||
const missingHeader = [];
|
const missingHeader = [];
|
||||||
|
|
||||||
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
for (const entry of fs.readdirSync(src, {
|
||||||
|
withFileTypes: true,
|
||||||
|
})) {
|
||||||
const p = path.join(src, entry.name);
|
const p = path.join(src, entry.name);
|
||||||
|
|
||||||
if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
|
if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
|
||||||
@@ -116,6 +119,6 @@ if (files.length > 0) {
|
|||||||
console.log(missing.join("\n"));
|
console.log(missing.join("\n"));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ https.get(url, options, (response) => {
|
|||||||
}
|
}
|
||||||
} else if (kind === "npm") {
|
} else if (kind === "npm") {
|
||||||
const versions = Object.keys(data.versions || {}).filter((v) =>
|
const versions = Object.keys(data.versions || {}).filter((v) =>
|
||||||
v.startsWith(target)
|
v.startsWith(target),
|
||||||
);
|
);
|
||||||
console.log(versions[versions.length - 1] || "0.0.0");
|
console.log(versions[versions.length - 1] || "0.0.0");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = ["plugins/*", "plugins/*/tests/*", "examples/*/src-tauri"]
|
members = ["plugins/*", "plugins/*/tests/*", "plugins/*/examples/*/src-tauri", "examples/*/src-tauri"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
tauri = "2.0.0-alpha.9"
|
tauri = "2.0.0-alpha.12"
|
||||||
tauri-build = "2.0.0-alpha.5"
|
tauri-build = "2.0.0-alpha.8"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,35 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.3]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `barcode-scanner-js@2.0.0-alpha.0`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.2]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `os-js@2.0.0-alpha.2`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `window-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `fs-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `http-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `os-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `app-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `cli-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `dialog-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `global-shortcut-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `log-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `notification-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `process-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `shell-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `updater-js@2.0.0-alpha.1`
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[2.0.0-alpha.0]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en" theme="dark">
|
<html lang="en" theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
||||||
|
/>
|
||||||
<title>Svelte + Vite App</title>
|
<title>Svelte + Vite App</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "svelte-app",
|
"name": "svelte-app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --clearScreen false",
|
"dev": "vite --clearScreen false",
|
||||||
@@ -9,30 +9,33 @@
|
|||||||
"serve": "vite preview"
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4",
|
"@tauri-apps/api": "2.0.0-alpha.8",
|
||||||
"@zerodevx/svelte-json-view": "0.2.1",
|
"@tauri-apps/plugin-app": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-app": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-barcode-scanner": "2.0.0-alpha.0",
|
||||||
"@tauri-apps/plugin-cli": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-camera": "1.0.0",
|
||||||
"@tauri-apps/plugin-clipboard": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-cli": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-dialog": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-fs": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-dialog": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-fs": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-http": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-notification": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-http": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-os": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-notification": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-process": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-os": "2.0.0-alpha.2",
|
||||||
"@tauri-apps/plugin-shell": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-process": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-updater": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-shell": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-window": "2.0.0-alpha.0"
|
"@tauri-apps/plugin-updater": "2.0.0-alpha.1",
|
||||||
|
"@tauri-apps/plugin-window": "2.0.0-alpha.1",
|
||||||
|
"@zerodevx/svelte-json-view": "1.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify-json/codicon": "^1.1.10",
|
"@iconify-json/codicon": "^1.1.26",
|
||||||
"@iconify-json/ph": "^1.1.1",
|
"@iconify-json/ph": "^1.1.5",
|
||||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
"@sveltejs/vite-plugin-svelte": "^2.4.1",
|
||||||
"@tauri-apps/cli": "2.0.0-alpha.9",
|
"@tauri-apps/cli": "2.0.0-alpha.14",
|
||||||
"internal-ip": "^7.0.0",
|
"@unocss/extractor-svelte": "^0.53.1",
|
||||||
"svelte": "^3.49.0",
|
"internal-ip": "^8.0.0",
|
||||||
"unocss": "^0.39.3",
|
"svelte": "^3.59.1",
|
||||||
"vite": "^3.0.9"
|
"unocss": "^0.53.1",
|
||||||
|
"vite": "^4.3.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,60 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.5]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `barcode-scanner@2.0.0-alpha.0`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.4]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `http@2.0.0-alpha.3`
|
||||||
|
- Upgraded to `app@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `cli@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `clipboard-manager@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `dialog@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `fs@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `global-shortcut@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `log-plugin@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `notification@2.0.0-alpha.3`
|
||||||
|
- Upgraded to `os@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `process@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `shell@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `updater@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `window@2.0.0-alpha.2`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.3]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `http@2.0.0-alpha.2`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.2]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `dialog@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `window@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `app@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `cli@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `fs@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `global-shortcut@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `http@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `log-plugin@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `notification@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `os@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `process@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `shell@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `updater@2.0.0-alpha.1`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Updated to latest `notification`
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[2.0.0-alpha.0]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "api"
|
name = "api"
|
||||||
publish = false
|
publish = false
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.5"
|
||||||
description = "An example Tauri Application showcasing the api"
|
description = "An example Tauri Application showcasing the api"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.65"
|
rust-version = { workspace = true }
|
||||||
license = "Apache-2.0 OR MIT"
|
license = "Apache-2.0 OR MIT"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -18,17 +18,17 @@ serde_json = { workspace = true }
|
|||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
tiny_http = "0.11"
|
tiny_http = "0.11"
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.0" }
|
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.0" }
|
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.0" }
|
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-clipboard = { path = "../../../plugins/clipboard", version = "2.0.0-alpha.0" }
|
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-alpha.0" }
|
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-alpha.0" }
|
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-alpha.3" }
|
||||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-alpha.0", features = [ "windows7-compat" ] }
|
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-alpha.3", features = [ "windows7-compat" ] }
|
||||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.0" }
|
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.0" }
|
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.0" }
|
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.0", features = [ "devtools", "icon-ico", "icon-png" ] }
|
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.2", features = [ "devtools", "icon-ico", "icon-png" ] }
|
||||||
|
|
||||||
[dependencies.tauri]
|
[dependencies.tauri]
|
||||||
workspace = true
|
workspace = true
|
||||||
@@ -37,14 +37,18 @@ tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha
|
|||||||
"icon-png",
|
"icon-png",
|
||||||
"isolation",
|
"isolation",
|
||||||
"macos-private-api",
|
"macos-private-api",
|
||||||
"system-tray",
|
"tray-icon",
|
||||||
"protocol-asset"
|
"protocol-asset"
|
||||||
]
|
]
|
||||||
|
|
||||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-alpha.0" }
|
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-alpha.0" }
|
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-alpha.2" }
|
||||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-alpha.0" }
|
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-alpha.2" }
|
||||||
|
|
||||||
|
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
||||||
|
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-alpha.0" }
|
||||||
|
tauri-plugin-camera = { path = "../../../plugins/camera/", version = "1.0.0" }
|
||||||
|
|
||||||
[target."cfg(target_os = \"windows\")".dependencies]
|
[target."cfg(target_os = \"windows\")".dependencies]
|
||||||
window-shadows = "0.2"
|
window-shadows = "0.2"
|
||||||
|
|||||||
@@ -1,16 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<!-- Primary brand color. -->
|
|
||||||
<item name="colorPrimary">@color/purple_200</item>
|
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
|
||||||
<item name="colorOnPrimary">@color/black</item>
|
|
||||||
<!-- Secondary brand color. -->
|
|
||||||
<item name="colorSecondary">@color/teal_200</item>
|
|
||||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
|
||||||
<item name="colorOnSecondary">@color/black</item>
|
|
||||||
<!-- Status bar color. -->
|
|
||||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,16 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<!-- Primary brand color. -->
|
|
||||||
<item name="colorPrimary">@color/purple_500</item>
|
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
|
||||||
<item name="colorOnPrimary">@color/white</item>
|
|
||||||
<!-- Secondary brand color. -->
|
|
||||||
<item name="colorSecondary">@color/teal_200</item>
|
|
||||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
|
||||||
<item name="colorOnSecondary">@color/black</item>
|
|
||||||
<!-- Status bar color. -->
|
|
||||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ open class BuildTask : DefaultTask() {
|
|||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun assemble() {
|
fun assemble() {
|
||||||
val executable = """pnpm""";
|
val executable = """node""";
|
||||||
try {
|
try {
|
||||||
runTauriCli(executable)
|
runTauriCli(executable)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@@ -32,7 +32,7 @@ open class BuildTask : DefaultTask() {
|
|||||||
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
||||||
val target = target ?: throw GradleException("target cannot be null")
|
val target = target ?: throw GradleException("target cannot be null")
|
||||||
val release = release ?: throw GradleException("release cannot be null")
|
val release = release ?: throw GradleException("release cannot be null")
|
||||||
val args = listOf("tauri", "android", "android-studio-script");
|
val args = listOf("/Users/lucas/projects/tauri/plugins-workspace/examples/api/./node_modules/.bin/../../../../node_modules/.pnpm/@tauri-apps+cli@2.0.0-alpha.14/node_modules/@tauri-apps/cli/tauri.js", "android", "android-studio-script");
|
||||||
|
|
||||||
project.exec {
|
project.exec {
|
||||||
workingDir(File(project.projectDir, rootDirRel))
|
workingDir(File(project.projectDir, rootDirRel))
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
xcuserdata/
|
||||||
|
build/
|
||||||
|
Externals/
|
||||||
|
After Width: | Height: | Size: 844 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"images": [
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-20x20@2x.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-20x20@3x.png",
|
||||||
|
"scale": "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-29x29@2x-1.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-29x29@3x.png",
|
||||||
|
"scale": "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-40x40@2x.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-40x40@3x.png",
|
||||||
|
"scale": "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "60x60",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-60x60@2x.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "60x60",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"filename": "AppIcon-60x60@3x.png",
|
||||||
|
"scale": "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-20x20@1x.png",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-20x20@2x-1.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-29x29@1x.png",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-29x29@2x.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-40x40@1x.png",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-40x40@2x-1.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "76x76",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-76x76@1x.png",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "76x76",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-76x76@2x.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "83.5x83.5",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"filename": "AppIcon-83.5x83.5@2x.png",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "1024x1024",
|
||||||
|
"idiom": "ios-marketing",
|
||||||
|
"filename": "AppIcon-512@2x.png",
|
||||||
|
"scale": "1x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info": {
|
||||||
|
"version": 1,
|
||||||
|
"author": "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info": {
|
||||||
|
"version": 1,
|
||||||
|
"author": "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>method</key>
|
||||||
|
<string>development</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Uncomment the next line to define a global platform for your project
|
||||||
|
|
||||||
|
target 'api_iOS' do
|
||||||
|
platform :ios, '13.0'
|
||||||
|
# Pods for api_iOS
|
||||||
|
end
|
||||||
|
|
||||||
|
target 'api_macOS' do
|
||||||
|
platform :osx, '11.0'
|
||||||
|
# Pods for api_macOS
|
||||||
|
end
|
||||||
|
|
||||||
|
# Delete the deployment target for iOS and macOS, causing it to be inherited from the Podfile
|
||||||
|
post_install do |installer|
|
||||||
|
installer.pods_project.targets.each do |target|
|
||||||
|
target.build_configurations.each do |config|
|
||||||
|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
||||||
|
config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace ffi {
|
||||||
|
extern "C" {
|
||||||
|
void start_app();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#include "bindings/bindings.h"
|
||||||
|
|
||||||
|
int main(int argc, char * argv[]) {
|
||||||
|
ffi::start_app();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,462 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 51;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
2ECFC1BC47D948875C8CEC41 /* libapi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC53D4128D7F74E4E6338455 /* libapi.a */; };
|
||||||
|
3043432501C9BC2DB6B4CB95 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */; };
|
||||||
|
328B4ADB3700C1873BEB7B10 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 90D3B673AFAB8D8AB561F616 /* main.mm */; };
|
||||||
|
6F379F15DA085785BA2624D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6B7E79E23E646BA7968B457C /* Assets.xcassets */; };
|
||||||
|
9AADB041D25772D04E543F15 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62601E25FA39E62BE119B74D /* Metal.framework */; };
|
||||||
|
9DDA3BE70DD0E4013973FE38 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6082E363D51372A7658C351 /* UIKit.framework */; };
|
||||||
|
AFA0CA286325FD7A34968CA2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 384966E551417F94A02D2706 /* Security.framework */; };
|
||||||
|
B60763BD194DFACA215EC7DA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC377692DC31A070A0188C9D /* QuartzCore.framework */; };
|
||||||
|
C6D80743F168BDF017B7769E /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */; };
|
||||||
|
DFFF888045C8D9D9FB69E8FD /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 338E66700FD330B99D434DD7 /* MetalKit.framework */; };
|
||||||
|
F86717F05E27C72C9FA1FB27 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 74A8FDFB350B966F5AAD4A24 /* assets */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
0E96CE07CD20273DD46BF325 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = "<group>"; };
|
||||||
|
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */ = {isa = PBXFileReference; path = tray.rs; sourceTree = "<group>"; };
|
||||||
|
2F63E2AA460089BB58D40C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
338E66700FD330B99D434DD7 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
|
||||||
|
384966E551417F94A02D2706 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||||
|
59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||||
|
5AC703CEBA41A121596066F3 /* api_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = api_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
62601E25FA39E62BE119B74D /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||||
|
6B7E79E23E646BA7968B457C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||||
|
74A8FDFB350B966F5AAD4A24 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = SOURCE_ROOT; };
|
||||||
|
785D025E9542F7E098BF22B5 /* lib.rs */ = {isa = PBXFileReference; path = lib.rs; sourceTree = "<group>"; };
|
||||||
|
879941AE3DAA14534BBC6391 /* api_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = api_iOS.entitlements; sourceTree = "<group>"; };
|
||||||
|
90D3B673AFAB8D8AB561F616 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||||
|
B6082E363D51372A7658C351 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||||
|
DC377692DC31A070A0188C9D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||||
|
EC8C7948C50C3C9B5D96CB61 /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = "<group>"; };
|
||||||
|
F835F52713CE8F029D5D252C /* cmd.rs */ = {isa = PBXFileReference; path = cmd.rs; sourceTree = "<group>"; };
|
||||||
|
FC53D4128D7F74E4E6338455 /* libapi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapi.a; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
11E18DCDB3ADFE87C18915EF /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
2ECFC1BC47D948875C8CEC41 /* libapi.a in Frameworks */,
|
||||||
|
3043432501C9BC2DB6B4CB95 /* CoreGraphics.framework in Frameworks */,
|
||||||
|
9AADB041D25772D04E543F15 /* Metal.framework in Frameworks */,
|
||||||
|
DFFF888045C8D9D9FB69E8FD /* MetalKit.framework in Frameworks */,
|
||||||
|
B60763BD194DFACA215EC7DA /* QuartzCore.framework in Frameworks */,
|
||||||
|
AFA0CA286325FD7A34968CA2 /* Security.framework in Frameworks */,
|
||||||
|
9DDA3BE70DD0E4013973FE38 /* UIKit.framework in Frameworks */,
|
||||||
|
C6D80743F168BDF017B7769E /* WebKit.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
0677CEAF1F282F38CBA0F140 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
74A8FDFB350B966F5AAD4A24 /* assets */,
|
||||||
|
6B7E79E23E646BA7968B457C /* Assets.xcassets */,
|
||||||
|
F2116A6428EED18BE2A07E2B /* api_iOS */,
|
||||||
|
86D903732E10FAC4D300E8DF /* Externals */,
|
||||||
|
7A9A7AC155D9E22E54D6D847 /* Sources */,
|
||||||
|
CF9AA87D2F6E9C389B7AB70B /* src */,
|
||||||
|
10C9FC3FA3E12D6A4A67999D /* Frameworks */,
|
||||||
|
4AC51E67B71E27F15B02C5CD /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
07051859D6E2D8109C8FB128 /* bindings */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
EC8C7948C50C3C9B5D96CB61 /* bindings.h */,
|
||||||
|
);
|
||||||
|
path = bindings;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
10C9FC3FA3E12D6A4A67999D /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */,
|
||||||
|
FC53D4128D7F74E4E6338455 /* libapi.a */,
|
||||||
|
62601E25FA39E62BE119B74D /* Metal.framework */,
|
||||||
|
338E66700FD330B99D434DD7 /* MetalKit.framework */,
|
||||||
|
DC377692DC31A070A0188C9D /* QuartzCore.framework */,
|
||||||
|
384966E551417F94A02D2706 /* Security.framework */,
|
||||||
|
B6082E363D51372A7658C351 /* UIKit.framework */,
|
||||||
|
59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
4AC51E67B71E27F15B02C5CD /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
5AC703CEBA41A121596066F3 /* api_iOS.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7A9A7AC155D9E22E54D6D847 /* Sources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
A3574F52DBC5463B9C3D043D /* api */,
|
||||||
|
);
|
||||||
|
path = Sources;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
86D903732E10FAC4D300E8DF /* Externals */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
);
|
||||||
|
path = Externals;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
A3574F52DBC5463B9C3D043D /* api */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
90D3B673AFAB8D8AB561F616 /* main.mm */,
|
||||||
|
07051859D6E2D8109C8FB128 /* bindings */,
|
||||||
|
);
|
||||||
|
path = api;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CF9AA87D2F6E9C389B7AB70B /* src */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
F835F52713CE8F029D5D252C /* cmd.rs */,
|
||||||
|
785D025E9542F7E098BF22B5 /* lib.rs */,
|
||||||
|
0E96CE07CD20273DD46BF325 /* main.rs */,
|
||||||
|
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */,
|
||||||
|
);
|
||||||
|
name = src;
|
||||||
|
path = ../../src;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
F2116A6428EED18BE2A07E2B /* api_iOS */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
879941AE3DAA14534BBC6391 /* api_iOS.entitlements */,
|
||||||
|
2F63E2AA460089BB58D40C79 /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = api_iOS;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
54DC6E273C78071F3BA12EF3 /* api_iOS */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 01CBC40275452376830D79B1 /* Build configuration list for PBXNativeTarget "api_iOS" */;
|
||||||
|
buildPhases = (
|
||||||
|
FF948951157DE71465B5BD5F /* Build Rust Code */,
|
||||||
|
71E73CC9AB5F1323EC1F6365 /* Sources */,
|
||||||
|
CA2BEC44B6EDA1F21B6155CD /* Resources */,
|
||||||
|
11E18DCDB3ADFE87C18915EF /* Frameworks */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = api_iOS;
|
||||||
|
productName = api_iOS;
|
||||||
|
productReference = 5AC703CEBA41A121596066F3 /* api_iOS.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
9BC88C3717DA5D4B78A51C15 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastUpgradeCheck = 1200;
|
||||||
|
TargetAttributes = {
|
||||||
|
54DC6E273C78071F3BA12EF3 = {
|
||||||
|
DevelopmentTeam = Q93MBH6S2F;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 8FA67D0F928A09CD639137D1 /* Build configuration list for PBXProject "api" */;
|
||||||
|
compatibilityVersion = "Xcode 11.0";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
Base,
|
||||||
|
en,
|
||||||
|
);
|
||||||
|
mainGroup = 0677CEAF1F282F38CBA0F140;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
54DC6E273C78071F3BA12EF3 /* api_iOS */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
CA2BEC44B6EDA1F21B6155CD /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
6F379F15DA085785BA2624D4 /* Assets.xcassets in Resources */,
|
||||||
|
F86717F05E27C72C9FA1FB27 /* assets in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
FF948951157DE71465B5BD5F /* Build Rust Code */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "Build Rust Code";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/libapi.a",
|
||||||
|
"$(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/libapi.a",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "node /Users/lucas/projects/tauri/plugins-workspace/examples/api/./node_modules/.bin/../../../../node_modules/.pnpm/@tauri-apps+cli@2.0.0-alpha.14/node_modules/@tauri-apps/cli/tauri.js ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths \"${FRAMEWORK_SEARCH_PATHS:?}\" --header-search-paths \"${HEADER_SEARCH_PATHS:?}\" --gcc-preprocessor-definitions \"${GCC_PREPROCESSOR_DEFINITIONS:-}\" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
71E73CC9AB5F1323EC1F6365 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
328B4ADB3700C1873BEB7B10 /* main.mm in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
A83F70B4C02DD0222038C7F1 /* release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = release;
|
||||||
|
};
|
||||||
|
B6AD77E490F315562F75D3D7 /* debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"DEBUG=1",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = debug;
|
||||||
|
};
|
||||||
|
BF284FE6E7AE0C8DDCCE398B /* debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
|
ARCHS = (
|
||||||
|
arm64,
|
||||||
|
"arm64-sim",
|
||||||
|
);
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\".\"",
|
||||||
|
);
|
||||||
|
INFOPLIST_FILE = api_iOS/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.tauri.api;
|
||||||
|
PRODUCT_NAME = "Tauri API";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALID_ARCHS = "arm64 arm64-sim";
|
||||||
|
};
|
||||||
|
name = debug;
|
||||||
|
};
|
||||||
|
DB0E254D0FD84970B57F6410 /* release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
|
ARCHS = (
|
||||||
|
arm64,
|
||||||
|
"arm64-sim",
|
||||||
|
);
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\".\"",
|
||||||
|
);
|
||||||
|
INFOPLIST_FILE = api_iOS/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.tauri.api;
|
||||||
|
PRODUCT_NAME = "Tauri API";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALID_ARCHS = "arm64 arm64-sim";
|
||||||
|
};
|
||||||
|
name = release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
01CBC40275452376830D79B1 /* Build configuration list for PBXNativeTarget "api_iOS" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
BF284FE6E7AE0C8DDCCE398B /* debug */,
|
||||||
|
DB0E254D0FD84970B57F6410 /* release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = debug;
|
||||||
|
};
|
||||||
|
8FA67D0F928A09CD639137D1 /* Build configuration list for PBXProject "api" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
B6AD77E490F315562F75D3D7 /* debug */,
|
||||||
|
A83F70B4C02DD0222038C7F1 /* release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = debug;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 9BC88C3717DA5D4B78A51C15 /* Project object */;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BuildSystemType</key>
|
||||||
|
<string>Original</string>
|
||||||
|
<key>DisableBuildSystemDeprecationDiagnostic</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1200"
|
||||||
|
version = "1.7">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES"
|
||||||
|
runPostActionsOnFailure = "NO">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "54DC6E273C78071F3BA12EF3"
|
||||||
|
BuildableName = "api_iOS.app"
|
||||||
|
BlueprintName = "api_iOS"
|
||||||
|
ReferencedContainer = "container:api.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "NO"
|
||||||
|
onlyGenerateCoverageForSpecifiedTargets = "NO">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "54DC6E273C78071F3BA12EF3"
|
||||||
|
BuildableName = "api_iOS.app"
|
||||||
|
BlueprintName = "api_iOS"
|
||||||
|
ReferencedContainer = "container:api.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<CommandLineArguments>
|
||||||
|
</CommandLineArguments>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "RUST_BACKTRACE"
|
||||||
|
value = "full"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "RUST_LOG"
|
||||||
|
value = "info"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "54DC6E273C78071F3BA12EF3"
|
||||||
|
BuildableName = "api_iOS.app"
|
||||||
|
BlueprintName = "api_iOS"
|
||||||
|
ReferencedContainer = "container:api.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<CommandLineArguments>
|
||||||
|
</CommandLineArguments>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "RUST_BACKTRACE"
|
||||||
|
value = "full"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "RUST_LOG"
|
||||||
|
value = "info"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "NO"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "54DC6E273C78071F3BA12EF3"
|
||||||
|
BuildableName = "api_iOS.app"
|
||||||
|
BlueprintName = "api_iOS"
|
||||||
|
ReferencedContainer = "container:api.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<CommandLineArguments>
|
||||||
|
</CommandLineArguments>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "RUST_BACKTRACE"
|
||||||
|
value = "full"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "RUST_LOG"
|
||||||
|
value = "info"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>2.0.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>2.0.0</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
|
<array>
|
||||||
|
<string>arm64</string>
|
||||||
|
<string>metal</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>To be able to scan barcodes</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict/>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
name: api
|
||||||
|
options:
|
||||||
|
bundleIdPrefix: com.tauri
|
||||||
|
deploymentTarget:
|
||||||
|
iOS: 13.0
|
||||||
|
fileGroups: [../../src]
|
||||||
|
configs:
|
||||||
|
debug: debug
|
||||||
|
release: release
|
||||||
|
settingGroups:
|
||||||
|
app:
|
||||||
|
base:
|
||||||
|
PRODUCT_NAME: Tauri API
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER: com.tauri.api
|
||||||
|
DEVELOPMENT_TEAM: Q93MBH6S2F
|
||||||
|
targetTemplates:
|
||||||
|
app:
|
||||||
|
type: application
|
||||||
|
sources:
|
||||||
|
- path: Sources
|
||||||
|
scheme:
|
||||||
|
environmentVariables:
|
||||||
|
RUST_BACKTRACE: full
|
||||||
|
RUST_LOG: info
|
||||||
|
settings:
|
||||||
|
groups: [app]
|
||||||
|
targets:
|
||||||
|
api_iOS:
|
||||||
|
type: application
|
||||||
|
platform: iOS
|
||||||
|
sources:
|
||||||
|
- path: Sources
|
||||||
|
- path: Assets.xcassets
|
||||||
|
- path: Externals
|
||||||
|
- path: api_iOS
|
||||||
|
- path: assets
|
||||||
|
buildPhase: resources
|
||||||
|
type: folder
|
||||||
|
info:
|
||||||
|
path: api_iOS/Info.plist
|
||||||
|
properties:
|
||||||
|
LSRequiresIPhoneOS: true
|
||||||
|
UILaunchStoryboardName: LaunchScreen
|
||||||
|
UIRequiredDeviceCapabilities: [arm64, metal]
|
||||||
|
UISupportedInterfaceOrientations:
|
||||||
|
- UIInterfaceOrientationPortrait
|
||||||
|
- UIInterfaceOrientationLandscapeLeft
|
||||||
|
- UIInterfaceOrientationLandscapeRight
|
||||||
|
UISupportedInterfaceOrientations~ipad:
|
||||||
|
- UIInterfaceOrientationPortrait
|
||||||
|
- UIInterfaceOrientationPortraitUpsideDown
|
||||||
|
- UIInterfaceOrientationLandscapeLeft
|
||||||
|
- UIInterfaceOrientationLandscapeRight
|
||||||
|
CFBundleShortVersionString: 2.0.0
|
||||||
|
CFBundleVersion: 2.0.0
|
||||||
|
entitlements:
|
||||||
|
path: api_iOS/api_iOS.entitlements
|
||||||
|
scheme:
|
||||||
|
environmentVariables:
|
||||||
|
RUST_BACKTRACE: full
|
||||||
|
RUST_LOG: info
|
||||||
|
settings:
|
||||||
|
base:
|
||||||
|
ENABLE_BITCODE: false
|
||||||
|
ARCHS: [arm64, arm64-sim]
|
||||||
|
VALID_ARCHS: arm64 arm64-sim
|
||||||
|
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||||
|
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||||
|
LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||||
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
|
||||||
|
groups: [app]
|
||||||
|
dependencies:
|
||||||
|
- framework: libapi.a
|
||||||
|
embed: false
|
||||||
|
- sdk: CoreGraphics.framework
|
||||||
|
- sdk: Metal.framework
|
||||||
|
- sdk: MetalKit.framework
|
||||||
|
- sdk: QuartzCore.framework
|
||||||
|
- sdk: Security.framework
|
||||||
|
- sdk: UIKit.framework
|
||||||
|
- sdk: WebKit.framework
|
||||||
|
preBuildScripts:
|
||||||
|
- script: node /Users/lucas/projects/tauri/plugins-workspace/examples/api/./node_modules/.bin/../../../../node_modules/.pnpm/@tauri-apps+cli@2.0.0-alpha.14/node_modules/@tauri-apps/cli/tauri.js ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths "${FRAMEWORK_SEARCH_PATHS:?}" --header-search-paths "${HEADER_SEARCH_PATHS:?}" --gcc-preprocessor-definitions "${GCC_PREPROCESSOR_DEFINITIONS:-}" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||||
|
name: Build Rust Code
|
||||||
|
basedOnDependencyAnalysis: false
|
||||||
|
outputFiles:
|
||||||
|
- $(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/libapi.a
|
||||||
|
- $(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/libapi.a
|
||||||
@@ -33,7 +33,7 @@ pub fn run() {
|
|||||||
)
|
)
|
||||||
.plugin(tauri_plugin_app::init())
|
.plugin(tauri_plugin_app::init())
|
||||||
.plugin(tauri_plugin_fs::init())
|
.plugin(tauri_plugin_fs::init())
|
||||||
.plugin(tauri_plugin_clipboard::init())
|
.plugin(tauri_plugin_clipboard_manager::init())
|
||||||
.plugin(tauri_plugin_dialog::init())
|
.plugin(tauri_plugin_dialog::init())
|
||||||
.plugin(tauri_plugin_http::init())
|
.plugin(tauri_plugin_http::init())
|
||||||
.plugin(tauri_plugin_notification::init())
|
.plugin(tauri_plugin_notification::init())
|
||||||
@@ -44,19 +44,28 @@ pub fn run() {
|
|||||||
.setup(move |app| {
|
.setup(move |app| {
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
{
|
{
|
||||||
tray::create_tray(app)?;
|
tray::create_tray(app.handle())?;
|
||||||
app.handle().plugin(tauri_plugin_cli::init())?;
|
app.handle().plugin(tauri_plugin_cli::init())?;
|
||||||
app.handle()
|
app.handle()
|
||||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
||||||
app.handle()
|
app.handle()
|
||||||
.plugin(tauri_plugin_updater::Builder::new().build())?;
|
.plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||||
}
|
}
|
||||||
|
#[cfg(mobile)]
|
||||||
|
{
|
||||||
|
app.handle().plugin(tauri_plugin_barcode_scanner::init())?;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(mobile)]
|
||||||
|
{
|
||||||
|
app.handle().plugin(tauri_plugin_camera::init())?;
|
||||||
|
}
|
||||||
|
|
||||||
let mut window_builder = WindowBuilder::new(app, "main", WindowUrl::default());
|
let mut window_builder = WindowBuilder::new(app, "main", WindowUrl::default());
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
{
|
{
|
||||||
window_builder = window_builder
|
window_builder = window_builder
|
||||||
.user_agent("Tauri API")
|
.user_agent(&format!("Tauri API - {}", std::env::consts::OS))
|
||||||
.title("Tauri API Validation")
|
.title("Tauri API Validation")
|
||||||
.inner_size(1000., 800.)
|
.inner_size(1000., 800.)
|
||||||
.min_inner_size(600., 400.)
|
.min_inner_size(600., 400.)
|
||||||
@@ -71,6 +80,11 @@ pub fn run() {
|
|||||||
.decorations(false);
|
.decorations(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
window_builder = window_builder.transparent(true);
|
||||||
|
}
|
||||||
|
|
||||||
let window = window_builder.build().unwrap();
|
let window = window_builder.build().unwrap();
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
@@ -119,7 +133,7 @@ pub fn run() {
|
|||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
builder = builder.menu(tauri::Menu::os_default("Tauri API Validation"));
|
builder = builder.menu(tauri::menu::Menu::default);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
|
|||||||
@@ -4,140 +4,113 @@
|
|||||||
|
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
use tauri::{
|
use tauri::{
|
||||||
CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu, WindowBuilder, WindowUrl,
|
menu::{Menu, MenuItem},
|
||||||
|
tray::{ClickType, TrayIconBuilder},
|
||||||
|
Manager, Runtime, WindowBuilder, WindowUrl,
|
||||||
};
|
};
|
||||||
use tauri_plugin_dialog::DialogExt;
|
|
||||||
use tauri_plugin_shell::ShellExt;
|
|
||||||
|
|
||||||
pub fn create_tray(app: &tauri::App) -> tauri::Result<()> {
|
|
||||||
let mut tray_menu1 = SystemTrayMenu::new()
|
|
||||||
.add_item(CustomMenuItem::new("toggle", "Toggle"))
|
|
||||||
.add_item(CustomMenuItem::new("new", "New window"))
|
|
||||||
.add_item(CustomMenuItem::new("icon_1", "Tray Icon 1"))
|
|
||||||
.add_item(CustomMenuItem::new("icon_2", "Tray Icon 2"));
|
|
||||||
|
|
||||||
|
pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
|
||||||
|
let toggle_i = MenuItem::with_id(app, "toggle", "Toggle", true, None);
|
||||||
|
let new_window_i = MenuItem::with_id(app, "new-window", "New window", true, None);
|
||||||
|
let icon_i_1 = MenuItem::with_id(app, "icon-1", "Icon 1", true, None);
|
||||||
|
let icon_i_2 = MenuItem::with_id(app, "icon-2", "Icon 2", true, None);
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
let set_title_i = MenuItem::with_id(app, "set-title", "Set Title", true, None);
|
||||||
tray_menu1 = tray_menu1.add_item(CustomMenuItem::new("set_title", "Set Title"));
|
let switch_i = MenuItem::with_id(app, "switch-menu", "Switch Menu", true, None);
|
||||||
}
|
let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None);
|
||||||
|
let remove_tray_i = MenuItem::with_id(app, "remove-tray", "Remove Tray icon", true, None);
|
||||||
|
let menu1 = Menu::with_items(
|
||||||
|
app,
|
||||||
|
&[
|
||||||
|
&toggle_i,
|
||||||
|
&new_window_i,
|
||||||
|
&icon_i_1,
|
||||||
|
&icon_i_2,
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
&set_title_i,
|
||||||
|
&switch_i,
|
||||||
|
&quit_i,
|
||||||
|
&remove_tray_i,
|
||||||
|
],
|
||||||
|
)?;
|
||||||
|
let menu2 = Menu::with_items(
|
||||||
|
app,
|
||||||
|
&[&toggle_i, &new_window_i, &switch_i, &quit_i, &remove_tray_i],
|
||||||
|
)?;
|
||||||
|
|
||||||
tray_menu1 = tray_menu1
|
|
||||||
.add_item(CustomMenuItem::new("switch_menu", "Switch Menu"))
|
|
||||||
.add_item(CustomMenuItem::new("about", "About"))
|
|
||||||
.add_item(CustomMenuItem::new("exit_app", "Quit"))
|
|
||||||
.add_item(CustomMenuItem::new("destroy", "Destroy"));
|
|
||||||
|
|
||||||
let tray_menu2 = SystemTrayMenu::new()
|
|
||||||
.add_item(CustomMenuItem::new("toggle", "Toggle"))
|
|
||||||
.add_item(CustomMenuItem::new("new", "New window"))
|
|
||||||
.add_item(CustomMenuItem::new("switch_menu", "Switch Menu"))
|
|
||||||
.add_item(CustomMenuItem::new("about", "About"))
|
|
||||||
.add_item(CustomMenuItem::new("exit_app", "Quit"))
|
|
||||||
.add_item(CustomMenuItem::new("destroy", "Destroy"));
|
|
||||||
let is_menu1 = AtomicBool::new(true);
|
let is_menu1 = AtomicBool::new(true);
|
||||||
|
|
||||||
let handle = app.handle();
|
let _ = TrayIconBuilder::with_id("tray-1")
|
||||||
let tray_id = "my-tray".to_string();
|
.tooltip("Tauri")
|
||||||
SystemTray::new()
|
.icon(app.default_window_icon().unwrap().clone())
|
||||||
.with_id(&tray_id)
|
.menu(&menu1)
|
||||||
.with_menu(tray_menu1.clone())
|
.menu_on_left_click(false)
|
||||||
.with_tooltip("Tauri")
|
.on_menu_event(move |app, event| match event.id.as_ref() {
|
||||||
.on_event(move |event| {
|
"quit" => {
|
||||||
let tray_handle = handle.tray_handle_by_id(&tray_id).unwrap();
|
app.exit(0);
|
||||||
match event {
|
}
|
||||||
SystemTrayEvent::LeftClick {
|
"remove-tray" => {
|
||||||
position: _,
|
app.remove_tray_by_id("tray-1");
|
||||||
size: _,
|
}
|
||||||
..
|
"toggle" => {
|
||||||
} => {
|
if let Some(window) = app.get_window("main") {
|
||||||
let window = handle.get_window("main").unwrap();
|
let new_title = if window.is_visible().unwrap_or_default() {
|
||||||
window.show().unwrap();
|
let _ = window.hide();
|
||||||
window.set_focus().unwrap();
|
"Show"
|
||||||
|
} else {
|
||||||
|
let _ = window.show();
|
||||||
|
let _ = window.set_focus();
|
||||||
|
"Hide"
|
||||||
|
};
|
||||||
|
toggle_i.set_text(new_title).unwrap();
|
||||||
}
|
}
|
||||||
SystemTrayEvent::MenuItemClick { id, .. } => {
|
}
|
||||||
let item_handle = tray_handle.get_item(&id);
|
"new-window" => {
|
||||||
match id.as_str() {
|
let _ = WindowBuilder::new(app, "new", WindowUrl::App("index.html".into()))
|
||||||
"exit_app" => {
|
.title("Tauri")
|
||||||
// exit the app
|
.build();
|
||||||
handle.exit(0);
|
}
|
||||||
}
|
#[cfg(target_os = "macos")]
|
||||||
"destroy" => {
|
"set-title" => {
|
||||||
tray_handle.destroy().unwrap();
|
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||||
}
|
let _ = tray.set_title(Some("Tauri"));
|
||||||
"toggle" => {
|
}
|
||||||
let window = handle.get_window("main").unwrap();
|
}
|
||||||
let new_title = if window.is_visible().unwrap() {
|
i @ "icon-1" | i @ "icon-2" => {
|
||||||
window.hide().unwrap();
|
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||||
"Show"
|
let _ = tray.set_icon(Some(tauri::Icon::Raw(if i == "icon-1" {
|
||||||
} else {
|
include_bytes!("../icons/icon.ico").to_vec()
|
||||||
window.show().unwrap();
|
} else {
|
||||||
"Hide"
|
include_bytes!("../icons/tray_icon_with_transparency.png").to_vec()
|
||||||
};
|
})));
|
||||||
item_handle.set_title(new_title).unwrap();
|
}
|
||||||
}
|
}
|
||||||
"new" => {
|
"switch-menu" => {
|
||||||
WindowBuilder::new(&handle, "new", WindowUrl::App("index.html".into()))
|
let flag = is_menu1.load(Ordering::Relaxed);
|
||||||
.title("Tauri")
|
let (menu, tooltip) = if flag {
|
||||||
.build()
|
(menu2.clone(), "Menu 2")
|
||||||
.unwrap();
|
} else {
|
||||||
}
|
(menu1.clone(), "Tauri")
|
||||||
"set_title" => {
|
};
|
||||||
#[cfg(target_os = "macos")]
|
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||||
tray_handle.set_title("Tauri").unwrap();
|
let _ = tray.set_menu(Some(menu));
|
||||||
}
|
let _ = tray.set_tooltip(Some(tooltip));
|
||||||
"icon_1" => {
|
}
|
||||||
#[cfg(target_os = "macos")]
|
is_menu1.store(!flag, Ordering::Relaxed);
|
||||||
tray_handle.set_icon_as_template(true).unwrap();
|
}
|
||||||
|
|
||||||
tray_handle
|
_ => {}
|
||||||
.set_icon(tauri::Icon::Raw(
|
})
|
||||||
include_bytes!("../icons/tray_icon_with_transparency.png")
|
.on_tray_event(|tray, event| {
|
||||||
.to_vec(),
|
if event.click_type == ClickType::Left {
|
||||||
))
|
let app = tray.app_handle();
|
||||||
.unwrap();
|
if let Some(window) = app.get_window("main") {
|
||||||
}
|
let _ = window.show();
|
||||||
"icon_2" => {
|
let _ = window.set_focus();
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
tray_handle.set_icon_as_template(true).unwrap();
|
|
||||||
|
|
||||||
tray_handle
|
|
||||||
.set_icon(tauri::Icon::Raw(
|
|
||||||
include_bytes!("../icons/icon.ico").to_vec(),
|
|
||||||
))
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
"switch_menu" => {
|
|
||||||
let flag = is_menu1.load(Ordering::Relaxed);
|
|
||||||
let (menu, tooltip) = if flag {
|
|
||||||
(tray_menu2.clone(), "Menu 2")
|
|
||||||
} else {
|
|
||||||
(tray_menu1.clone(), "Tauri")
|
|
||||||
};
|
|
||||||
tray_handle.set_menu(menu).unwrap();
|
|
||||||
tray_handle.set_tooltip(tooltip).unwrap();
|
|
||||||
is_menu1.store(!flag, Ordering::Relaxed);
|
|
||||||
}
|
|
||||||
"about" => {
|
|
||||||
let window = handle.get_window("main").unwrap();
|
|
||||||
window
|
|
||||||
.dialog()
|
|
||||||
.message("Tauri demo app")
|
|
||||||
.title("About app")
|
|
||||||
.parent(&window)
|
|
||||||
.ok_button_label("Homepage")
|
|
||||||
.cancel_button_label("Cancel")
|
|
||||||
.show(move |ok| {
|
|
||||||
if ok {
|
|
||||||
window.shell().open("https://tauri.app/", None).unwrap();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.build(app)
|
.build(app);
|
||||||
.map(|_| ())
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,9 +124,10 @@
|
|||||||
"security": {
|
"security": {
|
||||||
"csp": {
|
"csp": {
|
||||||
"default-src": "'self' customprotocol: asset:",
|
"default-src": "'self' customprotocol: asset:",
|
||||||
|
"connect-src": "ipc: http://ipc.localhost",
|
||||||
"font-src": ["https://fonts.gstatic.com"],
|
"font-src": ["https://fonts.gstatic.com"],
|
||||||
"img-src": "'self' asset: https://asset.localhost blob: data:",
|
"img-src": "'self' asset: http://asset.localhost blob: data:",
|
||||||
"style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com"
|
"style-src": "'unsafe-inline' 'self' http://fonts.googleapis.com"
|
||||||
},
|
},
|
||||||
"freezePrototype": true,
|
"freezePrototype": true,
|
||||||
"assetProtocol": {
|
"assetProtocol": {
|
||||||
@@ -136,11 +137,6 @@
|
|||||||
"deny": ["$APPDATA/db/*.stronghold"]
|
"deny": ["$APPDATA/db/*.stronghold"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systemTray": {
|
|
||||||
"iconPath": "icons/tray_icon_with_transparency.png",
|
|
||||||
"iconAsTemplate": true,
|
|
||||||
"menuOnLeftClick": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
import { open } from "@tauri-apps/plugin-shell";
|
import { open } from "@tauri-apps/plugin-shell";
|
||||||
import { appWindow, getCurrent } from "@tauri-apps/plugin-window";
|
import { getCurrent } from "@tauri-apps/plugin-window";
|
||||||
import * as os from "@tauri-apps/plugin-os";
|
import * as os from "@tauri-apps/plugin-os";
|
||||||
|
|
||||||
import Welcome from "./views/Welcome.svelte";
|
import Welcome from "./views/Welcome.svelte";
|
||||||
@@ -17,11 +17,15 @@
|
|||||||
import Updater from "./views/Updater.svelte";
|
import Updater from "./views/Updater.svelte";
|
||||||
import Clipboard from "./views/Clipboard.svelte";
|
import Clipboard from "./views/Clipboard.svelte";
|
||||||
import WebRTC from "./views/WebRTC.svelte";
|
import WebRTC from "./views/WebRTC.svelte";
|
||||||
|
import Scanner from "./views/Scanner.svelte";
|
||||||
|
import Camera from "./views/Camera.svelte";
|
||||||
import App from "./views/App.svelte";
|
import App from "./views/App.svelte";
|
||||||
|
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { ask } from "@tauri-apps/plugin-dialog";
|
import { ask } from "@tauri-apps/plugin-dialog";
|
||||||
|
|
||||||
|
const appWindow = getCurrent();
|
||||||
|
|
||||||
if (appWindow.label !== "main") {
|
if (appWindow.label !== "main") {
|
||||||
appWindow.onCloseRequested(async (event) => {
|
appWindow.onCloseRequested(async (event) => {
|
||||||
const confirmed = await confirm("Are you sure?");
|
const confirmed = await confirm("Are you sure?");
|
||||||
@@ -111,7 +115,17 @@
|
|||||||
component: WebRTC,
|
component: WebRTC,
|
||||||
icon: "i-ph-broadcast",
|
icon: "i-ph-broadcast",
|
||||||
},
|
},
|
||||||
];
|
isMobile && {
|
||||||
|
label: "Scanner",
|
||||||
|
component: Scanner,
|
||||||
|
icon: "i-ph-scan",
|
||||||
|
},
|
||||||
|
isMobile && {
|
||||||
|
label: 'Camera',
|
||||||
|
component: Camera,
|
||||||
|
icon: 'i-codicon-clippy'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
let selected = views[0];
|
let selected = views[0];
|
||||||
function select(view) {
|
function select(view) {
|
||||||
@@ -121,20 +135,20 @@
|
|||||||
// Window controls
|
// Window controls
|
||||||
let isWindowMaximized;
|
let isWindowMaximized;
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
const window = getCurrent();
|
isWindowMaximized = await appWindow.isMaximized();
|
||||||
isWindowMaximized = await window.isMaximized();
|
appWindow.onResized(async () => {
|
||||||
window.onResized(async () => {
|
isWindowMaximized = await appWindow.isMaximized();
|
||||||
isWindowMaximized = await window.isMaximized();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function minimize() {
|
function minimize() {
|
||||||
getCurrent().minimize();
|
appWindow.minimize();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleMaximize() {
|
async function toggleMaximize() {
|
||||||
const window = getCurrent();
|
(await appWindow.isMaximized())
|
||||||
(await window.isMaximized()) ? window.unmaximize() : window.maximize();
|
? appWindow.unmaximize()
|
||||||
|
: appWindow.maximize();
|
||||||
}
|
}
|
||||||
|
|
||||||
let confirmed_close = false;
|
let confirmed_close = false;
|
||||||
@@ -147,7 +161,7 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (confirmed_close) {
|
if (confirmed_close) {
|
||||||
getCurrent().close();
|
appWindow.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,7 +368,7 @@
|
|||||||
<!-- Sidebar toggle, only visible on small screens -->
|
<!-- Sidebar toggle, only visible on small screens -->
|
||||||
<div
|
<div
|
||||||
id="sidebarToggle"
|
id="sidebarToggle"
|
||||||
class="z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8
|
class="z-2000 sidebar-toggle display-none lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
|
||||||
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
|
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
|
||||||
>
|
>
|
||||||
{#if isSideBarOpen}
|
{#if isSideBarOpen}
|
||||||
@@ -442,6 +456,7 @@
|
|||||||
</aside>
|
</aside>
|
||||||
<main
|
<main
|
||||||
class="flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"
|
class="flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"
|
||||||
|
class:transparent={isMobile}
|
||||||
>
|
>
|
||||||
<div class="px-5 overflow-hidden grid grid-rows-[auto_1fr]">
|
<div class="px-5 overflow-hidden grid grid-rows-[auto_1fr]">
|
||||||
<h1>{selected.label}</h1>
|
<h1>{selected.label}</h1>
|
||||||
|
|||||||
@@ -39,3 +39,23 @@ code.code-block {
|
|||||||
transform: translateX(var(--translate-x));
|
transform: translateX(var(--translate-x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-toggle {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: env(safe-area-inset-top) env(safe-area-inset-right)
|
||||||
|
env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar,
|
||||||
|
#console {
|
||||||
|
padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.transparent {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<script>
|
||||||
|
import { getPhoto, ResultType, Source } from "@tauri-apps/plugin-camera";
|
||||||
|
|
||||||
|
let source = Source.Camera;
|
||||||
|
let imageSrc = "";
|
||||||
|
|
||||||
|
const sources = [
|
||||||
|
{
|
||||||
|
value: Source.Camera,
|
||||||
|
label: "Camera",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: Source.Photos,
|
||||||
|
label: "Photo",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: Source.Prompt,
|
||||||
|
label: "Prompt",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
async function get() {
|
||||||
|
try {
|
||||||
|
const image = await getPhoto({
|
||||||
|
resultType: ResultType.Base64,
|
||||||
|
source,
|
||||||
|
});
|
||||||
|
imageSrc = `data:image/png;base64, ${image.data}`;
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{#if imageSrc}
|
||||||
|
<img src={imageSrc} alt="Selected" />
|
||||||
|
{/if}
|
||||||
|
<div class="flex">
|
||||||
|
<select class="input" id="dir" bind:value={source}>
|
||||||
|
{#each sources as source}
|
||||||
|
<option value={source.value}>{source.label}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
<button class="btn" on:click={get}> Get photo </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
img {
|
||||||
|
max-width: 100vw;
|
||||||
|
max-height: 80vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import { writeText, readText } from "@tauri-apps/plugin-clipboard";
|
import { writeText, readText } from "@tauri-apps/plugin-clipboard-manager";
|
||||||
|
|
||||||
export let onMessage;
|
export let onMessage;
|
||||||
let text = "clipboard message";
|
let text = "clipboard message";
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import { appWindow } from "@tauri-apps/plugin-window";
|
import { getCurrent } from "@tauri-apps/plugin-window";
|
||||||
import { invoke } from "@tauri-apps/api/tauri";
|
import { invoke } from "@tauri-apps/api/tauri";
|
||||||
import { onMount, onDestroy } from "svelte";
|
import { onMount, onDestroy } from "svelte";
|
||||||
|
|
||||||
|
const appWindow = getCurrent();
|
||||||
|
|
||||||
export let onMessage;
|
export let onMessage;
|
||||||
let unlisten;
|
let unlisten;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getClient, Body, ResponseType } from "@tauri-apps/plugin-http";
|
import { fetch as tauriFetch } from "@tauri-apps/plugin-http";
|
||||||
import { JsonView } from "@zerodevx/svelte-json-view";
|
import { JsonView } from "@zerodevx/svelte-json-view";
|
||||||
|
|
||||||
let httpMethod = "GET";
|
let httpMethod = "GET";
|
||||||
@@ -8,53 +8,62 @@
|
|||||||
export let onMessage;
|
export let onMessage;
|
||||||
|
|
||||||
async function makeHttpRequest() {
|
async function makeHttpRequest() {
|
||||||
const client = await getClient().catch((e) => {
|
|
||||||
onMessage(e);
|
|
||||||
throw e;
|
|
||||||
});
|
|
||||||
let method = httpMethod || "GET";
|
let method = httpMethod || "GET";
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
url: "http://localhost:3003",
|
|
||||||
method: method || "GET",
|
method: method || "GET",
|
||||||
|
headers: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
let bodyType;
|
||||||
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
|
||||||
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
if (method !== "GET") {
|
||||||
) {
|
options.body = httpBody;
|
||||||
options.body = Body.json(JSON.parse(httpBody));
|
|
||||||
} else if (httpBody !== "") {
|
if (
|
||||||
options.body = Body.text(httpBody);
|
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
||||||
|
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
||||||
|
) {
|
||||||
|
options.headers["Content-Type"] = "application/json";
|
||||||
|
bodyType = "json";
|
||||||
|
} else if (httpBody !== "") {
|
||||||
|
bodyType = "text";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client.request(options).then(onMessage).catch(onMessage);
|
const response = await tauriFetch("http://localhost:3003", options);
|
||||||
|
const body =
|
||||||
|
bodyType === "json" ? await response.json() : await response.text();
|
||||||
|
|
||||||
|
onMessage({
|
||||||
|
url: response.url,
|
||||||
|
status: response.status,
|
||||||
|
ok: response.ok,
|
||||||
|
headers: Object.fromEntries(response.headers.entries()),
|
||||||
|
body,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// http form
|
/// http form
|
||||||
let foo = "baz";
|
let foo = "baz";
|
||||||
let bar = "qux";
|
let bar = "qux";
|
||||||
let result = null;
|
let result = null;
|
||||||
let multipart = true;
|
|
||||||
|
|
||||||
async function doPost() {
|
async function doPost() {
|
||||||
const client = await getClient().catch((e) => {
|
const form = new FormData();
|
||||||
onMessage(e);
|
form.append("foo", foo);
|
||||||
throw e;
|
form.append("bar", bar);
|
||||||
});
|
const response = await tauriFetch("http://localhost:3003", {
|
||||||
|
|
||||||
result = await client.request({
|
|
||||||
url: "http://localhost:3003",
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: Body.form({
|
body: form,
|
||||||
foo,
|
|
||||||
bar,
|
|
||||||
}),
|
|
||||||
headers: multipart
|
|
||||||
? { "Content-Type": "multipart/form-data" }
|
|
||||||
: undefined,
|
|
||||||
responseType: ResponseType.Text,
|
|
||||||
});
|
});
|
||||||
|
result = {
|
||||||
|
url: response.url,
|
||||||
|
status: response.status,
|
||||||
|
ok: response.ok,
|
||||||
|
headers: Object.fromEntries(response.headers.entries()),
|
||||||
|
body: await response.text(),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -87,11 +96,6 @@
|
|||||||
<input class="input" bind:value={bar} />
|
<input class="input" bind:value={bar} />
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<label>
|
|
||||||
<input type="checkbox" bind:checked={multipart} />
|
|
||||||
Multipart
|
|
||||||
</label>
|
|
||||||
<br />
|
|
||||||
<br />
|
<br />
|
||||||
<button class="btn" type="button" on:click={doPost}> Post it</button>
|
<button class="btn" type="button" on:click={doPost}> Post it</button>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||