2

I have an Mac OS X app working fine on XULRunner ver 18.0.

Now I am upgrading the XULRunner version from 18.0 to 30.0. Have followed the steps below:

  1. Downloaded the XULRunner 30.0 Runtime
  2. Remove the content from XULRunner.Framework directory
  3. Copied the latest files downloaded in XULRunner 30.0 Runtime
  4. Now while launching the application, I am getting this error:

Dyld Error Message: Library not loaded: @executable_path/libmozglue.dylib Referenced from: /Users/USER/Desktop/*/MyApp.app/Contents/MacOS/xulrunner Reason: image not found

Alexander O'Mara
  • 58,688
  • 18
  • 163
  • 171

1 Answers1

3

Unfortunately XULRunner is not well supported, but I was able to get around most of the errors and get it working, except for one issue which I will get to later.

Basically, all the instructions I can find for how to structure the bundle are outdated. Mozilla had to restructure the binaries due to changes in the Mac code signing layout requirements. From this bug report and some trial and error I was able to determine the layout requirements.

The first error we can see when running the Contents/MacOS/xulrunner binary from the command line.

Error 1:

dyld: Library not loaded: @executable_path/libmozglue.dylib

The entirety of the XUL.framework contents must be placed into the App's Contents/MacOS/ directory. So to fix this error, copy everything from XUL.framework/Versions/Current into your app's MacOS directory.

Ok, now the binary will run. However, that brings us to the next error which can also be seen from the command line.

Error 2:

Couldn't load XPCOM.

This error is anything but descriptive, but to solve it you simple need to copy the dependentlibs.list file (now in your MacOS directory) to your Contents/Resources/ directory.

Error 3:

Now when you run by the command line, you will get something like the following.

Mozilla XULRunner 36.0.4

Usage: xulrunner [OPTIONS]
       xulrunner APP-FILE [APP-OPTIONS...]

OPTIONS
      --app                  specify APP-FILE (optional)
  -h, --help                 show this message
  -v, --version              show version
  --gre-version              print the GRE version string on stdout

APP-FILE
  Application initialization file.

APP-OPTIONS
  Application specific options.

Unfortunately, xulrunner is not automatically finding the application.ini file in Contents/Resources. For testing, we can force it through the command line. Something like the following will do the trick:

./MyApp.app/Contents/MacOS/xulrunner MyApp.app/Contents/Resources/application.ini

At the moment, the only possible solution to this last issue I can offer at the moment is to make a stud loaded, either a shell script or compiled binary that executes the necessary command to run application.ini in xulrunner.

Community
  • 1
  • 1
Alexander O'Mara
  • 58,688
  • 18
  • 163
  • 171