(Difference between revisions)
Jump to: navigation, search
(Building Stellarium with MinGW-w64)
Line 31: Line 31:
Here's how I configured MSYS environment:
Here's how I configured MSYS environment:
  export PATH=.:/d/toolchain/cmake/bin:/mingw/bin:/bin:/d/toolchain/qt-4.8.0-x64/bin:/d/toolchain/qt-4.8.0-x64/lib:/d/toolchain/qt-4.8.0-x64/include:/d/toolchain/MinGW64/include:/d/toolchain/MinGW64/lib
  export PATH=.:/d/toolchain/cmake/bin:/mingw/bin:/bin:/d/toolchain/qt-4.8.0-x64/bin:/d/toolchain/qt-4.8.0-x64/lib:<br>/d/toolchain/qt-4.8.0-x64/include:/d/toolchain/MinGW64/include:/d/toolchain/MinGW64/lib
  export QTDIR=/d/toolchain/qt-4.8.0-x64
  export QTDIR=/d/toolchain/qt-4.8.0-x64

Revision as of 18:12, 15 March 2012

This is the instruction for building 64-bit Windows version of Stellarium from BZR using MinGW-w64 with MSYS.


Installation of development tools & libraries

Building with MinGW-w64


Qt 4.8.0




Cmake 2.8.7

I used Ralph Engels' prebuilt MinGW-w64 environment which includes all of the above except Qt.

After installing a minimal MSYS environment and extracting MinGW64.7z archive I had to configure and build Qt 4.8.0 as I couldn't find any prebuilt binaries. I used D:\toolchain as a root directory for anything MinGW-w64 related.

Next I downloaded Cmake version 2.8.7 from:

Configuring the MSYS environment

Here's how I configured MSYS environment:

export PATH=.:/d/toolchain/cmake/bin:/mingw/bin:/bin:/d/toolchain/qt-4.8.0-x64/bin:/d/toolchain/qt-4.8.0-x64/lib:
/d/toolchain/qt-4.8.0-x64/include:/d/toolchain/MinGW64/include:/d/toolchain/MinGW64/lib export QTDIR=/d/toolchain/qt-4.8.0-x64


  1. Open an MSYS console, and change directory into the root of the source tree, e.g.
    cd stellarium
  2. make a build directory and change into it:
    mkdir -p builds/msys && cd builds/msys
  3. run CMake:
    cmake -G "MSYS Makefiles" ../..
    See the notes below for solutions to some common errors
  4. run make:
    make && echo "BUILD WORKED" || echo "BUILD FAILED"
    There will be quite a few warnings. These can usually be ignored. You will see a message, "BUILD #:WORKED" or "BUILD FAILED" telling you if it was successful.
  5. run make install
    make install

This will place all the compiled files in program files\stellarium. From where they will be found when you run the installer program stellariun.css after you install the Inno Setup Compiler

Doing a test run

Dlls you need to place in Stellarium's root directory:

  • From \Mingw64\bin libintl-8.dll, libiconv-2.dll, zlib1.dll
  • From \Qt\4.8.0\qt\bin QtXml4.dll, QtSvg4.dll, QtSql4.dll, Qtscript4.dll, QtOpenGl4.dll, QtNetwork4.dll, QtGui4.dll, QtCore4.dll, Phonon4.dll

If you're still in the build directory, change back to the root of the source tree:

cd ../..

Then call the program with this command:


If all is well, Stellarium should launch.

Finally Run

make install

This will place all the necessary files in your program files folder stellarium where the installer expects to find them.

Making the installer

We use the Inno Setup Compiler to create the installer. These details are for builds source later than 6052

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

If you have followed the above procedure the current svn build will generate the necessary stellarium.iss file. Double click on it, then from the menu bar "build-compile". It will build the stellarium installer package and place it in a folder of the stellarium source tree root folder "installers"

Run the program generated and Stellarium will be installed in program files\stellarium or wherever you select and place an icon on the desktop.


Note 1: If the compile fails with the error "can't find a particular file". Check the cmakecache.txt file in the ...\build\msys folder and make sure the variable/path/file is directed to the correct source.

Note 2: Stellarium is compiled to specifically use OpenGl2 for enhanced video. If your video card does not have OpenGl2 compatable drivers you can force OpenGL1 by placing use_qpaintenginegl2 = false in the [main] section of the config.ini file

Personal tools
in this wiki
other languages