How to build Stellarium on Windows
- Windows 7 32Bit
- Windows 8 32Bit
- the source tarball for Stellarium 0.12.0
- the current Stellarium in-development branch 0.12.1
- cygwin with bazaar package installed
- no random crap inside the PATH variable that interferes with CMake, MinGW, Qt
Run the installer and select:
- Pre-packaged repository catalogues (this will install gcc 4.6, while selecting Latest catalogue will install gcc 4.7 and the stellarium executable will crash at start)
- MSYS Basic System
Start MSYS Shell (MINGW_INSTALL\msys\1.0\msys.bat) and run:
mingw-get install libz libiconv gettext
Do not mind errors about already installed packages.
Install Qt into a path without spaces.
When asked by the installer point it to the previously installed MinGW directory.
Install CMake. Do not add it to the PATH variable when asked for at the end of the installation.
Create a folder
stellarium. This is where we will put the source code, the build directory and QtCreator.
Start cygwin and go into the created folder. Fetch the latest source:
bzr branch lp:stellarium stellarium-lp
If the above command results in some sort of certificate error try this:
bzr branch -Ossl.ca_certs=/usr/ssl/certs/ca-bundle.crt lp:stellarium stellarium-lp
Extract the archive into its own folder inside the
stellarium directory next to
stellarium folder create a new file
qtcreator.bat with following content:
1 2 3 4 5 6 7 8 9 10 11 12
@echo off set PATH=%PATH%;C:\MinGW_x86\bin set PATH=%PATH%;C:\MinGW_x86\include set PATH=%PATH%;C:\MinGW_x86\lib set PATH=%PATH%;C:\Qt\4.8.4 set PATH=%PATH%;C:\Qt\4.8.4\bin set PATH=%PATH%;C:\Qt\4.8.4\include set PATH=%PATH%;C:\Qt\4.8.4\lib start qt-creator\bin\qtcreator.exe
Change the paths accordingly.
Check if a MinGW Build Kit does exist: Tool -> Options -> Bild & Run -> Kits. Create a new one if it does not.
Open the Stellarium project using File -> Open File or Project and select
Go with the default build directory when asked for it (should end with
cmake executable if asked for it.
MinGW Generator and
To run from inside QtCreator change the working directory of the Run settings from
stellarium-lp-build\src to the source folder
The default CMake configuration of the stellarium source from launchpad is already set to