@tauri-apps/cli 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/Cargo.toml +3 -2
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/main.js +3 -1
- package/package.json +13 -13
- package/schema.json +170 -14
- package/src/lib.rs +8 -1
- package/tauri.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## \[1.0.3]
|
|
4
|
+
|
|
5
|
+
- Changed the app template to not set the default app menu as it is now set automatically on macOS which is the platform that needs a menu to function properly.
|
|
6
|
+
- [91055883](https://www.github.com/tauri-apps/tauri/commit/9105588373cc8401bd9ad79bdef26f509b2d76b7) feat: add implicit default menu for macOS only, closes [#4551](https://www.github.com/tauri-apps/tauri/pull/4551) ([#4570](https://www.github.com/tauri-apps/tauri/pull/4570)) on 2022-07-04
|
|
7
|
+
- Improved bundle identifier validation showing the exact source of the configuration value.
|
|
8
|
+
- [8e3e7fc6](https://www.github.com/tauri-apps/tauri/commit/8e3e7fc64641afc7a6833bc93205e6f525562545) feat(cli): improve bundle identifier validation, closes [#4589](https://www.github.com/tauri-apps/tauri/pull/4589) ([#4596](https://www.github.com/tauri-apps/tauri/pull/4596)) on 2022-07-05
|
|
9
|
+
- Improve configuration deserialization error messages.
|
|
10
|
+
- [9170c920](https://www.github.com/tauri-apps/tauri/commit/9170c9207044fa561535f624916dfdbaa41ff79d) feat(core): improve config deserialization error messages ([#4607](https://www.github.com/tauri-apps/tauri/pull/4607)) on 2022-07-06
|
|
11
|
+
- Revert the `run` command to run in a separate thread.
|
|
12
|
+
- [f65eb4f8](https://www.github.com/tauri-apps/tauri/commit/f65eb4f84d8e511cd30d01d20a8223a297f7e584) fix(cli.js): revert `run` command to be nonblocking on 2022-07-04
|
|
13
|
+
- Skip the static link of the `vcruntime140.dll` if the `STATIC_VCRUNTIME` environment variable is set to `false`.
|
|
14
|
+
- [2e61abaa](https://www.github.com/tauri-apps/tauri/commit/2e61abaa9ae5d7a41ca1fa6505b5d6c368625ce5) feat(cli): allow dynamic link vcruntime, closes [#4565](https://www.github.com/tauri-apps/tauri/pull/4565) ([#4601](https://www.github.com/tauri-apps/tauri/pull/4601)) on 2022-07-06
|
|
15
|
+
- The `TAURI_CONFIG` environment variable now represents the configuration to be merged instead of the entire JSON.
|
|
16
|
+
- [fa028ebf](https://www.github.com/tauri-apps/tauri/commit/fa028ebf3c8ca7b43a70d283a01dbea86217594f) refactor: do not pass entire config from CLI to core, send patch instead ([#4598](https://www.github.com/tauri-apps/tauri/pull/4598)) on 2022-07-06
|
|
17
|
+
- Watch for Cargo workspace members in the `dev` file watcher.
|
|
18
|
+
- [dbb8c87b](https://www.github.com/tauri-apps/tauri/commit/dbb8c87b96dec9942b1bf877b29bafb8246514d4) feat(cli): watch Cargo workspaces in the dev command, closes [#4222](https://www.github.com/tauri-apps/tauri/pull/4222) ([#4572](https://www.github.com/tauri-apps/tauri/pull/4572)) on 2022-07-03
|
|
19
|
+
|
|
20
|
+
## \[1.0.2]
|
|
21
|
+
|
|
22
|
+
- Fixes a crash on the `signer sign` command.
|
|
23
|
+
- [8e808fec](https://www.github.com/tauri-apps/tauri/commit/8e808fece95f2e506acf2c446d37b9913fd67d50) fix(cli.rs): conflicts_with arg doesn't exist closes ([#4538](https://www.github.com/tauri-apps/tauri/pull/4538)) on 2022-06-30
|
|
24
|
+
|
|
25
|
+
## \[1.0.1]
|
|
26
|
+
|
|
27
|
+
- No longer adds the `pkg-config` dependency to `.deb` packages when the `systemTray` is used.
|
|
28
|
+
This only works with recent versions of `libappindicator-sys` (including https://github.com/tauri-apps/libappindicator-rs/pull/38),
|
|
29
|
+
so a `cargo update` may be necessary if you create `.deb` bundles and use the tray feature.
|
|
30
|
+
- [0e6edeb1](https://www.github.com/tauri-apps/tauri/commit/0e6edeb14f379af1e02a7cebb4e3a5c9e87ebf7f) fix(cli): Don't add `pkg-config` to `deb` ([#4508](https://www.github.com/tauri-apps/tauri/pull/4508)) on 2022-06-29
|
|
31
|
+
- AppImage bundling will now prefer bundling correctly named appincidator library (including `.1` version suffix). With a symlink for compatibility with the old naming.
|
|
32
|
+
- [bf45ca1d](https://www.github.com/tauri-apps/tauri/commit/bf45ca1df6691c05bdf72c5716cc01e89a7791d4) fix(cli,bundler): prefer AppImage libraries with ABI version ([#4505](https://www.github.com/tauri-apps/tauri/pull/4505)) on 2022-06-29
|
|
33
|
+
- Improve error message when `cargo` is not installed.
|
|
34
|
+
- [e0e5f772](https://www.github.com/tauri-apps/tauri/commit/e0e5f772430f6349ec99ba891e601331e376e3c7) feat(cli): improve `cargo not found` error message, closes [#4428](https://www.github.com/tauri-apps/tauri/pull/4428) ([#4430](https://www.github.com/tauri-apps/tauri/pull/4430)) on 2022-06-21
|
|
35
|
+
- The app template now only sets the default menu on macOS.
|
|
36
|
+
- [5105b428](https://www.github.com/tauri-apps/tauri/commit/5105b428c4726b2179cd4b3244350d1a1ee73734) feat(cli): change app template to only set default menu on macOS ([#4518](https://www.github.com/tauri-apps/tauri/pull/4518)) on 2022-06-29
|
|
37
|
+
- Warn if updater is enabled but not in the bundle target list.
|
|
38
|
+
- [31c15cd2](https://www.github.com/tauri-apps/tauri/commit/31c15cd2bd94dbe39fb94982a15cbe02ac5d8925) docs(config): enhance documentation for bundle targets, closes [#3251](https://www.github.com/tauri-apps/tauri/pull/3251) ([#4418](https://www.github.com/tauri-apps/tauri/pull/4418)) on 2022-06-21
|
|
39
|
+
- Check if target exists and is installed on dev and build commands.
|
|
40
|
+
- [13b8a240](https://www.github.com/tauri-apps/tauri/commit/13b8a2403d1353a8c3a643fbc6b6e862af68376e) feat(cli): validate target argument ([#4458](https://www.github.com/tauri-apps/tauri/pull/4458)) on 2022-06-24
|
|
41
|
+
- Fixes the covector configuration on the plugin templates.
|
|
42
|
+
- [b8a64d01](https://www.github.com/tauri-apps/tauri/commit/b8a64d01bab11f955b7bbdf323d0afa1a3db4b64) fix(cli): add prepublish scripts to the plugin templates on 2022-06-19
|
|
43
|
+
- Set the binary name to the product name in development.
|
|
44
|
+
- [b025b9f5](https://www.github.com/tauri-apps/tauri/commit/b025b9f581ac1a6ae0a26789c2be1e9928fb0282) refactor(cli): set binary name on dev ([#4447](https://www.github.com/tauri-apps/tauri/pull/4447)) on 2022-06-23
|
|
45
|
+
- Allow registering a `.gitignore` file to skip watching some project files and directories via the `TAURI_DEV_WATCHER_IGNORE_FILE` environment variable.
|
|
46
|
+
- [83186dd8](https://www.github.com/tauri-apps/tauri/commit/83186dd89768407984db35fb67c3cc51f50ea8f5) Read extra ignore file for dev watcher, closes [#4406](https://www.github.com/tauri-apps/tauri/pull/4406) ([#4409](https://www.github.com/tauri-apps/tauri/pull/4409)) on 2022-06-20
|
|
47
|
+
- Fix shebang for `kill-children.sh`.
|
|
48
|
+
- [35dd51db](https://www.github.com/tauri-apps/tauri/commit/35dd51db6826ec1eed7b90082b9eb6b2a699b627) fix(cli): add shebang for kill-children.sh, closes [#4262](https://www.github.com/tauri-apps/tauri/pull/4262) ([#4416](https://www.github.com/tauri-apps/tauri/pull/4416)) on 2022-06-22
|
|
49
|
+
- Update plugin templates to use newer `tauri-apps/create-pull-request` GitHub action.
|
|
50
|
+
- [07f90795](https://www.github.com/tauri-apps/tauri/commit/07f9079532a42f3517d96faeaf46cad6176b31ac) chore(cli): update plugin template tauri-apps/create-pull-request on 2022-06-19
|
|
51
|
+
- Use UNIX path separator on the init `$schema` field.
|
|
52
|
+
- [01053045](https://www.github.com/tauri-apps/tauri/commit/010530459ef62c48eed68ca965f2688accabcf69) chore(cli): use unix path separator on $schema ([#4384](https://www.github.com/tauri-apps/tauri/pull/4384)) on 2022-06-19
|
|
53
|
+
- The `info` command now can check the Cargo lockfile on workspaces.
|
|
54
|
+
- [12f65219](https://www.github.com/tauri-apps/tauri/commit/12f65219ea75a51ebd38659ddce1563e015a036c) fix(cli): read lockfile from workspace on the info command, closes [#4232](https://www.github.com/tauri-apps/tauri/pull/4232) ([#4423](https://www.github.com/tauri-apps/tauri/pull/4423)) on 2022-06-21
|
|
55
|
+
- Preserve the `Cargo.toml` formatting when the features array is not changed.
|
|
56
|
+
- [6650e5d6](https://www.github.com/tauri-apps/tauri/commit/6650e5d6720c215530ca1fdccd19bd2948dd6ca3) fix(cli): preserve Cargo manifest formatting when possible ([#4431](https://www.github.com/tauri-apps/tauri/pull/4431)) on 2022-06-21
|
|
57
|
+
- Change the updater signature metadata to include the file name instead of its full path.
|
|
58
|
+
- [094b3eb3](https://www.github.com/tauri-apps/tauri/commit/094b3eb352bcf5de28414015e7c44290d619ea8c) fix(cli): file name instead of path on updater sig comment, closes [#4467](https://www.github.com/tauri-apps/tauri/pull/4467) ([#4484](https://www.github.com/tauri-apps/tauri/pull/4484)) on 2022-06-27
|
|
59
|
+
- Validate bundle identifier as it must only contain alphanumeric characters, hyphens and periods.
|
|
60
|
+
- [0674a801](https://www.github.com/tauri-apps/tauri/commit/0674a80129d7c31bc93257849afc0a5069129fed) fix: assert config.bundle.identifier to be only alphanumeric, hyphens or dots. closes [#4359](https://www.github.com/tauri-apps/tauri/pull/4359) ([#4363](https://www.github.com/tauri-apps/tauri/pull/4363)) on 2022-06-17
|
|
61
|
+
|
|
3
62
|
## \[1.0.0]
|
|
4
63
|
|
|
5
64
|
- Upgrade to `stable`!
|
package/Cargo.toml
CHANGED
|
@@ -8,9 +8,10 @@ crate-type = ["cdylib"]
|
|
|
8
8
|
|
|
9
9
|
[dependencies]
|
|
10
10
|
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
|
|
11
|
-
napi = { version = "2.
|
|
12
|
-
napi-derive = "2.
|
|
11
|
+
napi = { version = "2.6", default-features = false, features = ["napi4"] }
|
|
12
|
+
napi-derive = "2.6"
|
|
13
13
|
tauri-cli = { path = ".." }
|
|
14
|
+
log = "0.4.17"
|
|
14
15
|
|
|
15
16
|
[build-dependencies]
|
|
16
17
|
napi-build = "2.0"
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { run } = require('./index')
|
|
1
|
+
const { run, logError } = require('./index')
|
|
2
2
|
|
|
3
3
|
module.exports.run = (args, binName) => {
|
|
4
4
|
return new Promise((resolve, reject) => {
|
|
@@ -11,3 +11,5 @@ module.exports.run = (args, binName) => {
|
|
|
11
11
|
})
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
module.exports.logError = logError
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Command line interface for building Tauri apps",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "opencollective",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@napi-rs/cli": "2.10.
|
|
40
|
+
"@napi-rs/cli": "2.10.1",
|
|
41
41
|
"cross-env": "7.0.3",
|
|
42
42
|
"cross-spawn": "7.0.3",
|
|
43
43
|
"fs-extra": "10.1.0",
|
|
44
|
-
"jest": "28.1.
|
|
44
|
+
"jest": "28.1.2",
|
|
45
45
|
"jest-transform-toml": "1.0.0",
|
|
46
|
-
"prettier": "2.7.
|
|
46
|
+
"prettier": "2.7.1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">= 10"
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"format:check": "prettier --check ./package.json ./tauri.js"
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {
|
|
67
|
-
"@tauri-apps/cli-win32-x64-msvc": "1.0.
|
|
68
|
-
"@tauri-apps/cli-darwin-x64": "1.0.
|
|
69
|
-
"@tauri-apps/cli-linux-x64-gnu": "1.0.
|
|
70
|
-
"@tauri-apps/cli-darwin-arm64": "1.0.
|
|
71
|
-
"@tauri-apps/cli-linux-arm64-gnu": "1.0.
|
|
72
|
-
"@tauri-apps/cli-linux-arm64-musl": "1.0.
|
|
73
|
-
"@tauri-apps/cli-linux-arm-gnueabihf": "1.0.
|
|
74
|
-
"@tauri-apps/cli-linux-x64-musl": "1.0.
|
|
75
|
-
"@tauri-apps/cli-win32-ia32-msvc": "1.0.
|
|
67
|
+
"@tauri-apps/cli-win32-x64-msvc": "1.0.3",
|
|
68
|
+
"@tauri-apps/cli-darwin-x64": "1.0.3",
|
|
69
|
+
"@tauri-apps/cli-linux-x64-gnu": "1.0.3",
|
|
70
|
+
"@tauri-apps/cli-darwin-arm64": "1.0.3",
|
|
71
|
+
"@tauri-apps/cli-linux-arm64-gnu": "1.0.3",
|
|
72
|
+
"@tauri-apps/cli-linux-arm64-musl": "1.0.3",
|
|
73
|
+
"@tauri-apps/cli-linux-arm-gnueabihf": "1.0.3",
|
|
74
|
+
"@tauri-apps/cli-linux-x64-musl": "1.0.3",
|
|
75
|
+
"@tauri-apps/cli-win32-ia32-msvc": "1.0.3"
|
|
76
76
|
}
|
|
77
77
|
}
|
package/schema.json
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"macOS": {
|
|
130
130
|
"minimumSystemVersion": "10.13"
|
|
131
131
|
},
|
|
132
|
+
"targets": "all",
|
|
132
133
|
"windows": {
|
|
133
134
|
"allowDowngrades": true,
|
|
134
135
|
"certificateThumbprint": null,
|
|
@@ -136,6 +137,10 @@
|
|
|
136
137
|
"timestampUrl": null,
|
|
137
138
|
"tsp": false,
|
|
138
139
|
"webviewFixedRuntimePath": null,
|
|
140
|
+
"webviewInstallMode": {
|
|
141
|
+
"silent": true,
|
|
142
|
+
"type": "downloadBootstrapper"
|
|
143
|
+
},
|
|
139
144
|
"wix": null
|
|
140
145
|
}
|
|
141
146
|
},
|
|
@@ -259,6 +264,7 @@
|
|
|
259
264
|
"macOS": {
|
|
260
265
|
"minimumSystemVersion": "10.13"
|
|
261
266
|
},
|
|
267
|
+
"targets": "all",
|
|
262
268
|
"windows": {
|
|
263
269
|
"allowDowngrades": true,
|
|
264
270
|
"certificateThumbprint": null,
|
|
@@ -266,6 +272,10 @@
|
|
|
266
272
|
"timestampUrl": null,
|
|
267
273
|
"tsp": false,
|
|
268
274
|
"webviewFixedRuntimePath": null,
|
|
275
|
+
"webviewInstallMode": {
|
|
276
|
+
"silent": true,
|
|
277
|
+
"type": "downloadBootstrapper"
|
|
278
|
+
},
|
|
269
279
|
"wix": null
|
|
270
280
|
}
|
|
271
281
|
},
|
|
@@ -607,7 +617,7 @@
|
|
|
607
617
|
"type": "boolean"
|
|
608
618
|
},
|
|
609
619
|
"theme": {
|
|
610
|
-
"description": "The initial window theme. Defaults to the system theme. Only implemented on Windows.",
|
|
620
|
+
"description": "The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.",
|
|
611
621
|
"anyOf": [
|
|
612
622
|
{
|
|
613
623
|
"$ref": "#/definitions/Theme"
|
|
@@ -896,23 +906,21 @@
|
|
|
896
906
|
],
|
|
897
907
|
"properties": {
|
|
898
908
|
"active": {
|
|
899
|
-
"description": "Whether
|
|
909
|
+
"description": "Whether Tauri should bundle your application or just output the executable.",
|
|
900
910
|
"default": false,
|
|
901
911
|
"type": "boolean"
|
|
902
912
|
},
|
|
903
913
|
"targets": {
|
|
904
|
-
"description": "The bundle targets, currently supports [\"deb\", \"
|
|
905
|
-
"
|
|
914
|
+
"description": "The bundle targets, currently supports [\"deb\", \"appimage\", \"msi\", \"app\", \"dmg\", \"updater\"] or \"all\".",
|
|
915
|
+
"default": "all",
|
|
916
|
+
"allOf": [
|
|
906
917
|
{
|
|
907
918
|
"$ref": "#/definitions/BundleTarget"
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
"type": "null"
|
|
911
919
|
}
|
|
912
920
|
]
|
|
913
921
|
},
|
|
914
922
|
"identifier": {
|
|
915
|
-
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory.",
|
|
923
|
+
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).",
|
|
916
924
|
"type": "string"
|
|
917
925
|
},
|
|
918
926
|
"icon": {
|
|
@@ -1013,6 +1021,10 @@
|
|
|
1013
1021
|
"timestampUrl": null,
|
|
1014
1022
|
"tsp": false,
|
|
1015
1023
|
"webviewFixedRuntimePath": null,
|
|
1024
|
+
"webviewInstallMode": {
|
|
1025
|
+
"silent": true,
|
|
1026
|
+
"type": "downloadBootstrapper"
|
|
1027
|
+
},
|
|
1016
1028
|
"wix": null
|
|
1017
1029
|
},
|
|
1018
1030
|
"allOf": [
|
|
@@ -1025,21 +1037,43 @@
|
|
|
1025
1037
|
"additionalProperties": false
|
|
1026
1038
|
},
|
|
1027
1039
|
"BundleTarget": {
|
|
1028
|
-
"description": "Targets to bundle.",
|
|
1040
|
+
"description": "Targets to bundle. Each value is case insensitive.",
|
|
1029
1041
|
"anyOf": [
|
|
1042
|
+
{
|
|
1043
|
+
"description": "Bundle all targets.",
|
|
1044
|
+
"enum": [
|
|
1045
|
+
"all"
|
|
1046
|
+
]
|
|
1047
|
+
},
|
|
1030
1048
|
{
|
|
1031
1049
|
"description": "A list of bundle targets.",
|
|
1032
1050
|
"type": "array",
|
|
1033
1051
|
"items": {
|
|
1034
|
-
"
|
|
1052
|
+
"$ref": "#/definitions/BundleType"
|
|
1035
1053
|
}
|
|
1036
1054
|
},
|
|
1037
1055
|
{
|
|
1038
1056
|
"description": "A single bundle target.",
|
|
1039
|
-
"
|
|
1057
|
+
"allOf": [
|
|
1058
|
+
{
|
|
1059
|
+
"$ref": "#/definitions/BundleType"
|
|
1060
|
+
}
|
|
1061
|
+
]
|
|
1040
1062
|
}
|
|
1041
1063
|
]
|
|
1042
1064
|
},
|
|
1065
|
+
"BundleType": {
|
|
1066
|
+
"description": "A bundle referenced by tauri-bundler.",
|
|
1067
|
+
"type": "string",
|
|
1068
|
+
"enum": [
|
|
1069
|
+
"deb",
|
|
1070
|
+
"appimage",
|
|
1071
|
+
"msi",
|
|
1072
|
+
"app",
|
|
1073
|
+
"dmg",
|
|
1074
|
+
"updater"
|
|
1075
|
+
]
|
|
1076
|
+
},
|
|
1043
1077
|
"AppImageConfig": {
|
|
1044
1078
|
"description": "Configuration for AppImage bundles.",
|
|
1045
1079
|
"type": "object",
|
|
@@ -1167,8 +1201,20 @@
|
|
|
1167
1201
|
"default": false,
|
|
1168
1202
|
"type": "boolean"
|
|
1169
1203
|
},
|
|
1204
|
+
"webviewInstallMode": {
|
|
1205
|
+
"description": "The installation mode for the Webview2 runtime.",
|
|
1206
|
+
"default": {
|
|
1207
|
+
"silent": true,
|
|
1208
|
+
"type": "downloadBootstrapper"
|
|
1209
|
+
},
|
|
1210
|
+
"allOf": [
|
|
1211
|
+
{
|
|
1212
|
+
"$ref": "#/definitions/WebviewInstallMode"
|
|
1213
|
+
}
|
|
1214
|
+
]
|
|
1215
|
+
},
|
|
1170
1216
|
"webviewFixedRuntimePath": {
|
|
1171
|
-
"description": "Path to the webview fixed runtime to use.\n\nThe fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section). The `.cab` file must be extracted to a folder and this folder path must be defined on this field.",
|
|
1217
|
+
"description": "Path to the webview fixed runtime to use. Overwrites [`Self::webview_install_mode`] if set.\n\nWill be removed in v2, prefer the [`Self::webview_install_mode`] option.\n\nThe fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section). The `.cab` file must be extracted to a folder and this folder path must be defined on this field.",
|
|
1172
1218
|
"type": [
|
|
1173
1219
|
"string",
|
|
1174
1220
|
"null"
|
|
@@ -1193,6 +1239,111 @@
|
|
|
1193
1239
|
},
|
|
1194
1240
|
"additionalProperties": false
|
|
1195
1241
|
},
|
|
1242
|
+
"WebviewInstallMode": {
|
|
1243
|
+
"description": "Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see <https://tauri.app/v1/guides/building/windows>.",
|
|
1244
|
+
"oneOf": [
|
|
1245
|
+
{
|
|
1246
|
+
"description": "Do not install the Webview2 as part of the Windows Installer.",
|
|
1247
|
+
"type": "object",
|
|
1248
|
+
"required": [
|
|
1249
|
+
"type"
|
|
1250
|
+
],
|
|
1251
|
+
"properties": {
|
|
1252
|
+
"type": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"enum": [
|
|
1255
|
+
"skip"
|
|
1256
|
+
]
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
"additionalProperties": false
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"description": "Download the bootstrapper and run it. Requires internet connection. Results in a smaller installer size, but is not recommended on Windows 7.",
|
|
1263
|
+
"type": "object",
|
|
1264
|
+
"required": [
|
|
1265
|
+
"type"
|
|
1266
|
+
],
|
|
1267
|
+
"properties": {
|
|
1268
|
+
"type": {
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"enum": [
|
|
1271
|
+
"downloadBootstrapper"
|
|
1272
|
+
]
|
|
1273
|
+
},
|
|
1274
|
+
"silent": {
|
|
1275
|
+
"description": "Instructs the installer to run the bootstrapper in silent mode. Defaults to `true`.",
|
|
1276
|
+
"default": true,
|
|
1277
|
+
"type": "boolean"
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"additionalProperties": false
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"description": "Embed the bootstrapper and run it. Requires internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.",
|
|
1284
|
+
"type": "object",
|
|
1285
|
+
"required": [
|
|
1286
|
+
"type"
|
|
1287
|
+
],
|
|
1288
|
+
"properties": {
|
|
1289
|
+
"type": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"enum": [
|
|
1292
|
+
"embedBootstrapper"
|
|
1293
|
+
]
|
|
1294
|
+
},
|
|
1295
|
+
"silent": {
|
|
1296
|
+
"description": "Instructs the installer to run the bootstrapper in silent mode. Defaults to `true`.",
|
|
1297
|
+
"default": true,
|
|
1298
|
+
"type": "boolean"
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
"additionalProperties": false
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"description": "Embed the offline installer and run it. Does not require internet connection. Increases the installer size by around 127MB.",
|
|
1305
|
+
"type": "object",
|
|
1306
|
+
"required": [
|
|
1307
|
+
"type"
|
|
1308
|
+
],
|
|
1309
|
+
"properties": {
|
|
1310
|
+
"type": {
|
|
1311
|
+
"type": "string",
|
|
1312
|
+
"enum": [
|
|
1313
|
+
"offlineInstaller"
|
|
1314
|
+
]
|
|
1315
|
+
},
|
|
1316
|
+
"silent": {
|
|
1317
|
+
"description": "Instructs the installer to run the installer in silent mode. Defaults to `true`.",
|
|
1318
|
+
"default": true,
|
|
1319
|
+
"type": "boolean"
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
"additionalProperties": false
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"description": "Embed a fixed webview2 version and use it at runtime. Increases the installer size by around 180MB.",
|
|
1326
|
+
"type": "object",
|
|
1327
|
+
"required": [
|
|
1328
|
+
"path",
|
|
1329
|
+
"type"
|
|
1330
|
+
],
|
|
1331
|
+
"properties": {
|
|
1332
|
+
"type": {
|
|
1333
|
+
"type": "string",
|
|
1334
|
+
"enum": [
|
|
1335
|
+
"fixedRuntime"
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
"path": {
|
|
1339
|
+
"description": "The path to the fixed runtime to use.\n\nThe fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section). The `.cab` file must be extracted to a folder and this folder path must be defined on this field.",
|
|
1340
|
+
"type": "string"
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
"additionalProperties": false
|
|
1344
|
+
}
|
|
1345
|
+
]
|
|
1346
|
+
},
|
|
1196
1347
|
"WixConfig": {
|
|
1197
1348
|
"description": "Configuration for the MSI bundle using WiX.",
|
|
1198
1349
|
"type": "object",
|
|
@@ -1262,7 +1413,7 @@
|
|
|
1262
1413
|
}
|
|
1263
1414
|
},
|
|
1264
1415
|
"skipWebviewInstall": {
|
|
1265
|
-
"description": "Disables the Webview2 runtime installation after app install.",
|
|
1416
|
+
"description": "Disables the Webview2 runtime installation after app install.\n\nWill be removed in v2, prefer the [`WindowsConfig::webview_install_mode`] option.",
|
|
1266
1417
|
"default": false,
|
|
1267
1418
|
"type": "boolean"
|
|
1268
1419
|
},
|
|
@@ -2258,6 +2409,11 @@
|
|
|
2258
2409
|
"description": "A Boolean value that determines whether the image represents a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc) image on macOS.",
|
|
2259
2410
|
"default": false,
|
|
2260
2411
|
"type": "boolean"
|
|
2412
|
+
},
|
|
2413
|
+
"menuOnLeftClick": {
|
|
2414
|
+
"description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click on macOS.",
|
|
2415
|
+
"default": true,
|
|
2416
|
+
"type": "boolean"
|
|
2261
2417
|
}
|
|
2262
2418
|
},
|
|
2263
2419
|
"additionalProperties": false
|
|
@@ -2349,4 +2505,4 @@
|
|
|
2349
2505
|
"additionalProperties": true
|
|
2350
2506
|
}
|
|
2351
2507
|
}
|
|
2352
|
-
}
|
|
2508
|
+
}
|
package/src/lib.rs
CHANGED
|
@@ -12,7 +12,9 @@ pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) ->
|
|
|
12
12
|
let function: ThreadsafeFunction<bool, ErrorStrategy::CalleeHandled> = callback
|
|
13
13
|
.create_threadsafe_function(0, |ctx| ctx.env.get_boolean(ctx.value).map(|v| vec![v]))?;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// we need to run in a separate thread so Node.js (e.g. vue-cli-plugin-tauri) consumers
|
|
16
|
+
// can do work while `tauri dev` is running.
|
|
17
|
+
std::thread::spawn(move || match tauri_cli::try_run(args, bin_name) {
|
|
16
18
|
Ok(_) => function.call(Ok(true), ThreadsafeFunctionCallMode::Blocking),
|
|
17
19
|
Err(e) => function.call(
|
|
18
20
|
Err(Error::new(Status::GenericFailure, format!("{:#}", e))),
|
|
@@ -22,3 +24,8 @@ pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) ->
|
|
|
22
24
|
|
|
23
25
|
Ok(())
|
|
24
26
|
}
|
|
27
|
+
|
|
28
|
+
#[napi_derive::napi]
|
|
29
|
+
pub fn log_error(error: String) {
|
|
30
|
+
log::error!("{}", error);
|
|
31
|
+
}
|