Windows Build Instructions

(Difference between revisions)
Jump to: navigation, search
m (Making the Package)
Line 1: Line 1:
This document explains how to compile the development version of Stellarium on WinXP. The easiest method is to use QtCreator as described in this page. However it is also possible to compile using MSYS or MS Visual C++. See [[CompileWithMSYS]] and [[CompileWithVisualCpp]].
This document explains how to compile the development version of Stellarium on WinXP. The easiest method is to use QtCreator as described in this page. However it is also possible to compile using MSYS or MS Visual C++. See [[CompileWithMSYS]] and [[CompileWithVisualCpp]].
For 64-bit builds see [[CompileWithMinGW-w64]]
For 64-bit builds see [[CompileWithMinGW-w64]]
'''Note: For building Stellarium with MinGW and Qt5 see [[compile with MinGW and Qt5]] article.

Revision as of 08:34, 26 January 2014

Some or all of the information on this page is no longer accurate.

It may be relevant to an older version of Stellarium, or it may not be relevant at all. This page itself should be updated, archived or deleted.

This warning has been here since some undetermined moment.

This document explains how to compile the development version of Stellarium on WinXP. The easiest method is to use QtCreator as described in this page. However it is also possible to compile using MSYS or MS Visual C++. See CompileWithMSYS and CompileWithVisualCpp.

For 64-bit builds see CompileWithMinGW-w64

Note: For building Stellarium with MinGW and Qt5 see compile with MinGW and Qt5 article.


Building with Qt Creator (Prefered method)

Note: This is a patched updated method to allow building from stellarium build 5492

Stellarium can be built in Windows XP as below. If you use Vista 32 bit or Windows 7 32 bit. The procedure should be the same. However I have tried Vista home basic and Qt creator does not work there because it needs cwctype declared. Msys compiling works OK in Vista home. If you have the 64 bit version it will be necessary to install the Virtual XP version from Microsoft (470MB download) and the virtual computer interface from Microsoft or VMware.

Note : I've tested compiling Stellarium with Qt Creator on windows seven and it appears to work fine.

The virtual XP program will then need to be fully set up as a complete separate virtual XP installation with all the below dependancies including the environment variables. When Stellarium is compiled a package can be made that can be installed in the Program Files (x86)of Windows 7 64 bit (or anywhere else you fancy). Only tested on Windows 7 64 bit ultimate where it runs without problems.

I upgraded my development environment on windows (XP), and decided to start from scratch, and write what I do. I managed to compile and run Stellarium pretty quickly *without using the windows command line or msys* by following these steps.

Go to the Bazaar checkout instructions first.

Step 1: SVN client

Install a SVN command line client: CollabNet Subversion Note: This method is no longer applicable since the code is stored in Bazzar. See STEP 7

Command-Line Client works fine. To get this you will need to register and download Collabnetsubversion-server-1.6.9-1.win32.exe from (subversion). Run this and install it in your preferred location or use the default

Step 2: MinGW and Qt SDK

At the moment the Qt SDK does not contain the latest versions of Qt 4.8.2 for Windows, MinGW or Qt Creator, so it will be necessary to obtain them and install them individually. Download this for installation after MinGW is installed.

 Qt libraries 4.8.2 for Windows (MinGW 4.4, 318 MB)

from . Remove any earlier version first.

Next we will need the version of MinGW that contains Gettext and libintl versions The easiest way to install MinGW and its components is to use mingw-get (download the latest mingw-get).

It is at the top of the page. Run mingw-get-inst-20120426.exe (662.7kB) and it will install MinGW with GCC 4.6, Libiconv, Gettext-, and libintl- This is quite a large down load and requires some additions to the starting menu.

In the select components menu MinGW compile suite and the C compiler are already ticked. Add ticks to C++ compiler and the last item MinGW Developer tool kit.

MinGW needs to be installed before any other dependencies as it location must be known by Qt and Msys.

As of build #5572 you will need the updated version of Glext.h from the OpenGL site and install it in Mingw\include\gl in lieu of the existing version. Note: This may not be necessary with later updates.

Next we need a copy of Qtcreator, again obtained from and installed in Qt\4.8.2. Put the new MinGW here also to conform with previous builds.

Now we can install Qt libraries 4.8.2 for Windows (MinGW 4.4, 318 MB) into C:\Qt\4.8.2\Qt rather than the default location of C:\Qt\2010.01

Note: Qt 4.8.2 installation will emit a warning that only MinGW w32api.h version 3.13 is supported. Our new version is 3.17 (newer), and you can safely ignore the warning and continue.

Step 3: CMake

Download cmake 2.8 from and install it. Remove any earlier versions first

Step 4: MinGW

For Qt Creator/cmake to find the mingw environment you now need to add some directories to your path. Assuming you installed everything in the location C:\Qt\4.8.2 you should add in your path:

C:\Qt\4.8.2;C:\Qt\4.8.2\qt\bin;C:\Qt\4.8.2\mingw\bin;C:\Program Files\CMake 2.8\bin; 

Note: Make sure there is no path to any previous locations of the older versions of gettext, libintl, libiconv-2. Typically in \Program Files\GnuWin32 or \DevCpp from earlier dependencies.

You can edit your path in the "system property" dialog of windows (easy on XP but a little more obscure in Vista and Windows 7). Be very careful editing the path, any syntax errors will stop the creation of the cmakecache.txt when paths can't be found. Remove the paths to other instances of mingw.

You need to (re)start Qt Creator after this.

Gettext, libintl and libiconv will be installed as part of the new MinGW you will only need zlib

Step 5: Zlib

zlib: Download the "Complete package, except sources" installer from and install it in C:\Qt\4.8.2\mingw\ It will install everything we need in the mingw environment.

Step 6: Folder for build

Create a folder “\prog\ before you start Qt creator. Start Qt Creator and tell it where your svn.exe is in Tools/Options../Version Control/Subversion.

My program automatically installed in /program files/Collabnet/subversion Server

Step 7: Fetch source code

Create a new project File/New File or Project/Version Control/Subversion Checkout, and give the following url:

bzr co lp:stellarium

and tell it to put it in the directory of your choice: in my case, I had already created C:\prog\ The checkout should create the stellarium directory in there and the project headers will be in Documents and settings\your name\stellarium .

Step 8: Configure

Once the source code is checked out, Qt Creator automatically detects a cmake-based project and launches the CMake Wizard. I tell it to build stellarium in C:\prog\stellarium\qtcreator-build .(default location) Then run cmake using the MinGW target. This will configure cmakecache.txt in the qtcreator-build folder (you can edit it if necessary) If this action fails to find any dependancies. check the cmakecache.txt you may need to manually install the requirement paths. When this completes OK click on finish.

Step 9: Building

If everything went well, click on the "build all" button in Qt Creator, and wait that everything is build. This can take some time for the first build and may show many warning messages. Watch the progress "build" bar in the left menu column. It will turn green when the build is complete. Click on build issues in lower window and you can see the progress. (warning messages that don't stop the build or major reasons that do). When it stops check the qtcreator-build\src folder to see the stellarium.exe and libstelmain.dll files. Copy these files to the stellarium folder.

The Dll's should be found OK if the path is set correctly but it is often better to go to the Qt\4.8.2 and \Mingw folders and copy them from the following sources.

libgcc_s_dw2-1.dll....from qt/4.8.2/MinGW/bin

libiconv2.dll....from qt/4.8.2/mingw/bin

libintl3.dll....from qt/4.8.2/mingw/bin

zlib1.dll .... from qt/4.8.2/mingw/bin

mingwm10.dll....from qt/4.8.2/mingw/bin

libstdc++.dll.... from qt/4.8.2/mingw/bin

phonon4.dll....from qt/4.8.2/qt/bin

Qtcore4.dll....from qt/4.8.2/qt/bin

Qtgui4.dll....from qt/4.8.2/qt/bin

Qtnetwork4.dll....from qt/4.8.2/qt/bin

Qtopengl4.dll....from qt/4.8.2/qt/bin

Qtscript4.dll....from qt/4.8.2/qt/bin

Qtsvg4.dll....from qt/4.8.2/qt/bin

Qtxml4.dll....from qt/4.8.2/qt/bin

To the stellarium folder

10. Run Stellarium and enjoy

Installing Stellarium

Stellarium will be automatically installed into a folder in your boot drive \program files\stellarium when "make install" is run and place the necessary files for use of the inno compiler in sub directories of this folder.

Note: Will someone please show how this is done from Qtcreator?

Making the Package

To make an installation package you will first need to download and install the Inno installer

From download isetup-5.2.3.exe, run it to install.

There is a stellarium.iss file in the stellarium source folder that holds the package compiler source to be used with the inno compiler.

This file will look for all the necessary components in a folder \program files\stellarium created by the "make install" command

When all this is prepared it is only necessary to click on the stellarium.iss file to load it and then compile under the build heading.

The package will be built and placed in a new folder created "installers". The package will be "stellarium-0.11.4-win32.exe". This package can then be run on any XP, Vista or Windows 7 computer. Note:- If you are installing on a 64 bit computer the program will need to be placed in the Program files (x86) folder, not the Program Files folder.

Personal tools
in this wiki
other languages