This HowTo will guide you through the steps required to set up your development environment for Pascal on Mac, it will also help you set up your first SwinGame project.

  • Install Xcode
  • Install the Free Pascal Compiler
  • Get SwinGame


Install Xcode

Before you go any further you need to have the get Xcode, Xcode can be downloaded, with an Apple developers license from:

You can download either the full Xcode, or you can download the Xcode command line tools. If you plan on iOS development in the future you should download the full Xcode as it comes bundled with a lot of iOS development tools.

Once you run the installer for Xcode you should be ready to move onto the next step...

Install the Free Pascal Compiler

Now that Xcode is installed we are going to install the Free Pascal Compiler, this is the compiler we will use to compile our SwinGame code. You can get the most recent version of FPC from

Once you've run the installer you can test that it's worked by opening up a terminal (in Spotlight type 'terminal') and typing 'which fpc', this should print the path where fpc was installed.

Get SwinGame

Now that our environment is setup we need to get a SwinGame project template, this template is the one that you will use to develop your games with. You can find the Pascal - FPC template in the Downloads section.

Once you've downloaded the template extract it, ideally you should try to extract it to a path with no spaces, somewhere like documents/code/. You can then rename the folder 'Project Template' to your game name.

Now we're going to test it, open the terminal by typing 'terminal' into Spotlight and use the cd (Change Directory) command to move into the project template. If your game is at in your documents/code directory then you should enter 'cd documents/code/ProjectName/' into the terminal. Now try and build the project, you can do this using './'. Once it has finished building the game you can use './' to run the game.

cd documents/code/YourProjectName/ 

Now you're ready to start building your own game, check out more About SwinGame and read some more HowTos to get started.