Gcenx / macOS_Wine_builds

Official Winehq macOS Packages
501 stars 23 forks source link

Looking for wine-stable 6.0.1 formula working on macOS 10.11 #32

Closed peterkaczorowski closed 2 years ago

peterkaczorowski commented 2 years ago

Hi!

Yesterday I did a manual upgrade of BREW formulas in my system (macOS 10.11). At that time, the new wine-stable 7.0 was downloaded, then the working 6.0.1 uninstalled and 7.0 was installed. Unfortunately, wine-stable 7.0 for me does not work well (only the status bars are displayed, bad libs or so?).

I'm looking for either the old formula from 6.0.1 compiled for OSX SDK lesser 10.13 to run on 10.11, link to previous bins builded against ~10.11 . Maybe someone also has the entire TGZ file from the previous wine-stable 6.0.1.

I tried download older versions from https://github.com/Gcenx/macOS_Wine_builds but they are now builded against SDK 10.13 .

Any help is greatly appreciated! Few critical things not working on my "old/retro" Mac 3.1. BTW: As usual, big thanx to Apple for not including new OSX for older machines.

Best, Peter

Gcenx commented 2 years ago

Yesterday I did a manual upgrade of BREW formulas in my system (macOS 10.11). At that time, the new wine-stable 7.0 was downloaded, then the working 6.0.1 uninstalled and 7.0 was installed. Unfortunately, wine-stable 7.0 for me does not work well (only the status bars are displayed, bad libs or so?).

Sounds like you've ran into https://bugs.winehq.org/show_bug.cgi?id=52354

If you were already using wine-stable v6.0.1 cask you were already using the package from here see https://github.com/Homebrew/homebrew-cask/commit/855d7324d507c29c94b80fd187824ff403b75310

I'm looking for either the old formula from 6.0.1 compiled for OSX SDK lesser 10.13 to run on 10.11, link to previous bins builded against ~10.11 . Maybe someone also has the entire TGZ file from the previous wine-stable 6.0.1.

See my above comment.

I tried download older versions from https://github.com/Gcenx/macOS_Wine_builds but they are now builded against SDK 10.13 .

That's incorrect my packages are built against macOS Mojave sysroot the dylibs are built against MacOSX10.13.sdk.\ I later removed some hacks on a couple of libraries that expected new functions.

peterkaczorowski commented 2 years ago

That's incorrect my packages are built against macOS Mojave sysroot the dylibs are built against MacOSX10.13.sdk. I wrote that they are build with SDK 10.13 (MacOSX10.13.sdk).

I'm sitting today about 9 hours and compiling all libs to make working Wine.. Without luck... but.. First thing is to replace clock_gettime()

This is the code for it:

ifdef MACH

include <mach/mach_time.h>

include "rt.h"

int clock_gettime(int clk_id, struct timespec t) { mach_timebase_info_data_t timebase; mach_timebase_info(&timebase); uint64_t time; time = mach_absolute_time(); double nseconds = ((double)time (double)timebase.numer)/((double)timebase.denom); double seconds = ((double)time (double)timebase.numer)/((double)timebase.denom 1e9); t->tv_sec = seconds; t->tv_nsec = nseconds; return 0; }

endif

and the header:

ifndef CLOCK_REALTIME

define CLOCK_REALTIME 0

define CLOCK_MONOTONIC 0

int clock_gettime(int clk_id, struct timespec *t);

endif

It will raise a change that it will works.

Version < 7.0 not working on my computer (OSX 10.11 El Capitan). Version 7.0 starts but I have only upper bar of the windows with windows control dots (red orange green) and this is the end.

I've just installed WINE DEV 5.7 from page: https://dl.winehq.org/wine-builds/macosx/download.html

It works!

It is a pity that the last several hours looked like: 6.0.1 ---------> 7.0 (and failed) --------> 5.7.

If you can help, I can also test on my Mac Pro 3.1 other versions.

If is possible it the full package with all libraries like "dl.winehq.org/wine-builds" it is also a solution. Maybe a lot of space on the disk because package contains all libraries, but very stable.

Gcenx commented 2 years ago

I'm sitting today about 9 hours and compiling all libs to make working Wine.. Without luck... but.. First thing is to replace clock_gettime()

This is the code for it: #ifdef MACH #include <mach/mach_time.h> #include "rt.h"

int clock_gettime(int clk_id, struct timespec t) { mach_timebase_info_data_t timebase; mach_timebase_info(&timebase); uint64_t time; time = mach_absolute_time(); double nseconds = ((double)time (double)timebase.numer)/((double)timebase.denom); double seconds = ((double)time (double)timebase.numer)/((double)timebase.denom 1e9); t->tv_sec = seconds; t->tv_nsec = nseconds; return 0; } #endif

and the header: #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 0 int clock_gettime(int clk_id, struct timespec *t); #endif

It will raise a change that it will works.

Guessing this would be due to https://github.com/wine-mirror/wine/commit/c638618cbc5f6f26b0a0d1b32078b9ecca3af8df


Version < 7.0 not working on my computer (OSX 10.11 El Capitan). Version 7.0 starts but I have only upper bar of the windows with windows control dots (red orange green) and this is the end.

I've just installed WINE DEV 5.7 from page: https://dl.winehq.org/wine-builds/macosx/download.html

It works!

It is a pity that the last several hours looked like: 6.0.1 ---------> 7.0 (and failed) --------> 5.7.

The last version of wine I've had running without patching on mac OSX 10.9 was 6.16 with the proposed patch in the linked bug wine-7.0 also functions but the windows are drawn screwy but that might simply be a mac OSX 10.9 bug.

Here's a screenshot from my testing of wine-7.0-rc5 running on mac OSX 10.9

winemac.drv


If you can help, I can also test on my Mac Pro 3.1 other versions.

If you really want to compile and test modern wine on a legacy version of macOS you'll need to use macports-ports as explained in the release notes I maintain two overlays to assist with this, using brew to compile wine is a PITA as it doesn't support i386 targets.


If is possible it the full package with all libraries like "dl.winehq.org/wine-builds" it is also a solution. Maybe a lot of space on the disk because package contains all libraries, but very stable.

The packages provided here do ship all required libraries, however the new agreed on minimum target is 10.13

peterkaczorowski commented 2 years ago

Dean,

Thank you for fast response. I'm after many hours of resuce of my system after homebrew updater actions... You are doing great job, and if can help you or test somthing, please let me know. In the meantime I have working winehq 5.9 and is even faster then before so.. I will stay with that version and during year I will finally change Mac 3.1 to new machine.

I see that 10.13 becomes new minimals right now... C'est la vie...

Thanx again!

Gcenx commented 2 years ago

Still updating macports-wine for wine-7.0, it's taken 5 reverts to have correctly functional winemac.drv

Screenshot 2022-01-22 at 7 00 15 PM

Strangely I didn't have any issue with libxslt even when compiling with MacOSX10.11.SDK, I'm guessing you didn't have mingw-w64 installed?

peterkaczorowski commented 2 years ago

Very cool! : ))

$ brew list | grep ming mingw-w64

Well.. I have it... I installed it to compile wine-6 but after all I disabled it.

Is it possible to download "wine-7.0@macports" with all libs to have it in one directory ????

Could you place such revision in: https://github.com/Gcenx/macports-wine/releases ?

Best, Peter

Gcenx commented 2 years ago

No promises but let’s see what can be done for wine-stable

peterkaczorowski commented 2 years ago

I would be very grateful if it would be in such a prepared structure... Still thank you for you work and support!

Zrzut ekranu 2022-01-25 o 06 26 35

Gcenx commented 2 years ago

The completed package will retain the same structure as current packages. This matches the depreciated Winehq pkg packages.

The bundled dylibs and wines .so libraries will be relocatable so if you want to move the bundles wine to /opt/wine you could.

Gcenx commented 2 years ago

I've added a custom cask to homebrew-wine called wine-stable-legacy

That was compiled completely on OS X 10.9 including the dylibs and functions so there should be no issues.

peterkaczorowski commented 2 years ago

Thank you!

Could you provide quick "how to" about (custom cask to homebrew-wine called wine-stable-legacy) ?

Does this installation result in source code compilation or is it an archive that contains compiled binaries?

Could you provide link to the formula for wine-stable-legacy ?

It also be very cool if in the directory https://github.com/Gcenx/macports-wine/releases that new package will be placed. After all stable desirable package installation with brew package manager will only download the package and install install it in the /usr/local/Cellar/wine/ directory that also should be linked to /usr/local/Cellar/wine/latest and main files from the /usr/local/Cellar/wine/latest/bin files should be linked to /usr/local/bin . Right now for test I can do it manually.

- I'm very wary now, as Friday's fun with the "brew upgrade" ended up wasting an entire Saturday on a lot of manual builds.

Gcenx commented 2 years ago

Seems your confusing formula and cask. Compiling fully functional i386 & x86_64 wine using brew would be a complete nightmare as brew doesn’t support i386 builds.

The cask can be found on my brew tap as explained before https://github.com/Gcenx/homebrew-wine/blob/master/Casks/wine-stable-legacy.rb

That will download the prebuilt package that’s on the releases section from this repository.

peterkaczorowski commented 2 years ago

Ok... I have it... I've just download it directly: wget https://github.com/Gcenx/macOS_Wine_builds/releases/download/7.0/wine-stable-legacy-7.0-osx64.tar.xz

peterkaczorowski commented 2 years ago

After unpacking it in /Application folder and remove (after backup ~/.wine directory and also remove from the path previous version of wine I had this....

I tried this as first app: /Applications/Wine\ Stable.app/Contents/MacOS/wine taskmgr

I got opening wine many times... I had to manually kill all wine's process to not to crash all the system.

Zrzut ekranu 2022-01-26 o 15 27 56

Gcenx commented 2 years ago

Don't use the launcher directly use the relevant wine binary

/Applications/Wine\ Stable.app/Contents/Resources/wine/bin/wine winecfg
peterkaczorowski commented 2 years ago

Summary: wget https://github.com/Gcenx/macOS_Wine_builds/releases/download/7.0/wine-stable-legacy-7.0-osx64.tar.xz

I have unpacked this file at /opt/wine7 next, in the directory /opt/wine7 I have a link: bin -> ./Wine Stable.app/Contents/Resources/wine/bin

and I run programs with command "/opt/wine7/bin/wine64 PROGRAM.EXE"

Works awesome! Thank you! : )))))))

Zrzut ekranu 2022-01-26 o 19 09 51

peterkaczorowski commented 2 years ago

Below I present an additional interesting program that I use. It can be used to set the smoothed fonts in Wine.

So... after installation I started following the programs/commands:

  1. wine taskmgr
  2. winetricks corefonts
  3. this program below, to set smoothed fonts
#!/bin/sh
# Quick and dirty script for configuring wine font smoothing
#
# Author: Igor Tarasov <tarasov.igor@gmail.com>

WINE=${WINE:-wine}
WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
DIALOG=whiptail

if [ ! -x "`which "$WINE"`" ]
then
    echo "Wine was not found. Is it really installed? ($WINE)"
    exit 1
fi

if [ ! -x "`which "$DIALOG"`" ]
then
    DIALOG=dialog
fi

TMPFILE=`mktemp` || exit 1

$DIALOG --menu \
    "Please select font smoothing mode for wine programs:" 13 51\
    4\
        1 "Smoothing disabled"\
        2 "Grayscale smoothing"\
        3 "Subpixel smoothing (ClearType) RGB"\
        4 "Subpixel smoothing (ClearType) BGR" 2> $TMPFILE

STATUS=$?
ANSWER=`cat $TMPFILE`

if [ $STATUS != 0 ]
then 
    rm -f $TMPFILE
    exit 1
fi

MODE=0 # 0 = disabled; 2 = enabled
TYPE=0 # 1 = regular;  2 = subpixel
ORIENTATION=1 # 0 = BGR; 1 = RGB

case $ANSWER in
    1) # disable
        ;;
    2) # enable
        MODE=2
        TYPE=1
        ;;
    3) # enable cleartype rgb
        MODE=2
        TYPE=2
        ;;
    4) # enable cleartype bgr
        MODE=2
        TYPE=2
        ORIENTATION=0
        ;;
    *)
        rm -f $TMPFILE
        echo Unexpected option: $ANSWER
        exit 1
        ;;
esac

echo "REGEDIT4

[HKEY_CURRENT_USER\Control Panel\Desktop]
\"FontSmoothing\"=\"$MODE\"
\"FontSmoothingOrientation\"=dword:0000000$ORIENTATION
\"FontSmoothingType\"=dword:0000000$TYPE
\"FontSmoothingGamma\"=dword:00000578" > $TMPFILE

echo -n "Updating configuration... "

$WINE regedit $TMPFILE 2> /dev/null

rm -f $TMPFILE

echo ok
Gcenx commented 2 years ago

Instead of moving the app and adding a symlink you could simply extract and move Wine Stable.app/Contents/Resources/wine to /opt so the resulting path would simply be /opt/wine no need for the app bundle if your not planning on using it.

Edited your above comment so the script will show correctly. However not sure I’d go that route when winetricks already has font smoothing verbs.

peterkaczorowski commented 2 years ago

This is interesting... I have /opt/wine5 and /opt/wine7 I did also scripts that set proper path and wineprefix shell variable.. so I can make a comparison... Take a look on taskmgr on WINE 5.7 and WINE 7.0. Each time taskmgr is only windows app running @ osx.

Zrzut ekranu 2022-01-26 o 20 31 32

Gcenx commented 2 years ago

I don’t usually pay attention to the cpu usage as long as what I’m running functions well.

peterkaczorowski commented 2 years ago

I've checked... I think it is not reflected in the OSX load... I've just see it, because it was first app that I have run.

ReinholdH commented 2 years ago

Thnaks for the discussion and for providing a build for the lecacy Macs.