Skip to content

Instantly share code, notes, and snippets.

@gangstead
Last active September 30, 2024 20:11
Show Gist options
  • Save gangstead/7f4047145aee48957219cbb4c77c3489 to your computer and use it in GitHub Desktop.
Save gangstead/7f4047145aee48957219cbb4c77c3489 to your computer and use it in GitHub Desktop.
Forscan on MacOS Montery with wine/wineskin

FORscan is windows only software. You want to run on a Mac. You can download a big windows VirtualBox image (20 GB), run Boot camp, or pay for something like Parallels ($80) or CrossOver ($60, built on Wine).

Instead you can pay with your time and try to get wine running. Problem: wine development for MacOS seems to have died with Catalina (10.15) dropped any support for 32 bit applications. Also every wine setup tutorial you find for a Mac is tightly coupled to the exact version of Mac/Wine/direction of the wind/ shoe size of the author on the day the tutorial was made and will not work for you. With that said here's what it took for me:

Wineskin

https://github.com/Gcenx/WineskinServer Follow the official instructions which use homebrew

brew install --no-quarantine gcenx/wine/unofficial-wineskin

Wineskin bundles wine + other libraries together into one app that then has one windows executable installed on it. The best info is on their wiki

Create a wineskin

https://www.youtube.com/watch?v=vkQj0lZFz6I

  • Open Wineskin Winery
  • Install engine (must be WS11WineCX64Bit) for 64 bit only Mac (> Catalina)
  • Create New Blank Wrapper, I called it FORScan

Install FORscan

  • Open up the new wrapper and Install Software
  • Choose Setup Executable and select FORscan setup exe FORScanSetup2.3.45.release.exe
  • Click Next many times
  • Choose Executable and find FORScan.exe
  • You can now run your FORScan wrapper and FORScan will start in a window, but it can't find the USB OBD dongle yet!

USB/Serial port setup

https://www.youtube.com/watch?v=41enNl9Vsig This video shows how do it for Wine, but we are doing WineSkin which bundles everything together into an app. Ignore the part about installing xquartz.

  • Link the usb serial device to a COM port in wine
    • The instructions online show doing a symbolic link to ~/.wine/dosdevices
    • But we don't have a ~/.wine/dosdevices it's in the bundled app
    • Find your USB device in ls /dev/tty.usb*, for me it was /dev/tty.usbserial-223010213255
    • Instead of ~/.wine/dosdevices it's going to be ~/Applications/Wineskin/Forscan.app/Contents/Resources/dosdevices/
    • ln -s /dev/tty.usbserial-223010213255 ~/Applications/Wineskin/Forscan.app/Contents/Resources/dosdevices/com1
  • Edit the wine registry to tell it about the new COM port
    • Again the instructions tell you to modify ~/.wine/system.reg but we don't have that in our Wineskin wrapper
    • Get to the Wineskin Advanced menu again: right click on your FORScan bundle and Show Package Contents
    • Inside there's another app called Wineskin, open it
    • Advanced -> Tools -> Registry Editor (regedit)
    • Inside the registry editor:
    • HKEY_LOCAL_MACHINE/Software/Wine/Ports make a new String called COM1 with value of your USB serial port (for me /dev/tty.usbserial-223010213255)
  • Close and go back to your FORScan bundled app again and launch FORScan
  • Now when you go to settings, connection there is a COM1 in there!
@xturgorex
Copy link

Thank you for this write up. This worked for me with one caveat. The dosdevices folder has moved! it is now located at ~/Applications/Wineskin/ForScan.app/Contents/SharedSupport/prefix I placed COM1 in that folder and it works all the same.

@gangstead
Copy link
Author

Of course it has!

@mseverini
Copy link

This tutorial helped me a lot. It got me up and running with FORscan and doing most things. That being said, as of quite recently, vmware fusion is now free. That is a much more stable option than wine, and should probably be prefered going forward. Just leaving this here for anyone that finds this post in the future.

On apple silicon you will need to install some drivers as explained here, but the setup worked better for me as I could never get PATS programming to function under WINE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment