Skip to content

Need Help Building for Windows (Latest Branch) #2400

@chaojian-zhang

Description

@chaojian-zhang

Hi Celestia community! I am having real trouble trying to build this from source - so far I've only managed to generate .sln file using CMake on the master branch but haven't been able to successfully build anything.

Since I came late and don't have an account, I couldn't ask in the forum, and I wish someone can help me understand how to build on Windows with latest codebase - or any branch of it really.

I've tried:

## Celestia

git clone https://github.com/CelestiaProject/Celestia
git submodule update --init
set VCPKG_DOWNLOADS=C:\Applications\VCPKGDownloads
vcpkg new --application
vcpkg add port libpng gettext gettext[tools] libjpeg-turbo lua fmt glew eigen3 libepoxy luajit freetype gperf boost-container boost-smart-ptr
vcpkg install

set ROOT=C:\Project\Celestia\vcpkg_installed\x64-windows
cmake -S . -B build ^
  -G "Visual Studio 17 2022" -A x64 ^
  -DCMAKE_TOOLCHAIN_FILE="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg\scripts\buildsystems\vcpkg.cmake" ^
  -DENABLE_QT6=FALSE -DENABLE_WIN=TRUE -DENABLE_NLS=TRUE -DUSE_ICU=TRUE -DUSE_WIN_ICU=TRUE ^
  -DLIBEPOXY_INCLUDE_DIR=%ROOT%\include ^
  -DLIBEPOXY_LIBRARY=%ROOT%\lib\epoxy.lib ^
  -DLIBEPOXY_LIBRARY_DEBUG=%ROOT%\debug\lib\epoxy.lib

## Celestia Content

git clone https://github.com/CelestiaProject/CelestiaContent.git
cd CelestiaContent
mkdir build
cd build
cmake .. -DImageMagick_magick_EXECUTABLE="C:\Program Files\ImageMagick-7.1.2-Q16-HDRI\magick.exe" -DImageMagick_convert_EXECUTABLE="C:\Program Files\ImageMagick-7.1.2-Q16-HDRI\magick.exe" -DImageMagick_identify_EXECUTABLE="C:\Program Files\ImageMagick-7.1.2-Q16-HDRI\magick.exe" -DENABLE_NLS=OFF

For Celestia, I am encountering issues related to Lua, depending on whether I include luajit.

With luajit:

Image

Without luajit:

Image

For CelestiaContent, I think probably I will need the older Image Magick legacy CLI utilities, but I don't know what to do with the generated solution files.

If you are interested, you can take a detailed look at my approach:

Another I don't quite understand is according to ci.yml, we are building with QT6 and WIN simultaneously ON: how is that the case? Since I thought we need to pick only one out of the four frontends?

Many thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions