CompileWithMSYS

(Difference between revisions)
Jump to: navigation, search
m
(Building with MinGW32)
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is the updated instruction for building Stellarium from version 0.11.4. using the MSYS system with Qt 4.8.2/MinGW. See also the [[Windows_Build_Instructions]] for the QtCreator method which you may find easier.
+
This is the updated instruction for building Stellarium from version 0.11.4. using the MSYS system with Qt 4.8.4/MinGW. See also the [[Windows_Build_Instructions]] for the QtCreator method which you may find easier.
  
 
==Installation of development tools & libraries==
 
==Installation of development tools & libraries==
Line 5: Line 5:
 
===Building with MinGW32===
 
===Building with MinGW32===
  
With the change in compiling to use Qt 4.8.2 compiling Stellarium has now been made considerably easier and can be built successfully in Windows 2000, XP, Vista and Windows 7 (32 bit and 64 bit) although it must be run in 32 bit mode on 64 bit operating systems. A version for 64bit compiling will available later
+
With the change in compiling to use Qt 4.8.4 compiling Stellarium has now been made considerably easier and can be built successfully in Windows 2000, XP, Vista and Windows 7 (32 bit and 64 bit) although it must be run in 32 bit mode on 64 bit operating systems. A version for 64bit compiling will available later
  
 
Note: Windows 7 (64bit). When using MSYS Windows 7 does not respond to *.bat files. Change the .bat to .cmd. In addition file names that start with "." eg .bzr cannot be renamed. The install programs seem to be able to write these files however. Windows 7 may need administrator privileges to write some files
 
Note: Windows 7 (64bit). When using MSYS Windows 7 does not respond to *.bat files. Change the .bat to .cmd. In addition file names that start with "." eg .bzr cannot be renamed. The install programs seem to be able to write these files however. Windows 7 may need administrator privileges to write some files
Line 11: Line 11:
 
The need for separate installations of most of the older dependancies like Dev-Cpp, MinGW, GNUWin32 etc is no longer needed.
 
The need for separate installations of most of the older dependancies like Dev-Cpp, MinGW, GNUWin32 etc is no longer needed.
  
To get started you will need to download and install
+
To get started you will need to download Qt 4.8.4 for installation after MinGW is compiled
  
* Nokia's Qt OpenSource (current version 4.8.2)  
+
* Nokia's Qt OpenSource (current version 4.8.4)  
  
   Qt libraries 4.8.2 for Windows (MinGW 4.4, 318 MB)
+
   Qt libraries 4.8.4 for Windows (MinGW 4.4, 318 MB)
  
 
from their site
 
from their site
  
  http://qt.nokia.com/downloads
+
  http://qt-project.org/downloads#qt-lib
  
  
The SDK download only contains Qt version 4.7.0 so you will need to get MinGW separately
+
You will need to get MinGW separately
  
 
A new version of MinGW will be required. This can be acquired from
 
A new version of MinGW will be required. This can be acquired from
  
  https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.7.0-1/
+
  https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/
  
 
Download  
 
Download  
Line 32: Line 32:
 
  mingw-get-inst-20120426.exe (662.7kB)
 
  mingw-get-inst-20120426.exe (662.7kB)
  
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, Gettext-0.18.1.1-2, and libintl-0.18.1.1-2. This is quite a large down load and requires some additions to the starting menu. It may not install correctly if anything upsets the install procedure. I had four goes before I got it right. Check the \MinGW\Bin folder and make sure that MSgfmt.exe, libgettextlib-0-18-1.dll and libgettextsrc-0-18-1.dll are there. Check \MinGW\include for libintl.h and zlib.h are there.
+
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-0.18.1.1-2 and libintl-0.18.1.1-2 in the correct order. This is quite a large down load and requires some additions to the starting menu.  
  
On the menu there are are two boxes ticked. You will need to add ticks to C++ and the last item MSYS tools.  
+
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.
  
Install MinGW in \Mingw first.
+
MinGW needs to be installed before any other dependencies as it location must be known by Qt and Msys
 +
 
 +
It may not install correctly if anything upsets the install procedure. I had four goes before I got it right. Check the \MinGW\Bin folder and make sure that MSgfmt.exe, libgettextlib-0-18-1.dll and libgettextsrc-0-18-1.dll are there. Check \MinGW\include for libintl.h and zlib.h are there. This should be enough to assure that it has installed correctly.
  
 
Next run  
 
Next run  
  
  Qt libraries 4.8.2 for Windows (MinGW 4.4, 318 MB)
+
  Qt libraries 4.8.4 for Windows (MinGW 4.4, 318 MB)
 +
 
 +
and install it in \Qt\4.8.4\Qt to conform to previous editions. Indicate the location of MinGW when asked.
  
and install it in \Qt\4.8.2\Qt to conform to previous editions. Indicate the location of MinGW when asked.
+
Note: Qt 4.8.4 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.  
  
 
We now need to add the other dependencies  
 
We now need to add the other dependencies  
Line 48: Line 54:
 
Firstly
 
Firstly
  
*CMake-2.8.1-win32-86.exe from http://www.cmake.org/HTML/index.html
+
*CMake-2.8.10.2-win32-86.exe from http://www.cmake.org/HTML/index.html
 
*:Note: version 2.8 will be needed for sound support
 
*:Note: version 2.8 will be needed for sound support
  
Line 59: Line 65:
 
Next
 
Next
  
*MSYS version 1.0.11 (http://sourceforge.net/project/downloading.php?groupname=mingw&filename=MSYS-1.0.11.exe&use_mirror=switch). Install to the root directory and answer yes to the first two questions and set the path to the location of MinGW to \MinGW  
+
*MSYS version 1.0.11 (http://sourceforge.net/project/downloading.php?groupname=mingw&filename=MSYS-1.0.11.exe&use_mirror=switch). Install it to the root directory and answer yes to the first two questions and set the path to the location of MinGW to \MinGW  
 
Note: Windows 7 does not like .bat files it prefers them as .cmd. If the msys.bat file does not store your previous command try changing it to msys.cmd
 
Note: Windows 7 does not like .bat files it prefers them as .cmd. If the msys.bat file does not store your previous command try changing it to msys.cmd
  
Line 68: Line 74:
 
and finally
 
and finally
  
*TortoiseSVN-1.6.8.19260-win32-svn-1.6.11.msi (or the current version) into Windows (http://tortoiseSVN.net/downloads). If you have Windows 7 64 bit don't forget to get and install the 64 bit version TortoiseSVN-1.6.8.19260-x64-svn-1.6.11.msi.(or the current version) Next install bazaar from http://wiki.bazaar.canonical.com/Download During installation tick the bzr shell extension. NOTE: there may be a later versions. (if you want to build the latest development version)
+
*TortoiseSVN-1.7.7.22907-win32-svn-1.7.5.msi (or the current version) into Windows (http://tortoiseSVN.net/downloads). If you have Windows 7 64 bit don't forget to get and install the 64 bit version TortoiseSVN-1.7.7.22907-x64-svn-1.7.5.msi.(or the current version) Next install bazaar from http://wiki.bazaar.canonical.com/Download During installation tick the bzr shell extension. NOTE: there may be a later versions. (if you want to build the latest development version)
 +
 
 +
As of build #5572 you will need the updated version of Glext.h from the OpenGL site
 +
http://www.opengl.org/registry/api/glext.h and install it in Mingw\include\gl inlieu of the existing version. Note: This may not be necessary with later builds
  
 
==Configuring the MSYS environment==
 
==Configuring the MSYS environment==
 
You need to set some environment variables in the MSYS environment.  Start MSYS and enter the following commands.  
 
You need to set some environment variables in the MSYS environment.  Start MSYS and enter the following commands.  
 
   
 
   
   export PATH=$PATH:C:\Program Files\CMake 2.8\bin;C:\Qt\4.8.2;c:\Qt\4.8.2\qt\bin;
+
   export PATH=$PATH:C:\Program Files\CMake 2.8\bin;C:\Qt\4.8.4;c:\Qt\4.8.4\qt\bin;
 
   C:\mingw\bin;C:\mingw\lib;C:\mingw\include
 
   C:\mingw\bin;C:\mingw\lib;C:\mingw\include
  
Line 81: Line 90:
 
When Building with Qt the following paths are best added to the "Path" of the environment variables of your operating system manually.  Control panel – System – advanced – environment variables. (use your system drive for "C:")
 
When Building with Qt the following paths are best added to the "Path" of the environment variables of your operating system manually.  Control panel – System – advanced – environment variables. (use your system drive for "C:")
  
Note: to avoid secondary paths to older versions of the dependencies it is safer to remove the paths from the environment variables that call "dev-cpp"  
+
Note: to avoid secondary paths to older versions of the dependencies it is safer to remove the paths from the environment variables that call "dev-cpp" and \program files\gnuwin32
  
 
   
 
   
  C:\Program Files\CMake 2.8\bin;C:\Qt\4.8.2;C:\Qt\4.8.2\qt\bin;
+
  C:\Program Files\CMake 2.8\bin;C:\Qt\4.8.4;C:\Qt\4.8.4\qt\bin;
 
  C:\mingw\bin;C:\mingw\lib;C:\mingw\include
 
  C:\mingw\bin;C:\mingw\lib;C:\mingw\include
  
 
==Getting the source code==
 
==Getting the source code==
 
===Release versions===
 
===Release versions===
You can download the source code for the release versions from the sourceforge download area.  Save the file to the /home/YOURUSERNAME directory within MSYS (typically this is C:\msys\1.0\home\YOURUSERNAME\ within the Windows filesystem).  The file name should be stellarium-0.11.3.tar.gz or similar.
+
You can download the source code for the release versions from the sourceforge download area.  Save the file to the /home/YOURUSERNAME directory within MSYS (typically this is C:\msys\1.0\home\YOURUSERNAME\ within the Windows filesystem).  The file name should be stellarium-0.11.3.tar.gz or similar.
 +
 +
You will need a decompression program installed in Windows. I use a free program "Jzip" which seems to handle all the current compression algorithms.
  
 
De-compress the tar file like this:
 
De-compress the tar file like this:
 
  tar zxvf stellarium-0.11.3.tar.gz
 
  tar zxvf stellarium-0.11.3.tar.gz
  
The root of the source tree will be will be /home/YOURUSERNAME/stellarium for simplicity
+
The root of the source tree will be will be /home/YOURUSERNAME/stellarium for simplicity.
  
 
===Development versions from the Bazaar repository===
 
===Development versions from the Bazaar repository===
 
:''See also'' [[Bzr checkout]]
 
:''See also'' [[Bzr checkout]]
 
You can try the latest development code by downloading from the bzr repositry using the TortoiseSVN client bzr shell.  This program integrates with the Windows file browser.  See the TortoiseSVN website for details.  Check out the source by entering the folder where you have the stellarium source code and from the Windows menu bar:   
 
You can try the latest development code by downloading from the bzr repositry using the TortoiseSVN client bzr shell.  This program integrates with the Windows file browser.  See the TortoiseSVN website for details.  Check out the source by entering the folder where you have the stellarium source code and from the Windows menu bar:   
 +
 +
The root of the source tree typically will be /MSYS/1.0/home/YOURUSERNAME/stellarium.
 
   
 
   
Files - TortoiseBZR - update. The default will be the working tree then press enter
+
You will first need to get the source code. Open MSYS to see the command line and enter:
  
Check out to the /home/YOURUSERNAME directory within MSYS (typically this is C:\msys\1.0\home\YOURUSERNAME\ within the Windows filesystem).
+
cd /c/msys/1.0/home/YOURNAME
  
The root of the source tree will be /home/YOURUSERNAME/stellarium
+
then
  
To get the source first open MSYS and get the command line enter
 
 
cd /c/msys/1.0/home/YOURNAME
 
 
  bzr co lp:stellarium
 
  bzr co lp:stellarium
  
This will download the trunk into .bzr (nearly 1GB at the moment) so it may take some time
+
This will download the trunk into .bzr (nearly 1GB at the moment), a hidden folder in the stellarium folder, so it may take some time. When this completes the trunk source code will be written into your stellarium folder.
  
For updating you can then use the Windows pull down menu to do updates or pull different versions.
+
When the source code is loaded into your stellarium folder you can add any updates from the Windows pull down menu.
 +
Note: in Windows 7 the menu will appear if you right click the mouse in a vacant area of the stellarium folder.
 +
 
 +
Files - TortoiseBZR - update. The default will be the working tree then press enter
 +
 
 +
Check out to the /home/YOURUSERNAME directory within MSYS (typically this is C:\msys\1.0\home\YOURUSERNAME\ within the Windows filesystem).
  
 
==Building==
 
==Building==
Line 120: Line 135:
 
#make a build directory and change into it:
 
#make a build directory and change into it:
 
#:<pre>mkdir -p builds/msys && cd builds/msys</pre>
 
#:<pre>mkdir -p builds/msys && cd builds/msys</pre>
#run CMake:
+
#[[Configuring Build Options|run CMake]]:
 
#:<pre>cmake -G "MSYS Makefiles" ../..</pre>
 
#:<pre>cmake -G "MSYS Makefiles" ../..</pre>
 
#:See the notes below for solutions to some common errors
 
#:See the notes below for solutions to some common errors
 
#run make:
 
#run make:
 
#:<pre>make && echo "BUILD WORKED" || echo "BUILD FAILED"</pre>
 
#:<pre>make && echo "BUILD WORKED" || echo "BUILD FAILED"</pre>
#: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.
+
#: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.
 
#run make install
 
#run make install
 
#:<pre>make install</pre>
 
#:<pre>make install</pre>
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
+
This will place all the compiled files in program files\stellarium. From where they will be found when you run the installer program stellariun.iss after you install the Inno Setup Compiler
  
 
==Doing a test run==
 
==Doing a test run==
 
If the build was successful, you can run the program without installing it, just to test everything is OK.  First you need to find all the DLLs which Stellarium uses, and copy them to the root of the source tree:
 
If the build was successful, you can run the program without installing it, just to test everything is OK.  First you need to find all the DLLs which Stellarium uses, and copy them to the root of the source tree:
*From the \QT\4.8.2\Qt\bin: QtCore4.dll, phonon4.dll, QtGui4.dll, QtScript4.dll, QtNetwork4.dll, QtOpenGL4.dll, QtSvg4.dll, qtxml4.dll and Qtsql4.dll  
+
*From the \QT\4.8.4\Qt\bin: QtCore4.dll, phonon4.dll, QtGui4.dll, QtScript4.dll, QtNetwork4.dll, QtOpenGL4.dll, QtSvg4.dll, qtxml4.dll and Qtsql4.dll  
 
   
 
   
 
*From the \mingw\bin folder: libiconv2.dll libintl3.dll mingwm10.dll zlib1.dll libgcc_s_dw2-1.dll libstdc++.dll  
 
*From the \mingw\bin folder: libiconv2.dll libintl3.dll mingwm10.dll zlib1.dll libgcc_s_dw2-1.dll libstdc++.dll  
Line 152: Line 167:
 
==Making the installer==
 
==Making the installer==
  
We use the Inno Setup Compiler to create the installer. These details are for builds source later than 6052
+
We use the Inno Setup Compiler to create the installer. These details are for builds from the current bzr source.
  
 
From http://www.jrsoftware.org download isetup-5.2.2.exe, run it to install.  
 
From http://www.jrsoftware.org 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"
+
If you have followed the above procedure the current build from bzr source 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.
+
Run the program generated and Stellarium will be installed in program files\stellarium or wherever you select with an option to place an icon on the desktop if desired.
  
 
==  NOTES: ==
 
==  NOTES: ==
Line 166: Line 181:
 
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  
 
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
 
use_qpaintenginegl2 = false in the [main] section of the config.ini file
 
= Building with Microsoft Visual Studio 8.0 =
 
 
'''NOTE: these instructions are quite out of date.'''
 
 
After couple of weeks work I finally got the stellarium compiled and run using MS VisualStudio 8.0. MS C/C++ compiler is quite strict with the declarations of the variables and there is some differences with the functions that MS has/has not, but finally I got it work. A huge patch is posted to Fabien, waiting it to be approved ...
 
 
== Use SVN to get the source code ==
 
*Install development tools as described above, including Tortoise SVN (requires reboot)
 
*Start MSYS.  This will create the directory
 
C:\msys\1.0\home\<yourusername>
 
*Browse there with file explorer.
 
*Right click in the folder and select ''SVN Checkout'' from the popup menu
 
*In the ''URL of Repository'' edit box, enter the URL of the SVN repository, which is
 
https://stellarium.svn.sourceforge.net/svnroot/stellarium/trunk/stellarium
 
*In your .profile, set STELROOT like this:
 
export STELROOT="$HOME/stellarium"
 
*Optionally repeat the checkout process for the plugins with the URL:
 
https://stellarium.svn.sourceforge.net/svnroot/stellarium/trunk/extmodules
 
 
The result should be that when you start MSYS, you should see two sub-directories in your home directory:
 
stellarium
 
extmodules
 
And you should also have an environment variable STELROOT set which points at the full path of the stellarium directory.
 
 
== External Libraries ==
 
 
* boost : from http://www.boost.org/
 
* libintl: from http://gnuwin32.sourceforge.net/
 
* zlib: http://www.zlib.net
 
* SDL: http://www.libsdl.org/
 
* libpng: http://www.libpng.org/pub/png/libpng.html
 
* freetype: http://freetype.sourceforge.net/index2.html
 
* libjpeg: http://freshmeat.net/projects/libjpeg/
 
 
Download the libraries and the development files (include the needed header-files), install packages and go on  ...
 
 
Getting the source code : use '''SVN''
 

Revision as of 00:38, 23 January 2013

This is the updated instruction for building Stellarium from version 0.11.4. using the MSYS system with Qt 4.8.4/MinGW. See also the Windows_Build_Instructions for the QtCreator method which you may find easier.

Contents

Installation of development tools & libraries

Building with MinGW32

With the change in compiling to use Qt 4.8.4 compiling Stellarium has now been made considerably easier and can be built successfully in Windows 2000, XP, Vista and Windows 7 (32 bit and 64 bit) although it must be run in 32 bit mode on 64 bit operating systems. A version for 64bit compiling will available later

Note: Windows 7 (64bit). When using MSYS Windows 7 does not respond to *.bat files. Change the .bat to .cmd. In addition file names that start with "." eg .bzr cannot be renamed. The install programs seem to be able to write these files however. Windows 7 may need administrator privileges to write some files

The need for separate installations of most of the older dependancies like Dev-Cpp, MinGW, GNUWin32 etc is no longer needed.

To get started you will need to download Qt 4.8.4 for installation after MinGW is compiled

  • Nokia's Qt OpenSource (current version 4.8.4)
 Qt libraries 4.8.4 for Windows (MinGW 4.4, 318 MB)

from their site

http://qt-project.org/downloads#qt-lib


You will need to get MinGW separately

A new version of MinGW will be required. This can be acquired from

https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/

Download

mingw-get-inst-20120426.exe (662.7kB)

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-0.18.1.1-2 and libintl-0.18.1.1-2 in the correct order. 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

It may not install correctly if anything upsets the install procedure. I had four goes before I got it right. Check the \MinGW\Bin folder and make sure that MSgfmt.exe, libgettextlib-0-18-1.dll and libgettextsrc-0-18-1.dll are there. Check \MinGW\include for libintl.h and zlib.h are there. This should be enough to assure that it has installed correctly.

Next run

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

and install it in \Qt\4.8.4\Qt to conform to previous editions. Indicate the location of MinGW when asked.

Note: Qt 4.8.4 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.

We now need to add the other dependencies

Firstly

Then

This dependency is best installed in \MinGW rather than the default of \Program files\GNU when requested for the install folder, this will reduce the number of paths to be stored.

Next

Note: Windows 7 does not like .bat files it prefers them as .cmd. If the msys.bat file does not store your previous command try changing it to msys.cmd


The source code is now kept in bzr and no longer updated in the svn see the section on the Stellarium home page under

see Bzr checkout

and finally

  • TortoiseSVN-1.7.7.22907-win32-svn-1.7.5.msi (or the current version) into Windows (http://tortoiseSVN.net/downloads). If you have Windows 7 64 bit don't forget to get and install the 64 bit version TortoiseSVN-1.7.7.22907-x64-svn-1.7.5.msi.(or the current version) Next install bazaar from http://wiki.bazaar.canonical.com/Download During installation tick the bzr shell extension. NOTE: there may be a later versions. (if you want to build the latest development version)

As of build #5572 you will need the updated version of Glext.h from the OpenGL site http://www.opengl.org/registry/api/glext.h and install it in Mingw\include\gl inlieu of the existing version. Note: This may not be necessary with later builds

Configuring the MSYS environment

You need to set some environment variables in the MSYS environment. Start MSYS and enter the following commands.

 export PATH=$PATH:C:\Program Files\CMake 2.8\bin;C:\Qt\4.8.4;c:\Qt\4.8.4\qt\bin;
 C:\mingw\bin;C:\mingw\lib;C:\mingw\include

If you installed packages listed above in non-standard locations (or with different versions which are expressed in the path to the files), you'll need to modify this command appropriately:


When Building with Qt the following paths are best added to the "Path" of the environment variables of your operating system manually. Control panel – System – advanced – environment variables. (use your system drive for "C:")

Note: to avoid secondary paths to older versions of the dependencies it is safer to remove the paths from the environment variables that call "dev-cpp" and \program files\gnuwin32


C:\Program Files\CMake 2.8\bin;C:\Qt\4.8.4;C:\Qt\4.8.4\qt\bin;
C:\mingw\bin;C:\mingw\lib;C:\mingw\include

Getting the source code

Release versions

You can download the source code for the release versions from the sourceforge download area. Save the file to the /home/YOURUSERNAME directory within MSYS (typically this is C:\msys\1.0\home\YOURUSERNAME\ within the Windows filesystem). The file name should be stellarium-0.11.3.tar.gz or similar.

You will need a decompression program installed in Windows. I use a free program "Jzip" which seems to handle all the current compression algorithms.

De-compress the tar file like this:

tar zxvf stellarium-0.11.3.tar.gz

The root of the source tree will be will be /home/YOURUSERNAME/stellarium for simplicity.

Development versions from the Bazaar repository

See also Bzr checkout

You can try the latest development code by downloading from the bzr repositry using the TortoiseSVN client bzr shell. This program integrates with the Windows file browser. See the TortoiseSVN website for details. Check out the source by entering the folder where you have the stellarium source code and from the Windows menu bar:

The root of the source tree typically will be /MSYS/1.0/home/YOURUSERNAME/stellarium.

You will first need to get the source code. Open MSYS to see the command line and enter:

cd /c/msys/1.0/home/YOURNAME 

then

bzr co lp:stellarium

This will download the trunk into .bzr (nearly 1GB at the moment), a hidden folder in the stellarium folder, so it may take some time. When this completes the trunk source code will be written into your stellarium folder.

When the source code is loaded into your stellarium folder you can add any updates from the Windows pull down menu. Note: in Windows 7 the menu will appear if you right click the mouse in a vacant area of the stellarium folder.

Files - TortoiseBZR - update. The default will be the working tree then press enter

Check out to the /home/YOURUSERNAME directory within MSYS (typically this is C:\msys\1.0\home\YOURUSERNAME\ within the Windows filesystem).

Building

  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.iss after you install the Inno Setup Compiler

Doing a test run

If the build was successful, you can run the program without installing it, just to test everything is OK. First you need to find all the DLLs which Stellarium uses, and copy them to the root of the source tree:

  • From the \QT\4.8.4\Qt\bin: QtCore4.dll, phonon4.dll, QtGui4.dll, QtScript4.dll, QtNetwork4.dll, QtOpenGL4.dll, QtSvg4.dll, qtxml4.dll and Qtsql4.dll
  • From the \mingw\bin folder: libiconv2.dll libintl3.dll mingwm10.dll zlib1.dll libgcc_s_dw2-1.dll libstdc++.dll

If you need a language other than English copy the locale folder from \program files\stellarium\share to the stellarium source tree root folder

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:

builds/msys/src/stellarium.exe

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 from the current bzr source.

From http://www.jrsoftware.org download isetup-5.2.2.exe, run it to install.

If you have followed the above procedure the current build from bzr source 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 with an option to place an icon on the desktop if desired.

NOTES:

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
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox