<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Bill,<div><span class="Apple-tab-span" style="white-space:pre"> </span>Greg is the real expert here, but he's at SIGGRAPH right now so I'll put out what little I know and let Greg correct anything I get wrong when he has time. Yeah, compiling/linking can be a nightmare when you are trying to use libs you have no control over and that may have been compiled with options you didn't anticipate or from modified sources. That's why we cheat and include everything we depend on (which is one reason Chimera is such a huge download). In particular, we include Tk and Tcl libraries. If you look in Chimera's "foreign" source directory, there is a TclTk subdirectory there. So no worries about out-of-date/incompatible versions and all that.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>We have another layer of control in that we're not (currently) trying to provide a package that other people can easily compile on their own system. So therefore we don't need a configure step. Our makefiles have conditionals based on the OS to get the right flags for linking and compiling and whatnot for the systems that we ourselves compile on. A lot of that makefile logic is concentrated in the "includable" makefiles found in the mk directory, so that individual makefiles only have to include the appropriate mk makefile and then customize a few variables themselves.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>We try to use "foreign" source with as little patching as possible so that we can easily incorporate updated versions, so many of the foreign packages (e.g. Tcl/Tk) do have their "native" configure step. Nonetheless, the Chimera makefile that initiates the foreign package build may supply arguments to the configure so that the final build uses the right compiler flags, uses the right build/install location, and so forth.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I don't know how much help this has been, but feel free to ask more questions and maybe I'll know the answers. :-)</div><div><br></div><div>--Eric</div><div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></div></span> </div><br><div><div>On Aug 14, 2008, at 11:54 AM, William Baxter wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello Eric,<br><br>I'm trying to make an installation package like Chimera's, in which our<br>software installs its own Python. Can you explain how your installation<br>package is set up? I have a script that goes through the usual<br>configure, make, and make install commands, but it encounters different<br>problems on each platform (for us, Linux and Irix). How does the Chimera<br>install make sure everything is linked together properly?<br><br>Any help is greatly appreciated.<br><br>Thanks,<br>Bill Baxter<br><br>-- <br>William T. Baxter, Ph.D.<br>Wadsworth Center<br>Empire State Plaza, PO Box 509<br>Albany, NY 12201-0509<br><br><br>Subject: Re:[chimera-dev] making a python package<br> From: William Baxter<br> Date: 02:42 PM<br> To: Greg Couch<br><br><br>Greg,<br>thanks for your description. I have another couple of questions.<br><br>My script goes through the usual configure, make, make install commands,<br>but Chimera seems to go straight to compilation. How do you set it up to<br>be so fast?<br><br>Also, finding Tcl/Tk for Tkinter is a headache that seems to be<br>different on each platform. How do you ensure that Python finds that<br>right Tcl libs?<br><br>The Chimera installation is really admirable and efficient. I'd like to<br>emulate it as far as possible.<br><br>Any advice you can give is greatly appreciated.<br><br>Thanks,<br>Bill B.<br><br>Greg Couch wrote:<br><blockquote type="cite"><blockquote type="cite">On Wed, 30 Jul 2008, William Baxter wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hello,<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">we would like to package our software, Spire<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">(<a href="http://www.wadsworth.org/spider_doc/spider/docs/spire/)">www.wadsworth.org/spider_doc/spider/docs/spire/)</a> the way Chimera is<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">packaged, with its own Python, Tcl/Tk, and other libraries. Do you have<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">some documentation, or can you point me toward some resources that<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">explain how to go about creating such an installation package?<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thanks,<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Bill Baxter<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">We don't have any documentation, but here's a quick description of<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">what we do binary distributions for chimera:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Windows, we use the Inno Setup program,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><<a href="http://www.jrsoftware.org/isinfo.php">http://www.jrsoftware.org/isinfo.php</a>>.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">For Mac OS X, we build a disk image using the hdiutil program. And we<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">modify the name all of the shared libraries with something like:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> install_name_tool -id @executable_path/$(LIBNAME)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Linux and other Unix systems, we use a modified self-extracting zip<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">archive where an installation program is run after the files have been<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">extracted.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In all cases, when chimera starts up, we set up the environment to get<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">our shared libraries (and clear the environment of things that would<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">hurt us, like PYTHONHOME).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> Hope this helps,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> Greg Couch<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> UCSF Computer Graphics Lab<br></blockquote></blockquote><br><br>-- <br>William T. Baxter, Ph.D. <br>Wadsworth Center Empire State Plaza, <br>PO Box 509 Albany, NY 12201-0509 </div></blockquote><br></div><br></div></body></html>