<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>render fast &#187; OS X</title>
	<atom:link href="http://renderfast.com/category/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://renderfast.com</link>
	<description>A blog about developing software by trial and error by Doug Letterman</description>
	<lastBuildDate>Mon, 24 Jan 2011 17:24:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Java for Mac Update 2 leaves some Java Apps broken</title>
		<link>http://renderfast.com/2008/09/26/java-for-mac-update-2-leaves-some-java-apps-broken/</link>
		<comments>http://renderfast.com/2008/09/26/java-for-mac-update-2-leaves-some-java-apps-broken/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 16:59:08 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[jEdit]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://renderfast.com/?p=36</guid>
		<description><![CDATA[This post has been updated, see below This morning I applied Apple&#8217;s Java for Mac Update 2 and discovered that it broke my favorite editor and most-used application, jEdit. Other people seem to be having the same problem but there were few solutions. I found one that involves recreating the Application Bundle using the Java [...]]]></description>
			<content:encoded><![CDATA[<p><em>This post has been updated, see below</em><br />
This morning I applied Apple&#8217;s <a title="Java for Mac Update 2" href="http://support.apple.com/kb/HT2733">Java for Mac Update 2</a> and discovered that it broke my favorite editor and most-used application, <a title="jEdit" href="http://www.jedit.org/">jEdit</a>. <a href="http://discussions.apple.com/thread.jspa?messageID=8173506">Other people</a> seem to be having the same problem but there were few solutions. I found one that involves recreating the Application Bundle using the Java Bundler that ships with the Developer Tools. Here&#8217;s how it works:</p>
<ol>
<li>Backup your original jEdit.app application bundle (I called mine jEdit.orig.app).</li>
<li>Open up jEdit.app (right click and do &#8220;Show Package Contents&#8221;). Navigate to &#8220;Contents&#8221; &gt; &#8220;Resources&#8221; &gt; &#8220;Java&#8221; and copy the jedit.jar file to your Desktop.</li>
<li>Open up /Developer/Applications/Utilities/Jar Bundler.app.</li>
<li>Next to the text field that says &#8220;Main Class&#8221; click the &#8220;Choose&#8230;&#8221; button and navigate to the jedit.jar copy that you just made on the Desktop.<br />
<a href="http://renderfast.com/wp-content/uploads/2008/09/jar_bundler.png" rel="lightbox"><img class="alignnone size-medium wp-image-38" title="Jar Bundler" src="http://renderfast.com/wp-content/uploads/2008/09/jar_bundler-300x276.png" alt="" width="300" height="276" /></a></li>
<li>Make sure &#8220;Use Macintosh Menu Bar&#8221; is checked and press the &#8220;Create Application Button&#8221; at the bottom. Call the application &#8220;myJedit&#8221; or something else that distinguishes it from the original.</li>
<li>Open up your new jEdit application bundle (&#8220;myJedit.app&#8221;) using &#8220;Show Package Contents&#8221; and navigate to Contents/Mac OS. Inside here you should see a file called &#8220;JavaApplicationStub.&#8221;</li>
<li>Copy &#8220;JavaApplicationStub&#8221; from your new jEdit bundle (&#8220;myJedit&#8221;) to the Contents/Mac OS directory in your original jEdit.app bundle.</li>
<li>Inside the original Contents/Mac OS directory you should see an alias called &#8220;jedit.&#8221; Rename this &#8220;jedit.bad&#8221; or something similar.</li>
<li>Go one level up in the jEdit.app bundle to &#8220;Contents&#8221; and open up the &#8220;Info.plist&#8221; file. This open up using the Property List Editor (it lives in /Developer/Applications/Utilities).<br />
<a href="http://renderfast.com/wp-content/uploads/2008/09/plist_editor.png" rel="lighbox"><img class="alignnone size-medium wp-image-39" title="plist_editor" src="http://renderfast.com/wp-content/uploads/2008/09/plist_editor-300x159.png" alt="" width="300" height="159" /></a></li>
<li>Expand the tree and change the &#8216;CFBundleExecutable&#8217; string from &#8216;jedit&#8217; to &#8216;JavaApplicationLauncher&#8217;.</li>
</ol>
<p>That&#8217;s it! Close up the jEdit.app bundle and double click on it. jEdit should start normally as it used to, complete with the Mac Menu bar. Additionally, if you&#8217;ve installed the jedit shell script for launching jEdit from the terminal that should still work as well.</p>
<p>It&#8217;s not the prettiest solution but it keeps me going for now until a better fix is released.</p>
<p><strong>UPDATE:</strong><br />
Someone in the Apple forums pointed out that simply copying the destination of the jEdit.app/Contents/MacOS/jedit symlink, which points to</p>
<pre>/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub</pre>
<p>back into <tt>jEdit.app/Contents/MacOS/jedit</tt> (replacing the symlink with a copy) also makes the jEdit application bundle work again. This method has considerably fewer steps than mine.</p>
<p>Apparently this file is functionally the same as the one generated by Jar builder. It seems Java developers went for the <a title="JavaApplicationStub" href="http://www.snailshell.de/blog/archives/2006/01/entry_37.html">symlink method</a> <em>specifically to avoid problems</em> created whenever Apple would go and update Java. With this update the symlink doesn&#8217;t seem to work again.</p>
]]></content:encoded>
			<wfw:commentRss>http://renderfast.com/2008/09/26/java-for-mac-update-2-leaves-some-java-apps-broken/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using dynamic libraries in Mac OS X</title>
		<link>http://renderfast.com/2008/06/27/using-dynamic-libraries-in-mac-os-x/</link>
		<comments>http://renderfast.com/2008/06/27/using-dynamic-libraries-in-mac-os-x/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 15:47:36 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[dyld]]></category>
		<category><![CDATA[Qwt]]></category>

		<guid isPermaLink="false">http://renderfast.com/?p=15</guid>
		<description><![CDATA[I downloaded and built the excellent Qwt widget collection on my Mac. When I built the examples I had trouble getting them to find the libqwt dynamic library. They built and linked just fine, but unless I added the path to the qwt install dir to my DYLD_LIBRARY_PATH environment variable launching the application fails with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-16" style="float: left;" title="A dynamic library in Xcode 3" src="http://renderfast.com/wp-content/uploads/2008/06/dylib-300x200.png" alt="" width="300" height="200" />I downloaded and built the excellent <a title="Qwt" href="http://qwt.sourceforge.net/">Qwt</a> widget collection on my Mac. When I built the examples I had trouble getting them to find the libqwt dynamic library. They built and linked just fine, but unless I added the path to the qwt install dir to my DYLD_LIBRARY_PATH environment variable launching the application fails with a <tt>dyld: Library not loaded: libqwt.5.dylib</tt> error.</p>
<p>On Linux the solution would be to add a -Wl -rpath /usr/local/qwt-5.0.2/lib to my LIBS directive in my projects&#8217;s .pro file (in this case the relevant line is in the examples/examples.pri config file). This should add the path to qwt&#8217;s dylib to my application&#8217;s runtime search path. Unfortunately this doesn&#8217;t work in Mac OS X. As it turns out, the <a title="Apple Developer docs" href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/DynamicLibraries/Articles/UsingDynamicLibraries.html#//apple_ref/doc/uid/TP40002182-SW13">library itself has to know its full install path</a>.</p>
<p><span id="more-15"></span></p>
<p>So far, the best webpage on this problem I&#8217;ve found so far is <a title="Dylib linking" href="http://qin.laya.com/tech_coding_help/dylib_linking.html">here</a>. It seems that Mac OS X even comes with its own utility, <a title="install_name_tool man page" href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/install_name_tool.1.html">install_name_tool</a>, to manage libraries&#8217; names if one needs to move them around.</p>
<p>I skipped install_name_tool and opted to simply rebuild Qwt&#8217;s dylib so that it knows its install_name. My solution was to modify the LDFLAGS directive in qwt&#8217;s src/Makefile so that</p>
<pre>-install_name libqwt.5.dylib</pre>
<p>Looks like this instead:</p>
<pre>-install_name /usr/local/qwt-5.0.2/lib/libqwt.5.dylib</pre>
<p>This is not the best solution as I had to modify my Makefile directly instead of the Qt .pro file. After another make and sudo make install to reinstall the dynamic library, oTool -L libqwt.5.dylib confirms that the library&#8217;s name contains its own full path:</p>
<pre>&gt; otool -L libqwt.5.dylib
libqwt.5.dylib:
/usr/local/qwt-5.0.2/lib/libqwt.5.dylib . . .</pre>
<p>More importantly, the Qwt examples all run now and I didn&#8217;t have to modify my DYLD_LIBRARY_PATH!</p>
<p>The next step is to modify the .pro file or my qmake.conf so it handles all this install_name magic automatically at compile/install time, but this worked well for now&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://renderfast.com/2008/06/27/using-dynamic-libraries-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphing with yEd</title>
		<link>http://renderfast.com/2008/05/04/graphing-with-yed/</link>
		<comments>http://renderfast.com/2008/05/04/graphing-with-yed/#comments</comments>
		<pubDate>Sun, 04 May 2008 23:09:17 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[UML yEd graphing]]></category>

		<guid isPermaLink="false">http://renderfast.com/?p=10</guid>
		<description><![CDATA[I used to render UML graphs using the excellent GraphViz—writing out the graphs in dot formatted files by hand as GraphViz doesn&#8217;t have any GUI for graph editing. This worked pretty well until I started needing more fine control over the organization and appearance of my graphs. I resorted to ugly dot constructions like { [...]]]></description>
			<content:encoded><![CDATA[<p>I used to render UML graphs using the excellent <a title="Mac OS X port of GraphViz" href="http://pixelglow.com/graphviz/">GraphViz</a>—writing out the graphs in dot formatted files by hand as GraphViz doesn&#8217;t have any GUI for graph editing. This worked pretty well until I started needing more fine control over the organization and appearance of my graphs. I resorted to ugly dot constructions like</p>
<pre>{ rank=same ringbuffer inputproc; }  // put two nodes on the same level</pre>
<p>and</p>
<pre>buffer_a   [label="buffer"]  // give two nodes the same name</pre>
<pre>buffer_b   [label="buffer"]</pre>
<p><a href="http://renderfast.com/wp-content/uploads/2008/05/yed_screenshot.png"><img class="alignleft size-medium wp-image-11" style="float: left;" title="yEd screenshot" src="http://renderfast.com/wp-content/uploads/2008/05/yed_screenshot-300x209.png" alt="" width="200" /></a>Recently a coworker alerted me to the existence of <a title="yEd" href="http://www.yworks.com/products/yed/">yEd</a>, an awesome free graphing program written in Java. It creates <a title="GraphML" href="http://graphml.graphdrawing.org/">GraphML</a>-format files using a slick, well-designed interface. It has powerful graph-organizing tools and supports SVG symbols as graph nodes. The graphs look great when printed, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://renderfast.com/2008/05/04/graphing-with-yed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordRecorder 1.0 released</title>
		<link>http://renderfast.com/2008/04/21/wordrecorder-10-released/</link>
		<comments>http://renderfast.com/2008/04/21/wordrecorder-10-released/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 05:20:11 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[WordRecorder]]></category>

		<guid isPermaLink="false">http://dev.renderfast.com/?p=9</guid>
		<description><![CDATA[WordRecorder was a program I wrote for my friend Matt to help him record hundreds of spoken names for his video e-card site. It&#8217;s a pretty specialized program and I doubt more than a handful of people out there will actually have a need for it, but the source code may be of use to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://renderfast.com/wordrecorder/"><img class="alignleft alignnone size-medium wp-image-5" style="float: left;" title="WordRecorder" src="http://renderfast.com/wp-content/uploads/2008/04/wordrecorder_web.jpg" alt="" width="152" height="213" /></a><a title="WordRecorder" href="http://renderfast.com/wordrecorder/">WordRecorder</a> was a program I wrote for my friend <a title="Matt" href="http://mattsemel.com">Matt</a> to help him record hundreds of spoken names for his <a title="Carded" href="http://carded.tv/">video e-card site</a>. It&#8217;s a pretty specialized program and I doubt more than a handful of people out there will actually have a need for it, but the source code may be of use to people trying to figure out how to use Apple&#8217;s CoreAudio Frameworks and the Qt Interface Toolkit.</p>
<p>I&#8217;ll try to post more details about its design and how it works in the coming days. For now, visit the main <a title="WordRecorder" href="http://renderfast.com/wordrecorder/">WordRecorder page here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://renderfast.com/2008/04/21/wordrecorder-10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode 3 doesn&#8217;t like projects generated by qmake</title>
		<link>http://renderfast.com/2008/04/20/xcode-3-doesnt-like-projects-generated-by-qmake/</link>
		<comments>http://renderfast.com/2008/04/20/xcode-3-doesnt-like-projects-generated-by-qmake/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 02:31:44 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[qmake]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://dev.renderfast.com/?p=7</guid>
		<description><![CDATA[When trying to build a Universal version of my WordRecorder app I discovered that I could not view the properties window for my executable target, the project itself, or the project&#8217;s SCM options. Xcode gave me the following lovely error: I don&#8217;t know what this is about, but through some hacking and tinkering with the [...]]]></description>
			<content:encoded><![CDATA[<p>When trying to build a Universal version of my WordRecorder app I discovered that I could not view the properties window for my executable target, the project itself, or the project&#8217;s SCM options. Xcode gave me the following lovely error:</p>
<p style="text-align: center;"><img class="alignnone size-medium wp-image-8" title="xcode_error" src="http://renderfast.com/wp-content/uploads/2008/04/xcode_error-300x218.png" alt="XCode: Internal Error" width="300" height="218" /></p>
<p>I don&#8217;t know what this is about, but through some hacking and tinkering with the Xcode file I came up with the following messy workaround:</p>
<ol>
<li>Make your Xcode project using <tt>qmake -spec macx-xcode</tt> if you haven&#8217;t already.</li>
<li>Open/reload the resulting project in XCode 3. Trying to edit the project properties will yield the above error.</li>
<li>Save the Project. This step is necessary as it makes Xcode totally reformat the file making the edit we&#8217;re about to do much easier.</li>
<li>Open the project&#8217;s “project.pbxproj” file in your text editor. It lives inside the &#8220;.xcodeproject&#8221; folder so you&#8217;ll have to do a &#8220;Show Package Contents&#8221; to see it in the Finder.</li>
<li>Find the following comment (&#8220;hello_world&#8221; will be the name of your own target)
<pre>/* Build configuration list for PBXNativeTarget "hello_world" */</pre>
</li>
<li>Beneath this comment you&#8217;ll see the following list of build configurations (the actual IDs will be different):
<pre>isa = XCConfigurationList;
buildConfigurations = (
2F9BD7250DBC2F9500BBEE4F /* Debug */,
2F9BD7260DBC2F9500BBEE4F /* Release */,
2F9BD7270DBC2F9500BBEE4F /* Default */,
);</pre>
</li>
<li>Remove the <em>entire line</em> containing the identifier with the name &#8216;Default&#8217; and save the file. The result will look like this:
<pre>isa = XCConfigurationList;
buildConfigurations = (
2F9BD7250DBC2F9500BBEE4F /* Debug */,
2F9BD7260DBC2F9500BBEE4F /* Release */,
);</pre>
</li>
<li>Go back to Xcode. It should prompt you to reload the project from disk. Reload it. You should now be able to edit your project&#8217;s properties again. Unfortunately you will have to repeat this step whenever you rebuild your project using qmake.</li>
</ol>
<p>I don&#8217;t know why this fix works, but it beats having to recreate our Xcode project by hand, and everything still seems to build without incident after the fix.</p>
<p>I&#8217;m not sure if this is Apple or Trolltech&#8217;s problem as I can&#8217;t remember if this worked in Qt 4.3.3 / Xcode 2. Xcode 3 probably isn&#8217;t officially supported by qmake yet, anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://renderfast.com/2008/04/20/xcode-3-doesnt-like-projects-generated-by-qmake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two-sided printing in OS X</title>
		<link>http://renderfast.com/2007/12/02/two-sided-printing-in-os-x/</link>
		<comments>http://renderfast.com/2007/12/02/two-sided-printing-in-os-x/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 04:39:06 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Printing]]></category>

		<guid isPermaLink="false">http://dev.renderfast.com/2007/12/02/two-sided-printing-in-os-x/</guid>
		<description><![CDATA[So a while ago I bought an HP 6800 Inkjet Printer with the double sided printing option. It&#8217;s great, but the default HP drivers don&#8217;t support the double sided printing, so the extra money spent on that hardware is essentially wasted if you use a Mac. A solution comes from the Open Printing Workgroup at [...]]]></description>
			<content:encoded><![CDATA[<p>So a while ago I bought an HP 6800 Inkjet Printer with the double sided printing option. It&#8217;s great, but the default HP drivers don&#8217;t support the double sided printing, so the extra money spent on that hardware is essentially wasted if you use a Mac.</p>
<p>A solution comes from the <a title="OpenPrinting Workgroup" href="http://www.linux-foundation.org/en/OpenPrinting/MacOSX/hpijs">Open Printing Workgroup</a> at the Linux Foundation. By first installing the ESP Ghostscript and Foomatic RIP packages on their website, you can install the hpijs package—too many names, yes. This gives you the hpijs driver for the Deskjet 6800 (and many other printers) with the double-sided option enabled.</p>
<p>I&#8217;ve found the hpijs driver isn&#8217;t as crisp as the HP drivers (HP Inkjet 3.3.1), and it&#8217;s even failed miserably when I&#8217;ve tried to print some more complicated PDF files, but otherwise it&#8217;s a great way to save paper when printing things like receipts and news articles where quality isn&#8217;t my highest priority.</p>
<p><strong>UPDATE:</strong> A <a href="http://www.apple.com/downloads/macosx/apple/application_updates/hpprinterdriver11.html" title="Apple - HP Printer Driver 1.1">recent upgrade of the HP Printer Drivers</a> for OS X has fixed this problem. The specific driver is called &ldquo;HP Inkjet Version 3.3.3&rdquo;.</p>
<p>While the standard print dialog still has the &ldquo;Two Sided:&rdquo; option grayed-out under the Layout tab, a new &ldquo;Two-sided Printing&rdquo; tab has appeared in the dropdown list. This one is enabled and actually seems to work properly. <a href="http://renderfast.com/wp-content/uploads/2008/08/twosidedprinting.png"><img src="http://renderfast.com/wp-content/uploads/2008/08/twosidedprinting-300x202.png" alt="" title="twosidedprinting" width="300" height="202" class="alignleft size-medium wp-image-34" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://renderfast.com/2007/12/02/two-sided-printing-in-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

