I agree with Clint. This belongs in the new&nbsp;cmCPackDragNDropGenerator.<div><br><br><div class="gmail_quote">On Thu, Feb 5, 2009 at 1:25 PM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
cmCPackBundleGenerator has a new base class cmCPackDragNDropGenerator. &nbsp;Can we please put this functionality there, and if necessary modify the CompressFiles(...) so they both get it (maybe the addition of a couple virtual functions would help).<br>

The DragNDrop generator supports multiple bundles, and uses whatever bundle properties were already set on the targets. &nbsp;It also supports installing non bundle things such as readme files. &nbsp;The Bundle generator is a specialization of the DragNDrop generator which is convenience for some.<br>

<br>
Clint<br>
<br>
Mike Arthur wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="Ih2E3d">
Please review the attached patch for inclusion.<br>
<br>
It adds support to the bundle generator to add a background image and .DS_Store for people (like myself/Mozilla/Last.fm) who want CPack to be able to set a nice background to the Bundle without having to manually convert it.<br>
</div>
 &nbsp;------------------------------------------------------------------------<br>
<br>
--- source/Source/CPack/cmCPackBundleGenerator.cxx &nbsp; &nbsp; &nbsp;2009-02-04 15:00:24.727403954 +0000<br>
+++ cmake-patch/Source/CPack/cmCPackBundleGenerator.cxx 2009-02-05 14:12:28.439443802 +0000<br>
@@ -105,6 +105,14 @@<br>
 &nbsp; &nbsp; this-&gt;GetOption(&quot;CPACK_BUNDLE_STARTUP_COMMAND&quot;)  &nbsp; &nbsp; ? this-&gt;GetOption(&quot;CPACK_BUNDLE_STARTUP_COMMAND&quot;) : &quot;&quot;;<br>
&nbsp;+ &nbsp;const std::string cpack_bundle_dmg_background_image =<br>
+ &nbsp; &nbsp;this-&gt;GetOption(&quot;CPACK_BUNDLE_DMG_BACKGROUND_IMAGE&quot;)<br>
+ &nbsp; &nbsp;? this-&gt;GetOption(&quot;CPACK_BUNDLE_DMG_BACKGROUND_IMAGE&quot;) : &quot;&quot;;<br>
+<br>
+ &nbsp;const std::string cpack_bundle_dmg_ds_store =<br>
+ &nbsp; &nbsp;this-&gt;GetOption(&quot;CPACK_BUNDLE_DMG_DS_STORE&quot;)<br>
+ &nbsp; &nbsp;? this-&gt;GetOption(&quot;CPACK_BUNDLE_DMG_DS_STORE&quot;) : &quot;&quot;;<br>
+<br>
 &nbsp; // The staging directory contains everything that will end-up inside the<br>
 &nbsp; // final disk image ...<br>
 &nbsp; cmOStringStream staging;<br>
@@ -202,6 +210,63 @@<br>
 &nbsp; &nbsp; &nbsp; }<br>
 &nbsp; &nbsp; }<br>
&nbsp;+ &nbsp;// Optionally add a custom .DS_Store file<br>
+ &nbsp;// (e.g. for setting background/layout) ...<br>
+ &nbsp;if(!cpack_bundle_dmg_ds_store.empty())<br>
+ &nbsp; &nbsp;{<br>
+ &nbsp; &nbsp;cmOStringStream package_settings_source;<br>
+ &nbsp; &nbsp;package_settings_source &lt;&lt; cpack_bundle_dmg_ds_store;<br>
+<br>
+ &nbsp; &nbsp;cmOStringStream package_settings_destination;<br>
+ &nbsp; &nbsp;package_settings_destination &lt;&lt; staging.str() &lt;&lt; &quot;/.DS_Store&quot;;<br>
+<br>
+ &nbsp; &nbsp;if(!this-&gt;CopyFile(package_settings_source, package_settings_destination))<br>
+ &nbsp; &nbsp; &nbsp;{<br>
+ &nbsp; &nbsp; &nbsp;cmCPackLogger(cmCPackLog::LOG_ERROR,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;&quot;Error copying disk volume settings file. &nbsp;&quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;Check the value of CPACK_BUNDLE_DMG_DS_STORE.&quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;&lt;&lt; std::endl);<br>
+<br>
+ &nbsp; &nbsp; &nbsp;return 0;<br>
+ &nbsp; &nbsp; &nbsp;}<br>
+ &nbsp; &nbsp;}<br>
+<br>
+ &nbsp;// Optionally add a custom background image ...<br>
+ &nbsp;if(!cpack_bundle_dmg_background_image.empty())<br>
+ &nbsp; &nbsp;{<br>
+ &nbsp; &nbsp;cmOStringStream package_background_source;<br>
+ &nbsp; &nbsp;package_background_source &lt;&lt; cpack_bundle_dmg_background_image;<br>
+<br>
+ &nbsp; &nbsp;cmOStringStream package_background_destination;<br>
+ &nbsp; &nbsp;package_background_destination &lt;&lt; staging.str() &lt;&lt; &quot;/background.png&quot;;<br>
+<br>
+ &nbsp; &nbsp;if(!this-&gt;CopyFile(package_background_source,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;package_background_destination))<br>
+ &nbsp; &nbsp; &nbsp;{<br>
+ &nbsp; &nbsp; &nbsp;cmCPackLogger(cmCPackLog::LOG_ERROR,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;&quot;Error copying disk volume background image. &nbsp;&quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;Check the value of CPACK_BUNDLE_DMG_BACKGROUND_IMAGE.&quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;&lt;&lt; std::endl);<br>
+<br>
+ &nbsp; &nbsp; &nbsp;return 0;<br>
+ &nbsp; &nbsp; &nbsp;}<br>
+<br>
+ &nbsp; &nbsp;cmOStringStream temp_background_hiding_command;<br>
+ &nbsp; &nbsp;temp_background_hiding_command &lt;&lt; this-&gt;GetOption(&quot;CPACK_COMMAND_SETFILE&quot;);<br>
+ &nbsp; &nbsp;temp_background_hiding_command &lt;&lt; &quot; -a V \&quot;&quot;;<br>
+ &nbsp; &nbsp;temp_background_hiding_command &lt;&lt; package_background_destination.str();<br>
+ &nbsp; &nbsp;temp_background_hiding_command &lt;&lt; &quot;\&quot;&quot;;<br>
+<br>
+ &nbsp; &nbsp;if(!this-&gt;RunCommand(temp_background_hiding_command))<br>
+ &nbsp; &nbsp; &nbsp;{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;cmCPackLogger(cmCPackLog::LOG_ERROR,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;Error setting attributes on disk volume background image.&quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;&lt; std::endl);<br>
+<br>
+ &nbsp; &nbsp; &nbsp;return 0;<br>
+ &nbsp; &nbsp; &nbsp;}<br>
+ &nbsp; &nbsp;}<br>
+<br>
 &nbsp; // Create a temporary read-write disk image ...<br>
 &nbsp; cmOStringStream temp_image;<br>
 &nbsp; temp_image &lt;&lt; this-&gt;GetOption(&quot;CPACK_TOPLEVEL_DIRECTORY&quot;) &lt;&lt; &quot;/temp.dmg&quot;;<br>
 &nbsp;------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>