日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > c/c++ >内容正文

c/c++

Stellarium:Compile with MSVC2012 and Qt5 (OpenGL)

發布時間:2023/12/16 c/c++ 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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.gz

The root of the source tree will be will be?D:/Stellarium-Source/stellarium?for simplicity.

開發者版 versions from the Bazaar repository

See also?Bzr checkout

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.

生成

  • 源代碼根目錄, e.g.
    D:\Stellarium-Sources\stellarium
  • 創建生成目錄 build :
    D:\Stellarium-Sources\stellarium\builds\msvc
  • Run CMake[4]?(you can use following?configuring build options):

  • Steps on the screenshot above:
  • Choose directory with source code of Stellarium
  • Choose directory for building of Stellarium
  • Configure project (e.g. you should choose version of compiler)
  • Add special configure options (e.g. you can add?CMAKE_INSTALL_PREFIX?and set?C:\stellarium?here)
  • Generate?CMakeLists.txt?file
  • 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

  • ↑?This dependency was included in Stellarium's source code since revision 6853 and it's not required a separate library now.
  • ↑?Those packages was compiled to static library.
  • ↑?See instructions for adding data to PATH?here. Not required since revision 6853.
  • ↑?If the compile fails with the error "can't find a particular file". Check the?CMakeCache.txt?file in the?...\builds\msys?folder and make sure the variable/path/file is directed to the correct source.
  • ↑?Required only for dynamic library before revision 6853.
  • 錯誤:
  • CMake Error at D:/Qt/Qt5.2.1/5.2.1/msvc2012_64_opengl/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:16 (message):
  • Failed to find "glu32" in "" with CMAKE_CXX_LIBRARY_ARCHITECTURE "".在計算機上搜索glu32 查到在C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64位置然后設置Qt?
  • D:\Qt\Qt5.2.1\5.2.1\msvc2012_64_opengl\lib\cmake\Qt5Gui\Qt5GuiConfigExtras.cmake
  • 在第一行加入set(CMAKE_LIBRARY_PATH "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\\x64")?

  • 總結

    以上是生活随笔為你收集整理的Stellarium:Compile with MSVC2012 and Qt5 (OpenGL)的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。