Windows Build Instructions

(Difference between revisions)
Jump to: navigation, search
(Step 1: SVN client)
m (Making the Package)
(10 intermediate revisions by 3 users not shown)
Line 36: Line 36:
 
Run this and install it in your preferred location or use the default
 
Run this and install it in your preferred location or use the default
  
===Step 2: Qt SDK===
+
===Step 2: MinGW and Qt SDK===
At the moment 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.
+
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)
 
   Qt libraries 4.8.2 for Windows (MinGW 4.4, 318 MB)
  
from http://qt.nokia.com . Remove any earlier version first.
+
from http://qt-project.org/downloads#qt-lib . Remove any earlier version first.
 
   
 
   
Next we will need the version of MinGW that contains Gettext and libintl versions 0.18.1.1-2. This will need to be built from the file:
+
Next we will need the version of MinGW that contains Gettext and libintl versions 0.18.1.1-2. The easiest way to install MinGW and its components is to use mingw-get ([http://sourceforge.net/projects/mingw/files/latest/download download the latest mingw-get]).
 
+
  mingw-get-inst-20120426.exe (662.7kB)
+
 
+
Obtained from: 
+
 
+
  https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.7.0-1/
+
  
 
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. This is quite a large down load and requires some additions to the starting menu.  
 
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. This is quite a large down load and requires some additions to the starting menu.  
Line 57: Line 51:
 
MinGW needs to be installed before any other dependencies as it location must be known by Qt and Msys.
 
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
 +
http://www.opengl.org/registry/api/glext.h 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  http://qt.nokia.com and installed in Qt\4.8.2. Put the new MinGW here also to conform with previous builds.
 
Next we need a copy of Qtcreator, again obtained from  http://qt.nokia.com and installed in Qt\4.8.2. Put the new MinGW here also to conform with previous builds.
Line 62: Line 58:
  
 
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
 
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===
 
===Step 3: CMake===
Line 74: Line 74:
 
  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;  
 
  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;  
 
  C:\Qt\4.8.2\mingw\lib;C:\Qt\4.8.2\mingw\include
 
  C:\Qt\4.8.2\mingw\lib;C:\Qt\4.8.2\mingw\include
 +
 +
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 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.
Line 80: Line 82:
  
 
Gettext, libintl and libiconv will be installed as part of the new MinGW environment.so you will only need zlib
 
Gettext, libintl and libiconv will be installed as part of the new MinGW environment.so you will only need zlib
 
  
 
===Step 5: Zlib===
 
===Step 5: Zlib===
Line 124: Line 125:
 
(warning messages that don't stop the build or major reasons that do).
 
(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.
 
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.
Go to the Qt\4.8.2 and copy
+
 
 +
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
 
libgcc_s_dw2-1.dll....from qt/4.8.2/MinGW/bin
Line 177: Line 179:
  
 
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.
 
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.
 +
 +
[[Category: Development]]

Revision as of 16:30, 7 December 2013

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


Contents

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.

http://www.microsoft.com/windows/win...s-xp-mode.aspx

http://www.microsoft.com/windows/vir.../download.aspx

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 http://www.collab.net (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 http://qt-project.org/downloads#qt-lib . Remove any earlier version first.

Next we will need the version of MinGW that contains Gettext and libintl versions 0.18.1.1-2. 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-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.

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 http://www.opengl.org/registry/api/glext.h 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 http://qt.nokia.com 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 http://www.cmake.org 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; 
C:\Qt\4.8.2\mingw\lib;C:\Qt\4.8.2\mingw\include

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 environment.so you will only need zlib

Step 5: Zlib

zlib: Download the "Complete package, except sources" installer from http://gnuwin32.sourceforge.net/packages/zlib.htm 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 http://www.jrsoftware.org 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
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox