Page 1 of 1

I can't compile 3.3.1 on windows 10.

Posted: 22 Mar 2019, 17:46
by moltengear
It seems that I do everything as it is written in the instructions, but I cannot compile.
"3rdparty" folder has several empty folders. This was not in the 3.2.3 version.

Re: I can't compile 3.3.1 on windows 10.

Posted: 22 Mar 2019, 17:57
by andrvaut
1) 3.3.1 not yet released. Latest available 3.3.0_beta1
2) https://github.com/Warzone2100/warzone2 ... the-source
Getting the Source

To properly build the game, either:

Download a release tar.xz, which contains all the source code and revision information.

OR

Clone the Git repo:

Code: Select all

    git clone https://github.com/Warzone2100/warzone2100.git
    cd warzone2100
    git submodule update --init --recursive
Note: Initializing submodules is required.

Do not use GitHub's "Download Zip" option, as it does not contain submodules or the Git-based autorevision information.

Re: I can't compile 3.3.1 on windows 10.

Posted: 22 Mar 2019, 18:11
by moltengear
Sorry! Yes. 3.3.0 version

Re: I can't compile 3.3.1 on windows 10.

Posted: 22 Mar 2019, 23:02
by moltengear
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- CMAKE_REQUIRED_DEFINITIONS=-D_ALL_SOURCE=1;-D_GNU_SOURCE=1;-D_POSIX_PTHREAD_SEMANTICS=1;-D_TANDEM_SOURCE=1;-D_DARWIN_C_SOURCE=1;-D_XOPEN_SOURCE=700
-- WZ_BINDIR="bin"
-- WZ_LOCALEDIR="./locale"
-- Could NOT find Miniupnpc (missing: MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) (Required is at least version "9")
-- Using in-tree Miniupnpc
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Linking to SDL2 library: SDL2::SDL2-static
-- Main target should link to SDL2Main: SDL2::SDL2main
CMake Error at vcpkg/downloads/tools/cmake-3.12.4-windows/cmake-3.12.4-win32-x86/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find ZIP (missing: ZIP_EXECUTABLE)
Call Stack (most recent call first):
vcpkg/downloads/tools/cmake-3.12.4-windows/cmake-3.12.4-win32-x86/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindZIP.cmake:61 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
vcpkg/scripts/buildsystems/vcpkg.cmake:233 (_find_package)
data/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!



Did not work out! I tried to build using the command line.

Code: Select all

C:\Users\username\warzone2100>C:\Users\username\warzone2100\vcpkg\downloads\tools\cmake-3.12.4-windows\cmake-3.12.4-win32-x86\bin\cmake.exe -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=C:\Qt\Qt5.9.4\5.9.4\msvc2015 -Bbuild -G "Visual Studio 15 2017"

Re: I can't compile 3.3.1 on windows 10.

Posted: 27 Mar 2019, 16:50
by moltengear
Can anyone share files from Visual Studio, such as .vcxproj, .sln.

Re: I can't compile 3.3.1 on windows 10.

Posted: 27 Mar 2019, 17:57
by pastdue
CMake generates the Visual Studio project.

From the following error:
Could NOT find ZIP (missing: ZIP_EXECUTABLE)
It appears as though you did not install 7-Zip, as listed in the Prerequisites section of: https://github.com/Warzone2100/warzone2 ... using-msvc

Re: I can't compile 3.3.1 on windows 10.

Posted: 27 Mar 2019, 22:24
by moltengear
Thanks! Now this list.

-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- CMAKE_REQUIRED_DEFINITIONS=-D_ALL_SOURCE=1;-D_GNU_SOURCE=1;-D_POSIX_PTHREAD_SEMANTICS=1;-D_TANDEM_SOURCE=1;-D_DARWIN_C_SOURCE=1;-D_XOPEN_SOURCE=700
-- WZ_BINDIR="bin"
-- WZ_LOCALEDIR="./locale"
-- Could NOT find Miniupnpc (missing: MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) (Required is at least version "9")
-- Using in-tree Miniupnpc
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Linking to SDL2 library: SDL2::SDL2-static
-- Main target should link to SDL2Main: SDL2::SDL2main
-- 7z supports switch: -bb0 ... YES
-- Could NOT find Asciidoctor (missing: Asciidoctor_COMMAND) (Required is at least version "1.5.3")
-- Could NOT find A2X (missing: A2X_COMMAND)
CMake Warning at doc/CMakeLists.txt:38 (message):
Neither Asciidoctor nor a2x was found. Documentation cannot be generated
unless at least one is installed. (Skipping documentation generation.)


-- Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE) (Required is at least version "0.18")
CMake Warning at po/CMakeLists.txt:5 (message):
Gettext is not found. Skipping language file generation. (Only the
default language, English, will be available.)


-- Set TARGET warzone2100 LINK_FLAG: /MANIFEST:NO ... YES (cached)
-- Set TARGET warzone2100 LINK_FLAG: /NXCOMPAT ... YES (cached)
-- Set TARGET warzone2100 LINK_FLAG: /DYNAMICBASE ... YES (cached)
-- fixup_bundle: IGNORE_ITEM msvcp140.dll;vcruntime140.dll;concrt140.dll;api-ms-win-core-console-l1-1-0.dll;api-ms-win-core-datetime-l1-1-0.dll;api-ms-win-core-debug-l1-1-0.dll;api-ms-win-core-errorhandling-l1-1-0.dll;api-ms-win-core-file-l1-1-0.dll;api-ms-win-core-file-l1-2-0.dll;api-ms-win-core-file-l2-1-0.dll;api-ms-win-core-handle-l1-1-0.dll;api-ms-win-core-heap-l1-1-0.dll;api-ms-win-core-interlocked-l1-1-0.dll;api-ms-win-core-libraryloader-l1-1-0.dll;api-ms-win-core-localization-l1-2-0.dll;api-ms-win-core-memory-l1-1-0.dll;api-ms-win-core-namedpipe-l1-1-0.dll;api-ms-win-core-processenvironment-l1-1-0.dll;api-ms-win-core-processthreads-l1-1-0.dll;api-ms-win-core-processthreads-l1-1-1.dll;api-ms-win-core-profile-l1-1-0.dll;api-ms-win-core-rtlsupport-l1-1-0.dll;api-ms-win-core-string-l1-1-0.dll;api-ms-win-core-synch-l1-1-0.dll;api-ms-win-core-synch-l1-2-0.dll;api-ms-win-core-sysinfo-l1-1-0.dll;api-ms-win-core-timezone-l1-1-0.dll;api-ms-win-core-util-l1-1-0.dll;api-ms-win-crt-conio-l1-1-0.dll;api-ms-win-crt-convert-l1-1-0.dll;api-ms-win-crt-environment-l1-1-0.dll;api-ms-win-crt-filesystem-l1-1-0.dll;api-ms-win-crt-heap-l1-1-0.dll;api-ms-win-crt-locale-l1-1-0.dll;api-ms-win-crt-math-l1-1-0.dll;api-ms-win-crt-multibyte-l1-1-0.dll;api-ms-win-crt-private-l1-1-0.dll;api-ms-win-crt-process-l1-1-0.dll;api-ms-win-crt-runtime-l1-1-0.dll;api-ms-win-crt-stdio-l1-1-0.dll;api-ms-win-crt-string-l1-1-0.dll;api-ms-win-crt-time-l1-1-0.dll;api-ms-win-crt-utility-l1-1-0.dll;ucrtbase.dll
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/username/warzone2100/build

Re: I can't compile 3.3.1 on windows 10.

Posted: 27 Mar 2019, 23:55
by WZ2100ModsFAn
moltengear wrote:
27 Mar 2019, 22:24
Thanks! Now this list.

-- Could NOT find Miniupnpc (missing: MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) (Required is at least version "9")
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find Asciidoctor (missing: Asciidoctor_COMMAND) (Required is at least version "1.5.3")
-- Could NOT find A2X (missing: A2X_COMMAND)
CMake Warning at doc/CMakeLists.txt:38 (message):
Neither Asciidoctor nor a2x was found. Documentation cannot be generated
unless at least one is installed. (Skipping documentation generation.)


-- Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE) (Required is at least version "0.18")
CMake Warning at po/CMakeLists.txt:5 (message):
Gettext is not found. Skipping language file generation. (Only the
default language, English, will be available.)
GetTex Can be found on source forge
Asciidoctor & a2x can be found on asciidoctor's website
You need to clone the repo from miniupnc

Re: I can't compile 3.3.1 on windows 10.

Posted: 28 Mar 2019, 00:44
by pastdue
moltengear wrote:
27 Mar 2019, 22:24
Thanks! Now this list.

<snip>
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/username/warzone2100/build
It appears to have completed. Check the C:/Users/username/warzone2100/build folder for the Visual Studio project files.

(The warnings are about optional things - like the tools required to generate documentation. They aren't needed if you just want to build the game locally.)

Re: I can't compile 3.3.1 on windows 10.

Posted: 28 Mar 2019, 01:00
by moltengear
Thanks!
10>c:\qt\qt5.9.4\5.9.4\msvc2015\include\qtcore\qalgorithms.h(847): error C3615: constexpr function 'qCountLeadingZeroBits' cannot result in a constant expression
10>c:\qt\qt5.9.4\5.9.4\msvc2015\include\qtcore\qalgorithms.h(858): note: failure was caused by call of undefined function or one not declared 'constexpr'
10>c:\qt\qt5.9.4\5.9.4\msvc2015\include\qtcore\qalgorithms.h(858): note: see usage of 'qPopulationCount'
7>png_util.cpp
10>Generating Code...
10>Done building project "netplay.vcxproj" -- FAILED.


Now swears on Qt!

Re: I can't compile 3.3.1 on windows 10.

Posted: 28 Mar 2019, 12:44
by moltengear
https://forum.qt.io/topic/93711/problem ... d-qt-5-9-5
https://codereview.qt-project.org/#/c/2 ... gorithms.h

In connection with the update of the Visual Studio it is necessary to make some changes in the QT file.
It is advisable to update the information on the compilation on Windows. It would be nice to create a complete manual in a separate file.

Re: I can't compile 3.3.1 on windows 10.

Posted: 28 Mar 2019, 13:11
by pastdue
It looks like you have Qt 5.9.4. Update to Qt 5.9.7, which fixes this Qt header issue.

Re: I can't compile 3.3.1 on windows 10.

Posted: 01 Sep 2019, 15:58
by moltengear
Thanks for the release!
But I can not compile!

Code: Select all

CMake Error at vcpkg/scripts/buildsystems/vcpkg.cmake:256 (_find_package):
  Could not find a package configuration file provided by "Qt5Script" with
  any of the following names:

    Qt5ScriptConfig.cmake
    qt5script-config.cmake

  Add the installation prefix of "Qt5Script" to CMAKE_PREFIX_PATH or set
  "Qt5Script_DIR" to a directory containing one of the above files.  If
  "Qt5Script" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  C:/Qt/5.13.0/msvc2017/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  vcpkg/scripts/buildsystems/vcpkg.cmake:256 (_find_package)
  CMakeLists.txt:116 (find_package)

I wrote a line like this in the console

Code: Select all

vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH=C:\Qt\5.13.0\msvc2017

Re: I can't compile 3.3.1 on windows 10.

Posted: 02 Sep 2019, 10:42
by moltengear
I could not install the Qt5script with the new Qt 5.13.0. I used the Qt 5.9.7.

Code: Select all

cd C:\warzone2100
vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH=C:\Qt\Qt5.9.7\5.9.7\msvc2015
qt settings setup.png
qt settings setup.png (21.57 KiB) Viewed 3130 times

Re: I can't compile 3.3.1 on windows 10.

Posted: 02 Sep 2019, 10:45
by moltengear
Just one question. How to make portable version without installation file?