joeylib2/installer/components/wine.sh
2026-10-13 14:01:46 -05:00

42 lines
1.2 KiB
Bash

# Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License.
# See LICENSE.md for license information.
# SPDX-License-Identifier: MIT
#
# Wine 11.19 (Kron4ek's portable build, new WoW64 mode): runs the win32
# port's programs for joey-run and the gates. Relocatable, so it is unpacked
# into toolchains/opt/wine and needs no system install; the WoW64 build runs
# 32-bit programs without any 32-bit Linux libraries. Every run uses a
# private Wine prefix (WINEPREFIX) in a temporary directory, never ~/.wine.
compDescription="emulator: Wine 11.19 portable (win32 port)"
compGroups="emulator:win32"
compRequires="host"
compHostDeps="tar xz"
compUrl="https://github.com/Kron4ek/Wine-Builds/releases/download/11.19/wine-11.19-amd64-wow64.tar.xz"
compSha256="a1fe858b45d12c9b16b91c7601d9b934f68430f7b6b95e240212ab6e2a198d8a"
compPin="$compSha256"
compInstall() {
local archive
archive="$(fetchFile "$compUrl" "$compSha256")"
rm -rf "$compDir"
extractArchive "$archive" "$compDir" 1
}
compInstalled() {
[ -x "$compDir/bin/wine" ]
}
compVerify() {
local version
version="$("$compDir/bin/wine" --version 2>/dev/null || true)"
[[ "$version" == wine-11.19* ]]
}
compEnv() {
envVar WINE "$compDir/bin/wine"
}