JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Mac - Will not start - Will not load library #931

Closed keybounce closed 6 years ago

keybounce commented 7 years ago

Reporting a bug? Please make sure you've given the following information - thanks!

Operating system and version: Mac OS 10.9.5.

Is this for single player or multiplayer? Both

Description of the bug (and if possible, steps to reproduce the bug): Game executable has a hard-coded path to SDL as /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib

It will not find (on my system) /opt/local/lib/libSDL2-2.0.0.dylib /opt/local/lib/libSDL2.a /opt/local/lib/libSDL2.dylib

In general, there are serious problems with /usr/local and the mac compiler. (The people at MacPorts can explain it a lot better than I can).

What I did:

  1. Purchased JK on the Steam sale.
  2. Got around to playing it tonight.
  3. Went to the community tab.
  4. Found this guide: http://steamcommunity.com/sharedfiles/filedetails/?id=387786957 It told me to come here, and download the .dmg from you. It also said to put the files into the GameData folder -- but I've got a steamapps/common/Jedi Academy, with no "GameData" anywhere. (A folder of packed resource files...)
  5. On this site there is information for getting the Mac App Store version working, but nothing for the steam version.

What did you expect to happen instead? I expected it to start. openjk.x86_64_2017-05-26-215349_keybounceMBP.crash openjk_sp.x86_64_2017-05-26-215243_keybounceMBP.crash openjk_sp.x86_64_2017-05-26-215238_keybounceMBP.crash openjk_sp.x86_64_2017-05-26-215204_keybounceMBP.crash

... that did not work

We don’t support that file type. with a PNG, GIF, JPG, DOCX, PPTX, XLSX, TXT, PDF, or ZIP. 

Sorry, I cannot upload the actual crash report.

Process: openjk_sp.x86_64 [11188] Path: /Volumes/VOLUME/*/openjk_sp.x86_64.app/Contents/MacOS/openjk_sp.x86_64 Identifier: openjk_sp.x86_64 Version: ??? Code Type: X86-64 (Native) Parent Process: launchd [245] Responsible: openjk_sp.x86_64 [11188] User ID: 502

Date/Time: 2017-05-26 21:52:03.926 -0700 OS Version: Mac OS X 10.9.5 (13F1911) Report Version: 11 Anonymous UUID: 322D0FA5-7F98-C78B-7DAB-9D4440433719

Crashed Thread: 0

Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information: dyld: launch, loading dependent libraries

Dyld Error Message: Library not loaded: /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib Referenced from: /Volumes/VOLUME/*/openjk_sp.x86_64.app/Contents/MacOS/openjk_sp.x86_64 Reason: image not found

Binary Images: 0x7fff69c48000 - 0x7fff69c7b887 dyld (239.5) <1D3130FE-FE7E-3C4C-8E74-EB51895B6BA5> /usr/lib/dyld

ensiform commented 7 years ago

GameData folder is a windows thing. If the steam version doesn't have it, it might just be that they did away with the extra folder on Mac version for steam.

SDL2 must be downloaded from homebrew. (Note I'm not a mac user or dev so just know this is a thing).

Paging @redsaurus @xycaleth

keybounce commented 7 years ago

ugh, ok, getting past the SDL issue, and now it dies with:

tty console mode disabled
OpenJK: v1.0.1.1 macosx-x86_64 May 14 2017
Initialising zone memory .....
----- FS_Startup -----
Current search path:
/Users/michael/Library/Application Support/OpenJK/base
/Volumes/UserData/Users/michael/Documents/Games/SteamLibrary/steamapps/common/Jedi Academy/openjk_sp.x86_64.app/Contents/MacOS/base
/Volumes/UserData/Users/michael/Documents/Games/SteamLibrary/steamapps/common/Jedi Academy/base

----------------------
0 files in pk3 files
Couldn't load default.cfg

The "openjk_sp.x86_64.app" thing? Over there I have these:

... Umm, why do I see completely different files from Finder than I do from the shell?

From Finder, I see these files:

.DS_Store
OpenJK SP.app
OpenJK.app
openjkded.x86_64
Star Wars Jedi Knight: Jedi Academy.app

From shell, I see these files:

keybounceMBP:Jedi Academy michael$ ls -a
total 1156
   0 ./                            0 SWJKJA.app/                1148 openjkded.x86_64*
   0 ../                           0 openjk.x86_64.app/
   8 .DS_Store                     0 openjk_sp.x86_64.app/
keybounceMBP:Jedi Academy michael$ pwd -P
/Volumes/UserData/Users/michael/Documents/Games/SteamLibrary/steamapps/common/Jedi Academy
keybounceMBP:Jedi Academy michael$ 

That listed app bundle?

keybounceMBP:Jedi Academy michael$ ls -R openjk_sp.x86_64.app/
total 0
0 Contents/

openjk_sp.x86_64.app//Contents:
total 4
4 Info.plist    0 MacOS/        0 Resources/

openjk_sp.x86_64.app//Contents/MacOS:
total 3796
   0 OpenJK/                    2820 openjk_sp.x86_64*           976 rdsp-vanilla_x86_64.dylib*

openjk_sp.x86_64.app//Contents/MacOS/OpenJK:
total 2484
2484 jagamex86_64.dylib*

openjk_sp.x86_64.app//Contents/Resources:
total 244
  0 English.lproj/      244 OpenJK.icns

openjk_sp.x86_64.app//Contents/Resources/English.lproj:
total 4
4 InfoPlist.strings*
keybounceMBP:Jedi Academy michael$ 

There is no "base" directory. The .pk files are in Shell:

keybounceMBP:Jedi Academy michael$ ls SWJKJA.app/Contents/*
4 SWJKJA.app/Contents/Info.plist*       4 SWJKJA.app/Contents/PkgInfo*

SWJKJA.app/Contents/Jedi Academy MP.app:
total 0
0 Contents/

SWJKJA.app/Contents/Jedi Academy.app:
total 0
0 Contents/

SWJKJA.app/Contents/MacOS:
total 824
 824 SWJKJA*

SWJKJA.app/Contents/Resources:
total 2940
   0 ASLTestBed.nib/              16 GameGuideWindow.nib*          8 background.png*
2888 AppIcon.icns*                 0 German.lproj/                 4 badge.png*
   0 English.lproj/                4 MainMenu.nib*                 4 pdbtn-fullscreen.png*
   0 French.lproj/                 4 arrowleft.png*                4 pdbtn-inwindow.png*
   4 GameGuideInfo.plist*          4 arrowright.png*

SWJKJA.app/Contents/base:
total 1196596
 548640 assets0.pk3*     637508 assets1.pk3*       1092 assets2.pk3*       9068 assets3.pk3*        288 assets6.pk3*
keybounceMBP:Jedi Academy michael$ 

Finder: Well, it's inside the Jedi knights.app / Contents/base folder.

... Is Finder actually using a language translation table to hide the real filenames? This explains why I've got two "identical" filenames with different icons and functions for sub-apps.

Alright. So, copy those pk files over and see if it starts up?

... Ugh, it runs, ... but ...

Well, that's what it takes to make it run. That's not at all what's documented.

marvinhagemeister commented 7 years ago

@keybounce That's awesome! I was trying to get JKA running on mac a few months ago and gave up. Perhaps you could make a PR to update the installation instructions or list your steps here? That'd be really amazing!

keybounce commented 7 years ago

Sorry, I thought that was a list of steps.

I''ll do a more detailed step-by-step after breakfast. My pets just got me to feed them early and I haven't eaten yet.

(earlym oringing "wake up or else")

circa-III commented 7 years ago

All you had to do was put the openjk apps into that folder, yeah. Then what I do is make an alias (shortcut) for the apps and put them in Applications folder so they show in Launchpad.

It is explained here:

https://jkhub.org/tutorials/article/178-installing-openjk-on-os-x/

@keybounce

kencu commented 7 years ago

I have made a new Portfile for MacPorts to make this all hopefully transparent for Mac users. https://github.com/macports/macports-ports/pull/506 .

sudo port -v install openjk and you're nearly done. Just add in the game's base folder.

BTW, IMHO it is better and much easier to put the "base" folder into ~/Libarary/Application Support/OpenJK rather than into the app bundle directly, and it survives reinstalls and openjk upgrades that way.

ensiform commented 7 years ago

TBH running it more like *nix would be even better. .app support is meh at best and not really designed to support mods or external resources, even if it can

mojca commented 7 years ago

I committed the package written by @kencu to MacPorts, so feel free to test.

xycaleth commented 6 years ago

Looks like this can be closed...