[CMake] cpack bundle generator qq

Timothy M. Shead tshead at k-3d.com
Fri Jan 16 20:40:27 EST 2009


David Cole wrote:
> I have always been of the opinion that if you are building a Mac bundle
> application, it should be complete as a bundle at the end of the build.
> At the end of "make". Even before "make install".
> 
> Now that may just be my ancient Mac-fanboy-forever bias showing through,
> but if you're building a bundle application, then I should be able to go
> to the build directory in the Finder and double click the icon after the
> build is done. If I can't do that, it ain't a real Mac bundle app. Period.
> 
> So I think it is completely valid to expect that a Mac app be bundled at
> build time.

Agreed - as I mentioned before, I understand that if you don't have a
bundle, running a GUI application out of the build directory is
problematic (for those unfamiliar: your program runs, but the window
manager doesn't provide any decorations for your windows, so everything
gets stuck in the top-left-corner of the screen and you can't move /
resize / close them).

What I was leading-up-to was that we need to make a distinction between
"build bundles" that are created as a convenience for running
applications out of the build directory, and "package bundles" that are
created as part of the packaging process.  For example, if you have

ADD_EXECUTABLE(foo ... MACOSX_BUNDLE)
INSTALL(TARGETS foo DESTINATION bin)

I gather that there is some special-case logic in the install-generation
code that handles installing the bundled binary, the auto-generated
plist, etc.  Now suppose that the special-case code were removed, so
that just the binary - even though it's bundled in the build directory -
goes to the bin directory at install-time just as it would on any other
platform.  With this behavior in place, you would avoid the
"bundle-within-a-bundle" problem, and you would write package generators
that would be smarter - i.e. duplicate much of the functionality of
build-bundling by default, but allow sufficient configuration to handle
more complex packaging scenarios.

Of course, I'm assuming that package generator code has access to the
same executable properties at runtime as the configuration code - is
that true?

Cheers,
Tim


-------------- next part --------------
A non-text attachment was scrubbed...
Name: tshead.vcf
Type: text/x-vcard
Size: 168 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090116/c08ed94d/attachment.vcf>


More information about the CMake mailing list