MantisBT - CMake
View Issue Details
0007170CMakeCPackpublic2008-06-06 11:382008-09-11 10:49
Timothy Shead 
Bill Hoffman 
normalfeatureN/A
closedfixed 
 
 
0007170: Patch - prototype CPack OSX bundle generator
For several Qt- and GTK-based projects, I need more flexibility than the current OSXX11 generator provides. The attached patch is a first-iteration prototype to stimulate discussion. I've written-up details in the wiki at

http://www.cmake.org/Wiki/User:Tshead/OSX_CPack_Bundle_Generator [^]

for comment.
No tags attached.
patch bundle_generator.patch (16,304) 2008-06-06 11:38
https://public.kitware.com/Bug/file/1523/bundle_generator.patch
patch bundle_generator_2.patch (11,445) 2008-07-10 16:41
https://public.kitware.com/Bug/file/1593/bundle_generator_2.patch
patch bundle_generator_test.patch (5,290) 2008-07-28 19:29
https://public.kitware.com/Bug/file/1625/bundle_generator_test.patch
? BundleIcon.icns (33,452) 2008-07-28 19:30
https://public.kitware.com/Bug/file/1626/BundleIcon.icns
Issue History
2008-06-06 11:38Timothy SheadNew Issue
2008-06-06 11:38Timothy SheadFile Added: bundle_generator.patch
2008-06-18 09:16David ColeNote Added: 0012396
2008-06-18 09:16David ColeStatusnew => assigned
2008-06-18 09:16David ColeAssigned To => David Cole
2008-06-18 09:54David ColeNote Added: 0012399
2008-06-19 06:17David ColeNote Added: 0012412
2008-07-10 16:41Timothy SheadFile Added: bundle_generator_2.patch
2008-07-10 16:45Timothy SheadNote Added: 0012691
2008-07-18 16:13David ColeNote Added: 0012744
2008-07-28 19:29Timothy SheadFile Added: bundle_generator_test.patch
2008-07-28 19:30Timothy SheadFile Added: BundleIcon.icns
2008-07-28 19:35Timothy SheadNote Added: 0012847
2008-07-30 16:37David ColeNote Added: 0012886
2008-07-30 16:51David ColeNote Added: 0012887
2008-07-30 16:51David ColeAssigned ToDavid Cole => Bill Hoffman
2008-09-11 10:49Bill HoffmanStatusassigned => closed
2008-09-11 10:49Bill HoffmanResolutionopen => fixed

Notes
(0012396)
David Cole   
2008-06-18 09:16   
I am currently working on applying this patch to CVS HEAD of the CMake source tree...
(0012399)
David Cole   
2008-06-18 09:54   
Initial application of patch:

/cvsroot/CMake/CMake/Modules/CPack.cmake,v <-- Modules/CPack.cmake
new revision: 1.38; previous revision: 1.37
/cvsroot/CMake/CMake/Source/CMakeLists.txt,v <-- Source/CMakeLists.txt
new revision: 1.399; previous revision: 1.398
/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.cxx,v <-- Source/CPack/cmCPackBundleGenerator.cxx
initial revision: 1.1
/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.h,v <-- Source/CPack/cmCPackBundleGenerator.h
initial revision: 1.1
/cvsroot/CMake/CMake/Source/CPack/cmCPackGeneratorFactory.cxx,v <-- Source/CPack/cmCPackGeneratorFactory.cxx
new revision: 1.3; previous revision: 1.2
(0012412)
David Cole   
2008-06-19 06:17   
$ cvs commit -m "COMP: Eliminate unreferenced variable warning" Source/CPack/cmCPackBundleGenerator.cxx

/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.cxx,v <-- Source/CPack/cmCPackBundleGenerator.cxx
new revision: 1.2; previous revision: 1.1
(0012691)
Timothy Shead   
2008-07-10 16:45   
I've just uploaded a patch to cleanup the code and provide better error messages if there are problems.

This patch can be applied against the CVS trunk.

Many thanks!
Tim
(0012744)
David Cole   
2008-07-18 16:13   
Committed to CVS HEAD of CMake...

/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.cxx,v --> Source/CPack/cmCPackBundleGenerator.cxx
new revision: 1.3; previous revision: 1.2
(0012847)
Timothy Shead   
2008-07-28 19:35   
The files "bundle_generator_test.patch" and "BundleIcon.icns" provide a basic regression test for the bundle generator.

bundle_generator_test.patch can be applied against CVS trunk, then BundleIcon.icns should be copied into the new Tests/BundleGeneratorTest directory. Run the new test with

$ ctest -R BundleGeneratorTest

Note that this tests *building* an OSX bundle, it doesn't test running the bundled application yet, since that means mounting the bundle disk image, figuring-out where it got mounted, opening the bundle (not the same as exec-ing the binary), then unmounting the volume to cleanup. However, you can open the bundle manually and see that it prints a "Howdy, World!" message to the console.
(0012886)
David Cole   
2008-07-30 16:37   
Test added to CVS HEAD 7/30/2008

/cvsroot/CMake/CMake/Tests/CMakeLists.txt,v <-- Tests/CMakeLists.txt
new revision: 1.60; previous revision: 1.59
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/BundleIcon.icns,v <-- Tests/BundleGeneratorTest/BundleIcon.icns
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/CMakeLists.txt,v <-- Tests/BundleGeneratorTest/CMakeLists.txt
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/Executable.cxx,v <-- Tests/BundleGeneratorTest/Executable.cxx
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/Info.plist,v <-- Tests/BundleGeneratorTest/Info.plist
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/Library.cxx,v <-- Tests/BundleGeneratorTest/Library.cxx
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/StartupCommand,v <-- Tests/BundleGeneratorTest/StartupCommand
initial revision: 1.1
(0012887)
David Cole   
2008-07-30 16:51   
Bill, add to the CMake-2-6 branch after a night on the dashboards if you think it wise... (The functionality is over there already, this is adding a test of the new CPack bundle generator.)