Compare commits
84 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 | |||
| 7d71ad4e58 | |||
| 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,
|
||||
"dependencies": [
|
||||
"app",
|
||||
"barcode-scanner",
|
||||
"log-plugin",
|
||||
"cli",
|
||||
"clipboard",
|
||||
"clipboard-manager",
|
||||
"dialog",
|
||||
"fs",
|
||||
"global-shortcut",
|
||||
@@ -60,9 +61,10 @@
|
||||
"publish": false,
|
||||
"dependencies": [
|
||||
"app-js",
|
||||
"barcode-scanner-js",
|
||||
"log-js",
|
||||
"cli-js",
|
||||
"clipboard-js",
|
||||
"clipboard-manager-js",
|
||||
"dialog-js",
|
||||
"fs-js",
|
||||
"global-shortcut-js",
|
||||
@@ -73,7 +75,16 @@
|
||||
"shell-js",
|
||||
"updater-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": {
|
||||
@@ -103,6 +114,15 @@
|
||||
"manager": "javascript"
|
||||
},
|
||||
|
||||
"barcode-scanner": {
|
||||
"path": "./plugins/barcode-scanner",
|
||||
"manager": "rust"
|
||||
},
|
||||
"barcode-scanner-js": {
|
||||
"path": "./plugins/barcode-scanner",
|
||||
"manager": "javascript"
|
||||
},
|
||||
|
||||
"cli": {
|
||||
"path": "./plugins/cli",
|
||||
"manager": "rust"
|
||||
@@ -121,6 +141,15 @@
|
||||
"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"
|
||||
|
||||
@@ -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",
|
||||
"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
|
||||
@@ -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
|
||||
dist
|
||||
dist-js
|
||||
api-iife.js
|
||||
api-iife.js
|
||||
init.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
|
||||
@@ -193,6 +193,11 @@ jobs:
|
||||
working-directory: examples/api
|
||||
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 }}
|
||||
if: matrix.package != 'tauri-plugin-sql'
|
||||
uses: actions-rs/cargo@v1
|
||||
|
||||
@@ -5,4 +5,6 @@ dist-js
|
||||
pnpm-lock.yaml
|
||||
Cargo.lock
|
||||
.build
|
||||
api-iife.js
|
||||
build
|
||||
api-iife.js
|
||||
intermediates/
|
||||
@@ -21,12 +21,13 @@ const ignore = [
|
||||
"dist-js",
|
||||
".svelte-kit",
|
||||
"api-iife.js",
|
||||
".build",
|
||||
];
|
||||
|
||||
async function checkFile(file) {
|
||||
if (
|
||||
extensions.some((e) => file.endsWith(e)) &&
|
||||
!ignore.some((i) => file.endsWith(i))
|
||||
!ignore.some((i) => file.includes(i))
|
||||
) {
|
||||
const fileStream = fs.createReadStream(file);
|
||||
const rl = readline.createInterface({
|
||||
@@ -70,7 +71,9 @@ async function checkFile(file) {
|
||||
async function check(src) {
|
||||
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);
|
||||
|
||||
if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
|
||||
@@ -116,6 +119,6 @@ if (files.length > 0) {
|
||||
console.log(missing.join("\n"));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ https.get(url, options, (response) => {
|
||||
}
|
||||
} else if (kind === "npm") {
|
||||
const versions = Object.keys(data.versions || {}).filter((v) =>
|
||||
v.startsWith(target)
|
||||
v.startsWith(target),
|
||||
);
|
||||
console.log(versions[versions.length - 1] || "0.0.0");
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[workspace]
|
||||
members = ["plugins/*", "plugins/*/tests/*", "examples/*/src-tauri"]
|
||||
members = ["plugins/*", "plugins/*/tests/*", "plugins/*/examples/*/src-tauri", "examples/*/src-tauri"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
log = "0.4"
|
||||
tauri = "2.0.0-alpha.9"
|
||||
tauri-build = "2.0.0-alpha.5"
|
||||
tauri = "2.0.0-alpha.12"
|
||||
tauri-build = "2.0.0-alpha.8"
|
||||
serde_json = "1"
|
||||
thiserror = "1"
|
||||
|
||||
|
||||
@@ -1,5 +1,35 @@
|
||||
# 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]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en" theme="dark">
|
||||
<head>
|
||||
<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>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"private": true,
|
||||
"version": "2.0.0-alpha.0",
|
||||
"version": "2.0.0-alpha.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --clearScreen false",
|
||||
@@ -9,30 +9,33 @@
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-alpha.4",
|
||||
"@zerodevx/svelte-json-view": "0.2.1",
|
||||
"@tauri-apps/plugin-app": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-cli": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-http": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-os": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-process": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-updater": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-window": "2.0.0-alpha.0"
|
||||
"@tauri-apps/api": "2.0.0-alpha.8",
|
||||
"@tauri-apps/plugin-app": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0-alpha.0",
|
||||
"@tauri-apps/plugin-camera": "1.0.0",
|
||||
"@tauri-apps/plugin-cli": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-http": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-os": "2.0.0-alpha.2",
|
||||
"@tauri-apps/plugin-process": "2.0.0-alpha.1",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-alpha.1",
|
||||
"@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": {
|
||||
"@iconify-json/codicon": "^1.1.10",
|
||||
"@iconify-json/ph": "^1.1.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
||||
"@tauri-apps/cli": "2.0.0-alpha.9",
|
||||
"internal-ip": "^7.0.0",
|
||||
"svelte": "^3.49.0",
|
||||
"unocss": "^0.39.3",
|
||||
"vite": "^3.0.9"
|
||||
"@iconify-json/codicon": "^1.1.26",
|
||||
"@iconify-json/ph": "^1.1.5",
|
||||
"@sveltejs/vite-plugin-svelte": "^2.4.1",
|
||||
"@tauri-apps/cli": "2.0.0-alpha.14",
|
||||
"@unocss/extractor-svelte": "^0.53.1",
|
||||
"internal-ip": "^8.0.0",
|
||||
"svelte": "^3.59.1",
|
||||
"unocss": "^0.53.1",
|
||||
"vite": "^4.3.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,60 @@
|
||||
# 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]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[package]
|
||||
name = "api"
|
||||
publish = false
|
||||
version = "2.0.0-alpha.0"
|
||||
version = "2.0.0-alpha.5"
|
||||
description = "An example Tauri Application showcasing the api"
|
||||
edition = "2021"
|
||||
rust-version = "1.65"
|
||||
rust-version = { workspace = true }
|
||||
license = "Apache-2.0 OR MIT"
|
||||
|
||||
[lib]
|
||||
@@ -18,17 +18,17 @@ serde_json = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
tiny_http = "0.11"
|
||||
log = { workspace = true }
|
||||
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-alpha.0", features = [ "windows7-compat" ] }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.0", features = [ "devtools", "icon-ico", "icon-png" ] }
|
||||
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.2" }
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.2" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.2" }
|
||||
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.2" }
|
||||
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.3", features = [ "windows7-compat" ] }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.2" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.2" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.2" }
|
||||
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.2", features = [ "devtools", "icon-ico", "icon-png" ] }
|
||||
|
||||
[dependencies.tauri]
|
||||
workspace = true
|
||||
@@ -37,14 +37,18 @@ tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha
|
||||
"icon-png",
|
||||
"isolation",
|
||||
"macos-private-api",
|
||||
"system-tray",
|
||||
"tray-icon",
|
||||
"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]
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-alpha.0" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", 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.2" }
|
||||
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]
|
||||
window-shadows = "0.2"
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- 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>
|
||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- 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>
|
||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -16,7 +16,7 @@ open class BuildTask : DefaultTask() {
|
||||
|
||||
@TaskAction
|
||||
fun assemble() {
|
||||
val executable = """pnpm""";
|
||||
val executable = """node""";
|
||||
try {
|
||||
runTauriCli(executable)
|
||||
} catch (e: Exception) {
|
||||
@@ -32,7 +32,7 @@ open class BuildTask : DefaultTask() {
|
||||
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
||||
val target = target ?: throw GradleException("target 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 {
|
||||
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
|
||||
@@ -44,19 +44,28 @@ pub fn run() {
|
||||
.setup(move |app| {
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
tray::create_tray(app)?;
|
||||
tray::create_tray(app.handle())?;
|
||||
app.handle().plugin(tauri_plugin_cli::init())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
||||
app.handle()
|
||||
.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());
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
window_builder = window_builder
|
||||
.user_agent("Tauri API")
|
||||
.user_agent(&format!("Tauri API - {}", std::env::consts::OS))
|
||||
.title("Tauri API Validation")
|
||||
.inner_size(1000., 800.)
|
||||
.min_inner_size(600., 400.)
|
||||
@@ -71,6 +80,11 @@ pub fn run() {
|
||||
.decorations(false);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
window_builder = window_builder.transparent(true);
|
||||
}
|
||||
|
||||
let window = window_builder.build().unwrap();
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
@@ -119,7 +133,7 @@ pub fn run() {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
builder = builder.menu(tauri::Menu::os_default("Tauri API Validation"));
|
||||
builder = builder.menu(tauri::menu::Menu::default);
|
||||
}
|
||||
|
||||
#[allow(unused_mut)]
|
||||
|
||||
@@ -4,140 +4,113 @@
|
||||
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
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")]
|
||||
{
|
||||
tray_menu1 = tray_menu1.add_item(CustomMenuItem::new("set_title", "Set Title"));
|
||||
}
|
||||
let set_title_i = MenuItem::with_id(app, "set-title", "Set Title", true, None);
|
||||
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 handle = app.handle();
|
||||
let tray_id = "my-tray".to_string();
|
||||
SystemTray::new()
|
||||
.with_id(&tray_id)
|
||||
.with_menu(tray_menu1.clone())
|
||||
.with_tooltip("Tauri")
|
||||
.on_event(move |event| {
|
||||
let tray_handle = handle.tray_handle_by_id(&tray_id).unwrap();
|
||||
match event {
|
||||
SystemTrayEvent::LeftClick {
|
||||
position: _,
|
||||
size: _,
|
||||
..
|
||||
} => {
|
||||
let window = handle.get_window("main").unwrap();
|
||||
window.show().unwrap();
|
||||
window.set_focus().unwrap();
|
||||
let _ = TrayIconBuilder::with_id("tray-1")
|
||||
.tooltip("Tauri")
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.menu(&menu1)
|
||||
.menu_on_left_click(false)
|
||||
.on_menu_event(move |app, event| match event.id.as_ref() {
|
||||
"quit" => {
|
||||
app.exit(0);
|
||||
}
|
||||
"remove-tray" => {
|
||||
app.remove_tray_by_id("tray-1");
|
||||
}
|
||||
"toggle" => {
|
||||
if let Some(window) = app.get_window("main") {
|
||||
let new_title = if window.is_visible().unwrap_or_default() {
|
||||
let _ = window.hide();
|
||||
"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);
|
||||
match id.as_str() {
|
||||
"exit_app" => {
|
||||
// exit the app
|
||||
handle.exit(0);
|
||||
}
|
||||
"destroy" => {
|
||||
tray_handle.destroy().unwrap();
|
||||
}
|
||||
"toggle" => {
|
||||
let window = handle.get_window("main").unwrap();
|
||||
let new_title = if window.is_visible().unwrap() {
|
||||
window.hide().unwrap();
|
||||
"Show"
|
||||
} else {
|
||||
window.show().unwrap();
|
||||
"Hide"
|
||||
};
|
||||
item_handle.set_title(new_title).unwrap();
|
||||
}
|
||||
"new" => {
|
||||
WindowBuilder::new(&handle, "new", WindowUrl::App("index.html".into()))
|
||||
.title("Tauri")
|
||||
.build()
|
||||
.unwrap();
|
||||
}
|
||||
"set_title" => {
|
||||
#[cfg(target_os = "macos")]
|
||||
tray_handle.set_title("Tauri").unwrap();
|
||||
}
|
||||
"icon_1" => {
|
||||
#[cfg(target_os = "macos")]
|
||||
tray_handle.set_icon_as_template(true).unwrap();
|
||||
|
||||
tray_handle
|
||||
.set_icon(tauri::Icon::Raw(
|
||||
include_bytes!("../icons/tray_icon_with_transparency.png")
|
||||
.to_vec(),
|
||||
))
|
||||
.unwrap();
|
||||
}
|
||||
"icon_2" => {
|
||||
#[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();
|
||||
}
|
||||
});
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
"new-window" => {
|
||||
let _ = WindowBuilder::new(app, "new", WindowUrl::App("index.html".into()))
|
||||
.title("Tauri")
|
||||
.build();
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
"set-title" => {
|
||||
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||
let _ = tray.set_title(Some("Tauri"));
|
||||
}
|
||||
}
|
||||
i @ "icon-1" | i @ "icon-2" => {
|
||||
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||
let _ = tray.set_icon(Some(tauri::Icon::Raw(if i == "icon-1" {
|
||||
include_bytes!("../icons/icon.ico").to_vec()
|
||||
} else {
|
||||
include_bytes!("../icons/tray_icon_with_transparency.png").to_vec()
|
||||
})));
|
||||
}
|
||||
}
|
||||
"switch-menu" => {
|
||||
let flag = is_menu1.load(Ordering::Relaxed);
|
||||
let (menu, tooltip) = if flag {
|
||||
(menu2.clone(), "Menu 2")
|
||||
} else {
|
||||
(menu1.clone(), "Tauri")
|
||||
};
|
||||
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||
let _ = tray.set_menu(Some(menu));
|
||||
let _ = tray.set_tooltip(Some(tooltip));
|
||||
}
|
||||
is_menu1.store(!flag, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
_ => {}
|
||||
})
|
||||
.on_tray_event(|tray, event| {
|
||||
if event.click_type == ClickType::Left {
|
||||
let app = tray.app_handle();
|
||||
if let Some(window) = app.get_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
})
|
||||
.build(app)
|
||||
.map(|_| ())
|
||||
.build(app);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -124,9 +124,10 @@
|
||||
"security": {
|
||||
"csp": {
|
||||
"default-src": "'self' customprotocol: asset:",
|
||||
"connect-src": "ipc: http://ipc.localhost",
|
||||
"font-src": ["https://fonts.gstatic.com"],
|
||||
"img-src": "'self' asset: https://asset.localhost blob: data:",
|
||||
"style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com"
|
||||
"img-src": "'self' asset: http://asset.localhost blob: data:",
|
||||
"style-src": "'unsafe-inline' 'self' http://fonts.googleapis.com"
|
||||
},
|
||||
"freezePrototype": true,
|
||||
"assetProtocol": {
|
||||
@@ -136,11 +137,6 @@
|
||||
"deny": ["$APPDATA/db/*.stronghold"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"systemTray": {
|
||||
"iconPath": "icons/tray_icon_with_transparency.png",
|
||||
"iconAsTemplate": true,
|
||||
"menuOnLeftClick": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import { writable } from "svelte/store";
|
||||
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 Welcome from "./views/Welcome.svelte";
|
||||
@@ -17,11 +17,15 @@
|
||||
import Updater from "./views/Updater.svelte";
|
||||
import Clipboard from "./views/Clipboard.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 { onMount } from "svelte";
|
||||
import { ask } from "@tauri-apps/plugin-dialog";
|
||||
|
||||
const appWindow = getCurrent();
|
||||
|
||||
if (appWindow.label !== "main") {
|
||||
appWindow.onCloseRequested(async (event) => {
|
||||
const confirmed = await confirm("Are you sure?");
|
||||
@@ -111,7 +115,17 @@
|
||||
component: WebRTC,
|
||||
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];
|
||||
function select(view) {
|
||||
@@ -121,20 +135,20 @@
|
||||
// Window controls
|
||||
let isWindowMaximized;
|
||||
onMount(async () => {
|
||||
const window = getCurrent();
|
||||
isWindowMaximized = await window.isMaximized();
|
||||
window.onResized(async () => {
|
||||
isWindowMaximized = await window.isMaximized();
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
appWindow.onResized(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
});
|
||||
});
|
||||
|
||||
function minimize() {
|
||||
getCurrent().minimize();
|
||||
appWindow.minimize();
|
||||
}
|
||||
|
||||
async function toggleMaximize() {
|
||||
const window = getCurrent();
|
||||
(await window.isMaximized()) ? window.unmaximize() : window.maximize();
|
||||
(await appWindow.isMaximized())
|
||||
? appWindow.unmaximize()
|
||||
: appWindow.maximize();
|
||||
}
|
||||
|
||||
let confirmed_close = false;
|
||||
@@ -147,7 +161,7 @@
|
||||
}
|
||||
);
|
||||
if (confirmed_close) {
|
||||
getCurrent().close();
|
||||
appWindow.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -354,7 +368,7 @@
|
||||
<!-- Sidebar toggle, only visible on small screens -->
|
||||
<div
|
||||
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"
|
||||
>
|
||||
{#if isSideBarOpen}
|
||||
@@ -442,6 +456,7 @@
|
||||
</aside>
|
||||
<main
|
||||
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]">
|
||||
<h1>{selected.label}</h1>
|
||||
|
||||
@@ -39,3 +39,23 @@ code.code-block {
|
||||
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,8 +1,10 @@
|
||||
<script>
|
||||
import { appWindow } from "@tauri-apps/plugin-window";
|
||||
import { getCurrent } from "@tauri-apps/plugin-window";
|
||||
import { invoke } from "@tauri-apps/api/tauri";
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
|
||||
const appWindow = getCurrent();
|
||||
|
||||
export let onMessage;
|
||||
let unlisten;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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";
|
||||
|
||||
let httpMethod = "GET";
|
||||
@@ -8,53 +8,62 @@
|
||||
export let onMessage;
|
||||
|
||||
async function makeHttpRequest() {
|
||||
const client = await getClient().catch((e) => {
|
||||
onMessage(e);
|
||||
throw e;
|
||||
});
|
||||
let method = httpMethod || "GET";
|
||||
|
||||
const options = {
|
||||
url: "http://localhost:3003",
|
||||
method: method || "GET",
|
||||
headers: {},
|
||||
};
|
||||
|
||||
if (
|
||||
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
||||
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
||||
) {
|
||||
options.body = Body.json(JSON.parse(httpBody));
|
||||
} else if (httpBody !== "") {
|
||||
options.body = Body.text(httpBody);
|
||||
let bodyType;
|
||||
|
||||
if (method !== "GET") {
|
||||
options.body = httpBody;
|
||||
|
||||
if (
|
||||
(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
|
||||
let foo = "baz";
|
||||
let bar = "qux";
|
||||
let result = null;
|
||||
let multipart = true;
|
||||
|
||||
async function doPost() {
|
||||
const client = await getClient().catch((e) => {
|
||||
onMessage(e);
|
||||
throw e;
|
||||
});
|
||||
|
||||
result = await client.request({
|
||||
url: "http://localhost:3003",
|
||||
const form = new FormData();
|
||||
form.append("foo", foo);
|
||||
form.append("bar", bar);
|
||||
const response = await tauriFetch("http://localhost:3003", {
|
||||
method: "POST",
|
||||
body: Body.form({
|
||||
foo,
|
||||
bar,
|
||||
}),
|
||||
headers: multipart
|
||||
? { "Content-Type": "multipart/form-data" }
|
||||
: undefined,
|
||||
responseType: ResponseType.Text,
|
||||
body: form,
|
||||
});
|
||||
result = {
|
||||
url: response.url,
|
||||
status: response.status,
|
||||
ok: response.ok,
|
||||
headers: Object.fromEntries(response.headers.entries()),
|
||||
body: await response.text(),
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -87,11 +96,6 @@
|
||||
<input class="input" bind:value={bar} />
|
||||
</div>
|
||||
<br />
|
||||
<label>
|
||||
<input type="checkbox" bind:checked={multipart} />
|
||||
Multipart
|
||||
</label>
|
||||
<br />
|
||||
<br />
|
||||
<button class="btn" type="button" on:click={doPost}> Post it</button>
|
||||
<br />
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<script>
|
||||
import { scan, checkPermissions, requestPermissions, Format, cancel } from "@tauri-apps/plugin-barcode-scanner";
|
||||
|
||||
export let onMessage;
|
||||
|
||||
let scanning = false;
|
||||
let windowed = true;
|
||||
let formats = [Format.QRCode];
|
||||
const supportedFormats = [Format.QRCode, Format.EAN13];
|
||||
|
||||
async function startScan() {
|
||||
let permission = await checkPermissions();
|
||||
if (permission === 'prompt') {
|
||||
permission = await requestPermissions();
|
||||
}
|
||||
if (permission === 'granted') {
|
||||
scanning = true;
|
||||
scan({ windowed, formats })
|
||||
.then((res) => {
|
||||
scanning = false;
|
||||
onMessage(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
scanning = false;
|
||||
onMessage(error);
|
||||
});
|
||||
} else {
|
||||
onMessage('Permission denied')
|
||||
}
|
||||
}
|
||||
|
||||
async function cancelScan() {
|
||||
await cancel();
|
||||
scanning = false;
|
||||
onMessage("cancelled");
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="full-height">
|
||||
<div class:invisible={scanning}>
|
||||
<div>
|
||||
<input type="checkbox" id="scanner-windowed" bind:checked={windowed} />
|
||||
<label for="scanner-windowed">Windowed</label>
|
||||
</div>
|
||||
<div>
|
||||
<select class="input" id="format" multiple bind:value={formats}>
|
||||
{#each supportedFormats as f}
|
||||
<option value={f}>{f}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn" type="button" on:click={startScan}>Scan</button>
|
||||
</div>
|
||||
<div class="scanning full-height" class:invisible={!scanning}>
|
||||
<div class="scanner-background">
|
||||
<!-- this background simulates the camera view -->
|
||||
</div>
|
||||
<div class="container full-height">
|
||||
<div class="barcode-scanner--area--container">
|
||||
<div class="relative">
|
||||
<p>Aim your camera at a QR code</p>
|
||||
<button class="btn" type="button" on:click={cancelScan}>Cancel</button>
|
||||
</div>
|
||||
<div class="square surround-cover">
|
||||
<div class="barcode-scanner--area--outer surround-cover">
|
||||
<div class="barcode-scanner--area--inner" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.invisible {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #fff;
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: 0.3s;
|
||||
}
|
||||
.square:after {
|
||||
content: "";
|
||||
top: 0;
|
||||
display: block;
|
||||
padding-bottom: 100%;
|
||||
}
|
||||
.square > div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.surround-cover {
|
||||
box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.barcode-scanner--area--container {
|
||||
width: 80%;
|
||||
max-width: min(500px, 80vh);
|
||||
margin: auto;
|
||||
}
|
||||
.barcode-scanner--area--outer {
|
||||
display: flex;
|
||||
border-radius: 1em;
|
||||
}
|
||||
.barcode-scanner--area--inner {
|
||||
width: 100%;
|
||||
margin: 1rem;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0px 0px 2px 1px rgb(0 0 0 / 0.5),
|
||||
inset 0px 0px 2px 1px rgb(0 0 0 / 0.5);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.scanner-background {
|
||||
background: linear-gradient(45deg, #673ab7, transparent);
|
||||
background-position: 45% 50%;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
</style>
|
||||
@@ -1,15 +1,19 @@
|
||||
<script>
|
||||
import {
|
||||
appWindow,
|
||||
WebviewWindow,
|
||||
getCurrent,
|
||||
LogicalSize,
|
||||
UserAttentionType,
|
||||
PhysicalSize,
|
||||
PhysicalPosition,
|
||||
Effect,
|
||||
EffectState,
|
||||
Window
|
||||
} from "@tauri-apps/plugin-window";
|
||||
import { open as openDialog } from "@tauri-apps/plugin-dialog";
|
||||
import { open } from "@tauri-apps/plugin-shell";
|
||||
|
||||
const appWindow = getCurrent();
|
||||
|
||||
let selectedWindow = appWindow.label;
|
||||
const windowMap = {
|
||||
[appWindow.label]: appWindow,
|
||||
@@ -57,12 +61,28 @@
|
||||
"rowResize",
|
||||
];
|
||||
|
||||
const windowsEffects = ["mica", "blur", "acrylic"];
|
||||
const isWindows = navigator.appVersion.includes("windows");
|
||||
const isMacOS = navigator.appVersion.includes("macos");
|
||||
let effectOptions = isWindows
|
||||
? windowsEffects
|
||||
: Object.keys(Effect)
|
||||
.map((effect) => Effect[effect])
|
||||
.filter((e) => !windowsEffects.includes(e));
|
||||
const effectStateOptions = Object.keys(EffectState).map(
|
||||
(state) => EffectState[state]
|
||||
);
|
||||
|
||||
export let onMessage;
|
||||
const mainEl = document.querySelector("main");
|
||||
|
||||
let newWindowLabel;
|
||||
|
||||
let urlValue = "https://tauri.app";
|
||||
let resizable = true;
|
||||
let maximizable = true;
|
||||
let minimizable = true;
|
||||
let closable = true;
|
||||
let maximized = false;
|
||||
let decorations = true;
|
||||
let alwaysOnTop = false;
|
||||
@@ -91,6 +111,12 @@
|
||||
let cursorIgnoreEvents = false;
|
||||
let windowTitle = "Awesome Tauri Example!";
|
||||
|
||||
let effects = [];
|
||||
let selectedEffect;
|
||||
let effectState;
|
||||
let effectRadius;
|
||||
let effectR, effectG, effectB, effectA;
|
||||
|
||||
function openUrl() {
|
||||
open(urlValue);
|
||||
}
|
||||
@@ -122,7 +148,7 @@
|
||||
function createWindow() {
|
||||
if (!newWindowLabel) return;
|
||||
|
||||
const webview = new WebviewWindow(newWindowLabel);
|
||||
const webview = new Window(newWindowLabel);
|
||||
windowMap[newWindowLabel] = webview;
|
||||
webview.once("tauri://error", function () {
|
||||
onMessage("Error creating new webview");
|
||||
@@ -172,12 +198,47 @@
|
||||
await windowMap[selectedWindow].requestUserAttention(null);
|
||||
}
|
||||
|
||||
async function addEffect() {
|
||||
if (!effects.includes(selectedEffect)) {
|
||||
effects = [...effects, selectedEffect];
|
||||
}
|
||||
|
||||
const payload = {
|
||||
effects,
|
||||
state: effectState,
|
||||
radius: effectRadius,
|
||||
};
|
||||
if (
|
||||
Number.isInteger(effectR) &&
|
||||
Number.isInteger(effectG) &&
|
||||
Number.isInteger(effectB) &&
|
||||
Number.isInteger(effectA)
|
||||
) {
|
||||
payload.color = [effectR, effectG, effectB, effectA];
|
||||
}
|
||||
|
||||
mainEl.classList.remove("bg-primary");
|
||||
mainEl.classList.remove("dark:bg-darkPrimary");
|
||||
await windowMap[selectedWindow].clearEffects();
|
||||
await windowMap[selectedWindow].setEffects(payload);
|
||||
}
|
||||
|
||||
async function clearEffects() {
|
||||
effects = [];
|
||||
await windowMap[selectedWindow].clearEffects();
|
||||
mainEl.classList.add("bg-primary");
|
||||
mainEl.classList.add("dark:bg-darkPrimary");
|
||||
}
|
||||
|
||||
$: {
|
||||
windowMap[selectedWindow];
|
||||
loadWindowPosition();
|
||||
loadWindowSize();
|
||||
}
|
||||
$: windowMap[selectedWindow]?.setResizable(resizable);
|
||||
$: windowMap[selectedWindow]?.setMaximizable(maximizable);
|
||||
$: windowMap[selectedWindow]?.setMinimizable(minimizable);
|
||||
$: windowMap[selectedWindow]?.setClosable(closable);
|
||||
$: maximized
|
||||
? windowMap[selectedWindow]?.maximize()
|
||||
: windowMap[selectedWindow]?.unmaximize();
|
||||
@@ -280,6 +341,18 @@
|
||||
Resizable
|
||||
<input type="checkbox" bind:checked={resizable} />
|
||||
</label>
|
||||
<label>
|
||||
Maximizable
|
||||
<input type="checkbox" bind:checked={maximizable} />
|
||||
</label>
|
||||
<label>
|
||||
Minimizable
|
||||
<input type="checkbox" bind:checked={minimizable} />
|
||||
</label>
|
||||
<label>
|
||||
Closable
|
||||
<input type="checkbox" bind:checked={closable} />
|
||||
</label>
|
||||
<label>
|
||||
Has decorations
|
||||
<input type="checkbox" bind:checked={decorations} />
|
||||
@@ -455,5 +528,88 @@
|
||||
<button class="btn" id="open-url"> Open URL </button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
{#if isWindows || isMacOS}
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class="flex">
|
||||
<label>
|
||||
Effect
|
||||
<select class="input" bind:value={selectedEffect}>
|
||||
{#each effectOptions as effect}
|
||||
<option value={effect}>{effect}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
State
|
||||
<select class="input" bind:value={effectState}>
|
||||
{#each effectStateOptions as state}
|
||||
<option value={state}>{state}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
Radius
|
||||
<input class="input" type="number" bind:value={effectRadius} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<label>
|
||||
Color
|
||||
<div class="flex">
|
||||
<input
|
||||
style="max-width: 120px;"
|
||||
class="input"
|
||||
type="number"
|
||||
placeholder="R"
|
||||
bind:value={effectR}
|
||||
/>
|
||||
<input
|
||||
style="max-width: 120px;"
|
||||
class="input"
|
||||
type="number"
|
||||
placeholder="G"
|
||||
bind:value={effectG}
|
||||
/>
|
||||
<input
|
||||
style="max-width: 120px;"
|
||||
class="input"
|
||||
type="number"
|
||||
placeholder="B"
|
||||
bind:value={effectB}
|
||||
/>
|
||||
<input
|
||||
style="max-width: 120px;"
|
||||
class="input"
|
||||
type="number"
|
||||
placeholder="A"
|
||||
bind:value={effectA}
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<button class="btn" style="width: 80px;" on:click={addEffect}
|
||||
>Add</button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<div>
|
||||
Applied effects: {effects.length ? effects.join(",") : "None"}
|
||||
</div>
|
||||
|
||||
<button class="btn" style="width: 80px;" on:click={clearEffects}
|
||||
>Clear</button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import {
|
||||
defineConfig,
|
||||
presetIcons,
|
||||
presetUno,
|
||||
extractorSvelte,
|
||||
presetWebFonts,
|
||||
} from "unocss";
|
||||
import { defineConfig, presetIcons, presetUno, presetWebFonts } from "unocss";
|
||||
import extractorSvelte from "@unocss/extractor-svelte";
|
||||
|
||||
export default defineConfig({
|
||||
theme: {
|
||||
|
||||
@@ -6,28 +6,32 @@
|
||||
"scripts": {
|
||||
"build": "pnpm run -r --parallel --filter !plugins-workspace --filter !\"./plugins/*/examples/**\" --filter !\"./examples/*\" build",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"format-check": "prettier --check ."
|
||||
"format": "prettier --write \"./**/*.{cjs,mjs,js,jsx,mts,ts,tsx,html,css,json}\" --ignore-path .prettierignore",
|
||||
"format-check": "prettier --check \"./**/*.{cjs,mjs,js,jsx,mts,ts,tsx,html,css,json}\" --ignore-path .prettierignore"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^15.0.2",
|
||||
"@rollup/plugin-terser": "^0.4.1",
|
||||
"@rollup/plugin-typescript": "^11.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
||||
"@typescript-eslint/parser": "^5.58.0",
|
||||
"covector": "^0.9.0",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-config-standard-with-typescript": "^34.0.1",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-n": "^16.0.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-security": "^1.7.1",
|
||||
"prettier": "^2.8.7",
|
||||
"rollup": "^3.20.4",
|
||||
"typescript": "^5.0.4"
|
||||
"@rollup/plugin-node-resolve": "15.1.0",
|
||||
"@rollup/plugin-terser": "0.4.3",
|
||||
"@rollup/plugin-typescript": "11.1.2",
|
||||
"@typescript-eslint/eslint-plugin": "6.1.0",
|
||||
"@typescript-eslint/parser": "6.1.0",
|
||||
"covector": "^0.10.0",
|
||||
"eslint": "8.45.0",
|
||||
"eslint-config-prettier": "8.8.0",
|
||||
"eslint-config-standard-with-typescript": "36.1.0",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-n": "16.0.1",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-security": "1.7.1",
|
||||
"prettier": "3.0.0",
|
||||
"rollup": "3.26.3",
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"resolutions": {
|
||||
"semver": ">=7.5.2",
|
||||
"optionator": ">=0.9.3"
|
||||
},
|
||||
"engines": {
|
||||
"pnpm": ">=7.24.2"
|
||||
"pnpm": ">=7.33.1"
|
||||
}
|
||||
}
|
||||
|
||||