D2 on Wine

maxicek

Moderator
Moderator
Guide Author
Aug 5, 2005
8,074
2,586
113
Introduction
Sorry to disappoint those expecting another inebriated hardcore project, but this is a guide to installing D2 with Wine. It is basically a record of the process I went through to install Wine on my mac, but should be applicable to installing D2 with Wine on Linux too. I haven't actually installed D2 on Linux with this process, but I see no reason for the steps to be significantly different.

This process is currently applicable for installation on Mac OS 10.14 (Mojave) and earlier. If / when Wine supports 32Bit Apps in 64Bit Wine, this should be applicable to running D2 on later MacOS versions.

Why use Wine on a Mac?
I started doing this as an investigation to see if it was a possible solution for the dropping of 32bit app support in Catalina. The advantages as I see it are:
- Runs faster than under virtualisation (Parallels / VMWare Fusion)
- Supports command line arguments for RWM
- More stable than the Blizzard 32 bit Mac Client
- Possibility for running older versions of D2 (not tried though)

Explanation of Suffixes
No Suffix - Applicable to all
[Mac] Applicable to Mac installation only
[Optional] Not required to be done on any platform


Install XQuartz [Mac]
https://www.xquartz.org/releases/XQuartz-2.7.7.html


Install Wine
I installed the Wine Stable version
https://www.winehq.org
https://dl.winehq.org/wine-builds/macosx/download.html


Install D2 & LoD
Download the Windows version of the installers from Blizzard. You should be able to install from CDs or CD Images, but I haven’t tried it.
I installed mine in a sub-folder named Wine_Programs in the main Mac Applications folder. This guide is written based on this, you will need to adapt some of the paths if you install it in a different location.


Run Diablo
Assuming Wine has correctly mapped the .exe file extension, you should be able to just double click Diablo II.exe
If it doesn’t work, right click Diablo II.exe
Open With > Wine Stable
Diablo should run, full screen, with sound


Running with arguments from a Terminal window
If you want to run in a window or without sound, you need to add arguments. To do this you need to launch from the command line.

Launch Wine
In the terminal window type wine then a space.
Drag the Diablo II.exe file into the window
Add the suffixes required, e.g.
wine /Applications/Wine_Programs/Diablo\ II/Diablo\ II.exe -w -ns
Press return


Where are my saves?
In version before 1.14, they should be in the Save directory wherever you stored the application. However, by default in Windows 1.14d, the saves are in the Users/Saved Games folder. This is in the hidden .Wine folder. Good news is that you can change the save path to something more friendly. If you put them in the Documents folder, iCloud will back them up for you too.
Start Wine
In the window type Wine regedit
Find the Diablo Entries[/B][/B]
Regedit NewSavePath.png

Replace the save path with something more friendly, e.g.
Z:\Users\max\Documents\VMWare Shared\Diablo II


Install Singling [Optional]
Uncompress and drag the two files into the Application folder. Worth it if only for the fact it will stop your fans ramping to maximum.


Install RWM
Unzip & put the data folder into your Diablo II folder
I.e. The path should be
.../Diablo II/Data/Global/Excel/Runewords.txt
Start Wine
You have to change Directory to the one D2 launches in or RWM will not work. In the Terminal window type:
Code:
cd /Applications/Wine_Programs/Diablo\ II/
Then launch the game
Code:
wine Diablo\ II.exe -direct -txt -w -ns

Press return and the RWM game should launch. Make an Edge or Spirit to check. If it doesn’t work, don’t delete the item (assuming you got the runes right) - When it is setup correctly it will turn into the runeword.


Sorting out the Alt Keys [Mac]
By default Wine will use the Command key instead of Alt (Option). In order to fix this and use Alt to show items, you need to make an addition to the registry.
Start Wine
In the window type Wine regedit
Regedit Alt Keys.png

Navigate to HKEY_CURRENT_USER\Software\Wine
In the menus at the top Edit > New > Key
This will make a new Folder below Wine. Name it Mac Driver
In the menus: Edit > New > String Value
Name = LeftOptionIsAlt
Data = Y
In the menus: Edit > New > String Value
Name = RightOptionIsAlt
Data = Y
Close the Registry Editor. When you start D2 next, the Alt key should function as expected.
Regedit Done.png


Making an Application [Mac]
This makes an application using the Mac utility Automator, so you can just double click it to run D2 with the settings you need. It looks complicated but is actually fairly easy, just carefully follow the instructions.

Developed from http://speedofmac.com/tutorials/use-wine-without-terminal-automator.html
YouTube video here

1. Open Automator.app (/Applications/Automator)
2. Choose to create an Application at the prompt
3. Search the Actions box (should be highlighted by default) for "Run Shell Script"
* This should be visible after typing only a few letters
4. Double-click the resulting "Run Shell Script" action
5. At the top of the Run Shell Script box on the right choose to pass input as arguments
6. Replace all of the "for f in..." code with the following:

Code:
cd ""
DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib "" "" ""

Inside first set of quotation marks, drag and drop your D2 Folder
In the second set of quotation marks, either type the path of your wine binary (e.g. /Applications/Wine Stable.app/Contents/Resources/wine/bin/wine) or drag and drop it from the Finder into those quotation marks. Note that you need to open up the Wine Application and navigate to this - Right click, show package contents, it is in the bin folder
In the third set, drag and drop the Diablo II.exe application
In the fourth set add the modifiers you want to use:
-direct -txt for RWM
-ns for no sound
-w to run in a window

Example shortcut to run D2 RWM in a window without sound:
Code:
cd "/Applications/Wine_Programs/Diablo II/"
DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib "/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine" "/Applications/Wine_Programs/Diablo II/Game.exe" "-direct -txt -w -ns”

7. Save the Automator project as whatever you want, making sure that 'Application' is selected in the file format dropdown box
8. Optional: replace the standard Automator application icon with your Windows application's real icon:
* In Finder, select the application and press command+i; or, right- or control-click the application, choose "Get Info"
* Select the application image (top-left) and paste your image there or drag an image from Finder on top of the old image


Muling
GoMule and the RunCounter work in MacOS, although you will need to install Java
https://www.java.com/en/download/
ATMA works in Wine - Install as above


Sharing the same folder with a Virtual Machine / Bootcamp [Optional]
Remember how we edited the registry to put the save files somewhere easy to find? If you want to use a virtual machine or Bootcamp as well as Wine, you can also do the same thing. If you put them in a folder in the Mac side, you can access the same characters from both Wine and the VM.
Launch Windows
In the programs menu, search for regedit. Double click regedit.exe
Find the Diablo entries under HKEY_CURRENT_USER\SOFTWARE\Blizzard Entertainment\Diablo II
Modify the NewSavePath entry to your shared folder, e.g. \\vmware-host\Shared Folders\VMWare Shared\114_Save

Regedit Windows Save Path.png



References
https://wiki.winehq.org/MacOS_FAQ
http://speedofmac.com/tutorials/use-wine-without-terminal-automator.html
 
Last edited:
I just recently set up a new install on linux mint 20. I use playonlinux to manage the wine prefixes. I didn't know about the alt issue...i just rebound the show items key to something else instead.

Good read, quite helpful.
 
It's also possible to do a manual install via copy/paste/rsync, then import previous installs' registry files in 'wine regedit''.
 
Thanks for this @maxicek. I never updated from Mojave because of D2 :) but just got a new MacBook and will go for Catalina.

Just to get something right though...
Why use Wine on a Mac?
I started doing this as an investigation to see if it was a possible solution for the dropping of 32bit app support in Catalina. The advantages as I see it are:
- Runs faster than under virtualisation (Parallels / VMWare Fusion)
- Supports command line arguments for RWM
- More stable than the Blizzard 32 bit Mac Client
- Possibility for running older versions of D2 (not tried though)

Which client are you referring to? Is it still possible to run D2 natively in Catalina (in principle)? My past tries in running D2 under virtual machines didn't deliver the best results, so I always preferred that.. wondering now whether I should go for Wine or not.
 
Currently this doesn’t work on Catalina as Wine needs 32bit libraries not available in Catalina. There is also no 64bit Mac client, although Blizzard are allegedly working on it.

I need to make a new D2 and Macs thread, I will try to work on it in the next few weeks. Currently the only method I know of that will work is a Virtual Machine, but I think there is a solution from Codeweavers too.
 
  • Like
Reactions: intersilva
FYI I've installed the trial version of CrossOver now and it works really well, much better than any of the virtual machines I've tried in the past. That is for D2 vanilla, not sure how easy it is to install third party software. GoMule can still be used natively under Mac OS though, and RWM shouldn't be too hard to install either – which is all I want to use, anyway.

Running natively was a touch smoother though.. fingers crossed Blizzard is actually working on a new client.
 
  • Like
Reactions: maxicek
Figured I'd share some further points here. I ended up going a different route than CrossOver. My reasons may not apply to anyone, so it could very well be the go-to choice if you don't care about these:
  • I'm trying to optimize/streamline runs to save split seconds where I can. In this light it was just a little too choppy at times. To be clear: It generally runs very smoothly, much better than what I had previously seen on virtualizations. But FPS seems to drop a little when there are many monsters/effects on screen. Totally fine overall, it's just that if you're trying to improve your HoR scores it's not ideal. ;)
  • As mentioned it works seamlessly with GoMule (running natively under Mac OS), but when trying to improve performance by additional commands (such as -3dfx, -ns, -w etc.) I got an error message and am not sure CrossOver supports this. Could be a problem for RWM, but probably someone more tech savvy than me will find a solution.
  • Full version costs around 60 EUR/$
In short, it's a great solution but not ideal when really trying to optimize things.

What I did now was the clean all-in solution and that is Boot Camp. Why?
  • Best performance, even better than when I ran natively on my Mac – only downside is I don't have OP loading times by default anymore. ;)
  • WIth modern computers and SSDs, rebooting is crazy fast. It takes less than 30 seconds in my case to go from doing something under Mac OS to running D2 under Win 10.
  • All FAM/tools work.
  • It's free to download and install Win 10. (I got an activiation code – it's cheap anyway – which gets rid of some restrictions, but it's not necessary.)
 
Diablo 4 Interactive Map
PurePremium
Estimated market value
Low
High