forked from OpenCPN/OpenCPN
-
Notifications
You must be signed in to change notification settings - Fork 3
WX3.1 and C 11 migration
Pavel Kalian edited this page Feb 21, 2018
·
33 revisions
- ALL the plugins will have to be rebuilt on platforms where we switch to wx3.1, but not many need major changes to be buildable
(So far only weatherfax comes to mind as being problematic because of the obsoletelibaudiofile
version it contains) - Do not forget
git submodule init && git submodule update
with wxWidgets
- C++11 should not be a problem at all
- There is no problem to switch to wx3.1 for snap (and flatpack), which seems to be supported on current versions of all major distros.
- There is a problem to switch to wx3.1 for normal packages on major distros. As big that we must retain wx3.0 compatibility
- The toolchain changes to
v141_xp
- The
buildwin
dependency pack has to be completely rebuilt - Because we need to retain XP compatibility, we can't use prebuilt
wxwin
- The XP compatible SDK must be selected for installation with VS2017
mkdir build-release
cd build-release
cmake -G "Visual Studio 15 2017" -Tv141_xp ..
cmake --build . --config release
cmake --build . --config debug
cmake -G "Visual Studio 15 2017" -Tv141_xp ..
cmake --build . --config release
cmake --build . --config debug
- zlib (1.2.11)
Get from http://www.zlib.net
Get the headers, zlib.lib and zlib.dll, replace the thing in buildwin, fix CMakeLists.txt in grib_pi TODO: remove the headers from O tree and adjust CMakeLists.txt
mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=c:/work/deps -Tv141_xp .. cmake --build . --config release --target install
- openssl (1.1.0g) TODO: Needed for something? We build cURL with WinSSL now
Needs perl
Edit
perl Configure VC-WIN32 no-asm --prefix=c:\work\deps
makefile
, add -D_USING_V141_SDK71_ to CFLAGInstallation ends with an error, butnmake nmake install
c:\work\deps
is already populated with the development stuff we need - cairo (Using modified https://github.com/wingtk/gvsbuild - It is a real adventure...)
- fontconfig
- iconv
- libpng
- libxml2
- pixman
- cairo
- openssl
- zlib
- cURL (7.58.0)
TODO: We need openssl for libwebsockets, switch SSL lib back to it?
Get from http://curl.haxx.se/download.html
Get the headers, .lib and .dll
mkdir build cd build //cmake -DOPENSSL_ROOT_DIR=c:/work/deps -DZLIB_ROOT=C:/work/zlib-1.2.11 -T v141_xp .. cmake -DCMAKE_USE_WINSSL=ON -DZLIB_ROOT=C:/work/deps -DENABLE_INET_PTON=OFF -T v141_xp .. cmake --build . --config release
- liblzma (xzutils 5.2.3)
Open
windows\xz_win.sln
, convert, change the toolchain tov141_xp
, build Release version ofliblzma_dll
- libarchive
- TODO: bzip2? (It is "hard" to build it on Windows from the upstream distribution)
mkdir build-release cd build-release cmake -DWINDOWS_VERSION=WINXP -DENABLE_CNG=OFF -DZLIB_INCLUDE_DIR=C:/work/OpenCPN/buildwin/include -DZLIB_LIBRARY=C:/work/OpenCPN/buildwin/zlib1.lib -DLIBLZMA_INCLUDE_DIR=C:/work/OpenCPN/buildwin/include -DLIBLZMA_LIBRARY=C:/work/OpenCPN/buildwin/liblzma.lib -Tv141_xp ..
Edit CMakeCache.txt
and set ARCHIVE_CRYPTO_SHA[256,384,512]_WIN
to FALSE
to build.
cmake ..
cmake --build . --config release
-
expat
-
crashrpt
-
ocpn_gltest1.exe
-
wx
-
VC redist libs
-
portaudio (some plugins)
-
libwebsockets (SignalK)
mkdir build cd build cmake -Tv141_xp -DOPENSSL_ROOT_DIR=c:\work\deps -DZLIB_ROOT_DIR=c:\work\deps -DLWS_ZLIB_INCLUDE_DIRS=c:\work\deps\include -DLWS_ZLIB_LIBRARIES=c:\work\deps\lib\zlib.lib .. cmake --build . --config release
TODO: But it builds with internal zlib anyway...
Apple pushes to move the least supported version to 10.9, but it seems 10.7 support is still not impossible.
Against wxmac from Homebrew installed with brew install wxmac --HEAD
(brew install wxmac --devel
once it is wx3.1.1)
Have to still retain the 10.7 compatibility and need
mkdir build-release
cd build-release
../configure --with-cxx=11 --with-macosx-version-min=10.7 --enable-unicode --with-osx-cocoa --enable-aui --disable-debug --with-opengl --without-liblzma --without-subdirs
make -j2
sudo make install
(Or switch to the cmake based build)
cmake -DOCPN_USE_LIBCPP=ON ..
export MACOSX_DEPLOYMENT_TARGET=10.7
cmake -DOCPN_USE_LIBCPP=ON ..
To really support 10.7, libarchive
and cairo
must be built manually, not taken from Homebrew