@choochmeque/tauri-windows-bundle 0.1.0
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/LICENSE +21 -0
- package/README.md +320 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1551 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/extension.d.ts +22 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/core/appx-content.d.ts +2 -0
- package/dist/core/manifest.d.ts +3 -0
- package/dist/core/project-discovery.d.ts +6 -0
- package/dist/generators/assets.d.ts +1 -0
- package/dist/generators/config.d.ts +3 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1406 -0
- package/dist/types.d.ts +114 -0
- package/dist/utils/exec.d.ts +11 -0
- package/dist/utils/template.d.ts +1 -0
- package/package.json +59 -0
- package/templates/AppxManifest.xml.template +51 -0
- package/templates/extensions/app-execution-alias.xml +5 -0
- package/templates/extensions/app-service.xml +3 -0
- package/templates/extensions/autoplay-device.xml +5 -0
- package/templates/extensions/autoplay.xml +5 -0
- package/templates/extensions/background-task.xml +5 -0
- package/templates/extensions/context-menu.xml +9 -0
- package/templates/extensions/file-association.xml +7 -0
- package/templates/extensions/preview-handler.xml +8 -0
- package/templates/extensions/print-task-settings.xml +3 -0
- package/templates/extensions/protocol.xml +5 -0
- package/templates/extensions/share-target.xml +9 -0
- package/templates/extensions/startup-task.xml +3 -0
- package/templates/extensions/thumbnail-handler.xml +8 -0
- package/templates/extensions/toast-activation.xml +3 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Vladimir Pankratov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# tauri-windows-bundle
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@choochmeque/tauri-windows-bundle)
|
|
4
|
+
[](https://codecov.io/gh/Choochmeque/tauri-windows-bundle)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
MSIX packaging tool for Tauri apps - create Windows Store ready bundles with multiarch support.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **MSIX Packaging** - Create Store-ready MSIX packages
|
|
12
|
+
- **Multiarch Support** - Build for x64 and arm64 in one bundle
|
|
13
|
+
- **tauri.conf.json Integration** - Automatically reads app name, version, icons, and resources
|
|
14
|
+
- **Code Signing** - Support for PFX certificates and Windows certificate store
|
|
15
|
+
- **Windows Extensions** - Share Target, File Associations, Protocol Handlers, Startup Task, Context Menus, Background Tasks, App Execution Alias, App Services, Toast Activation, Autoplay, Print Task Settings, Thumbnail/Preview Handlers
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
- [Rust](https://rustup.rs/) with Windows targets
|
|
20
|
+
- [msixbundle-cli](https://github.com/Choochmeque/msixbundle-rs) (auto-installed on first build)
|
|
21
|
+
- Windows SDK (for signing)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install Rust targets for multiarch builds
|
|
25
|
+
rustup target add x86_64-pc-windows-msvc
|
|
26
|
+
rustup target add aarch64-pc-windows-msvc
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# One-time setup
|
|
33
|
+
npx @choochmeque/tauri-windows-bundle init
|
|
34
|
+
|
|
35
|
+
# Or install as dev dependency
|
|
36
|
+
npm install -D @choochmeque/tauri-windows-bundle
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### Initialize
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx @choochmeque/tauri-windows-bundle init
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This creates:
|
|
48
|
+
- `src-tauri/gen/windows/bundle.config.json` - MSIX-specific configuration
|
|
49
|
+
- `src-tauri/gen/windows/AppxManifest.xml.template` - Manifest template
|
|
50
|
+
- `src-tauri/gen/windows/Assets/` - Placeholder icons
|
|
51
|
+
- Adds `tauri:windows:build` script to package.json
|
|
52
|
+
|
|
53
|
+
### Configure
|
|
54
|
+
|
|
55
|
+
Edit `src-tauri/gen/windows/bundle.config.json`:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"publisher": "CN=YourCompany",
|
|
60
|
+
"publisherDisplayName": "Your Company Name",
|
|
61
|
+
"capabilities": ["internetClient"],
|
|
62
|
+
"signing": {
|
|
63
|
+
"pfx": null,
|
|
64
|
+
"pfxPassword": null
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Auto-read from tauri.conf.json:**
|
|
70
|
+
- `displayName` ← `productName`
|
|
71
|
+
- `version` ← `version` (auto-converted to 4-part: `1.0.0` → `1.0.0.0`)
|
|
72
|
+
- `description` ← `bundle.shortDescription`
|
|
73
|
+
- `icons` ← `bundle.icon`
|
|
74
|
+
- `resources` ← `bundle.resources`
|
|
75
|
+
- `signing` ← `bundle.windows.certificateThumbprint`
|
|
76
|
+
|
|
77
|
+
### Build
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Build x64 only (default)
|
|
81
|
+
pnpm tauri:windows:build
|
|
82
|
+
|
|
83
|
+
# Build multiarch bundle (x64 + arm64)
|
|
84
|
+
pnpm tauri:windows:build --arch x64,arm64
|
|
85
|
+
|
|
86
|
+
# Release build
|
|
87
|
+
pnpm tauri:windows:build --release
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Output
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
target/msix/
|
|
94
|
+
├── MyApp_x64.msix
|
|
95
|
+
├── MyApp_arm64.msix # if --arch x64,arm64
|
|
96
|
+
└── MyApp.msixbundle # combined bundle
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## CLI Reference
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npx @choochmeque/tauri-windows-bundle init [options]
|
|
103
|
+
-p, --path <path> Path to Tauri project
|
|
104
|
+
|
|
105
|
+
npx @choochmeque/tauri-windows-bundle build [options]
|
|
106
|
+
--arch <archs> Architectures (comma-separated: x64,arm64) [default: x64]
|
|
107
|
+
--release Build in release mode
|
|
108
|
+
--min-windows <ver> Minimum Windows version [default: 10.0.17763.0]
|
|
109
|
+
|
|
110
|
+
npx @choochmeque/tauri-windows-bundle extension list
|
|
111
|
+
-p, --path <path> Path to Tauri project
|
|
112
|
+
|
|
113
|
+
npx @choochmeque/tauri-windows-bundle extension add <type>
|
|
114
|
+
<type> Extension type (see below)
|
|
115
|
+
-p, --path <path> Path to Tauri project
|
|
116
|
+
|
|
117
|
+
npx @choochmeque/tauri-windows-bundle extension remove <type> [name]
|
|
118
|
+
<type> Extension type (see below)
|
|
119
|
+
[name] Extension identifier (required for most types)
|
|
120
|
+
-p, --path <path> Path to Tauri project
|
|
121
|
+
|
|
122
|
+
Extension types:
|
|
123
|
+
file-association Associate file types with your app
|
|
124
|
+
protocol Register URL protocol handlers (myapp://)
|
|
125
|
+
share-target Receive shared content from other apps
|
|
126
|
+
startup-task Run app on Windows login
|
|
127
|
+
context-menu Add right-click menu items in Explorer
|
|
128
|
+
background-task Run tasks when app is not in foreground
|
|
129
|
+
app-execution-alias Run app from command line (e.g., myapp)
|
|
130
|
+
app-service Allow other apps to call into your app
|
|
131
|
+
toast-activation Handle toast notification clicks
|
|
132
|
+
autoplay Launch when media/device is inserted
|
|
133
|
+
print-task-settings Custom print settings UI
|
|
134
|
+
thumbnail-handler Custom file thumbnails in Explorer
|
|
135
|
+
preview-handler Custom file previews in Explorer
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Windows Extensions
|
|
139
|
+
|
|
140
|
+
### File Associations
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx @choochmeque/tauri-windows-bundle extension add file-association
|
|
144
|
+
# Prompts for: name, extensions, description
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Protocol Handlers
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npx @choochmeque/tauri-windows-bundle extension add protocol
|
|
151
|
+
# Prompts for: protocol name, display name
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Share Target
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Enable
|
|
158
|
+
npx @choochmeque/tauri-windows-bundle extension add share-target
|
|
159
|
+
|
|
160
|
+
# Disable
|
|
161
|
+
npx @choochmeque/tauri-windows-bundle extension remove share-target
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Startup Task
|
|
165
|
+
|
|
166
|
+
Run your app automatically when Windows starts.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Enable
|
|
170
|
+
npx @choochmeque/tauri-windows-bundle extension add startup-task
|
|
171
|
+
|
|
172
|
+
# Disable
|
|
173
|
+
npx @choochmeque/tauri-windows-bundle extension remove startup-task
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Context Menu
|
|
177
|
+
|
|
178
|
+
Add right-click menu items in Windows Explorer.
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx @choochmeque/tauri-windows-bundle extension add context-menu
|
|
182
|
+
# Prompts for: menu name, file types, display name
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Background Task
|
|
186
|
+
|
|
187
|
+
Run tasks when app is not in foreground.
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npx @choochmeque/tauri-windows-bundle extension add background-task
|
|
191
|
+
# Prompts for: task name, type (timer/systemEvent/pushNotification)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### List Extensions
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
npx @choochmeque/tauri-windows-bundle extension list
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### App Execution Alias
|
|
201
|
+
|
|
202
|
+
Run your app from command line (e.g., `myapp` instead of full path).
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npx @choochmeque/tauri-windows-bundle extension add app-execution-alias
|
|
206
|
+
# Prompts for: alias name
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### App Service
|
|
210
|
+
|
|
211
|
+
Allow other apps to call into your app.
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
npx @choochmeque/tauri-windows-bundle extension add app-service
|
|
215
|
+
# Prompts for: service name
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Toast Activation
|
|
219
|
+
|
|
220
|
+
Handle toast notification clicks and actions.
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Enable
|
|
224
|
+
npx @choochmeque/tauri-windows-bundle extension add toast-activation
|
|
225
|
+
|
|
226
|
+
# Disable
|
|
227
|
+
npx @choochmeque/tauri-windows-bundle extension remove toast-activation
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Autoplay
|
|
231
|
+
|
|
232
|
+
Launch your app when media or devices are inserted.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
npx @choochmeque/tauri-windows-bundle extension add autoplay
|
|
236
|
+
# Prompts for: verb, action display name, event type (content/device)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Print Task Settings
|
|
240
|
+
|
|
241
|
+
Add custom print settings UI.
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Enable
|
|
245
|
+
npx @choochmeque/tauri-windows-bundle extension add print-task-settings
|
|
246
|
+
|
|
247
|
+
# Disable
|
|
248
|
+
npx @choochmeque/tauri-windows-bundle extension remove print-task-settings
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Thumbnail Handler
|
|
252
|
+
|
|
253
|
+
Provide custom thumbnails for your file types in Explorer.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
npx @choochmeque/tauri-windows-bundle extension add thumbnail-handler
|
|
257
|
+
# Prompts for: CLSID, file types
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Preview Handler
|
|
261
|
+
|
|
262
|
+
Provide custom file previews in Explorer.
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
npx @choochmeque/tauri-windows-bundle extension add preview-handler
|
|
266
|
+
# Prompts for: CLSID, file types
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### List Extensions
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
npx @choochmeque/tauri-windows-bundle extension list
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Remove Extension
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
npx @choochmeque/tauri-windows-bundle extension remove file-association myfiles
|
|
279
|
+
npx @choochmeque/tauri-windows-bundle extension remove protocol myapp
|
|
280
|
+
npx @choochmeque/tauri-windows-bundle extension remove context-menu open-with-myapp
|
|
281
|
+
npx @choochmeque/tauri-windows-bundle extension remove background-task sync-task
|
|
282
|
+
npx @choochmeque/tauri-windows-bundle extension remove app-execution-alias myapp
|
|
283
|
+
npx @choochmeque/tauri-windows-bundle extension remove app-service com.myapp.service
|
|
284
|
+
npx @choochmeque/tauri-windows-bundle extension remove autoplay open
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## Code Signing
|
|
288
|
+
|
|
289
|
+
### Option 1: PFX Certificate
|
|
290
|
+
|
|
291
|
+
```json
|
|
292
|
+
{
|
|
293
|
+
"signing": {
|
|
294
|
+
"pfx": "path/to/certificate.pfx",
|
|
295
|
+
"pfxPassword": null
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Set password via environment variable:
|
|
301
|
+
```bash
|
|
302
|
+
export MSIX_PFX_PASSWORD=your-password
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Option 2: Windows Certificate Store
|
|
306
|
+
|
|
307
|
+
Use thumbprint from `tauri.conf.json`:
|
|
308
|
+
```json
|
|
309
|
+
{
|
|
310
|
+
"bundle": {
|
|
311
|
+
"windows": {
|
|
312
|
+
"certificateThumbprint": "ABC123..."
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## License
|
|
319
|
+
|
|
320
|
+
[MIT](LICENSE)
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|