Stellarium:Compile with MSVC2012 and Qt5 (OpenGL)
配置環境變量 最后更新2014年6月
After installing all required libraries and tools you should configure the build environment.
- Add?D:\zlib?to PATH variable - you should add string?D:\zlib\lib;D:\zlib\include(這兩個我沒加)?to PATH variable[3].
- Add?D:\Qt5?to PATH variable - you should add string?D:\Qt5\5.2.1\msvc2012_64_opengl\;D:\Qt5\5.2.1\msvc2012_64_opengl\bin;D:\Qt5\5.2.1\msvc2012_64_opengl\lib;D:\Qt5\5.2.1\msvc2012_64_opengl\include?to PATH variable.
Note:?After changes the?PATH?variable you should reboot the computer for apply those changes.
獲取源代碼
發布版
You can download the source code for the release versions from the sourceforge download area. 保存文件到D:/Stellarium-Source?目錄. The file name should be?stellarium-0.13.0.tar.gz?or similar.
You will need a decompression program installed in Windows, for example?7-Zip.
De-compress the tar file like this:
tar zxvf stellarium-0.13.0.tar.gzThe root of the source tree will be will be?D:/Stellarium-Source/stellarium?for simplicity.
開發者版 versions from the Bazaar repository
You can try the latest development code by downloading from the bzr repository using the TortoiseBZR client bzr shell. This program integrates with the Windows file browser. See the TortoiseBZR 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?C:\Stellarium-Source\stellarium.
You will first need to get the source code.
For example you use TortoiseBZR and want get the source code of the Stellarium. Run Explorer and open directory?C:\Stellarium-Source, choose directory?stellarium?and make right click mouse. In opened window select "Bazaar create working copy/branch". Set source as "lp:stellarium", destination directory will be "C:\Stellarium-Source\stellarium". Press OK for getting source code.
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.
生成
This will place all the compiled files in?C:\stellarium. From where they will be found when you run the installer program?stellarium.iss?after you install the Inno Setup Compiler.
測試運行
If the build was successful, you can run the program without installing it, just to test everything is OK.首先找到所有DLLs Stellarium uses, and 拷貝到源代碼樹的根目錄:
- From the?\Qt5\5.2.1\msvc2012_64_opengl\bin?folder:?Qt5Core.dll,?Qt5Concurrent.dll,?Qt5Declarative.dll,?Qt5Gui.dll,?Qt5Network.dll,?Qt5OpenGL.dll,?Qt5Widgets.dll,?Qt5Sql.dll,?Qt5XmlPatterns.dll,?icudt51.dll,?icuin51.dll, and?icuuc51.dll;
- From the?\zlib?folder:?zlib1.dll[5]
- From the?\Qt5\5.2.1\msvc2012_64_opengl\plugins\platforms?folder to the?/platforms?of the source tree:?qwindows.dll
- From the?\Qt5\5.2.1\msvc2012_64_opengl\imports\Qt\labs\shaders?folder to the?/Qt/labs/shaders?of the source tree:?qmldir,?plugins.qmltypes, and?qmlshadersplugin.dll
If you need a language other than English copy the?stellarium\translations?folder from?C:\stellarium\share?(or?\program files\stellarium\share?if you don't set?CMAKE_INSTALL_PREFIX?variable) to the stellarium source tree root folder.
Finally run?Build?for?INSTALL?solution in Visual Studio.
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?http://www.jrsoftware.org?download version 5.5.3 (unicode) or better, run it to install.
If you have followed the above procedure the current bzr 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.
Notes
總結
以上是生活随笔為你收集整理的Stellarium:Compile with MSVC2012 and Qt5 (OpenGL)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 零延迟!海康大华宇视网络监控摄像头RTS
- 下一篇: 条件运算符的嵌套_条件运算符