﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-RTY 实践出真知-随笔分类-Mac os</title><link>http://www.cppblog.com/lauer3912/category/16486.html</link><description>没有理由不学习</description><language>zh-cn</language><lastBuildDate>Wed, 10 Apr 2013 10:30:28 GMT</lastBuildDate><pubDate>Wed, 10 Apr 2013 10:30:28 GMT</pubDate><ttl>60</ttl><item><title>project already exists delete and recreate Cordova (MacOS)</title><link>http://www.cppblog.com/lauer3912/archive/2013/02/17/197877.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sun, 17 Feb 2013 05:12:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/02/17/197877.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197877.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/02/17/197877.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197877.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197877.html</trackback:ping><description><![CDATA[根据我的环境说明一下：<br />1、Cordova的目录:/Users/kevin/Projects/HTML5/cordova-2.4.0/cordova-android<br /><br />2、AndroidSDK目录: /Users/kevin/TBB/adt-bundle-mac-x86_64/sdk<br /><br />3、设置方法：<br />（1）Terminal: 定位到Cordova的目录。<br />&nbsp; &nbsp; &nbsp; &nbsp;cd&nbsp;/Users/kevin/Projects/HTML5/cordova-2.4.0/cordova-android<br />&nbsp;（2）设置环境变量<br />&nbsp; &nbsp; &nbsp; &nbsp;export PATH=/Users/kevin/TBB/adt-bundle-mac-x86_64/sdk:/Users/kevin/TBB/adt-bundle-mac-x86_64/sdk/tools/:$PATH<br /><br />&nbsp;（3）执行 ./bin/create ~/Desktop/myapp com.myapp.special MyApp<br /><br />特殊说明：<br /><div>./bin/create /Users/kevin/CordovaProjects/Android/ChunMiaoPu com_chunmiaopu_android chunMiaoPuAndroid</div><br />会出现错误：<br /><div>An unexpected error occurred: "$ANDROID_BIN" create project --target $TARGET --path "$PROJECT_PATH" --package $PACKAGE --activity $ACTIVITY &gt;&amp;/dev/null exited with 1</div><div>Deleting project...<br /><br /><br />只有执行如下才可以：./bin/create ~/CordovaProjects/Android/ChunMiaoPu com.chunmiaopu.android chunMiaoPuAndroid<br /><br /><br />~/MyWorkSpace/JiffAndroidApp 会自动创建JiffAndroidApp目录<br /><br /><div>devmatoMacBook-2:cordova-android kevin$ ./bin/create ~/MyWorkSpace/JiffAndroidApp me.jiff.AndroidApp JiffAndroidApp</div><div>An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1</div><div>Deleting project...</div><div>devmatoMacBook-2:cordova-android kevin$ export PATH=/Applications/eclipseForADT-20130219/sdk:/Applications/eclipseForADT-20130219/sdk/tools/:$PATH &nbsp;</div><div>devmatoMacBook-2:cordova-android kevin$ ./bin/create ~/MyWorkSpace/JiffAndroidApp me.jiff.AndroidApp JiffAndroidApp</div><div>devmatoMacBook-2:cordova-android kevin$&nbsp;</div></div><img src ="http://www.cppblog.com/lauer3912/aggbug/197877.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-02-17 13:12 <a href="http://www.cppblog.com/lauer3912/archive/2013/02/17/197877.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>为你的Cocoa应用程序加入更新支持：Sparkle 简介</title><link>http://www.cppblog.com/lauer3912/archive/2013/02/07/197767.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Thu, 07 Feb 2013 06:14:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/02/07/197767.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197767.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/02/07/197767.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197767.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197767.html</trackback:ping><description><![CDATA[<h2 class="arcd-ttl">为你的Cocoa应用程序加入更新支持：Sparkle 简介</h2>
                    <p class="arcd-info"><span>发布于：2010-09-20 13:06</span><span>阅读数：3141</span></p>
                    <div class="arcd-sum">
                    	<p class="p1">作为一名桌面软件开发者，应该提早考虑程序的更新问题。如何将程序更新及时优雅的推送给用户，是维持用户忠诚度和提高软件使用体验的一个重要方面。而作为Cocoa应用程序开发者，</p>
                        
                        <span class="pun pun1">&#8220;</span><span class="pun pun2">&#8221;</span>
                    </div>
                
            	
            
            	
            		<div class="tags">
                    	
                    	
                    	<a id="read" class="font f3">阅读器</a>
                        
                    	
                    </div>
                    
                    
                    	
                    		<div id="article"><p>转自 ibuick.com，原文&nbsp; <a target="_blank" href="http://ibuick.com/index.php/archives/add-automatic-update-support-over-cocoa-app-via-sparkle-framework">http://ibuick.com/index.php/archives/add-automatic-update-support-over-cocoa-app-via-sparkle-framework</a></p>
<hr />
<p>作为一名桌面软件开发者，应该提早考虑程序的更新问题。如何将程序更新及时优雅的推送给用户，是维持用户忠诚度和提高软件使用体验的一个重要方面。而作为Cocoa应用程序开发者，我们可以选择自己手动来实现此功能，也可以选择一些优秀的开源框架。<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>就是其中之一。</p>
<p><span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>是一个非常简单且易用的Cocoa应用程序更新框架。本篇文章将使用一个简单的例子，教你如何使用<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>为你的Cocoa应用程序加入更新支持。</p>
<p>1: 新建一个Cocoa Application，TestSparkle</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401G5-0.png" alt="wpid-wpid-xcodecocoaapplication-2010-09-10-16-11-2010-09-10-16-11.png" height="415" width="544" /></p>
<p>&nbsp;</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214063Z-1.png" alt="wpid-wpid-cocoaapplicationwithsparkle-2010-09-10-16-11-2010-09-10-16-11.png" height="392" width="541" /><br />
2: 去到<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>下载<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/files/Sparkle%201.5b6.zip">Sparkle Framework</a></span>，最新版本为 1.5b6,</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214060c-2.png" alt="wpid-wpid-sparkle-2010-09-10-16-11-2010-09-10-16-11.png" height="340" width="545" /><br />
Sparkle Test App.app 是一个用来演示<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>更新框架的一个应用程序。</p>
<p>Extras文件夹下提供了<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>的标准图标，Release Notes模版，软件签名工具，源代码和Appcast.xml示例文件，我们后面会再讲到这些工具和文件。</p>
<p>With Garbage Collection, 是一个加入了Garbage Collection支持的<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>分发版，如果你的应用程序运行在有GC的环境下，则可以使用这个版本的<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span></p>
<p>Sparkle.framework 是通用分发版，笔者建议大家使用此版本的<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>。</p>
<p>3: 链接<span style="text-decoration: underline;"><a href="http://sparkle.andymatuschak.org/">Sparkle</a></span>框架到TestSparkle工程</p>
<p>拖拽Sparkle.framework(或 with Garbage Collection下的  
Sparkle.framework)到TestSparkle的Linked Frameworks下，在弹出窗口中记得选中&#8221;Copy items 
 into destination group&#8217;s folder (if needed)&#8221;前面的复选框。</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214014c-3.png" alt="wpid-wpid-addsparkletotestsparkle-2010-09-10-16-11-2010-09-10-16-11.png" height="328" width="542" /></p>
<p>4: 为你的工程新建一个Copy Files Build Phase,</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321402103-4.png" alt="wpid-wpid-addcopyfilesbuildphase-2010-09-10-16-11-2010-09-10-16-11.png" height="328" width="543" /><br />
5: 右键点击这个新建的Copy Files Build Phase，并在弹出窗口中，点击Destination下拉框，选择Frameworks</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321403625-5.png" alt="wpid-wpid-copyfilesbuildphaseforframework-2010-09-10-16-11-2010-09-10-16-11.png" height="386" width="542" /><br />
6: 将Linked Framworks下的Sparkle.framework拖拽到这个新建的Copy Files Build Phase 中</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214033D-6.png" alt="wpid-wpid-addsparkle-2010-09-10-16-11-2010-09-10-16-11.png" height="328" width="543" /><br />
7: 在Interface Builder中打开TestSparkle的MainMenu.xib(nib), 然后点击Interface Builder&#8211;&gt;Files&#8211;&gt;Read Class Files</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321403500-7.png" alt="wpid-wpid-readclassfiles-2010-09-10-16-11-2010-09-10-16-11.png" height="284" width="290" /></p>
<p>8: 将Sparkle.framework中的所有头文件选中并读取</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/132140M22-8.png" alt="wpid-wpid-readheaderfiles-2010-09-10-16-11-2010-09-10-16-11.png" height="363" width="543" /><br />
9: 从Library中拖拽一个 NSObject到MainMenu主窗口.</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321406246-9.png" alt="wpid-wpid-addobject-2010-09-10-16-11-2010-09-10-16-11.png" height="363" width="543" /></p>
<p>10: 点击此Object对象，点击Inspector，设定此Object的Class为 SUUpdater</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321405R0-10.png" alt="wpid-wpid-SUUpdater-2010-09-10-16-11-2010-09-10-16-11.png" height="355" width="301" /></p>
<p>11: 添加一个菜单项到到TestSparkle Menu，重命名为 Check For Updates&#8230;</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214024X-11.png" alt="wpid-wpid-Checkupdatesmenuitem-2010-09-10-16-11-2010-09-10-16-11.png" height="322" width="543" /></p>
<p>12: 将 Check for Updates&#8230;菜单项的Send Actions指向Updater Object的checkForUpdates方法</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214044c-12.png" alt="wpid-wpid-addactionforupdate-2010-09-10-16-11-2010-09-10-16-11.png" height="353" width="542" /><br />
13: 保存Interface Builder的所有更改，退出Interface Builder。</p>
<p>14: 为了安全防止应用程序更新遭到恶意篡改，我推荐对应用程序更新添加数字签名。</p>
<p>Sparkle使用DAS SHA-1 来对程序更新包进行数字签名。</p>
<p>打开终端，进入步骤2中存放已下载的Sparkle包的文件夹，进入Extras&#8211;&gt;Signing Tools，</p>
<p>执行,</p>
<div class="codecolorer-container bash default" style="overflow: auto; white-space: nowrap; width: 435px;">
<div class="bash codecolorer">ruby generate_keys.rb</div>
</div>
<p>这个命令将会生成两个文件 dsa_priv.pem 和 dsa_pub.pem，也就是私钥和公钥，请妥善保存这两个文件，如果私钥丢失，你得用户将再也无法自动通过已安装的程序来获得更新的更新。</p>
<p>15: 建立一个 App Cast Feed文件</p>
<p>Sparkle的运作机理其实非常简洁，本地应用程序Info.plist中含有一个URL，此URL指向一个在你网站上的App Cast  
Feed XML文件。当你发布更新的时候，上传新的app到你的网站，更新此app cast xml  
feed。这样，客户端程序在运行检查更新时，会根据Info  
Plist中的URL找到并Parse此文件，跟本地软件版本进行比对。如果发现更新，则提示用户。这就是App Cast XML  
Feed文件的作用。</p>
<p>在步骤14中提到的Extras文件夹下，有一个App Cast XML Feed文件的模版：</p>
<p>&nbsp;</p>
<p>http://you.com/app/2.0.html<br />
<br />
Wed, 09 Jan 2006 19:20:11 +0000<br />
<br />
http://you.com/app/1.5.html<br />
<br />
Wed, 01 Jan 2006 12:20:11 +0000<br />
<span class="sc-1">&lt;!-- Now here's an example of a version with a  
weird internal version number (like an SVN revision) but a  
human-readable external one. --&gt;</span><br />
http://you.com/app/1.4.html<br />
<br />
Wed, 25 Dec 2005 12:20:11 +0000</p>
<p>我们可以看出，这其实是一个标准的RSS Feed格式的XML文件。我们只要修改相应的项目即可。</p>
<p>下面我们就来一步步的演示如何使用Sparkle为你的程序加入更新支持。</p>
<p>16: 我们首先在本地搭建一个可用于测试软件更新的网站。打开Mac OS X系统偏好设置(System Preferences),  
找到共享(Sharing)，开启Web共享(Web  
Sharing)，并通过点击图中所示URL测试Web共享是否成功开启。http://10.0.1.2/~buick <span style="color: #ff0000;">你的显示可能与此不同，，，，</span></p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321402048-13.png" alt="wpid-wpid-websharing-2010-09-10-16-11-2010-09-10-16-11.png" height="454" width="542" /><br />
17: 打开你的XCode中 TestSparkle 工程，编辑 TestSparkle-Info.plist，加入两个属性，SUPublicDSAKeyFile 和 SUFeedURL</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401K7-14.png" alt="wpid-wpid-info.plist-2010-09-10-16-11-2010-09-10-16-11.png" height="412" width="543" /></p>
<p>其中，SUFeedURL 将是指向一个 App Cast XML Fee 的 URL，比如我的测试地址是 <span style="text-decoration: underline;"><a href="http://10.0.1.2/%7Ebuick/testsparkleappcast.xml">http://10.0.1.2/~buick/testsparkleappcast.xml</a></span>
  ，SUPublicDSAKeyFile 指向公钥，我们把刚才步骤14中生成的 dsa_pub.pem 加入到工程的Resources中，并在
  TestSparkle-Info.plist 中指定此公钥的名称，，，，那么现在的TestSparkle-Info.plist应该是这样</p>
<p><a rel="attachment wp-att-1106" href="http://ibuick.com/index.php/archives/add-automatic-update-support-over-cocoa-app-via-sparkle-framework/wpid-wpid-configuration-2010-09-10-16-11-2010-09-10-16-111-2"><img class="alignnone size-full wp-image-1106" title="wpid-wpid-configuration-2010-09-10-16-11-2010-09-10-16-111" src="http://www.cocoachina.com/cms/uploads/allimg/100920/132140D41-15.png" alt="" height="412" width="543" /></a></p>
<p>整个配置完成，我们现在来构建一个TestSparkle.app的1.0版本，点击Build and Run</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401T0-16.png" alt="wpid-wpid-TestSparkle-2010-09-10-16-11-2010-09-10-16-11.png" height="323" width="542" /><br />
启动TestSparkle.app, 在TestSparkle菜单下，确认Check for Updates&#8230;按钮处于可用状态，如果是灰色不可点击，则返回Interface Builder修改。</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/13214025G-17.png" alt="wpid-wpid-checkforupdates-2010-09-10-16-11-2010-09-10-16-11.png" height="242" width="227" /></p>
<p>将此 TestSparkle.app 1.0 版本拷贝到别处备用。然后返回XCode，将应用程序版本改为1.1,然后构建工程。将TestSparkle.app 的1.1版本打包成zip文件，改名为TestSparkle_1.1.zip</p>
<p>将 dsa_priv.pem (私钥) 和 TestSparkle_1.1.zip 拷贝到 Extras下的Signing Tool文件夹中，</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/132140B34-18.png" alt="wpid-wpid-signing-2010-09-10-16-11-2010-09-10-16-11.png" height="298" width="542" /></p>
<p>打开终端进入到此文件夹，执行：</p>
<div class="codecolorer-container bash default" style="overflow: auto; white-space: nowrap; width: 435px;">
<div class="bash codecolorer">ruby sign_update.rb TestSparkle_1.1.zip dsa_priv.pem</div>
</div>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401011-19.png" alt="wpid-wpid-sign-2010-09-10-16-11-2010-09-10-16-11.png" height="323" width="542" /><br />
便可得到升级包的签名，MCwCFDZsrVGB+PewvxioJcvptkqchXi3AhQOZDJ4UukRM2/bYmZzzbHTxM2kpA==</p>
<p>用文本编辑器创建一个xml文件(UTF-8 编码)，内容如下：</p>
<p>http://10.0.1.2/~buick &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The latest TestSparkle updates from localhost, more hot features and sweeties<br />
en</p>
<p>Fri, 10 Sept 2010 0:00:00 +0300 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://10.0.1.2/~buick</p>
<p><span style="color: #ff0000;">注意(由于本网站HTML的设置问题，如果你直接拷贝以上XML Feed文件到你本地测试可能会出编码问题导致XML Parse失败，请到本文最后下载此文件，以及工程压缩包)。</span></p>
<p>把此XML另存为 testsparkleappcast.xml</p>
<p>熟悉RSS Feed的读者可能很容易理解此文件，，如果我们在浏览器中直接访问此URL，我们会看到</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401950-20.png" alt="wpid-wpid-feed-2010-09-10-16-11-2010-09-10-16-11.png" height="380" width="543" /></p>
<p>而我们要关注的只是这两段:</p>
<p>这段指定的URL是一个介绍页面，如果你希望在更新提示窗口中出现一个介绍新版本的页面(或者说release notes)，则使用此URL定向到你网站上的新版本介绍页面。</p>
<p>Sparkle非常贴心的为大家提供了一个模版，在Extras/Release Notes Templates 文件夹下可找到</p>
<p>enclosure sparkle:version=&#8220;1.1&#8221;  
sparkle:dsaSignature=&#8220;MCwCFDZsrVGB+PewvxioJcvptkqchXi3AhQOZDJ4UukRM2/bYmZzzbHTxM2kpA==&#8220;
  url=&#8220;http://10.0.1.2/~buick/TestSparkle_1.1.zip&#8221; length=&#8220;436264&#8221;  
type=&#8220;application/octet-stream&#8221;/&gt;</p>
<p>这段是实现Sparkle Update的关键，</p>
<p>sparkle:version=&#8220;1.1&#8221; 是指当前更新包版本号，客户端程序就是根据这个版本号来和本地APP进行比对，如果发现不同则提示更新。</p>
<p>sparkle:dsaSignature=&#8220;MCwCFDZsrVGB+PewvxioJcvptkqchXi3AhQOZDJ4UukRM2/bYmZzzbHTxM2kpA==&#8220; 这个就是我们刚才为更新包生成的数字签名</p>
<p>url=&#8220;<span style="text-decoration: underline;"><a href="http://10.0.1.2/%7Ebuick/TestSparkle_1.1.zip">http://10.0.1.2/~buick/TestSparkle_1.1.zip</a></span>&#8221; 指向更新包下载地址</p>
<p>length=&#8220;436264&#8221; 指更新包的大小，上传上去前用 终端 ls -al 命令可查看</p>
<p>type=&#8220;application/octet-stream&#8221; 是一个想对固定的值，一般不用修改。</p>
<p>现在把testsparkleappcast.xml 和 TestSparkle_1.1.zip 拷贝到</p>
<p>你的用户主目录/Sites 下 (~/Sites,具体路径依你个人配置而定)</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401350-21.png" alt="wpid-wpid-path-2010-09-10-16-11-2010-09-10-16-11.png" height="352" width="543" /><br />
然后在浏览器敲入 <span style="text-decoration: underline;"><a href="http://10.0.1.2/%7Ebuick/testsparkleappcast.xml">http://10.0.1.2/~buick/testsparkleappcast.xml</a></span></p>
<p>如果能够看到类似网页，，，说明一切正常。</p>
<p>下面找到我们刚才保存的TestSparkle.app 1.0版本，运行并点击 Check for Updates&#8230; 如果一切正常，你可以看到</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321401116-22.png" alt="wpid-update1-2010-09-10-16-11.png" height="383" width="543" /></p>
<p>点击Install Update，如果更新成功，即可显示：</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/132140DG-23.png" alt="wpid-complee-2010-09-10-16-11.png" height="209" width="464" /></p>
<p>然后再次点击Check for Updates, 你会看到</p>
<p><img src="http://www.cocoachina.com/cms/uploads/allimg/100920/1321406312-24.png" alt="wpid-latest-2010-09-10-16-11.png" height="217" width="467" /></p>
<p>最后希望你与Sparkle合作愉快。</p>
<p><span style="text-decoration: underline;"><a href="https://files.me.com/buickwang555/rq9k37">点击此处下载本次工程源代码和示例XML Feed文件，另外，安装包里面还带有一个Sparkle的简体中文包，将它放入你的Sparkle.framework/Resources下即可。</a></span></p></div><img src ="http://www.cppblog.com/lauer3912/aggbug/197767.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-02-07 14:14 <a href="http://www.cppblog.com/lauer3912/archive/2013/02/07/197767.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>IOS - 文字色彩</title><link>http://www.cppblog.com/lauer3912/archive/2013/02/05/197743.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Tue, 05 Feb 2013 07:24:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/02/05/197743.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197743.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/02/05/197743.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197743.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197743.html</trackback:ping><description><![CDATA[<div style="margin: 0px; padding-top: 20px; padding-right: 10px; padding-bottom: 20px; word-wrap: break-word; word-break: normal; font-family: 宋体; font-size: 12px; line-height: 24px; background-color: #ffffff;"><div id="article_content" style="margin: 0px;"><p>文字色彩</p><p>可以用一个UIColor对象来定义文字的色彩。UIColor这个类提供了许多不同的方法，可以很轻松地调出任何颜色。你可以用静态方法来创建 颜色，这样它们会在停止使用后被释放。可以用灰度值、色相或者RGB复合值等多种形式来创建颜色。要创建一个简单的RGB色彩，可以指定一组4个浮点值， 分别对应红、绿、蓝和alpha值（透明度），取值均在0.0～1.0之间。这些值表示了0%（0.0）～100%（1.0）的范围：</p><ol style="margin: 0px; padding: 0px; list-style: none;"><li style="margin: 0px; padding: 0px;">UIColor&nbsp;*myWhiteTransparentColor&nbsp;=&nbsp;[&nbsp;UIColor&nbsp;<br />colorWithWhite:&nbsp;1.0&nbsp;alpha:&nbsp;0.50&nbsp;]; &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;</li><li style="margin: 0px; padding: 0px;">UIColor&nbsp;*myColorHue&nbsp;=&nbsp;[&nbsp;UIColor&nbsp;colorWithHue:&nbsp;120.0&nbsp;/&nbsp;360.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;saturation:&nbsp;0.75 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;brightness:&nbsp;0.50 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alpha:&nbsp;1.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">]; &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;</li><li style="margin: 0px; padding: 0px;">UIColor&nbsp;*myColorRGB&nbsp;=&nbsp;[&nbsp;UIColor&nbsp;colorWithRed:&nbsp;0.75 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;green:&nbsp;1.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blue:&nbsp;0.75 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alpha:&nbsp;1.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">];&nbsp;</li></ol><p>如果你打算重用许多不同的UIColor对象，你也可以创建它们的实例：</p><ol style="margin: 0px; padding: 0px; list-style: none;"><li style="margin: 0px; padding: 0px;">UIColor&nbsp;*myWhiteTransparentColor&nbsp;=&nbsp;[&nbsp;[&nbsp;UIColor&nbsp;alloc&nbsp;] &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initWithWhite:&nbsp;1.0&nbsp;alpha:&nbsp;0.50 &nbsp;</li><li style="margin: 0px; padding: 0px;">]; &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;</li><li style="margin: 0px; padding: 0px;">UIColor&nbsp;*myColorHue&nbsp;=&nbsp;[&nbsp;[&nbsp;UIColor&nbsp;alloc&nbsp;] &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initWithHue:&nbsp;120.0&nbsp;/&nbsp;360.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;saturation:&nbsp;0.75 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;brightness:&nbsp;0.50 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alpha:&nbsp;1.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">]; &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;</li><li style="margin: 0px; padding: 0px;">UIColor&nbsp;*myColorRGB&nbsp;=&nbsp;[&nbsp;[&nbsp;UIColor&nbsp;alloc&nbsp;]&nbsp;initWithRed:&nbsp;0.75 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;green:&nbsp;1.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blue:&nbsp;0.75 &nbsp;</li><li style="margin: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alpha:&nbsp;1.0 &nbsp;</li><li style="margin: 0px; padding: 0px;">];&nbsp;</li></ol><p>UIColor类还支持许多静态方法，可以创建系统颜色，这些颜色都经过iPhone的校正，以达到尽可能准确的地步。这些方法如下所示，均来自UIColor.h：</p><ol style="margin: 0px; padding: 0px; list-style: none;"><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)blackColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.0&nbsp;白色 &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)darkGrayColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.333&nbsp;白色 &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)lightGrayColor;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.667&nbsp;白色 &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)whiteColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;1.0&nbsp;白色 &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)grayColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.5&nbsp;白色 &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)redColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;1.0,&nbsp;0.0,&nbsp;0.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)greenColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.0,&nbsp;1.0,&nbsp;0.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)blueColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.0,&nbsp;0.0,&nbsp;1.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)cyanColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.0,&nbsp;1.0,&nbsp;1.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)yellowColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;1.0,&nbsp;1.0,&nbsp;0.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)magentaColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;1.0,&nbsp;0.0,&nbsp;1.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)orangeColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;1.0,&nbsp;0.5,&nbsp;0.0&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)purpleColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.5,&nbsp;0.0,&nbsp;0.5&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)brownColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.6,&nbsp;0.4,&nbsp;0.2&nbsp;RGB &nbsp;</li><li style="margin: 0px; padding: 0px;">+&nbsp;(UIColor&nbsp;*)clearColor;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;0.0&nbsp;白色,&nbsp;0.0&nbsp;alpha&nbsp;</li></ol><p>创建好UIColor对象之后，就可以将其赋给文本视图的色彩属性了：</p>textView.textColor&nbsp;=&nbsp;myColorHue;&nbsp;</div><div></div></div><img src ="http://www.cppblog.com/lauer3912/aggbug/197743.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-02-05 15:24 <a href="http://www.cppblog.com/lauer3912/archive/2013/02/05/197743.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Xcode: split a NSString into NSArray</title><link>http://www.cppblog.com/lauer3912/archive/2013/02/04/197708.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Mon, 04 Feb 2013 06:22:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/02/04/197708.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197708.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/02/04/197708.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197708.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197708.html</trackback:ping><description><![CDATA[NSString *str = @"011597464952,01521545545,454545474,454545444|Hello this is were the message is."; <br /> <br />NSArray *firstSplit = [str componentsSeparatedByString:@"|"]; <br />NSAssert(firstSplit.count == 2, @"Oops! Parsed string had more than one |, no message or no numbers."); <br />NSString *msg = [firstSplit lastObject]; <br />NSArray *numbers = [[firstSplit objectAtIndex:0] componentsSepratedByString:@","]; <br /> <br />// print out the numbers (as strings) <br />for(NSString *currentNumberString in number) { <br />  NSLog(@"Number: %@", currentNumberString); <br />}&nbsp;<img src ="http://www.cppblog.com/lauer3912/aggbug/197708.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-02-04 14:22 <a href="http://www.cppblog.com/lauer3912/archive/2013/02/04/197708.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iOS中plist的创建，数据写入与读取</title><link>http://www.cppblog.com/lauer3912/archive/2013/02/04/197707.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Mon, 04 Feb 2013 05:49:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/02/04/197707.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197707.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/02/04/197707.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197707.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197707.html</trackback:ping><description><![CDATA[<p style="margin: 0px; padding: 0px; color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">功能创建一个test.plist文件，textInput作为输入，displayLabel作为显示，有一个按钮来触发保持程序triggerStorage；</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">-(void)triggerStorage<br />{<br />&nbsp;&nbsp;&nbsp; displayLabel.text = textInput.text;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);<br />&nbsp;&nbsp;&nbsp; NSString *path=[paths&nbsp;&nbsp;&nbsp; objectAtIndex:0];&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; NSString *filename=[path stringByAppendingPathComponent:@"test.plist"];&nbsp;&nbsp; //获取路径<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; NSDictionary* dic2 = [NSDictionary dictionaryWithContentsOfFile:filename];&nbsp; //读取数据<br />&nbsp;&nbsp;&nbsp; NSLog(@"dic2 is:%@",dic2);&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; //创建一个dic，写到plist文件里<br />&nbsp;&nbsp;&nbsp; NSDictionary* dic = [NSDictionary dictionaryWithObjectsAndKeys:displayLabel.text,@"IP",nil]; //写入数据<br />&nbsp;&nbsp;&nbsp; [dic writeToFile:filename atomically:YES];&nbsp;&nbsp;&nbsp;<br /><br />}<br /><br />// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.<br />- (void)viewDidLoad<br />{<br />&nbsp;&nbsp;&nbsp; NSMutableArray *resultData;&nbsp;<br />&nbsp;&nbsp;&nbsp; NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);<br />&nbsp;&nbsp;&nbsp; NSString *path=[paths objectAtIndex:0];<br />&nbsp;&nbsp;&nbsp; NSLog(@"path = %@",path);&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; NSString *filename=[path stringByAppendingPathComponent:@"test.plist"];&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; //读文件<br />&nbsp;&nbsp;&nbsp; NSDictionary* dic2 = [NSDictionary dictionaryWithContentsOfFile:filename];<br />&nbsp;&nbsp;&nbsp; NSLog(@"dic is:%@",dic2);&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; if(dic2 == nil)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //1. 创建一个plist文件&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NSFileManager* fm = [NSFileManager defaultManager];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [fm createFileAtPath:filename contents:nil attributes:nil];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultData=[dic2 objectForKey:@"IP"];&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if([dic2 count] &gt; 0)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayLabel.text = resultData;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayLabel.text = @" ";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]&nbsp;&nbsp; //按钮的初始化及触发条件设置<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initWithTitle:@"保存"&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style:UIBarButtonItemStylePlain&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; target:self&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; action:@selector(triggerStorage)] autorelease];&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp; [super viewDidLoad];<br />}</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">------------------------------------------------------------------------------------------------------------------------------------------------------------</p><p style="margin: 0px; padding: 0px; color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">参考代码：</p><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">plist&nbsp;文件读写</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;//1.&nbsp;创建一个plist文件</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSArray&nbsp;*paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSString&nbsp;*path=[paths&nbsp;&nbsp;&nbsp;&nbsp;objectAtIndex:0];</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSLog(@"path&nbsp;=&nbsp;%@",path);</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSString&nbsp;*filename=[path&nbsp;stringByAppendingPathComponent:@"test.plist"];&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSFileManager*&nbsp;fm&nbsp;=&nbsp;[NSFileManager&nbsp;defaultManager];</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;[fm&nbsp;createFileAtPath:filename&nbsp;contents:nil&nbsp;attributes:nil];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;//NSDictionary*&nbsp;dic&nbsp;=&nbsp;[NSDictionary&nbsp;dictionaryWithContentsOfFile:plistPath];</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;//创建一个dic，写到plist文件里</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSDictionary*&nbsp;dic&nbsp;=&nbsp;[NSDictionary&nbsp;dictionaryWithObjectsAndKeys:@"sina",@"1",@"163",@"2",nil];</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;[dic&nbsp;writeToFile:filename&nbsp;atomically:YES];</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;//读文件</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSDictionary*&nbsp;dic2&nbsp;=&nbsp;[NSDictionary&nbsp;dictionaryWithContentsOfFile:filename];</span><br style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;" /><p style="margin: 0px; padding: 0px; color: #454545; font-family: tahoma, helvetica, arial; font-size: 12px; line-height: 24px; background-color: #fcf8e9;">&nbsp;&nbsp;&nbsp;&nbsp;NSLog(@"dic&nbsp;is:%@",dic2);</p><img src ="http://www.cppblog.com/lauer3912/aggbug/197707.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-02-04 13:49 <a href="http://www.cppblog.com/lauer3912/archive/2013/02/04/197707.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Parse .strings file with Python</title><link>http://www.cppblog.com/lauer3912/archive/2013/01/08/197108.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Tue, 08 Jan 2013 05:44:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/01/08/197108.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197108.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/01/08/197108.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197108.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197108.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Parse .strings file with PythonParse .strings file with Pythonup vote1down votefavoriteI'm trying to write a small Python script to parse the .strings file in my iPhone application project and determi...&nbsp;&nbsp;<a href='http://www.cppblog.com/lauer3912/archive/2013/01/08/197108.html'>阅读全文</a><img src ="http://www.cppblog.com/lauer3912/aggbug/197108.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-01-08 13:44 <a href="http://www.cppblog.com/lauer3912/archive/2013/01/08/197108.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Cocoa中检查文件目录是否有权限的方法</title><link>http://www.cppblog.com/lauer3912/archive/2013/01/07/197091.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Mon, 07 Jan 2013 15:24:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/01/07/197091.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197091.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/01/07/197091.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197091.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197091.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">cocoa中虽然有[[NSFileManager defaultManager] fileExistsAtPath:filename]来检查文件是否可写的方法，但是对文件目录却不起作用，没办法只好自己写一个比较山寨的方法：</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">bool IsDirectoryWritable(NSString *dir)<br />{<br />&nbsp;&nbsp;&nbsp; bool result = false;<br />&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp;&nbsp; if(![[NSFileManager defaultManager] fileExistsAtPath:dir])<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return result;<br />&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp;&nbsp; NSString* fileName = [dir stringByAppendingFormat:@"/&nbsp; _#t.txt"];<br />&nbsp;&nbsp;&nbsp; NSData *data = [fileName dataUsingEncoding:NSUTF8StringEncoding];<br />&nbsp;&nbsp;&nbsp; [data writeToFile:fileName atomically:NO];<br />&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp;&nbsp; result = [[NSFileManager defaultManager] fileExistsAtPath:fileName];<br />&nbsp;&nbsp;&nbsp; if(result)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[NSFileManager defaultManager] removeItemAtPath:fileName error:NULL];<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp;&nbsp; return true;<br />}<br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">这个方法的不好之处就是有可能用于尝试的fileName可能已经存在(虽然已经起的很奇怪了<img alt="快哭了" src="http://static.blog.csdn.net/xheditor/xheditor_emot/default/fastcry.gif" style="border: none;" />)，这样会导致返回结果不准确，也有可能测试文件创建成功了但是删除却失败了，那么也会导致下次测试不准确,。如果哪位高人有更好的办法，麻烦指教。</p><img src ="http://www.cppblog.com/lauer3912/aggbug/197091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-01-07 23:24 <a href="http://www.cppblog.com/lauer3912/archive/2013/01/07/197091.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Cocoa中打开文件和文件夹的方法</title><link>http://www.cppblog.com/lauer3912/archive/2013/01/07/197090.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Mon, 07 Jan 2013 15:23:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2013/01/07/197090.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/197090.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2013/01/07/197090.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/197090.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/197090.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">很多程序有这样的功能，双击某个图片可以打开源文件，右键菜单中的Show in Finder功能，Cocoa中对这块支持较好，有现成的方法：</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">[[NSWorkspace sharedWorkspace] openFile:fileName];</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">[[NSWorkspace sharedWorkspace] selectFile:fileName inFileViewerRootedAtPath:path];&nbsp; // 如果只打开目录不需要选中具体文件，fileName可为nil。</p><img src ="http://www.cppblog.com/lauer3912/aggbug/197090.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2013-01-07 23:23 <a href="http://www.cppblog.com/lauer3912/archive/2013/01/07/197090.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>xcode4的环境变量，Build Settings参数，workspace及联编设置</title><link>http://www.cppblog.com/lauer3912/archive/2012/11/28/195770.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Wed, 28 Nov 2012 08:51:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/11/28/195770.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/195770.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/11/28/195770.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/195770.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/195770.html</trackback:ping><description><![CDATA[<h1> 			<a id="cb_post_title_url" href="http://www.cnblogs.com/xiaodao/archive/2012/03/28/2422091.html">xcode4的环境变量，Build Settings参数，workspace及联编设置</a> 		</h1> 		 		 			<div id="cnblogs_post_body"><p>一、xcode4中的环境变量</p> <div> <pre><span style="color: #ff0000;">$(BUILT_PRODUCTS_DIR)</span></pre> </div> <p>build成功后的，最终产品路径－－可以在Build Settings参数的Per-configuration Build Products Path项里设置</p> <div> <pre><span style="color: #ff0000;">$(TARGET_NAME)</span></pre> </div> <p>目标工程名称</p> <div> <pre><span style="color: #ff0000;">$(SRCROOT)</span></pre> </div> <p>工程文件（比如Nuno.xcodeproj）的路径&nbsp;</p> <div> <pre><span style="color: #ff0000;">$(CURRENT_PROJECT_VERSION)</span></pre> </div> <p>当前工程版本号</p> <p>&nbsp;</p> <p>其他：</p> <p>当编译静态库，设备选模拟器(iPhone 5.0 Simulator)，未设置任何Build Settings参数时，默认的基础路径：</p> <p>/Users/xxx/Library/Developer/Xcode/DerivedData/xxxWorkspace-caepeadwrerdcrftijaolkkagbjf</p> <p>下面用$()代替上面一长串东东</p> <p>$(SYMROOT) = $()/Build/Products</p> <p>$(BUILD_DIR) = $()/Build/Products</p> <p>$(BUILD_ROOT) = &nbsp;$()/Build/Products</p> <p>这三个变量中的$()不会随着Build Settings参数的设置而改变</p> <p>相反，以下可以通过设置而改变</p> <p>$(CONFIGURATION_BUILD_DIR) = $()/Build/Products/Debug-iphonesimulator</p> <p>$(BUILT_PRODUCTS_DIR) = $()/Build/Products/Debug-iphonesimulator</p> <p>$(CONFIGURATION_TEMP_DIR) = $()/Build/Intermediates/UtilLib.build/Debug-iphonesimulator</p> <p>$(TARGET_BUILD_DIR) = $()/Build/Products/Debug-iphonesimulator</p> <p>$(SDK_NAME) = iphonesimulator5.0</p> <p>$(PLATFORM_NAME) = iphonesimulator</p> <p>$(CONFIGURATION) = Debug</p> <p>$(TARGET_NAME) = UtilLib</p> <p>$(EXECUTABLE_NAME) = libUtilLib.a 可执行文件名</p> <p>${IPHONEOS_DEPLOYMENT_TARGET} 5.0</p> <p>$(ACTION) = build</p> <p>$(CURRENTCONFIG_SIMULATOR_DIR) 当前模拟器路径&nbsp;</p> <p>$(CURRENTCONFIG_DEVICE_DIR) 当前设备路径&nbsp;</p> <p>&nbsp;</p> <p>$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME =</p> <p>$()/Build/Products/Debug-iphonesimulator</p> <p>$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) = $()/Build/Intermediates/UtilLib.build/Debug-iphonesimulator</p> <p>&nbsp;</p> <p>自定义变量</p> <p>${CONFIGURATION}-iphoneos 表示：Debug-iphoneos</p> <p>${CONFIGURATION}-iphonesimulator&nbsp;表示：Debug-iphonesimulator</p> <p>$(CURRENTCONFIG_DEVICE_DIR) = ${SYMROOT}/${CONFIGURATION}-iphoneos</p> <p>$(CURRENTCONFIG_SIMULATOR_DIR) = ${SYMROOT}/${CONFIGURATION}-iphonesimulator</p> <p>自定义一个设备无关的路径（用来存放各种架构arm6/arm7/i386输出的产品）</p> <p>$(CREATING_UNIVERSAL_DIR) = ${SYMROOT}/${CONFIGURATION}-universal</p> <p>自定义变量代表的值</p> <p>$(CURRENTCONFIG_DEVICE_DIR) ＝ $()/Build/Products/Debug-iphoneos</p> <p>$(CURRENTCONFIG_SIMULATOR_DIR) =&nbsp;$()/Build/Products/Debug-iphonesimulator</p> <p>$(CREATING_UNIVERSAL_DIR) =&nbsp;$()/Build/Products/Debug-universal</p> <p>&nbsp;</p> <p>iphoneos5.0下的编译脚本：</p> <p>xcodebuild -project "UtilLib.xcodeproj"&nbsp;-configuration "Debug" -target "UtilLib" -sdk "<span style="color: #ff0000;">iphoneos5.0</span>" -arch "<span style="color: #ff0000;">armv6 armv7</span>" build RUN_CLANG_STATIC_ANALYZER=NO &nbsp;$(BUILD_DIR)="${BUILD_DIR}"&nbsp;BUILD_ROOT="${BUILD_ROOT}"</p> <p>&nbsp;</p> <p>iphonesimulator5.0下的编译脚本：</p> <p>xcodebuild -project "UtilLib.xcodeproj"&nbsp;-configuration "Debug" -target "UtilLib" -sdk "<span style="color: #ff0000;">iphonesimulator5.0</span>" -arch "<span style="color: #ff0000;">i386</span>" build RUN_CLANG_STATIC_ANALYZER=NO&nbsp;$(BUILD_DIR)="${BUILD_DIR}"&nbsp;&nbsp;BUILD_ROOT="${BUILD_ROOT}"</p> <p>加上下面一句表示输出到文件：</p> <p>&gt; "${BUILD_ROOT}.build_output"</p> <p>&nbsp;</p> <p><span style="color: #ff0000;">lipo脚本工具</span>：合并iPhone模拟器和真机的静态类库，生成通用库</p> <p>lipo -create -output&nbsp;"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}"  "${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}" &nbsp; &nbsp; &nbsp;  &nbsp;&nbsp;"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}"</p> <p>意思是：把"${CURRENTCONFIG_DEVICE_DIR}目录下的.a文件，和${CURRENTCONFIG_SIMULATOR_DIR}目录下的.a文件合并，</p> <p>在${CREATING_UNIVERSAL_DIR}目录下，生成两个设备都通用的静态库,</p> <p>例如：lipo -create -output xy.a x.a y.a</p> <p>&nbsp;</p> <p>二、xcode4中build Settings常见参数解析</p> <p><span style="color: #ff0000;">1.Installation Directory</span>：安装路径</p> <p>静态库编译时，在Build Settings中Installation Directory设置&#8220;$(BUILT_PRODUCTS_DIR)&#8221;</p> <p>Skip Install设为YES</p> <p><span style="color: #808080;">Installation Directory默认为/usr/local/lib</span></p> <p><span style="color: #808080;">因为Build Location默认时，.a文件会放在很长（比如：/Users/xxx/Library/Developer/Xcode/DerivedData/xxxProgram</span></p> <p><span style="color: #808080;">dalrvzehhtesxdfqhxixzafvddwe/Build/Products/Debug-iPhoneos）的路径下，或是我们target指定的路径</span></p> <p><span style="color: #808080;">Skip Install如果是NO,可能会被安装到默认路径/usr/local/lib</span></p> <p><span style="color: #000000;"><span style="color: #ff0000;">2.Public Headers Folder Path</span>：对外公开头文件路径</span></p> <p>设为&#8220;include&#8221;（具体的头文件路径为：$(BUILT_PRODUCTS_DIR)/include/xx.h）</p> <p>在最终文件.a同级目录下生成一个include目录</p> <p><span style="color: #808080;">默认：/usr/local/include</span></p> <p><span style="color: #808080;">Public Headers Folder Path这个路径就是使用这lib的某工程需要依赖的外部头文件.导入这路径后，#include/import "xx.h"才能看到</span></p> <p><span style="color: #000000;"><span style="color: #ff0000;">3.User Header Search Paths</span>：依赖的外部头文件搜索路径</span></p> <p><span style="color: #000000;">设置为&#8220;$(BUILT_PRODUCTS_DIR)/include&#8221;</span></p> <p><span style="color: #808080;">和2中路径对应</span></p> <p><span data-mce-=""><span data-mce-=""><span style="color: #ff0000;">4.Per-configuration Build Products Path</span><span data-mce-="">：最终文件路径</span></span></span></p> <p>比如设为&#8220;../app&#8221;，就会在工程文件.xcodeproj上一层目录下的app目录里，创建最终文件</p> <p><span data-mce-="">默认为$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)</span>&nbsp;</p> <p><span data-mce-="">等于$(BUILT_PRODUCTS_DIR)</span></p> <p><span style="color: #ff0000;">5.Per-configuration Intermediate Build Files Path</span>：临时中间文件路径</p> <p>默认为：$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)</p> <p><span style="color: #000000;"><span style="color: #ff0000;">6.Code Signing Identity</span>：真机调试的证书选择</span></p> <p><span style="color: #000000;">选一个和Bundle identifier相对应的证书</span></p> <p><span style="color: #ff0000;">Library Search Paths</span>：库搜索路径</p> <p><span style="color: #ff0000;">Architectures</span>：架构，设为 armv6 或 armv7</p> <p><span style="color: #ff0000;">Valid&nbsp;</span><span style="color: #ff0000;">Architectures：应用框架，可以设为&nbsp;armv6、</span>&nbsp;armv7 或i386</p> <p><span style="color: #ff0000;">Product Name</span>:工程文件名，默认为$(TARGET_NAME)</p> <p><span style="color: #000000;"><span style="color: #ff0000;">Info.plist File：</span>info文件路径</span></p> <p><span style="color: #ff0000;">Build Variants</span>：默认为normal</p> <p><span style="color: #000000;"><span style="color: #ff0000;">Other Linker Flags</span>：其他链接标签</span></p> <p>设为&#8220;-ObjC&#8221;</p> <p><span style="color: #808080;">当导入的静态库使用了类别，需要设为-ObjC</span></p> <p><span style="color: #808080;"><span style="color: #ff0000;">iOS Deployment Target<span style="color: #000000;"><span data-mce-=""><span data-mce-="">：ios</span>部署对象</span></span></span></span></p> <p><span style="color: #808080;"><span style="color: #ff0000;"><span style="color: #000000;"><span data-mce-="">比如可以选择设为，ios3到ios5的一种版本</span></span></span></span></p> <p><span style="color: #000000;"><span style="color: #ff0000;">Prefix Header</span>：预编头文件（</span>比如：UtilLib/UtilLib-Prefix.pch）</p> <p><span style="color: #ff0000;">Precompile&nbsp;Prefix Header</span>：设为&#8220;Yes&#8221;，表示允许加入预编译头</p> <p>&nbsp;</p> <p>三、workspace（工作区）</p> <p>作用：管理多个工程（project），多工程联编</p> <p>&nbsp;</p> <p>四、workspace多工程联编设置</p> <p>一、</p> <p>1.新建一个静态库工程，比如UtilLib，并生成UtilLib.h和UtilLib.m文件</p> <p>2.选中需要公开的头文件，</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032821514514.png" alt="" /></p> <p>把右侧栏的Target Membership中设置为public</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032821520658.png" alt="" /></p> <p>或则，选中工程目录target的Build Phases标签的copy headers项，在public中添加要公开的头文件</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032822023943.png" alt="" /></p> <p>3.<span data-mce-="">Architectures</span>设为：armv6 armv7</p> <p>4.<span data-mce-="">Valid&nbsp;</span><span data-mce-="">Architectures设为</span>：armv6 armv7 i386</p> <p>5.Build Products Path设为：$(SRCROOT)/../build</p> <p>6.<span data-mce-="">Per-configuration Build Products Path设为：</span></p> <p><span data-mce-="">$(SRCROOT)/../build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)</span></p> <p><span data-mce-="">7.Per-configuration Intermediate Build Files Path设为：</span></p> <p><span data-mce-="">$(SRCROOT)/../build/$(TARGET_NAME).build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)</span></p> <p>8.设置安装路径：Installation Directory项</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032822444226.png" alt="" /></p> <p>9.设置对外公开的头文件路径：Public Headers Folder Path项</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032823052996.png" alt="" /></p> <p><span data-mce-=""><br /></span></p> <p><span style="color: #ff0000;">10.为静态库添加依赖的shell脚本</span></p> <p>选中工程目录target的Build Phases标签，点击由下角的Add Build Phase按钮</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012033001445848.png" alt="" /></p> <p>在弹出的菜单里选择Add run script项，然后页面中会多出一个Run Script项</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012033001465346.png" alt="" /></p> <p>在黑框里填写"$SRCROOT/mergeArmSymbols.sh"</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012033001492012.png" alt="" /></p> <p>建立对此脚本的依赖（编译静态库的后会运行此脚本）</p> <p>如果编译时设备选的是iphone simulator：</p> <p>则此脚本会在对应iphone device的产品目录Debug-iphoneos中，生成对device有用的.a静态库，</p> <p>相反，如果设备选的是iphone&nbsp;device：</p> <p>则此脚本会在对应iphone simulator的产品目录Debug-iphoneos中，生成对simulator有用的.a静态库</p> <p>最后，此脚本调用<span style="color: #ff0000;">lipo工具，</span>把本工程生成静态库与此脚本生成的静态库合并，生成simulator和device都通用的.a文件</p> <p>&nbsp;</p> <p>11.<span style="color: #ff0000;">具体bash shell脚本如下</span>：</p> <div><img id="code_img_closed_27ad3a54-4ce7-402f-a5c8-c7548fe825c8" src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif" alt="" />mergeArmSymbols.sh  </div> <p>下载右边的图片<img src="http://pic002.cnblogs.com/images/2012/373740/2012040300261146.jpg" alt="" />，然后把后缀改为.sh（其实就是上面的脚本，因为博客园只能上传图片)</p> <p>静态库编译后的目录结构如下：</p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012040300174762.png" alt="" /></p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012040300180494.png" alt="" /></p> <p>&nbsp;</p> <p>二、&nbsp;</p> <p>1.新建主工程，比如Nuno，添加对静态库的依赖</p> <p>点击工程，在Build Phases标签的<span>Link Binary With Libraries项中点击加号添加UtilLib.a库</span></p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032823190886.png" alt="" /></p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032823194638.png" alt="" /></p> <p><img src="http://pic002.cnblogs.com/images/2012/373740/2012032823200838.png" alt="" /></p> <p>选中上面的红色项，在右边栏的Location选Relative to Project，把值设为../libs/libUtilLib.a</p> <p>2.设置主工程依赖的外部头文件路径：User Header Search Paths项</p> <p>$(SRCROOT)/../include</p> <p>3.设置Header Search Paths为：$(SRCROOT)/../include</p> <p>4.设置Library Search Paths为：$(SRCROOT)/../libs</p> <p>编译运行即可实现联编&nbsp;</p> <p>&nbsp;</p> <p>(备注：选择模拟器iphone 5.0&nbsp;simulator，编译静态库的时，最终文件会在Debug-iphonesimulator，就算成功.a文件还是红色，</p> <p>这是可能是xcode的bug，不会自动切换路径</p> <p>因为$(BUILT_PRODUCTS_DIR)所指的位置，是build/Debug-iphonesos,不是包含最终.a文件的Debug-iphonesimulator；</p> <p>选择ios Device，编译成的最终文件才在build/Debug-iphonesos下，.a文件变成非红色</p> <p>所有得用mergeArmSymbols.sh脚本来解决）</p> <p><br /></p></div><img src ="http://www.cppblog.com/lauer3912/aggbug/195770.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-11-28 16:51 <a href="http://www.cppblog.com/lauer3912/archive/2012/11/28/195770.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>UIBarButtonSystemItem的样式图片(转)</title><link>http://www.cppblog.com/lauer3912/archive/2012/11/26/195698.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Mon, 26 Nov 2012 06:16:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/11/26/195698.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/195698.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/11/26/195698.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/195698.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/195698.html</trackback:ping><description><![CDATA[<h2>
			<a id="cb_post_title_url" href="http://www.cnblogs.com/KidReborn/archive/2010/11/20/1882346.html">UIBarButtonSystemItem的样式图片</a>
		</h2>
		<div id="cnblogs_post_body"><p>&nbsp;</p>
<div class="cnblogs_Highlighter">
<pre class="brush:objc">typedef enum {
    UIBarButtonSystemItemDone,
    UIBarButtonSystemItemCancel,
    UIBarButtonSystemItemEdit,  
    UIBarButtonSystemItemSave,  
    UIBarButtonSystemItemAdd,
    UIBarButtonSystemItemFlexibleSpace,
    UIBarButtonSystemItemFixedSpace,
    UIBarButtonSystemItemCompose,
    UIBarButtonSystemItemReply,
    UIBarButtonSystemItemAction,
    UIBarButtonSystemItemOrganize,
    UIBarButtonSystemItemBookmarks,
    UIBarButtonSystemItemSearch,
    UIBarButtonSystemItemRefresh,
    UIBarButtonSystemItemStop,
    UIBarButtonSystemItemCamera,
    UIBarButtonSystemItemTrash,
    UIBarButtonSystemItemPlay,
    UIBarButtonSystemItemPause,
    UIBarButtonSystemItemRewind,
    UIBarButtonSystemItemFastForward,
#if __IPHONE_3_0 &lt;= __IPHONE_OS_VERSION_MAX_ALLOWED
    UIBarButtonSystemItemUndo,
    UIBarButtonSystemItemRedo,
#endif
#if __IPHONE_4_0 &lt;= __IPHONE_OS_VERSION_MAX_ALLOWED
    UIBarButtonSystemItemPageCurl,
#endif
} UIBarButtonSystemItem;
</pre>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>图片如下:</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112005564010.png" alt="" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; white-space: pre;">UIBarButtonSystemItemAdd</span></p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 13px; line-height: 19px; white-space: pre;"><img src="http://pic002.cnblogs.com/images/2010/144660/2010112005571910.png" alt="" />UIBarButtonSystemItemCompose</span></span></p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 13px; line-height: 19px; white-space: pre;"><img src="http://pic002.cnblogs.com/images/2010/144660/2010112005575462.png" alt="" />UIBarButtonSystemItemReply</span></span></p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 13px; line-height: 19px; white-space: pre;"><img src="http://pic002.cnblogs.com/images/2010/144660/2010112005592695.png" alt="" />UIBarButtonSystemItemAction</span></span></p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="font-size: 13px; line-height: 19px; white-space: pre;"><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006002674.png" alt="" /><span style="font-family: verdana, 'courier new'; font-size: 14px; line-height: 21px; white-space: normal;">UIBarButtonSystemItemOrganize</span></span></span></p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006013193.png" alt="" />UIBarButtonSystemItemBookmarks</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006025240.png" alt="" />UIBarButtonSystemItemSearch</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006034047.png" alt="" />UIBarButtonSystemItemRefresh</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006045045.png" alt="" />UIBarButtonSystemItemStop</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006055147.png" alt="" />UIBarButtonSystemItemCamera</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006065720.png" alt="" />UIBarButtonSystemItemTrash</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006082576.png" alt="" />UIBarButtonSystemItemPlay</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006092415.png" alt="" />UIBarButtonSystemItemPause</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006101060.png" alt="" />UIBarButtonSystemItemRewind</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006105911.png" alt="" />UIBarButtonSystemItemFastForward</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006121056.png" alt="" />UIBarButtonSystemItemUndo</p>
<p><img src="http://pic002.cnblogs.com/images/2010/144660/2010112006130059.png" alt="" />UIBarButtonSystemItemRedo</p></div><div id="MySignature">天下风云出我辈, 一入江湖岁月催. 皇图霸业笑谈中, 不胜人生一场醉.
</div><img src ="http://www.cppblog.com/lauer3912/aggbug/195698.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-11-26 14:16 <a href="http://www.cppblog.com/lauer3912/archive/2012/11/26/195698.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>由init、loadView、viewDidLoad、viewDidUnload、dealloc的关系说起 (转载)</title><link>http://www.cppblog.com/lauer3912/archive/2012/11/23/195588.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Fri, 23 Nov 2012 02:41:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/11/23/195588.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/195588.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/11/23/195588.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/195588.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/195588.html</trackback:ping><description><![CDATA[原文：http://blog.csdn.net/weiqubo/article/details/8152326<br /><br />
    <h3>
        <span class="link_title"><a href="http://blog.csdn.net/weiqubo/article/details/8152326">
        由init、loadView、viewDidLoad、viewDidUnload、dealloc的关系说起
        </a></span>
    </h3>


        
    <div class="article_manage">
        <span class="link_categories">
        分类：
            <a href="http://blog.csdn.net/weiqubo/article/category/1087781">iOS</a> 
        </span>
    <span class="link_postdate">2012-11-06 12:20</span>
    <span class="link_view" title="阅读次数">273人阅读</span>
    <span class="link_comments" title="评论次数"><a href="http://blog.csdn.net/weiqubo/article/details/8152326#comments">评论</a>(0)</span>
    <span class="link_collect"><a title="收藏">收藏</a></span>
    <span class="link_report"><a href="http://blog.csdn.net/weiqubo/article/details/8152326#report" title="举报">举报</a></span>
    
</div>


    


<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
<span style="line-height:19px">对于<span id="rlt_1">iphone开发</span>人员来说，内存管理是极为重要的技巧，哪怕程序的功能再强大，<span id="rlt_8">设计</span>再漂亮，如果内存控制不好，也难逃程序莫名退出的噩运，这与网页<span id="rlt_2">开发</span>是完全不同的。<br />
<br />
内存控制里面有很多门道，在这里分析一下 viewDidUnload 和 dealloc 的区别，关于这两者的区别的文章很多，但是大都是摘抄和翻译官方文档，有的也只是简单的说两句，并没有详细说出两者具体的区别。<br />
<br />
在了解两者之间的区别，首先要知道&nbsp;<span id="rlt_7">view</span>&nbsp;的生命周期，google 里面有很多文章，可以先去搜一下，这里就不详解了。<br />
<br />
顾名思义 &#8200;<strong>viewDidUnload</strong>&nbsp;就是当 view 被卸载以后执行的语句，它与 viewDidLoad 是相互呼应的。大家都知道官方的解释是执行类似</span></p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
&nbsp;</p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
<span style="line-height:19px"><code class="objc keyword">self</code><code class="objc plain">.myOutlet =&nbsp;</code><code class="objc keyword">nil</code><code class="objc plain">;</code></span></p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
&nbsp;</p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
的命令，但是为什么这么干，什么时候调用这个方法呢？<br />
<br />
<span style="line-height:19px">这个方法是不能手动调用的，它实际上是当<span id="rlt_4">应用</span>程序接收到手机内存警告的时候自动调用的方法，目的就是清空内存除当前&nbsp;viewController&nbsp;以外所有已经加载过的&nbsp;viewController 里面的暂时不再<span id="rlt_6">使用</span>的一些控件或数据，以避免应用程序应消耗内存过多被强制关闭。记住，是<strong><span style="color:#ff0000">除当前正在展示的
 view&nbsp;所属&nbsp;viewController 以外所有已经在内存里面的 viewController 执行&nbsp;viewDidUnload 方法</span></strong>，
而不是当前 viewController&nbsp;执行 viewDidUnload，当然，这些 viewController 不会被 
dealloc。所以在 viewDidUnload 里面一般都是释放 IBOutlet 变量和在 
viewDidLoad、viewWillAppear、viewDidAppear 等方法能够重建的数据。而由其他页面传递过来的数据或者无法经过
 viewDidLoad、viewWillAppear、viewDidAppear 等方法重建的数据则不能释放，举例子说如果在 
navigationController 由上一个页面传递过来的一张<span id="rlt_5">图片</span>，在 viewDidUnload 里被释放的话，则当 view 再次加载的时候就无法恢复了。</span><br />
<br />
<span style="line-height:19px">那为什么要写成 self.myOutlet = nil; ，实际上这个语法是执行了
 property 里的setter 方法，而不是一个简单的变量赋值，它干了两件事：1、老数据 
release&nbsp;掉，2、新数据（nil）retain（当 property 设置为 retain 的情况下），当然对 nil retain 
是无意义的。如果写成 myOutlet = nil，那就是简单的把 myOutlet 指向 nil，这样内存就泄漏了，因为老数据没有
 release。而如果仅仅写成&nbsp;[myOutlet release] 也会有<span id="rlt_3">问题</span>，因为当 view&nbsp;被 dealloc 的时候会 再次 release，程序就出错了，而对 nil release 是没有问题的。<br />
&nbsp;<br />
<strong>dealloc</strong>&nbsp;是当前 viewController 被释放的时候，清空所有当前 viewController
 里面的实体和数据来释放内存，该方法也是自动调用的，无需手动执行。举例说明当 modalView 被 
dismissModalViewControllerAnimated 或者 navigationController 
回到上一页的时候，这个方法就会被自动调用。因为这个页面已经不再使用了，所以可以把所有实体和数据都释放（release）掉。<br />
<br />
其实两者最大的区别就是： viewDidUnload 是内存除当前以外所有 viewController 同时执行，而 dealloc 只是当前 viewController 执行。这个是网上的材料没有说明的。<br />
<br />
个人拙见，不对之处还请提正！<br />
<br />
PS: 很多朋友都说无法调试 viewDidUnload，其实是可以的。方法是在 iOS 模拟器的菜单里选 <span style="color:#ff0000">
硬件-&gt;模拟内存警告</span>，这个时候就可以看到 viewDidUnload 里面 NSLog 的东西了，可以试试在打开过的 viewController 里都 NSLog 一下看看效果。而 dealloc 里面可以直接 NSLog。</span></p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
<span style="line-height:19px"><br />
</span></p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
<span style="line-height:19px"><br />
</span></p>
<p style="margin:10px auto; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:13px; line-height:23px">
<span style="line-height:19px"></span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
由init、loadView、viewDidLoad、viewDidUnload、dealloc的关系说起</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong>init方法</strong></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
在init方法中实例化必要的对象（遵从LazyLoad思想）</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
init方法中初始化ViewController本身</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong>&nbsp;loadView方法</strong></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
当view需要被展示而它却是nil时，viewController会调用该方法。不要直接调用该方法。</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<span style="color:#ff0000">如果手工维护views，必须重载重写该方法</span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<span style="color:#ff0000">如果使用IB维护views，必须不能重载重写该方法</span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
loadView和IB构建view</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
你在控制器中实现了loadView方法，那么你可能会在应用运行的某个时候被内存管理控制调用。 如果设备内存不足的时候， view 
控制器会收到didReceiveMemoryWarning的消息。 默认的实现是检查当前控制器的view是否在使用。 
如果它的view不在当前正在使用的view hierarchy里面，且你的控制器实现了loadView方法，那么这个view将被release,
 loadView方法将被再次调用来创建一个新的view。</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong></strong>&nbsp;</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong>viewDidLoad方法</strong></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong><span style="color:#ff0000">viewDidLoad 此方法只有当view从nib文件初始化的时候才被调用。</span><br />
</strong></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
重载重写该方法以进一步定制view</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
在iPhone OS 3.0及之后的版本中，还应该重载重写viewDidUnload来释放对view的任何索引</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
viewDidLoad后调用数据Model</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong>viewDidUnload方法</strong></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<span style="color:#454545">当系统内存吃紧的时候会调用该方法</span><span style="color:#ff0000">（注：viewController没有被dealloc）</span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<span style="color:#454545">内存吃紧时，</span><span style="color:#ff0000">在iPhone OS 3.0之前didReceiveMemoryWarning是释放无用内存的唯一方式，但是OS 3.0及以后viewDidUnload方法是更好的方式</span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
在该方法中将所有IBOutlet（无论是property还是实例变量）置为nil（系统release view时已经将其release掉了）</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
在该方法中释放其他与view有关的对象、其他在运行时创建（但非系统必须）的对象、在viewDidLoad中被创建的对象、缓存数据等 
release对象后，将对象置为nil（IBOutlet只需要将其置为nil，系统release view时已经将其release掉了）</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
一般认为viewDidUnload是viewDidLoad的镜像，因为当view被重新请求时，viewDidLoad还会重新被执行</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
viewDidUnload中被release的对象必须是很容易被重新创建的对象（比如在viewDidLoad或其他方法中创建的对象），不要release用户数据或其他很难被重新创建的对象</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<strong>dealloc方法</strong></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
<span style="color:#ff0000">viewDidUnload和dealloc方法没有关联</span><span style="color:#454545">，dealloc还是继续做它该做的事情</span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
看到以下的代码</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
- (void)viewDidUnload {</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
self.detailViewController = nil;&nbsp;</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
self.languageNames = nil;&nbsp;</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
self.languageCodes = nil;</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
}</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
- (void)dealloc {</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
[detailViewController release];</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
&nbsp;[languageNames release];&nbsp;</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
[languageCodes release];&nbsp;</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
[super dealloc];</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">
}</p>
<br style="color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px" />
<span style="color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">如果是先调用viewDidUnload后再调用dealloc, 那么languageNames都已经是nil了，再掉release有什么意义呢？</span><br style="color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px" />
<span style="color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">原
因似乎是， 对一个viewcontroller来说，它的数据的初始化在init中，而它管理的view采用了lazy 
load的方式，也就是有需要的时候才会载入， 所以跟view相关的数据可以在viewDidLoad（也就是在view被载入的时候）进行初始化。</span><span style="font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px"><span style="color:#ff0000">当内存紧张的时候，
 ios会销毁点一些view， 通过调用viewDidUnload （里面一般也只是把跟view相关的数据设为nil）, 但这个时候viewcontroller本身还在， 所以它的dealloc不会被调用</span></span><span style="color:#454545; font-family:tahoma,Helvetica,arial; font-size:14px; line-height:21px">，除非是到了viewcontroller也被销毁的时候</span><img src ="http://www.cppblog.com/lauer3912/aggbug/195588.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-11-23 10:41 <a href="http://www.cppblog.com/lauer3912/archive/2012/11/23/195588.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>/Library/Frameworks/QtCore.framework/Headers/qglobal.h:68: error: algorithm: No such file or directory</title><link>http://www.cppblog.com/lauer3912/archive/2012/11/07/194823.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Tue, 06 Nov 2012 22:22:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/11/07/194823.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/194823.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/11/07/194823.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/194823.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/194823.html</trackback:ping><description><![CDATA[一般发生在使用最新的XCode。@import url(http://www.cppblog.com/cutesoft_client/cuteeditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
<div><br />
</div>
<div>怎么来解决问题呢，其实</div>
<div><a href="http://qt-project.org/forums/viewthread/11741">http://qt-project.org/forums/viewthread/11741</a>&nbsp;一文中有讲到。</div>
<div><br />
</div>
<div>直接一点，就是在指定Complier的时候，选择Clang，不要选择GCC！</div>
<div><br />
</div>
<div>你可以试试！有问题可以咨询我！</div><img src ="http://www.cppblog.com/lauer3912/aggbug/194823.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-11-07 06:22 <a href="http://www.cppblog.com/lauer3912/archive/2012/11/07/194823.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dynamic Library Design Guidelines (Xcode)</title><link>http://www.cppblog.com/lauer3912/archive/2012/09/13/190472.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Thu, 13 Sep 2012 00:58:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/09/13/190472.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/190472.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/09/13/190472.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/190472.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/190472.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Dynamic Library Design GuidelinesDynamic libraries, in addition to grouping common functionality, help reduce an app&#8217;s launch time. However, when designed improperly, dynamic libraries can deg...&nbsp;&nbsp;<a href='http://www.cppblog.com/lauer3912/archive/2012/09/13/190472.html'>阅读全文</a><img src ="http://www.cppblog.com/lauer3912/aggbug/190472.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-09-13 08:58 <a href="http://www.cppblog.com/lauer3912/archive/2012/09/13/190472.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Qt4 with Xcode</title><link>http://www.cppblog.com/lauer3912/archive/2012/06/06/177794.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Wed, 06 Jun 2012 06:57:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/06/06/177794.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/177794.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/06/06/177794.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/177794.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/177794.html</trackback:ping><description><![CDATA[<div>http://qtnode.net/wiki/Qt4_with_Xcode<br /><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">Setting up the Xcode IDE for developing Qt applications for Mac OS X is relatively simple. There are three options, GNU Make, Carbon, and Xcode makespec. Using the Xcode makespec is the simplest way to get started, but it seems to have problems with certain setups.</p><table id="toc" summary="Contents" style="font-size: 12px; color: #000000; background-color: #f9f9f9; border-style: solid; border-color: #8caf30; padding: 5px; font-family: sans-serif; line-height: 19.049999237060547px; "><tbody><tr><td><div id="toctitle" style="text-align: center; "><h2>Contents</h2>&nbsp;<span style="font-size: 11px; ">[<a id="togglelink" href="" style="color: #64880d; background-image: none; ">hide</a>]</span></div><ul style="line-height: 1.5em; list-style-type: none; margin: 0.3em 0px 0px; padding: 0px; list-style-image: none; text-align: left; "><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Using_the_Xcode_makespec" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">1&nbsp;Using the Xcode makespec</a><ul style="line-height: 1.5em; list-style-type: none; margin: 0px 0px 0px 2em; padding: 0px; list-style-image: none; "><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Create_the_project_bundle" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">1.1&nbsp;Create the project bundle</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Known_Issues" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">1.2&nbsp;Known Issues</a></li></ul></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#As_a_GNU_Make_project" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2&nbsp;As a GNU Make project</a><ul style="line-height: 1.5em; list-style-type: none; margin: 0px 0px 0px 2em; padding: 0px; list-style-image: none; "><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Create_a_new_GNU_Make_project" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2.1&nbsp;Create a new GNU Make project</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Add_a_qmake_target" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2.2&nbsp;Add a qmake target</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Manage_your_.pro_file" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2.3&nbsp;Manage your .pro file</a><ul style="line-height: 1.5em; list-style-type: none; margin: 0px 0px 0px 2em; padding: 0px; list-style-image: none; "><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#If_you_want_to_maintain_your_own_.pro_file:" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2.3.1&nbsp;If you want to maintain your own .pro file:</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#If_you_want_to_use_qmake_-project_to_maintain_your_.pro_file:" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2.3.2&nbsp;If you want to use qmake -project to maintain your .pro file:</a></li></ul></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Building_your_project" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">2.4&nbsp;Building your project</a></li></ul></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#As_a_Carbon_project" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">3&nbsp;As a Carbon project</a><ul style="line-height: 1.5em; list-style-type: none; margin: 0px 0px 0px 2em; padding: 0px; list-style-image: none; "><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Create_a_new_Carbon_project" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">3.1&nbsp;Create a new Carbon project</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Add_Qt_frameworks" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">3.2&nbsp;Add Qt frameworks</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Add_a_Shell_Script_build_phase" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">3.3&nbsp;Add a Shell Script build phase</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Configure_the_compiler_and_linker" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">3.4&nbsp;Configure the compiler and linker</a></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Building_your_project_2" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">3.5&nbsp;Building your project</a></li></ul></li><li style="margin-bottom: 0.1em; "><a href="http://qtnode.net/wiki/Qt4_with_Xcode#Using_Qt_Designer" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">4&nbsp;Using Qt Designer</a></li></ul></td></tr></tbody></table><a name="Using_the_Xcode_makespec" id="Using_the_Xcode_makespec" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h1>Using the Xcode makespec</h1><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">If you don't mind using the console to set up your project, creating a new Xcode project can be done automatically by qmake.</p><a name="Create_the_project_bundle" id="Create_the_project_bundle" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Create the project bundle</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">Create a folder for your project. (You can switch the order of this step with the next.)</li><li style="margin-bottom: 0.1em; ">Open a console such as Terminal.app or an xterm using X11.app.</li><li style="margin-bottom: 0.1em; ">Change directories to the project folder using the&nbsp;<tt>cd</tt>&nbsp;command.</li><li style="margin-bottom: 0.1em; ">Create a&nbsp;<tt>.pro</tt>&nbsp;file. Calling&nbsp;<tt>qmake -project</tt>&nbsp;in an empty folder&nbsp;<strong>will not</strong>&nbsp;produce a suitable&nbsp;<tt>pro</tt>&nbsp;file, but&nbsp;<tt>touch myproject.pro</tt>&nbsp;will.</li><li style="margin-bottom: 0.1em; ">Execute the command&nbsp;<tt>qmake -spec macx-xcode</tt>.</li></ol><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">From here you can close the console and open the&nbsp;<tt>.xcode</tt>&nbsp;bundle created by qmake or you can use the&nbsp;<tt>open</tt>&nbsp;command to launch it from the command line.</p><a name="Known_Issues" id="Known_Issues" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Known Issues</h2><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">These issues are as of Qt/Mac 4.1.3, all experienced using OS X 10.3.9 and Xcode 1.5.</p><ul style="line-height: 19.049999237060547px; list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px; list-style-image: url(http://qtnode.net/w/skins/qtnode/bullet.gif); font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">Adding files to the Xcode project does not automatically add them to the&nbsp;<tt>.pro</tt>&nbsp;file. The&nbsp;<tt>.pro</tt>&nbsp;file can be edited within the project.</li><li style="margin-bottom: 0.1em; ">Sometimes, adding a header file to the project will cause the build process to fail in dependency checking. There should be a workaround but I have not found it yet.</li><li style="margin-bottom: 0.1em; ">Xcode will sometimes emit spurious internal errors about the build settings. I'm not sure if this is due a bug in qmake, a bug in Xcode, or misconfiguration of my build environment. It is also possible that qmake generates valid Xcode 2.x project files that aren't completely backwards-compatible with Xcode 1.x.</li></ul><a name="As_a_GNU_Make_project" id="As_a_GNU_Make_project" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h1>As a GNU Make project</h1><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">The solution most similar to the traditional build process is to use GNU Make. This uses the traditional build tools and is quicker to set up, but ultimately is less convenient than the other methods.</p><a name="Create_a_new_GNU_Make_project" id="Create_a_new_GNU_Make_project" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Create a new GNU Make project</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">From File | New Project, select "GNU Make".</li></ol><a name="Add_a_qmake_target" id="Add_a_qmake_target" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Add a qmake target</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">From Project | New Target, select "External Target".</li><li style="margin-bottom: 0.1em; ">Name the new target "qmake".</li><li style="margin-bottom: 0.1em; ">Under the new target's settings, under Custom Build Command, specify the full path to the qmake binary in "Build Tool".</li><li style="margin-bottom: 0.1em; ">Erase the contents of the "Arguments" field.</li></ol><a name="Manage_your_.pro_file" id="Manage_your_.pro_file" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Manage your .pro file</h2><a name="If_you_want_to_maintain_your_own_.pro_file:" id="If_you_want_to_maintain_your_own_.pro_file:" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h3>If you want to maintain your own .pro file:</h3><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">From File | New File, select "Empty File in Project".</li><li style="margin-bottom: 0.1em; ">Name the file with a&nbsp;<tt>.pro</tt>&nbsp;extension.</li></ol><a name="If_you_want_to_use_qmake_-project_to_maintain_your_.pro_file:" id="If_you_want_to_use_qmake_-project_to_maintain_your_.pro_file:" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h3>If you want to use&nbsp;<tt>qmake -project</tt>&nbsp;to maintain your .pro file:</h3><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">Duplicate the "qmake" target. Name the new target "qmake -project".</li><li style="margin-bottom: 0.1em; ">Under the new target's settings, under Custom Build Command, set the "Arguments" field to "-project".</li></ol><a name="Building_your_project" id="Building_your_project" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Building your project</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">If using the&nbsp;<tt>qmake -project</tt>&nbsp;method, select "qmake -project" as your active project and click Build to update your .pro file.</li><li style="margin-bottom: 0.1em; ">Select "qmake" as your active project and click Build to run qmake to generate your Makefile.</li><li style="margin-bottom: 0.1em; ">Select your main target and click Build to run make to compile your application.</li></ol><a name="As_a_Carbon_project" id="As_a_Carbon_project" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h1>As a Carbon project</h1><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">Setting up a Qt application as a Carbon project requires more work but gives you better control over the build process and integrates qmake more comfortably into the Xcode toolchain when compared to the GNU Make method. This method produces a project similar to the one created by using the Xcode makespec, but has been deprecated in favor of the more automatic approach.</p><a name="Create_a_new_Carbon_project" id="Create_a_new_Carbon_project" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Create a new Carbon project</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">From File | New Project, select "Carbon application".</li><li style="margin-bottom: 0.1em; ">Delete the main.c and .pch file automatically generated by the template. (Feel free to replace them with a main.cpp file.)</li></ol><ul style="line-height: 19.049999237060547px; list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px; list-style-image: url(http://qtnode.net/w/skins/qtnode/bullet.gif); font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">Deleting the prefix header is optional; you can use it if you want but it's not portable. If you choose to use it, take out the Carbon include provided by default.</li></ul><a name="Add_Qt_frameworks" id="Add_Qt_frameworks" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Add Qt frameworks</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">Control+click or right-click on "External Frameworks and Libraries" in your project's file tree. Select Add | Existing Frameworks.</li><li style="margin-bottom: 0.1em; ">Find and add QtCore.framework.</li><li style="margin-bottom: 0.1em; ">Repeat to add QtGui.framework and any other frameworks or libraries needed by your application.</li></ol><a name="Add_a_Shell_Script_build_phase" id="Add_a_Shell_Script_build_phase" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Add a Shell Script build phase</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">From Project | New Build Phase, select "New Shell Script Build Phase".</li><li style="margin-bottom: 0.1em; ">Set the script to:<pre style="padding: 1em; border: 1px dashed #a5c08b; background-color: #f9f9f9; line-height: 1.1em; ">/path/to/qt4/bin/qmake </pre></li></ol><span style="font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; background-color: #ffffff; ">make mocables rm MocLinkList for i in `ls moc_*.cpp | sed 's/\\.cpp/\\.o/'`; do make ${i} || exit 1 echo ${i} &gt;&gt; MocLinkList doneBe sure to replace&nbsp;</span><tt style="line-height: 19.049999237060547px; background-color: #ffffff; ">/path/to/qt4/bin/qmake</tt><span style="font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; background-color: #ffffff; ">&nbsp;with the real path to the qmake binary.</span><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">If you intend to use Qt Designer, add&nbsp;<tt>make compiler_uic_make_all</tt>&nbsp;after&nbsp;<tt>make mocables</tt>.</li><li style="margin-bottom: 0.1em; ">If you wish to allow qmake to automatically maintain your .pro file, add&nbsp;<tt>/path/to/qt4/bin/qmake -project</tt>&nbsp;as the first line.</li><li style="margin-bottom: 0.1em; ">Expand the active target in your project's file tree and drag the Shell Script Files step up to be the first step of the build sequence.</li></ol><a name="Configure_the_compiler_and_linker" id="Configure_the_compiler_and_linker" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Configure the compiler and linker</h2><ol style="line-height: 19.049999237060547px; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-style-image: none; font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">From the Project menu, select "Edit Active Target".</li><li style="margin-bottom: 0.1em; ">In the Build tab, find "Other Linker Flags" and set it to "-filelist MocLinkList".</li><li style="margin-bottom: 0.1em; ">Find "Prefix Header" and clear it.</li><li style="margin-bottom: 0.1em; ">Find "Precompile Prefix Header" and uncheck it.</li></ol><ul style="line-height: 19.049999237060547px; list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px; list-style-image: url(http://qtnode.net/w/skins/qtnode/bullet.gif); font-family: sans-serif; font-size: 13px; background-color: #ffffff; "><li style="margin-bottom: 0.1em; ">Of course, if you chose to use the prefix header, don't clear it. You may or may not wish to precompile it; consult Xcode's documentation.</li></ul><a name="Building_your_project_2" id="Building_your_project_2" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h2>Building your project</h2><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">At this point you can use all of the Xcode build tools directly with no special steps.</p><a name="Using_Qt_Designer" id="Using_Qt_Designer" style="color: rgb(67, 92, 8); background-image: none; background-color: rgb(255, 255, 255); font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "></a><h1>Using Qt Designer</h1><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">Unfortunately, while Xcode allows you to choose external editors for various file types, it seems to lack a way to specify new file types. If you could specify a new file type (i.e. "sourcecode.ui"), it would be a simple matter to associate it with Designer.</p><p style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px; background-color: #ffffff; ">This doesn't mean you're out of luck, though. You can add .ui files to your project just like any other file, and if you control+click or right-click the file, selecting "Open with Finder" will launch Designer with the selected file.</p><div id="catlinks" style="border: 1px solid #aaaaaa; background-color: #f9f9f9; padding: 5px; margin-top: 1em; clear: both; font-family: sans-serif; font-size: 13px; line-height: 19.049999237060547px; "><div id="mw-normal-catlinks"><a href="http://qtnode.net/wiki/Special:Categories" title="Special:Categories" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">Category</a>:&nbsp;<span dir="ltr"><a href="http://qtnode.net/wiki/Category:Qt_Setup" title="Category:Qt Setup" style="text-decoration: none; color: #64880d; background-image: none; background-position: initial initial; background-repeat: initial initial; ">Qt Setup</a></span></div></div></div><img src ="http://www.cppblog.com/lauer3912/aggbug/177794.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-06-06 14:57 <a href="http://www.cppblog.com/lauer3912/archive/2012/06/06/177794.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Qt internal error: qt_menu.nib could not be loaded. </title><link>http://www.cppblog.com/lauer3912/archive/2012/06/06/177793.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Wed, 06 Jun 2012 06:55:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/06/06/177793.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/177793.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/06/06/177793.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/177793.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/177793.html</trackback:ping><description><![CDATA[<span style="font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 13px; line-height: 17px; background-color: #f0f0f0; ">"Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your applicaiton bundle."<br /></span><img src ="http://www.cppblog.com/lauer3912/aggbug/177793.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-06-06 14:55 <a href="http://www.cppblog.com/lauer3912/archive/2012/06/06/177793.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Object-C学习笔记 基础部分(一)NSString常用方法</title><link>http://www.cppblog.com/lauer3912/archive/2012/05/29/176653.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Tue, 29 May 2012 13:59:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/05/29/176653.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/176653.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/05/29/176653.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/176653.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/176653.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: http://keys.iteye.com/blog/1117190个人学习笔记&nbsp;NSString&nbsp;--实例化方法--------------&nbsp;NSString *str = [[NSString alloc] init];&nbsp;NSString *str = [[[NSString alloc] init] autorelease];&nbsp;&nbsp;&...&nbsp;&nbsp;<a href='http://www.cppblog.com/lauer3912/archive/2012/05/29/176653.html'>阅读全文</a><img src ="http://www.cppblog.com/lauer3912/aggbug/176653.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-05-29 21:59 <a href="http://www.cppblog.com/lauer3912/archive/2012/05/29/176653.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Cocoa读取和写入plist文件</title><link>http://www.cppblog.com/lauer3912/archive/2012/05/27/176331.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sun, 27 May 2012 01:09:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/05/27/176331.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/176331.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/05/27/176331.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/176331.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/176331.html</trackback:ping><description><![CDATA[<div>http://www.cocoachina.com/b/?p=237<br /><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; ">plist文件是标准的xml文件，在cocoa中可以很简单地使用。这里介绍一下使用方法：</p><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; ">以下代码在Mac和iPhone中均适用。</p><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; "></p><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; ">写入plist文件：</p><div no=""  objc"="" style="background-color: #ffffff; overflow: auto; white-space: nowrap; margin-bottom: 1em; position: relative; font-family: Helvetica, monospace; font-size: 12px; color: #35383d; line-height: 17px; "><ol style="margin: 0px; padding: 0px 0px 0.5em 1em; border-left-style: none; list-style-type: none; "><li style="padding: 2px 0px 2px 15px; list-style-type: none; background-image: url(http://www.cocoachina.com/b/wp-content/themes/illacrimo/images/PostContentLiIco.png); line-height: 15px; color: #4c4c4c; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><div style="background-image: none; color: #000000; padding-left: 5px; "><span style="color: #0000ff; ">NSMutableDictionary</span>*&nbsp;dict&nbsp;=&nbsp;<span style="color: #005000; ">[</span>&nbsp;<span style="color: #005000; ">[</span>&nbsp;<span style="color: #0000ff; ">NSMutableDictionary</span>&nbsp;<span style="color: #0000ff; ">alloc</span>&nbsp;<span style="color: #005000; ">]</span>&nbsp;<span style="color: #0000ff; ">initWithContentsOfFile</span>:@<span style="color: #7f2d00; ">"/Sample.plist"</span>&nbsp;<span style="color: #005000; ">]</span>;</div></li><li style="padding: 2px 0px 2px 15px; list-style-type: none; background-image: url(http://www.cocoachina.com/b/wp-content/themes/illacrimo/images/PostContentLiIco.png); line-height: 15px; color: #4c4c4c; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><div style="background-image: none; color: #000000; padding-left: 5px; "><span style="color: #005000; ">[</span>&nbsp;dict&nbsp;<span style="color: #0000ff; ">setObject</span>:@<span style="color: #7f2d00; ">"Yes"</span>&nbsp;<span style="color: #0000ff; ">forKey</span>:@<span style="color: #7f2d00; ">"RestartSpringBoard"</span>&nbsp;<span style="color: #005000; ">]</span>;</div></li><li style="padding: 2px 0px 2px 15px; list-style-type: none; background-image: url(http://www.cocoachina.com/b/wp-content/themes/illacrimo/images/PostContentLiIco.png); line-height: 15px; color: #4c4c4c; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><div style="background-image: none; color: #000000; padding-left: 5px; "><span style="color: #005000; ">[</span>&nbsp;dict&nbsp;<span style="color: #0000ff; ">writeToFile</span>:@<span style="color: #7f2d00; ">"/Sample.plist"</span>&nbsp;<span style="color: #0000ff; ">atomically</span>:<span style="color: #0000ff; ">YES</span>&nbsp;<span style="color: #005000; ">]</span>;</div></li></ol></div><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; ">&nbsp;</p><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; ">读取plist文件：</p><div no=""  objc"="" style="background-color: #ffffff; overflow: auto; white-space: nowrap; margin-bottom: 1em; position: relative; font-family: Helvetica, monospace; font-size: 12px; color: #35383d; line-height: 17px; "><ol style="margin: 0px; padding: 0px 0px 0.5em 1em; border-left-style: none; list-style-type: none; "><li style="padding: 2px 0px 2px 15px; list-style-type: none; background-image: url(http://www.cocoachina.com/b/wp-content/themes/illacrimo/images/PostContentLiIco.png); line-height: 15px; color: #4c4c4c; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><div style="background-image: none; color: #000000; padding-left: 5px; "><span style="color: #0000ff; ">NSMutableDictionary</span>*&nbsp;dict&nbsp;=&nbsp;&nbsp;<span style="color: #005000; ">[</span>&nbsp;<span style="color: #005000; ">[</span>&nbsp;<span style="color: #0000ff; ">NSMutableDictionary</span>&nbsp;<span style="color: #0000ff; ">alloc</span>&nbsp;<span style="color: #005000; ">]</span>&nbsp;<span style="color: #0000ff; ">initWithContentsOfFile</span>:@<span style="color: #7f2d00; ">"/Sample.plist"</span>&nbsp;<span style="color: #005000; ">]</span>;</div></li><li style="padding: 2px 0px 2px 15px; list-style-type: none; background-image: url(http://www.cocoachina.com/b/wp-content/themes/illacrimo/images/PostContentLiIco.png); line-height: 15px; color: #4c4c4c; background-position: 0% 0%; background-repeat: no-repeat no-repeat; "><div style="background-image: none; color: #000000; padding-left: 5px; "><span style="color: #0000ff; ">NSString</span>*&nbsp;<span style="color: #0000ff; ">object</span>&nbsp;=&nbsp;<span style="color: #005000; ">[</span>&nbsp;dict&nbsp;<span style="color: #0000ff; ">objectForKey</span>:@<span style="color: #7f2d00; ">"RestartSpringBoard"</span>&nbsp;<span style="color: #005000; ">]</span>;</div></li></ol></div><p style="font-size: 12px; line-height: 17px; color: #35383d; font-family: Myriad, 'Lucida Grande', Geneva, Verdana, Arial, Helvetica, sans-serif; background-color: #ffffff; ">&nbsp;</p></div><img src ="http://www.cppblog.com/lauer3912/aggbug/176331.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-05-27 09:09 <a href="http://www.cppblog.com/lauer3912/archive/2012/05/27/176331.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> otool 与dylib</title><link>http://www.cppblog.com/lauer3912/archive/2012/05/07/173940.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Mon, 07 May 2012 15:25:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/05/07/173940.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/173940.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/05/07/173940.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/173940.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/173940.html</trackback:ping><description><![CDATA[<blockquote style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Shared by eric&nbsp;<br />mac osx的dyld是挺烦的</blockquote><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">所谓dylib，就是bsd风格的动态库。基本可以认为等价于windows的dll和linux的so。mac基于bsd，所以也使用的是dylib。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">如果你需要引用一个第三方的dylib，在xcode下编译出cocoa程序，在本机上运行是不会出问题的。但是发布出来，给其他用户用，就可能出问题。因为用户不一定有这个库。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">这个问题给我造成了相当的困扰，我到现在也没找到正规的方法。但是我确实解决了这个问题，虽然方法不一定正宗。不管怎么说，写下来，<strong>如果暂时没有更好的办法，那么先这样做。如果谁有更好的办法，也请一定不吝留言或邮件给我</strong>。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">我的办法是这样的:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /><strong>1 otool -L yourapp.app/Contents/MacOS/yourapp</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">这一步的意思是对你编译出的app使用otool命令，以便获得依赖哪些dylib的信息。注意这个路径。cocoa的app在命令行下表现为目录。所有相关的东西都在里面。<br />结果如下所示：<br />yourapp.app/Contents/MacOS/yourapp:<br />/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0)<br /><span style="color: #ff0000; ">/usr/local/lib/lib01.dylib (compatibility version 0.0.0, current version 0.1.0)</span><br /><span style="color: #ff0000; ">/usr/local/lib/lib02.dylib (compatibility version 0.0.0, current version 0.1.0)</span><br /><span style="color: #ff0000; ">/usr/local/lib/lib03.dylib (compatibility version 0.0.0, current version 0.1.0)</span><br />/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)<br />/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)<br />/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)<br />/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.0.0)<br />/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.0.0)<br />/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.12.0)</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">注意我标红的地方。假如lib01,lib02,lib03是本程序引用的第三方库，那么在这个程序里面，他们的引用地址是位于/usr/local/lib上的。这是开发机上的安装情况。而使用这个程序的客户机未必安装这些东西，所以程序就要出错。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">显然，我们需要做2件事。a 把这些库附带在app上 b 把他们的引用地址修改到正确的位置。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>2 mkdir yourapp.app/Contents/dylib</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">在编译出来的app中，创建dylib目录</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">然后把所有需要的库复制过去</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">cp /usr/local/lib/lib01.dylib yourapp.app/Contents/dylib/<br />cp /usr/local/lib/lib02.dylib yourapp.app/Contents/dylib/<br />cp /usr/local/lib/lib03.dylib yourapp.app/Contents/dylib/</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>3 install_name_tool -change /usr/local/lib/lib01.dylib @loader_path/../dylib/lib01.dylib "yourapp.app/Contents/MacOS/yourapp"<br /></strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">install_name_tool 是苹果提供的用来修改dylib安装名称的命令。这个命令执行之后，再用otool -L 就可以看到变化了</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">yourapp.app/Contents/MacOS/yourapp:<br />/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0)<br /><span style="color: #ff0000; ">@loader_path/../dylib/lib01.dylib (compatibility version 0.0.0, current version 0.1.0)</span><br />/usr/local/lib/lib02.dylib (compatibility version 0.0.0, current version 0.1.0)<br />/usr/local/lib/lib03.dylib (compatibility version 0.0.0, current version 0.1.0)<br />/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)<br />/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)<br />/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)<br />/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.0.0)<br />/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 949.0.0)<br />/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.12.0)</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">注意标红的位置。已经变化了。@loader_path 指的是应用程序运行的位置，也就是yourapp.app/Contents/MacOS/yourapp，所以要用一个..，以便定位到第2步创建的dylib目录。<br />重复这个命令，修改lib02,lib03</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /><strong>4 otool -L yourapp.app/Contents/dylib/*.dylib</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">继续用otool 来检查dylib下面使用的第三方库是否还有其他依赖，install_name是否正确，重复1，2，3的步骤，把所需要的dylib复制过来，修改install_name。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">如果都改对了，那么这个app就附带上了dylib，可以在其他机器上正确运行了，不用非要寻找/usr/local/lib下面的库了。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br />刚才我们修改的结果是一个build的结果。当然，每次build都这么折腾一下很麻烦。所以继续这样做：</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">1 前面的步骤得到了一个完整的dylib目录。把这个dylib复制一份备用。比如放在你的xcode项目下面。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">2 编写一个脚本：</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">mkdir "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/dylib"<br />cp -f /your/path/to/xcode_project_name/dylib/*.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/dylib/"</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">install_name_tool -change /usr/local/lib/lib01.dylib @loader_path/../dylib/lib01.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME"<br />(用这个格式重复前面对app使用过的dylib)</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">3 在xcode中，展开targets节点，右键点工程名称，在菜单中选Add-&gt;New Build Phasa-&gt;New Run Script Build Phasa，在打开的对话框里面，把刚才的脚本贴进去。如图所示。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">这个脚本会在build之后自动运行。不过我这里有个奇怪的问题，如果Shell里面写了/bin/sh，会报告找不到这个文件(实际上存在)，而让shell为空，反而可以正确的运行shell命令。<br /><a href="http://picasaweb.google.com/lh/photo/FwVjnl4gM7iRUH5yMbTXQA?feat=embedwebsite" style="color: #336699; text-decoration: none; "><img src="http://lh4.ggpht.com/_fMpSudYvJOo/Skq16lg_8yI/AAAAAAAAAhw/5PAtplmUj_Q/s400/Picture%205.png" alt="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></a></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><a href="http://picasaweb.google.com/lh/photo/PO8ZsBhdcFBWogeMuu2cmQ?feat=embedwebsite" style="color: #336699; text-decoration: none; "><img src="http://lh6.ggpht.com/_fMpSudYvJOo/Skq16mBp44I/AAAAAAAAAh0/ASKXHFDGems/s400/Picture%206.png" alt="" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></a></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">经过这些处理，每次编译出来的app就可以拿到其他机器上运行了。可真够麻烦的...</p><img src ="http://www.cppblog.com/lauer3912/aggbug/173940.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-05-07 23:25 <a href="http://www.cppblog.com/lauer3912/archive/2012/05/07/173940.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Find path of an application</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/18/171908.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Wed, 18 Apr 2012 14:44:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/18/171908.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/171908.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/18/171908.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/171908.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/171908.html</trackback:ping><description><![CDATA[<center style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; "><table width="823" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><tbody><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><tbody><tr><td width="350" valign="TOP" align="CENTER" style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><a href="http://lists.apple.com/" style="color: #000066; text-decoration: none; "><img src="http://lists.apple.com/images/mailing2.gif" alt="Mailing Lists: Apple Mailing Lists" width="350" height="85" border="0" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; " /></a><br /></td><td width="20" style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "></td><td width="200" valign="TOP" style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><img src="http://lists.apple.com/images/stamp.gif" alt="Image of Mac OS face in stamp" width="150" height="65" border="0" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; " /></td></tr></tbody></table></td></tr></tbody></table></center><table border="0" cellspacing="2" width="100%" style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; font-size: 12px; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; color: #000000; "><tbody><tr><td align="right" valign="top" width="25%" bgcolor="#CCCCCC" style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">[<a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00036.html" style="color: #000066; text-decoration: none; ">Date Prev</a>][<a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00038.html" style="color: #000066; text-decoration: none; ">Date Next</a>][<a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00036.html" style="color: #000066; text-decoration: none; ">Thread Prev</a>][<a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00038.html" style="color: #000066; text-decoration: none; ">Thread Next</a>][<a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/index.html#00037" style="color: #000066; text-decoration: none; ">Date Index</a>][<a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/threads.html#00037" style="color: #000066; text-decoration: none; ">Thread Index</a>]</td></tr></tbody></table><h1>Re: Find path of an application</h1><hr style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><ul style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 1em; padding-left: 0px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; "><li style="padding-bottom: 0.3em; "><strong>Subject</strong>:&nbsp;<strong>Re: Find path of an application</strong></li><li style="padding-bottom: 0.3em; ">From: Terry Lambert &lt;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#101;&#109;&#97;&#105;&#108;&#64;&#104;&#105;&#100;&#100;&#101;&#110;" style="color: #000066; text-decoration: none; ">email@hidden</a>&gt;</li><li style="padding-bottom: 0.3em; ">Date: Tue, 16 Dec 2008 02:01:54 -0800</li><li style="padding-bottom: 0.3em; ">Delivered-to: email@hidden</li><li style="padding-bottom: 0.3em; ">Delivered-to: email@hidden</li></ul><hr style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>On Dec 16, 2008, at 1:00 AM, Rakesh Singhal wrote:</tt><blockquote style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; border-left-color: #5555ee; border-left-width: 0.2em; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0.85em; "><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">I am done with finding the process is running or not. Thanks a lot. Still I am stuck with second issue to find the path to my application in my system. Actually there are 3 steps:</pre><br /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">1. To know that application is running or not?  Now it is done. 2. If not then get the path of application where it was installed (user can change the path during installation). 3. Launch the application.</pre><br /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">My code is standard C++ tool so I want to use only C and C++ APIs. Please suggest me. </pre></blockquote><tt><br />You said this was a GUI app that you didn't control the sources to. So control it anyway by renaming the binary in the bundle and putting a stub in there that will save off the id for you and then reexec the real binary:</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">--- example with no error checking --- #include &lt;mach-o/dyld.h&gt;	/* _NSGetExecutablePath */ #include &lt;limits.h&gt;		/* PATH_MAX */ #include &lt;unistd.h&gt;		/* execve */ #include &lt;libgen.h&gt;		/* dirname */ #include &lt;string.h&gt;		/* strcpy */</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">#define BINARYNAME	"myreal_executable"</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">int main(int ac, char *av[]) { 	char pathbuf[PATH_MAX + 1]; 	char real_executable[PATH_MAX + 1]; 	char *bundle_id; 	int  bufsize = sizeof(pathbuf);</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">	_NSGetExecutablePath( pathbuf, &amp;bufsize);</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">	bundle_id = dirname(pathbuf);</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">	strcpy(real_executable, bundle_id); 	strcat(real_executable, "/"); 	strcat(real_executable, BINARYNAME);</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">	execv(real_executable, av); } --------------------</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>Then write the path into /var/run/program.&lt;pid&gt; before you do the execv call to give control to the real binary.</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>Then in your other program go looking for /var/run/program.*. When you find one, take the pid and do an atoi() on it to get the integer pid back. Then end it a kill(pid, 0).</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">This function will return one of three things:</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>(1) 0, indicating that the process exists and you have the right to send it signals</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>(2) -1, with errno set to EPERM, indicating that the process exists and you do not have rights to send it a signal</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>(3) -1, with errno set to ESRCH, indicating that the process does not (yet) exist</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">-</pre><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>Ideally, all this would be unnecessary because you put your daemon and the program you want to give it a UI into the same bundle, which ,means either one of them can find the other by looking at the dirname() from their own call to _NSGetExecutablePath().</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><tt>No grovelling around trying to find out where something came from, because it tells you.</tt><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><br style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; " /><pre style="margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; ">-- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list      (email@hidden) Help/Unsubscribe/Update your Subscription: <tt>This email sent to email@hidden </tt> <hr /> <ul style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 1em; padding-left: 0px; "><li style="padding-bottom: 0.3em; "><strong>Follow-Ups</strong>: <ul style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 1em; padding-left: 0px; "> <li style="padding-bottom: 0.3em; "><strong><a name="00038" href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00038.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> <ul style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 1em; padding-left: 0px; "><li style="padding-bottom: 0.3em; "><em>From:</em> Eli Bach &lt;email@hidden&gt;</li></ul></li> </ul></li></ul> <table width="100%" border="0" style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Helvetica, sans-serif; font-size: 12px; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><tbody><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><strong>References:</strong></td><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&nbsp;</td></tr><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&nbsp;</td><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&gt;<strong><a name="00022" href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00022.html" style="color: #000066; text-decoration: none; ">Find path of an application</a></strong> (From: "Rakesh Singhal" &lt;email@hidden&gt;)</td></tr><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&nbsp;</td><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&gt;<strong><a name="00025" href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00025.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> (From: Jean-Daniel Dupas &lt;email@hidden&gt;)</td></tr><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&nbsp;</td><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&gt;<strong><a name="00029" href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00029.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> (From: "Rakesh Singhal" &lt;email@hidden&gt;)</td></tr><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&nbsp;</td><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&gt;<strong><a name="00031" href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00031.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> (From: Jean-Daniel Dupas &lt;email@hidden&gt;)</td></tr><tr><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&nbsp;</td><td style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">&gt;<strong><a name="00034" href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00034.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> (From: "Rakesh Singhal" &lt;email@hidden&gt;)</td></tr></tbody></table> <br /> <ul style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 1em; padding-left: 0px; "> <li style="padding-bottom: 0.3em; ">Prev by Date: <strong><a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00036.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> </li> <li style="padding-bottom: 0.3em; ">Next by Date: <strong><a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00038.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> </li> <li style="padding-bottom: 0.3em; ">Previous by thread: <strong><a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00036.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> </li> <li style="padding-bottom: 0.3em; ">Next by thread: <strong><a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/msg00038.html" style="color: #000066; text-decoration: none; ">Re: Find path of an application</a></strong> </li> <li style="padding-bottom: 0.3em; ">Index(es): <ul style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 1em; padding-left: 0px; "> <li style="padding-bottom: 0.3em; "><a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/index.html#00037" style="color: #000066; text-decoration: none; "><strong>Date</strong></a></li> <li style="padding-bottom: 0.3em; "><a href="http://lists.apple.com/archives/darwin-dev/2008/Dec/threads.html#00037" style="color: #000066; text-decoration: none; "><strong>Thread</strong></a></li> </ul> </li> </ul>       <center> </center></pre><img src ="http://www.cppblog.com/lauer3912/aggbug/171908.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-18 22:44 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/18/171908.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>@executable path, @load path and @rpath</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/18/171814.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Tue, 17 Apr 2012 22:14:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/18/171814.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/171814.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/18/171814.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/171814.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/171814.html</trackback:ping><description><![CDATA[<h1>@executable path, @load path and @rpath</h1> <div> <span title="2010年11月6日 02:26:36">2010年11月6日</span> by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#119;&#105;&#110;&#64;&#119;&#105;&#110;&#99;&#101;&#110;&#116;&#46;&#99;&#111;&#109;">Wincent Colaiuta</a> </div>  <div> <p><strong>Note:</strong> <em>this article is actually about the <code>@executable_path</code>, <code>@load_path</code> and <code>@rpath</code> install paths used by the linker on <a href="https://wincent.com/wiki/Mac_OS_X">Mac OS X</a>; wiki titles can't include underscores, however, because they are ambiguous with spaces.</em></p> <h2>Absolute paths</h2> <p>Useful for frameworks installed in shared locations. Example:</p> <ul> <li>Install path: <code>/Library/Frameworks/Foo.framework/Versions/A/Foo</code></li> </ul> <h2><code>@executable_path</code></h2> <p>Useful for frameworks embedded inside applications, because it allows  you to specify the location of the framework relative to the  application's executable:</p> <ul> <li>Install path: <code>@executable_path/../Frameworks/Foo.framework/Versions/A/Foo</code></li> <li>Application location: <code>/Applications/Foo.app</code></li> <li>Executable path: <code>/Applications/Foo.app/Contents/MacOS</code></li> <li>Framework location: <code>/Applications/Foo.app/Contents/Frameworks/Foo.framework</code></li> <li>Linker puts all this together to figure out that the framework binary can be found at: <code>/Applications/Foo.app/Contents/MacOS/../Frameworks/Foo.framework/Versions/A/Foo</code></li> </ul> <h2>@loader_path</h2> <p>Available from <a href="https://wincent.com/wiki/Mac_OS_X">Mac OS X</a> 10.4 <a href="https://wincent.com/wiki/Tiger">Tiger</a>  onwards; useful for frameworks embedded inside plug-ins, because it  allows you to specify the location of the framework relative to the  plug-in's code (remember, plug-ins may not actually know where they are  going to be installed, relative to the application, so knowing <code>@executable_path</code> doesn't help us in this case):</p> <ul> <li>Install path: <code>@loader_path/../Frameworks/Foo.framework/Versions/A/Foo</code></li> <li>Application location: <code>/Applications/Foo.app</code></li> <li>Plug-in location: <code>/Library/Application Support/Foo/Plug-Ins/Bar.bundle</code></li> <li>Executable path: <code>/Applications/Foo.app/Contents/MacOS</code></li> <li>Loader path: <code>/Library/Application Support/Foo/Plug-Ins/Bar.bundle/Contents/MacOS</code></li> <li>Framework location: <code>/Library/Application Support/Foo/Plug-Ins/Bar.bundle/Contents/Frameworks/Foo.framework</code></li> <li>Linker puts all this together to figure out that the framework binary can be found at: <code>/Library/Application Support/Foo/Plug-Ins/Bar.bundle/Contents/MacOS/../Frameworks/Foo.framework/Versions/A/Foo</code></li> </ul> <p>Note that if the "loader" is an application rather than a plug-in, the <code>@loader_path</code> ends up being equivalent to <code>@executable_path</code>.</p> <h2><code>@rpath</code></h2> <p>New in <a href="https://wincent.com/wiki/Mac_OS_X">Mac OS X</a> 10.5 <a href="https://wincent.com/wiki/Leopard">Leopard</a> is <code>@rpath</code>. Key points:</p> <ul> <li><code>@rpath</code> instructs the dynamic linker to search a list of paths in order to locate the framework</li> <li>critically, this list is embedded in the loading application</li> <li>this means that a single framework with <code>@rpath/Foo.framework/Versions/A/Foo</code>  can be made to work in a number of different ways; that is, you are  effectively no longer limited by the choice of specifying your "install  path" using <em>either</em> <code>@executable_path</code> <em>or</em> <code>@loader_path</code></li> <li>the down side: you now have to pass additional linker flags when building the host application (eg. <code>-rpath @executable_path/../Frameworks</code> or <code>/Library/Frameworks</code>; note that specifying <em>both</em> will cause the dynamic linker to try looking in both locations)</li> </ul> <h2>Sources</h2> <ul> <li>Nice overview: <a href="http://www.mikeash.com/pyblog/friday-qa-2009-11-06-linking-and-install-names.html">http://www.mikeash.com/pyblog/friday-qa-2009-11-06-linking-and-install-names.html</a></li> <li>Docs for using PFiddlesoft Frameworks (I've never used these, but  the manual itself makes some nice general points about using  frameworks): <a href="http://pfiddlesoft.com/frameworks/downloads/Assistive_Application_Programming_Guide.pdf">http://pfiddlesoft.com/frameworks/downloads/Assistive_Application_Programming_Guide.pdf</a></li> </ul>  </div> <div> <h2>Tags</h2> <a href="https://wincent.com/tags/mac.os.x" style="font-size: 1.3244274809160306em;" title="85 items tagged with 'mac.os.x'">mac.os.x</a> <a href="https://wincent.com/tags/dynamic.linker" style="font-size: 1.0038167938931297em;" title="1 item tagged with 'dynamic.linker'">dynamic.linker</a></div><img src ="http://www.cppblog.com/lauer3912/aggbug/171814.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-18 06:14 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/18/171814.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>XCODE 4.3 WITH NO GCC?</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/07/170388.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sat, 07 Apr 2012 13:50:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/07/170388.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/170388.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/07/170388.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/170388.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/170388.html</trackback:ping><description><![CDATA[<p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">真的坑爹，今天才开始玩MAC OX，装了个最新版本的10.7.3，只能装XCODE 4.3 这个月刚发行的版本。</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">安装时发现没有install过程，直接双击就进入开发环境了。而且装完后没有gcc 等各种编译工具，在TERMINAL下各种命令不识别，想装ruby的各种开发工具，都不行了。</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">&nbsp;</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">查了半天才发现：</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">Apple announced Xcode 4.3 for OSX Lion and 4.4 for OSX Mountain Lion last week. The major difference is that Xcode no longer provide an installer which is good thing because you now could update Xcode with AppStore in the future, plus it is much easier to carry the development environment with you. However, there is a little problem with this new version of Xcode, is that all command line toolsets and compilers are not visible in terminal.&nbsp;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />解决方案一：<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />A simple fix is to update your PATH env:</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH</code></p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">Please be noted that clang does not reside in /Developer/usr/bin, it is now in /Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">Now you could access to gcc, g++, git or any toolsets bundled with Xcode. For your convenience, it is recommended to include it in your&nbsp;<code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">.bash_profile</code>.</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; ">解决方案二：</p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">You can install these additional tools directly in Xcode :</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Preferences &gt; Downloads &gt; Command Line Tools &gt; Install</span></p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></span></p><p style="color: #333333; margin-top: 8px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; line-height: 26px; font-family: Simsun; text-align: left; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">SO. What a fUUUcking day！</span></p><img src ="http://www.cppblog.com/lauer3912/aggbug/170388.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-07 21:50 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/07/170388.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VMware虚拟机从Mac OS Lion 10.7.1更新到Mac OS Lion 10.7.2后无法正常启动解决方案</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/07/170356.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sat, 07 Apr 2012 06:24:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/07/170356.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/170356.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/07/170356.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/170356.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/170356.html</trackback:ping><description><![CDATA[原文：http://blog.sina.com.cn/s/blog_5a6efa330100x3sp.html<br /><span style="color: #494949; font-family: simsun; background-color: #ecf0fc; "><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; ">10月12日全新的IOS 5系统可供下载后，Mac OS也升级到了10.7.2，10.7.2支持iCloud 全套云服务，用户可以将自己的数据自动存储到iCloud中并推送到所有设备。另外本次更新主要包括常规性修复，增强了稳定性、兼容性和安全性等。<br />但很多黑苹果的朋友在更新10.7.2版本后，发现系统无法启动，出现五国或者禁止符号等错误。本文只针对采用虚拟机（VMware或者VirtualBOX）的朋友，具体解决方案如下；<br />原因就是：升级后AppleLSIFusionMPT.kext 出了问题，这个可以在升级补丁前备份AppleLSIFusionMPT.kext，完了后AppleLSIFusionMPT.kext备份到之前的文件夹。<br />具体解决方法是：<br />1、首先正常启动虚拟机后，进入Mac OS X 10.7.1操作系统内。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; ">原版本为：11B26</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; "><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s2.sinaimg.cn/orignal/5a6efa33gb2da7e7c7b81" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img src="http://s2.sinaimg.cn/middle/5a6efa33gb2da7e7c7b81&amp;690" real_src="http://s2.sinaimg.cn/middle/5a6efa33gb2da7e7c7b81&amp;690" width="553" height="314" name="image_operate_60111322551427550" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s8.sinaimg.cn/orignal/5a6efa33gefc88f5f6687" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img src="http://s8.sinaimg.cn/middle/5a6efa33gefc88f5f6687&amp;690" real_src="http://s8.sinaimg.cn/middle/5a6efa33gefc88f5f6687&amp;690" width="553" height="527" name="image_operate_11611322551421013" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br />2、启动&#8220;终端&#8221;程序（在&#8220;前往-实用工具&#8221;中）<br />3、在终端命令行下完整输入如下引号内的命令（意思是备份AppleLSIFusionMPT.kext文件到当前目录）<br />&#8220;cp -rv /System/Library/Extensions/AppleLSIFusionMPT.kext&nbsp;<wbr>&nbsp;.&#8220;<br />注意最后一个点号不要忘记(指备份到当前目录)，而且大小写也不能错（我没试过全部小写，我印象中Unix系统都是大小写敏感的，这一点和windows不一样）<br />输入之后，按回车，会出现一大堆文字，表示一些文件被正常备份下来。<br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s2.sinaimg.cn/orignal/5a6efa33g7846ff767081" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_64211322463327223" src="http://s2.sinaimg.cn/middle/5a6efa33g7846ff767081&amp;690" real_src="http://s2.sinaimg.cn/middle/5a6efa33g7846ff767081&amp;690" width="612" height="384" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br />&nbsp;<wbr><br />4、不要关闭终端，然后开始正常的10.7.2补丁升级操作（这个步骤不会很快，尤其是在虚拟机下，可以干点别的，或者看我继续往下说）<br />苹果官方10.7.2升级包地址<br /><a href="http://support.apple.com/downloads/DL1459/en_US/MacOSXUpdCombo10.7.2.dmg" style="text-decoration: none; color: #3e6e2b; ">http://support.apple.com/downloads/DL1459/en_US/MacOSXUpdCombo10.7.2.dmg</a><br />5、【切记】顺利升级完成后，不要立刻启动操作系统！而是重新回到终端命令行下<br />6、输入如下引号内命令（意思是删除在Lion10.7.2升级过程中系统又安装上的AppleLSIFusionMPT.kext，这个文件是Lion10.7.2版本的，不好用，必须先删除！）<br />&#8221;sudo rm -rfv /System/Library/Extensions/AppleLSIFusionMPT.kext&#8220;<br />回车，会提示你输入密码，输入你登录密码即可。可能屏幕没有显示，所以你一定要看好了提示文字（懂点英文还是必须的）<br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s13.sinaimg.cn/orignal/5a6efa33g7846ffb3d70c" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_53361322463352134" src="http://s13.sinaimg.cn/middle/5a6efa33g7846ffb3d70c&amp;690" real_src="http://s13.sinaimg.cn/middle/5a6efa33g7846ffb3d70c&amp;690" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br />再输入引号内命令（意思是将升级前备份在当前目录下的AppleLSIFusionMPT.kext文件，是Lion 10.7.1版本的，重新拷贝到原系统中）<br />&#8221;sudo cp -rv AppleLSIFusionMPT.kext /System/Library/Extensions&#8220;</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; "><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s2.sinaimg.cn/orignal/5a6efa33gb2c5fe9bf3d1" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_36761322463371091" src="http://s2.sinaimg.cn/middle/5a6efa33gb2c5fe9bf3d1&amp;690" real_src="http://s2.sinaimg.cn/middle/5a6efa33gb2c5fe9bf3d1&amp;690" width="612" height="383" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; ">7、正常重启，大功告成！看到版本已经变成10.7.2了。版本号为：Mac OS X Lion (11C74)<br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s3.sinaimg.cn/orignal/5a6efa33gb2c5ffbf4262" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img src="http://s3.sinaimg.cn/middle/5a6efa33gb2c5ffbf4262&amp;690" real_src="http://s3.sinaimg.cn/middle/5a6efa33gb2c5ffbf4262&amp;690" width="311" height="355" name="image_operate_58641322551030381" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a></p><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s5.sinaimg.cn/orignal/5a6efa33gb2da6a28c1f4" target="_blank" style="text-decoration: none; color: #3e6e2b; "></a><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; "><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s8.sinaimg.cn/orignal/5a6efa33gb2da6bddd1a7" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img src="http://s8.sinaimg.cn/middle/5a6efa33gb2da6bddd1a7&amp;690" real_src="http://s8.sinaimg.cn/middle/5a6efa33gb2da6bddd1a7&amp;690" width="553" height="314" name="image_operate_95481322551108877" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s6.sinaimg.cn/orignal/5a6efa33gb2da6e03b4b5" target="_blank" style="text-decoration: none; color: #3e6e2b; "></a><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s13.sinaimg.cn/orignal/5a6efa33gb2da6ee797dc" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img src="http://s13.sinaimg.cn/middle/5a6efa33gb2da6ee797dc&amp;690" real_src="http://s13.sinaimg.cn/middle/5a6efa33gb2da6ee797dc&amp;690" width="553" height="527" name="image_operate_83801322551344488" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br />&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr>&nbsp;Lion 10.7.2的主要功能之一，iCloud出来了。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; ">这个修改版起码小的升级都没有问题，而且常用的功能都使用正常，起码我的iphone连上了itunes<br />假如已经升级了，显然是无法启动的，那么可以用笔者以下的解决方案来解决。实现原理就是使用Windows PE盘进入系统，然后利用Transmac工具（至于为什么不用Macdrive，因为它不能在PE下使用，而且还不免费）打开系统盘/System/Library/Extensions/，将AppleLSIFusionMPT.kext替换，可能需要两次才能生效，但是此教程是一定能够成功的。图文教程如下；（当然也是从insanelymac学来的），我直接把重要的地方粘贴过来了（部分加上了细节）<br />*本文将利用到的工具*（Transmac和AppleLSIFusionMPT.kext文件）<br />下载地址:&nbsp;<a href="http://m1.mail.sina.com.cn/apps/netdisk/download.php?id=e6f5482c11f317df981ddb0f1307cfca" style="text-decoration: none; color: #3e6e2b; ">http://m1.mail.sina.com.cn/apps/netdisk/download.php?id=e6f5482c11f317df981ddb0f<wbr>1307cfca</a><br />Mac_OS_X_10.7.2系统替换文件和工具by_dehe1988.rar<br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s9.sinaimg.cn/orignal/5a6efa33gb2c60397c268" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_77191322463511528" src="http://s9.sinaimg.cn/middle/5a6efa33gb2c60397c268&amp;690" real_src="http://s9.sinaimg.cn/middle/5a6efa33gb2c60397c268&amp;690" width="625" height="461" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br />使用PE工具进入系统，本人使用的是&#8220;深山红叶&#8221;大神工具包。PS：各种PE系统都行，这个只是提供一个修改的环境！<br />&nbsp;<wbr><br /><br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s2.sinaimg.cn/orignal/5a6efa33gb2c6050ef8e1" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_38121322463519884" src="http://s2.sinaimg.cn/middle/5a6efa33gb2c6050ef8e1&amp;690" real_src="http://s2.sinaimg.cn/middle/5a6efa33gb2c6050ef8e1&amp;690" width="579" height="427" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br />系统界面<br />&nbsp;<wbr><br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s16.sinaimg.cn/orignal/5a6efa33gb2c608a8d51f" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_5321322463813171" src="http://s16.sinaimg.cn/middle/5a6efa33gb2c608a8d51f&amp;690" real_src="http://s16.sinaimg.cn/middle/5a6efa33gb2c608a8d51f&amp;690" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br /><br />输入下载地址。如果很懒，也可以先下载，再发送到自己的邮箱中，再登陆自己邮箱下载，貌似更复杂？<br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s5.sinaimg.cn/orignal/5a6efa33gb2c609ef8f64" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_54381322463607223" src="http://s5.sinaimg.cn/middle/5a6efa33gb2c609ef8f64&amp;690" real_src="http://s5.sinaimg.cn/middle/5a6efa33gb2c609ef8f64&amp;690" width="542" height="400" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br />文件约1.5MB，很好下载的！<br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s11.sinaimg.cn/orignal/5a6efa33gb2c60e4c27ba" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_7841322464207975" src="http://s11.sinaimg.cn/middle/5a6efa33gb2c60e4c27ba&amp;690" real_src="http://s11.sinaimg.cn/middle/5a6efa33gb2c60e4c27ba&amp;690" width="531" height="392" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br />Transmac的界面，该软件可以读取览苹果文件系统HFS+，而且可以在PE环境下运行。但Transmac默认只能读取，因此需要设置。&nbsp;<wbr><br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s7.sinaimg.cn/orignal/5a6efa33gb2c634480f96" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_41981322464438732" src="http://s7.sinaimg.cn/middle/5a6efa33gb2c634480f96&amp;690" real_src="http://s7.sinaimg.cn/middle/5a6efa33gb2c634480f96&amp;690" width="534" height="394" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br />容许读写打开。关闭，再一次打开就会生效了。<br />&nbsp;<wbr><br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s9.sinaimg.cn/orignal/5a6efa33gb2c611632c78" target="_blank" style="text-decoration: none; color: #3e6e2b; "></a><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s15.sinaimg.cn/orignal/5a6efa33gb2c638509e9e" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_74161322464332543" src="http://s15.sinaimg.cn/middle/5a6efa33gb2c638509e9e&amp;690" real_src="http://s15.sinaimg.cn/middle/5a6efa33gb2c638509e9e&amp;690" width="544" height="401" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br />找到/System/Library/Extensions/目录下，将AppleLSIFusionMPT.kext复制到此替换。</p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; "><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s10.sinaimg.cn/orignal/5a6efa33gb2c639c3af09" target="_blank" style="text-decoration: none; color: #3e6e2b; "></a><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s9.sinaimg.cn/orignal/5a6efa33gb2c63b322688" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_13801322464435189" src="http://s9.sinaimg.cn/middle/5a6efa33gb2c63b322688&amp;690" real_src="http://s9.sinaimg.cn/middle/5a6efa33gb2c63b322688&amp;690" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s3.sinaimg.cn/orignal/5a6efa33gb2c63c772302" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_9301322464399323" src="http://s3.sinaimg.cn/middle/5a6efa33gb2c63c772302&amp;690" real_src="http://s3.sinaimg.cn/middle/5a6efa33gb2c63c772302&amp;690" width="543" height="401" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; "><br />&nbsp;<wbr><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s11.sinaimg.cn/orignal/5a6efa33gb2c61332e9aa" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_56131322464429293" src="http://s11.sinaimg.cn/middle/5a6efa33gb2c61332e9aa&amp;690" real_src="http://s11.sinaimg.cn/middle/5a6efa33gb2c61332e9aa&amp;690" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; text-indent: 2em; "><a href="http://photo.blog.sina.com.cn/showpic.html#blogid=5a6efa330100x3sp&amp;url=http://s16.sinaimg.cn/orignal/5a6efa33gb2c63d9cc5bf" target="_blank" style="text-decoration: none; color: #3e6e2b; "><img name="image_operate_36161322464418123" src="http://s16.sinaimg.cn/middle/5a6efa33gb2c63d9cc5bf&amp;690" real_src="http://s16.sinaimg.cn/middle/5a6efa33gb2c63d9cc5bf&amp;690" width="536" height="301" alt="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" title="VMware虚拟机从Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.1更新到Mac&nbsp;&lt;wbr&gt;OS&nbsp;&lt;wbr&gt;Lion&nbsp;&lt;wbr&gt;10.7.2后无法正常启动解决方案" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; " /></a><br /><br /><br />&nbsp;</p></span><img src ="http://www.cppblog.com/lauer3912/aggbug/170356.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-07 14:24 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/07/170356.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>全民吃苹果，首发VirtualBOX安装Mac OS X 10.7正式版_可完美升级，无bug</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/07/170325.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Fri, 06 Apr 2012 23:45:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/07/170325.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/170325.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/07/170325.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/170325.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/170325.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 原文：http://ideapad.zol.com.cn/56/160_557572.html灵感来了的时候，挡也挡不住，这个是真的！昨晚一个很偶然的机会下，我使用Vmware 8 安装成功了Mac OS X 10.7（Lion）系统，实在是让人非常兴奋。再三申明，本人的电脑就是那种装黑苹果被判了死刑的电脑。关于死&#8212;&#8212;乔布斯是这么说的&#8220;没有人愿意死，即使想上天堂...&nbsp;&nbsp;<a href='http://www.cppblog.com/lauer3912/archive/2012/04/07/170325.html'>阅读全文</a><img src ="http://www.cppblog.com/lauer3912/aggbug/170325.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-07 07:45 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/07/170325.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VMware虚拟机更新Mac OS Lion 10.7.2后无法正常启动解决方案</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/07/170323.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Fri, 06 Apr 2012 23:32:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/07/170323.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/170323.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/07/170323.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/170323.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/170323.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 原文：http://ideapad.zol.com.cn/57/160_560764.html楼主我之前发过的Vmware 8和VirtualBOX 安装Lion的教程。1、全民吃苹果，首发VirtualBOX安装Mac OS X 10.7正式版_可完美升级，无bug&nbsp;http://ideapad.zol.com.cn/56/160_557572.html2、踏破铁鞋，Vmware 8完...&nbsp;&nbsp;<a href='http://www.cppblog.com/lauer3912/archive/2012/04/07/170323.html'>阅读全文</a><img src ="http://www.cppblog.com/lauer3912/aggbug/170323.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-07 07:32 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/07/170323.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>踏破铁鞋，Vmware 8完美安装Mac Lion狮子系统，CPU不支持虚拟化，键盘无响经验共享</title><link>http://www.cppblog.com/lauer3912/archive/2012/04/07/170322.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Fri, 06 Apr 2012 23:30:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/04/07/170322.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/170322.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/04/07/170322.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/170322.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/170322.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 原文：http://ideapad.zol.com.cn/56/160_557421.html本楼层&nbsp;是虚拟机设置贴子一楼是 Mac安装帖子二楼是 工具下载位置，希望童鞋不要和我抢沙发神舟A560P i7-D2（Windows 7 X64环境下，VMware 8.0正式版）虚拟机首尝MAC OS X 10.7 Lion系统成功，特将此好消息分享。2年了，终于我也装上了Mac，我也成功的尝...&nbsp;&nbsp;<a href='http://www.cppblog.com/lauer3912/archive/2012/04/07/170322.html'>阅读全文</a><img src ="http://www.cppblog.com/lauer3912/aggbug/170322.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-04-07 07:30 <a href="http://www.cppblog.com/lauer3912/archive/2012/04/07/170322.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Download Torrent and Hackintosh Versions of Mac OS X 10.8 Mountain Lion DP1</title><link>http://www.cppblog.com/lauer3912/archive/2012/03/18/168236.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sun, 18 Mar 2012 01:31:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/03/18/168236.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/168236.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/03/18/168236.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/168236.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/168236.html</trackback:ping><description><![CDATA[<p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Most of us would not have expected the next major version of Mac OS X so quickly this time. But, Apple has released the developer preview-1 of OS X 10.8 Mountain Lion recently.&nbsp; While people were talking about iPad 3 and iPhone 5, Mac desktop users surprised by latest OS from Apple (though it is not a final version for end users). Mac OS X 10.8 is still a developer preview version to run and test the new OS. You can directly download the official distribution of 10.8 if you have valid Apple developer ID.&nbsp; Here I&#8217;m sharing few useful links to download OS X 10.8 Mountain Lion without developer login.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">These files should be enough to run on normal Intel or virtual machines by using hackintosh methods.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Mountain Lion OS brings most of the features of iOS (iPad and iPhone) to desktop OS environment on top of existing Lion OS X 10.7. The major features of new OS include;</p><ul style="list-style-type: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; background-color: #ffffff; "><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Messages &#8211; replaces iChat to bring full iMessage support to the Mac</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Notification Center &#8211; just like iOS</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Share Sheets &#8211; allows easy sharing of links, videos, photos between apps</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">AirPlay mirroring &#8211; send wireless video to an Apple TV</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Notes</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Reminders</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Game Center</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Twitter Integration</li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Gatekeeper &#8211; anti-Malware app installation guard</li></ul><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">You can find out more information here at&nbsp;<a href="http://www.apple.com/macosx/mountain-lion/" target="_blank" style="color: #509ac9; ">official link to Mountain Lion.</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; text-align: center; "><a href="http://www.sysprobs.com/wp-content/uploads/2012/02/mountainlion.jpg" style="color: #509ac9; "><img title="mountain lion" src="http://www.sysprobs.com/wp-content/uploads/2012/02/mountainlion_thumb.jpg" alt="Hackintosh Versions of Mac OS X 10.8," width="547" height="309" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="https://developer.apple.com/technologies/mountain-lion/" rel="nofollow" target="_blank" style="color: #509ac9; ">Here is the link to download developer preview &#8211;1 of OS X 10.8 Mountain Lion</a>&nbsp;(you must have developer id to download form apple site)</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>How to Download Torrent and Hackintosh versions of Mac OS X 10.8 Mountain Lion</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">As I mentioned earlier, the official download works only with developer login. If you are trying to download though torrent sites, here is the good news.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>1) Untouched version</strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">This torrent should be working fine as per the comments on this torrent forum. I have just finished downloading this torrent, and will update you soon on how to install it on VMware or VirtualBox. This version is not modified (as mentioned&nbsp;<strong><em>&#8216;untouched&#8217;</em></strong>) to work on Hackintosh platform, but I&#8217;m hoping this will work with VMware and VirtualBox on Intel based Windows computers. I could see a comment saying he managed to install it on VMware successfully.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://thepiratebay.se/torrent/7037731/OS_X_10.8_Mountain_Lion_Developer_Preview_1_(Fixed)" rel="nofollow" target="_blank" style="color: #509ac9; ">Download link of torrent</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>2) Hackintosh Version</strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">On the same forum someone called this as Hackintosh version, but I&#8217;m not sure how it will be working.&nbsp; I think this image doesn&#8217;t require installation. Just you can restore to USB stick or virtual machine hard disk, install Chameleon bootloader and boot the Hackintosh or virtual machine. If this works as said, I&#8217;m sure that will save huge time and work around. I will have a try after few days once I succeeded with above original image.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://thepiratebay.se/torrent/7041615/10.8_Ready_for_USB_stick_image_Hackintosh" rel="nofollow" target="_blank" style="color: #509ac9; ">Download link of torrent</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://facebook.com/sysprobs" rel="nofollow" target="_blank" style="color: #509ac9; ">Stay tuned with Sysprobs</a>&nbsp;for more Hackintosh on VMware and VirtualBox of Mac OS X 10.8 Mountain Lion news.</p><h2>Recommended Posts</h2><ul style="list-style-type: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; background-color: #ffffff; "><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/manual-download-safari-5-1-4-download-for-windows-7" title="[Manual Download] Safari 5.1.4 Download for Windows 7" style="color: #509ac9; ">[Manual Download] Safari 5.1.4 Download for Windows 7</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/guide-how-to-boot-os-x-10-8-mountain-lion-dmg-on-vmware-workstation-with-windows-7" title="[Guide] How to Boot OS X 10.8 Mountain Lion DMG on VMware Workstation with Windows 7" style="color: #509ac9; ">[Guide] How to Boot OS X 10.8 Mountain Lion DMG on VMware Workstation with Windows 7</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/download-lion-os-x-10-7-3-combo-update-for-client-and-server-links-from-official-site" title="Download Lion OS X 10.7.3 Combo Update for Client and Server &#8211;  Links from Official Site" style="color: #509ac9; ">Download Lion OS X 10.7.3 Combo Update for Client and Server &#8211; Links from Official Site</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: static; "><a href="http://www.sysprobs.com/top-10-articles-of-sysprobs-in-2011-with-your-support-and-contribution" title="Top 10 Articles of Sysprobs in 2011 &#8211;  With Your Support and Contribution" style="color: #509ac9; ">Top 10 Articles of Sysprobs in 2011 &#8211; With Your Support and Contribution</a></li></ul><img src ="http://www.cppblog.com/lauer3912/aggbug/168236.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-03-18 09:31 <a href="http://www.cppblog.com/lauer3912/archive/2012/03/18/168236.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> How to Boot OS X 10.8 Mountain Lion DMG on VMware Workstation with Windows 7</title><link>http://www.cppblog.com/lauer3912/archive/2012/03/18/168235.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sun, 18 Mar 2012 01:29:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/03/18/168235.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/168235.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/03/18/168235.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/168235.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/168235.html</trackback:ping><description><![CDATA[<p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">This article explains how to create a bootable (Mac) OS X 10.8 mountain Lion image (and ISO) for VMware workstation on Intel based Windows 7 computer. Recently I have mentioned about&nbsp;<a href="http://www.sysprobs.com/download-mac-os-x-10-8-mountain-lion-torrent-and-hackintosh-versions" target="_blank" style="color: #509ac9; ">official 10.8 developer preview download and torrent download of latest OS</a>&nbsp;from Apple. The original DMG file can not be booted on any hackintosh methods. But, by using this guide we can prepare a bootable image of Mountain Lion OS X and start the installation on VMware workstation as guest virtual machine.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">This guide is nothing to do with Hackintosh on physical computer. I have tested on desktop virtualization software VMware workstation only. So, it will be useful to run the developer preview version of OS X 10.8 without disturbing your physical Operating Systems.&nbsp; Also, it is very safe, easy and possible to use with multiple Operating Systems simultaneously.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">OK, let&#8217;s come to our point. Here I&#8217;m explaining how to prepare the OS X 10.8 image and ISO which can be booted on VMware workstation with Intel based Windows computers. Usually the official dmg file should be used inside an existing Mac OS machine to install it in different partition (dual boot) or update the existing OS X. So, starting the installation on fresh virtual machine with same dmg file is not possible without doing few modifications.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">This method is exactly same which we used&nbsp;<a href="http://www.sysprobs.com/create-bootable-lion-os-installer-image-vmware-windows-intel-based-computers" target="_blank" style="color: #509ac9; ">earlier to prepare Lion OS X 10.7 bootable image</a>. Since I already explained each steps with Lion OS X earlier, I&#8217;m not going to repeat the same instructions here. Anyhow, keep reading&#8230;..</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>What You Need?</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>1)</strong>&nbsp;A working Snow Leopard or Lion OS X virtual machine on VMware or VirtualBox.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">More information available on how to&nbsp;<a href="http://www.sysprobs.com/fresh-snow-leopard-1064-installation-vmware-player-3-intel-amd-pc" target="_blank" style="color: #509ac9; ">install Snow Leopard on VMware,</a>&nbsp;<a href="http://www.sysprobs.com/install-mac-snow-leopard-1063-oracle-virtualbox-32-apple-intel-pc" target="_blank" style="color: #509ac9; ">VirtualBox</a>&nbsp;and&nbsp;<a href="http://www.sysprobs.com/working-method-install-mac-107-lion-vmware-windows-7-intel-pc" target="_blank" style="color: #509ac9; ">Lion OS X on VMware</a>,&nbsp;<a href="http://www.sysprobs.com/guide-mac-os-x-10-7-lion-on-virtualbox-with-windows-7-and-intel-pc" target="_blank" style="color: #509ac9; ">VirtualBox.</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>2)</strong>&nbsp;<a href="http://www.sysprobs.com/download-mac-os-x-10-8-mountain-lion-torrent-and-hackintosh-versions" target="_blank" style="color: #509ac9; ">Mountain Lion DMG file (Click here to read more)</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>Summary &#8211; What We Are Going to Do?</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>1)</strong>&nbsp;We will attach a new virtual hard disk (5GB) to existing Mac OS X virtual machine.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>2)</strong>&nbsp;Mount the Mountain Lion dmg file inside virtual machine.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>3)</strong>&nbsp;Restore the BaseSystem and packages (from downloaded dmg file) to newly attached virtual hard disk from virtual machine. Also few modifications.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>4)</strong>&nbsp;Now we can attach the &#8216;prepared&#8217; 5GB virtual hard disk to new virtual machine to boot and start the installation.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">That&#8217;s it. Its very easy.&nbsp;<strong><em>But please follow the instruction correctly</em></strong>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>Steps to Create Bootable OS X 10.8 Mountain Lion DMG on VMware Workstation</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>1)</strong>&nbsp;Attach a 5GB new virtual hard disk to working Mac OS X&nbsp; virtual machine. In this example, I&#8217;m doing it with&nbsp;<a href="http://www.sysprobs.com/install-and-run-lion-os-x-from-vmware-pre-installed-image" target="_blank" style="color: #509ac9; ">Lion OS X (10.7) VM on VMware workstation</a>, my host is Windows 7 32 bit.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2012/02/addeddisk.png" style="color: #509ac9; "><img title="added disk" src="http://www.sysprobs.com/wp-content/uploads/2012/02/addeddisk_thumb.png" alt="added disk" width="585" height="280" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>2)</strong>&nbsp;Start the VM. Initialize the disk and format the newly added 5GB external hard disk with following configuration.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>Single partition</strong>&nbsp;with &#8216;<strong>Mac OS X Extended (Journaled)&#8217;</strong>&nbsp;and&nbsp;<strong>&#8216;Apple Partition Map&#8217;</strong>&nbsp;type which is available under Options in below screen.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2012/02/createnewpartition.png" style="color: #509ac9; "><img title="create new partition" src="http://www.sysprobs.com/wp-content/uploads/2012/02/createnewpartition_thumb.png" alt="create new partition" width="573" height="424" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>3)</strong>&nbsp;Now, we need to mount the 10.8 installation file. As you are aware OS X 10.8 installation file is in DMG format which will not work directly with VMware workstation. I tried to convert the&nbsp;<a href="http://www.sysprobs.com/convert-mac-dmg-iso-windows" target="_blank" style="color: #509ac9; ">DMG file to ISO on Windows 7 host as mentioned earlier in Sysprobs</a>, but for some reasons&nbsp;<strong><em>it failed</em></strong>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">So, I have directly copied mountain Lion dmg file (using USB disk) into working Lion 10.7 virtual machine. Then mounted by double clicking the dmg file.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2012/02/mountingdmgfile.png" style="color: #509ac9; "><img title="mounting dmg file" src="http://www.sysprobs.com/wp-content/uploads/2012/02/mountingdmgfile_thumb.png" alt="mounting dmg file" width="425" height="391" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>4)</strong>&nbsp;Make sure its mounted properly. Check the listed volumes as shown below.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2012/02/mounteddisk.png" style="color: #509ac9; "><img title="mounted disk" src="http://www.sysprobs.com/wp-content/uploads/2012/02/mounteddisk_thumb.png" alt="mounted disk" width="546" height="166" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Above screen shows the mounted OS X 10.8 dmg file as<strong><em>&nbsp;&#8216;Mac OS X Install ESD&#8217;</em></strong>&nbsp;and my new hard disk which I formatted in Step 2 as<strong><em>&nbsp;&#8216;bootablelion&#8217;</em></strong>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>5)</strong>&nbsp;We are ready to start the restore and copy important packages process from mounted dmg file to new hard disk.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">As I said, the further steps clearly mentioned with screen shots earlier for Lion OS X (10.7).</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>Please&nbsp;</strong><a href="http://www.sysprobs.com/create-bootable-lion-os-installer-image-vmware-windows-intel-based-computers" target="_blank" style="color: #509ac9; "><strong>click here to visit the previous</strong></a><strong>&nbsp;guide and follow the steps carefully.</strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Also, you can create Mountain Lion bootable ISO file using the same method, which is&nbsp;<a href="http://www.sysprobs.com/video-create-bootable-lion-os-iso-file-dmg" target="_blank" style="color: #509ac9; ">clearly mentioned by these videos ( Click here)</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2><strong>IMPORTANT NOTE:</strong></h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">In previous guide, the new hard disk named as&nbsp;<strong>&#8216;LionInstaller&#8217;</strong>, but in this new example it is named as&nbsp;<strong>&#8216;bootablelion&#8217;</strong>. Also, when you restore the BaseSystem image, it&nbsp;<em><strong>may overwrite the partition name</strong></em>&nbsp;and you will get a new name as&nbsp;<strong>&#8216;Mac OS X Install ESD 1&#8217;</strong>. So, either rename the partition again before continue next steps or type the new name correctly on appropriate places while typing the commands.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>6)</strong>&nbsp;After new disk created properly, it can be attached to new virtual machine and start Mountain Lion installation. Please make sure,&nbsp;<a href="http://www.sysprobs.com/vmware-workstation-8-0-8-0-1-unlocker-to-run-mac-os-x-guest-in-windows-7" target="_blank" style="color: #509ac9; ">you have already applied VMware unlocker</a>&nbsp;to be able to run Mac OS X guest virtual machines on Windows platform.&nbsp;<a href="http://www.sysprobs.com/vmware-workstation-8-0-8-0-1-unlocker-to-run-mac-os-x-guest-in-windows-7" target="_blank" style="color: #509ac9; ">Check our earlier guide on VMware 8.0 and 8.0.1 unlocker.</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Here is the first screen booted by &#8216;prepared&#8217; 5GB hard disk on VMware workstation 8.0.1 on Windows 7 32 bit host.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">I will provide the step by step guide and additional required installation for Mountain Lion OS X 10.8 on VMware workstation in coming days.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2012/02/firstscreen.png" style="color: #509ac9; "><img title="first screen" src="http://www.sysprobs.com/wp-content/uploads/2012/02/firstscreen_thumb.png" alt="first screen" width="567" height="461" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">I&#8217;m sure this guide will be helpful to prepare the bootable image of Mountain Lion for VMware workstation and VM Player. Mostly this should work with Oracle VirtualBox too, but we need to find out the correct boot loader for that. I will keep searching for that and update in this blog later.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Have fun!</p><h2>Recommended Posts</h2><ul style="list-style-type: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; background-color: #ffffff; "><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/vmware-workstation-8-0-8-0-1-unlocker-to-run-mac-os-x-guest-in-windows-7" title="VMware Workstation 8.0/8.0.1 Unlocker to Run Mac OS X Guest in Windows 7" style="color: #509ac9; ">VMware Workstation 8.0/8.0.1 Unlocker to Run Mac OS X Guest in Windows 7</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/top-ten-articles-2010-virtualization-windows-7-sysprobs" title="The Top Ten Articles of 2010 in Virtualization and Windows 7 at Sysprobs" style="color: #509ac9; ">The Top Ten Articles of 2010 in Virtualization and Windows 7 at Sysprobs</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: static; "><a href="http://www.sysprobs.com/fresh-snow-leopard-1064-installation-vmware-player-3-intel-amd-pc" title="Fresh Snow Leopard 10.6.4 Installation on VMware Player 3 &#8211; Intel, AMD PC" style="color: #509ac9; ">Fresh Snow Leopard 10.6.4 Installation on VMware Player 3 &#8211; Intel, AMD PC</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/mac-snow-leopard-amd-pc-vmware-image" title="Mac Snow Leopard on AMD PC, by VMware Image" style="color: #509ac9; ">Mac Snow Leopard on AMD PC, by VMware Image</a></li></ul><img src ="http://www.cppblog.com/lauer3912/aggbug/168235.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-03-18 09:29 <a href="http://www.cppblog.com/lauer3912/archive/2012/03/18/168235.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Mac OS X 10.7 Lion on VirtualBox with Windows 7 and Intel PC</title><link>http://www.cppblog.com/lauer3912/archive/2012/03/18/168234.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sun, 18 Mar 2012 01:27:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/03/18/168234.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/168234.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/03/18/168234.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/168234.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/168234.html</trackback:ping><description><![CDATA[<p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Finally I managed to find out the working method to install and run latest Mac OS X 10.7 Lion on Oracle VirtualBox with normal Intel computer. The main issue every hackintosh users faced with Lion, is the boot loader to start the installation in normal PC or in any desktop virtualization software. Here I explain and demonstrate step by step method to install Mac OS X 10.7 Lion on VirtualBox in Windows 7 host Intel computer.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Please note this is just for testing and learning purpose only. This method is not recommended for production or long term use, also not all applications will be working on Mac Lion virtual machine as its not recommended by Apple company. Highly advisable to go with original Apple hardware and Mac OS to get the all features and power of Mac.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">OK, I demonstrate these steps in my Windows 7 32 Bit computer with Oracle VirtualBox 4.1.2.</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>My PC Configurations.</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Intel Core2Duo 2.66GHz, 3GB RAM on Host and Windows 7 32 Bit Operating System. Hardware Virtualization Technology (VT) is enabled in the host processor and processor is 64 bit ready.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>What You Need?</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>1)</strong>&nbsp;Oracle VirtualBox 4.1 or later.&nbsp; (<a href="http://www.sysprobs.com/oracle-virtualbox-extension-pack-4-1-and-4-1-2-download-and-install" style="color: #509ac9; ">Install the latest VirtualBox extension pack also</a>)</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>2)</strong>&nbsp;The pre created Lion OS X installation disk. This is the very important part in this installation. The ordinary installation DMG file you download from Apple or any torrent sites will not work here. We need to modify some packages and create a new disk which can be booted in VirtualBox or VMware.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">For this process, you must have a working Snow Leopard on physical or virtual machine.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">The procedure is already covered in Sysprobs clearly, please check&nbsp;<a href="http://www.sysprobs.com/create-bootable-lion-os-installer-image-vmware-windows-intel-based-computers" style="color: #509ac9; ">this guide on creating bootable Lion OS X disk</a>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">I have used this pre created disk to boot and install&nbsp;<a href="http://www.sysprobs.com/working-method-install-mac-107-lion-vmware-windows-7-intel-pc" style="color: #509ac9; ">Lion OS X in VMware workstation, which is already covered here</a>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong><em><span style="text-decoration: underline; ">The bootable Lion OS X disk can be created by two methods,</span></em></strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>a)</strong>&nbsp;Create as a VMDK or VDI file. So this file can be attached to the virtual machine as the first disk to boot the Lion OS. This file can be used in VMware and VirtualBox whenever needed.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Follow the steps&nbsp;<a href="http://www.sysprobs.com/create-bootable-lion-os-installer-image-vmware-windows-intel-based-computers" style="color: #509ac9; ">here to create bootable Lion OS X VMDK (or VDI) file</a>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>b)</strong>&nbsp;Create an ISO file. This is also ideal method to use with all virtualization software and physical computer also.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">One of my reader created a nice video on&nbsp;<a href="http://www.sysprobs.com/video-create-bootable-lion-os-iso-file-dmg" style="color: #509ac9; ">creating bootable Lion OS X ISO file from DMG</a>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><object width="590" height="360" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" style="height: 390px; width: 590px; "><embed width="590" height="360" type="application/x-shockwave-flash" src="http://www.youtube.com/v/3pC4uYCjE5s?version=3" allowfullscreen="true" allowscriptaccess="always" style="height: 390px; width: 590px; "></object></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>3)</strong>&nbsp;Minimum 1GB memory to Virtual machine.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>4)</strong>&nbsp;VT and 64bit supported processor.&nbsp;<a href="http://www.sysprobs.com/disable-enable-virtualization-technology-bios" style="color: #509ac9; ">Check this guide and make sure your processor supports these features</a>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>5)</strong>&nbsp;<a href="http://www.mediafire.com/file/ue5d849o5odp9lt/HackBoot_Lion.zip" rel="nofollow" target="_blank" style="color: #509ac9; ">Download the boot loader</a>&nbsp;which can boot the Lion OS in VirtualBox (HackBoot.iso which is uploaded by me, no virus.)</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">&nbsp;</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>How to Install Lion OS X on VirtualBox</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>1)</strong>&nbsp;Double check the VT support and 64Bit in BIOS. If its not enabled, then enable it in BIOS and make sure the host Operating System is detecting it.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/disable-enable-virtualization-technology-bios" style="color: #509ac9; ">Check this guide on how to enable VT in BIOS</a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>2)</strong>&nbsp;Create a new virtual machine.&nbsp;<strong>OS is Mac OS X</strong>&nbsp;, the version should be&nbsp;<strong>&#8220;64bit</strong>&#8221;. Do not ask me why, because normal 32bit version did not work on my computer.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/OStype.png" style="color: #509ac9; "><img title="OS type" src="http://www.sysprobs.com/wp-content/uploads/2011/09/OStype_thumb.png" alt="Lion OS X 64bit version" width="555" height="187" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>3)</strong>&nbsp;Set the memory size to 1GB or more than that, 2GB is recommended.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>4)</strong>&nbsp;Create a virtual hard disk, minimum is 20GB.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>5)</strong>&nbsp;Here is System settings.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">You can deselect the floppy drive.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Make sure&nbsp;<strong>&#8216;Enable IO APIC&#8221;</strong>&nbsp;and others are selected as shown below.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>Remove the Enable EFI option</strong>. Leave the ICH9 chipset as default.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/SystemSettings.png" style="color: #509ac9; "><img title="System Settings" src="http://www.sysprobs.com/wp-content/uploads/2011/09/SystemSettings_thumb.png" alt="Mac OS X 10.7 System Settings in virtualbox" width="563" height="417" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Under Acceleration,&nbsp;<strong>&#8220;Enable VT-x/AMD-V&#8221;</strong>&nbsp;and&nbsp;<strong>&#8220;Enable Nested Paging&#8221;</strong>&nbsp;should be enabled. If Acceleration tab is missing in your VirtualBox settings, it means VT is not enabled in host computer BIOS.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/acceleration.png" style="color: #509ac9; "><img title="acceleration" src="http://www.sysprobs.com/wp-content/uploads/2011/09/acceleration_thumb.png" alt="desktop virtualization software" width="568" height="176" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>Processor Settings.</strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">This is slightly tricky. My processor is Core2Duo, so I could select 2 processors. Unfortunately during the installation the virtual machine crashed. I had to put it back to 1 processor (core). If you are using Intel i-series processor you can increase the number up to 4. Increase to maximum and try, if it doesn&#8217;t work then try with single core (1 processor).</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>6)</strong>&nbsp;Attach the bootable ISO or VMDK file to virtual machine. In all cases we have to set Hackboot.iso in CD drive and boot with it.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">If you are trying to install with bootable VMDK file (which I did), here is the setup.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/Storagesettings.png" style="color: #509ac9; "><img title="Storage settings" src="http://www.sysprobs.com/wp-content/uploads/2011/09/Storagesettings_thumb.png" alt="lion on virtualbox" width="578" height="259" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong><em>If you are going to try with ISO file, then you do not need to add the &#8216;bootabelhdd.vmdk&#8217; file.</em></strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>7)</strong>&nbsp;Start the Lion OS X virtual machine now in VirtualBox.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">It will boot with HackBoot.iso file.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">If it&#8217;s from VMDK file, select the disk by pressing right arrow key in keyboard and press ENTER.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/firstbootloaderscreen.png" style="color: #509ac9; "><img title="first boot loader screen" src="http://www.sysprobs.com/wp-content/uploads/2011/09/firstbootloaderscreen_thumb.png" alt="lion boot loader for virtualbox" width="582" height="470" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong><em>If you are trying with ISO file, then once the above screen loaded, click on the CD icon of VirtualBox console and browse the Lion bootable ISO file. Wait for 5 seconds and press F5 to refresh the loaded CD, select it and press ENTER to start the installation.</em></strong></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>8.)</strong>&nbsp;Are you lucky enough? The first screen should start normally. Select the language and continue.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>9)</strong>&nbsp;If you do not see the virtual hard disk to install, then it should be created in&nbsp;<strong>Disk Utility</strong>&nbsp;during the installation. Click on&nbsp;<strong><em>&#8216;Utilities&#8217; and select &#8216;Disk Utility&#8217;</em></strong>.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/createpartitiontoinstall.png" style="color: #509ac9; "><img title="create partition to install" src="http://www.sysprobs.com/wp-content/uploads/2011/09/createpartitiontoinstall_thumb.png" alt="create partition to install" width="601" height="212" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Press Apply and close the disk utility box. Now you should be able to see and select the newly created partition for installation. Select and begin the process.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>10)</strong>&nbsp;After the installation automatic restart will be attempted&nbsp;<strong><em>but it will not work here</em></strong>. The virtual machine will stop with following screen which is ready for manual restart.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/rebootscreen.png" style="color: #509ac9; "><img title="reboot screen" src="http://www.sysprobs.com/wp-content/uploads/2011/09/rebootscreen_thumb.png" alt="reboot screen" width="386" height="163" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Reset the virtual machine from menu. It may give a guru meditation error sometimes. Do not worry, just close the virtual machine.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">We need to start the VM now,&nbsp;<strong>so load the HackBoot.iso file again to CD drive</strong>&nbsp;if it was removed during the installation. Incase virtual machine hangs with ash color screen now, again restart.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>11)</strong>&nbsp;After few initial settings, you must land on working Lion OS X desktop in VirtualBox.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><a href="http://www.sysprobs.com/wp-content/uploads/2011/09/workinglionosxinvirtualbox.png" style="color: #509ac9; "><img title="working lion os x in virtualbox" src="http://www.sysprobs.com/wp-content/uploads/2011/09/workinglionosxinvirtualbox_thumb.png" alt="working lion os x in virtualbox" width="573" height="467" border="0" style="max-width: 98%; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></a></p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">The performance of Lion OS X in VirtualBox is manageable. I could play around with few new changes and applications. Still there are few small drawbacks and issues on method. I will try my best to find out the solutions to fix them in future.</p><blockquote style="background-color: #ffffff; clear: both; margin-top: 5px; margin-right: 15px; margin-bottom: 20px; margin-left: 15px; padding-top: 3px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; "><h2>You must consider two issues now,</h2></blockquote><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>a)</strong>&nbsp;<strong>Shutting down and restart the Lion VM</strong>- This will not happen automatically. Once the black screen appears (<em>Shown in Step 10</em>), it&#8217;s safe to shutdown or reset from VirtualBox menu.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; "><strong>b)</strong>&nbsp;Ab<strong>out the Mac</strong>&nbsp;&#8211; If you try &#8216;About the Mac&#8217; inside virtual machine, it will not work. The virtual machine may crash.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">I hope this guide would be helpful to install Mac OS X 10.7 Lion on VirtualBox with normal Intel computer with Windows 7, Vista or Windows XP. I&#8217;m NOT sure how this will work on AMD computer. Please someone leave comment about AMD processor.&nbsp; Your responses are highly expected.</p><p style="color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; background-color: #ffffff; ">Have fun.</p><h2>Recommended Posts</h2><ul style="list-style-type: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; color: #444444; font-family: Arial, Helvetica, Tahoma, sans-serif; font-size: 15px; line-height: 20px; background-color: #ffffff; "><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/manual-download-safari-5-1-4-download-for-windows-7" title="[Manual Download] Safari 5.1.4 Download for Windows 7" style="color: #509ac9; ">[Manual Download] Safari 5.1.4 Download for Windows 7</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/guide-how-to-boot-os-x-10-8-mountain-lion-dmg-on-vmware-workstation-with-windows-7" title="[Guide] How to Boot OS X 10.8 Mountain Lion DMG on VMware Workstation with Windows 7" style="color: #509ac9; ">[Guide] How to Boot OS X 10.8 Mountain Lion DMG on VMware Workstation with Windows 7</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://www.sysprobs.com/download-mac-os-x-10-8-mountain-lion-torrent-and-hackintosh-versions" title="Download Torrent and Hackintosh Versions of Mac OS X 10.8 Mountain Lion DP1" style="color: #509ac9; ">Download Torrent and Hackintosh Versions of Mac OS X 10.8 Mountain Lion DP1</a></li><li style="list-style-type: square; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: static; "><a href="http://www.sysprobs.com/download-lion-os-x-10-7-3-combo-update-for-client-and-server-links-from-official-site" title="Download Lion OS X 10.7.3 Combo Update for Client and Server &#8211;  Links from Official Site" style="color: #509ac9; ">Download Lion OS X 10.7.3 Combo Update for Client and Server &#8211; Links from Official Site</a></li></ul><img src ="http://www.cppblog.com/lauer3912/aggbug/168234.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-03-18 09:27 <a href="http://www.cppblog.com/lauer3912/archive/2012/03/18/168234.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VirtualBox虚拟机安装Mac OS X Lion</title><link>http://www.cppblog.com/lauer3912/archive/2012/03/18/168233.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Sun, 18 Mar 2012 01:26:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/03/18/168233.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/168233.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/03/18/168233.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/168233.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/168233.html</trackback:ping><description><![CDATA[<div post="" type-post="" status-publish="" format-standard="" hentry="" category-experience="" tag-mac-os="" tag-virtualbox=""  tag-xps"="" id="post-961" style="font-family: 'Microsoft Yahei', Tahoma, Helvetica, Arial, SimSun, sans-serif; background-color: #eeeeee; "><h1>VirtualBox虚拟机安装Mac OS X Lion</h1><div style="font-size: 12px; padding-bottom: 5px; clear: both; ">2011-11-17</div><div id="post_content" style="padding-top: 10px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">之前发过了<a href="http://hhriver.com/xps17/" target="_blank" style="text-decoration: none; color: #004499; ">XPS17评测</a>，这几天突然又想念Mac OS了，刚好<a href="http://hhriver.com/windows-8/" target="_blank" style="text-decoration: none; color: #004499; ">装 Windows 8时用了VirtualBox虚拟机</a>，拿出来装Mac OS X Lion。</p><h4><strong>背景</strong></h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">我的笔记本型号为XPS17，i7-2630QM，GT-555M，4GB内存。</p><h4><strong>准备</strong></h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">VirtualBox是一款开源虚拟机，如果你还没有，下载地址：<a href="https://www.virtualbox.org/wiki/Downloads" style="text-decoration: none; color: #004499; font-size: 13px; line-height: 18px; ">https://www.virtualbox.org/wiki/Downloads</a>（Windows下点VirtualBox for Windows hosts后面那个&#8220;<a href="http://download.virtualbox.org/virtualbox/4.1.4/VirtualBox-4.1.4-74291-Win.exe" style="text-decoration: none; color: #004499; font-size: 13px; line-height: 18px; ">x86/amd64</a><span style="font-size: 13px; line-height: 18px; ">&#8221;）。安装自不必说。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">安装Mac OS X Lion所需要的两个ISO：<a href="http://hhriver.com/wp-content/uploads/2011/11/VisualBox%E5%AE%89%E8%A3%85Lion%E5%B7%A5%E5%85%B7%E5%8C%850.doc" style="text-decoration: none; color: #004499; ">VisualBox安装Lion工具包(rar)</a>(我这主机传不了RAR文件，下载后手工将扩展名由DOC改为RAR后解压)</p><h4>新建虚拟机</h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">运行VirtualBox&#8212;&#8212;新建&#8212;&#8212;下一步&#8212;&#8212;操作系统选择Mac OS X，版本选择Mac OS X Server（64bit）</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image002" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image002_thumb1.png" alt="clip_image002" width="583" height="436" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">下一步&#8212;&#8212;（内存建议分配2GB或更多）&#8212;&#8212;下一步</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image003" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image003_thumb1.png" alt="clip_image003" width="575" height="311" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">都用默认设置，通通选下一步</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image005" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image005_thumb1.png" alt="clip_image005" width="578" height="248" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">硬盘20GB应该差不多了&#8212;&#8212;下一步&#8212;&#8212;creat（创建虚拟机），创建完成。</p><h4>设置虚拟机</h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">选中已经创建好的虚拟机，点设置。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong>关键点：照图设置</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image007" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image007_thumb1.png" alt="clip_image007" width="589" height="353" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong>把软驱和EFI</strong><strong>前面的勾去掉。</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">后面就随意了，CPU数量根据自己的配置多分配几个吧。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">显存拉到128MB，2D和3D加速都勾起来。（2D貌似不可用）</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong>进入Storage</strong><strong>选项，点击CD/DVD</strong><strong>&nbsp;Drive</strong><strong>右边再右边的那个光盘状图标，选择下载的那个Mac OS X lion&nbsp;</strong><strong>的系统ISO</strong><strong>文件（不是图中这个）</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong><img title="clip_image009" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image009_thumb1.png" alt="clip_image009" width="602" height="472" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">确定保存设置。</p><h4>安装Mac OS X Lion</h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">选中虚拟机点，点击开始。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">说明：各步骤中如出现黑底白字不要紧张，正常情况。如鼠标变为彩色旋转圆形说明卡住了，关了重来。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image010" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image010_thumb1.png" alt="clip_image010" width="343" height="229" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">出现如图状态，敲回车，开始安装。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">选择语言（没用过的同学推荐中文）。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">点击上方的实用工具&#8212;&#8212;磁盘工具&#8212;&#8212;选择&#8220;抹掉&#8221;（格式为Mac OS扩展（日志式），名称随意）</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: center; "><img title="clip_image007" src="http://hhriver.com/wp-content/uploads/2011/11/12-s.png" alt="clip_image007" width="450" height="282" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-style: initial; border-color: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">然后就能选择磁盘了。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image012" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image012_thumb1.png" alt="clip_image012" width="351" height="211" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">经过十几分钟的安装后就完成了。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Apple账号和地址什么的随意啦，可不填。</p><h4><strong>更换引导工具</strong></h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">关闭系统，进入虚拟机设置，点选CD图标，更改为HJMac.iso（在下载的那个RAR里）</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image014" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image014_thumb1.png" alt="clip_image014" width="515" height="404" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">确定，完成。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">运行虚拟机，看到以下画面：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image016" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image016_thumb1.png" alt="clip_image016" width="512" height="419" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">用键盘换至右边，回车，顺利开机。</p><h4>说明</h4><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">需要关闭Mac OS X Lion系统时可关机，或直接强制关闭虚拟机，每次都需要利用引导工具开机。调节分辨率的方法见底部。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">两张运行画面：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image018" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image018_thumb1.png" alt="clip_image018" width="597" height="338" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img title="clip_image020" src="http://hhriver.com/wp-content/uploads/2011/11/clip_image020_thumb1.png" alt="clip_image020" width="592" height="335" border="0" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; display: inline; margin-left: auto; margin-right: auto; max-width: 640px; background-image: none; padding-left: 0px; padding-right: 0px; padding-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">另：虚拟机会运行在1024*768分辨率下，如果你想更改分辨率以便全屏显示，看这个：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a href="http://hhriver.com/virtualbox-resolution/" target="_blank" style="text-decoration: none; color: #004499; ">修改VirtualBox虚拟机中Mac OS X Lion的系统分辨率</a></p></div><div style="font-size: 12px; padding-bottom: 5px; clear: both; ">作者：HH | 分类：<a href="http://hhriver.com/category/experience/" title="View all posts in 经验" rel="category tag" style="text-decoration: none; color: #45525f; ">经验</a>&nbsp;| 标签：&nbsp;<a href="http://hhriver.com/tag/mac-os/" rel="tag" style="text-decoration: none; color: #45525f; ">Mac OS</a>、<a href="http://hhriver.com/tag/virtualbox/" rel="tag" style="text-decoration: none; color: #45525f; ">VirtualBox</a>、<a href="http://hhriver.com/tag/xps/" rel="tag" style="text-decoration: none; color: #45525f; ">XPS</a></div></div><div id="comments" style="margin-top: 30px; font-family: 'Microsoft Yahei', Tahoma, Helvetica, Arial, SimSun, sans-serif; background-color: #eeeeee; "><h3>7 Comments</h3><ol style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; border-top-width: 1px; border-top-style: solid; border-top-color: #f6f6f6; "><li even="" thread-even="" depth-1=""  parent"="" id="comment-492" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #cccccc; "><div id="div-comment-492"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite>suajun</cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-492" style="text-decoration: none; color: #999999; ">2012-03-06 at 17:00</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">按步骤下来卡在starting darwin x86 后黑屏，求解。</p><div style="padding-bottom: 10px; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/?replytocom=492#respond" style="text-decoration: none; color: #5d6673; ">Reply</a></div></div><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; "><li byuser="" comment-author-admin="" bypostauthor="" odd="" alt="" depth-2=""  parent"="" id="comment-496" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 20px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #fff6ed; border-bottom-width: initial; border-bottom-style: none; border-bottom-color: initial; border-top-width: 1px; border-top-style: dashed; border-top-color: #cccccc; background-position: initial initial; background-repeat: initial initial; "><div id="div-comment-496"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite><a href="http://hhriver.com/" rel="external nofollow" style="text-decoration: none; color: #5d6673; ">HH</a></cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-496" style="text-decoration: none; color: #999999; ">2012-03-06 at 22:32</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">我在数台不一样的电脑上都试过的，请检查步骤，重新来过。。。<br />PS：starting darwin x86是哪一步。。。</p><div style="padding-bottom: 10px; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/?replytocom=496#respond" style="text-decoration: none; color: #5d6673; ">Reply</a></div></div><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; "><li even="" depth-3=""  parent"="" id="comment-500" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 20px; border-bottom-width: initial; border-bottom-style: none; border-bottom-color: initial; border-top-width: 1px; border-top-style: dashed; border-top-color: #cccccc; "><div id="div-comment-500"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite>suajun</cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-500" style="text-decoration: none; color: #999999; ">2012-03-07 at 12:41</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">安装盘install DVD进去之后，跳数据Read HFS几秒钟后到starting darwin x86卡死黑屏。一切按步骤来了，除了只分配1GB内存。</p><div style="padding-bottom: 10px; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/?replytocom=500#respond" style="text-decoration: none; color: #5d6673; ">Reply</a></div></div><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; "><li byuser="" comment-author-admin="" bypostauthor="" odd="" alt="" depth-4=""  parent"="" id="comment-503" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 20px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-bottom-width: initial; border-bottom-style: none; border-bottom-color: initial; border-top-width: 1px; border-top-style: dashed; border-top-color: #cccccc; "><div id="div-comment-503"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite><a href="http://hhriver.com/" rel="external nofollow" style="text-decoration: none; color: #5d6673; ">HH</a></cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-503" style="text-decoration: none; color: #999999; ">2012-03-07 at 15:47</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">说到starting darwin x86我有印象了，我肯定碰到过，但我不太记得最后是怎么回事了。。。<br />如果还没用引导工具、就开始starting darwin x86，很可能是CPU等硬件配备的影响，是否为AMD处理器？是否是64位处理器？</p><div style="padding-bottom: 10px; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/?replytocom=503#respond" style="text-decoration: none; color: #5d6673; ">Reply</a></div></div><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; "><li even=""  depth-5"="" id="comment-504" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 20px; border-bottom-width: initial; border-bottom-style: none; border-bottom-color: initial; border-top-width: 1px; border-top-style: dashed; border-top-color: #cccccc; "><div id="div-comment-504"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite>suajun</cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-504" style="text-decoration: none; color: #999999; ">2012-03-07 at 16:33</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">AMD Athlon(tm) Neo X2 Dual Core Processor L325(1500 Mhz) 64bit 看来是配置的问题，哎，放弃了。</p><div style="padding-bottom: 10px; font-size: 12px; "></div></div></li></ul></li></ul></li></ul></li></ul></li><li odd="" alt="" thread-odd="" thread-alt="" depth-1=""  parent"="" id="comment-497" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #cccccc; "><div id="div-comment-497"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite>Jackie</cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-497" style="text-decoration: none; color: #999999; ">2012-03-07 at 09:34</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">我到安装Mac OS X Lion那一步，点开始，屏幕刷了几页的后，电脑都自动重启了！</p><div style="padding-bottom: 10px; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/?replytocom=497#respond" style="text-decoration: none; color: #5d6673; ">Reply</a></div></div><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; "><li byuser="" comment-author-admin="" bypostauthor="" even=""  depth-2"="" id="comment-498" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 5px; padding-bottom: 0px; padding-left: 20px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #fff6ed; border-bottom-width: initial; border-bottom-style: none; border-bottom-color: initial; border-top-width: 1px; border-top-style: dashed; border-top-color: #cccccc; background-position: initial initial; background-repeat: initial initial; "><div id="div-comment-498"><div vcard"="" style="float: left; line-height: 24px; height: 24px; font-size: 12px; margin-bottom: 10px; "><cite><a href="http://hhriver.com/" rel="external nofollow" style="text-decoration: none; color: #5d6673; ">HH</a></cite></div><div commentmetadata"="" style="float: right; font-size: 12px; "><a href="http://hhriver.com/virtualbox-mac-os-x-lion/comment-page-1/#comment-498" style="text-decoration: none; color: #999999; ">2012-03-07 at 10:59</a></div><p style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; clear: both; ">如果VirtualBox能让电脑重启&#8212;&#8212;那肯定是别的问题。。。</p></div></li></ul></li></ol></div><img src ="http://www.cppblog.com/lauer3912/aggbug/168233.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-03-18 09:26 <a href="http://www.cppblog.com/lauer3912/archive/2012/03/18/168233.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>developer id未认证的解决方法</title><link>http://www.cppblog.com/lauer3912/archive/2012/03/06/167254.html</link><dc:creator>RTY</dc:creator><author>RTY</author><pubDate>Tue, 06 Mar 2012 09:34:00 GMT</pubDate><guid>http://www.cppblog.com/lauer3912/archive/2012/03/06/167254.html</guid><wfw:comment>http://www.cppblog.com/lauer3912/comments/167254.html</wfw:comment><comments>http://www.cppblog.com/lauer3912/archive/2012/03/06/167254.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/lauer3912/comments/commentRss/167254.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lauer3912/services/trackbacks/167254.html</trackback:ping><description><![CDATA[<div><div>This certificate was signed by an unknown authority&nbsp;</div><div>尝试安装新的Developer ID certificates时，显示："This certificate was signed by an unknown authority，为什么？</div><div>When I try and install the new Developer ID certificates to keychain it claims "This certificate was signed by an unknown authority" I have tried recreating the Developer ID's and am having the same issue?&nbsp;</div><div></div><div>解决方案：</div><div>你还需要中间证书</div><div>在member center的certificate页面最顶端，你会看到一个Developer ID Intermedia Certificate链接。直接下载这个证书，导入到Keychain就行了</div><div>Been there... you need the intermediate certifcate as well. Just navigate to the top-level of the certificate pages in the Member Center and you'll see a link "Developer ID Intermediate Certificate". That's downloads the cert directecly, import into Keychain and you're away.&nbsp;</div><div></div><div></div><div></div><div>苹果开发者论坛，需要注册帐号：</div><div>https://devforums.apple.com/</div><div></div><div>OS X Mountain Lion Developer Preview</div><div>https://devforums.apple.com/community/mac/pre?view=discussions&nbsp;</div></div><img src ="http://www.cppblog.com/lauer3912/aggbug/167254.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lauer3912/" target="_blank">RTY</a> 2012-03-06 17:34 <a href="http://www.cppblog.com/lauer3912/archive/2012/03/06/167254.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>