[CMake] Running OSX Bundle via open after creation with CMake/CPack

Scott Klum scott.klum at gmail.com
Mon Jun 23 09:04:56 EDT 2014


Also, I forgot to mention that using the Console Utility gives nondescript
errors: it just says MyApp exited with code 127.


On Mon, Jun 23, 2014 at 8:56 AM, Scott Klum <scott.klum at gmail.com> wrote:

> Lucas and David,
>
> Thank you for your responses.
>
> *Does anything get printed in the terminal if you type and enter: *
> */Applications/MyApp.app/Contents/MacOS/MyApp**?*
>
> This is what I mean when I say I can run it through the terminal.  If I
> enter the above command the app starts properly.
>
> *Does your app launch a lot of sub-processes at startup?*
>
> Nope - and as far as I can tell the code in my main.cpp isn't even reached.
>
>
> *Are you saying that you *can* run the app from the terminal window, but
> that you cannot run the app by double-clicking or by using "open"? (And
> that it's the exact same executable...?) What command line do you use if
> you're not using "open"? *
> That's correct.  I use the command described in the first response.
>
>
> *Is there an environment difference (maybe LD_LIBRARY_PATH or
> DYLD_LIBRARY_PATH?) between your Terminal, and your overall environment?*
>
> Not that I can tell.
>
> *Can you launch a debug build in a debugger?*
>
> Building in debug mode doesn't seem to make any difference.
>
> The fundamental problem seems to be whatever the open command does in the
> background, I haven't set things up properly in terms of open knowing that
> the when I run open MyApp.app, it should run
> MyApp.app/Contents/MacOS/MyApp.  I've got CFBundleExecutable set to
> MyApp... in fact my .plist looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
> http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
> <key>CFBundleDevelopmentRegion</key>
> <string>English</string>
>  <key>CFBundleExecutable</key>
> <string>MyApp</string>
> <key>CFBundleIdentifier</key>
>  <string>com.MyApp</string>
> <key>CFBundleInfoDictionaryVersion</key>
> <string>6.0</string>
>  <key>CFBundleName</key>
> <string> MyApp</string>
> <key>CFBundleIconFile</key>
>  <string> MyApp</string>
> <key>CFBundlePackageType</key>
> <string>APPL</string>
>  <key>CFBundleShortVersionString</key>
> <string>2.1.0</string>
> <key>CFBundleVersion</key>
>  <string>2.1.0</string>
> <key>CSResourcesFileMapped</key>
> <true/>
>  <key>LSRequiresCarbon</key>
> <true/>
> <key>NSHighResolutionCapable</key>
>  <true/>
> </dict>
> </plist>
>
> Again, not sure how to proceed.  But, I really appreciate the help.
>
> Regards,
> Scott
>
>
> On Mon, Jun 23, 2014 at 6:13 AM, David Cole <dlrdave at aol.com> wrote:
>
>> Also, you may find extra hints about what's going wrong in the output of
>> the "Console" application. (Usually found in "/Applications/Utilities") --
>> see if there's anything in the "system.log" in there, or poke around and
>> see if it has a crash report related to your app.
>>
>>
>> HTH,
>> David C.
>>
>>
>
>
> --
> Scott Klum
> B.S. in Computer Science, Michigan State University 2012
> M.S. in Computer Science, Michigan State University 2014
>



-- 
Scott Klum
B.S. in Computer Science, Michigan State University 2012
M.S. in Computer Science, Michigan State University 2014
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140623/0129eca6/attachment.html>


More information about the CMake mailing list