• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 … 23 24 25 26 27 … 117 Next »

Some questions about "fixup_bundle"
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Some questions about "fixup_bundle"
04-15-2017, 12:44 PM
#1
zachrwolfe Offline
Junior Member
**
Posts: 11
Threads: 2
Joined: Apr 2017
Hi everyone,

Last night I decided to start tinkering with the Dolphin source code on macOS, and I thought a natural first step would be to compile the current source. Following the instructions, everything appeared to be going well. All targets had finished compiling, the main binary was linked successfully, and the make process moved on to the "Fixing up the application bundle" phase. Then in an instant, everything came crashing to a halt, and my dreams and aspirations were crushed.

Well ok, maybe not that last part. But seriously, the following CMake error occurred at DolphinPostprocessBundle.cmake:40:
Code:
error: fixup_bundle: not a valid bundle

As someone who has never bothered with cross-platform build-systems like CMake literally until installing CMake yesterday specifically to build Dolphin, I didn't really know what to do and googling it brought nothing useful to my attention. So - of course - I opened the offending CMake file in a text editor and commented out the line that mentioned "fixup_bundle", then rebuilt the project. And lo and behold, it worked([color=#222222]™[/color])! (meaning I was able to launch the app bundle and menus worked. Haven't tested a game)

Which brings me to my questions, then: what exactly does fixup_bundle do; why does it not work on my machine; why would commenting out a line that refers to it not break things spectacularly; or, if that in fact does break things spectacularly, what things does it break and how spectacularly does it break them? (I suppose the last two questions are redundant to the first one, but whatever)

As another bit of info, last night I actually initially built the project on a 2012 non-retina MacBook Pro running an early beta of Sierra and got this error, but thought it could have been related to the beta OS. I then switched to Zachintosh (the name of my hackintosh, obviously) and was able to reproduce the exact same behaviour on the latest non-beta version of Sierra.

Thanks in advance!
Find
Reply
04-15-2017, 08:12 PM
#2
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 523
Threads: 3
Joined: Oct 2009
fixup_bundle is mostly used to change a bundle so it can run on a different machine. After building, some system libraries might be referenced, but not included in the bundle - that CMake command takes care of it.
As long as you only want it on your machine, you can just leave it commented out.

You could also specify the CMake option SKIP_POSTPROCESS_BUNDLE (by calling cmake -DSKIP_POSTPROCESS_BUNDLE=ON [other parameters here]) to skip it.
Find
Reply
04-17-2017, 06:42 AM
#3
zachrwolfe Offline
Junior Member
**
Posts: 11
Threads: 2
Joined: Apr 2017
Thank you, that was very helpful. So if I'm understanding correctly, commenting out that line will (or, I guess, has the potential to) cause the postprocess bundle to not be linked with the libraries in extra_libs and extra_dirs? And consequently, if I try to use Dolphin's postprocessing functionality on my build of the app, I suppose I can expect a crash if any code that references a symbol from those libraries is executed?

I guess the only other thing I don't get is why that command didn't just work in the first place. I had the idea while writing this post that maybe the "invalid bundle" error had something to do with finnickyness over the space in my Google Drive folder's name, but I don't have time to test that right now. You think that theory holds any water?

Also: here are the relevant lines from the CMake file so you or whoever else doesn't have to go hunt them down.
Code:
# Make sure to fix up any additional shared libraries (like plugins) that are
# needed.
file(GLOB_RECURSE extra_libs "${DOLPHIN_BUNDLE_PATH}/Contents/MacOS/*.dylib")

# BundleUtilities doesn't support DYLD_FALLBACK_LIBRARY_PATH behavior, which
# makes it sometimes break on libraries that do weird things with @rpath. Specify
# equivalent search directories until https://gitlab.kitware.com/cmake/cmake/issues/16625
# is fixed and in our minimum CMake version.
set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib")
...
Code:
fixup_bundle("${DOLPHIN_BUNDLE_PATH}" "${extra_libs}" "${extra_dirs}")
Find
Reply
04-17-2017, 07:44 AM
#4
merry
Unregistered
 
Quote:So if I'm understanding correctly, commenting out that line will (or, I guess, has the potential to) cause the postprocess bundle to not be linked with the libraries in extra_libs and extra_dirs?

Commenting out that line will result in a bundle that cannot be used on another computer. The paths to libraries will be hardcoded to where they are on your system.
Reply
04-17-2017, 07:48 AM
#5
zachrwolfe Offline
Junior Member
**
Posts: 11
Threads: 2
Joined: Apr 2017
(04-17-2017, 07:44 AM)merry Wrote: Commenting out that line will result in a bundle that cannot be used on another computer. The paths to libraries will be hardcoded to where they are on your system.

Ahh, gotcha. Thank you.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma