Skip to content

Commit 9cbd648

Browse files
powershell.verb: Update powershell verb to match upstream winetricks.
1 parent ea57dab commit 9cbd648

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

verbs/powershell.verb

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Metadata for PowerShell Wrapper
2-
w_metadata powershell apps \
2+
w_metadata powershell dlls \
33
title="PowerShell Wrapper For Wine" \
44
publisher="ProjectSynchro" \
55
year="2024" \
@@ -12,31 +12,38 @@ load_powershell()
1212
{
1313
#w_do_call powershell_core
1414

15-
# Specify version here, and build download URLS from it.
16-
_load_powershell_version='2.1.0'
17-
1815
# Download PowerShell Wrapper 32bit exe
19-
w_download "https://github.com/${publisher}/powershell-wrapper-for-wine/releases/download/v${_load_powershell_version}/${file1}" 379c7252eed3039e9c10cf21a706ca35f87df5315e9501819120d845729768de
16+
w_download "https://github.com/ProjectSynchro/powershell-wrapper-for-wine/releases/download/v2.1.0/powershell32.exe" 379c7252eed3039e9c10cf21a706ca35f87df5315e9501819120d845729768de
2017

2118
if [ "${W_ARCH}" = "win64" ]; then
2219
# Download PowerShell Wrapper 64bit exe
23-
w_download "https://github.com/${publisher}/powershell-wrapper-for-wine/releases/download/v${_load_powershell_version}/${file2}" 325619aa9afa8e84123d303c76a38e5af8b359de520d4096289790265037706c
20+
w_download "https://github.com/ProjectSynchro/powershell-wrapper-for-wine/releases/download/v2.1.0/powershell64.exe" 325619aa9afa8e84123d303c76a38e5af8b359de520d4096289790265037706c
2421
fi
2522

2623
# Download PowerShell Wrapper profile.ps1
27-
w_download "https://github.com/${publisher}/powershell-wrapper-for-wine/releases/download/v${_load_powershell_version}/${file3}" 85c7d4bc526a0b427cb8fbc77cff8a43b0475b2bf7397889cbe1ab224d1579a1
24+
w_download "https://github.com/ProjectSynchro/powershell-wrapper-for-wine/releases/download/v2.1.0/profile.ps1" 85c7d4bc526a0b427cb8fbc77cff8a43b0475b2bf7397889cbe1ab224d1579a1
2825

2926
# Change directories to cache
3027
w_try_cd "${W_CACHE}/${W_PACKAGE}"
3128

3229
# Install PWSH Wrapper
30+
31+
# Disable SC2154 due to shellcheck not knowing metadata is sourced before this function is run
32+
# shellcheck disable=SC2154
3333
w_try_cp_dll "${file1}" "${W_SYSTEM32_DLLS}/WindowsPowerShell/v1.0/powershell.exe"
3434
if [ "${W_ARCH}" = "win64" ]; then
35+
# shellcheck disable=SC2154
3536
w_try_cp_dll "${file2}" "${W_SYSTEM64_DLLS}/WindowsPowerShell/v1.0/powershell.exe"
3637
fi
3738

3839
# Install profile.ps1 for wrapper
39-
w_try cp "${file3}" "${W_PROGRAMS_UNIX}/PowerShell/7/${file3}"
40+
if [ "${W_ARCH}" = "win64" ]; then
41+
# shellcheck disable=SC2154
42+
w_try cp "${file3}" "${W_PROGRAMW6432_UNIX}/PowerShell/7/${file3}"
43+
else
44+
# shellcheck disable=SC2154
45+
w_try cp "${file3}" "${W_PROGRAMS_UNIX}/PowerShell/7/${file3}"
46+
fi
4047

4148
w_override_dlls native powershell.exe
42-
}
49+
}

0 commit comments

Comments
 (0)