User Tools

Site Tools


tutorials:community:sausage:preparing_a_windows_release

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.

Code and Config pre-flight checklist

  • Ensure that your [Resource] section has paths that will locate your config when you repackage your binary, configs, assets and DLLs. For example:
  Texture = ../../data # ./data	
  • Remove any test features from your code.
  • Copy your bin and data folders to a new location. Remove any files that aren't needed. Remove orxd.dll and orxp.dll. Only orx.dll is needed for release.
  • Test your game .exe and ensure it works correctly with the folder structure changes.

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

  • Download the Inno Setup Compiler http://innosetup.com.
  • Launch it.
  • Select the wizard option and work through the screens:

  • Click “Add Folder”, and select the base folder of your game (bin and data are the subfolders).
  • Say yes that files in the subfolders should be included.
  • Choose options for the user, ie, the start folder name, uninstall icon, quick launch icon, information files to show to the user, etc etc.
  • You can then nominate an installation icon for the setup.exe to use.

  • Save the .iss script for later editing if need be.
  • Select Build/Compile to create your Setup.exe to give out to the world.

That's all.

tutorials/community/sausage/preparing_a_windows_release.txt · Last modified: 2015/12/06 20:10 (18 months ago) (external edit)