Page 1 of 1

Runs well on macOS due to being in Java

Posted: Sun Aug 18, 2024 1:17 am
by glangmead
When I saw this game required Java, and had a file named Stalingrad.jar, I decided to try to get it running directly on my Mac (M3 MacBook Pro, macOS 14.6.1). I wanted to share the steps here. I hope you agree that there's nothing particularly shady here! There's something unreasonable in my brain that wants to engage more with the game now that it's running directly on my main computer without blurry Crossover text or knowing I'm wasting resources running Parallels.
  1. Install the game on a PC or inside a Wine bottle or Whisky bottle or Crossover bottle or in Parallels.
  2. Copy the game directory to your Mac
  3. Open Terminal and either find or install an appropriate version of java. For me the one at /usr/bin/java works fine.
  4. Obtain the "Java home" path by typing

    Code: Select all

    /usr/bin/java -XshowSettings:properties -version
    and look for a line like

    Code: Select all

    java.home = /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
  5. In the game folder, delete libs/jre and make it a symlink to the Java home by doing

    Code: Select all

    cd libs; ln -s /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home jre; cd ..
  6. Find your product serial number in the file serialreg.txt (in the game directory). It's of the form "XXXX-XXXX-XXXX-XXXX-XXXX" and can also be obtained from matrixgames.com
  7. Put the following text in a file named "reg" in the game directory (which will imitate a call to the Windows registry):

    Code: Select all

    echo REG_SZ XXXX-XXXX-XXXX-XXXX-XXXX
    with spaces between each of the three tokens, and the last one is of course your serial number.
  8. Type the following to make the "reg" command executable:

    Code: Select all

    chmod a+x reg
  9. Run the following command to start the game:

    Code: Select all

    PATH=$PATH:.; /usr/bin/java -Xmx1G -jar Stalingrad.jar
The issues I've noticed are
  • It looks better when running in a window
  • The trackpad scrolling doesn't smoothly zoom, it zooms all the way in and then stays there. I use +/- instead.
  • I haven't tried shortcuts that use (what the game calls) "Ctrl". I'm guessing one of Ctrl or Command will work. Single-key shortcuts like F work fine.
(edited to remove issue about drag and drop, which just wasn't turned on)

Re: Runs well on macOS due to being in Java

Posted: Tue Aug 27, 2024 3:06 pm
by Saint Ruth
Oh, that's interesting. I don't have a MAC so never tried, but it should work anyway (like LINUX) that has java.

By the way, you should be able to Drag/n/Drop if you go to the game Options (from the main menu - not when playing a game) and there's an option to turn off/on Drag/n/Drop. There was an update to give you a choice to use drag/drop or click move.

Cheers,
brian

Re: Runs well on macOS due to being in Java

Posted: Tue Aug 27, 2024 3:55 pm
by glangmead
Oh good, I hadn't seen that checkbox. After turning it on, drag and drop works great!