MantisBT - CMake
View Issue Details
0008402CMakeCPackpublic2009-01-19 15:542010-12-14 18:45
Clinton Stimpson 
David Cole 
highmajoralways
closedfixed 
CMake-2-6 
 
0008402: Need cpack generator for drag-n-drop installs

The Bundle generator for creating drag and drop installers tries to make the bundle for you, and you have to provide cpack with the bundle icon, plist, shell script, etc... and it currently only supports creating one bundle.

The attached patch is a more general solution for drag-n-drop installers that takes what bundle(s) you already have. It allows you to use the already existing target properties for setting bundle icons, plist, etc...

It works with my apps to create a multi-bundle installer. It also works for creating a drag-n-drop installer for CMake, except that it creates a couple subdirectories and finally puts the CMake bundle there. I'm not sure why.

I'd like to see cmake using this generator as the current PackageMaker created installer isn't made correctly in terms of root ownership and messes up my /Applications folder ownership causing possible security risks.

Attached is a patch and source files.

No tags attached.
gz dragndrop-patch.tar.gz (3,352) 2009-01-19 15:54
https://public.kitware.com/Bug/file/2001/dragndrop-patch.tar.gz
txt patch2.txt (1,620) 2009-01-20 11:30
https://public.kitware.com/Bug/file/2004/patch2.txt
Issue History
2009-01-19 15:54Clinton StimpsonNew Issue
2009-01-19 15:54Clinton StimpsonFile Added: dragndrop-patch.tar.gz
2009-01-19 16:58Clinton StimpsonStatusnew => assigned
2009-01-19 16:58Clinton StimpsonAssigned To => David Cole
2009-01-19 17:43Clinton StimpsonNote Added: 0014621
2009-01-19 18:18Bill HoffmanNote Added: 0014623
2009-01-19 18:30Clinton StimpsonNote Added: 0014625
2009-01-19 18:35David ColeNote Added: 0014626
2009-01-20 11:30Clinton StimpsonFile Added: patch2.txt
2009-01-22 12:13David ColeNote Added: 0014661
2009-01-22 12:13David ColeStatusassigned => resolved
2009-01-22 12:13David ColeResolutionopen => fixed
2009-01-22 14:25David ColeStatusresolved => feedback
2009-01-22 14:25David ColeResolutionfixed => reopened
2009-01-22 14:25David ColeNote Added: 0014666
2009-01-22 14:26David ColeStatusfeedback => resolved
2009-01-22 14:26David ColeResolutionreopened => fixed
2010-12-14 18:45David ColeNote Added: 0024019
2010-12-14 18:45David ColeStatusresolved => closed

Notes
(0014621)
Clinton Stimpson   
2009-01-19 17:43   
I set my CMAKE_INSTALL_PREFIX=/ and then I could make the drag-n-drop correctly for CMake. The CMakeLists.txt files play with CMAKE_INSTALL_PREFIX.
(0014623)
Bill Hoffman   
2009-01-19 18:18   
Does the drop and drag CMake setup the command line like the wizard based one does?
(0014625)
Clinton Stimpson   
2009-01-19 18:30   
Hmm.. didn't think about that one.

Drag-n-drop installs are really just copying a folder to a destination. I'm not aware of any hooks that allow setting up the command line tools when dropping the folder in its destination.

I guess this is more of a reason to fix the cmake-gui to ask for permissions when setting up the command line tools.
Or maybe put a readme file, a script, or a background image with at the top level of the dmg to instruct or help the user set up the command line tools.
(0014626)
David Cole   
2009-01-19 18:35   
Don't worry too much about the command line. The people who want the drag-n-drop installer are a mutually exclusive set to the people who want to use "cmake" from the command line...
 
:-)
(0014661)
David Cole   
2009-01-22 12:13   
Fixed in CVS HEAD of CMake.

$ cvs commit -m "BUG: Fix issue 0008402. Add a drag and drop bundle generator to the Mac build of CPack. Add a test of it in the CPackComponents test. Thanks to Clinton Stimpson for the patch."

/cvsroot/CMake/CMake/Modules/CPack.cmake,v <-- Modules/CPack.cmake
new revision: 1.41; previous revision: 1.40
/cvsroot/CMake/CMake/Source/CMakeLists.txt,v <-- Source/CMakeLists.txt
new revision: 1.405; previous revision: 1.404
/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.cxx,v <-- Source/CPack/cmCPackBundleGenerator.cxx
new revision: 1.8; previous revision: 1.7
/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.h,v <-- Source/CPack/cmCPackBundleGenerator.h
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Source/CPack/cmCPackDragNDropGenerator.cxx,v <-- Source/CPack/cmCPackDragNDropGenerator.cxx
initial revision: 1.1
/cvsroot/CMake/CMake/Source/CPack/cmCPackDragNDropGenerator.h,v <-- Source/CPack/cmCPackDragNDropGenerator.h
initial revision: 1.1
/cvsroot/CMake/CMake/Source/CPack/cmCPackGeneratorFactory.cxx,v <-- Source/CPack/cmCPackGeneratorFactory.cxx
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Tests/CMakeLists.txt,v <-- Tests/CMakeLists.txt
new revision: 1.82; previous revision: 1.81
(0014666)
David Cole   
2009-01-22 14:25   
Also need this commit for complete fix:

/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.h,v <-- Source/CPack/cmCPackBundleGenerator.h
new revision: 1.5; previous revision: 1.4
(0024019)
David Cole   
2010-12-14 18:45   
Closing bugs that have been resolved for more than 3 months without any further updates.