<?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>awkward silence &#187; os x</title>
	<atom:link href="http://tom.wilcoxen.org/category/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://tom.wilcoxen.org</link>
	<description></description>
	<lastBuildDate>Fri, 19 Mar 2010 21:39:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Build and Compile your SQLite Database with Xcode</title>
		<link>http://tom.wilcoxen.org/2008/11/28/build-and-compile-your-sqlite-database-with-xcode/</link>
		<comments>http://tom.wilcoxen.org/2008/11/28/build-and-compile-your-sqlite-database-with-xcode/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:01:30 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://tom.wilcoxen.org/?p=82</guid>
		<description><![CDATA[I&#8217;ve been working on setting up a database for an iPhone app. I haven&#8217;t worked with sqlite before so it&#8217;s yet another new thing to learn. I&#8217;ve been going through a few tutorials on the web and was partway through this one when I took the advice of his sidebar at the end of Step [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on setting up a database for an iPhone app. I haven&#8217;t worked with sqlite before so it&#8217;s yet another new thing to learn. I&#8217;ve been going through a few tutorials on the web and was partway through <a href="http://leefalin.com/blog/2008/10/02/iphone-sqlite-database-basics/">this one</a> when I took the advice of his sidebar at the end of Step 3 to keep my database definition in sql and have it built when the app compiles. He linked to <a href="http://public.toxicsoftware.com/CompileSQL.png">this screenshot</a> by way of a how-to, which unfortunately didn&#8217;t work for me.</p>
<p>First off, to find the build rules for your project, right click on Targets in xcode and select Get Info:<br />
<img src="http://img.skitch.com/20081128-s74ejes16mgctfch4dfcmbs29.jpg" alt="main.m - GameDay"/></p>
<p>I also added a check to see if your db already exists to avoid build errors if it doesn&#8217;t. I decided to put it into an external file and execute that from the build rule. Here&#8217;s what my build rule looks like:</p>
<div class="thumbnail"><a href="http://skitch.com/tomwilcoxen/h9u2/target-gameday-info"><img src="http://img.skitch.com/20081128-n6r6d3169j4geg6c32krip5kjj.preview.jpg" alt="Target 201CGameDay201D Info" /></a><br /><span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080">Uploaded with <a href="http://plasq.com/">plasq</a>&#8216;s <a href="http://skitch.com">Skitch</a>!</span></div>
<p>Here&#8217;s the bash shell script:<br />
<code><br />
#!/bin/bash<br />
cd ${TARGET_BUILD_DIR}<br />
if [ -f ${INPUT_FILE_BASE}.db ];<br />
  then<br />
    rm ${INPUT_FILE_BASE}.db;<br />
fi<br />
cat ${INPUT_FILE_PATH} | sqlite3 ${INPUT_FILE_BASE}.db<br />
</code></p>
<p>Put it in a file (sqlbuildrule.sh, for example) and place it in your project directory and set it to executable:<br />
<code>chmod +x sqlbuildrule.sh</code></p>
<p>At the end of the rule, click the + below &#8220;with output files&#8221; and enter this:<br />
<code>$(TARGET_BUILD_DIR)/$(INPUT_FILE_BASE).db</code></p>
<p>The script will look for a .sql file in your project directory and build it with the output going to your target build directory. </p>
<p>If you need to edit the shell script or change the &#8220;with output files&#8221; setting of the build rule, note that the way you use the environment variables is different. The shell uses them as regular bash variables: ${MY_VAR}, where Xcode uses parens: $(MY_VAR). </p>
]]></content:encoded>
			<wfw:commentRss>http://tom.wilcoxen.org/2008/11/28/build-and-compile-your-sqlite-database-with-xcode/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Migrating user accounts w/o Firewire Target Disk</title>
		<link>http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/</link>
		<comments>http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 22:27:44 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
<category>mac</category><category>os x</category>
		<guid isPermaLink="false">http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/</guid>
		<description><![CDATA[Perhaps this is an edge case, but recently I wanted to migrate my wife&#8217;s account from a G4 Yikes (1st generation G4 desktop machine) to a MacBook. It turns out that the G4 Yikes (aka, non-AGP graphics G4) is the only G4 (or, I believe G3) with built-in Firewire that won&#8217;t go into target disk [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps this is an edge case, but recently I wanted to migrate my wife&#8217;s account from a G4 Yikes (1st generation G4 desktop machine) to a MacBook. It turns out that the G4 Yikes (aka, non-AGP graphics G4) is the only G4 (or, I believe G3) with built-in Firewire that won&#8217;t go into <a href="http://docs.info.apple.com/article.html?artnum=58583">target disk mode</a>.</p>
<p>You can, however, use the Migration Assistant with a mounted volume &#8212; if you happen to be able to yank the drive from the old machine and pop it in the new one, you&#8217;re good to go. I couldn&#8217;t, but had an external Firewire/USB drive. I used <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html">SuperDuper!</a> to make a backup of the G4 HD, copied that to the external drive and then migrated from that onto the MacBook.</p>
<p>It worked great, but beware: you have to register SuperDuper! to get the full copy capability. I had registered, but was using a demo copy on the G4 and kept getting only the Users folder copied (which isn&#8217;t enough to Migrate from). With the registered version it will actually make a bootable volume.</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/mac" rel="tag">mac</a>, <a href="http://www.technorati.com/tag/os x" rel="tag">os x</a></p>
<p><!-- technorati tags end --></p>
<a href="http://tom.wilcoxen.org/tags/mac" rel="tag">mac</a>, <a href="http://tom.wilcoxen.org/tags/os-x" rel="tag">os x</a>]]></content:encoded>
			<wfw:commentRss>http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.207 seconds -->
