pake-cli 3.0.0-beta → 3.0.2

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.
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pake"
3
- version = "0.1.0"
3
+ version = "3.0.0"
4
4
  description = "🤱🏻 Turn any webpage into a desktop app with Rust."
5
5
  authors = ["Tw93"]
6
6
  license = "MIT"
@@ -19,7 +19,7 @@ tauri-build = { version = "2.0.3", features = [] }
19
19
 
20
20
  [dependencies]
21
21
  serde_json = "1.0.133"
22
- serde = { version = "1.0.215", features = ["derive"] }
22
+ serde = { version = "1.0.216", features = ["derive"] }
23
23
  tauri = { version = "2.1.1", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] }
24
24
  tauri-plugin-window-state = "2.2.0"
25
25
  tauri-plugin-oauth = "2"
@@ -27,6 +27,7 @@ tauri-plugin-http = "2.2.0"
27
27
  [target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
28
28
  tauri-plugin-global-shortcut = { version = "2.2.0" }
29
29
  tauri-plugin-shell = "2.2.0"
30
+ tauri-plugin-single-instance = "2"
30
31
  tokio = { version = "1", features = ["full"] }
31
32
 
32
33
  [features]
@@ -4,6 +4,9 @@
4
4
  <?elseif $(sys.BUILDARCH)="x64"?>
5
5
  <?define Win64 = "yes" ?>
6
6
  <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
7
+ <?elseif $(sys.BUILDARCH)="arm64"?>
8
+ <?define Win64 = "yes" ?>
9
+ <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
7
10
  <?else?>
8
11
  <?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
9
12
  <?endif?>
@@ -11,11 +14,11 @@
11
14
  <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
12
15
  <Product
13
16
  Id="*"
14
- Name="{{{product_name}}}"
15
- UpgradeCode="{{{upgrade_code}}}"
17
+ Name="{{product_name}}"
18
+ UpgradeCode="{{upgrade_code}}"
16
19
  Language="!(loc.TauriLanguage)"
17
- Manufacturer="{{{manufacturer}}}"
18
- Version="{{{version}}}">
20
+ Manufacturer="{{manufacturer}}"
21
+ Version="{{version}}">
19
22
 
20
23
  <Package Id="*"
21
24
  Keywords="Installer"
@@ -29,6 +32,11 @@
29
32
  <!-- reinstall all files; rewrite all registry entries; reinstall all shortcuts -->
30
33
  <Property Id="REINSTALLMODE" Value="amus" />
31
34
 
35
+ <!-- Auto launch app after installation, useful for passive mode which usually used in updates -->
36
+ <Property Id="AUTOLAUNCHAPP" Secure="yes" />
37
+ <!-- Property to forward cli args to the launched app to not lose those of the pre-update instance -->
38
+ <Property Id="LAUNCHAPPARGS" Secure="yes" />
39
+
32
40
  {{#if allow_downgrades}}
33
41
  <MajorUpgrade Schedule="afterInstallInitialize" AllowDowngrades="yes" />
34
42
  {{else}}
@@ -42,29 +50,35 @@
42
50
  <Media Id="1" Cabinet="app.cab" EmbedCab="yes" />
43
51
 
44
52
  {{#if banner_path}}
45
- <WixVariable Id="WixUIBannerBmp" Value="{{{banner_path}}}" />
53
+ <WixVariable Id="WixUIBannerBmp" Value="{{banner_path}}" />
46
54
  {{/if}}
47
55
  {{#if dialog_image_path}}
48
- <WixVariable Id="WixUIDialogBmp" Value="{{{dialog_image_path}}}" />
56
+ <WixVariable Id="WixUIDialogBmp" Value="{{dialog_image_path}}" />
49
57
  {{/if}}
50
58
  {{#if license}}
51
- <WixVariable Id="WixUILicenseRtf" Value="{{{license}}}" />
59
+ <WixVariable Id="WixUILicenseRtf" Value="{{license}}" />
52
60
  {{/if}}
53
61
 
54
- <Icon Id="ProductIcon" SourceFile="{{{icon_path}}}"/>
62
+ <Icon Id="ProductIcon" SourceFile="{{icon_path}}"/>
55
63
  <Property Id="ARPPRODUCTICON" Value="ProductIcon" />
56
64
  <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
57
65
  <SetProperty Id="ARPNOMODIFY" Value="1" After="InstallValidate" Sequence="execute"/>
58
66
 
67
+ {{#if homepage}}
68
+ <Property Id="ARPURLINFOABOUT" Value="{{homepage}}"/>
69
+ <Property Id="ARPHELPLINK" Value="{{homepage}}"/>
70
+ <Property Id="ARPURLUPDATEINFO" Value="{{homepage}}"/>
71
+ {{/if}}
72
+
59
73
  <!-- initialize with previous InstallDir -->
60
74
  <Property Id="INSTALLDIR">
61
- <RegistrySearch Id="PrevInstallDirReg" Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="InstallDir" Type="raw"/>
75
+ <RegistrySearch Id="PrevInstallDirReg" Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="InstallDir" Type="raw"/>
62
76
  </Property>
63
77
 
64
78
  <!-- launch app checkbox -->
65
79
  <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.LaunchApp)" />
66
- <Property Id="WixShellExecTarget" Value="[!Path]" />
67
- <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
80
+ <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
81
+ <CustomAction Id="LaunchApplication" Impersonate="yes" FileKey="Path" ExeCommand="[LAUNCHAPPARGS]" Return="asyncNoWait" />
68
82
 
69
83
  <UI>
70
84
  <!-- launch app checkbox -->
@@ -92,27 +106,49 @@
92
106
  <Directory Id="TARGETDIR" Name="SourceDir">
93
107
  <Directory Id="DesktopFolder" Name="Desktop">
94
108
  <Component Id="ApplicationShortcutDesktop" Guid="*">
95
- <Shortcut Id="ApplicationDesktopShortcut" Name="{{{product_name}}}" Description="Runs {{{product_name}}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
109
+ <Shortcut Id="ApplicationDesktopShortcut" Name="{{product_name}}" Description="Runs {{product_name}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
96
110
  <RemoveFolder Id="DesktopFolder" On="uninstall" />
97
- <RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="Desktop Shortcut" Type="integer" Value="1" KeyPath="yes" />
111
+ <RegistryValue Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="Desktop Shortcut" Type="integer" Value="1" KeyPath="yes" />
98
112
  </Component>
99
113
  </Directory>
100
114
  <Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
101
- <Directory Id="INSTALLDIR" Name="{{{product_name}}}"/>
115
+ <Directory Id="INSTALLDIR" Name="{{product_name}}"/>
102
116
  </Directory>
103
117
  <Directory Id="ProgramMenuFolder">
104
- <Directory Id="ApplicationProgramsFolder" Name="{{{product_name}}}"/>
118
+ <Directory Id="ApplicationProgramsFolder" Name="{{product_name}}"/>
105
119
  </Directory>
106
120
  </Directory>
107
121
 
108
122
  <DirectoryRef Id="INSTALLDIR">
109
123
  <Component Id="RegistryEntries" Guid="*">
110
- <RegistryKey Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}">
124
+ <RegistryKey Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}">
111
125
  <RegistryValue Name="InstallDir" Type="string" Value="[INSTALLDIR]" KeyPath="yes" />
112
126
  </RegistryKey>
127
+ <!-- Change the Root to HKCU for perUser installations -->
128
+ {{#each deep_link_protocols as |protocol| ~}}
129
+ <RegistryKey Root="HKLM" Key="Software\Classes\\{{protocol}}">
130
+ <RegistryValue Type="string" Name="URL Protocol" Value=""/>
131
+ <RegistryValue Type="string" Value="URL:{{bundle_id}} protocol"/>
132
+ <RegistryKey Key="DefaultIcon">
133
+ <RegistryValue Type="string" Value="&quot;[!Path]&quot;,0" />
134
+ </RegistryKey>
135
+ <RegistryKey Key="shell\open\command">
136
+ <RegistryValue Type="string" Value="&quot;[!Path]&quot; &quot;%1&quot;" />
137
+ </RegistryKey>
138
+ </RegistryKey>
139
+ {{/each~}}
113
140
  </Component>
114
- <Component Id="Path" Guid="{{{path_component_guid}}}" Win64="$(var.Win64)">
115
- <File Id="Path" Source="{{{app_exe_source}}}" KeyPath="yes" Checksum="yes"/>
141
+ <Component Id="Path" Guid="{{path_component_guid}}" Win64="$(var.Win64)">
142
+ <File Id="Path" Source="{{main_binary_path}}" KeyPath="yes" Checksum="yes"/>
143
+ {{#each file_associations as |association| ~}}
144
+ {{#each association.ext as |ext| ~}}
145
+ <ProgId Id="{{../../product_name}}.{{ext}}" Advertise="yes" Description="{{association.description}}">
146
+ <Extension Id="{{ext}}" Advertise="yes">
147
+ <Verb Id="open" Command="Open with {{../../product_name}}" Argument="&quot;%1&quot;" />
148
+ </Extension>
149
+ </ProgId>
150
+ {{/each~}}
151
+ {{/each~}}
116
152
  </Component>
117
153
  {{#each binaries as |bin| ~}}
118
154
  <Component Id="{{ bin.id }}" Guid="{{bin.guid}}" Win64="$(var.Win64)">
@@ -130,12 +166,12 @@
130
166
  <File Id="UpdateTaskUninstaller" Source="uninstall-task.ps1" KeyPath="yes" Checksum="yes"/>
131
167
  </Component>
132
168
  {{/if}}
133
- {{{resources}}}
169
+ {{resources}}
134
170
  <Component Id="CMP_UninstallShortcut" Guid="*">
135
171
 
136
172
  <Shortcut Id="UninstallShortcut"
137
- Name="Uninstall {{{product_name}}}"
138
- Description="Uninstalls {{{product_name}}}"
173
+ Name="Uninstall {{product_name}}"
174
+ Description="Uninstalls {{product_name}}"
139
175
  Target="[System64Folder]msiexec.exe"
140
176
  Arguments="/x [ProductCode]" />
141
177
 
@@ -143,7 +179,7 @@
143
179
  On="uninstall" />
144
180
 
145
181
  <RegistryValue Root="HKCU"
146
- Key="Software\\{{{manufacturer}}}\\{{{product_name}}}"
182
+ Key="Software\\{{manufacturer}}\\{{product_name}}"
147
183
  Name="Uninstaller Shortcut"
148
184
  Type="integer"
149
185
  Value="1"
@@ -154,15 +190,15 @@
154
190
  <DirectoryRef Id="ApplicationProgramsFolder">
155
191
  <Component Id="ApplicationShortcut" Guid="*">
156
192
  <Shortcut Id="ApplicationStartMenuShortcut"
157
- Name="{{{product_name}}}"
158
- Description="Runs {{{product_name}}}"
193
+ Name="{{product_name}}"
194
+ Description="Runs {{product_name}}"
159
195
  Target="[!Path]"
160
196
  Icon="ProductIcon"
161
197
  WorkingDirectory="INSTALLDIR">
162
- <ShortcutProperty Key="System.AppUserModel.ID" Value="{{{bundle_id}}}"/>
198
+ <ShortcutProperty Key="System.AppUserModel.ID" Value="{{bundle_id}}"/>
163
199
  </Shortcut>
164
200
  <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
165
- <RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="Start Menu Shortcut" Type="integer" Value="1" KeyPath="yes"/>
201
+ <RegistryValue Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="Start Menu Shortcut" Type="integer" Value="1" KeyPath="yes"/>
166
202
  </Component>
167
203
  </DirectoryRef>
168
204
 
@@ -246,7 +282,7 @@
246
282
  </Property>
247
283
 
248
284
  {{#if download_bootstrapper}}
249
- <CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden try [\{] [\[]Net.ServicePointManager[\]]::SecurityProtocol = [\[]Net.SecurityProtocolType[\]]::Tls12 [\}] catch [\{][\}]; Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList ({{{webview_installer_args}}} &apos;/install&apos;) -Wait' Return='check'/>
285
+ <CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden try [\{] [\[]Net.ServicePointManager[\]]::SecurityProtocol = [\[]Net.SecurityProtocolType[\]]::Tls12 [\}] catch [\{][\}]; Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList ({{webview_installer_args}} &apos;/install&apos;) -Wait' Return='check'/>
250
286
  <InstallExecuteSequence>
251
287
  <Custom Action='DownloadAndInvokeBootstrapper' Before='InstallFinalize'>
252
288
  <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
@@ -256,8 +292,8 @@
256
292
 
257
293
  <!-- Embedded webview bootstrapper mode -->
258
294
  {{#if webview2_bootstrapper_path}}
259
- <Binary Id="MicrosoftEdgeWebview2Setup.exe" SourceFile="{{{webview2_bootstrapper_path}}}"/>
260
- <CustomAction Id='InvokeBootstrapper' BinaryKey='MicrosoftEdgeWebview2Setup.exe' Execute="deferred" ExeCommand='{{{webview_installer_args}}} /install' Return='check' />
295
+ <Binary Id="MicrosoftEdgeWebview2Setup.exe" SourceFile="{{webview2_bootstrapper_path}}"/>
296
+ <CustomAction Id='InvokeBootstrapper' BinaryKey='MicrosoftEdgeWebview2Setup.exe' Execute="deferred" ExeCommand='{{webview_installer_args}} /install' Return='check' />
261
297
  <InstallExecuteSequence>
262
298
  <Custom Action='InvokeBootstrapper' Before='InstallFinalize'>
263
299
  <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
@@ -267,8 +303,8 @@
267
303
 
268
304
  <!-- Embedded offline installer -->
269
305
  {{#if webview2_installer_path}}
270
- <Binary Id="MicrosoftEdgeWebView2RuntimeInstaller.exe" SourceFile="{{{webview2_installer_path}}}"/>
271
- <CustomAction Id='InvokeStandalone' BinaryKey='MicrosoftEdgeWebView2RuntimeInstaller.exe' Execute="deferred" ExeCommand='{{{webview_installer_args}}} /install' Return='check' />
306
+ <Binary Id="MicrosoftEdgeWebView2RuntimeInstaller.exe" SourceFile="{{webview2_installer_path}}"/>
307
+ <CustomAction Id='InvokeStandalone' BinaryKey='MicrosoftEdgeWebView2RuntimeInstaller.exe' Execute="deferred" ExeCommand='{{webview_installer_args}} /install' Return='check' />
272
308
  <InstallExecuteSequence>
273
309
  <Custom Action='InvokeStandalone' Before='InstallFinalize'>
274
310
  <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
@@ -305,6 +341,10 @@
305
341
  </InstallExecuteSequence>
306
342
  {{/if}}
307
343
 
344
+ <InstallExecuteSequence>
345
+ <Custom Action="LaunchApplication" After="InstallFinalize">AUTOLAUNCHAPP AND NOT Installed</Custom>
346
+ </InstallExecuteSequence>
347
+
308
348
  <SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize"/>
309
349
  </Product>
310
350
  </Wix>