forked from OpenCPN/OpenCPN
-
Notifications
You must be signed in to change notification settings - Fork 3
Compiling on Windows O5
Pavel Kalian edited this page Mar 4, 2018
·
16 revisions
- Get Visual Studio Community 2017 https://www.visualstudio.com/downloads/
- Install. During the installation, select Desktop development with C++ workload and make sure to include Windows XP support for C++ component.
- Get Git for Windows from https://gitforwindows.org
- Install. We strongly suggest letting the installer register git in your PATH and selecting Checkout as-is, Commit Unix LF option as the CR/LF behavior.
- Get the latest CMake installation packages from https://cmake.org
- Install and let it register in the PATH environment variable
- Get the latest POedit installation package from https://poedit.net
- Install. Add C:\Program Files (x86)\Poedit\GettextTools\bin to your PATH.
- Get from http://nsis.sourceforge.net
- Install.
- Fast way to get started but not suitable for serious development as only release configuration libraries are included.
- Get the prebuilt wxWidgets dependencies used by OpenCPN's CI builds from wxWidgets-3.1.1.7z or from the SF mirror
- Extract to somewhere on your disk.
- (Optional, but recommended) Create the wxWIDGETS_ROOT_DIR environment variable with a value of the path to which the archive above was just extracted.
- All the command to be used have to be executed from x86 Native Tools Command Prompt for VS 2017 command prompt
- Download the current source code release from https://github.com/wxWidgets/wxWidgets/releases (Read the instructions there, the Github source code zipball is not what you want) or clone the git repository (do not forget
git submodule init
andgit submodule update
to get the external dependencies) - Switch to the
build\msw
subdirectory - Build release version:
nmake /f makefile.vc BUILD=release SHARED=1 CXXFLAGS=/D_USING_V110_SDK71_ CFLAGS=/D_USING_V110_SDK71_ LDFLAGS=/SUBSYSTEM:WINDOWS",5.01"
- Build debug version:
nmake /f makefile.vc BUILD=debug SHARED=1 CXXFLAGS=/D_USING_V110_SDK71_ CFLAGS=/D_USING_V110_SDK71_ LDFLAGS=/SUBSYSTEM:WINDOWS",5.01"
- (Optional, but recommended) Create/change the wxWIDGETS_ROOT_DIR environment variable with a value of the top level directory of your wxWidgets source tree.
git clone https://github.com/OpenCPN/OpenCPN
- Get the dependencies bundle from OpenCPN_buildwin-4.99.7z or from the SF mirror
- Extract into <Your OpenCPN source tree>/buildwin
- All the command to be used have to be executed from x86 Native Tools Command Prompt for VS 2017 command prompt
cd <Your OpenCPN source tree>
mkdir build
cd build
- Generate the solution files:
cmake -G "Visual Studio 15 2017" -T v141_xp ..
- Do your stuff
- Open the generated
OpenCPN.sln
solution in Visual Studio or - Build debug version from the command line:
cmake --build .
or - Build release version from the command line
cmake --build . --config release
or - Build setup package from the command line
cmake --build . --config release --target package
- Open the generated