-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Xcode 4.3 ships from ADC as an .app bundle on a .dmg.  This suggests
to users that they don't _have_ to install in /Applications if they
don't really want to. :-)  (The App Store version installs in
/Applications).

Currently, in fink-0.32.3, we're using the following test (courtesy of
Daniel Johnson):

        my $result = `defaults read /Applications/Xcode.app/Contents/version
CFBundleShortVersionString 2>&1`;
        if ($?) {
                $result = `defaults read
/Developer/Applications/Xcode.app/Contents/version
CFBundleShortVersionString 2>&1`;
        }
...

i.e. start by looking at Xcode 4.3 and fall back to earlier versions.

However, we have an opportunity not to hardcode the location of
Xcode.app.  The location of the Developer folder appears to be
accessible via 'xcode-select -version' from Xcode 3.1 through Xcode 4.3.

$ uname -v ; xcodebuild -version | head -n1 ; xcode-select -print-path
Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:01 PDT 2009;
root:xnu-1228.15.4~1/RELEASE_PPC
Xcode 3.1.4
/Developer

$ uname -v ; xcodebuild -version | head -n1 ; xcode-select -print-path
Darwin Kernel Version 11.3.0: Thu Jan 12 18:48:32 PST 2012;
root:xnu-1699.24.23~1/RELEASE_I386
Xcode 4.3
/Applications/Xcode.app/Contents/Developer

It's probably easiest just to replace the Xcode 4.3+ check:

$ defaults read `xcode-select -print-path`/../version
CFBundleShortVersionString 2>&1
4.3

As Jack Howarth has pointed out, users who upgrade still need to run
"sudo xcode-select -switch /Applications/Xcode.app" manually even with
the simple install from the App Store to get the CLI apps from Xcode
4.3 to work properly.

It doesn't seem like it would be that much harder for them to run
"sudo xcode-select -switch /path/to/Xcode.app".  And as Jack suggested
(essentially), it might be worth having an internal check for any
build operation to make sure that the path given by "xcode-select
- -print-path" is present, and to warn the user if it isn't.

Thoughts?
- -- 
Alexander Hansen, Ph.D.
Fink User Liaison
http://finkakh.wordpress.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8+tgEACgkQB8UpO3rKjQ/v4wCfUMBSf9CF1ZwRw3ZBv6FV+eXP
Y6EAn2GkFd52mLMawRFRbH7hmJEd/UxK
=czF4
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to