<?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>iPhoneGeek 爱疯极客 &#187; 技巧与提示</title>
	<atom:link href="http://www.iphone-geek.cn/category/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/feed" rel="self" type="application/rss+xml" />
	<link>http://www.iphone-geek.cn</link>
	<description>iPhone 新闻，编程，技巧与提示，代码，教程</description>
	<lastBuildDate>Sun, 25 Jul 2010 13:49:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>“完美”安装雪豹，Windows 7双系统再续 – 开启QE/CI</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f%e5%86%8d%e7%bb%ad-%e2%80%93-%e5%bc%80%e5%90%afqeci</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f%e5%86%8d%e7%bb%ad-%e2%80%93-%e5%bc%80%e5%90%afqeci#comments</comments>
		<pubDate>Sun, 31 Jan 2010 02:15:42 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[系统安装]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=849</guid>
		<description><![CDATA[经过一天一夜的奋斗，终于搞定QE/CI的启动。在这里必须要感谢一下Insanelymac的riws朋友，从他那里学到了不少东西。下面介绍一下我的步骤，希望对大家有所提示和帮助。

几个关键


DSDT &#8211; 先前试过许多方法都没有效果，于是试一下DSDT方法。安装在/Extra下。此DSDT.aml使用了MSD 和 DTGP方法（请别问我，我也不太懂）。此dsdt.aml仅包括与显示有关的部分，其他部分已删除，使用GMA950（27a2）的用户尽管放心使用。（记住移除EFI String）
使用原版驱动，安装在/System/Library/Extensions下。将所有与显卡有关的驱动从/Extra/Extensions中删除。安装1.6.6驱动。修复权限后，重启。
不幸的是，虽然分辨率可调了，但QE/CI仍然没有如愿开启。使用kextstat命令，发现AppleIntelGMA950.kext并没有加载。使用 sudo kextutil /System/Library/Extensions/AppleIntelGMA950.kext 命令手动加载驱动，发现权限错误。使用下列命令：
sudo su
chmod -R 755 /System/Library/Extensions/*
chown -R root:wheel /System/Library/Extensions/*

重启后，使用-f，但发现AppleIntelGMA950.kext仍没有自动加载。但使用kextutil加载kext时没有错误发生。再次使用kextstat，发现系统同时加载了AppleHDA和VoodooHDA（0.2.53），这两者是有冲突的。所有我删除了AppleHDA.kext后，重启。
一切正常，什么截屏，看图，水波纹，应有尽有了。有一个简易的方法测试是否QE/CI已经开启，使用OpenMark测试。


虽然我的无线网卡还不能使用，但通过网卡上网没有问题。现在开始，我又可以开始iPhone的开发工作了。
]]></description>
			<content:encoded><![CDATA[<p>经过一天一夜的奋斗，终于搞定QE/CI的启动。在这里必须要感谢一下Insanelymac的riws朋友，从他那里学到了不少东西。下面介绍一下我的步骤，希望对大家有所提示和帮助。</p>
<p><br class="spacer_" /></p>
<h3>几个关键</h3>
<p><br class="spacer_" /></p>
<ol>
<li>DSDT &#8211; 先前试过许多方法都没有效果，于是试一下DSDT方法。安装在/Extra下。此DSDT.aml使用了MSD 和 DTGP方法（请别问我，我也不太懂）。此<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/dsdt.zip">dsdt.aml</a>仅包括与显示有关的部分，其他部分已删除，使用GMA950（27a2）的用户尽管放心使用。（记住移除EFI String）</li>
<li>使用原版驱动，安装在/System/Library/Extensions下。将所有与显卡有关的驱动从/Extra/Extensions中删除。安装<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/Extensions.zip">1.6.6驱动</a>。修复权限后，重启。</li>
<li>不幸的是，虽然分辨率可调了，但QE/CI仍然没有如愿开启。使用<em><strong>kextstat</strong></em>命令，发现AppleIntelGMA950.kext并没有加载。使用 <strong><em>sudo kextutil /System/Library/Extensions/AppleIntelGMA950.kext </em></strong>命令手动加载驱动，发现权限错误。使用下列命令：
<p>sudo su<br />
chmod -R 755 /System/Library/Extensions/*<br />
chown -R root:wheel /System/Library/Extensions/*<br />
<!--c2--></li>
<li>重启后，使用-f，但发现AppleIntelGMA950.kext仍没有自动加载。但使用<em><strong>kextutil</strong></em>加载kext时没有错误发生。再次使用kextstat，发现系统同时加载了AppleHDA和<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/VoodooHDA.kext.zip">VoodooHDA（0.2.53）</a>，这两者是有冲突的。所有我删除了AppleHDA.kext后，重启。</li>
<li>一切正常，什么截屏，看图，水波纹，应有尽有了。有一个简易的方法测试是否QE/CI已经开启，使用<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/OpenMark.app.zip">OpenMark</a>测试。</li>
</ol>
<p><br class="spacer_" /></p>
<p>虽然我的无线网卡还不能使用，但通过网卡上网没有问题。现在开始，我又可以开始iPhone的开发工作了。<br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f%e5%86%8d%e7%bb%ad-%e2%80%93-%e5%bc%80%e5%90%afqeci/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>“完美”安装雪豹，Windows 7双系统续 &#8211; GMA950显卡驱动研究</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f%e7%bb%ad-gma950%e6%98%be%e5%8d%a1%e9%a9%b1%e5%8a%a8%e7%a0%94%e7%a9%b6</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f%e7%bb%ad-gma950%e6%98%be%e5%8d%a1%e9%a9%b1%e5%8a%a8%e7%a0%94%e7%a9%b6#comments</comments>
		<pubDate>Sat, 30 Jan 2010 05:34:14 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[系统安装]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=846</guid>
		<description><![CDATA[我在“完美”安装雪豹，Windows 7双系统一文中提到所谓“完美”的安装是不存在的。昨天，我准备写一篇有关iPhone编程的文章时就发现了问题 &#8211; 无法截屏。上网搜了一下，问题的根源在于我的QE/CI没有开启。

QE指Quartz Extreme，是利用显卡GPU的界面加速引擎。CI是Core Image，指利用显卡GPU的图片处理引擎，它也担任绘制OSX中3D效果的任务（比如水波纹，3D Cube））。至于QE/CI没有开启的后果是什么，除无法截屏外，我目前还不太清楚。（OpenGL ES功能完全正常，我已经测试过了，可能那些使用QE或CI的程序不能正常工作了吧）。

经过大量的测试，目前我仍然没有找到解决的办法，不过测试的结果可能会对大家有所帮助。先介绍一下我的显卡：
GPU：         GMA 950
VRAM：        64MB of Shared System Memory

Device ID:    0x27a2
Vendor ID:    Intel (0x8086)
Revision ID:  0x0003
Resolution:   1440x900
Depth:        32 Bits Color (ARGB8888)

 测试结果：（全部在32位下测试，我是用安装在Windows 7下的变色龙2.0 rc4启动）

使用原始驱动1.6.6.25，启动后黑屏，外接显示器能工作但分辨率不对
移除AppleIntelIntegratedFramebuffer.kext后，能正常启动，但分辨率固定在1024&#215;768，QE/CI未开启
使用修改后1.4.20.28版AppleIntelIntegratedFramebuffer.kext，出现“五国”，无法进入系统
将修改后1.4.20.28版AppleIntelIntegratedFramebuffer.kext移动到/Extra/Extensions下后，正常启动，令人惊奇的是分辨率可以修改了，但QE/CI仍然无法开启。
有人介绍说使用EFI String可以启动QE/CI，于是修改了/Extra下的com.apple.Boot.plist，加入了GMA 950的EFI String，再次进行以上测试，但结果完全一样。


我的结论：

要正常启动，修改分辨率的关键是AppleIntelIntegratedFramebuffer.kext
是否使用EFI String对开启QE/CI毫无影响


不知各位朋友，有无在雪豹上成功开启GMA 950的QE/CI的经验？望分享。
 


]]></description>
			<content:encoded><![CDATA[<p>我在<a href="/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f">“完美”安装雪豹，Windows 7双系统</a>一文中提到所谓“完美”的安装是不存在的。昨天，我准备写一篇有关iPhone编程的文章时就发现了问题 &#8211; 无法截屏。上网搜了一下，问题的根源在于我的QE/CI没有开启。</p>
<p><br class="spacer_" /></p>
<p>QE指Quartz Extreme，是利用显卡GPU的界面加速引擎。CI是Core Image，指利用显卡GPU的图片处理引擎，它也担任绘制OSX中3D效果的任务（比如水波纹，3D Cube））。至于QE/CI没有开启的后果是什么，除无法截屏外，我目前还不太清楚。（OpenGL ES功能完全正常，我已经测试过了，可能那些使用QE或CI的程序不能正常工作了吧）。</p>
<p><br class="spacer_" /></p>
<p>经过大量的测试，目前我仍然没有找到解决的办法，不过测试的结果可能会对大家有所帮助。先介绍一下我的显卡：</p>
<pre style="PADDING-LEFT: 30px">GPU：         GMA 950
VRAM：        64MB of Shared System Memory

Device ID:    0x27a2
Vendor ID:    Intel (0x8086)
Revision ID:  0x0003
Resolution:   1440x900
Depth:        32 Bits Color (ARGB8888)</pre>
<p><br class="spacer_" /></p>
<p> 测试结果：（全部在32位下测试，我是用安装在Windows 7下的变色龙2.0 rc4启动）</p>
<ol>
<li>使用原始驱动1.6.6.25，启动后黑屏，外接显示器能工作但分辨率不对</li>
<li>移除AppleIntelIntegratedFramebuffer.kext后，能正常启动，但分辨率固定在1024&#215;768，QE/CI未开启</li>
<li>使用修改后1.4.20.28版AppleIntelIntegratedFramebuffer.kext，出现“五国”，无法进入系统</li>
<li>将修改后1.4.20.28版AppleIntelIntegratedFramebuffer.kext移动到/Extra/Extensions下后，正常启动，令人惊奇的是分辨率可以修改了，但QE/CI仍然无法开启。</li>
<li>有人介绍说使用EFI String可以启动QE/CI，于是修改了/Extra下的com.apple.Boot.plist，加入了GMA 950的EFI String，再次进行以上测试，但结果完全一样。</li>
</ol>
<p><br class="spacer_" /></p>
<p>我的结论：</p>
<ul>
<li>要正常启动，修改分辨率的关键是AppleIntelIntegratedFramebuffer.kext</li>
<li>是否使用EFI String对开启QE/CI毫无影响</li>
</ul>
<p><br class="spacer_" /></p>
<p>不知各位朋友，有无在雪豹上成功开启GMA 950的QE/CI的经验？望分享。</p>
<p style="PADDING-LEFT: 30px"> </p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f%e7%bb%ad-gma950%e6%98%be%e5%8d%a1%e9%a9%b1%e5%8a%a8%e7%a0%94%e7%a9%b6/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>“完美”安装雪豹，Windows 7双系统</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f#comments</comments>
		<pubDate>Wed, 27 Jan 2010 07:20:23 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[系统安装]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=814</guid>
		<description><![CDATA[我的两台笔记本电脑被偷，其中就包括我用来开发iPhone程序的Macbook Pro。一想起来就有些气愤，实在不想再掏钱去买一台。好在我还有一台闲置的Dell 640m，于是决定装雪豹和Windows 7双系统。

先看看我的配置：
CPU:          Intel 酷睿双核 T2300 1.66GHZ
芯片组：    945GM
内存：       DDR2 1.5G
集成显卡：  GMA950 （id 27a2)
硬盘：       SATA 5400rmp
 

失败的经历

先上网查一下安装指南，找到下面两篇很好的教程：

1.  一步一步在Windows安装苹果雪豹系统
2. Snow Leopard on Dell Inspiron 640m/e1405 

但遗憾的是，这两种方法都无法达到我的要求。使用第一种方法，我总是在安装雪豹进行抹盘时，出现“无法修改分区图”的错误，无论我怎样进行分区，加不加“AF”标识，甚至使用WinPE重新分区格式化整个硬盘，问题依旧。而第二种方法，安装十分容易，但无法安装Windows 7到GUID（GTP）分区，据说有人成功过，但那是要有硬件支持的。没有办法，只能另辟蹊径，综合上述两种方法，经过试验，终获成功，并升级至10.6.2。
 
准备工作

我是使用安装了Mac OSX的移动硬盘进行分区和雪豹安装的。理论上，从光盘或u盘都是可以进行以下工作的。

分区

需要一块安装好Mac OSX（我用的是Leopard 10.5.7）的移动硬盘，另外你的电脑需要支持从移动设备启动。

首先从移动硬盘启动，启动后打开磁盘工具，对要安装盘进行分区操作。注意分区表要选择MBR：
 



然后，分成三个区，第一个分区用于Windows 7（NTFS)，第二个用于Mac和Windows数据共享（NTFS)，第三个用于雪豹(HFS+)。具体分区大小自己确定：


 
准备安装映像

我使用的是雪豹正式零售版映像dmg，它只能安装于GUID（GPT)分区上，所以要进行一些修改才能安装到MBR上。

首先打开dmg文件（我的是LeoSnow.dmg），将/System/Installation/Packages/下的OSInstall.mpkg拖到到桌面上，然后打开OSInstall.mpkg并修改其中的Distribution文件，找到 eraseOptionAvailable=&#8217;true&#8217;，将&#8217;true&#8217;改为&#8217;false&#8217;，然后将OSInstall.mpkg重新拖回LeoSnow.dmg。（注意：dmg是不允许修改的，所以首先必须在磁盘工具中将其转换为可读写，才能进行修改）

 
安装Windows 7


安装Windows 7 实在很简单，放入Windows 7 启动光盘，启动。选择第一个分区进行安装，如果有什么问题，格式化第一分区，安装。

 
安装雪豹

我是使用移动硬盘进行安装的（其他方法理论上可行）。启动到移动硬盘的Leopard 10.5.7下，打开刚才创建的映像文件，双击/System/Installation/Packages/OSinstall.mpkg进行安装，安装到第三个分区上。

 
准备双重启动

安装后重启，你会发现系统直接进入Windows 7。我们需要安装变色龙，让它自动找到安装了雪豹的分区。


首先安装变色龙（Chameleon_Install_RC4）
安装MacDrive，用来为雪豹安装驱动。
安装驱动。（Inspiron640mExtra 安装在雪豹分区的/Extra目录下，Inspiron640mExtensions则安装在/System/Library/Extensions下。
注意：我提供的驱动是用于Dell 640m，如果你的型号不同，你们能可能需要自己的驱动。

重启


升级

升级到10.6.2，安装显卡驱动（GMA_950_27A2_OSX_10.6.2）。此显卡驱动只在32位模式下起作用。要使系统每次自动启动到32位模式，修改一下/Extra/com.apple.Boot.plist文件，添加：
1234567&#60;/p&#62;

&#60;p&#62;arch&#60;/p&#62;

&#60;p&#62;i386&#60;/p&#62;

&#60;p&#62;

 
 
准备共享分区
我的第二个分区是用来数据共享的，由于雪豹支持NTFS，所以我直接使用NTFS分区。但是，默认状态下，NTFS分区是只读的。必须将其改为读写。

首先通过磁盘工具找到第二个分区的UUID码，然后使用sudo nano /etc/fstab输入下列条目：
UUID=xxxx-xxxx none ntfs rw
 注：xxxx-xxxx是分区的UUID。

然后，按下Ctrl-X存盘。重启后，此NTFS分区可以读写了。

结论

所谓“完美”实际上是不存在的，目前我还无法开QE/CI，另外无法唤醒“睡眠”，所以我安装了“InsomniaX”（Inspiron640mExtensions文件中）在以防系统睡眠。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/mbr.png"></a><a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/partition-1.png"></a>我的两台笔记本电脑被偷，其中就包括我用来开发iPhone程序的Macbook Pro。一想起来就有些气愤，实在不想再掏钱去买一台。好在我还有一台闲置的Dell 640m，于是决定装雪豹和Windows 7双系统。</p>
<p><br class="spacer_" /></p>
<p>先看看我的配置：</p>
<pre><span style="font-size: xx-small;">CPU:          Intel 酷睿双核 T2300 1.66GHZ
芯片组：    945GM
内存：       DDR2 1.5G
集成显卡：  GMA950 （id 27a2)
硬盘：       SATA 5400rmp
</span> </pre>
<p><span id="more-814"></span></p>
<h2>失败的经历</h2>
<p><br class="spacer_" /></p>
<p>先上网查一下安装指南，找到下面两篇很好的教程：</p>
<p><br class="spacer_" /></p>
<p>1.  <a href="http://bbs.pcbeta.com/thread-592288-1-1.html">一步一步在Windows安装苹果雪豹系统</a></p>
<p>2. <a title="Permanent Link to Snow Leopard on Dell Inspiron 640m/e1405 UPDATED" rel="bookmark" href="http://matthieu.yiptong.ca/2010/01/18/snow-leopard-on-dell-inspiron-640me1405-updated/">Snow Leopard on Dell Inspiron 640m/e1405 </a></p>
<p><br class="spacer_" /></p>
<p>但遗憾的是，这两种方法都无法达到我的要求。使用第一种方法，我总是在安装雪豹进行抹盘时，出现“无法修改分区图”的错误，无论我怎样进行分区，加不加“AF”标识，甚至使用WinPE重新分区格式化整个硬盘，问题依旧。而第二种方法，安装十分容易，但无法安装Windows 7到GUID（GTP）分区，据说有人成功过，但那是要有硬件支持的。没有办法，只能另辟蹊径，综合上述两种方法，经过试验，终获成功，并升级至10.6.2。</p>
<p><br class="spacer_" /> </p>
<h2>准备工作</h2>
<p><br class="spacer_" /></p>
<p>我是使用安装了Mac OSX的移动硬盘进行分区和雪豹安装的。理论上，从光盘或u盘都是可以进行以下工作的。</p>
<p><br class="spacer_" /></p>
<h3>分区</h3>
<p><br class="spacer_" /></p>
<p>需要一块安装好Mac OSX（我用的是Leopard 10.5.7）的移动硬盘，另外你的电脑需要支持从移动设备启动。</p>
<p><br class="spacer_" /></p>
<p>首先从移动硬盘启动，启动后打开磁盘工具，对要安装盘进行分区操作。注意分区表要选择MBR：</p>
<p><a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/mbr.png"></a> </p>
<p><a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/partition-1.png"><img class="alignnone size-full wp-image-820" title="partition 1" src="http://www.iphone-geek.cn/wp-content/uploads/2010/01/partition-1.png" alt="partition 1" width="602" height="523" /></a></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>然后，分成三个区，第一个分区用于Windows 7（NTFS)，第二个用于Mac和Windows数据共享（NTFS)，第三个用于雪豹(HFS+)。具体分区大小自己确定：</p>
<p><a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/partition-2.png"><img class="alignnone size-full wp-image-821" title="partition 2" src="http://www.iphone-geek.cn/wp-content/uploads/2010/01/partition-2.png" alt="partition 2" width="601" height="519" /></a></p>
<p><br class="spacer_" /></p>
<h3> </h3>
<h3>准备安装映像</h3>
<p><br class="spacer_" /></p>
<p>我使用的是雪豹正式零售版映像dmg，它只能安装于GUID（GPT)分区上，所以要进行一些修改才能安装到MBR上。</p>
<p><br class="spacer_" /></p>
<p>首先打开dmg文件（我的是LeoSnow.dmg），将/System/Installation/Packages/下的OSInstall.mpkg拖到到桌面上，然后打开OSInstall.mpkg并修改其中的Distribution文件，找到 eraseOptionAvailable=&#8217;true&#8217;，将&#8217;true&#8217;改为&#8217;false&#8217;，然后将OSInstall.mpkg重新拖回LeoSnow.dmg。（注意：dmg是不允许修改的，所以首先必须在磁盘工具中将其转换为可读写，才能进行修改）</p>
<p><a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/mbr.png"><img class="alignnone size-full wp-image-822" title="mbr" src="http://www.iphone-geek.cn/wp-content/uploads/2010/01/mbr.png" alt="mbr" width="658" height="557" /></a></p>
<h3> </h3>
<h2>安装Windows 7</h2>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>安装Windows 7 实在很简单，放入Windows 7 启动光盘，启动。选择第一个分区进行安装，如果有什么问题，格式化第一分区，安装。</p>
<p><br class="spacer_" /></p>
<h2> </h2>
<h2>安装雪豹</h2>
<p><br class="spacer_" /></p>
<p>我是使用移动硬盘进行安装的（其他方法理论上可行）。启动到移动硬盘的Leopard 10.5.7下，打开刚才创建的映像文件，双击/System/Installation/Packages/OSinstall.mpkg进行安装，安装到第三个分区上。</p>
<p><br class="spacer_" /></p>
<h2> </h2>
<h2>准备双重启动</h2>
<p><br class="spacer_" /></p>
<p>安装后重启，你会发现系统直接进入Windows 7。我们需要安装变色龙，让它自动找到安装了雪豹的分区。</p>
<p><br class="spacer_" /></p>
<ol>
<li>首先安装变色龙（<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/Chameleon_Install_RC4.zip">Chameleon_Install_RC4</a>）</li>
<li>安装MacDrive，用来为雪豹安装驱动。</li>
<li>安装驱动。（<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/Inspiron640mExtra.zip">Inspiron640mExtra</a> 安装在雪豹分区的/Extra目录下，<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/Inspiron640mExtensions.zip">Inspiron640mExtensions</a>则安装在/System/Library/Extensions下。
<p>注意：我提供的驱动是用于Dell 640m，如果你的型号不同，你们能可能需要自己的驱动。</p>
</li>
<li>重启</li>
</ol>
<p><br class="spacer_" /></p>
<h2>升级</h2>
<p><br class="spacer_" /></p>
<p>升级到10.6.2，安装显卡驱动（<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/GMA_950_27A2_OSX_10.6.2.zip">GMA_950_27A2_OSX_10.6.2</a>）。此显卡驱动只在32位模式下起作用。要使系统每次自动启动到32位模式，修改一下/Extra/com.apple.Boot.plist文件，添加：</p>
<p><div class="codecolorer-container xml mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>arch<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>i386<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></td></tr></tbody></table></div>
</p>
<h2> </h2>
<h2> </h2>
<h2>准备共享分区</h2>
<p><br class="spacer_" />我的第二个分区是用来数据共享的，由于雪豹支持NTFS，所以我直接使用NTFS分区。但是，默认状态下，NTFS分区是只读的。必须将其改为读写。</p>
<p><br class="spacer_" /></p>
<p>首先通过磁盘工具找到第二个分区的UUID码，然后使用sudo nano /etc/fstab输入下列条目：</p>
<p>UUID=xxxx-xxxx none ntfs rw</p>
<p> 注：xxxx-xxxx是分区的UUID。</p>
<p><br class="spacer_" /></p>
<p>然后，按下Ctrl-X存盘。重启后，此NTFS分区可以读写了。</p>
<p><br class="spacer_" /></p>
<h2>结论</h2>
<p><br class="spacer_" /></p>
<p>所谓“完美”实际上是不存在的，目前我还无法开QE/CI，另外无法唤醒“睡眠”，所以我安装了“InsomniaX”（<a href="http://www.iphone-geek.cn/wp-content/uploads/2010/01/Inspiron640mExtensions.zip">Inspiron640mExtensions</a>文件中）在以防系统睡眠。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e2%80%9c%e5%ae%8c%e7%be%8e%e2%80%9d%e5%ae%89%e8%a3%85%e9%9b%aa%e8%b1%b9%ef%bc%8cwindows-7%e5%8f%8c%e7%b3%bb%e7%bb%9f/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Xcode之宏</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e4%b9%8b%e5%ae%8f</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e4%b9%8b%e5%ae%8f#comments</comments>
		<pubDate>Thu, 12 Nov 2009 04:30:54 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[调试]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=200</guid>
		<description><![CDATA[注：宏的使用可以节省代码重复输入工作，还可以为调试带来各种好处。本文列出了几个非常简单实用的宏。

&#160;
这些是我在Xcode中常用到的宏： 
&#160;
CMLog: 用它来代替NSLog：
1#define CMLog(format, ...) NSLog(@&#34;%s:%@&#34;, __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]);
&#160;
它的作用是将调用它的类和方法的名称一起输出到控制台。比如你在MyAppDelegate类的applicationDidFinishLaunching方法中调用它：
1CMLog&#40;@&#34;My iPhone is an %@, v %@&#34;, &#91;&#91;UIDevice currentDevice&#93; model&#93;, &#91;&#91;UIDevice currentDevice&#93; systemVersion&#93;&#41;;
&#160;
控制台将输出：
2009-01-05 10:06:28.957 MyApp15173:20b] -[MyAppDelegate applicationDidFinishLaunching:]:
My iPhone is an iPhone Simulator, v 2.2
&#160;
MARK: 此宏用于输出调用它的类和方法名称。适用于只想知道是否一个方法被调用了。
1#define MARK&#160; &#160; CMLog(@&#34;%s&#34;, __PRETTY_FUNCTION__);
&#160;
START_TIMER和END_TIMER: 用于确定一个方法或一段代码的运行时间：
12#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; &#160;
#define END_TIMER(msg) &#160;NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@&#34;%@ Time [...]]]></description>
			<content:encoded><![CDATA[<p>注：宏的使用可以节省代码重复输入工作，还可以为调试带来各种好处。本文列出了几个非常简单实用的宏。<br />
<span id="more-200"></span></p>
<p>&nbsp;</p>
<p>这些是我在Xcode中常用到的宏： </p>
<p>&nbsp;</p>
<p><strong>CMLog</strong>: 用它来代替NSLog：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define CMLog(format, ...) NSLog(@&quot;%s:%@&quot;, __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]);</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>它的作用是将调用它的类和方法的名称一起输出到控制台。比如你在<strong>MyAppDelegate</strong>类的<strong>applicationDidFinishLaunching</strong>方法中调用它：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">CMLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;My iPhone is an %@, v %@&quot;</span>, <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIDevice currentDevice<span style="color: #002200;">&#93;</span> model<span style="color: #002200;">&#93;</span>, <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIDevice currentDevice<span style="color: #002200;">&#93;</span> systemVersion<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>控制台将输出：</p>
<pre>2009-01-05 10:06:28.957 MyApp15173:20b] -[MyAppDelegate applicationDidFinishLaunching:]:
My iPhone is an iPhone Simulator, v 2.2</pre>
<p>&nbsp;</p>
<p><strong>MARK</strong>: 此宏用于输出调用它的类和方法名称。适用于只想知道是否一个方法被调用了。</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define MARK&nbsp; &nbsp; CMLog(@&quot;%s&quot;, __PRETTY_FUNCTION__);</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p><strong>START_TIMER</strong>和<strong>END_TIMER</strong>: 用于确定一个方法或一段代码的运行时间：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; &nbsp;</span><br />
<span style="color: #6e371a;">#define END_TIMER(msg) &nbsp;NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@&quot;%@ Time = %f&quot;;, msg, stop-start]);</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>将<strong>START_TIMER</strong> 置于需评测的代码段开始处，并将<strong>END_TIMER</strong>置于代码段结束处，你就可获得这段代码的运行时间：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"><span style="color: #400080;">NSData</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>loadDataFromURL<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>dataURL &nbsp;<br />
<span style="color: #002200;">&#123;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; START_TIMER; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"><span style="color: #400080;">NSData</span></a> <span style="color: #002200;">*</span>data <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self doSomeStuff<span style="color: #002200;">:</span>dataURL<span style="color: #002200;">&#93;</span>; &nbsp; &nbsp;<br />
&nbsp; &nbsp; END_TIMER<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;loadDataFromURL&quot;</span><span style="color: #002200;">&#41;</span>; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> data; &nbsp;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>输出为:</p>
<pre>2009-01-05 10:31:37.943 MyApp[15283:20b] -[MyAppDelegate loadDataFromURL:]:
loadDataFromURL Time = 3.636021  </pre>
<p>&nbsp;</p>
<p>将所有这些宏定义整理使用条件标志放在预编译的头文件中。调试时，此标志设为1 ，发布时将其设为0 。</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#if DEBUG==1 &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define CMLog(format, ...) NSLog(@&quot;%s:%@&quot;;, __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]); &nbsp; </span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define MARK&nbsp; &nbsp; CMLog(@&quot;%s&quot;;, __PRETTY_FUNCTION__); &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define END_TIMER(msg) &nbsp;NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@&quot;%@ Time = %f&quot;;, msg, stop-start]); &nbsp;</span><br />
<span style="color: #6e371a;">#else &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define CMLog(format, ...) &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define MARK &nbsp;#define START_TIMER &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define END_TIMER(msg) &nbsp;</span><br />
<span style="color: #6e371a;">#endif</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>在<em>Debug</em>目标设定中加入：</p>
<pre>OTHER_CFLAGS = -DDEBUG=1  </pre>
<p>&nbsp;</p>
<p>在<em>Release</em> 目标设定中加入：</p>
<pre>OTHER_CFLAGS = -DDEBUG=0
</pre>
<p>&nbsp;</p>
<h5>
          原文见：<a href="http://blog.coriolis.ch/2009/01/05/macros-for-xcode/" rel="bookmark" title="Permanent Link: Macros for Xcode">Macros for Xcode</a><br />
        </h5>
<pre>&nbsp;        </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e4%b9%8b%e5%ae%8f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>怎样替换Xcode中__MyCompanyName__</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e6%80%8e%e6%a0%b7%e6%9b%bf%e6%8d%a2xcode%e4%b8%ad__mycompanyname__</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e6%80%8e%e6%a0%b7%e6%9b%bf%e6%8d%a2xcode%e4%b8%ad__mycompanyname__#comments</comments>
		<pubDate>Wed, 11 Nov 2009 14:07:18 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[提示与技巧]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=195</guid>
		<description><![CDATA[我们知道，Xcode在每个.h和.m文件头都会加上一些发行信息，如姓名，创建日期，公司名等。但公司名是用__MyCompanyName__代表，每个文件都要手工修改十分麻烦。此信息的模板存在/Library/Application Support/Apple/Developer Tools/File Templates下，格式如下：
12345678/*
&#160;* &#160;«FILENAME»
&#160;* &#160;«PROJECTNAME»
&#160;*
&#160;* &#160;Created by «FULLUSERNAME» on «DATE».
&#160;* &#160;Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.
&#160;*
&#160;*/
我们当然可以修改此文件。但每次Xcode升级后，此信息就会丢失。我在一本有关Xcode的书中找到一个方法：
1defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions '{ ORGANIZATIONNAME = &#34;Joan Smith&#34;; }'
另一种方法是通过双击~/Library/Preferences下com.apple.Xcode.plist来修改。
]]></description>
			<content:encoded><![CDATA[<p>我们知道，Xcode在每个.h和.m文件头都会加上一些发行信息，如姓名，创建日期，公司名等。但公司名是用__MyCompanyName__代表，每个文件都要手工修改十分麻烦。此信息的模板存在/Library/Application Support/Apple/Developer Tools/File Templates下，格式如下：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">/*<br />
&nbsp;* &nbsp;«FILENAME»<br />
&nbsp;* &nbsp;«PROJECTNAME»<br />
&nbsp;*<br />
&nbsp;* &nbsp;Created by «FULLUSERNAME» on «DATE».<br />
&nbsp;* &nbsp;Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.<br />
&nbsp;*<br />
&nbsp;*/</span></div></td></tr></tbody></table></div>
<p>我们当然可以修改此文件。但每次Xcode升级后，此信息就会丢失。我在一本有关Xcode的书中找到一个方法：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions <span style="color: #bf1d1a;">'{ ORGANIZATIONNAME = &quot;Joan Smith&quot;; }'</span></div></td></tr></tbody></table></div>
<p>另一种方法是通过双击~/Library/Preferences下com.apple.Xcode.plist来修改。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e6%80%8e%e6%a0%b7%e6%9b%bf%e6%8d%a2xcode%e4%b8%ad__mycompanyname__/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xcode提示与技巧1-10</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e6%8f%90%e7%a4%ba%e4%b8%8e%e6%8a%80%e5%b7%a71-10</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e6%8f%90%e7%a4%ba%e4%b8%8e%e6%8a%80%e5%b7%a71-10#comments</comments>
		<pubDate>Fri, 30 Oct 2009 13:15:28 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://iphonegeekbeta.zuesitech.com/?p=112</guid>
		<description><![CDATA[
我的世界被各种各样的便签条，不管是电子的还是纸的，包围着。我总是想方设法记住各种各样的Xcode的便捷键以及各种提示与技巧。编程时，我总是尽量少用鼠标，如果没有这些提示，我就会无所适从了。而这里是记录这些提示与技巧最好的地方了。


    这是第一篇文章，我希望接下来会有更多有关Xcode的提示与技巧文章。
  
&#160;
提示 #1 &#8211; 垂直分割编辑器视图

    如果你喜欢同时使用多代码窗口，编辑器分割选项可以帮助你（留意下图中小正方形网格图标）。
  

  
  缺省情况下，窗口被水平分割。如果你希望并列观察你的代码（便于比较），下面是关于怎样垂直分割窗口的方法：

  &#160;&#160;&#160;&#160;1.按下窗口分割图标的同时按下Option键。

&#160;
    提示 #2 &#8211; 解除一段代码的注解

  你可以按下面方法快速为一段代码加注解：

    &#160;&#160;&#160;&#160;1.选择需加注解的一行或多行代码
  &#160;&#160;&#160;&#160;2.按Command-/

    要解除一段代码的注解，重复上述步骤。
  

&#160;
  提示 #3 &#8211; 在.h和.m文件间切换  

  在当前代码窗，按下面方法在.h和.m间快速切换：

    [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>我的世界被各种各样的便签条，不管是电子的还是纸的，包围着。我总是想方设法记住各种各样的Xcode的便捷键以及各种提示与技巧。编程时，我总是尽量少用鼠标，如果没有这些提示，我就会无所适从了。而这里是记录这些提示与技巧最好的地方了。</p>
<p><span id="more-112"></span></p>
<p>
    这是第一篇文章，我希望接下来会有更多有关Xcode的提示与技巧文章。
  </p>
<p>&nbsp;</p>
<h3><strong>提示 #1 &#8211; 垂直分割编辑器视图</strong></h3>
<p>
    如果你喜欢同时使用多代码窗口，编辑器分割选项可以帮助你（留意下图中小正方形网格图标）。
  </p>
<p>
  <img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2009/10/split1.png" alt=""></p>
<p>  缺省情况下，窗口被水平分割。如果你希望并列观察你的代码（便于比较），下面是关于怎样垂直分割窗口的方法：</p>
<p>
  &nbsp;&nbsp;&nbsp;&nbsp;1.按下窗口分割图标的同时按下<strong>Option</strong>键。</p>
<h3></p>
<p>&nbsp;</p>
<p>    提示 #2 &#8211; 解除一段代码的注解</h3>
<p>
  你可以按下面方法快速为一段代码加注解：</p>
<p>
    &nbsp;&nbsp;&nbsp;&nbsp;1.选择需加注解的一行或多行代码<br />
  &nbsp;&nbsp;&nbsp;&nbsp;2.按<strong>Command-/</strong></p>
<p>
    要解除一段代码的注解，重复上述步骤。
  </p>
<h3></p>
<p>&nbsp;</p>
<p>  提示 #3 &#8211; 在.h和.m文件间切换  </h3>
<p>
  在当前代码窗，按下面方法在.h和.m间快速切换：</p>
<p>
      &nbsp;&nbsp;&nbsp;&nbsp;1.<strong>Command-Option Up-Arrow</strong></p>
<p>&nbsp;</p>
<h3>提示 #4 &#8211; 键和动作映射（键绑定）</h3>
<p>
  上面的提示确实可以节省不少时间。但是，我发现我更喜欢按习惯将动作映射到按键上。例如，我可以将上一个提示的动作映射为<strong>Option-S</strong>，就像大部分的切换和交换动作 一样。</p>
<p>
  下面是怎样在Xcode中进行键绑定：</p>
<p>
        &nbsp;&nbsp;&nbsp;&nbsp;1.在Xcode菜单上选择<strong>Prefereces</strong>（偏好）<br />
      &nbsp;&nbsp;&nbsp;&nbsp;2.选择<strong>Key Bindings</strong>（键绑定）<br />
      &nbsp;&nbsp;&nbsp;&nbsp;3.单击列表中的一个<strong>Actions</strong>（动作）<br />
      &nbsp;&nbsp;&nbsp;&nbsp;4.轻击右边的<strong>Keys</strong>栏目<br />
      &nbsp;&nbsp;&nbsp;&nbsp;5.输入你希望映射到这个动作的按键<br />
      &nbsp;&nbsp;&nbsp;&nbsp;6.按<strong>Ok</strong>保存你的改变</p>
<h3></p>
<p>&nbsp;</p>
<p>  提示 #5 &ndash; 打开API文档  </h3>
<p>
  显示任何相关的SDK中的API文档十分简单：</p>
<p>
      &nbsp;&nbsp;&nbsp;&nbsp;1.在相关代码上双击<strong>Option</strong>键</p>
<p>
  例如，在下面截屏中，在双击<strong>UIToolbar</strong>后，一个弹出窗口将显示出此类的概要。</p>
<p>
  <img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2009/10/toolbar.png" alt=""></p>
<h3></p>
<p>&nbsp;</p>
<p>    提示 #6 &ndash; 历遍文件历史</h3>
<p>
    当你打开编辑各文件时，Xcode会象使用网页浏览器一样保留一份有关动作的历史清单。你可以象下图那样使用方向键头在清单中移动：</p>
<p>
    <img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2009/10/history.png" alt="">
  </p>
<p>
  与上述等效的键击如下：</p>
<p>
        &nbsp;&nbsp;&nbsp;&nbsp;1.<strong>Option-Command Left-Arrow</strong> 移动到前一个文件<br />
      &nbsp;&nbsp;&nbsp;&nbsp;2.<strong>Option-Command Right-Arrow</strong> 移动到下一个文件</p>
<h3></p>
<p>&nbsp;</p>
<p>  提示 #7 &ndash; 书签设定</h3>
<p>
  我简直无法想象编程时如果没有办法进行书签设定会怎样。当我要继续到另一个文件中查找某一段代码时，我经常需要进行书签设定。加书签很简单：</p>
<p>
        &nbsp;&nbsp;&nbsp;&nbsp;1.<strong>Control-D</strong><br />
      &nbsp;&nbsp;&nbsp;&nbsp;2.输入书签名</p>
<h3></p>
<p>&nbsp;</p>
<p>    提示 #8 &ndash; 跳转到书签</h3>
<p>
    有两种方法跳转到书签。第一种，你可以选择编辑器窗口右上角的书签图标。</p>
<p>
    <img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2009/10/bookmarks.png" alt="">
  </p>
<p>使用以下键击，你可以得到与上图相同的菜单：</p>
<p>
      &nbsp;&nbsp;&nbsp;&nbsp;1.<strong>Control-4</strong></p>
<h3></p>
<p>&nbsp;</p>
<p>    提示 #9 &ndash; 缩进/取消缩进</h3>
<p>
  你可以按以下方法缩进一行或一段选择的代码：</p>
<p>
        &nbsp;&nbsp;&nbsp;&nbsp;1.<strong>Command-[</strong> 向左移动代码<br />
      &nbsp;&nbsp;&nbsp;&nbsp;2.<strong>Command-]</strong> 向右移动代码</p>
<p>
    上述方法不管你处于代码行中的什么位置都会起作用，换而言之，你不必处于一行的开始处。
  </p>
<h3></p>
<p>&nbsp;</p>
<h3><strong>提示 #10 &ndash; 缩放编辑器</strong></h3>
<p>
    你可以通过按如下图所示的Editor（编辑器）按钮在细节视图和编辑器视图间切换。</p>
<p>
  <img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2009/10/zoomeditor.png" alt=""></p>
<p>
  与以上等效的键击为：</p>
<p>
      &nbsp;&nbsp;&nbsp;&nbsp;1.<strong>Shift-Command-E</strong></p>
</div>
<p>&nbsp;</p>
<div>
<h5>
  原文来自：<a href="http://iPhoneDeveloperTips.com/xcode/xcode-tips-and-tricks-tips-1-to-10.html" rel="bookmark" title="Permanent Link: Killer Xcode Tips and Tricks &ndash; Tips 1 to 10">Killer Xcode Tips and Tricks &ndash; Tips 1 to 10</a><a href="http://iPhoneDeveloperTips.com/category/xcode" title="View all posts in Xcode" rel="category tag"></a> 翻译：bagusflyer</h5>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e6%8f%90%e7%a4%ba%e4%b8%8e%e6%8a%80%e5%b7%a71-10/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>将音频转换成CAF格式</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e5%b0%86%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%8d%a2%e6%88%90caf%e6%a0%bc%e5%bc%8f</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e5%b0%86%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%8d%a2%e6%88%90caf%e6%a0%bc%e5%bc%8f#comments</comments>
		<pubDate>Thu, 12 Mar 2009 12:48:50 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[音频]]></category>

		<guid isPermaLink="false">http://iphonegeekbeta.zuesitech.com/?p=100</guid>
		<description><![CDATA[
在mac上使用afconvert命令可以将音频文件转换成caf文件。

  

afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf



-f 指定文件格式
-d 数据格式，@44100指采样率
-c 通道数
]]></description>
			<content:encoded><![CDATA[<p>
在mac上使用afconvert命令可以将音频文件转换成caf文件。</p>
<p>
  </p>
<div class="sourcecode">
afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf
</div>
</p>
<p>
-f 指定文件格式</p>
<p>-d 数据格式，@44100指采样率</p>
<p>-c 通道数</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e5%b0%86%e9%9f%b3%e9%a2%91%e8%bd%ac%e6%8d%a2%e6%88%90caf%e6%a0%bc%e5%bc%8f/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
