LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.64k stars 207 forks source link

Unable to load nib file: MainMenu, exiting #437

Closed marekyggdrasil closed 2 years ago

marekyggdrasil commented 2 years ago

Hi all! It is my first time playing with SameBoy code. Managed to build it on MacOS, process was painless and even pleasant as it is great to see things... just compiling.

brew install rgbds
make

builds properly and creates output files in the build directory. Then I attempt to run it

$ ./build/bin/SameBoy.app/Contents/MacOS/SameBoy 
2022-03-01 20:40:41.207 SameBoy[14455:56309] Unable to load nib file: MainMenu, exiting

not sure what is wrong... This might not be the right way to run it. Could someone comment?

LIJI32 commented 2 years ago

Did the MainMenu.nib fail successfully build? Does it exist inside the bundle? Do you have the ibtool command line utility installed and working? It should be installed as part is Xcode.

marekyggdrasil commented 2 years ago

I searched for ibtool in the make output and found this

ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/Document.nib Cocoa/Document.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/GBObjectViewItem.nib Cocoa/GBObjectViewItem.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/GBPaletteViewRow.nib Cocoa/GBPaletteViewRow.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/GBS.nib Cocoa/GBS.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/MainMenu.nib Cocoa/MainMenu.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/PopoverView.nib Cocoa/PopoverView.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/Preferences.nib Cocoa/Preferences.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ibtool --compile build/bin/SameBoy.app/Contents/Resources/Base.lproj/UpdateWindow.nib Cocoa/UpdateWindow.xib 2>&1 | cat -
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

thought I might not have xcode... so I checked

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

just need an update, in progress now! Will build again once done and let you know.

LIJI32 commented 2 years ago

Ibtool requires a full Xcode installed rather than just the command line tools. Make sure you have Xcode installed and selected via xcode-select -s path/to/Xcode.app

marekyggdrasil commented 2 years ago

Did update, still same. Unfortunately can't install full xcode at the moment

macOS version 11.3 or later is required.

this is not a good time for me to make macOS upgrade, I have too many tools that are critical for daily work that might suddenly get broken by this update. Maybe in the future I'll come back to SameBoy! Thanks a lot for the tips!

LIJI32 commented 2 years ago

SameBoy is compatible with fairly old versions of Xcode, you can download an older version of Xcode from Apple’s developer portal.

marekyggdrasil commented 2 years ago

Thanks for feedback, I checked an apparantly xcode 12.4 would be available. Unfortunately still, it's a 10GB bundle, I don't have that kind of space on my SSD. I guess it is just not a UI-development-friendly workstation.