Install both Xcode 3 and Xcode 4 without a head

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

I installed Xcode using -showChoicesXML (sudo installer -showChoicesXML -pkg "Xcode and iOS SDK.mpkg" -target mytarget), trying to determine if I can configure the default folder - I did not find anything useful,

Is it safe to install Xcode in the / Developer folder and then rename the folder to a different name? It may be a solution, but I believe that it will not work properly.

Thanks.

+6
source share
2 answers

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

In addition, you must install Xcode 4 after Xcode 3, since only one version of UNIX tools (installed in /usr ) can exist on the system.

+2
source

I found a way to do this ... I had to make changes directly in the installer script. the script is below. I will try to rename the folder as another user suggested.

 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 
+1
source

Source: https://habr.com/ru/post/897667/


All Articles