Table of Contents

Preparing for a release under Windows

The following acts as a tutorial and a reference checklist for preparing your build for release and packaging for deployment. It covers preparing and inserting an icon for your executable, a checklist of things for your config files, and finally to create a setup.exe.

Also check Common Release Checklist for a number of other things you might like to consider when packaging your release.

Checking Library Dependencies

Orx on Windows depends on libgcc and libstdc++ being compiled in statically, which it is. Your project needs to have these two libraries compiled in statically too, in order avoid the user being prompted when running your application.

These libraries are supplied as part of the Microsoft Visual C++ Redistributable.

Any project you create using init should already be set up to compile in these libraries statically. If your project isn't, you can add the following to your linker options: -static;-static-libgcc -static-libstdc++.

This step should not be necessary for Visual Studio users.

Code and Config pre-flight checklist

  Texture = ../../data # ./data	

Icon for your .exe

First, create your own icon for your program, using something like Gimp. Gimp can also write out the .ico file format.

You'll need a resource.rc file added to your editor of choice. Things are easier in Visual Studio, but for Codelite, you can follow these steps:

a) Create a .ico icon file, copy it to your src folder, and import it into your project. Right click the icon file and “Exclude from Build”. b) Create an empty resource.rc (just a text file) file in the src folder, and import it into your project. c) Create a reference to the icon by entering the following into the resource.rc file:

MY_ORX_GAME_ICON ICON "icon.ico"

d) In your main code file, add the following #define line (after your #include lines):

#define MY_ORX_GAME_ICON  1

e) Compile, then check your executable file in file explorer. Your .exe should have an icon.

Creating your Setup Installer

That's all.