Posted on

Running Four Winds Mah Jong using CrossOver

With the recent version(s) of CodeWeavers CrossOver you can run Four Winds not only on Linux and older MacOS X computers but also on latest 64-bit macOS versions, including Catalina, BigSur, Monterey, Ventura and Sonoma, and even on new macs using Apple Silicon (M1/M2(M3) chips.

While CrossOver is based on Wine (“Wine is Not an Emulator”), meaning that Windows license is not required, it is not possible (at least without serious tweaking) to get 32-bit Windows applications running on latest macOS versions (Big Sur, Monterey and Ventura) with macs that use the new M1 /M2/M3 Apple Silicon) based chip. But with CrossOver, this is not a problem, and installation is easy. 

CrossOver is not free (costing currently EUR 74, perpetual license the price covering updates for one year), but it allows you to install and run native Windows 32-bit apps like Four Winds smoothly, supporting most of the features of the game.

In the following clip the game is installed on Monterey 12.2.1 using CrossOver 21.1 (the most recent 23.x versions support also macOS Sonoma):

 

As with Wine-installations, DIrectShow and DirectPlay based features like playing MP3 background music and running multiplayer games are not available (but multiplayer games are not in practice available currently on Windows platform, either, as setting up requires manual change of router settings)- The color management (by default enabled) also needs to be turned off from the game settings to avoid crashes (as shown on the video clip), and the game boards are not necessarily optimal for your mac (the full screen game boards cannot be forced to cover the macOS menu bar, so the bottom of a full-screen game board might not be reachable otherwise than using keyboard shortcuts, e.g., pressing O to declare “Out”). On the other hand, there are several layout options so you are likely to find one that works well on your mac.

For more information (and a 14-day trial version), check https://www.codeweavers.com/crossover 

Posted on

Playing Four Winds Multiplayer Games on LAN on Windows 10/11

Latest versions of Windows 10/11 no longer support Winsock v.1.x based network communication that is used in older Windows games like Four Winds Mah Jong that utilize the DirectPlay interface (part of DirectX deprecated by Microsoft) to support simple peer-to-peer multiplayer games.

We are in the process of examining alternative ways of implementing support for multiplayer games, but for the time being, there is a free workaround available, IPXWrapper by Daniel Collins, that is likely to work well for most users, allowing IPX/SPX emulation over UDP, that makes it possible to run DirectPlay based multiplayer games over LAN on recent Windows 10 updates and Windows 11, both with 32- and 64-bit versions.

To use the wrapper with Four Winds, please do the following:

  1.  Go to http://www.solemnwarning.net/ipxwrapper/and download IPXWrapper (the most recent version is 0.6.1).
  2. Extract the contents of the zip file in a new folder.
  3. Copy the four .dll files included (dpwsockx.dll, ipxwrapper.dll, mswsock.dll and wsock32.dll) under C:\Program Files(x86)\4Winds2 (or wherever you have Four Winds installed).
  4. Double click the .reg file directplay-win64.reg (or directplay-win32.reg if you have a 32-bit Windows) included in the wrapper package to merge the required settings in the system registry.
  5. Run Four Winds, and after having started a multiplayer game, choose “Internet TCP/IP Connection for DirectPlay”, or “IPX Connection for DirectPlay”, as the communication channel, when shown a list of choices. (Select the same channel also on the client side when joining a game.) Note: When using the TCP/IP channel,  leave the IP address field empty when playing a game on LAN.
  6. If you cannot get the multiplayer games working on your LAN (practically indicated by not being able to have Four Winds games hosted on the same LAN visible in the list of available games on the client side), or if you experience any side effects because of the emulation, please check Readme.txt included in the wrapper package to see they ways of configuring it and limiting its scope of operation (typically there is no need to make any adjustments). Also, as always, please ensure that your firewall does not block Four Winds (DirectX) multiplayer games.

On older Windows operating systems (up to version 8.1 and also on earlier Windows 10 versions) DirectPlay still works fine so there is no need to use the wrapper with these versions.

IPXWrapper – Copyright (C) 2008-2017 Daniel Collins <solemnwarning@solemnwarning.net>-
Licensed free of charge under GNU General Public License and without a warranty of any kind.

Posted on

Running Four Winds on Android with ExaGear

A screenshot of Four Winds running on Samsung Galaxy S7 on Android 8 (Oreo) using ExaGear Strategies Windows emulator.  The game can be run in full screen (and without side controls shown above) by letting ExaGear stretch the graphics (800 x 600 px “Basic Board” is used here as the game board). The larger game boards and integrated layouts are available in the emulator if supported by the device (but may not not be usable in mobile phone context; but e.g. for a 10-inch tablet all layouts would typically be available).

By using Eltechs’ Windows emulators you can now run Four Winds Mah Jong on your Android devices. Two versions are available, ExaGear Strategies (a free three-day trial period, lifetime license EUR 16.99, or monthly subscription at EUR 1.89) or the full Windows version, ExaGear Windows Emulator (lifetime license EUR 32,99). The former is recommended as it requires significantly less disk space, but to install the game you need to have the game installed on Windows and copy your Four Winds program folder (under C:\Program Files(x86)) onto your Android device’s ExaGear folder. On the full emulator you can install the game setup package similarly as on true Windows so basically you do not need to have a Windows computer. Note: The full emulator has currently a problem that leaves non-modal windows behind the main program window (the next version of Four Winds, however, will include a feature that makes this bug irrelevant). Note that you do not need a Windows license when using ExaGear.

Small text is not a problem on ExaGear since you can zoom in easily to make your selections in menus and setup dialog boxes and then zoom back when ready to return to the game. The game play itself is smooth (even on older Android devices like Sony Xperia Z2 running Android 7), and by changing the default control setup (Game Controls button under on the General option page of the User Interface group of the Preferences) so that discarding happens by tapping a raised tile (and is restricted to the tile itself), and checking the “Touch screen friendly” option on the same option page you can achieve surprisingly pleasant mobile playability by emulation.

Note that only ARM-based Android devices are supported so the emulation does not work on x86-based Android devices (like Lenovo Yoga Book) even if the application itself can be installed on such a device.

Most of the features of the game are available (excluding background music, which would require support for DirectX). Four Winds version 2.19 includes new features that make the game more accessible in mobile environment, e.g. the extra information windows will be available as alternating views similarly as the Discards view in the Basic game boards (but will continue to be available also as separate windows if wished), and the user interface has smart buttons that allow accessing of the most commonly used features more easily.

Posted on Leave a comment

Playing Four Winds on a Touch Screen

Now that touch screens, especially on tablets and 2-in-1 devices like Surface Pro, have become common in Windows environment and system based app-scaling for ultra-high resolution displays has greatly improved – allowing all applications (and not only those specifically designed for high-density displays) to show decent size text and controls so that they can be accessed by touch – a vast range of native Windows desktop applications like Four Winds Mah Jong have become available in mobile context. Applications that a few years ago were labeled with a derogatory term “legacy” have gained revived interest, and not just for nostalgic reasons but because native Windows applications are often feature-rich and have depth and versatility that only a few universal Windows applications have.

While it is clear that universal apps developed to fully utilize the features of touch-based (and mobile) computing have capabilities not available for desktop software, the efforts seen by Microsoft to make a computing environment serving well all kinds of devices and computers, also when using native desktop software, have begun to bear fruit. This post gives instructions on how to best use Four Winds with touch devices like 8- and 10-inch tablets and 2-in-1 computers running Windows 8.1 and 10 desktop operating systems.

Choosing optimal screen resolution, scaling value and view mode

Since version 8.1 Windows has offered improved app-scaling, which is crucial to allow older software run satisfactorily in ultra-high-dpi screen context. Which combination of screen resolution and scaling setting to use to get best results is not necessarily easily determined, and it is likely that settings need to be changed according to demands of different applications, but happily it is fast and easy to change the settings: to access the controls, right click on your Windows desktop and choose Display settings from the context menu that is shown, then experiment with different resolutions and scaling values. On the other hand, on Windows 10 devices that use traditional screen resolutions, it might be a better idea to lower native screen resolution and/or app scaling, or set an individual application to ignore app scaling.

Earlier versions of Windows let you change outlook of individual user interface elements like the size of the menu font, title bar and window borders. Since Windows 10 Creators Update the user interface for this feature has been removed but the feature itself is still supported, but you need to tweak the system registry to access the settings. Happily there is a free tool called Winaero Tweaker that lets you access these settings easily. While changing individual elements is usually not necessary (since system app scaling starting from Windows 8.1 normally works well), it may be necessary to tweak the size of the menu font, especially on small touch devices that only support regular screen resolutions (e.g. 1280 x 800). On these kinds of devices app-scaling does not always give big enough system font for touch control. But it is better to first try without any registry tweaks since app scaling on recent Windows 10 versions works most often really well.


Application-specific scaling is determined in the Compatibility tab of the program executable file. To access the the settings, click the Four Winds launch icon on Windows desktop with the right mouse button and choose Properties from the context menu. To have the application use the system’s app scaling, leave the “Override high DPI scaling behavior” box empty. To have the application use its internal app scaling, check the box, and then choose “Application” from the drop-down menu below. 

Four Winds supports a wide range of screen resolutions and layout options. When using a touch device, the goal is to find a combination of settings that make text and controls large enough to be easily accessible when using a finger. It is also meaningful to aim at full-screen game board to be able to cover the Windows taskbar and have tablet-like feel. To have keyboard input at hand when needed, it is also recommendable to run the system in Tablet mode (you can switch between the Tablet and Desktop mode by using the toggle button on the Windows Action Center – drag from the right edge to show it).

Four Winds running full-screen on a Windows 10 touch device: a low-end 8-inch Lenovo Miix 2 8 tablet using 1280 x 800 native screen with 125% app scaling. Four Winds runs using a compatibility setting that ignores system app scaling and applies internal app-scaling, instead, allowing the program to see the true system resolution and use its 1280 x 800 game boards with internally scaled system font and controls. Without the setting Four Winds would see the display as a 1024 x 640 screen, meaning that it could only use two possible game boards (Basic boards A and B), whereas ignoring the system app scaling it can also use Basic boards C and D, Integrated boards A, B and D, and Integrated Square boards N, O and P. Internal app-scaling works well because the device has low native screen resolution. While integrated game boards are available, the best touch experience can be achieved by choosing a basic board with big tiles and with separate view for discards (the Wall, player information and the Game Manager are available as separate windows).

Another example of Four Winds running full-screen on a Windows 10 touch device: Surface Pro 4 using 2736 x 1824 native screen with 200% app scaling. Here Four Winds has its internal app scaling turned off while using the Integrated Square R game board (1386 x 912 pixels) scaled by 200% so that full native resolution of Surface Pro can be utilized. This is the largest game board that Four Winds can use when app-scaling is allowed: without app-scaling it could use its larger game boards, but even the 1920 x 1200 pixels game boards would only cover about a quarter of the screen, and internally scaled text would at some parts appear far too big (where internal scaling is applied, but the surrounding elements stay unscaled). With app scaling Four Winds cannot necessarily utilize its internal high-resolution tile graphics but the system does upscaling so well that there is no noticeable difference.

Changing mouse- and keyboard-dependent settings and triggering mouse events with a touch

The default mouse configuration of Four Winds for making a discard is clicking a raised tile with the right (secondary) mouse button, which naturally does not work in touch environment. It is necessary to change the default:

  1. Choose File > Preferences.
  2. From the option tree, click General under the User Interface category.
  3. Check the Touch screen friendly option (the setting increases spacing of certain controls and makes hit control a bit looser to allow more relaxed touch control).
  4. Click the Game Controls button.
  5. Within the Mouse control group, change the configuration for Discarding to Click on raised tile, and uncheck the Extended confirmation area box.

Note that Windows emulates the mouse-over event in touch environment with tap-and-hold triggered drag gesture (and also with simple tap when the click event is not processed). E.g., you can display information about the available tiles and discards by tapping individual tiles, or by tapping a tile, holding the finger down a while, and dragging the finger over desired tiles. You can use this feature also to compensate the inaccuracy of finger-based pointing especially when accessing menus: instead of just tapping a menu command, you can tap and hold at any point of a drop-down menu and then drag to highlight menu items, and release when the correct menu command is selected.

Similarly, you can usually perform right mouse click by double tapping. E.g., you can display the context menu related to the Hands tab of the Game Manager by double tapping the list of hands, and the context menu related to the Moves tab by double tapping the list of moves.

Using accessibility features to work around problems with input

When you run Windows in tablet mode, the touch keyboard is normally automatically shown whenever keyboard input is expected, and the icon for manual launch is normally available in the system tray area of taskbar (if it is not, you can ensure that it is by right tapping the taskbar and checking Show touch keyboard button). But it is a good idea to pin the on-screen keyboard on the taskbar, just to ensure that keyboard is readily available also in Desktop mode. To do that, switch to Desktop mode, then click  Start > Settings > Ease of Access > On-Screen Keyboard. Once the keyboard is shown, right click (or tap and hold) to show the context menu and then choose Pin to taskbar.

You need a keyboard in Four Winds e.g. when saving games and entering input when customizing the rules. If you need to access the taskbar covered by Four Winds (either in Desktop mode  or Tablet mode, without having a keyboard and Ctrl+Esc command available), you can display the taskbar by moving the Four Winds window off the 0,0 screen position. Aternatively, you can make the taskbar to be automatically hidden, and then forcing it to be shown by sweeping from the bottom edge. To make the taskbar autohidden (and accordingly a control that can be forced to be shown), right click/tap on the taskbar in the desktop mode and choose Taskbar settings, then enable the options “Automatically hide the taskbar in desktop mode” and “Automatically hide the taskbar in tablet mode”.

Hint: You can reposition Four Winds easily at screen top left corner (0,0 coordinate) by double tapping the title bar (or by dragging the window near top left corner as it will be snapped to 0,0 when moved near the top left corner of the screen). This way you can have full-screen-sized Four Winds, moved off from 0,0 coordinate, to again cover the taskbar and fill the entire screen.

Another accessibility feature that can be useful to compensate shortcomings of desktop applications not designed for touch devices is having the magnifier available whenever needed. To have that, click Start > Settings > Ease of Access > Magnifier > Turn on Magnifier. You can determine the percentage of incremental magnification using the settings (often increment of 25% or less is adequate for temporary magnification). Once turned on, you can pin the Magnifier on the taskbar.

 

 

Posted on Leave a comment

Understanding App Scaling

In recent years ultra high-resolution displays (called e.g. as “Retina”, “4K”, and “UHD”) have become more and more common. Starting from Windows 8.1, Windows has supported system-based app scaling that allows applications that do not provide internal support for ultra-high display resolutions to run in such environments without problems. By using app-scaling, the user can easily scale the apps according to their personal taste without needing to restart the system or log out and in to have the new setting in effect.

Background

Earlier Windows operating systems allowed the user to make individual adjustments to standard windows components and screen fonts, making it possible to run applications on high-DPI devices where the text would be too small to be easily read. This would work reasonably well e.g. in situations where an 13-inch laptop would be run using a 1920 x 1080 or 1920 x 1280 screen resolution. But this method would be clearly inadequate when using ultra-high screen resolutions: not only the text but the applications themselves appear miniature-like (typically at quarter-size of what they are designed to be) and are practically non-usable unless they are scaled up.

Earlier versions of Four Winds supported internal scaling, and the program used an application manifest where it stated to be “high-dpi-aware”, telling the operating system that it would handle scaling-related tasks internally without operating system intervention. This results in Four Winds versions prior to 2.15 prohibiting the system from performing app-scaling, which in modern environment is normally undesired. (The internal manifest can be overridden by using a registry trick and creating an external manifest; but it is better to update the program to current version so that the desired effect can be achieved more easily.)

Starting from version 2.15 Four Winds no longer manifests itself as a “high-dpi-aware” application so by default it uses the app-scaling setting set by the system. This works well in most situations, and especially in ultra-high resolution environments, where the manufacturer has already set a recommended app-scaling value. To see (and change) the percentage of app scaling, right click on your Windows desktop and choose Display settings then under Scale and layout check  (or change) the current scaling percentage.

Implications

App scaling means that applications that do not claim to be “high-dpi-aware” do not see the true resolution of the display, but instead the non-scaled resolution. E.g., if your display uses 2560 x 2048 resolution and 200% app scaling, programs like Four Winds (starting from version 2.15) would see the system resolution as 1280 x 1024, and would accordingly allow using only game boards that fit in this screen size, and the system would scale this up by 200% so that screen size would be doubled both in width and height.

This is in most cases desirable. However, if you have an earlier Windows operating system (Windows 95/98, up to Windows 8; but not 8.1 or 10), and/or have a system that uses (natively or via system app scaling) standard high-resolution screen mode (1920 x 1080 or 1920 x 1200) on a display that is a bit small for such resolution (e.g., a 13-inch laptop where ideal dpi-value would be around 96, meaning resolutions like 1280 x 800 or 1336 x 786, etc.), you would probably prefer to use the old internal app scaling and then use a Four Winds gameboard that matches the resolution. The good news is that you can still have it by doing the following:

  1.  Right click on Four Winds Mah Jong icon on Windows desktop and choose Properties from the context menu (or in Start menu, under 4Winds folder, right click “Four Winds Mah Jong 2”, click More > Open file location, then right click Four Winds Mah Jong shortcut and choose Properties).
  2. In the Properties dialog box, activate the Compatibility tab and check Override high DPI scaling behavior, and from Scaling performed by Application drop-down list choose “Application”. (Note: On the latest Windows 10 versions, you need to first click Change high DPI settings button to access these options.)

Using this setting allows Four Winds to internally enlarge fonts in menus, and make dialog boxes and other system controls bigger, behaving like versions prior to 2.15 did. On later Windows versions and especially when using ultra-high displays, this does not normally produce acceptable results so you would leave manual override compatibility setting turned off.

Because of complex combinations of display resolutions and physical screen sizes, you may need to experiment a while, using different screen resolutions and scaling factors (accessed by right clicking Windows desktop and choosing Display settings), until you find a combination that best works in your environment. The setting recommended by the manufacturer is often ideal quality-wise but may not be ideal as regards usability and legibility.

Posted on Leave a comment

Streaming Four Winds from a Windows Host

Streaming from Windows 10 Pro to Sony Xperia Z2.
Screenshot: Streaming from Windows 10 Pro to Sony Xperia Z2 using Android version of Microsoft Remote Desktop Client. Host: Dell XPS15 set at 1280×800, 150% App Scaling, Taskbar moved from bottom of the screen to the right edge. Client: 1920 x 1080px native screen, default Remote Desktop Client app settings, Four Winds set to be using Basic Board C at 1024 x 768px, auto-scaled to 1440 x 1080 by the RD client app. 

If you have installed Four Winds Mah Jong on Windows Pro or Enterprise, you can play the game on a Windows, Linux, macOS or iOS client by using free Remote Desktop App (or equivalent desktop client, included in the operating system). Or you can use a third-party app like Splashtop Personal, or Chrome Remote Desktop, to host the game on Windows Home computers, as well.

Normally the connection is created within a local area network (wired or wireless), but can be extended to WAN connections. The experience especially within LAN is close to running a local app, and can ideally near the experience of using a native app on a non-Windows client. This post shows how to establish the connection.

When streaming within LAN, all native features of the game are accessible to all clients, including multiplayer games. You can play the game with your family e.g. by using mixed devices, e.g. Windows/macOS/Linux laptops, iPads and Android tablets (or even, if only barely, large-screen mobile phones, as shown in the screenshot above).

Note that when running recent versions of Windows 10 operating system, or Windows 11, you will need to use a 3rd party program to enable Winsock 1.x multiplayer games. For instructions, please check https://www.4windsmj.com/store/general/playing-four-winds-multiplayer-games-on-lan-on-windows-10/

Using Windows Remote Desktop Connection (requires Windows Pro or Enterprise)

  1. The easiest way to set up the hosting computer is to download Microsoft Remote Desktop Assistant at https://www.microsoft.com/en-us/download/details.aspx?id=50042. If you use the assistant, you get easily the IP address that you need to establish the connection from the client side. An alternative method would be setting up the remote connection manually. In recent versions of Windows 10 you can do this from Settings > System > Remote Desktop, where you can access the related settings like turning off the automatic sleep mode. On older systems, the easiest method to establish remote desktop connections is to right click the My Computer icon on the Windows Desktop, choose Properties and then the Remote tab (this can still be accessed on Windows 10 Control Panel by clicking System > Advanced system settings > Remote.
  2. If you use Linux or macOS computer, or iOS, Android or Windows Mobile device, open the Remote Desktop app (available for free from Microsoft Store, Google Play, or App Store), and add your remote PC. Select the remote PC, and then wait for the connection to complete. An alternative method would be using the Remote Desktop Connection desktop interface  (it can normally be located by searching “Remote Desktop Connection” from the Start Menu Search box, but if not, it resides in C:\Windows\System32\mstsc.exe). The app has the benefit of supporting better display scaling (useful especially if either of your computers uses 4K or very high-resolution display but the other does not).
    NOTE: Microsoft Remote Desktop app runs also on the new Apple M1/M2 computers with Big Sur, Monterey or Ventura. This is currently also the only (free) way to use Windows apps on the new Apple computers, and currently the only reliable way to use 32-bit Windows apps on Catalina.
  3. You can extend the Remote Desktop to operate across the Internet, but this requires setting up port forwarding on your router, or using VPN. Please check instructions at https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-allow-outside-access.

Using Splashtop Personal

  1. Go to https://www.splashtop.com/personal to download and install the Windows XP, 7, 8 or 10 host (“Spashtop Streamer”) on the computer where you have Four Winds Mah Jong installed, and a client app for Windows XP, 7, 7 or 10, Windows Mobile, Mac OS X / macOS, iOS (iPhone and iPad), Android or Kindle Fire to be installed on your client device.
  2. Follow the instructions for creating a Splashtop account and setting up the apps.
  3. You can use Splashtop Personal free within LAN. At an extra annual charge, you can extend the connection to operate across the Internet.

Video capture on running Four Winds on iPad using Splashtop Personal

Other methods

Chrome Remote Desktop allows streaming across the Internet between any two devices running Chrome browser. There may be issues with the sound but otherwise the connection seems to be operational.

Parallels Access allows accessing multiple hosts (up to five Windows or Mac computers) with any number of mobile Android and iOS devices and desktop computers (via a browser) accross the Internet with a plan costing EUR 17.99 per year.


Streaming across Internet from Windows 10 host onto an Android device (10-inch Yoga Book tablet running Android 7)
with Parallels Access. The apps cannot be zoomed in (if there is no internal support for it), but accessing menus and controls is made possible by offering a magnifying glass combined with gestures that allow making precise mouse-like operations. 

Posted on Leave a comment

Setting up Wine on macOS (High) Sierra to run Four Winds Mah Jong

Recent developments in virtualization, emulation and techniques that allow running of applications developed for “foreign” platforms as if they were native ones, have made it relatively easy, and often free, to use the same app in mixed environments.

This post takes a closer look on one of this techniques, namely Wine (acronym for “Wine Is Not an Emulator”), that allows running native Windows software on POSIX-compliant operating systems, such as Linux, macOS, & BSD, without need for a Windows license. 

Here we install the game on macOS Sierra / High Sierra (the screenshots are from Sierra).

  1. First you need to allow your system to install apps from “App Store and identified developers” (or possibly “Anyone”, depending on what else needs to be installed other than XQuartz and Wine). Earlier macOS versions let you alter the default setting (that allows apps only from the App Store) by setting the Gatekeeper option under System Preferences > Security & Privacy > General, but High Sierra hides the other two options and you need to enable them by opening the Terminal (in Finder, click Go > Utilities and open Terminal), and type the following (you need to enter your user password to be able to change the setting):
sudo spctl --master-disable
  1. After this you can go and change the Gatekeeper setting.
  2. Go to https://www.winehq.org  and read the introductory text, if you are not familiar with the concept of Wine, then go to https://wiki.winehq.org/MacOS to read installation instructions specific to macOS.
  3. You first need to have XQuartz 2.7.7. (or later) installed. Visit https://www.xquartz.org to download it. Click the .pkg file in Downloads to mount the installer, then launch it to go through the installation.
  4. After having installed XQuartz, download Wine at https://dl.winehq.org/wine-builds/macosx/download.html (version 2.21 “Wine Staging” is a good choice):
  5. Download the .pkg file, click it in Downloads to mount the installer, then launch it to start the installation. During the installation, you may be interrupted by prompts to install support for Mono (for .NET applications) and Gecko (for apps that use HTML internally). Accept to install these support packages.
  6. After the installation is complete, you can go to http://www.4windsmj.com/downloads01.htm and download the latest version of Four Winds Mah Jong. Once downloaded, click the executable setup package (normally 4W2Full24.exe) in Downloads. It will automatically be launched in Wine and installed in correct location. A Windows shortcut is placed on the desktop, but it naturally does not work. You need to replace it with a Mac alias.
  7. Open your Home folder (in Finder, click Go > Home or press Cmd+Shift+H). Now make hidden files and folders visible by pressing Cmd+Shift+. (dot). This shows the hidden .wine folder where your Windows environment is installed:
  8. Double click the .wine folder and open folders until you have 4Winds2 folder open (the folder path relative to .wine is, as shown in the image below: drive_c > Program Files > 4Winds2:
  9. Here, click with the secondary mouse button on 4Winds2.exe to create an alias, then drag and drop it on your desktop.
  10. Launch Four Winds by double clicking the alias.
  11. Once launched, go to File > Preferences, and under User Interface > General option page (accessed by the category tree on the left), disable color management by clearing the check mark from the Use color management option:

    You may also need to Bypass DirectX sound (under the same option page), and choose a MIDI file (on the Themes option page) for the “Background” and “Win of the game” music, or set their values to “none”.  (the default music comes as .mp3 files which require DirectX). If you do not change the sound settings, you can turn off background music from the Options menu so that an unsupported feature is not used.

  12. If you have a one-button mouse, click the Game Controls button, then change the mouse control setting for discarding from “Right click on  raised tile” to “Click on raised tile”. On the same dialog box, you may need to uncheck Use custom cursors (with recent Wine builds, animated and custom cursors seem to be working fine, but if the game suddenly freezes, one possible cause is the use of custom mouse cursors).
  13. Close the Preferences dialog box and click Help > Register to enter your registration name and number. Then choose Game > New Game to start a new game with preferred rules.
  14. You may want to test with different game boards by using the options under the View > Game boards sub menu to find the board size and layout that works best on your screen. Note that the quality of graphics is mediocre compared to the original but looks slightly better on boards that have not been scaled. If you choose a 24-bit theme, scaling has a better quality: e.g., for the default graphics, choose File > Preferences, then under User Interface > Themes, choose “Four Winds (24-bit)”.

And there you are, running Four Winds Mah Jong on your Mac, without needing a Windows license. The quality is not as good as when using VMWare or VirtualBox (both free), or Parallels Desktop, not to mention running the game on real Windows on a BootCamp partition, but at least you can now play proper Mahjong with multitude of rule options offline on your Mac.

NOTE: WINE based solutions are currently limited to macOS versions that support running 32-bit apps, so this solution is not at least officially applicable to macOS Catalina, Big Sur or Monterey (there are posts on the Internet that describe using WINE also on these operating systems, but officially only systems up to Mojave are supported) . The commercial version of Wine, CodeWeavers CrossOver, however officially supports 64-bit macOS versions up to Monterey, and even new M1 (Apple Silicon) based macs, while other solutions are limited to Intel based macs. For more information, see a separate post on this forum.

A screenshot of Four Winds 2.18 running on macOS Mojave using the latest Wine (4.2 Staging) and XQuartz 2.7.11.
The quality of graphics has improved with latest versions and scaled boards work well.

 

Running Four Winds on Linux

The procedure is basically the same as on macOS, though installation happens from within the Terminal. WineHQ has instructions for installing Wine on several different Linux systems. Below is a screenshot of Four Winds running on Ubuntu 16.04 using Wine 3.0.