![]() ![]() Note: You can change display from Basic to All at the top and use the search box to locate the following settings.We leave this build phase empty for now, we will need it later.Select the MyGame target, go to the Build Phases tab and add a new Copy Files Build Phase (+ button down right).(Click your project, then the + button at the bottom saying Add target, then Mac OSX->Application->Cocoa.) Add a Cocoa Application target to the project, let’s call it MyGame.Start XCode, create a new empty project (Other->Empty).This section is a copy & paste + improvement from this page. Setting up an Xcode project and see it all working If you don’t want to copy this over to your Library/Frameworks directory, then you need to remember the path to these frameworks as we are going to need them later. With this: sudo cp -r *.* /Library/Frameworks/ Now copy them over to your /Library/Frameworks directory with sudo. I found that the last step did not work for me, in order to fix that I did: cd lib/RelWithDebInfo The last step requires you to enter your password. This is done by the following: cmake -G Xcode -DWANT_FRAMEWORKS=1. The first step is to let cmake (the first dependency we installed) prepare our build, then build it and then install it. Now: cd to allegro, and create a new directory called “build”, then go into that directory. Once git is done, you have Allegro’s sources in ~/projects/allegro. Our git clone command looks like this: git clone git://.net/p/alleg/allegro At this moment of writing, Allegro 5.1 is the current version. We now need to fetch the sourcecode of Allegro, which we can do by using git clone. Open a terminal, and go (cd) to a directory where you want to get allegro’s sources. Since we are going to compile it for Xcode, we basically are doing the same as the Allegro wiki is saying. Once we have everything set up, this step is relatively easy. If thats the case, you can ignore it.Ĭompiling Allegro for Xcode, and making sure the Frameworks are in /Library/Frameworks Note, you might get a warning about zlib. The more it finds, the more features it will provide in Allegro 5. When we prepare to build Allegro in the next section, cmake will check what dependencies are installed. The other dependencies are used to make Allegro more useful. Cmake is required to create the OS specific build steps to compile Allegro, without it we cannot proceed. The first one is cmake, which we will need to build Allegro. The wiki explains how to do it with Macports, but since I am using Homebrew, you need to do it like this: brew install cmake If they are not installed, you could install them via homebrew (brew install git & brew install svn)Īs suggested by the Allegro 5 wiki we need to install dependencies. Hit "svn -version", and "git -version" in your terminal. – The command line tools should have installed git and svn for you, try them out:.In Xcode, go to preferences, tab "Downloads" -> " Components" -> Command Line Tools – Install command line tools from Xcode.My advice would be to install these in the following order: (as far as I can tell it should behave quite the same). I have used homebrew to install dependencies, you can also use Macports but I do not have any experience with this. Which are Xcode (you can get this from the App store), git and svn. Requirements for getting started, if you already have this installed you can skip the prerequisitesīefore we can start, we need to have installed some prerequisites. Prerequisites (Installing required software) – Setting up an Xcode project to test if Allegro works. ![]() – Compiling Allegro for Xcode, installing it and making sure the Frameworks are installed in /Library/Frameworks.– Installing dependencies to make Allegro more useful and to get it compiling (cmake, etc).To give you an idea what we’re going to do, here is the installation in very rough form: If not, I would suggest to checkout this documentation, or this one. I had great help from the documentation provided, and hopefully this post is sufficient for you. In this post I will describe how you can get Allegro 5 working on Mac OS X, under XCode 4.5. From a nostalgic perspective I wanted to try Allegro 5 and on my new system which runs Mac OS X 10.8. With plugins you could extend it further, to use fonts (TTF), networking, etc.Ĭurrently, the most recent version is Allegro 5 which breaks with the Allegro 4 API and makes it impossible to convert from Allegro 4 to 5 (atleast for D2TM). In essence it has functions for manipulating the screen (ie, drawing bitmaps, manipulating palettes, etc), use controls (mouse, joystick, keyboard, etc) and more. Allegro is a library that allows you to make games. In Dune 2 – The Maker, I have used Allegro quite a bit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |