nrlquaker / winbox-mac

MikroTik Winbox bundled into macOS app with Wine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you make disable retina for non-retina macs?

1o1o1 opened this issue · comments

commented

I allways have to disable retina mode in wine.inf for my macbook air 2015 with new version winbox-mac

; Retina mode
#HKCU,Control Panel\Desktop,"LogPixels",0x10003,0x000000C0
#HKCU,Software\Wine\Mac Driver,"RetinaMode",2,"Y"

and to fix normal size font in user.reg
"LogPixels"=dword:00000060

can you make something with it? autodetect non-retina macs? :)

Thank you 1o1o1 - I also have to buy a magnifying glass for that ...

The primary binary is a bash script see

#!/bin/bash
export LC_CTYPE="en_US.UTF-8"
export WINEDLLOVERRIDES="mscoree,mshtml="
export WINEDEBUG="fixme-esync"
BUNDLERESOURCEPATH="$(dirname "$0")/../Resources"
# workaround for https://bugs.winehq.org/show_bug.cgi?id=49199
# not needed in Gcenx build
export DYLD_FALLBACK_LIBRARY_PATH="$BUNDLERESOURCEPATH/wine/lib64"
PLUTIL_REGEX="s/.*<string>\(.*\)<\/string>.*/\1/p"
BUNDLE_ID="$(plutil -extract CFBundleIdentifier xml1 -o - "$BUNDLERESOURCEPATH/../Info.plist" | sed -n "$PLUTIL_REGEX")"
export WINEPREFIX="$HOME/Library/Application Support/${BUNDLE_ID}"
cd "$BUNDLERESOURCEPATH"
"$BUNDLERESOURCEPATH/wine/bin/wine64" "winbox64.exe" "$@"

So if someone wants to add something to check for a Retina display then modify the bundled wine/created prefix and open a PR that would help a lot.

I’m not aware of any third-party wine GUI that’s does what your asking.

Something like this could do the trick for retina display check:

if [[ $(system_profiler SPDisplaysDataType | grep -i 'retina') ]]; then echo "Retina display found"; else echo "No retina display found"; fi

Problem is — if you have multiple displays and one of them is retina-capable and another is not — this oneliner will output that your display is retina-capable

Latest non retina mac is pretty much old. More than 5 years old. I don't have intention to waste time for its support. But if someone has working solution please open a PR.

@nrlquaker I've stumbled upon this issue since my winbox doesn't work correctly on non-hidpi (2560x1440 27") external monitor - some UI controls have "wrong coordinates" - i.e. you click in one place, but the click registers itself in a different one. But it seems that it'd be near impossible to dynamically adjust this setting given the fact that user can move the window from one monitor to another.

@dobegor yes, its impossible to dynamically adjust retina mode. You can create bug at WINE HQ for issue with click registration.