Jump to content

NearInfinity MacOS?


haze

Recommended Posts

AstroGuy used to have a MacOS WINE version of EEKeeper on GitHub, but it appears he deleted his GitHub account. Then I read that EEKeeper is outdated and to instead use NearInfinity to edit saved games. I even saw a walkthrough from @subtledoctor for using Near Infinity to edit saved games. So, I downloaded the native MacOS version of Near Infinity and installed it, but it won't run. The icon bounces a couple of times on the dashboard and then nothing happens. I looked under Security and Privacy, there are no security issues to bypass. I installed Java also in case that was the issue. No change.

Also, I wanted to try my hand at making a kit. I saw a good guide on Beamdog Forums by @CrevsDaak and a couple of video tutorials on YouTube. 

Anybody have suggestion on how to get NearInfinity to run on MacOS? Thanks.

Edited by haze
Clarity
Link to comment

Yeah, it's hard to work with no feedback at all.

I have seen that "nothing happens" result myself with a different program - it was an attempt to run a 32-bit app. (Incidentally, I deleted EEKeeper from my current system because it was a 32-bit app. The previous system was running an older version of the OS that still allowed 32-bit apps, but no chance now.) That shouldn't be the issue with NI, but who knows...

Link to comment

I've started seeing a similar issue a few months ago after I'd updated to one of the newer packages. The app tries to open but fails silently. Running "open NearInfinity.app" fails silently. Then I've tried to run NearInfinity.app/Contents/MacOS/NearInfinity and got a java exception stack trace, failing to find libharfbuzz. So I installed and symlinked it into the expected location, and now I get the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Applications/NearInfinity.app/Contents/runtime/Contents/Home/lib/libfontmanager.dylib: dlopen(/Applications/NearInfinity.app/Contents/runtime/Contents/Home/lib/libfontmanager.dylib, 0x0001): Library not loaded: /usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib

  Referenced from: <D7FA2D64-D161-374E-A9D5-C5A565497B9F> /Applications/NearInfinity.app/Contents/runtime/Contents/Home/lib/libfontmanager.dylib

  Reason: tried: '/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib' (no such file), '/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib' (no such file), '/usr/local/lib/libharfbuzz.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libharfbuzz.0.dylib' (no such file, not in dyld cache)

Looks like the end of the road to me. It seems that the current NearInfinity app was built for Intel architecture.

Running the jar file directly, however, works perfectly well, so I do that instead as a workaround.

Link to comment
34 minutes ago, critto said:

Looks like the end of the road to me. It seems that the current NearInfinity app was built for Intel architecture.

The macOS installer is currently not available for Apple's ARM64 architecture. I don't have access to such a system and GitHub doesn't appear to support this architecture for automated operations yet unless you are a paying customer. If someone would like to volunteer and create these packages I could add them to the Release page though.

Link to comment
9 hours ago, critto said:

What does the process entail, exactly?

Building PKG files is actually a (relatively) simple process, provided it works the same way on ARM64 as on Intel machines.

You need a recent Java version (v17 or preferrably v21) and a build script I created originally for manually building pkg files on Intel machines. You'll also need the (latest) NearInfinity.jar file itself. I don't think Xcode is needed for the process, but I can't verify that since Xcode is already installed on my test machine.

First-time preparations

Spoiler

1. Install Java

On macOS I'd recommend the SDK Manager for that. Execute this command in a terminal:

curl -s "https://get.sdkman.io" | bash

Restart the terminal and install latest Java:

sdk install java 21-tem
sdk upgrade

 

2. Install build script

Download NearInfinity-assets-master.zip and unpack it on your system (e.g. into the Documents folder).

The script is probably not yet executable. You'll also have to create the subfolder for the source NearInfinity.jar.

cd ~/Documents/NearInfinity-assets-master/redistributable/macos
chmod +x build.command
mkdir -v jar

Since this code was written for creating Intel x86-64 PKG archives you have to adjust the resulting filename in the script file. Open "build.command" in a text editor and in line 42 change "NearInfinity-macos-x86_64-${NI_VERSION}.pkg" to "NearInfinity-macos-aarch64-${NI_VERSION}.pkg".

 

Building a PKG archive

Spoiler

1. Download the NearInfinity-<date>.zip file from https://github.com/Argent77/NearInfinity/releases/latest and unpack it into the directory "~/Documents/NearInfinity-assets-master/redistributable/macos/jar". Overwrite the old version if needed.

2. Open the terminal and perform these steps:

cd ~/Documents/NearInfinity-assets-master/redistributable/macos
./build.command

If everything went well then you'll find the resulting PKG file in the same directory as the build script.

 

Link to comment

Hey argent77. So, the new release seems to be crashing on arm64:

Application Specific Information:
References to Carbon menus are disallowed with AppKit menu system (see rdar://101002625). Use instances of NSMenu and NSMenuItem directly instead.

I can send you a whole stack-trace if you wish, but it looks like generic Apple crash report stuff. I did my own build locally, using the latest jar, and it runs fine.

Link to comment
12 minutes ago, critto said:

Hey argent77. So, the new release seems to be crashing on arm64:

Application Specific Information:
References to Carbon menus are disallowed with AppKit menu system (see rdar://101002625). Use instances of NSMenu and NSMenuItem directly instead.

I can send you a whole stack-trace if you wish, but it looks like generic Apple crash report stuff. I did my own build locally, using the latest jar, and it runs fine.

Interesting. I couldn't find out much about this error except for this thread. It isn't very clear but it seems to be caused by a deprecation of an API in macOS 14 that is used by some Java Runtime packages.

Could you test whether this version runs on your system: NearInfinity-macos-arm64-2.4.20240424.pkg

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...