waybetter 0.1.0 → 0.6.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/README.md +143 -9
- package/bin/waybetter.mjs +46 -0
- package/build/runtime.mjs +105 -0
- package/cli/buildenv.mjs +130 -0
- package/cli/dev.mjs +97 -0
- package/cli/i18n.mjs +382 -0
- package/cli/manifests.mjs +383 -0
- package/cli/privacy.mjs +768 -0
- package/cli/release.mjs +444 -0
- package/cli/remote.mjs +260 -0
- package/cli/store.mjs +326 -0
- package/cli/strings.mjs +121 -0
- package/dist/runtime/column.d.ts +93 -0
- package/dist/runtime/column.js +451 -0
- package/dist/runtime/column.js.map +1 -0
- package/dist/runtime/commandReport.d.ts +19 -0
- package/dist/runtime/commandReport.js +47 -0
- package/dist/runtime/commandReport.js.map +1 -0
- package/dist/runtime/commands.d.ts +72 -0
- package/dist/runtime/commands.js +214 -0
- package/dist/runtime/commands.js.map +1 -0
- package/dist/runtime/devErrors.d.ts +16 -0
- package/dist/runtime/devErrors.js +30 -0
- package/dist/runtime/devErrors.js.map +1 -0
- package/dist/runtime/domHub.d.ts +21 -0
- package/dist/runtime/domHub.js +139 -4
- package/dist/runtime/domHub.js.map +1 -1
- package/dist/runtime/featureModules.d.ts +157 -0
- package/dist/runtime/featureModules.js +484 -0
- package/dist/runtime/featureModules.js.map +1 -0
- package/dist/runtime/featureTable.d.ts +144 -0
- package/dist/runtime/featureTable.js +223 -0
- package/dist/runtime/featureTable.js.map +1 -0
- package/dist/runtime/fonts.d.ts +22 -0
- package/dist/runtime/fonts.js +72 -0
- package/dist/runtime/fonts.js.map +1 -0
- package/dist/runtime/i18n.d.ts +138 -0
- package/dist/runtime/i18n.js +614 -0
- package/dist/runtime/i18n.js.map +1 -0
- package/dist/runtime/i18nCheck.d.ts +30 -0
- package/dist/runtime/i18nCheck.js +224 -0
- package/dist/runtime/i18nCheck.js.map +1 -0
- package/dist/runtime/pageLang.d.ts +8 -0
- package/dist/runtime/pageLang.js +64 -0
- package/dist/runtime/pageLang.js.map +1 -0
- package/dist/runtime/pageStrings.d.ts +35 -0
- package/dist/runtime/pageStrings.js +76 -0
- package/dist/runtime/pageStrings.js.map +1 -0
- package/dist/runtime/panelButton.d.ts +33 -0
- package/dist/runtime/panelButton.js +83 -0
- package/dist/runtime/panelButton.js.map +1 -0
- package/dist/runtime/permissions.d.ts +47 -0
- package/dist/runtime/permissions.js +141 -0
- package/dist/runtime/permissions.js.map +1 -0
- package/dist/runtime/pluginApi.d.ts +51 -2
- package/dist/runtime/pluginApi.js +137 -22
- package/dist/runtime/pluginApi.js.map +1 -1
- package/dist/runtime/pluginI18n.d.ts +29 -0
- package/dist/runtime/pluginI18n.js +119 -0
- package/dist/runtime/pluginI18n.js.map +1 -0
- package/dist/runtime/settingsForm.d.ts +66 -0
- package/dist/runtime/settingsForm.js +114 -0
- package/dist/runtime/settingsForm.js.map +1 -0
- package/dist/runtime/site.d.ts +5 -0
- package/dist/runtime/site.js +1 -1
- package/dist/runtime/site.js.map +1 -1
- package/dist/runtime/siteRuntime.d.ts +144 -0
- package/dist/runtime/siteRuntime.js +175 -0
- package/dist/runtime/siteRuntime.js.map +1 -0
- package/dist/runtime/stringPackHook.d.ts +84 -0
- package/dist/runtime/stringPackHook.js +220 -0
- package/dist/runtime/stringPackHook.js.map +1 -0
- package/dist/runtime/stringPackTranslate.d.ts +59 -0
- package/dist/runtime/stringPackTranslate.js +264 -0
- package/dist/runtime/stringPackTranslate.js.map +1 -0
- package/dist/runtime/stringPacks.d.ts +200 -0
- package/dist/runtime/stringPacks.js +474 -0
- package/dist/runtime/stringPacks.js.map +1 -0
- package/dist/runtime/styles.d.ts +15 -0
- package/dist/runtime/styles.js +81 -0
- package/dist/runtime/styles.js.map +1 -0
- package/dist/runtime/textNet.d.ts +15 -0
- package/dist/runtime/textNet.js +131 -0
- package/dist/runtime/textNet.js.map +1 -0
- package/dist/runtime/themeApi.d.ts +121 -0
- package/dist/runtime/themeApi.js +220 -0
- package/dist/runtime/themeApi.js.map +1 -0
- package/dist/runtime/themeChoice.d.ts +52 -0
- package/dist/runtime/themeChoice.js +69 -0
- package/dist/runtime/themeChoice.js.map +1 -0
- package/dist/runtime/themeComponents.d.ts +435 -0
- package/dist/runtime/themeComponents.js +463 -0
- package/dist/runtime/themeComponents.js.map +1 -0
- package/dist/runtime/themeDecor.d.ts +73 -0
- package/dist/runtime/themeDecor.js +131 -0
- package/dist/runtime/themeDecor.js.map +1 -0
- package/dist/runtime/themeDoctor.d.ts +11 -0
- package/dist/runtime/themeDoctor.js +51 -0
- package/dist/runtime/themeDoctor.js.map +1 -0
- package/dist/runtime/themeIcons.d.ts +130 -0
- package/dist/runtime/themeIcons.js +263 -0
- package/dist/runtime/themeIcons.js.map +1 -0
- package/dist/runtime/themeRuntime.d.ts +100 -0
- package/dist/runtime/themeRuntime.js +497 -0
- package/dist/runtime/themeRuntime.js.map +1 -0
- package/dist/runtime/themeSchema.d.ts +10 -0
- package/dist/runtime/themeSchema.js +150 -0
- package/dist/runtime/themeSchema.js.map +1 -0
- package/dist/runtime/themeSpec.d.ts +259 -0
- package/dist/runtime/themeSpec.js +439 -0
- package/dist/runtime/themeSpec.js.map +1 -0
- package/dist/runtime/themeTokens.d.ts +12 -0
- package/dist/runtime/themeTokens.js +14 -6
- package/dist/runtime/themeTokens.js.map +1 -1
- package/dist/runtime/themeVariants.d.ts +30 -0
- package/dist/runtime/themeVariants.js +53 -0
- package/dist/runtime/themeVariants.js.map +1 -0
- package/dist/runtime/ui.d.ts +192 -0
- package/dist/runtime/ui.js +926 -0
- package/dist/runtime/ui.js.map +1 -0
- package/dist/shell/InstallDialog.d.ts +40 -0
- package/dist/shell/InstallDialog.js +170 -0
- package/dist/shell/InstallDialog.js.map +1 -0
- package/dist/shell/StoreView.d.ts +66 -0
- package/dist/shell/StoreView.js +103 -0
- package/dist/shell/StoreView.js.map +1 -0
- package/dist/shell/addressModel.js.map +1 -1
- package/dist/shell/chrome.js.map +1 -1
- package/dist/shell/deckModel.d.ts +117 -0
- package/dist/shell/deckModel.js +267 -0
- package/dist/shell/deckModel.js.map +1 -0
- package/dist/shell/frame/AccountSwitcher.d.ts +42 -0
- package/dist/shell/frame/AccountSwitcher.js +243 -0
- package/dist/shell/frame/AccountSwitcher.js.map +1 -0
- package/dist/shell/frame/AddColumnDialog.d.ts +8 -0
- package/dist/shell/frame/AddColumnDialog.js +81 -0
- package/dist/shell/frame/AddColumnDialog.js.map +1 -0
- package/dist/shell/frame/AppMenu.d.ts +21 -0
- package/dist/shell/frame/AppMenu.js +642 -0
- package/dist/shell/frame/AppMenu.js.map +1 -0
- package/dist/shell/frame/CommandPalette.d.ts +7 -0
- package/dist/shell/frame/CommandPalette.js +118 -0
- package/dist/shell/frame/CommandPalette.js.map +1 -0
- package/dist/shell/frame/DeckView.d.ts +13 -0
- package/dist/shell/frame/DeckView.js +287 -0
- package/dist/shell/frame/DeckView.js.map +1 -0
- package/dist/shell/frame/FindBar.d.ts +10 -0
- package/dist/shell/frame/FindBar.js +108 -0
- package/dist/shell/frame/FindBar.js.map +1 -0
- package/dist/shell/frame/MediaPanel.d.ts +8 -0
- package/dist/shell/frame/MediaPanel.js +76 -0
- package/dist/shell/frame/MediaPanel.js.map +1 -0
- package/dist/shell/frame/NewTabPage.d.ts +9 -0
- package/dist/shell/frame/NewTabPage.js +71 -0
- package/dist/shell/frame/NewTabPage.js.map +1 -0
- package/dist/shell/frame/PaneTheme.d.ts +16 -0
- package/dist/shell/frame/PaneTheme.js +67 -0
- package/dist/shell/frame/PaneTheme.js.map +1 -0
- package/dist/shell/frame/ReportDialog.d.ts +3 -0
- package/dist/shell/frame/ReportDialog.js +95 -0
- package/dist/shell/frame/ReportDialog.js.map +1 -0
- package/dist/shell/frame/Shell.d.ts +8 -0
- package/dist/shell/frame/Shell.js +1131 -0
- package/dist/shell/frame/Shell.js.map +1 -0
- package/dist/shell/frame/Titlebar.d.ts +16 -0
- package/dist/shell/frame/Titlebar.js +77 -0
- package/dist/shell/frame/Titlebar.js.map +1 -0
- package/dist/shell/frame/TitlebarExtras.d.ts +4 -0
- package/dist/shell/frame/TitlebarExtras.js +202 -0
- package/dist/shell/frame/TitlebarExtras.js.map +1 -0
- package/dist/shell/frame/WebPanel.d.ts +4 -0
- package/dist/shell/frame/WebPanel.js +182 -0
- package/dist/shell/frame/WebPanel.js.map +1 -0
- package/dist/shell/frame/accountModel.d.ts +49 -0
- package/dist/shell/frame/accountModel.js +67 -0
- package/dist/shell/frame/accountModel.js.map +1 -0
- package/dist/shell/frame/accountSwitcher.css +91 -0
- package/dist/shell/frame/appI18n.d.ts +44 -0
- package/dist/shell/frame/appI18n.js +64 -0
- package/dist/shell/frame/appI18n.js.map +1 -0
- package/dist/shell/frame/appMenu.css +121 -0
- package/dist/shell/frame/backupModel.d.ts +38 -0
- package/dist/shell/frame/backupModel.js +192 -0
- package/dist/shell/frame/backupModel.js.map +1 -0
- package/dist/shell/frame/boot.d.ts +8 -0
- package/dist/shell/frame/boot.js +35 -0
- package/dist/shell/frame/boot.js.map +1 -0
- package/dist/shell/frame/brand.d.ts +1 -0
- package/dist/shell/frame/brand.js +4 -0
- package/dist/shell/frame/brand.js.map +1 -0
- package/dist/shell/frame/bridge.d.ts +35 -0
- package/dist/shell/frame/bridge.js +70 -0
- package/dist/shell/frame/bridge.js.map +1 -0
- package/dist/shell/frame/chromeTheme.d.ts +29 -0
- package/dist/shell/frame/chromeTheme.js +81 -0
- package/dist/shell/frame/chromeTheme.js.map +1 -0
- package/dist/shell/frame/deck.css +209 -0
- package/dist/shell/frame/deckStore.d.ts +89 -0
- package/dist/shell/frame/deckStore.js +239 -0
- package/dist/shell/frame/deckStore.js.map +1 -0
- package/dist/shell/frame/devHost.d.ts +35 -0
- package/dist/shell/frame/devHost.js +80 -0
- package/dist/shell/frame/devHost.js.map +1 -0
- package/dist/shell/frame/devModel.d.ts +7 -0
- package/dist/shell/frame/devModel.js +17 -0
- package/dist/shell/frame/devModel.js.map +1 -0
- package/dist/shell/frame/diag.d.ts +7 -0
- package/dist/shell/frame/diag.js +39 -0
- package/dist/shell/frame/diag.js.map +1 -0
- package/dist/shell/frame/findBar.css +14 -0
- package/dist/shell/frame/frameMessages.d.ts +248 -0
- package/dist/shell/frame/frameMessages.js +252 -0
- package/dist/shell/frame/frameMessages.js.map +1 -0
- package/dist/shell/frame/hooks.d.ts +39 -0
- package/dist/shell/frame/hooks.js +97 -0
- package/dist/shell/frame/hooks.js.map +1 -0
- package/dist/shell/frame/i18n.d.ts +27 -0
- package/dist/shell/frame/i18n.js +66 -0
- package/dist/shell/frame/i18n.js.map +1 -0
- package/dist/shell/frame/iconPack.d.ts +11 -0
- package/dist/shell/frame/iconPack.js +45 -0
- package/dist/shell/frame/iconPack.js.map +1 -0
- package/dist/shell/frame/icons.d.ts +71 -0
- package/dist/shell/frame/icons.js +75 -0
- package/dist/shell/frame/icons.js.map +1 -0
- package/dist/shell/frame/index.d.ts +34 -0
- package/dist/shell/frame/index.js +43 -0
- package/dist/shell/frame/index.js.map +1 -0
- package/dist/shell/frame/language.d.ts +58 -0
- package/dist/shell/frame/language.js +165 -0
- package/dist/shell/frame/language.js.map +1 -0
- package/dist/shell/frame/mediaModel.d.ts +34 -0
- package/dist/shell/frame/mediaModel.js +53 -0
- package/dist/shell/frame/mediaModel.js.map +1 -0
- package/dist/shell/frame/menuMessages.en.json +54 -0
- package/dist/shell/frame/menuModel.d.ts +277 -0
- package/dist/shell/frame/menuModel.js +293 -0
- package/dist/shell/frame/menuModel.js.map +1 -0
- package/dist/shell/frame/paletteModel.d.ts +139 -0
- package/dist/shell/frame/paletteModel.js +112 -0
- package/dist/shell/frame/paletteModel.js.map +1 -0
- package/dist/shell/frame/paneTheme.css +9 -0
- package/dist/shell/frame/pluginCommandStore.d.ts +23 -0
- package/dist/shell/frame/pluginCommandStore.js +70 -0
- package/dist/shell/frame/pluginCommandStore.js.map +1 -0
- package/dist/shell/frame/reportModel.d.ts +52 -0
- package/dist/shell/frame/reportModel.js +105 -0
- package/dist/shell/frame/reportModel.js.map +1 -0
- package/dist/shell/frame/safeStore.d.ts +7 -0
- package/dist/shell/frame/safeStore.js +40 -0
- package/dist/shell/frame/safeStore.js.map +1 -0
- package/dist/shell/frame/searchInput.d.ts +2 -0
- package/dist/shell/frame/searchInput.js +11 -0
- package/dist/shell/frame/searchInput.js.map +1 -0
- package/dist/shell/frame/shell.css +629 -0
- package/dist/shell/frame/site.d.ts +206 -0
- package/dist/shell/frame/site.js +22 -0
- package/dist/shell/frame/site.js.map +1 -0
- package/dist/shell/frame/state.d.ts +99 -0
- package/dist/shell/frame/state.js +284 -0
- package/dist/shell/frame/state.js.map +1 -0
- package/dist/shell/frame/syncGate.d.ts +10 -0
- package/dist/shell/frame/syncGate.js +36 -0
- package/dist/shell/frame/syncGate.js.map +1 -0
- package/dist/shell/frame/syncHost.d.ts +35 -0
- package/dist/shell/frame/syncHost.js +85 -0
- package/dist/shell/frame/syncHost.js.map +1 -0
- package/dist/shell/frame/tabStill.d.ts +2 -0
- package/dist/shell/frame/tabStill.js +62 -0
- package/dist/shell/frame/tabStill.js.map +1 -0
- package/dist/shell/frame/themeScopes.d.ts +29 -0
- package/dist/shell/frame/themeScopes.js +61 -0
- package/dist/shell/frame/themeScopes.js.map +1 -0
- package/dist/shell/frame/themeStore.d.ts +99 -0
- package/dist/shell/frame/themeStore.js +252 -0
- package/dist/shell/frame/themeStore.js.map +1 -0
- package/dist/shell/frame/windowBinding.d.ts +2 -0
- package/dist/shell/frame/windowBinding.js +7 -0
- package/dist/shell/frame/windowBinding.js.map +1 -0
- package/dist/shell/frame/workspaceModel.d.ts +82 -0
- package/dist/shell/frame/workspaceModel.js +250 -0
- package/dist/shell/frame/workspaceModel.js.map +1 -0
- package/dist/shell/frame/workspaces.css +84 -0
- package/dist/shell/frame/workspaces.d.ts +22 -0
- package/dist/shell/frame/workspaces.js +125 -0
- package/dist/shell/frame/workspaces.js.map +1 -0
- package/dist/shell/frame/zoomStore.d.ts +10 -0
- package/dist/shell/frame/zoomStore.js +65 -0
- package/dist/shell/frame/zoomStore.js.map +1 -0
- package/dist/shell/installController.d.ts +122 -0
- package/dist/shell/installController.js +146 -0
- package/dist/shell/installController.js.map +1 -0
- package/dist/shell/installerMessages.d.ts +30 -0
- package/dist/shell/installerMessages.js +36 -0
- package/dist/shell/installerMessages.js.map +1 -0
- package/dist/shell/linkDrop.js.map +1 -1
- package/dist/shell/messages.d.ts +16 -0
- package/dist/shell/messages.js +27 -0
- package/dist/shell/messages.js.map +1 -0
- package/dist/shell/palette.js.map +1 -1
- package/dist/shell/paneModel.d.ts +22 -0
- package/dist/shell/paneModel.js +24 -1
- package/dist/shell/paneModel.js.map +1 -1
- package/dist/shell/panel/Appearance.d.ts +8 -0
- package/dist/shell/panel/Appearance.js +256 -0
- package/dist/shell/panel/Appearance.js.map +1 -0
- package/dist/shell/panel/BackupPanel.d.ts +5 -0
- package/dist/shell/panel/BackupPanel.js +198 -0
- package/dist/shell/panel/BackupPanel.js.map +1 -0
- package/dist/shell/panel/DeveloperPanel.d.ts +4 -0
- package/dist/shell/panel/DeveloperPanel.js +51 -0
- package/dist/shell/panel/DeveloperPanel.js.map +1 -0
- package/dist/shell/panel/FeatureToggles.d.ts +13 -0
- package/dist/shell/panel/FeatureToggles.js +42 -0
- package/dist/shell/panel/FeatureToggles.js.map +1 -0
- package/dist/shell/panel/Home.d.ts +3 -0
- package/dist/shell/panel/Home.js +23 -0
- package/dist/shell/panel/Home.js.map +1 -0
- package/dist/shell/panel/IconPackInstall.d.ts +15 -0
- package/dist/shell/panel/IconPackInstall.js +41 -0
- package/dist/shell/panel/IconPackInstall.js.map +1 -0
- package/dist/shell/panel/LanguageSettings.d.ts +1 -0
- package/dist/shell/panel/LanguageSettings.js +54 -0
- package/dist/shell/panel/LanguageSettings.js.map +1 -0
- package/dist/shell/panel/MakePanel.d.ts +3 -0
- package/dist/shell/panel/MakePanel.js +237 -0
- package/dist/shell/panel/MakePanel.js.map +1 -0
- package/dist/shell/panel/MarkdownDoc.d.ts +6 -0
- package/dist/shell/panel/MarkdownDoc.js +35 -0
- package/dist/shell/panel/MarkdownDoc.js.map +1 -0
- package/dist/shell/panel/Modes.d.ts +40 -0
- package/dist/shell/panel/Modes.js +270 -0
- package/dist/shell/panel/Modes.js.map +1 -0
- package/dist/shell/panel/NavIcon.d.ts +4 -0
- package/dist/shell/panel/NavIcon.js +6 -0
- package/dist/shell/panel/NavIcon.js.map +1 -0
- package/dist/shell/panel/Panel.d.ts +7 -0
- package/dist/shell/panel/Panel.js +139 -0
- package/dist/shell/panel/Panel.js.map +1 -0
- package/dist/shell/panel/PluginFeatures.d.ts +24 -0
- package/dist/shell/panel/PluginFeatures.js +165 -0
- package/dist/shell/panel/PluginFeatures.js.map +1 -0
- package/dist/shell/panel/Plugins.d.ts +33 -0
- package/dist/shell/panel/Plugins.js +112 -0
- package/dist/shell/panel/Plugins.js.map +1 -0
- package/dist/shell/panel/PowerSettings.d.ts +4 -0
- package/dist/shell/panel/PowerSettings.js +52 -0
- package/dist/shell/panel/PowerSettings.js.map +1 -0
- package/dist/shell/panel/Settings.d.ts +23 -0
- package/dist/shell/panel/Settings.js +116 -0
- package/dist/shell/panel/Settings.js.map +1 -0
- package/dist/shell/panel/ShareSetup.d.ts +8 -0
- package/dist/shell/panel/ShareSetup.js +130 -0
- package/dist/shell/panel/ShareSetup.js.map +1 -0
- package/dist/shell/panel/StoreSection.d.ts +6 -0
- package/dist/shell/panel/StoreSection.js +48 -0
- package/dist/shell/panel/StoreSection.js.map +1 -0
- package/dist/shell/panel/StringPacks.d.ts +11 -0
- package/dist/shell/panel/StringPacks.js +106 -0
- package/dist/shell/panel/StringPacks.js.map +1 -0
- package/dist/shell/panel/ThemeBuilder.d.ts +5 -0
- package/dist/shell/panel/ThemeBuilder.js +205 -0
- package/dist/shell/panel/ThemeBuilder.js.map +1 -0
- package/dist/shell/panel/backup.css +34 -0
- package/dist/shell/panel/builder.css +232 -0
- package/dist/shell/panel/builderModel.d.ts +55 -0
- package/dist/shell/panel/builderModel.js +95 -0
- package/dist/shell/panel/builderModel.js.map +1 -0
- package/dist/shell/panel/compare.d.ts +10 -0
- package/dist/shell/panel/compare.js +51 -0
- package/dist/shell/panel/compare.js.map +1 -0
- package/dist/shell/panel/controls.d.ts +135 -0
- package/dist/shell/panel/controls.js +213 -0
- package/dist/shell/panel/controls.js.map +1 -0
- package/dist/shell/panel/featureModel.d.ts +69 -0
- package/dist/shell/panel/featureModel.js +79 -0
- package/dist/shell/panel/featureModel.js.map +1 -0
- package/dist/shell/panel/fonts/FontBrowser.d.ts +10 -0
- package/dist/shell/panel/fonts/FontBrowser.js +189 -0
- package/dist/shell/panel/fonts/FontBrowser.js.map +1 -0
- package/dist/shell/panel/fonts/FontRoles.d.ts +20 -0
- package/dist/shell/panel/fonts/FontRoles.js +77 -0
- package/dist/shell/panel/fonts/FontRoles.js.map +1 -0
- package/dist/shell/panel/fonts/catalog.d.ts +37 -0
- package/dist/shell/panel/fonts/catalog.js +68 -0
- package/dist/shell/panel/fonts/catalog.js.map +1 -0
- package/dist/shell/panel/fonts/googleFontsCatalog.json +1 -0
- package/dist/shell/panel/index.d.ts +20 -0
- package/dist/shell/panel/index.js +34 -0
- package/dist/shell/panel/index.js.map +1 -0
- package/dist/shell/panel/languageModel.d.ts +5 -0
- package/dist/shell/panel/languageModel.js +7 -0
- package/dist/shell/panel/languageModel.js.map +1 -0
- package/dist/shell/panel/make.css +72 -0
- package/dist/shell/panel/makeModel.d.ts +32 -0
- package/dist/shell/panel/makeModel.js +84 -0
- package/dist/shell/panel/makeModel.js.map +1 -0
- package/dist/shell/panel/markdown.d.ts +46 -0
- package/dist/shell/panel/markdown.js +100 -0
- package/dist/shell/panel/markdown.js.map +1 -0
- package/dist/shell/panel/nav.d.ts +12 -0
- package/dist/shell/panel/nav.js +50 -0
- package/dist/shell/panel/nav.js.map +1 -0
- package/dist/shell/panel/panel.css +401 -0
- package/dist/shell/panel/panelMessages.d.ts +763 -0
- package/dist/shell/panel/panelMessages.js +767 -0
- package/dist/shell/panel/panelMessages.js.map +1 -0
- package/dist/shell/panel/plugins.css +59 -0
- package/dist/shell/panel/setupModel.d.ts +87 -0
- package/dist/shell/panel/setupModel.js +152 -0
- package/dist/shell/panel/setupModel.js.map +1 -0
- package/dist/shell/panel/site.d.ts +259 -0
- package/dist/shell/panel/site.js +25 -0
- package/dist/shell/panel/site.js.map +1 -0
- package/dist/shell/panel/strings.css +7 -0
- package/dist/shell/panel/themes.d.ts +10 -0
- package/dist/shell/panel/themes.js +8 -0
- package/dist/shell/panel/themes.js.map +1 -0
- package/dist/shell/profileModel.d.ts +3 -2
- package/dist/shell/profileModel.js +7 -5
- package/dist/shell/profileModel.js.map +1 -1
- package/dist/shell/store.css +230 -0
- package/dist/shell/storeMessages.d.ts +169 -0
- package/dist/shell/storeMessages.js +172 -0
- package/dist/shell/storeMessages.js.map +1 -0
- package/dist/shell/storeModel.d.ts +181 -0
- package/dist/shell/storeModel.js +133 -0
- package/dist/shell/storeModel.js.map +1 -0
- package/dist/shell/stringPacksModel.d.ts +44 -0
- package/dist/shell/stringPacksModel.js +94 -0
- package/dist/shell/stringPacksModel.js.map +1 -0
- package/dist/shell/updateModel.d.ts +2 -1
- package/dist/shell/updateModel.js +5 -4
- package/dist/shell/updateModel.js.map +1 -1
- package/dist/shell/windowControls.d.ts +4 -0
- package/dist/shell/windowControls.js +5 -0
- package/dist/shell/windowControls.js.map +1 -1
- package/i18n-config.schema.json +29 -0
- package/i18n-meta.schema.json +26 -0
- package/i18n.schema.json +42 -0
- package/icons.schema.json +646 -0
- package/languages.schema.json +23 -0
- package/locales/ar-x-fm.json +11 -0
- package/locales/ar.json +1281 -0
- package/locales/bg.json +1280 -0
- package/locales/bn.json +1280 -0
- package/locales/ca.json +1280 -0
- package/locales/cs.json +1280 -0
- package/locales/da.json +1280 -0
- package/locales/de.json +1280 -0
- package/locales/el.json +1280 -0
- package/locales/en-GB.json +27 -0
- package/locales/en.json +1280 -0
- package/locales/en.meta.json +51 -0
- package/locales/es.json +1280 -0
- package/locales/eu.json +1280 -0
- package/locales/fa.json +1281 -0
- package/locales/fi.json +1280 -0
- package/locales/fil.json +1280 -0
- package/locales/fr.json +1280 -0
- package/locales/ga.json +1280 -0
- package/locales/gl.json +1280 -0
- package/locales/gu.json +1280 -0
- package/locales/ha.json +1280 -0
- package/locales/he.json +1281 -0
- package/locales/hi.json +1280 -0
- package/locales/hr.json +1280 -0
- package/locales/hu.json +1279 -0
- package/locales/id.json +1280 -0
- package/locales/ig.json +1280 -0
- package/locales/it.json +1280 -0
- package/locales/ja.json +1280 -0
- package/locales/kn.json +1280 -0
- package/locales/ko.json +1280 -0
- package/locales/mr.json +1280 -0
- package/locales/ms.json +1280 -0
- package/locales/nb.json +1280 -0
- package/locales/nl.json +1280 -0
- package/locales/pl.json +1280 -0
- package/locales/pt.json +1280 -0
- package/locales/ro.json +1280 -0
- package/locales/ru.json +1280 -0
- package/locales/sk.json +1280 -0
- package/locales/sr.json +1280 -0
- package/locales/sv.json +1280 -0
- package/locales/ta.json +1280 -0
- package/locales/th.json +1280 -0
- package/locales/tr.json +1280 -0
- package/locales/uk.json +1280 -0
- package/locales/ur.json +1281 -0
- package/locales/vi.json +1280 -0
- package/locales/yo.json +1280 -0
- package/locales/zh-Hans.json +1280 -0
- package/locales/zh-Hant.json +1280 -0
- package/package.json +148 -6
- package/store-catalog.schema.json +65 -0
- package/theme.schema.json +4659 -0
- package/windows/installer.nsi +926 -0
- package/windows/languages/Basque.nsh +28 -0
- package/windows/languages/Catalan.nsh +28 -0
- package/windows/languages/Croatian.nsh +28 -0
- package/windows/languages/Czech.nsh +28 -0
- package/windows/languages/Danish.nsh +28 -0
- package/windows/languages/Finnish.nsh +28 -0
- package/windows/languages/Galician.nsh +28 -0
- package/windows/languages/Greek.nsh +28 -0
- package/windows/languages/Hungarian.nsh +28 -0
- package/windows/languages/Indonesian.nsh +28 -0
- package/windows/languages/Irish.nsh +28 -0
- package/windows/languages/Malay.nsh +28 -0
- package/windows/languages/Polish.nsh +28 -0
- package/windows/languages/Romanian.nsh +28 -0
- package/windows/languages/Serbian.nsh +28 -0
- package/windows/languages/Slovak.nsh +28 -0
- package/windows/languages/Thai.nsh +28 -0
|
@@ -0,0 +1,926 @@
|
|
|
1
|
+
; wayBetter's Windows installer (NSIS), a template for Tauri's bundler: Tauri 2.12's default with
|
|
2
|
+
; every wizard page removed. Point `bundle.windows.nsis.template` in tauri.conf.json at this file.
|
|
3
|
+
;
|
|
4
|
+
; What running the setup does:
|
|
5
|
+
; - nothing installed (or the installed exe is gone): installs for the current user, no UAC and
|
|
6
|
+
; no wizard, makes the Desktop and Start menu shortcuts, opens the app;
|
|
7
|
+
; - the same or a newer version is installed: installs nothing, opens the installed app (its
|
|
8
|
+
; single-instance guard shows the running window) and exits 0. So an old setup left in
|
|
9
|
+
; Downloads can never replace, restart or downgrade an install the updater has moved on;
|
|
10
|
+
; - an older version is installed: upgrades in place (app data untouched), then opens the app;
|
|
11
|
+
; - an install made under the app's old name (see WAYBETTER_LEGACY_NAME below) counts as older,
|
|
12
|
+
; whatever its version number says: it is upgraded in place, data kept.
|
|
13
|
+
; Flags: `/NORUN` never opens the app, `/FORCE` reinstalls the same version (repair; it still never
|
|
14
|
+
; downgrades), `/UPDATE` is the updater's path (tauri-plugin-updater: `/UPDATE /R /ARGS ...`),
|
|
15
|
+
; which always installs and is otherwise Tauri's. `/NS` (no shortcuts) and `/D=<folder>` as in Tauri.
|
|
16
|
+
;
|
|
17
|
+
; An app that shipped under another name keeps its registry keys (one Apps & Features entry, the
|
|
18
|
+
; remembered install folder) by defining the old name in its installer hooks
|
|
19
|
+
; (`bundle.windows.nsis.installerHooks`), which are included before anything here reads it:
|
|
20
|
+
; !define WAYBETTER_LEGACY_NAME "Old Product Name"
|
|
21
|
+
; !define WAYBETTER_LEGACY_MANUFACTURER "Old Publisher" ; optional, defaults to the old name
|
|
22
|
+
; The renamed app may start its version numbers again (a 1.0.0 after an old 1.0.2): an install
|
|
23
|
+
; whose DisplayName is still the old name was written by the old app, and every setup of the
|
|
24
|
+
; renamed app is newer than it.
|
|
25
|
+
Unicode true
|
|
26
|
+
ManifestDPIAware true
|
|
27
|
+
; wayBetter: never show a wizard.
|
|
28
|
+
SilentInstall silent
|
|
29
|
+
; Add in `dpiAwareness` `PerMonitorV2` to manifest for Windows 10 1607+ (note this should not affect lower versions since they should be able to ignore this and pick up `dpiAware` `true` set by `ManifestDPIAware true`)
|
|
30
|
+
; Currently undocumented on NSIS's website but is in the Docs folder of source tree, see
|
|
31
|
+
; https://github.com/kichik/nsis/blob/5fc0b87b819a9eec006df4967d08e522ddd651c9/Docs/src/attributes.but#L286-L300
|
|
32
|
+
; https://github.com/tauri-apps/tauri/pull/10106
|
|
33
|
+
ManifestDPIAwareness PerMonitorV2
|
|
34
|
+
|
|
35
|
+
!if "{{compression}}" == "none"
|
|
36
|
+
SetCompress off
|
|
37
|
+
!else
|
|
38
|
+
; Set the compression algorithm. We default to LZMA.
|
|
39
|
+
SetCompressor /SOLID "{{compression}}"
|
|
40
|
+
!endif
|
|
41
|
+
|
|
42
|
+
; Keep above !include to stay ahead of any plugin command
|
|
43
|
+
; see https://github.com/tauri-apps/tauri/pull/15422#discussion_r3289239624
|
|
44
|
+
{{#if signed_plugins_path}}
|
|
45
|
+
!addplugindir "{{signed_plugins_path}}"
|
|
46
|
+
{{/if}}
|
|
47
|
+
|
|
48
|
+
!include MUI2.nsh
|
|
49
|
+
!include FileFunc.nsh
|
|
50
|
+
!include x64.nsh
|
|
51
|
+
!include WordFunc.nsh
|
|
52
|
+
!include "utils.nsh"
|
|
53
|
+
!include "FileAssociation.nsh"
|
|
54
|
+
!include "Win\COM.nsh"
|
|
55
|
+
!include "Win\Propkey.nsh"
|
|
56
|
+
!include "Win\RestartManager.nsh"
|
|
57
|
+
!include "StrFunc.nsh"
|
|
58
|
+
${StrCase}
|
|
59
|
+
${StrLoc}
|
|
60
|
+
|
|
61
|
+
{{#if installer_hooks}}
|
|
62
|
+
!include "{{installer_hooks}}"
|
|
63
|
+
{{/if}}
|
|
64
|
+
|
|
65
|
+
!define WEBVIEW2APPGUID "{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"
|
|
66
|
+
|
|
67
|
+
!define MANUFACTURER "{{manufacturer}}"
|
|
68
|
+
!define PRODUCTNAME "{{product_name}}"
|
|
69
|
+
!define VERSION "{{version}}"
|
|
70
|
+
!define VERSIONWITHBUILD "{{version_with_build}}"
|
|
71
|
+
!define HOMEPAGE "{{homepage}}"
|
|
72
|
+
!define INSTALLMODE "{{install_mode}}"
|
|
73
|
+
!define LICENSE "{{license}}"
|
|
74
|
+
!define INSTALLERICON "{{installer_icon}}"
|
|
75
|
+
!define SIDEBARIMAGE "{{sidebar_image}}"
|
|
76
|
+
!define HEADERIMAGE "{{header_image}}"
|
|
77
|
+
!define UNINSTALLERICON "{{uninstaller_icon}}"
|
|
78
|
+
!define UNINSTALLERHEADERIMAGE "{{uninstaller_header_image}}"
|
|
79
|
+
!define MAINBINARYNAME "{{main_binary_name}}"
|
|
80
|
+
!define MAINBINARYSRCPATH "{{main_binary_path}}"
|
|
81
|
+
!define BUNDLEID "{{bundle_id}}"
|
|
82
|
+
!define COPYRIGHT "{{copyright}}"
|
|
83
|
+
!define OUTFILE "{{out_file}}"
|
|
84
|
+
!define ARCH "{{arch}}"
|
|
85
|
+
!define ADDITIONALPLUGINSPATH "{{additional_plugins_path}}"
|
|
86
|
+
!define ALLOWDOWNGRADES "{{allow_downgrades}}"
|
|
87
|
+
!define DISPLAYLANGUAGESELECTOR "{{display_language_selector}}"
|
|
88
|
+
!define INSTALLWEBVIEW2MODE "{{install_webview2_mode}}"
|
|
89
|
+
!define WEBVIEW2INSTALLERARGS "{{webview2_installer_args}}"
|
|
90
|
+
!define WEBVIEW2BOOTSTRAPPERPATH "{{webview2_bootstrapper_path}}"
|
|
91
|
+
!define WEBVIEW2INSTALLERPATH "{{webview2_installer_path}}"
|
|
92
|
+
!define MINIMUMWEBVIEW2VERSION "{{minimum_webview2_version}}"
|
|
93
|
+
; wayBetter: an app renamed after its first release defines WAYBETTER_LEGACY_NAME (see the top of
|
|
94
|
+
; this file). Its registry keys keep the old name for good, like the bundle identifier: the updater
|
|
95
|
+
; runs this installer with /UPDATE, RestorePreviousInstallLocation reads the install folder from
|
|
96
|
+
; MANUPRODUCTKEY, and Apps & Features must keep a single entry. The key names are never shown;
|
|
97
|
+
; DisplayName, Publisher, shortcuts and dialogs use ${PRODUCTNAME} / ${MANUFACTURER}.
|
|
98
|
+
!ifdef WAYBETTER_LEGACY_NAME
|
|
99
|
+
!define LEGACYNAME "${WAYBETTER_LEGACY_NAME}"
|
|
100
|
+
!define /ifndef WAYBETTER_LEGACY_MANUFACTURER "${WAYBETTER_LEGACY_NAME}"
|
|
101
|
+
!define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${LEGACYNAME}"
|
|
102
|
+
!define MANUKEY "Software\${WAYBETTER_LEGACY_MANUFACTURER}"
|
|
103
|
+
!define MANUPRODUCTKEY "${MANUKEY}\${LEGACYNAME}"
|
|
104
|
+
!else
|
|
105
|
+
!define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}"
|
|
106
|
+
!define MANUKEY "Software\${MANUFACTURER}"
|
|
107
|
+
!define MANUPRODUCTKEY "${MANUKEY}\${PRODUCTNAME}"
|
|
108
|
+
!endif
|
|
109
|
+
!define UNINSTALLERSIGNCOMMAND "{{uninstaller_sign_cmd}}"
|
|
110
|
+
!define ESTIMATEDSIZE "{{estimated_size}}"
|
|
111
|
+
!define STARTMENUFOLDER "{{start_menu_folder}}"
|
|
112
|
+
|
|
113
|
+
Var PassiveMode
|
|
114
|
+
Var UpdateMode
|
|
115
|
+
Var ForceMode
|
|
116
|
+
Var NoShortcutMode
|
|
117
|
+
Var WixMode
|
|
118
|
+
Var OldMainBinaryName
|
|
119
|
+
Var LegacyInstall
|
|
120
|
+
|
|
121
|
+
Name "${PRODUCTNAME}"
|
|
122
|
+
BrandingText "${COPYRIGHT}"
|
|
123
|
+
OutFile "${OUTFILE}"
|
|
124
|
+
|
|
125
|
+
; We don't actually use this value as default install path,
|
|
126
|
+
; it's just for nsis to append the product name folder in the directory selector
|
|
127
|
+
; https://nsis.sourceforge.io/Reference/InstallDir
|
|
128
|
+
!define PLACEHOLDER_INSTALL_DIR "placeholder\${PRODUCTNAME}"
|
|
129
|
+
InstallDir "${PLACEHOLDER_INSTALL_DIR}"
|
|
130
|
+
|
|
131
|
+
VIProductVersion "${VERSIONWITHBUILD}"
|
|
132
|
+
VIAddVersionKey "ProductName" "${PRODUCTNAME}"
|
|
133
|
+
VIAddVersionKey "FileDescription" "${PRODUCTNAME}"
|
|
134
|
+
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
|
|
135
|
+
VIAddVersionKey "FileVersion" "${VERSION}"
|
|
136
|
+
VIAddVersionKey "ProductVersion" "${VERSION}"
|
|
137
|
+
|
|
138
|
+
# additional plugins
|
|
139
|
+
!addplugindir "${ADDITIONALPLUGINSPATH}"
|
|
140
|
+
|
|
141
|
+
; Uninstaller signing command
|
|
142
|
+
!if "${UNINSTALLERSIGNCOMMAND}" != ""
|
|
143
|
+
!uninstfinalize '${UNINSTALLERSIGNCOMMAND}'
|
|
144
|
+
!endif
|
|
145
|
+
|
|
146
|
+
; Handle install mode, `perUser`, `perMachine` or `both`
|
|
147
|
+
!if "${INSTALLMODE}" == "perMachine"
|
|
148
|
+
RequestExecutionLevel admin
|
|
149
|
+
!endif
|
|
150
|
+
|
|
151
|
+
!if "${INSTALLMODE}" == "currentUser"
|
|
152
|
+
RequestExecutionLevel user
|
|
153
|
+
!endif
|
|
154
|
+
|
|
155
|
+
!if "${INSTALLMODE}" == "both"
|
|
156
|
+
!define MULTIUSER_MUI
|
|
157
|
+
!define MULTIUSER_INSTALLMODE_INSTDIR "${PRODUCTNAME}"
|
|
158
|
+
!define MULTIUSER_INSTALLMODE_COMMANDLINE
|
|
159
|
+
!if "${ARCH}" == "x64"
|
|
160
|
+
!define MULTIUSER_USE_PROGRAMFILES64
|
|
161
|
+
!else if "${ARCH}" == "arm64"
|
|
162
|
+
!define MULTIUSER_USE_PROGRAMFILES64
|
|
163
|
+
!endif
|
|
164
|
+
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${UNINSTKEY}"
|
|
165
|
+
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "CurrentUser"
|
|
166
|
+
!define MULTIUSER_INSTALLMODEPAGE_SHOWUSERNAME
|
|
167
|
+
!define MULTIUSER_INSTALLMODE_FUNCTION RestorePreviousInstallLocation
|
|
168
|
+
!define MULTIUSER_EXECUTIONLEVEL Highest
|
|
169
|
+
!include MultiUser.nsh
|
|
170
|
+
!endif
|
|
171
|
+
|
|
172
|
+
; Installer icon
|
|
173
|
+
!if "${INSTALLERICON}" != ""
|
|
174
|
+
!define MUI_ICON "${INSTALLERICON}"
|
|
175
|
+
!endif
|
|
176
|
+
|
|
177
|
+
; Installer sidebar image
|
|
178
|
+
!if "${SIDEBARIMAGE}" != ""
|
|
179
|
+
!define MUI_WELCOMEFINISHPAGE_BITMAP "${SIDEBARIMAGE}"
|
|
180
|
+
!endif
|
|
181
|
+
|
|
182
|
+
; Enable header images for installer and uninstaller pages when either image is configured.
|
|
183
|
+
!if "${HEADERIMAGE}" != ""
|
|
184
|
+
!define MUI_HEADERIMAGE
|
|
185
|
+
!else if "${UNINSTALLERHEADERIMAGE}" != ""
|
|
186
|
+
!define MUI_HEADERIMAGE
|
|
187
|
+
!endif
|
|
188
|
+
|
|
189
|
+
; Installer header image
|
|
190
|
+
!if "${HEADERIMAGE}" != ""
|
|
191
|
+
!define MUI_HEADERIMAGE_BITMAP "${HEADERIMAGE}"
|
|
192
|
+
!endif
|
|
193
|
+
|
|
194
|
+
; Uninstaller header image
|
|
195
|
+
!if "${UNINSTALLERHEADERIMAGE}" != ""
|
|
196
|
+
!define MUI_HEADERIMAGE_UNBITMAP "${UNINSTALLERHEADERIMAGE}"
|
|
197
|
+
!endif
|
|
198
|
+
|
|
199
|
+
; Uninstaller icon
|
|
200
|
+
!if "${UNINSTALLERICON}" != ""
|
|
201
|
+
!define MUI_UNICON "${UNINSTALLERICON}"
|
|
202
|
+
!endif
|
|
203
|
+
|
|
204
|
+
; Define registry key to store installer language
|
|
205
|
+
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
|
|
206
|
+
!define MUI_LANGDLL_REGISTRY_KEY "${MANUPRODUCTKEY}"
|
|
207
|
+
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
|
208
|
+
|
|
209
|
+
; wayBetter: no wizard. Every installer page is removed and the installer always runs
|
|
210
|
+
; silently (per-user, no UAC). A first install launches the app when it finishes; the updater's
|
|
211
|
+
; `/UPDATE /R /ARGS ...` path below is unchanged, so tauri-plugin-updater keeps working.
|
|
212
|
+
; Only the start-menu page is declared, always skipped, because MUI_STARTMENU_WRITE_* needs it.
|
|
213
|
+
Var AppStartMenuFolder
|
|
214
|
+
!if "${STARTMENUFOLDER}" != ""
|
|
215
|
+
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${STARTMENUFOLDER}"
|
|
216
|
+
!endif
|
|
217
|
+
!define MUI_PAGE_CUSTOMFUNCTION_PRE Skip
|
|
218
|
+
!insertmacro MUI_PAGE_STARTMENU Application $AppStartMenuFolder
|
|
219
|
+
|
|
220
|
+
; Progress page: never shown because the installer is silent.
|
|
221
|
+
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
|
|
222
|
+
!insertmacro MUI_PAGE_INSTFILES
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
; Uninstaller Pages
|
|
226
|
+
; 1. Confirm uninstall page
|
|
227
|
+
Var DeleteAppDataCheckbox
|
|
228
|
+
Var DeleteAppDataCheckboxState
|
|
229
|
+
!define /ifndef WS_EX_LAYOUTRTL 0x00400000
|
|
230
|
+
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ConfirmShow
|
|
231
|
+
Function un.ConfirmShow ; Add add a `Delete app data` check box
|
|
232
|
+
; $1 inner dialog HWND
|
|
233
|
+
; $2 window DPI
|
|
234
|
+
; $3 style
|
|
235
|
+
; $4 x
|
|
236
|
+
; $5 y
|
|
237
|
+
; $6 width
|
|
238
|
+
; $7 height
|
|
239
|
+
FindWindow $1 "#32770" "" $HWNDPARENT ; Find inner dialog
|
|
240
|
+
System::Call "user32::GetDpiForWindow(p r1) i .r2"
|
|
241
|
+
${If} $(^RTL) = 1
|
|
242
|
+
StrCpy $3 "${__NSD_CheckBox_EXSTYLE} | ${WS_EX_LAYOUTRTL}"
|
|
243
|
+
IntOp $4 50 * $2
|
|
244
|
+
${Else}
|
|
245
|
+
StrCpy $3 "${__NSD_CheckBox_EXSTYLE}"
|
|
246
|
+
IntOp $4 0 * $2
|
|
247
|
+
${EndIf}
|
|
248
|
+
IntOp $5 100 * $2
|
|
249
|
+
IntOp $6 400 * $2
|
|
250
|
+
IntOp $7 25 * $2
|
|
251
|
+
IntOp $4 $4 / 96
|
|
252
|
+
IntOp $5 $5 / 96
|
|
253
|
+
IntOp $6 $6 / 96
|
|
254
|
+
IntOp $7 $7 / 96
|
|
255
|
+
System::Call 'user32::CreateWindowEx(i r3, w "${__NSD_CheckBox_CLASS}", w "$(deleteAppData)", i ${__NSD_CheckBox_STYLE}, i r4, i r5, i r6, i r7, p r1, i0, i0, i0) i .s'
|
|
256
|
+
Pop $DeleteAppDataCheckbox
|
|
257
|
+
SendMessage $HWNDPARENT ${WM_GETFONT} 0 0 $1
|
|
258
|
+
SendMessage $DeleteAppDataCheckbox ${WM_SETFONT} $1 1
|
|
259
|
+
FunctionEnd
|
|
260
|
+
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.ConfirmLeave
|
|
261
|
+
Function un.ConfirmLeave
|
|
262
|
+
SendMessage $DeleteAppDataCheckbox ${BM_GETCHECK} 0 0 $DeleteAppDataCheckboxState
|
|
263
|
+
FunctionEnd
|
|
264
|
+
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.SkipIfPassive
|
|
265
|
+
!insertmacro MUI_UNPAGE_CONFIRM
|
|
266
|
+
|
|
267
|
+
; 2. Uninstalling Page
|
|
268
|
+
!insertmacro MUI_UNPAGE_INSTFILES
|
|
269
|
+
|
|
270
|
+
;Languages
|
|
271
|
+
{{#each languages}}
|
|
272
|
+
!insertmacro MUI_LANGUAGE "{{this}}"
|
|
273
|
+
{{/each}}
|
|
274
|
+
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
275
|
+
{{#each language_files}}
|
|
276
|
+
!include "{{this}}"
|
|
277
|
+
{{/each}}
|
|
278
|
+
|
|
279
|
+
Function .onInit
|
|
280
|
+
${GetOptions} $CMDLINE "/P" $PassiveMode
|
|
281
|
+
${IfNot} ${Errors}
|
|
282
|
+
StrCpy $PassiveMode 1
|
|
283
|
+
${EndIf}
|
|
284
|
+
|
|
285
|
+
${GetOptions} $CMDLINE "/NS" $NoShortcutMode
|
|
286
|
+
${IfNot} ${Errors}
|
|
287
|
+
StrCpy $NoShortcutMode 1
|
|
288
|
+
${EndIf}
|
|
289
|
+
|
|
290
|
+
${GetOptions} $CMDLINE "/UPDATE" $UpdateMode
|
|
291
|
+
${IfNot} ${Errors}
|
|
292
|
+
StrCpy $UpdateMode 1
|
|
293
|
+
${EndIf}
|
|
294
|
+
|
|
295
|
+
${GetOptions} $CMDLINE "/FORCE" $ForceMode
|
|
296
|
+
${IfNot} ${Errors}
|
|
297
|
+
StrCpy $ForceMode 1
|
|
298
|
+
${EndIf}
|
|
299
|
+
|
|
300
|
+
!if "${DISPLAYLANGUAGESELECTOR}" == "true"
|
|
301
|
+
!insertmacro MUI_LANGDLL_DISPLAY
|
|
302
|
+
!endif
|
|
303
|
+
|
|
304
|
+
!insertmacro SetContext
|
|
305
|
+
|
|
306
|
+
${If} $INSTDIR == "${PLACEHOLDER_INSTALL_DIR}"
|
|
307
|
+
; Set default install location
|
|
308
|
+
!if "${INSTALLMODE}" == "perMachine"
|
|
309
|
+
${If} ${RunningX64}
|
|
310
|
+
!if "${ARCH}" == "x64"
|
|
311
|
+
StrCpy $INSTDIR "$PROGRAMFILES64\${PRODUCTNAME}"
|
|
312
|
+
!else if "${ARCH}" == "arm64"
|
|
313
|
+
StrCpy $INSTDIR "$PROGRAMFILES64\${PRODUCTNAME}"
|
|
314
|
+
!else
|
|
315
|
+
StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCTNAME}"
|
|
316
|
+
!endif
|
|
317
|
+
${Else}
|
|
318
|
+
StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCTNAME}"
|
|
319
|
+
${EndIf}
|
|
320
|
+
!else if "${INSTALLMODE}" == "currentUser"
|
|
321
|
+
StrCpy $INSTDIR "$LOCALAPPDATA\${PRODUCTNAME}"
|
|
322
|
+
!endif
|
|
323
|
+
|
|
324
|
+
Call RestorePreviousInstallLocation
|
|
325
|
+
${EndIf}
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
!if "${INSTALLMODE}" == "both"
|
|
329
|
+
!insertmacro MULTIUSER_INIT
|
|
330
|
+
!endif
|
|
331
|
+
|
|
332
|
+
; wayBetter: a setup run by hand (not the updater) opens an install that is already current
|
|
333
|
+
; instead of replacing it.
|
|
334
|
+
${If} $UpdateMode <> 1
|
|
335
|
+
Call OpenInstalledIfCurrent
|
|
336
|
+
${EndIf}
|
|
337
|
+
FunctionEnd
|
|
338
|
+
|
|
339
|
+
; wayBetter: $LegacyInstall = 1 when the install recorded in ${UNINSTKEY} was made by the app under
|
|
340
|
+
; its old name (its DisplayName is still ${LEGACYNAME}; this template writes ${PRODUCTNAME}), else 0.
|
|
341
|
+
; Such an install is older than this setup whatever its version number says.
|
|
342
|
+
!macro WaybetterLegacyInstall
|
|
343
|
+
StrCpy $LegacyInstall 0
|
|
344
|
+
!ifdef LEGACYNAME
|
|
345
|
+
ReadRegStr $R6 SHCTX "${UNINSTKEY}" "DisplayName"
|
|
346
|
+
${If} $R6 == "${LEGACYNAME}"
|
|
347
|
+
StrCpy $LegacyInstall 1
|
|
348
|
+
${EndIf}
|
|
349
|
+
!endif
|
|
350
|
+
!macroend
|
|
351
|
+
|
|
352
|
+
; wayBetter: when the app is installed in $INSTDIR at this setup's version or a newer one, open it
|
|
353
|
+
; and quit with exit code 0: nothing is copied, no running app is closed, nothing is downgraded.
|
|
354
|
+
; Returns (and the install goes ahead) when nothing is installed, when the registry names an install
|
|
355
|
+
; whose exe is gone, when the installed version is older, when the install was made under the app's
|
|
356
|
+
; old name, or on /FORCE with the same version.
|
|
357
|
+
Function OpenInstalledIfCurrent
|
|
358
|
+
; $R1 the installed exe's name, $R2 the installed version, $R3 this setup compared to it
|
|
359
|
+
ReadRegStr $R1 SHCTX "${UNINSTKEY}" "MainBinaryName"
|
|
360
|
+
${If} $R1 == ""
|
|
361
|
+
StrCpy $R1 "${MAINBINARYNAME}.exe"
|
|
362
|
+
${EndIf}
|
|
363
|
+
${IfNot} ${FileExists} "$INSTDIR\$R1"
|
|
364
|
+
Return
|
|
365
|
+
${EndIf}
|
|
366
|
+
|
|
367
|
+
; Installed under the old name: older, whatever its number (upgrade in place).
|
|
368
|
+
!insertmacro WaybetterLegacyInstall
|
|
369
|
+
${If} $LegacyInstall = 1
|
|
370
|
+
Return
|
|
371
|
+
${EndIf}
|
|
372
|
+
|
|
373
|
+
ReadRegStr $R2 SHCTX "${UNINSTKEY}" "DisplayVersion"
|
|
374
|
+
${If} $R2 == ""
|
|
375
|
+
; No version in the registry: the exe's own file version, a.b.c.d -> a.b.c
|
|
376
|
+
ClearErrors
|
|
377
|
+
${GetFileVersion} "$INSTDIR\$R1" $R2
|
|
378
|
+
${If} ${Errors}
|
|
379
|
+
${OrIf} $R2 == ""
|
|
380
|
+
Return
|
|
381
|
+
${EndIf}
|
|
382
|
+
${WordFind} $R2 "." "+1" $R3
|
|
383
|
+
${WordFind} $R2 "." "+2" $R4
|
|
384
|
+
${WordFind} $R2 "." "+3" $R5
|
|
385
|
+
StrCpy $R2 "$R3.$R4.$R5"
|
|
386
|
+
${EndIf}
|
|
387
|
+
|
|
388
|
+
; 1: this setup is newer, 0: the same version, -1: this setup is older
|
|
389
|
+
nsis_tauri_utils::SemverCompare "${VERSION}" $R2
|
|
390
|
+
Pop $R3
|
|
391
|
+
${If} $R3 = 1
|
|
392
|
+
Return
|
|
393
|
+
${EndIf}
|
|
394
|
+
${If} $R3 = 0
|
|
395
|
+
${AndIf} $ForceMode = 1
|
|
396
|
+
Return
|
|
397
|
+
${EndIf}
|
|
398
|
+
|
|
399
|
+
${GetOptions} $CMDLINE "/NORUN" $R0
|
|
400
|
+
${If} ${Errors}
|
|
401
|
+
; Hand over this setup's right to take the foreground (ASFW_ANY), so the running app's window
|
|
402
|
+
; can come to the front when its single-instance guard hears about the second launch.
|
|
403
|
+
System::Call 'user32::AllowSetForegroundWindow(i -1)'
|
|
404
|
+
nsis_tauri_utils::RunAsUser "$INSTDIR\$R1" ""
|
|
405
|
+
${EndIf}
|
|
406
|
+
SetErrorLevel 0
|
|
407
|
+
Quit
|
|
408
|
+
FunctionEnd
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
Section EarlyChecks
|
|
412
|
+
; Abort silent installer if downgrades is disabled
|
|
413
|
+
!if "${ALLOWDOWNGRADES}" == "false"
|
|
414
|
+
${If} ${Silent}
|
|
415
|
+
; If downgrading (wayBetter: there is no reinstall page to compare the versions, so here)
|
|
416
|
+
StrCpy $R0 0
|
|
417
|
+
ReadRegStr $R2 SHCTX "${UNINSTKEY}" "DisplayVersion"
|
|
418
|
+
; (An install made under the app's old name is never a downgrade target: it is older.)
|
|
419
|
+
!insertmacro WaybetterLegacyInstall
|
|
420
|
+
${If} $R2 != ""
|
|
421
|
+
${AndIf} $LegacyInstall <> 1
|
|
422
|
+
nsis_tauri_utils::SemverCompare "${VERSION}" $R2
|
|
423
|
+
Pop $R0
|
|
424
|
+
${EndIf}
|
|
425
|
+
${If} $R0 = -1
|
|
426
|
+
System::Call 'kernel32::AttachConsole(i -1)i.r0'
|
|
427
|
+
${If} $0 <> 0
|
|
428
|
+
System::Call 'kernel32::GetStdHandle(i -11)i.r0'
|
|
429
|
+
System::call 'kernel32::SetConsoleTextAttribute(i r0, i 0x0004)' ; set red color
|
|
430
|
+
FileWrite $0 "$(silentDowngrades)"
|
|
431
|
+
${EndIf}
|
|
432
|
+
Abort
|
|
433
|
+
${EndIf}
|
|
434
|
+
${EndIf}
|
|
435
|
+
!endif
|
|
436
|
+
|
|
437
|
+
SectionEnd
|
|
438
|
+
|
|
439
|
+
Section WebView2
|
|
440
|
+
; Check if Webview2 is already installed and skip this section
|
|
441
|
+
${If} ${RunningX64}
|
|
442
|
+
ReadRegStr $4 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\${WEBVIEW2APPGUID}" "pv"
|
|
443
|
+
${Else}
|
|
444
|
+
ReadRegStr $4 HKLM "SOFTWARE\Microsoft\EdgeUpdate\Clients\${WEBVIEW2APPGUID}" "pv"
|
|
445
|
+
${EndIf}
|
|
446
|
+
${If} $4 == ""
|
|
447
|
+
ReadRegStr $4 HKCU "SOFTWARE\Microsoft\EdgeUpdate\Clients\${WEBVIEW2APPGUID}" "pv"
|
|
448
|
+
${EndIf}
|
|
449
|
+
|
|
450
|
+
${If} $4 == ""
|
|
451
|
+
; Webview2 installation
|
|
452
|
+
;
|
|
453
|
+
; Skip if updating
|
|
454
|
+
${If} $UpdateMode <> 1
|
|
455
|
+
!if "${INSTALLWEBVIEW2MODE}" == "downloadBootstrapper"
|
|
456
|
+
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
|
457
|
+
DetailPrint "$(webview2Downloading)"
|
|
458
|
+
NSISdl::download "https://go.microsoft.com/fwlink/p/?LinkId=2124703" "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
|
459
|
+
Pop $0
|
|
460
|
+
${If} $0 == "success"
|
|
461
|
+
DetailPrint "$(webview2DownloadSuccess)"
|
|
462
|
+
${Else}
|
|
463
|
+
DetailPrint "$(webview2DownloadError)"
|
|
464
|
+
Abort "$(webview2AbortError)"
|
|
465
|
+
${EndIf}
|
|
466
|
+
StrCpy $6 "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
|
467
|
+
Goto install_webview2
|
|
468
|
+
!endif
|
|
469
|
+
|
|
470
|
+
!if "${INSTALLWEBVIEW2MODE}" == "embedBootstrapper"
|
|
471
|
+
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
|
472
|
+
File "/oname=$TEMP\MicrosoftEdgeWebview2Setup.exe" "${WEBVIEW2BOOTSTRAPPERPATH}"
|
|
473
|
+
DetailPrint "$(installingWebview2)"
|
|
474
|
+
StrCpy $6 "$TEMP\MicrosoftEdgeWebview2Setup.exe"
|
|
475
|
+
Goto install_webview2
|
|
476
|
+
!endif
|
|
477
|
+
|
|
478
|
+
!if "${INSTALLWEBVIEW2MODE}" == "offlineInstaller"
|
|
479
|
+
Delete "$TEMP\MicrosoftEdgeWebView2RuntimeInstaller.exe"
|
|
480
|
+
File "/oname=$TEMP\MicrosoftEdgeWebView2RuntimeInstaller.exe" "${WEBVIEW2INSTALLERPATH}"
|
|
481
|
+
DetailPrint "$(installingWebview2)"
|
|
482
|
+
StrCpy $6 "$TEMP\MicrosoftEdgeWebView2RuntimeInstaller.exe"
|
|
483
|
+
Goto install_webview2
|
|
484
|
+
!endif
|
|
485
|
+
|
|
486
|
+
Goto webview2_done
|
|
487
|
+
|
|
488
|
+
install_webview2:
|
|
489
|
+
DetailPrint "$(installingWebview2)"
|
|
490
|
+
; $6 holds the path to the webview2 installer
|
|
491
|
+
ExecWait "$6 ${WEBVIEW2INSTALLERARGS} /install" $1
|
|
492
|
+
${If} $1 = 0
|
|
493
|
+
DetailPrint "$(webview2InstallSuccess)"
|
|
494
|
+
${Else}
|
|
495
|
+
DetailPrint "$(webview2InstallError)"
|
|
496
|
+
Abort "$(webview2AbortError)"
|
|
497
|
+
${EndIf}
|
|
498
|
+
webview2_done:
|
|
499
|
+
${EndIf}
|
|
500
|
+
${Else}
|
|
501
|
+
!if "${MINIMUMWEBVIEW2VERSION}" != ""
|
|
502
|
+
${VersionCompare} "${MINIMUMWEBVIEW2VERSION}" "$4" $R0
|
|
503
|
+
${If} $R0 = 1
|
|
504
|
+
update_webview:
|
|
505
|
+
DetailPrint "$(installingWebview2)"
|
|
506
|
+
${If} ${RunningX64}
|
|
507
|
+
ReadRegStr $R1 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate" "path"
|
|
508
|
+
${Else}
|
|
509
|
+
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\EdgeUpdate" "path"
|
|
510
|
+
${EndIf}
|
|
511
|
+
${If} $R1 == ""
|
|
512
|
+
ReadRegStr $R1 HKCU "SOFTWARE\Microsoft\EdgeUpdate" "path"
|
|
513
|
+
${EndIf}
|
|
514
|
+
${If} $R1 != ""
|
|
515
|
+
; Chromium updater docs: https://source.chromium.org/chromium/chromium/src/+/main:docs/updater/user_manual.md
|
|
516
|
+
; Modified from "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView\ModifyPath"
|
|
517
|
+
ExecWait `"$R1" /install appguid=${WEBVIEW2APPGUID}&needsadmin=true` $1
|
|
518
|
+
${If} $1 = 0
|
|
519
|
+
DetailPrint "$(webview2InstallSuccess)"
|
|
520
|
+
${Else}
|
|
521
|
+
MessageBox MB_ICONEXCLAMATION|MB_ABORTRETRYIGNORE "$(webview2InstallError)" IDIGNORE ignore IDRETRY update_webview
|
|
522
|
+
Quit
|
|
523
|
+
ignore:
|
|
524
|
+
${EndIf}
|
|
525
|
+
${EndIf}
|
|
526
|
+
${EndIf}
|
|
527
|
+
!endif
|
|
528
|
+
${EndIf}
|
|
529
|
+
SectionEnd
|
|
530
|
+
|
|
531
|
+
Section Install
|
|
532
|
+
SetOutPath $INSTDIR
|
|
533
|
+
|
|
534
|
+
!ifmacrodef NSIS_HOOK_PREINSTALL
|
|
535
|
+
!insertmacro NSIS_HOOK_PREINSTALL
|
|
536
|
+
!endif
|
|
537
|
+
|
|
538
|
+
!insertmacro CheckIfAppIsRunning "$INSTDIR\${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
|
539
|
+
|
|
540
|
+
; Copy main executable
|
|
541
|
+
File "${MAINBINARYSRCPATH}"
|
|
542
|
+
|
|
543
|
+
; Copy resources
|
|
544
|
+
{{#each resources_dirs}}
|
|
545
|
+
CreateDirectory "$INSTDIR\\{{this}}"
|
|
546
|
+
{{/each}}
|
|
547
|
+
{{#each resources}}
|
|
548
|
+
File /a "/oname={{this.[1]}}" "{{no-escape @key}}"
|
|
549
|
+
{{/each}}
|
|
550
|
+
|
|
551
|
+
; Copy external binaries
|
|
552
|
+
{{#each binaries}}
|
|
553
|
+
File /a "/oname={{this}}" "{{no-escape @key}}"
|
|
554
|
+
{{/each}}
|
|
555
|
+
|
|
556
|
+
; Create file associations
|
|
557
|
+
{{#each file_associations as |association| ~}}
|
|
558
|
+
{{#each association.ext as |ext| ~}}
|
|
559
|
+
!insertmacro APP_ASSOCIATE "{{ext}}" "{{or association.name ext}}" "{{association-description association.description ext}}" "$INSTDIR\${MAINBINARYNAME}.exe,0" "Open with ${PRODUCTNAME}" "$INSTDIR\${MAINBINARYNAME}.exe $\"%1$\""
|
|
560
|
+
{{/each}}
|
|
561
|
+
{{/each}}
|
|
562
|
+
|
|
563
|
+
; Register deep links
|
|
564
|
+
{{#each deep_link_protocols as |protocol| ~}}
|
|
565
|
+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}" "URL Protocol" ""
|
|
566
|
+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}" "" "URL:${BUNDLEID} protocol"
|
|
567
|
+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}\DefaultIcon" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\",0"
|
|
568
|
+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}\shell\open\command" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
|
|
569
|
+
{{/each}}
|
|
570
|
+
|
|
571
|
+
; Create uninstaller
|
|
572
|
+
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
573
|
+
|
|
574
|
+
; Save $INSTDIR in registry for future installations
|
|
575
|
+
WriteRegStr SHCTX "${MANUPRODUCTKEY}" "" $INSTDIR
|
|
576
|
+
|
|
577
|
+
!if "${INSTALLMODE}" == "both"
|
|
578
|
+
; Save install mode to be selected by default for the next installation such as updating
|
|
579
|
+
; or when uninstalling
|
|
580
|
+
WriteRegStr SHCTX "${UNINSTKEY}" $MultiUser.InstallMode 1
|
|
581
|
+
!endif
|
|
582
|
+
|
|
583
|
+
; Remove old main binary if it doesn't match new main binary name
|
|
584
|
+
ReadRegStr $OldMainBinaryName SHCTX "${UNINSTKEY}" "MainBinaryName"
|
|
585
|
+
${If} $OldMainBinaryName != ""
|
|
586
|
+
${AndIf} $OldMainBinaryName != "${MAINBINARYNAME}.exe"
|
|
587
|
+
Delete "$INSTDIR\$OldMainBinaryName"
|
|
588
|
+
${EndIf}
|
|
589
|
+
|
|
590
|
+
; Save current MAINBINARYNAME for future updates
|
|
591
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "MainBinaryName" "${MAINBINARYNAME}.exe"
|
|
592
|
+
|
|
593
|
+
; Registry information for add/remove programs
|
|
594
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "DisplayName" "${PRODUCTNAME}"
|
|
595
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "DisplayIcon" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\""
|
|
596
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "DisplayVersion" "${VERSION}"
|
|
597
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "Publisher" "${MANUFACTURER}"
|
|
598
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "InstallLocation" "$\"$INSTDIR$\""
|
|
599
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
|
600
|
+
WriteRegDWORD SHCTX "${UNINSTKEY}" "NoModify" "1"
|
|
601
|
+
WriteRegDWORD SHCTX "${UNINSTKEY}" "NoRepair" "1"
|
|
602
|
+
|
|
603
|
+
${GetSize} "$INSTDIR" "/M=uninstall.exe /S=0K /G=0" $0 $1 $2
|
|
604
|
+
IntOp $0 $0 + ${ESTIMATEDSIZE}
|
|
605
|
+
IntFmt $0 "0x%08X" $0
|
|
606
|
+
WriteRegDWORD SHCTX "${UNINSTKEY}" "EstimatedSize" "$0"
|
|
607
|
+
|
|
608
|
+
!if "${HOMEPAGE}" != ""
|
|
609
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "URLInfoAbout" "${HOMEPAGE}"
|
|
610
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "URLUpdateInfo" "${HOMEPAGE}"
|
|
611
|
+
WriteRegStr SHCTX "${UNINSTKEY}" "HelpLink" "${HOMEPAGE}"
|
|
612
|
+
!endif
|
|
613
|
+
|
|
614
|
+
; Create start menu shortcut
|
|
615
|
+
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
616
|
+
Call CreateOrUpdateStartMenuShortcut
|
|
617
|
+
!insertmacro MUI_STARTMENU_WRITE_END
|
|
618
|
+
|
|
619
|
+
; Create desktop shortcut for silent and passive installers
|
|
620
|
+
; because finish page will be skipped
|
|
621
|
+
${If} $PassiveMode = 1
|
|
622
|
+
${OrIf} ${Silent}
|
|
623
|
+
Call CreateOrUpdateDesktopShortcut
|
|
624
|
+
${EndIf}
|
|
625
|
+
|
|
626
|
+
!ifmacrodef NSIS_HOOK_POSTINSTALL
|
|
627
|
+
!insertmacro NSIS_HOOK_POSTINSTALL
|
|
628
|
+
!endif
|
|
629
|
+
|
|
630
|
+
; Auto close this page for passive mode
|
|
631
|
+
${If} $PassiveMode = 1
|
|
632
|
+
SetAutoClose true
|
|
633
|
+
${EndIf}
|
|
634
|
+
SectionEnd
|
|
635
|
+
|
|
636
|
+
Function .onInstSuccess
|
|
637
|
+
; Check for `/R` flag only in silent and passive installers because
|
|
638
|
+
; GUI installer has a toggle for the user to (re)start the app
|
|
639
|
+
${If} $PassiveMode = 1
|
|
640
|
+
${OrIf} ${Silent}
|
|
641
|
+
${GetOptions} $CMDLINE "/R" $R0
|
|
642
|
+
${IfNot} ${Errors}
|
|
643
|
+
${GetOptions} $CMDLINE "/ARGS" $R0
|
|
644
|
+
nsis_tauri_utils::RunAsUser "$INSTDIR\${MAINBINARYNAME}.exe" "$R0"
|
|
645
|
+
Return
|
|
646
|
+
${EndIf}
|
|
647
|
+
${EndIf}
|
|
648
|
+
; wayBetter: a first install (not an update) opens the app, unless `/NORUN` is passed.
|
|
649
|
+
${If} $UpdateMode <> 1
|
|
650
|
+
${GetOptions} $CMDLINE "/NORUN" $R0
|
|
651
|
+
${If} ${Errors}
|
|
652
|
+
nsis_tauri_utils::RunAsUser "$INSTDIR\${MAINBINARYNAME}.exe" ""
|
|
653
|
+
${EndIf}
|
|
654
|
+
${EndIf}
|
|
655
|
+
FunctionEnd
|
|
656
|
+
|
|
657
|
+
Function un.onInit
|
|
658
|
+
!insertmacro SetContext
|
|
659
|
+
|
|
660
|
+
!if "${INSTALLMODE}" == "both"
|
|
661
|
+
!insertmacro MULTIUSER_UNINIT
|
|
662
|
+
!endif
|
|
663
|
+
|
|
664
|
+
!insertmacro MUI_UNGETLANGUAGE
|
|
665
|
+
|
|
666
|
+
${GetOptions} $CMDLINE "/P" $PassiveMode
|
|
667
|
+
${IfNot} ${Errors}
|
|
668
|
+
StrCpy $PassiveMode 1
|
|
669
|
+
${EndIf}
|
|
670
|
+
|
|
671
|
+
${GetOptions} $CMDLINE "/UPDATE" $UpdateMode
|
|
672
|
+
${IfNot} ${Errors}
|
|
673
|
+
StrCpy $UpdateMode 1
|
|
674
|
+
${EndIf}
|
|
675
|
+
FunctionEnd
|
|
676
|
+
|
|
677
|
+
Section Uninstall
|
|
678
|
+
|
|
679
|
+
!ifmacrodef NSIS_HOOK_PREUNINSTALL
|
|
680
|
+
!insertmacro NSIS_HOOK_PREUNINSTALL
|
|
681
|
+
!endif
|
|
682
|
+
|
|
683
|
+
!insertmacro CheckIfAppIsRunning "$INSTDIR\${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
|
684
|
+
|
|
685
|
+
; Delete the app directory and its content from disk
|
|
686
|
+
; Copy main executable
|
|
687
|
+
Delete "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
688
|
+
|
|
689
|
+
; Delete resources
|
|
690
|
+
{{#each resources}}
|
|
691
|
+
Delete "$INSTDIR\\{{this.[1]}}"
|
|
692
|
+
{{/each}}
|
|
693
|
+
|
|
694
|
+
; Delete external binaries
|
|
695
|
+
{{#each binaries}}
|
|
696
|
+
Delete "$INSTDIR\\{{this}}"
|
|
697
|
+
{{/each}}
|
|
698
|
+
|
|
699
|
+
; Delete app associations
|
|
700
|
+
{{#each file_associations as |association| ~}}
|
|
701
|
+
{{#each association.ext as |ext| ~}}
|
|
702
|
+
!insertmacro APP_UNASSOCIATE "{{ext}}" "{{or association.name ext}}"
|
|
703
|
+
{{/each}}
|
|
704
|
+
{{/each}}
|
|
705
|
+
|
|
706
|
+
; Delete deep links
|
|
707
|
+
{{#each deep_link_protocols as |protocol| ~}}
|
|
708
|
+
ReadRegStr $R7 SHCTX "Software\Classes\\{{protocol}}\shell\open\command" ""
|
|
709
|
+
${If} $R7 == "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
|
|
710
|
+
DeleteRegKey SHCTX "Software\Classes\\{{protocol}}"
|
|
711
|
+
${EndIf}
|
|
712
|
+
{{/each}}
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
; Delete uninstaller
|
|
716
|
+
Delete "$INSTDIR\uninstall.exe"
|
|
717
|
+
|
|
718
|
+
{{#each resources_ancestors}}
|
|
719
|
+
RMDir /REBOOTOK "$INSTDIR\\{{this}}"
|
|
720
|
+
{{/each}}
|
|
721
|
+
RMDir "$INSTDIR"
|
|
722
|
+
|
|
723
|
+
; Remove shortcuts if not updating
|
|
724
|
+
${If} $UpdateMode <> 1
|
|
725
|
+
!insertmacro DeleteAppUserModelId
|
|
726
|
+
|
|
727
|
+
; Remove start menu shortcut
|
|
728
|
+
!insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder
|
|
729
|
+
!insertmacro IsShortcutTarget "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
730
|
+
Pop $0
|
|
731
|
+
${If} $0 = 1
|
|
732
|
+
!insertmacro UnpinShortcut "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk"
|
|
733
|
+
Delete "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk"
|
|
734
|
+
RMDir "$SMPROGRAMS\$AppStartMenuFolder"
|
|
735
|
+
${EndIf}
|
|
736
|
+
!insertmacro IsShortcutTarget "$SMPROGRAMS\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
737
|
+
Pop $0
|
|
738
|
+
${If} $0 = 1
|
|
739
|
+
!insertmacro UnpinShortcut "$SMPROGRAMS\${PRODUCTNAME}.lnk"
|
|
740
|
+
Delete "$SMPROGRAMS\${PRODUCTNAME}.lnk"
|
|
741
|
+
${EndIf}
|
|
742
|
+
|
|
743
|
+
; Remove desktop shortcuts
|
|
744
|
+
!insertmacro IsShortcutTarget "$DESKTOP\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
745
|
+
Pop $0
|
|
746
|
+
${If} $0 = 1
|
|
747
|
+
!insertmacro UnpinShortcut "$DESKTOP\${PRODUCTNAME}.lnk"
|
|
748
|
+
Delete "$DESKTOP\${PRODUCTNAME}.lnk"
|
|
749
|
+
${EndIf}
|
|
750
|
+
|
|
751
|
+
; wayBetter: shortcuts that an install from before the rename left under the old name
|
|
752
|
+
!ifdef LEGACYNAME
|
|
753
|
+
Call un.RemoveLegacyShortcuts
|
|
754
|
+
!endif
|
|
755
|
+
${EndIf}
|
|
756
|
+
|
|
757
|
+
; Remove registry information for add/remove programs
|
|
758
|
+
!if "${INSTALLMODE}" == "both"
|
|
759
|
+
DeleteRegKey SHCTX "${UNINSTKEY}"
|
|
760
|
+
!else if "${INSTALLMODE}" == "perMachine"
|
|
761
|
+
DeleteRegKey HKLM "${UNINSTKEY}"
|
|
762
|
+
!else
|
|
763
|
+
DeleteRegKey HKCU "${UNINSTKEY}"
|
|
764
|
+
!endif
|
|
765
|
+
|
|
766
|
+
; Removes the Autostart entry for ${PRODUCTNAME} from the HKCU Run key if it exists.
|
|
767
|
+
; This ensures the program does not launch automatically after uninstallation if it exists.
|
|
768
|
+
; If it doesn't exist, it does nothing.
|
|
769
|
+
; We do this when not updating (to preserve the registry value on updates)
|
|
770
|
+
${If} $UpdateMode <> 1
|
|
771
|
+
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${PRODUCTNAME}"
|
|
772
|
+
!ifdef LEGACYNAME
|
|
773
|
+
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${LEGACYNAME}"
|
|
774
|
+
!endif
|
|
775
|
+
${EndIf}
|
|
776
|
+
|
|
777
|
+
; Delete app data if the checkbox is selected
|
|
778
|
+
; and if not updating
|
|
779
|
+
${If} $DeleteAppDataCheckboxState = 1
|
|
780
|
+
${AndIf} $UpdateMode <> 1
|
|
781
|
+
; Clear the install location $INSTDIR from registry
|
|
782
|
+
DeleteRegKey SHCTX "${MANUPRODUCTKEY}"
|
|
783
|
+
DeleteRegKey /ifempty SHCTX "${MANUKEY}"
|
|
784
|
+
|
|
785
|
+
; Clear the install language from registry
|
|
786
|
+
DeleteRegValue HKCU "${MANUPRODUCTKEY}" "Installer Language"
|
|
787
|
+
DeleteRegKey /ifempty HKCU "${MANUPRODUCTKEY}"
|
|
788
|
+
DeleteRegKey /ifempty HKCU "${MANUKEY}"
|
|
789
|
+
|
|
790
|
+
SetShellVarContext current
|
|
791
|
+
RmDir /r "$APPDATA\${BUNDLEID}"
|
|
792
|
+
RmDir /r "$LOCALAPPDATA\${BUNDLEID}"
|
|
793
|
+
${EndIf}
|
|
794
|
+
|
|
795
|
+
!ifmacrodef NSIS_HOOK_POSTUNINSTALL
|
|
796
|
+
!insertmacro NSIS_HOOK_POSTUNINSTALL
|
|
797
|
+
!endif
|
|
798
|
+
|
|
799
|
+
; Auto close if passive mode or updating
|
|
800
|
+
${If} $PassiveMode = 1
|
|
801
|
+
${OrIf} $UpdateMode = 1
|
|
802
|
+
SetAutoClose true
|
|
803
|
+
${EndIf}
|
|
804
|
+
SectionEnd
|
|
805
|
+
|
|
806
|
+
Function RestorePreviousInstallLocation
|
|
807
|
+
ReadRegStr $4 SHCTX "${MANUPRODUCTKEY}" ""
|
|
808
|
+
StrCmp $4 "" +2 0
|
|
809
|
+
StrCpy $INSTDIR $4
|
|
810
|
+
FunctionEnd
|
|
811
|
+
|
|
812
|
+
Function Skip
|
|
813
|
+
Abort
|
|
814
|
+
FunctionEnd
|
|
815
|
+
|
|
816
|
+
Function SkipIfPassive
|
|
817
|
+
${IfThen} $PassiveMode = 1 ${|} Abort ${|}
|
|
818
|
+
FunctionEnd
|
|
819
|
+
Function un.SkipIfPassive
|
|
820
|
+
${IfThen} $PassiveMode = 1 ${|} Abort ${|}
|
|
821
|
+
FunctionEnd
|
|
822
|
+
|
|
823
|
+
; wayBetter: an install from before a rename has "${LEGACYNAME}.lnk" shortcuts. One that points at
|
|
824
|
+
; this app is replaced by "${PRODUCTNAME}.lnk" in the same folder (same target and AppUserModelID),
|
|
825
|
+
; also on /UPDATE, so Start, the desktop and Windows notifications show the new name. Shortcuts
|
|
826
|
+
; that point anywhere else are left alone. Nothing to do for an app that was never renamed.
|
|
827
|
+
!macro MigrateLegacyShortcut dir
|
|
828
|
+
!ifdef LEGACYNAME
|
|
829
|
+
!insertmacro IsShortcutTarget "${dir}\${LEGACYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
830
|
+
Pop $0
|
|
831
|
+
${If} $0 = 1
|
|
832
|
+
Delete "${dir}\${LEGACYNAME}.lnk"
|
|
833
|
+
CreateShortcut "${dir}\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
834
|
+
!insertmacro SetLnkAppUserModelId "${dir}\${PRODUCTNAME}.lnk"
|
|
835
|
+
${EndIf}
|
|
836
|
+
!endif
|
|
837
|
+
!macroend
|
|
838
|
+
|
|
839
|
+
!ifdef LEGACYNAME
|
|
840
|
+
Function un.RemoveLegacyShortcuts
|
|
841
|
+
!insertmacro IsShortcutTarget "$SMPROGRAMS\${LEGACYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
842
|
+
Pop $0
|
|
843
|
+
${If} $0 = 1
|
|
844
|
+
!insertmacro UnpinShortcut "$SMPROGRAMS\${LEGACYNAME}.lnk"
|
|
845
|
+
Delete "$SMPROGRAMS\${LEGACYNAME}.lnk"
|
|
846
|
+
${EndIf}
|
|
847
|
+
!insertmacro IsShortcutTarget "$DESKTOP\${LEGACYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
848
|
+
Pop $0
|
|
849
|
+
${If} $0 = 1
|
|
850
|
+
!insertmacro UnpinShortcut "$DESKTOP\${LEGACYNAME}.lnk"
|
|
851
|
+
Delete "$DESKTOP\${LEGACYNAME}.lnk"
|
|
852
|
+
${EndIf}
|
|
853
|
+
FunctionEnd
|
|
854
|
+
!endif
|
|
855
|
+
|
|
856
|
+
Function CreateOrUpdateStartMenuShortcut
|
|
857
|
+
!insertmacro MigrateLegacyShortcut "$SMPROGRAMS"
|
|
858
|
+
!if "${STARTMENUFOLDER}" != ""
|
|
859
|
+
!insertmacro MigrateLegacyShortcut "$SMPROGRAMS\$AppStartMenuFolder"
|
|
860
|
+
!endif
|
|
861
|
+
|
|
862
|
+
; We used to use product name as MAINBINARYNAME
|
|
863
|
+
; migrate old shortcuts to target the new MAINBINARYNAME
|
|
864
|
+
StrCpy $R0 0
|
|
865
|
+
|
|
866
|
+
!insertmacro IsShortcutTarget "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk" "$INSTDIR\$OldMainBinaryName"
|
|
867
|
+
Pop $0
|
|
868
|
+
${If} $0 = 1
|
|
869
|
+
!insertmacro SetShortcutTarget "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
870
|
+
StrCpy $R0 1
|
|
871
|
+
${EndIf}
|
|
872
|
+
|
|
873
|
+
!insertmacro IsShortcutTarget "$SMPROGRAMS\${PRODUCTNAME}.lnk" "$INSTDIR\$OldMainBinaryName"
|
|
874
|
+
Pop $0
|
|
875
|
+
${If} $0 = 1
|
|
876
|
+
!insertmacro SetShortcutTarget "$SMPROGRAMS\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
877
|
+
StrCpy $R0 1
|
|
878
|
+
${EndIf}
|
|
879
|
+
|
|
880
|
+
${If} $R0 = 1
|
|
881
|
+
Return
|
|
882
|
+
${EndIf}
|
|
883
|
+
|
|
884
|
+
; Skip creating shortcut if in update mode or no shortcut mode
|
|
885
|
+
; but always create if migrating from wix
|
|
886
|
+
${If} $WixMode = 0
|
|
887
|
+
${If} $UpdateMode = 1
|
|
888
|
+
${OrIf} $NoShortcutMode = 1
|
|
889
|
+
Return
|
|
890
|
+
${EndIf}
|
|
891
|
+
${EndIf}
|
|
892
|
+
|
|
893
|
+
!if "${STARTMENUFOLDER}" != ""
|
|
894
|
+
CreateDirectory "$SMPROGRAMS\$AppStartMenuFolder"
|
|
895
|
+
CreateShortcut "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
896
|
+
!insertmacro SetLnkAppUserModelId "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk"
|
|
897
|
+
!else
|
|
898
|
+
CreateShortcut "$SMPROGRAMS\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
899
|
+
!insertmacro SetLnkAppUserModelId "$SMPROGRAMS\${PRODUCTNAME}.lnk"
|
|
900
|
+
!endif
|
|
901
|
+
FunctionEnd
|
|
902
|
+
|
|
903
|
+
Function CreateOrUpdateDesktopShortcut
|
|
904
|
+
!insertmacro MigrateLegacyShortcut "$DESKTOP"
|
|
905
|
+
|
|
906
|
+
; We used to use product name as MAINBINARYNAME
|
|
907
|
+
; migrate old shortcuts to target the new MAINBINARYNAME
|
|
908
|
+
!insertmacro IsShortcutTarget "$DESKTOP\${PRODUCTNAME}.lnk" "$INSTDIR\$OldMainBinaryName"
|
|
909
|
+
Pop $0
|
|
910
|
+
${If} $0 = 1
|
|
911
|
+
!insertmacro SetShortcutTarget "$DESKTOP\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
912
|
+
Return
|
|
913
|
+
${EndIf}
|
|
914
|
+
|
|
915
|
+
; Skip creating shortcut if in update mode or no shortcut mode
|
|
916
|
+
; but always create if migrating from wix
|
|
917
|
+
${If} $WixMode = 0
|
|
918
|
+
${If} $UpdateMode = 1
|
|
919
|
+
${OrIf} $NoShortcutMode = 1
|
|
920
|
+
Return
|
|
921
|
+
${EndIf}
|
|
922
|
+
${EndIf}
|
|
923
|
+
|
|
924
|
+
CreateShortcut "$DESKTOP\${PRODUCTNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
|
|
925
|
+
!insertmacro SetLnkAppUserModelId "$DESKTOP\${PRODUCTNAME}.lnk"
|
|
926
|
+
FunctionEnd
|