开发者

Install both Xcode 3 and Xcode 4 headless

I would like to install both Xcode 3 and Xcode 4 on the same OS instance using the headless install mode (I cannot VPN). Xcode3 should be installed in a folder denoted Developer3, Xcode4 in Developer4.

I've executed the Xcode installer with -showChoicesXML (sudo installer -showChoicesXML -pkg "Xcode and iOS SDK.mpkg" -target mytarget) trying to see if I can customize the default folder - I haven't found a开发者_StackOverflownything helpful.

Is it safe to install Xcode in the /Developer folder and after that to rename the folder to another name? It might be a solution, but I suppose it will not work properly.

Thanks.


It is safe to rename the /Developer folder to something else after installation and use xcode-select to switch the active version of the developer tools when working on the command-line.

Also, you should install Xcode 4 after Xcode 3, as only one version of the UNIX tools (installed in /usr) can exist on a system.


I found a way to do it...I had to do changes directly into the installer script. The script is below. I will try to rename the folder as the other user suggested btw.

sudo hdiutil mount xcode_3.2.5_and_ios_sdk_4.2_final.dmg
cp -R /Volumes/Xcode /tmp/xcodetemp
sed 's,/Developer/,/Developer3_2_5/,' "/tmp/xcodetemp/Xcode for Snow Leopard.mpkg/Contents/iPhoneSDKSL.dist" > "/tmp/xcodetemp/Xcode for Snow Leopard.mpkg/Contents/iPhoneSDKSL.dist"
sudo installer -pkg  "tmp/xcodetemp/Xcode for Snow Leopard.mpkg" -target /Volumes/Macintosh\ HD
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜