Question

My question is the exact opposite of this earlier one. I am working on an open source application, which is published under 2 forms, pre-compiled binaries and source code.

I installed the pre-compiled binaries and it works perfectly, with a nice little icon in the dock.

I compiled the source code successfully, but I get a runtime error when I launch it. After investigation I suspect this app needs command-line options to run correctly.

So my question is: if my assumptions are correct and the working version is actually defining command line arguments, how can I retrieve the CL arguments from the packaged app?

If it makes any difference, the app I'm talking about is Cyberduck, and I'm running OS X Version 10.8.2

Was it helpful?

Solution

The issue is not the command line. From the code here

// Get an instance of the non-localized keys.
CFDictionaryRef bundleInfoDict = CFBundleGetInfoDictionary(mainBundleRef);  
if(NULL == bundleInfoDict) {
    fprintf(stderr, "[Launcher Error] No info dictionary.\n");
    exit(-1);
}

where mainBundleRef refers to the .app bundle.

The problem is that the Info.plist inside the app (/Applications/Cyberduck.app/Contents/Info.plist) does not have the normal keys in it. It has been corrupted in some way.The one in the code repository looks OK at a glance. For information about the structure I would look at the Apple development document.

The easiest fix would be to redownload and install the application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top