How to Build a Source App in Mac

How to Build a Source App in Mac thumbnail
Facebook was built on open-source technologies.

Obtaining open source apps requires a little leg work on the part of the prospective user; they are typically made available only as source code: that is, the programmer's actual computer language instructions, usually in C++. Installing these apps entails running the source code through a compiler and then issuing a series of installation commands through a command line interface. Most open source apps are now as easy to install as commercial apps, but for the few that are not, MacPorts can do much of the legwork for you. MacPorts is available with an installer, but you can build it from source code.

Things You'll Need

  • Mac OS X 10.5, 10.6 or 10.7
  • MacPorts
Show More

Instructions

    • 1

      Download MacPorts-1.8.0-archive.tar.gz from the MacPorts page. This will leave an archived folder containing the source code for MacPorts in your downloads folder.

    • 2

      Open the terminal app and use the change directory command to go into the downloads folder. It looks like this:

      My-iMac:~ Me$ cd Downloads

      cd Downloads is the command that moves you into the the downloads folder. Type it and hit the "Return" key. Your command line prompt will look like this:

      My-iMac:Downloads Me$

    • 3

      Unpack the downloaded archive with this command:

      tar xzvf MacPorts-2.0.1.tar.gz

      This will leave a new folder in the downloads folder called MacPorts-2.0.1. Use the change directory command again to navigate into this folder:

      cd MacPorts-2.0.1

      Your command line prompt should once again reflect this change.

    • 4

      Build the downloaded source code into an application by entering the following command at the command line prompt:

      ./configure && make && sudo make install

      You will be prompted for a password. Enter your administrator password to continue the installation. If you are not the administrator of the computer you are using, you can ask the administrator to give you administrator privileges by going to system preferences>>accounts>>your name and clicking on administrator.

    • 5

      Update your version of Mac ports by opening the terminal app and running the following command at the command line prompt:

      sudo port -v selfupdate

      In the future, you must do this from time to time to keep your version of MacPorts up-to-date.

    • 6

      Search for MacPorts open source software using the MacPorts available ports page. If you want to install the open source image editing application "GIMP," issue the following at the command line:

      sudo port install gimp

      This command will download the source code and compile and install the GIMP application.

Related Searches:

References

  • Photo Credit Justin Sullivan/Getty Images News/Getty Images

Comments

Related Ads

Featured