Skip to content

Commit 6847533

Browse files
committed
fix: handle VC runtime startup installation
1 parent e9b1c71 commit 6847533

7 files changed

Lines changed: 602 additions & 264 deletions

File tree

build/darwin/Info.dev.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleVersion</key>
2020
<string>0.3.11</string>
2121
<key>LSMinimumSystemVersion</key>
22-
<string>10.15.0</string>
22+
<string>12.0.0</string>
2323
<key>NSAppTransportSecurity</key>
2424
<dict>
2525
<key>NSAllowsLocalNetworking</key>

build/darwin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleVersion</key>
2020
<string>0.3.11</string>
2121
<key>LSMinimumSystemVersion</key>
22-
<string>10.15.0</string>
22+
<string>12.0.0</string>
2323
<key>NSHighResolutionCapable</key>
2424
<string>true</string>
2525
<key>NSHumanReadableCopyright</key>

build/linux/nfpm/nfpm.yaml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ contents:
2424
- src: "./build/linux/LeviLauncher.desktop"
2525
dst: "/usr/share/applications/LeviLauncher.desktop"
2626

27-
# Default dependencies for Debian 12/Ubuntu 22.04+ with WebKit 4.1
27+
# Default dependencies for the GTK4 + WebKitGTK 6.0 stack (Ubuntu 24.04+ / Debian 13+)
2828
depends:
29-
- libgtk-3-0
30-
- libwebkit2gtk-4.1-0
29+
- libgtk-4-1
30+
- libwebkitgtk-6.0-4
3131

32-
# Distribution-specific overrides for different package formats and WebKit versions
32+
# Distribution-specific overrides for different package formats
3333
overrides:
34-
# RPM packages for RHEL/CentOS/AlmaLinux/Rocky Linux (WebKit 4.0)
34+
# RPM packages for Fedora / RHEL / AlmaLinux / Rocky Linux
3535
rpm:
3636
depends:
37-
- gtk3
38-
- webkit2gtk4.1
39-
40-
# Arch Linux packages (WebKit 4.1)
37+
- gtk4
38+
- webkitgtk6.0
39+
40+
# Arch Linux packages
4141
archlinux:
4242
depends:
43-
- gtk3
44-
- webkit2gtk-4.1
43+
- gtk4
44+
- webkitgtk-6.0
4545

4646
# scripts section to ensure desktop database is updated after install
4747
scripts:
@@ -50,13 +50,26 @@ scripts:
5050
# preremove: "./build/linux/nfpm/scripts/preremove.sh"
5151
# postremove: "./build/linux/nfpm/scripts/postremove.sh"
5252

53+
# If you build your app with -tags gtk3 (legacy WebKit2GTK 4.1 stack — supported through v3.0.x, removed in v3.1),
54+
# replace the depends/overrides above with these:
55+
#
56+
# depends:
57+
# - libgtk-3-0
58+
# - libwebkit2gtk-4.1-0
59+
# overrides:
60+
# rpm:
61+
# depends:
62+
# - gtk3
63+
# - webkit2gtk4.1
64+
# archlinux:
65+
# depends:
66+
# - gtk3
67+
# - webkit2gtk-4.1
68+
#
5369
# replaces:
5470
# - foobar
5571
# provides:
5672
# - bar
57-
# depends:
58-
# - gtk3
59-
# - libwebkit2gtk
6073
# recommends:
6174
# - whatever
6275
# suggests:

build/windows/nsis/wails_tools.nsh

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@
2727
!endif
2828
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"
2929

30+
!ifndef WAILS_INSTALL_SCOPE
31+
!define WAILS_INSTALL_SCOPE "machine"
32+
!endif
33+
3034
!ifndef REQUEST_EXECUTION_LEVEL
31-
!define REQUEST_EXECUTION_LEVEL "admin"
35+
!if "${WAILS_INSTALL_SCOPE}" == "user"
36+
!define REQUEST_EXECUTION_LEVEL "user"
37+
!else
38+
!define REQUEST_EXECUTION_LEVEL "admin"
39+
!endif
3240
!endif
3341

3442
RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
@@ -115,23 +123,40 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
115123
WriteUninstaller "$INSTDIR\uninstall.exe"
116124

117125
SetRegView 64
118-
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
119-
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
120-
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
121-
WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
122-
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
123-
WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
124-
125-
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
126-
IntFmt $0 "0x%08X" $0
127-
WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
126+
!if "${WAILS_INSTALL_SCOPE}" == "user"
127+
WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
128+
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
129+
WriteRegStr HKCU "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
130+
WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
131+
WriteRegStr HKCU "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
132+
WriteRegStr HKCU "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
133+
134+
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
135+
IntFmt $0 "0x%08X" $0
136+
WriteRegDWORD HKCU "${UNINST_KEY}" "EstimatedSize" "$0"
137+
!else
138+
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
139+
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
140+
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
141+
WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
142+
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
143+
WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
144+
145+
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
146+
IntFmt $0 "0x%08X" $0
147+
WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
148+
!endif
128149
!macroend
129150

130151
!macro wails.deleteUninstaller
131152
Delete "$INSTDIR\uninstall.exe"
132153

133154
SetRegView 64
134-
DeleteRegKey HKLM "${UNINST_KEY}"
155+
!if "${WAILS_INSTALL_SCOPE}" == "user"
156+
DeleteRegKey HKCU "${UNINST_KEY}"
157+
!else
158+
DeleteRegKey HKLM "${UNINST_KEY}"
159+
!endif
135160
!macroend
136161

137162
!macro wails.setShellContext

0 commit comments

Comments
 (0)