Skip to content

Commit

Permalink
Wine (x86/x64): update to 9.17
Browse files Browse the repository at this point in the history
also fix custom kernel compilation script for /boot/firmware path on Bookworm
  • Loading branch information
theofficialgman committed Sep 12, 2024
1 parent cc26d4f commit c89ed8a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion apps/Wine (x64)/description
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Run x86 and x64 Windows apps with a box64-emulated version x86/x64 wine-9.13 (WOW64 mode enabled).
Run x86 and x64 Windows apps with a box64-emulated version x86/x64 wine-9.17 (WOW64 mode enabled).
To run: wine path/to/file.exe
To configure wine: go to 'Wine configuration' in main menu or type in terminal: wine winecfg
Not all Windows applications will work under Wine. It's a good idea to check online if your program can run, or if something can be tweaked to make it work.
Expand Down
12 changes: 6 additions & 6 deletions apps/Wine (x64)/install-64
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#note to maintainer, if you change the below version make sure to update it in the uninstall script as well
version=9.13
version=9.17

# https://github.com/raspberrypi/bookworm-feedback/issues/107
PAGE_SIZE="$(getconf PAGE_SIZE)"
Expand Down Expand Up @@ -78,14 +78,14 @@ sudo mv /tmp/winetricks /opt/wine-${version}/bin/winetricks || error "Failed to
sudo chmod +x /opt/wine-${version}/bin/winetricks

#download Mono to universal location (to be installed automatically in all wine prefixes)
#according to https://wiki.winehq.org/Mono#Versions, use Mono 9.2.0 for Wine 9.12
#according to https://wiki.winehq.org/Mono#Versions, use Mono 9.3.0 for Wine 9.17
#wine mono pacakge is called -x86 but contains both x86 and x86_64 binaries
sudo mkdir -p /opt/wine-${version}/share/wine/mono
wget -O "/tmp/wine-mono-9.2.0-x86.tar.xz" 'https://dl.winehq.org/wine/wine-mono/9.2.0/wine-mono-9.2.0-x86.tar.xz' || exit 1
status "Extracting: /tmp/wine-mono-9.2.0-x86.tar.xz"
sudo tar -xvf "/tmp/wine-mono-9.2.0-x86.tar.xz" -C "/opt/wine-${version}/share/wine/mono" | less_tar
wget -O "/tmp/wine-mono-9.3.0-x86.tar.xz" 'https://dl.winehq.org/wine/wine-mono/9.3.0/wine-mono-9.3.0-x86.tar.xz' || exit 1
status "Extracting: /tmp/wine-mono-9.3.0-x86.tar.xz"
sudo tar -xvf "/tmp/wine-mono-9.3.0-x86.tar.xz" -C "/opt/wine-${version}/share/wine/mono" | less_tar
[ ${PIPESTATUS[0]} != 0 ] && error 'Failed to extract wine-mono!'
rm -f "/tmp/wine-mono-9.2.0-x86.tar.xz"
rm -f "/tmp/wine-mono-9.3.0-x86.tar.xz"
status_green Done

#download Gecko to universal location (to be installed automatically in all wine prefixes)
Expand Down
2 changes: 1 addition & 1 deletion apps/Wine (x64)/uninstall
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=9.13
version=9.17

pkill -9 wine
command -v wineserver >/dev/null && wineserver -k
Expand Down
2 changes: 1 addition & 1 deletion apps/Wine (x86)/description
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Run x86 Windows apps with a box86-emulated version of x86 wine-9.13.
Run x86 Windows apps with a box86-emulated version of x86 wine-9.17.
To run: wine path/to/file.exe
To configure wine: go to 'Wine configuration' in main menu or type in terminal: wine winecfg
Not all Windows applications will work under Wine. It's a good idea to check online if your program can run, or if something can be tweaked to make it work.
Expand Down
35 changes: 21 additions & 14 deletions apps/Wine (x86)/install-32
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#note to maintainer, if you change the below version make sure to update it in the uninstall script as well
version=9.13
version=9.17

if grep -q ARMv6 /proc/cpuinfo ;then
error "Wine is not compatible with the Raspberry Pi Zero or other ARMv6 boards."
Expand Down Expand Up @@ -68,6 +68,13 @@ Wine will not work on such systems. What would you like to do?
sleep infinity
elif [ "$output" == "Compile 3G/1G kernel" ];then
#compile 3g/1g kernel
if [ -f /boot/firmware/config.txt ]; then
bootfiles_location="/boot/firmware"
elif [ -f /boot/config.txt ]; then
bootfiles_location="/boot"
else
error 'User error: The /boot/config.txt and /boot/firmware/config.txt files are missing! You must be on an unsupported system.'
fi

#backup ~/linux if it exists
rm -rf ~/linux.bak
Expand All @@ -82,22 +89,22 @@ Wine will not work on such systems. What would you like to do?
#build for pi3
cd ~/linux || error "Failed to enter the ~/linux folder!"
KERNEL=kernel7
make -j8 bcm2709_defconfig || error "The make command exited with failure. Full command: 'make -j8 bcm2709_defconfig'"
make -j6 bcm2709_defconfig || error "The make command exited with failure. Full command: 'make -j6 bcm2709_defconfig'"

#change memory split config
echo "Setting memory split to 3G/1G"
sed -i 's/CONFIG_VMSPLIT_2G=y/# CONFIG_VMSPLIT_2G is not set/g' ~/linux/.config || error "sed failed to edit $HOME/linux/.config file!"
sed -i 's/# CONFIG_VMSPLIT_3G is not set/CONFIG_VMSPLIT_3G=1/g' ~/linux/.config
sed -i 's/# CONFIG_VMSPLIT_3G is not set/CONFIG_VMSPLIT_3G=y/g' ~/linux/.config

echo '' | make -j8 zImage modules dtbs || error "Failed to make bcm2709_defconfig zImage modules dtbs!"
echo '' | make -j6 zImage modules dtbs || error "Failed to make bcm2709_defconfig zImage modules dtbs!"

#install
echo "Copying new files to /boot/..."
echo "Copying new files to $bootfiles_location/..."
sudo make modules_install || error "sudo make modules_install failed!"
sudo cp arch/arm/boot/dts/broadcom/*.dtb /boot/ || error "Failed to copy dtb files to /boot!"
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/ || error "Failed to copy overlays to /boot/overlays!"
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img || error "Failed to copy kernel to /boot/$KERNEL.img!"
sudo cp arch/arm/boot/dts/broadcom/*.dtb $bootfiles_location/ || error "Failed to copy dtb files to $bootfiles_location!"
sudo cp arch/arm/boot/dts/overlays/*.dtb* $bootfiles_location/overlays/ || error "Failed to copy overlays to $bootfiles_location/overlays!"
sudo cp arch/arm/boot/dts/overlays/README $bootfiles_location/overlays/
sudo cp arch/arm/boot/zImage $bootfiles_location/$KERNEL.img || error "Failed to copy kernel to $bootfiles_location/$KERNEL.img!"
cd
rm -rf ~/linux

Expand Down Expand Up @@ -162,14 +169,14 @@ sudo mv /tmp/winetricks /opt/wine-${version}/bin/winetricks || error "Failed to
sudo chmod +x /opt/wine-${version}/bin/winetricks

#download Mono to universal location (to be installed automatically in all wine prefixes)
#according to https://wiki.winehq.org/Mono#Versions, use Mono 9.2.0 for Wine 9.12
#according to https://wiki.winehq.org/Mono#Versions, use Mono 9.3.0 for Wine 9.17
#wine mono pacakge is called -x86 but contains both x86 and x86_64 binaries
sudo mkdir -p /opt/wine-${version}/share/wine/mono
wget -O "/tmp/wine-mono-9.2.0-x86.tar.xz" 'https://dl.winehq.org/wine/wine-mono/9.2.0/wine-mono-9.2.0-x86.tar.xz' || exit 1
status "Extracting: /tmp/wine-mono-9.2.0-x86.tar.xz"
sudo tar -xvf "/tmp/wine-mono-9.2.0-x86.tar.xz" -C "/opt/wine-${version}/share/wine/mono" | less_tar
wget -O "/tmp/wine-mono-9.3.0-x86.tar.xz" 'https://dl.winehq.org/wine/wine-mono/9.3.0/wine-mono-9.3.0-x86.tar.xz' || exit 1
status "Extracting: /tmp/wine-mono-9.3.0-x86.tar.xz"
sudo tar -xvf "/tmp/wine-mono-9.3.0-x86.tar.xz" -C "/opt/wine-${version}/share/wine/mono" | less_tar
[ ${PIPESTATUS[0]} != 0 ] && error 'Failed to extract wine-mono!'
rm -f "/tmp/wine-mono-9.2.0-x86.tar.xz"
rm -f "/tmp/wine-mono-9.3.0-x86.tar.xz"
status_green Done

#download Gecko to universal location (to be installed automatically in all wine prefixes)
Expand Down
2 changes: 1 addition & 1 deletion apps/Wine (x86)/uninstall
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=9.13
version=9.17

pkill -9 wine
command -v wineserver >/dev/null && wineserver -k
Expand Down

0 comments on commit c89ed8a

Please sign in to comment.