Where is pngcrush for Xcode 4.3?
Asked Answered
T

4

12

There was an Apple-customized version of pngcrush in every version of Xcode before 4.3. I can't find it in Xcode 4.3. Is it still available as a standalone exe file?

Another related question: where are the files from Command Line Tools for Xcode installed?

Triphylite answered 18/2, 2012 at 2:36 Comment(0)
R
20

The best way to find it is to use the xcrun tool.

xcrun -sdk iphoneos5.0 -find pngcrush will print the path on stdout while xcrun -sdk iphoneos5.0 pngcrush will actually execute the command for you.

See man xcrun for more info.

Ramp answered 22/2, 2012 at 3:23 Comment(3)
Glad to help. It is nice because it saves you having to hardcode paths. In theory you shouldn't have to specify the sdk but it wasn't working for me without it. You can use xcodebuild -showsdks to get a list of the ones currently installed.Ramp
I wish there are introductions for Command Line Tools for Xcode in Xcode docs.Triphylite
notice that you have to check your iphoneos version: mine for exmaple was 5.1 so I did xcrun -sdk iphoneos5.1 pngcrushBelding
I
5

If you are using app crush.rb with Xcode 4.3, and you get the error:

sh: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush: No such file or directory

As Yozone said, change the first declaration to:

pngcrush = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush'

That will point to the new location of the Xcode files.

Inevasible answered 21/2, 2012 at 19:36 Comment(0)
F
2

The pngcrush is under /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin

Feathery answered 21/2, 2012 at 5:20 Comment(2)
Thanks! Do you know where are the additional Command Line Tools for Xcode installed?Triphylite
Here is two ways to install the Command Line Tools for Xcode: 1, Goto "Xcode -> Open Developer Tool -> More Developer Tools", then login and download the "Command Line Tools for Xcode" 2, Goto "Xcode -> Preferences... -> Downloads(tab) -> Components(sub-tab)", then click install button.Feathery
P
1

Starting from Xcode 4.3 they decided to repackage it as a single app bundle. Check this out http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html

Plug-ins, templates and other sub-components. Any path for component additions to developer tools that was previously found in a subdirectory of /Developer is now going to be located internal to the Xcode 4.3 application bundle.

Other standalone utility applications and add-on technologies. Several additional tools are no longer part of the default Xcode installation, they are now downloadable as separate packages. The More Developer Tools menu command provides a direct jump to developer.apple.com/downloads in Safari where these development tools can be found.

So anything missing you might find it inside the app bundle or it'd be an additional download.

Polity answered 18/2, 2012 at 3:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.