KWSys Nightly Date Stamp
[cmake.git] / Source / CPack / bills-comments.txt
blobf73499d0182226ace04ece3df2180e507617610a
1 cpack.cxx
2    
3 cmCPackGenerators  -- creates cmCPackGenericGenerator's via NewGenerator 
4   - a cmCPackGenericGenerator factory
7 cmCPackGenericGenerator::Initialize
8    this->InitializeInternal
9      CPACK_INCLUDE_TOPLEVEL_DIRECTORY = 0 turns off 
12 // binary package run
13 cmCPackGenericGenerator::ProcessGenerator   // DoPackage
14   cmCPackGenericGenerator::PrepareNames  -- sets a bunch of CPACK_vars
15   cmCPackGenericGenerator::InstallProject  
16      run preinstall  (make preinstall/fast)
17      call ReadListFile(cmake_install.cmake)
18   glob recurse in install directory to get list of files
19      this->CompressFiles with the list of files
22 // source package run
23 cmCPackGenericGenerator::ProcessGenerator   // DoPackage
24   cmCPackGenericGenerator::PrepareNames  -- sets a bunch of CPACK_vars
25   cmCPackGenericGenerator::InstallProject  --> 
26      if set CPACK_INSTALLED_DIRECTORIES
27         glob the files in that directory 
28         copy those files to the tmp install directory _CPack something
29   glob recurse in install directory to get list of files
30      this->CompressFiles with the list of files
33 cmCPackGenericGenerator::InstallProject is used for both source and binary
34 packages.  It is controled based on values set in CPACK_ variables.
37 InstallProject
38    1. CPACK_INSTALL_COMMANDS       - a list of commands used to install the package 
40    2. CPACK_INSTALLED_DIRECTORIES  - copy this directory to CPACK_TEMPORARY_DIRECTORY
42    3. CPACK_INSTALL_CMAKE_PROJECTS - a cmake install script
43          - run make preinstall 
44          - run cmake_install.cmake
45              - set CMAKE_INSTALL_PREFIX to the temp directory
46              - CPACK_BUILD_CONFIG check this and set the BUILD_TYPE to it
47               - ReadListFile on the install script  cmake_install.cmake
48          - run strip on the executables and libraries if CPACK_STRIP_FILES is TRUE
50 Recommendations:
52 rename cmCPackGenerators  to cmCPackGeneratorFactory
54 rename cmCPackGenericGenerator  -->  cmCPackGenerator
56 rename cmCPackGenericGenerator::ProcessGenerator  -> cmCPackGenerator::DoPackage
59 break up cmCPackGenerator::InstallProject so it calls the following:
61 // run user provided install commands
62   cmCPackGenerator::RunInstallCommands(); 
63 // copy entire directories that need no processing like source trees
64   cmCPackGenerator::CopyPreInstalledDirectories();  
65 // run the cmake install scripts if provided
66   cmCPackGenerator::RunCMakeInstallScripts()