@bghitcode/bghitapp 1.0.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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +203 -0
  3. package/dist/cli.js +2995 -0
  4. package/package.json +104 -0
  5. package/src-tauri/Cargo.lock +5966 -0
  6. package/src-tauri/Cargo.toml +59 -0
  7. package/src-tauri/Info.plist +14 -0
  8. package/src-tauri/assets/macos/dmg/background.png +0 -0
  9. package/src-tauri/assets/main.wxs +350 -0
  10. package/src-tauri/bghitapp.json +42 -0
  11. package/src-tauri/build.rs +5 -0
  12. package/src-tauri/capabilities/default.json +29 -0
  13. package/src-tauri/entitlements.plist +7 -0
  14. package/src-tauri/icons/chatgpt.icns +0 -0
  15. package/src-tauri/icons/deepseek.icns +0 -0
  16. package/src-tauri/icons/excalidraw.icns +0 -0
  17. package/src-tauri/icons/flomo.icns +0 -0
  18. package/src-tauri/icons/gemini.icns +0 -0
  19. package/src-tauri/icons/grok.icns +0 -0
  20. package/src-tauri/icons/icon.icns +0 -0
  21. package/src-tauri/icons/icon.png +0 -0
  22. package/src-tauri/icons/lizhi.icns +0 -0
  23. package/src-tauri/icons/programmusic.icns +0 -0
  24. package/src-tauri/icons/qwerty.icns +0 -0
  25. package/src-tauri/icons/twitter.icns +0 -0
  26. package/src-tauri/icons/wechat.icns +0 -0
  27. package/src-tauri/icons/weekly.icns +0 -0
  28. package/src-tauri/icons/weread.icns +0 -0
  29. package/src-tauri/icons/xiaohongshu.icns +0 -0
  30. package/src-tauri/icons/youtube.icns +0 -0
  31. package/src-tauri/icons/youtubemusic.icns +0 -0
  32. package/src-tauri/rust_proxy.toml +10 -0
  33. package/src-tauri/src/app/config.rs +100 -0
  34. package/src-tauri/src/app/invoke.rs +242 -0
  35. package/src-tauri/src/app/menu.rs +324 -0
  36. package/src-tauri/src/app/mod.rs +6 -0
  37. package/src-tauri/src/app/setup.rs +172 -0
  38. package/src-tauri/src/app/window.rs +577 -0
  39. package/src-tauri/src/inject/auth.js +75 -0
  40. package/src-tauri/src/inject/custom.js +0 -0
  41. package/src-tauri/src/inject/event.js +1111 -0
  42. package/src-tauri/src/inject/find.js +708 -0
  43. package/src-tauri/src/inject/fullscreen.js +253 -0
  44. package/src-tauri/src/inject/offline.js +68 -0
  45. package/src-tauri/src/inject/splash-transition.js +13 -0
  46. package/src-tauri/src/inject/style.js +505 -0
  47. package/src-tauri/src/inject/theme_refresh.js +59 -0
  48. package/src-tauri/src/inject/toast.js +22 -0
  49. package/src-tauri/src/lib.rs +227 -0
  50. package/src-tauri/src/main.rs +8 -0
  51. package/src-tauri/src/util.rs +245 -0
  52. package/src-tauri/tauri.conf.json +20 -0
  53. package/src-tauri/tauri.linux.conf.json +12 -0
  54. package/src-tauri/tauri.macos.conf.json +28 -0
  55. package/src-tauri/tauri.windows.conf.json +15 -0
@@ -0,0 +1,59 @@
1
+ [package]
2
+ name = "bghitapp"
3
+ version = "1.0.0"
4
+ description = "🤱🏻 Turn any webpage into a desktop app with Rust."
5
+ authors = ["BghitCode"]
6
+ license = "MIT"
7
+ repository = "https://github.com/BghitCode/bghitapp"
8
+ edition = "2021"
9
+ rust-version = "1.85.0"
10
+
11
+ [lib]
12
+ name = "app_lib"
13
+ crate-type = ["staticlib", "cdylib", "lib"]
14
+
15
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
16
+
17
+ [build-dependencies]
18
+ tauri-build = { version = "2.5.5", features = [] }
19
+
20
+ [dependencies]
21
+ serde_json = "1.0.149"
22
+ serde = { version = "1.0.228", features = ["derive"] }
23
+ tokio = { version = "1.49.0", features = ["time"] }
24
+ tauri = { version = "2.10.2", features = [
25
+ "tray-icon",
26
+ "image-ico",
27
+ "image-png",
28
+ "macos-proxy",
29
+ ] }
30
+ tauri-plugin-window-state = "2.4.1"
31
+ tauri-plugin-oauth = "2.0.0"
32
+ tauri-plugin-http = "2.5.7"
33
+ tauri-plugin-global-shortcut = { version = "2.3.1" }
34
+ tauri-plugin-shell = { version = "2.3.5" }
35
+ tauri-plugin-opener = { version = "2.5.3" }
36
+ tauri-plugin-single-instance = "2.4.0"
37
+ tauri-plugin-notification = "2.3.3"
38
+
39
+ [target.'cfg(target_os = "macos")'.dependencies]
40
+ objc2 = "0.6"
41
+ objc2-app-kit = { version = "0.3", features = ["NSApplication", "NSDockTile"] }
42
+ objc2-foundation = { version = "0.3", features = ["NSString"] }
43
+
44
+ [features]
45
+ # this feature is used for development builds from development cli
46
+ cli-build = []
47
+ # by default Tauri runs in production mode
48
+ # when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
49
+ default = ["custom-protocol"]
50
+ # this feature is used for production builds where `devPath` points to the filesystem
51
+ # DO NOT remove this
52
+ custom-protocol = ["tauri/custom-protocol"]
53
+
54
+ [profile.release]
55
+ panic = "abort"
56
+ codegen-units = 1
57
+ lto = "thin"
58
+ opt-level = "z"
59
+ strip = true
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2
+ <plist version="1.0">
3
+ <dict>
4
+ <key>NSCameraUsageDescription</key>
5
+ <string>Request camera access</string>
6
+ <key>NSMicrophoneUsageDescription</key>
7
+ <string>Request microphone access</string>
8
+ <key>NSAppTransportSecurity</key>
9
+ <dict>
10
+ <key>NSAllowsArbitraryLoads</key>
11
+ <true/>
12
+ </dict>
13
+ </dict>
14
+ </plist>
@@ -0,0 +1,350 @@
1
+ <?if $(sys.BUILDARCH)="x86"?>
2
+ <?define Win64 = "no" ?>
3
+ <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
4
+ <?elseif $(sys.BUILDARCH)="x64"?>
5
+ <?define Win64 = "yes" ?>
6
+ <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
7
+ <?elseif $(sys.BUILDARCH)="arm64"?>
8
+ <?define Win64 = "yes" ?>
9
+ <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
10
+ <?else?>
11
+ <?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
12
+ <?endif?>
13
+
14
+ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
15
+ <Product
16
+ Id="*"
17
+ Name="{{product_name}}"
18
+ UpgradeCode="{{upgrade_code}}"
19
+ Language="!(loc.TauriLanguage)"
20
+ Manufacturer="{{manufacturer}}"
21
+ Version="{{version}}">
22
+
23
+ <Package Id="*"
24
+ Keywords="Installer"
25
+ InstallerVersion="450"
26
+ Languages="0"
27
+ Compressed="yes"
28
+ InstallScope="perMachine"
29
+ SummaryCodepage="!(loc.TauriCodepage)"/>
30
+
31
+ <!-- https://docs.microsoft.com/en-us/windows/win32/msi/reinstallmode -->
32
+ <!-- reinstall all files; rewrite all registry entries; reinstall all shortcuts -->
33
+ <Property Id="REINSTALLMODE" Value="amus" />
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
+
40
+ {{#if allow_downgrades}}
41
+ <MajorUpgrade Schedule="afterInstallInitialize" AllowDowngrades="yes" />
42
+ {{else}}
43
+ <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" AllowSameVersionUpgrades="yes" />
44
+ {{/if}}
45
+
46
+ <InstallExecuteSequence>
47
+ <RemoveShortcuts>Installed AND NOT UPGRADINGPRODUCTCODE</RemoveShortcuts>
48
+ </InstallExecuteSequence>
49
+
50
+ <Media Id="1" Cabinet="app.cab" EmbedCab="yes" />
51
+
52
+ {{#if banner_path}}
53
+ <WixVariable Id="WixUIBannerBmp" Value="{{banner_path}}" />
54
+ {{/if}}
55
+ {{#if dialog_image_path}}
56
+ <WixVariable Id="WixUIDialogBmp" Value="{{dialog_image_path}}" />
57
+ {{/if}}
58
+ {{#if license}}
59
+ <WixVariable Id="WixUILicenseRtf" Value="{{license}}" />
60
+ {{/if}}
61
+
62
+ <Icon Id="ProductIcon" SourceFile="{{icon_path}}"/>
63
+ <Property Id="ARPPRODUCTICON" Value="ProductIcon" />
64
+ <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
65
+ <SetProperty Id="ARPNOMODIFY" Value="1" After="InstallValidate" Sequence="execute"/>
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
+
73
+ <!-- initialize with previous InstallDir -->
74
+ <Property Id="INSTALLDIR">
75
+ <RegistrySearch Id="PrevInstallDirReg" Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="InstallDir" Type="raw"/>
76
+ </Property>
77
+
78
+ <!-- launch app checkbox -->
79
+ <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.LaunchApp)" />
80
+ <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
81
+ <CustomAction Id="LaunchApplication" Impersonate="yes" FileKey="Path" ExeCommand="[LAUNCHAPPARGS]" Return="asyncNoWait" />
82
+
83
+ <UI>
84
+ <!-- launch app checkbox -->
85
+ <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
86
+
87
+ <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
88
+
89
+ {{#unless license}}
90
+ <!-- Skip license dialog -->
91
+ <Publish Dialog="WelcomeDlg"
92
+ Control="Next"
93
+ Event="NewDialog"
94
+ Value="InstallDirDlg"
95
+ Order="2">1</Publish>
96
+ <Publish Dialog="InstallDirDlg"
97
+ Control="Back"
98
+ Event="NewDialog"
99
+ Value="WelcomeDlg"
100
+ Order="2">1</Publish>
101
+ {{/unless}}
102
+ </UI>
103
+
104
+ <UIRef Id="WixUI_InstallDir" />
105
+
106
+ <Directory Id="TARGETDIR" Name="SourceDir">
107
+ <Directory Id="DesktopFolder" Name="Desktop">
108
+ <Component Id="ApplicationShortcutDesktop" Guid="*">
109
+ <Shortcut Id="ApplicationDesktopShortcut" Name="{{product_name}}" Description="Runs {{product_name}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
110
+ <RemoveFolder Id="DesktopFolder" On="uninstall" />
111
+ <RegistryValue Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="Desktop Shortcut" Type="integer" Value="1" KeyPath="yes" />
112
+ </Component>
113
+ </Directory>
114
+ <Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
115
+ <Directory Id="INSTALLDIR" Name="{{product_name}}"/>
116
+ </Directory>
117
+ <Directory Id="ProgramMenuFolder">
118
+ <Directory Id="ApplicationProgramsFolder" Name="{{product_name}}"/>
119
+ </Directory>
120
+ </Directory>
121
+
122
+ <DirectoryRef Id="INSTALLDIR">
123
+ <Component Id="RegistryEntries" Guid="*">
124
+ <RegistryKey Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}">
125
+ <RegistryValue Name="InstallDir" Type="string" Value="[INSTALLDIR]" KeyPath="yes" />
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~}}
140
+ </Component>
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~}}
152
+ </Component>
153
+ {{#each binaries as |bin| ~}}
154
+ <Component Id="{{ bin.id }}" Guid="{{bin.guid}}" Win64="$(var.Win64)">
155
+ <File Id="Bin_{{ bin.id }}" Source="{{bin.path}}" KeyPath="yes"/>
156
+ </Component>
157
+ {{/each~}}
158
+ {{#if enable_elevated_update_task}}
159
+ <Component Id="UpdateTask" Guid="C492327D-9720-4CD5-8DB8-F09082AF44BE" Win64="$(var.Win64)">
160
+ <File Id="UpdateTask" Source="update.xml" KeyPath="yes" Checksum="yes"/>
161
+ </Component>
162
+ <Component Id="UpdateTaskInstaller" Guid="011F25ED-9BE3-50A7-9E9B-3519ED2B9932" Win64="$(var.Win64)">
163
+ <File Id="UpdateTaskInstaller" Source="install-task.ps1" KeyPath="yes" Checksum="yes"/>
164
+ </Component>
165
+ <Component Id="UpdateTaskUninstaller" Guid="D4F6CC3F-32DC-5FD0-95E8-782FFD7BBCE1" Win64="$(var.Win64)">
166
+ <File Id="UpdateTaskUninstaller" Source="uninstall-task.ps1" KeyPath="yes" Checksum="yes"/>
167
+ </Component>
168
+ {{/if}}
169
+ {{resources}}
170
+ <Component Id="CMP_UninstallShortcut" Guid="*">
171
+
172
+ <Shortcut Id="UninstallShortcut"
173
+ Name="Uninstall {{product_name}}"
174
+ Description="Uninstalls {{product_name}}"
175
+ Target="[System64Folder]msiexec.exe"
176
+ Arguments="/x [ProductCode]" />
177
+
178
+ <RemoveFolder Id="INSTALLDIR"
179
+ On="uninstall" />
180
+
181
+ <RegistryValue Root="HKCU"
182
+ Key="Software\\{{manufacturer}}\\{{product_name}}"
183
+ Name="Uninstaller Shortcut"
184
+ Type="integer"
185
+ Value="1"
186
+ KeyPath="yes" />
187
+ </Component>
188
+ </DirectoryRef>
189
+
190
+ <DirectoryRef Id="ApplicationProgramsFolder">
191
+ <Component Id="ApplicationShortcut" Guid="*">
192
+ <Shortcut Id="ApplicationStartMenuShortcut"
193
+ Name="{{product_name}}"
194
+ Description="Runs {{product_name}}"
195
+ Target="[!Path]"
196
+ Icon="ProductIcon"
197
+ WorkingDirectory="INSTALLDIR">
198
+ <ShortcutProperty Key="System.AppUserModel.ID" Value="{{bundle_id}}"/>
199
+ </Shortcut>
200
+ <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
201
+ <RegistryValue Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="Start Menu Shortcut" Type="integer" Value="1" KeyPath="yes"/>
202
+ </Component>
203
+ </DirectoryRef>
204
+
205
+ {{#each merge_modules as |msm| ~}}
206
+ <DirectoryRef Id="TARGETDIR">
207
+ <Merge Id="{{ msm.name }}" SourceFile="{{ msm.path }}" DiskId="1" Language="!(loc.TauriLanguage)" />
208
+ </DirectoryRef>
209
+
210
+ <Feature Id="{{ msm.name }}" Title="{{ msm.name }}" AllowAdvertise="no" Display="hidden" Level="1">
211
+ <MergeRef Id="{{ msm.name }}"/>
212
+ </Feature>
213
+ {{/each~}}
214
+
215
+ <Feature
216
+ Id="MainProgram"
217
+ Title="Application"
218
+ Description="!(loc.InstallAppFeature)"
219
+ Level="1"
220
+ ConfigurableDirectory="INSTALLDIR"
221
+ AllowAdvertise="no"
222
+ Display="expand"
223
+ Absent="disallow">
224
+
225
+ <ComponentRef Id="RegistryEntries"/>
226
+
227
+ {{#each resource_file_ids as |resource_file_id| ~}}
228
+ <ComponentRef Id="{{ resource_file_id }}"/>
229
+ {{/each~}}
230
+
231
+ {{#if enable_elevated_update_task}}
232
+ <ComponentRef Id="UpdateTask" />
233
+ <ComponentRef Id="UpdateTaskInstaller" />
234
+ <ComponentRef Id="UpdateTaskUninstaller" />
235
+ {{/if}}
236
+
237
+ <Feature Id="ShortcutsFeature"
238
+ Title="Shortcuts"
239
+ Level="1">
240
+ <ComponentRef Id="Path"/>
241
+ <ComponentRef Id="CMP_UninstallShortcut" />
242
+ <ComponentRef Id="ApplicationShortcut" />
243
+ <ComponentRef Id="ApplicationShortcutDesktop" />
244
+ </Feature>
245
+
246
+ <Feature
247
+ Id="Environment"
248
+ Title="PATH Environment Variable"
249
+ Description="!(loc.PathEnvVarFeature)"
250
+ Level="1"
251
+ Absent="allow">
252
+ <ComponentRef Id="Path"/>
253
+ {{#each binaries as |bin| ~}}
254
+ <ComponentRef Id="{{ bin.id }}"/>
255
+ {{/each~}}
256
+ </Feature>
257
+ </Feature>
258
+
259
+ <Feature Id="External" AllowAdvertise="no" Absent="disallow">
260
+ {{#each component_group_refs as |id| ~}}
261
+ <ComponentGroupRef Id="{{ id }}"/>
262
+ {{/each~}}
263
+ {{#each component_refs as |id| ~}}
264
+ <ComponentRef Id="{{ id }}"/>
265
+ {{/each~}}
266
+ {{#each feature_group_refs as |id| ~}}
267
+ <FeatureGroupRef Id="{{ id }}"/>
268
+ {{/each~}}
269
+ {{#each feature_refs as |id| ~}}
270
+ <FeatureRef Id="{{ id }}"/>
271
+ {{/each~}}
272
+ {{#each merge_refs as |id| ~}}
273
+ <MergeRef Id="{{ id }}"/>
274
+ {{/each~}}
275
+ </Feature>
276
+
277
+ {{#if install_webview}}
278
+ <!-- WebView2 -->
279
+ <Property Id="WVRTINSTALLED">
280
+ <RegistrySearch Id="WVRTInstalledSystem" Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw" Win64="no" />
281
+ <RegistrySearch Id="WVRTInstalledUser" Root="HKCU" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw"/>
282
+ </Property>
283
+
284
+ {{#if download_bootstrapper}}
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'/>
286
+ <InstallExecuteSequence>
287
+ <Custom Action='DownloadAndInvokeBootstrapper' Before='InstallFinalize'>
288
+ <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
289
+ </Custom>
290
+ </InstallExecuteSequence>
291
+ {{/if}}
292
+
293
+ <!-- Embedded webview bootstrapper mode -->
294
+ {{#if webview2_bootstrapper_path}}
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' />
297
+ <InstallExecuteSequence>
298
+ <Custom Action='InvokeBootstrapper' Before='InstallFinalize'>
299
+ <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
300
+ </Custom>
301
+ </InstallExecuteSequence>
302
+ {{/if}}
303
+
304
+ <!-- Embedded offline installer -->
305
+ {{#if webview2_installer_path}}
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' />
308
+ <InstallExecuteSequence>
309
+ <Custom Action='InvokeStandalone' Before='InstallFinalize'>
310
+ <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
311
+ </Custom>
312
+ </InstallExecuteSequence>
313
+ {{/if}}
314
+
315
+ {{/if}}
316
+
317
+ {{#if enable_elevated_update_task}}
318
+ <!-- Install an elevated update task within Windows Task Scheduler -->
319
+ <CustomAction
320
+ Id="CreateUpdateTask"
321
+ Return="check"
322
+ Directory="INSTALLDIR"
323
+ Execute="commit"
324
+ Impersonate="yes"
325
+ ExeCommand="powershell.exe -WindowStyle hidden .\install-task.ps1" />
326
+ <InstallExecuteSequence>
327
+ <Custom Action='CreateUpdateTask' Before='InstallFinalize'>
328
+ NOT(REMOVE)
329
+ </Custom>
330
+ </InstallExecuteSequence>
331
+ <!-- Remove elevated update task during uninstall -->
332
+ <CustomAction
333
+ Id="DeleteUpdateTask"
334
+ Return="check"
335
+ Directory="INSTALLDIR"
336
+ ExeCommand="powershell.exe -WindowStyle hidden .\uninstall-task.ps1" />
337
+ <InstallExecuteSequence>
338
+ <Custom Action="DeleteUpdateTask" Before='InstallFinalize'>
339
+ (REMOVE = "ALL") AND NOT UPGRADINGPRODUCTCODE
340
+ </Custom>
341
+ </InstallExecuteSequence>
342
+ {{/if}}
343
+
344
+ <InstallExecuteSequence>
345
+ <Custom Action="LaunchApplication" After="InstallFinalize">AUTOLAUNCHAPP AND NOT Installed</Custom>
346
+ </InstallExecuteSequence>
347
+
348
+ <SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize"/>
349
+ </Product>
350
+ </Wix>
@@ -0,0 +1,42 @@
1
+ {
2
+ "windows": [
3
+ {
4
+ "url": "https://example.com",
5
+ "url_type": "web",
6
+ "hide_title_bar": true,
7
+ "fullscreen": false,
8
+ "width": 1200,
9
+ "height": 780,
10
+ "resizable": true,
11
+ "always_on_top": false,
12
+ "dark_mode": false,
13
+ "activation_shortcut": "",
14
+ "disabled_web_shortcuts": false,
15
+ "hide_on_close": true,
16
+ "incognito": false,
17
+ "enable_wasm": false,
18
+ "enable_drag_drop": false,
19
+ "maximize": false,
20
+ "start_to_tray": false,
21
+ "force_internal_navigation": false,
22
+ "internal_url_regex": "",
23
+ "enable_find": false,
24
+ "new_window": false
25
+ }
26
+ ],
27
+ "user_agent": {
28
+ "macos": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15",
29
+ "linux": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36",
30
+ "windows": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36"
31
+ },
32
+ "system_tray": {
33
+ "macos": false,
34
+ "linux": true,
35
+ "windows": true
36
+ },
37
+ "system_tray_path": "icons/icon.png",
38
+ "inject": [],
39
+ "proxy_url": "",
40
+ "multi_instance": false,
41
+ "multi_window": false
42
+ }
@@ -0,0 +1,5 @@
1
+ fn main() {
2
+ println!("cargo:rerun-if-changed=.bghitapp/bghitapp.json");
3
+ println!("cargo:rerun-if-changed=.bghitapp/tauri.conf.json");
4
+ tauri_build::build()
5
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "../gen/schemas/desktop-schema.json",
3
+ "identifier": "pake-capability",
4
+ "description": "Capability for the pake app.",
5
+ "webviews": ["pake"],
6
+ "remote": {
7
+ "urls": ["https://*.*"]
8
+ },
9
+ "permissions": [
10
+ "shell:allow-open",
11
+ "core:window:allow-theme",
12
+ "core:window:allow-start-dragging",
13
+ "core:window:allow-toggle-maximize",
14
+ "core:window:allow-is-fullscreen",
15
+ "core:window:allow-set-fullscreen",
16
+ "core:window:allow-set-resizable",
17
+ "core:window:allow-maximize",
18
+ "core:window:allow-minimize",
19
+ "core:window:allow-close",
20
+ "core:webview:allow-internal-toggle-devtools",
21
+ "notification:allow-is-permission-granted",
22
+ "notification:allow-notify",
23
+ "notification:allow-get-active",
24
+ "notification:allow-register-listener",
25
+ "notification:allow-register-action-types",
26
+ "notification:default",
27
+ "core:path:default"
28
+ ]
29
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+
6
+ </dict>
7
+ </plist>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ [source.crates-io]
2
+ replace-with = 'rsproxy-sparse'
3
+ [source.rsproxy]
4
+ registry = "https://rsproxy.cn/crates.io-index"
5
+ [source.rsproxy-sparse]
6
+ registry = "sparse+https://rsproxy.cn/index/"
7
+ [registries.rsproxy]
8
+ index = "https://rsproxy.cn/crates.io-index"
9
+ [net]
10
+ git-fetch-with-cli = true