Uninstall xcode but keep other dependencies - xcode

I do not work on iOS or OSX apps, but I do a fair amount of other development. Therefore, I need to keep things like python, gcc, etc. How can I uninstall the xcode app without removing these other things?

How can I uninstall the xcode app without removing these other things?
First point to note is that python comes pre-installed on your mac and can be interacted with independently of Xcode.
You delete the Xcode application from your applications folder (/Applications) and leave the developer tools in place. This would leave the command line tools in place, you could call this a bit of a hack.
location of command line tools:
/Library/Developer/CommandLineTools/usr/bin/
Completely remove Xcode and command line tools and use a package manager tool like HomeBrew to install the tools you require.

Related

Is there any xCode alternatives for homebrew?

For Homebrew to work I need to download xCode, but I do not want to download a 40+ gigabyte app. Is there any alternatives for xCode I could use.
You do not need a "full" Xcode installation.
hoembrew requires the Xcode command line tools which could be downloaded from Apple directly.
https://developer.apple.com/download/all/?q=command%20line%20tools
By the way, Xcode should be around 10GB not 40. :)

Apple Command Line Tools AND XCode For Open Source Compile/Build?

I don't use XCode but have it "left over" from when it was the path to installing the Apple Command Line Tools - which I do use for compiling/building other software. I now seem to have both XCode and Apple Command Line Tools and don't really care to continue updating XCode every few months (huge download).
My 2 questions before deleting XCode:
Will Apple Command Line Tools remain on my machine and usable for open source build/compile if I trash XCode?
Will I lose some useful functionality I don't know about elsewhere (if I really never do use XCode)?
Question 2.5: Is this a safe delete?
This post was similar but unanswered.
Thanks!
Xcode is required when building MacVim from Homebrew. The Command Line Tools alone are insufficient. I reinstalled Xcode...

Redistributing Tools used by application (OSX, imageMagick, TWAIN - SANE)

I have a mac application that uses twain (Relies on 3 packages that I had to install: libusb, sane backends, and twain sane interface) and imagemagick which I also used a package to install and I'm not really sure how to go about redistributing them.
I'm thinking I would have to include the source for each package I rely on, libusb-1.0.9.tar.bz2 for example for the lib usb package, and then configure and make each of those in /use/local/bin (Basing that off seeing it done by the binary packages). I imagine I would have to add these locations to $PATH once done.
I was trying this myself but ran into this error: "configure: error: no acceptable C compiler found in $PATH" so am now downloading xcode developer tools. I imagine the end user for my installer will run into this issue as well though if they don't have it installed so I'm now not sure how to proceed.
Can anyone shed some light on how to properly distribute tools that your app relies on? I am using FileStorm Pro and was planning on using applescript shell commands to do the command line work.
Unless you were planning to distribute your application as source, you definitely don't want to distribute its dependencies as source. Most Mac users do not have the Xcode developer tools, and do not want them.
Build the binaries on your machine (ideally on a clean machine with the oldest version of OS X you want to support, the newest version of Xcode that works on that OS, and nothing else installed on it). Then copy the resulting binaries somewhere into your .app bundle. Then, instead of running the tools in a way that relies on $PATH, launch them by an explicit path relative to argv[0] or [NSBundle mainBundle].
(And make sure to check the licenses of every third-party tool you're using.)

What's the standard way to set up a dev environment on a Mac?

I've just done a clean install of XCode 3.2.6 on Snow Leopard, to the default /Developer dir.
Is the right/normal way that all libs, and software tools such as CMake/git should be installed inside /Developer too? Is it comparable with how Linux expects standard dirs to be used for things, or more like Windows where it's all down to personal preference?
Any good guide for a experienced developer who's a noob to Mac dev is appreciated. For instance I'm confused where and how my SVN client came from and why I have SVN but not Git.
In general, you should not install anything inside of /Developer (not /Development). You should assume that anything under it is managed by Apple via Xcode packages. For additional command line tools and libraries, one standard Unix-y practice is to install them in /usr/local which is provided for such purposes. (Do not install anything in any other /usr locations as they are also managed by Apple.) But, rather than building and installing a lot of third-party software - like git - yourself or using binary installers from different providers which may not play well together, it is a good idea to use one of the open-source package managers for OS X. The most widely used are Homebrew, MacPorts, and Fink. Pick one and stick to it.
In Xcode 3, Apple shipped svn but not git. That changes in Xcode 4, the default on 10.7 Lion, which does include git. And, as of Xcode 4.3, there no longer is a /Developer directory as Xcode itself is now an app in /Applications and the items formerly in /Developer are included within its app bundle.

GCC without Xcode on OS X

I've just unwrapped my new MacBook Pro (yay!) and am now setting it up properly for development. Since I want to avoid clutter, I'm wondering if I really need to install the Xcode tools at all (I never use the IDE or Mac specific tools), since I'll install a newer version of GCC anyway, using MacPorts.
So, is there any benefit in installing Xcode? Is it necessary? What kind of set-up does it do behind the scenes? Basically: can I skip this or will it come back to haunt me because some Unix development tools just assume that OS X is always set up in this way?
In order to perform an easy and successful install of MacPorts, already having tools from the xCode installer is necessary. You only need the install option that places a copy of the unix/header files outside of xcode; everything else can remain uninstalled.
A friend of mine recently released this:
https://github.com/kennethreitz/osx-gcc-installer
Have fun :)
I tried this trick and I was constantly chasing missing header files and such. Just install XCode.
We primarily use the Xcode IDE for building Cocoa/Carbon applications. Xcode typically has different project templates (and project settings fixed accordingly). As long as you are not going to generate a Universal Binary or a framework I think you should be ok. As far as I am concerned, when I am too pissed with Xcode, I go back to the command line, set up the paths myself and start using GDB.
First of all, congratulations on the new MBP. I recently bought a 15" unibody myself. =)
You can safely skip Xcode installation, and you can install almost everything Xcode installs through MacPorts, except Xcode itself, of course.
However, I believe you'll find yourself installing Xcode one day anyway, and installing Xcode is much easier than installing all the tools (especially GCC) through MacPorts.
You can strip down the Xcode install quite a lot - when you install Xcode there is a "Customise" button where you can remove a lot of stuff (gigabytes worth).
You can also go in and delete stuff from /Developer/, for example the 10.3 SDK is about 150MB (I think), and if you're not writing software for that it's quite safe to delete. Obviously be careful when deleting, but if you break things, you can always reinstall the Developer Tools!
Apple now provides the command line tools as a separate download from Xcode. They work with Lion and Mountain Lion. You can download them from the Apple Developer Center.
(This is noted on the osx-gcc-installer GitHub page.)

Resources