BuildWindowsGisinternals - Maproom/qmapshack GitHub Wiki

Prev (GDAL support for additional map formats) | Home | Manual | Index | (Ubuntu-14.04) Next


Table of contents


Build QMapShack for Windows using GISInternals

This page describes a more or less complete build process for QMapShack (QMS) using GISInternals.

Introduction

A build procedure for QMapShack and QMapTool (QMS) on Windows is described here and here. Using this procedure, all packages on which QMS depends (GDAL, proj, zlib, ...) must be built individually from their sources (assuming that a suitable precompiled package is not available). If additional GDAL plugins (e.g. for the ECW format) are to be used in QMS, separate build steps are required for these plugins. The user must ensure that all required packages (including Qt6 and optional GDAL plugins) are built with compatible compiler versions. Depending on the GDAL version and the GDAL build configuration, building the plugins using this procedure may fail for various reasons.

This page describes a QMS build procedure for Windows based on a complete and precompiled GDAL build environment package provided by GISInternals. This procedure has several advantages over the one just mentioned:

  • GISInternals packages are provided for different versions of Microsoft Visual Studio (MSVC).

  • GISInternals packages are provided for different GDAL versions.

  • GISInternals packages support many GDAL plugins, including those for the widely used ECW, MrSID, PDF, KMZ, OZIExplorer, and other raster map plugins (main reason for using GISInternals).

  • GISInternals packages provide precompiled library and header files for all GDAL dependencies and plugins. This implies that there is no need to download Hexagon ERDAS ECW/JP2 SDK or other sources.

  • GISInternals packages provide all necessary DLL files. Build/compile steps for GISInternals packages are not required. Remark: Building one of the GISInternals packages would require the preliminary download of the sources of some of the dependency packages and/or adjusted settings in the GISInternals makefile, and is not recommended.

  • All QMS dependencies except for Qt6, Routino, and Quazip are also dependencies of GDAL and are therefore available in precompiled form. Remark: Use the Dependency Walker to identify these dependencies.

  • Only the Routino and Quazip dependencies of QMS for which no precompiled build environments are available have to be built separately. This greatly reduces the number of build/compiler runs required before building QMS itself.

    Routino doesn't depend on any of the GDAL dependencies.

    Quazip depends on zlib, which is also a GDAL dependency.

  • All individual packages within a GISInternals package are built with the same compiler version. Runtime libraries compiled with MSVC 2015 or later versions of the compiler are binary-compatible. This gives some freedom in choosing the MSVC version as well as the Qt6, the GISInternals, and other package versions. To meet the compiler compatibility requirements, QMS should be compiled with the latest MSVC version and the latest redistributable version possible.

A disadvantage of this approach is that the user is bound to the software versions chosen by GISInternals.

Overview of required software

The following software packages (dependencies) are used during the QMS build process on Windows:

  • Microsoft Visual Studio (MSVC)
  • msys2
  • Qt6
  • Routino
  • Quazip
  • GISInternals
  • Java (used with BRouter)
  • BRouter (not discussed on this page)

Get required packages

  1. Install, if not yet done, Microsoft Visual Studio (MSVC) 2026 or later (or update to this version if MSVC is already installed). Compiling QMS with this MSVC version ensures compatibility with dependency packages compiled with earlier MSVC versions (up to 2015):

    1. Open https://visualstudio.microsoft.com/downloads
    2. Download from this page the free-of-charge Visual Studio 2026 Community Edition installer.
    3. Run the downloaded Visual Studio installer. Selecting the package for desktop development with C++ is sufficient.
  2. Install, if not yet done, the latest Microsoft Visual C++ Redistributable (this package is part of MSVC, too!).

  3. Install, if not yet done, a Qt6 version for one of the compatible MSVC versions (example: Qt 6.10.0 or newer).

    1. Download the Qt6 online installer for open source use for Windows x64 from https://www.qt.io/development/download-qt-installer-oss

    2. Launch the downloaded online installer

    3. Register, if not yet done

    4. Follow the next steps

    5. Select user-defined installation

    6. Open the Qt branch

    7. Select a Qt version with an MSVC branch compatible with the installed MSVC version (e.g. Qt 6.10.1 - MSVC 2022 64-bit

    8. Select at least the following additional libraries for the selected Qt version:

      • Qt 5 Compatibility Module
      • Qt Image Formats
      • Qt Positioning
      • Qt Serial Port
      • Qt WebChannel
    9. From the extensions branch, select Qt WebEngine for the selected Qt and MSVC versions

    10. Follow the next steps to download the selected components (this includes the necessary library and header files)

    11. Check the installed libraries by looking at the XML part of the output of the command

      maintenancetool list
      

      XML part of output:

      <?xml version="1.0"?>
      <localpackages>
          ...
          <package name="extensions.qtwebengine" displayname="Qt WebEngine" version="1.0.1-202503311052"/>
          ...
          <package name="qt.qt6.6100.addons.qt5compat.win64_msvc2022_64" displayname="Qt 5 Compatibility module for MSVC 2022 64-bit" version="6.10.0-0-202510021201"/>
          ...
      </localpackages>
      

      For more information compare the Qt6 documentation.

    12. Check for library updates by looking at the XML part of the output of the command

      maintenancetool.exe check-updates
      

      XML part of output:

      <?xml version="1.0"?>
      <updates>
          ...
          <update name="Qt WebEngine" version="10.0.0-202512021138" size="0" id="extensions.qtwebengine"/>
          ...
      </updates>        
      
  4. If a MySQL database is to be used in QMS: Install Qt6 MySQL driver/plugin (Qt6 doesn't provide this driver anymore):

    1. Download MySQL binaries from https://github.com/thecodemonkey86/qt_mysql_driver/releases
      1. Select QMYSQL driver 6.10.0 (the installed Qt6 version)

      2. Download qsqlmysql.dll_Qt_SQL_driver_6.10.0_MSVC2022_64-bit.zip and unpack it.

        The optimal location of the file sqldrivers\qsqlmysql.dll of the ZIP package would be the 6.10.0\msvc2022_64\plugins\sqldrivers subdirectory of the Qt6 installation directory. To avoid cluttering of the Qt installation directory, the ZIP file should be unpacked to the mysql\<qt_version> subdirectory of the QMS base directory (e.g. d:\QtProjects\QMS\mysql\6.10.0 - the mysql driver depends on the Qt version!). Remark: The compilation of MySQL is described in https://doc.qt.io/qt-6/sql-driver.html.

    Remark: The lib*.dll files in the downloaded zip file are part of the GISInternals package, too. Thus, only the files in the sqldrivers subdirectory have to be added to the final QMS distribution sqldrivers subdirectory.

  5. Download the Quazip sources and unpack them.

  6. If not yet done so, install the MinGW-w64/MSYS2 package:

    1. Download the MSYS2 installer (currently: msys2-x86_64-20251213.exe, alternative download from GitHub)
    2. Run the MSYS2 installer.
    3. Use the MSYS2 UCRT64 command prompt window (open from the Start menu after MSYS2 installation) to install some additional packages:
      1. Install gcc: pacman -S mingw-w64-ucrt-x86_64-gcc
      2. Install make: pacman -S make
      3. Install bzip2: pacman -S mingw-w64-ucrt-x86_64-bzip2
    4. For updating MSYS2, follow these instructions.
  7. Download the latest Routino version from https://www.routino.org/download and unpack it to C:\msys64\home\currentUser

.

  1. Goto the GISInternals Development Kits page

    1. Select an MSVC version for the x64 architecture compatible with the installed MSVC version.
    2. Click the corresponding development release package (example: release-1930-x64-dev) and download its ZIP file.
    3. Unpack the downloaded ZIP file. To avoid DLL version conflicts delete the files .\release-1930-x64\bin\proj_?_?.dll with the exception of the newest/latest one.

    Remarks:

    • In this GISInternals link, the latest available GDAL version is used. Its version number can be found in the file .\release-1930-x64\doc\gdal_version.txt.
    • Other GDAL versions can be found when starting from GISInternals stable or other branches.
    • The versions of additional dependency packages contained in GISInternals and their download locations can be found near the end of the file config.opt in the GISInternals root directory or in the file release-1930-x64\doc\gdal_deps.txt.
    • A list of supported GDAL formats can be found in the file .\release-1930-x64\doc\gdal_formats.txt.
  2. Download the QMS sources from https://github.com/Maproom/qmapshack (depending on the used download method: git and some experience in using it can be useful).

Build QMS

  1. Build the Routino library:

    1. Open the MSYS2 UCRT64 console from the Windows program menu
    2. Change to the root directory of the unpacked Routino sources (use POSIX notation, i.e. slashes instead of backslashes)
    3. Run make clean
    4. Run make
  2. The following steps are based on the use of the CMake command-line tool. Use the Visual Studio 18 2026 generator for the x64 architecture to compile Quazip and QMS with the CMake build system (alternative: use the Ninja generator). All CMake configuration parameter settings have to be saved in configuration files. The information given in these configuration files can easily be applied when working with the CMake-gui. Examples of these files are shown in subsection "Configuration examples" of this page. Parameters shown there are used by the author of this page. The file Common.cfg has parameter settings used for building Quazip and QMS. The file QMS_Only.cfg resp. Quazip_only.cfg have parameter settings that are used only in QMS resp. Quazip builds. Remark: Not all parameters of these configuration files are used in the CMake runs described later on this page. Some of them are used elsewhere by the author of this page.

  3. Build the Quazip library (without BZip2). Quazip depends on zlib, which should be taken from the GISInternals package using its DLL filename convention.

    1. Create the files Common.cfg, QMS_Only.cfg, and Quazip_only.cfg with the contents shown in subsection "Configuration examples".
    2. Adjust the settings for Quazip, Qt6, and zlib in the CMake configuration files Common.cfg and Quazip_only.cfg.
    3. Open the MSVC x64 Native Tools Command Prompt from the Windows start menu.
    4. Change to the Quazip root directory (the one where the Quazip sources are unpacked)
    5. Run md build
    6. Run cd build
    7. Run cmake -G "Visual Studio 18 2026" -A x64 -S .. -B . -LA -C <path_to_Common.cfg> -C <path_to_Quazip_only.cfg>
    8. Check that the configuration and generation of the build system have been correct (look for output lines -- Configuring done and -- Generating done and check all displayed variable values)
    9. Run cmake --build . --config Release -j8
    10. Run cmake --build . --config Release -j8 --target install
  4. Build QMS.

    1. Adjust the settings for Routino, Quazip, GISInternals, and Qt6 in the CMake configuration files Common.cfg and QMS_only.cfg for QMS.
    2. Open the MSVC x64 Native Tools Command Prompt from the Windows start menu.
    3. Change to the QMS root directory (the one where the QMS sources are unpacked)
    4. Run md build
    5. Run cd build
    6. Run cmake -G "Visual Studio 18 2026" -A x64 -S .. -B . -LA -C <path_to_Common.cfg> -C <path_to_QMS_only.cfg>
    7. Check that the configuration and generation of the build system have been correct (look for output lines -- Configuring done and -- Generating done and check all displayed variable values)
    8. Run cmake --build . --config Release -j8
  5. Copy all required DLL and other files to the ...\QMS\msvc_64\Files directory before starting QMS for the first time.

    The file copyfiles.bat shown in the subsection "Example of copyfiles.bat" can serve as a basis for this copy step, but it needs to be adapted as it depends on version numbers and some filenames used by the author of this page.

  6. Set the

    1. GDAL_DATA environment variable to ...\QMS\msvc_64\Files\data
    2. GDAL_DRIVER_PATH environment variable to ...\QMS\msvc_64\Files\gdalplugins
    3. PROJ_LIB environment variable to ...\QMS\QMapShack\msvc_64\Files\share\proj

Remarks:

  • If a projection error occurs when starting QMS, the content of the Files\share\proj directory is incomplete. Restarting QMS after such a projection error with an updated share\proj directory may fail due to a corrupted QMS INI file. In the Views section of the INI file, the projections may be missing or incomplete. In this case, delete the Views section of the INI file and restart QMS.
  • Version numbers of the dependencies used in GISInternals can be found in the files ...\release-1930-x64\doc\gdal_deps.txt and ...\release-1930-x64\doc\gdal_version.txt.
  • Call gdalinfo --formats to see all map formats (plugins) supported by GDAL. Among others, ECW, MrSID, and MBTILES are available.
  • The described use of GISInternals allows for MySQL databases to be accessed in QMS.

Configuration examples

The following files are examples of CMake configuration files for building Quazip and QMS. They are used by the author of this page for building QuaZip and QMS and must be adjusted to user needs.

Common configuration file Common.cfg

set(CMAKE_AR			 "C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/lib.exe"			 CACHE	 FILEPATH "" FORCE)
set(CMAKE_BUILD_TYPE			 "Release"			 CACHE	 STRING "" FORCE)
set(CMAKE_CONFIGURATION_TYPES			 "Debug;Release;MinSizeRel;RelWithDebInfo"			 CACHE	 STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG			 "/Zi /Ob0 /Od /RTC1"			 CACHE	 STRING "" FORCE)
set(CMAKE_CXX_FLAGS_MINSIZEREL			 "/O1 /Ob1 /DNDEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE			 "/O2 /Ob2 /DNDEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO			 "/Zi /O2 /Ob1 /DNDEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_CXX_STANDARD_LIBRARIES			 "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib"			 CACHE	 STRING "" FORCE)
set(CMAKE_C_FLAGS			 "/DWIN32 /D_WINDOWS"			 CACHE	 STRING "" FORCE)
set(CMAKE_C_FLAGS_DEBUG			 "/Zi /Ob0 /Od /RTC1"			 CACHE	 STRING "" FORCE)
set(CMAKE_C_FLAGS_MINSIZEREL			 "/O1 /Ob1 /DNDEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE			 "/O2 /Ob2 /DNDEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO			 "/Zi /O2 /Ob1 /DNDEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_C_STANDARD_LIBRARIES			 "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib"			 CACHE	 STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS			 "/machine:x64"			 CACHE	 STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG			 "/debug /INCREMENTAL"			 CACHE	 STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL			 "/INCREMENTAL:NO"			 CACHE	 STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE			 "/INCREMENTAL:NO"			 CACHE	 STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO			 "/debug /INCREMENTAL"			 CACHE	 STRING "" FORCE)
set(CMAKE_INSTALL_BINDIR			 "bin"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_DATADIR			 ""			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_DATAROOTDIR			 "share"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_DOCDIR			 ""			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_INCLUDEDIR			 "include"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_INFODIR			 ""			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_LIBDIR			 "lib"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_LIBEXECDIR			 "libexec"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_LOCALEDIR			 ""			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_LOCALSTATEDIR			 "var"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_MANDIR			 ""			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_OLDINCLUDEDIR			 "/usr/include"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_RUNSTATEDIR			 ""			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_SBINDIR			 "sbin"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_SHAREDSTATEDIR			 "com"			 CACHE	 PATH "" FORCE)
set(CMAKE_INSTALL_SYSCONFDIR			 "etc"			 CACHE	 PATH "" FORCE)
set(CMAKE_LINKER			 "C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/link.exe"			 CACHE	 FILEPATH "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS			 "/machine:x64"			 CACHE	 STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG			 "/debug /INCREMENTAL"			 CACHE	 STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL			 "/INCREMENTAL:NO"			 CACHE	 STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE			 "/INCREMENTAL:NO"			 CACHE	 STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO			 "/debug /INCREMENTAL"			 CACHE	 STRING "" FORCE)
set(CMAKE_MT			 "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64/mt.exe"			 CACHE	 FILEPATH "" FORCE)
set(CMAKE_RC_COMPILER			 "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64/rc.exe"			 CACHE	 FILEPATH "" FORCE)
set(CMAKE_RC_FLAGS			 "-DWIN32"			 CACHE	 STRING "" FORCE)
set(CMAKE_RC_FLAGS_DEBUG			 "-D_DEBUG"			 CACHE	 STRING "" FORCE)
set(CMAKE_RC_FLAGS_MINSIZEREL			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_RC_FLAGS_RELEASE			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_RC_FLAGS_RELWITHDEBINFO			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS			 "/machine:x64"			 CACHE	 STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG			 "/debug /INCREMENTAL"			 CACHE	 STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL			 "/INCREMENTAL:NO"			 CACHE	 STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE			 "/INCREMENTAL:NO"			 CACHE	 STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO			 "/debug /INCREMENTAL"			 CACHE	 STRING "" FORCE)
set(CMAKE_SKIP_INSTALL_RPATH			 "NO"			 CACHE	 BOOL "" FORCE)
set(CMAKE_SKIP_RPATH			 "NO"			 CACHE	 BOOL "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS			 "/machine:x64"			 CACHE	 STRING "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS_DEBUG			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO			 ""			 CACHE	 STRING "" FORCE)
set(CMAKE_VERBOSE_MAKEFILE			 "FALSE"			 CACHE	 BOOL "" FORCE)
set(EXEFILE			 "1.19.0.2"			 CACHE	 STRING "" FORCE)
set(GISDATE			 "260118"			 CACHE	 STRING "" FORCE)
set(GISInternals_DEV_PATH			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64"			 CACHE	 PATH "" FORCE)
set(GISInternals_VER			 "1930"			 CACHE	 STRING "" FORCE)
set(MSVC_GENERATOR			 "Visual Studio 18 2026"			 CACHE	 STRING "" FORCE)
set(MSVC_VER			 "14.50.35717"			 CACHE	 STRING "" FORCE)
set(MSYS2_DIR			 "c:/msys64"			 CACHE	 STRING "" FORCE)
set(PROJ_SUBVER			 "6"			 CACHE	 STRING "" FORCE)
set(PROJ_VER			 "9"			 CACHE	 STRING "" FORCE)
set(PROJ_VER0			 "9.6.2"			 CACHE	 STRING "" FORCE)
set(QMSDIR			 "d:/QtProjects/QMS"			 CACHE	 STRING "" FORCE)
set(QMSSRC			 "QMS4Qt6"			 CACHE	 STRING "" FORCE)
set(QMS_VER			 "1.19"			 CACHE	 STRING "" FORCE)
set(QMS_VERX			 "1.19.0.2"			 CACHE	 STRING "" FORCE)
set(QT6_VER			 "6.10.0"			 CACHE	 STRING "" FORCE)
set(QTBASE			 "c:/Qt"			 CACHE	 STRING "" FORCE)
set(QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH			 ""			 CACHE	 STRING "" FORCE)
set(QT_ADDITIONAL_PACKAGES_PREFIX_PATH			 ""			 CACHE	 STRING "" FORCE)
set(QT_DEV_PATH			 "c:/Qt/6.10.0/msvc2022_64"			 CACHE	 PATH "" FORCE)
set(QT_MSVC64_VER			 "2022_64"			 CACHE	 STRING "" FORCE)
set(QT_VER			 "6.10.0"			 CACHE	 STRING "" FORCE)
set(QUAZIP_VER			 "1.5"			 CACHE	 STRING "" FORCE)
set(Qt6Core5Compat_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Core5Compat"			 CACHE	 PATH "" FORCE)
set(Qt6CoreTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6CoreTools"			 CACHE	 PATH "" FORCE)
set(Qt6Core_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Core"			 CACHE	 PATH "" FORCE)
set(Qt6EntryPointPrivate_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6EntryPointPrivate"			 CACHE	 PATH "" FORCE)
set(Qt6Network_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Network"			 CACHE	 PATH "" FORCE)
set(Qt6ZlibPrivate_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6ZlibPrivate"			 CACHE	 PATH "" FORCE)
set(ROUTINO_VER			 "3.4.3"			 CACHE	 STRING "" FORCE)
set(WINDEPLOYQT_EXECUTABLE			 "C:/Qt/6.10.0/msvc2022_64/bin/windeployqt.exe"			 CACHE	 FILEPATH "" FORCE)
set(ZLIB_INCLUDE_DIR			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/include"			 CACHE	 PATH "" FORCE)

Quazip configuration file Quazip_only.cfg

set(BUILD_SHARED_LIBS			 "ON"			 CACHE	 BOOL "" FORCE)
set(CMAKE_CXX_FLAGS			 "/EHsc"			 CACHE	 STRING "" FORCE)
set(CMAKE_INSTALL_PREFIX			 "d:/QtProjects/QMS/quazip/quazip-1.5/install"			 CACHE	 PATH "" FORCE)
set(QT_DIR			 "c:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6"			 CACHE	 PATH "" FORCE)
set(QUAZIP			 "quazip/quazip-1.5"			 CACHE	 STRING "" FORCE)
set(QUAZIP_BZIP2			 "OFF"			 CACHE	 BOOL "" FORCE)
set(QUAZIP_BZIP2_STDIO			 "OFF"			 CACHE	 BOOL "" FORCE)
set(QUAZIP_ENABLE_TESTS			 "OFF"			 CACHE	 BOOL "" FORCE)
set(QUAZIP_FETCH_LIBS			 "ON"			 CACHE	 BOOL "" FORCE)
set(QUAZIP_FORCE_FETCH_LIBS			 "OFF"			 CACHE	 BOOL "" FORCE)
set(QUAZIP_INSTALL			 "ON"			 CACHE	 BOOL "" FORCE)
set(QUAZIP_QT_MAJOR_VERSION			 "6"			 CACHE	 STRING "" FORCE)
set(QUAZIP_USE_QT_ZLIB			 "OFF"			 CACHE	 BOOL "" FORCE)
set(Qt6Test_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Test"			 CACHE	 PATH "" FORCE)
set(Qt6_DIR			 "c:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6"			 CACHE	 PATH "" FORCE)
set(ZLIB_CONST			 "OFF"			 CACHE	 BOOL "" FORCE)
set(ZLIB_LIBRARY_DEBUG			 "ZLIB_LIBRARY_DEBUG-NOTFOUND"			 CACHE	 FILEPATH "" FORCE)
set(ZLIB_LIBRARY_RELEASE			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/lib/zlib.lib"			 CACHE	 FILEPATH "" FORCE)

QMS configuration file QMS_only.cfg

set(ALGLIB_INCLUDE_DIR			 "ALGLIB_INCLUDE_DIR-NOTFOUND"			 CACHE	 PATH "" FORCE)
set(ALGLIB_LIBRARY			 "ALGLIB_LIBRARY-NOTFOUND"			 CACHE	 FILEPATH "" FORCE)
set(BUILD_FOR_LOCAL_SYSTEM			 "OFF"			 CACHE	 BOOL "" FORCE)
set(BUILD_QMAPSHACK			 "ON"			 CACHE	 BOOL "" FORCE)
set(BUILD_QMAPTOOL			 "ON"			 CACHE	 BOOL "" FORCE)
set(CMAKE_CXX_FLAGS			 "/wd4996 /wd4101 /wd4005 /wd4003 /EHsc"			 CACHE	 STRING "" FORCE)
set(CMAKE_INSTALL_PREFIX			 "d:/QtProjects/QMS/QMS4Qt6/install"			 CACHE	 PATH "" FORCE)
set(GDAL_DEV_PATH			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64"			 CACHE	 PATH "" FORCE)
set(GDAL_INCLUDE_DIR			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/include"			 CACHE	 PATH "" FORCE)
set(GDAL_LIBRARY			 "D:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/lib/gdal_i.lib"			 CACHE	 FILEPATH "" FORCE)
set(JPEG_DEV_PATH			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64"			 CACHE	 PATH "" FORCE)
set(JPEG_INCLUDE_DIR			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/include"			 CACHE	 PATH "" FORCE)
set(LIBJPEG_LIBRARY			 "D:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/lib/libjpeg.lib"			 CACHE	 FILEPATH "" FORCE)
set(LIBPROJ_LIBRARY			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/lib/proj9.lib"			 CACHE	 FILEPATH "" FORCE)
set(LIBROUTINO_LIBRARY			 "D:/QtProjects/QMS/routino/routino-3.4.3/install/lib/routino.lib"			 CACHE	 FILEPATH "" FORCE)
set(MSVC_REDIST_DIR			 "C:/Program Files/Microsoft Visual Studio/18/Community/VC/Redist/MSVC/14.50.35710"			 CACHE	 PATH "" FORCE)
set(PROJ_DEV_PATH			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64"			 CACHE	 PATH "" FORCE)
set(PROJ_INCLUDE_DIR			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/include/proj9"			 CACHE	 PATH "" FORCE)
set(QUAZIP_DEV_PATH			 "d:/QtProjects/QMS/quazip/quazip-1.5/install"			 CACHE	 PATH "" FORCE)
set(QUAZIP_INCLUDE_DIR			 "d:/QtProjects/QMS/quazip/quazip-1.5/install/include"			 CACHE	 PATH "" FORCE)
set(Qt6Concurrent_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Concurrent"			 CACHE	 PATH "" FORCE)
set(Qt6ExamplesAssetDownloaderPrivate_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6ExamplesAssetDownloaderPrivate"			 CACHE	 PATH "" FORCE)
set(Qt6GuiTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6GuiTools"			 CACHE	 PATH "" FORCE)
set(Qt6Gui_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Gui"			 CACHE	 PATH "" FORCE)
set(Qt6Help_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Help"			 CACHE	 PATH "" FORCE)
set(Qt6LinguistTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6LinguistTools"			 CACHE	 PATH "" FORCE)
set(Qt6OpenGLWidgets_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6OpenGLWidgets"			 CACHE	 PATH "" FORCE)
set(Qt6OpenGL_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6OpenGL"			 CACHE	 PATH "" FORCE)
set(Qt6Positioning_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Positioning"			 CACHE	 PATH "" FORCE)
set(Qt6PrintSupport_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6PrintSupport"			 CACHE	 PATH "" FORCE)
set(Qt6QmlAssetDownloader_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QmlAssetDownloader"			 CACHE	 PATH "" FORCE)
set(Qt6QmlCompilerPlusPrivateTools_DIR			 "Qt6QmlCompilerPlusPrivateTools_DIR-NOTFOUND"			 CACHE	 PATH "" FORCE)
set(Qt6QmlIntegration_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QmlIntegration"			 CACHE	 PATH "" FORCE)
set(Qt6QmlMeta_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QmlMeta"			 CACHE	 PATH "" FORCE)
set(Qt6QmlModels_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QmlModels"			 CACHE	 PATH "" FORCE)
set(Qt6QmlTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QmlTools"			 CACHE	 PATH "" FORCE)
set(Qt6QmlWorkerScript_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QmlWorkerScript"			 CACHE	 PATH "" FORCE)
set(Qt6Qml_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Qml"			 CACHE	 PATH "" FORCE)
set(Qt6QuickTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QuickTools"			 CACHE	 PATH "" FORCE)
set(Qt6QuickWidgets_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6QuickWidgets"			 CACHE	 PATH "" FORCE)
set(Qt6Quick_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Quick"			 CACHE	 PATH "" FORCE)
set(Qt6Sql_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Sql"			 CACHE	 PATH "" FORCE)
set(Qt6ToolsTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6ToolsTools"			 CACHE	 PATH "" FORCE)
set(Qt6Tools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Tools"			 CACHE	 PATH "" FORCE)
set(Qt6UiPlugin_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6UiPlugin"			 CACHE	 PATH "" FORCE)
set(Qt6UiTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6UiTools"			 CACHE	 PATH "" FORCE)
set(Qt6WebChannel_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6WebChannel"			 CACHE	 PATH "" FORCE)
set(Qt6WebEngineCoreTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6WebEngineCoreTools"			 CACHE	 PATH "" FORCE)
set(Qt6WebEngineCore_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6WebEngineCore"			 CACHE	 PATH "" FORCE)
set(Qt6WebEngineWidgets_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6WebEngineWidgets"			 CACHE	 PATH "" FORCE)
set(Qt6WidgetsTools_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6WidgetsTools"			 CACHE	 PATH "" FORCE)
set(Qt6Widgets_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Widgets"			 CACHE	 PATH "" FORCE)
set(Qt6Xml_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6Xml"			 CACHE	 PATH "" FORCE)
set(Qt6_DIR			 "C:/Qt/6.10.0/msvc2022_64/lib/cmake/Qt6"			 CACHE	 PATH "" FORCE)
set(QuaZip-Qt6_DIR			 "d:/QtProjects/QMS/quazip/quazip-1.5/install/lib/cmake/Quazip-Qt6-1.5"			 CACHE	 PATH "" FORCE)
set(ROUT			 "routino/routino-3.4.3"			 CACHE	 STRING "" FORCE)
set(ROUTINO_DEV_PATH			 "d:/QtProjects/QMS/routino/routino-3.4.3/install"			 CACHE	 PATH "" FORCE)
set(ROUTINO_INCLUDE_DIR			 "d:/QtProjects/QMS/routino/routino-3.4.3/install"			 CACHE	 PATH "" FORCE)
set(ROUTINO_XML_PATH			 "d:/QtProjects/QMS/routino/routino-3.4.3/install/xml"			 CACHE	 PATH "" FORCE)
set(UPDATE_TRANSLATIONS			 "OFF"			 CACHE	 BOOL "" FORCE)
set(UPDATE_TRANSLATIONS_PURGE_OBSOLETE			 "OFF"			 CACHE	 BOOL "" FORCE)
set(USE_QT6DBus			 "OFF"			 CACHE	 BOOL "" FORCE)
set(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE			 "Vulkan_GLSLANG_VALIDATOR_EXECUTABLE-NOTFOUND"			 CACHE	 FILEPATH "" FORCE)
set(Vulkan_GLSLC_EXECUTABLE			 "Vulkan_GLSLC_EXECUTABLE-NOTFOUND"			 CACHE	 FILEPATH "" FORCE)
set(Vulkan_INCLUDE_DIR			 "Vulkan_INCLUDE_DIR-NOTFOUND"			 CACHE	 PATH "" FORCE)
set(Vulkan_LIBRARY			 "Vulkan_LIBRARY-NOTFOUND"			 CACHE	 FILEPATH "" FORCE)
set(ZLIB_LIBRARY			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64/lib/zlib.lib"			 CACHE	 FILEPATH "" FORCE)
set(ZLIB_ROOT			 "d:/QtProjects/QMS/GISInternals/1930_260118/release-1930-x64"			 CACHE	 PATH "" FORCE)

Example of copy files batch script

This is an example of the file copyfiles.bat used for copying/collecting all files necessary to run QMS.

@echo off

echo Script to copy all files necessary for QMS (GISInternals version)
echo Scripts switches to x64 Native Tools Command Prompt and then to `%~dp0` directory!

rem echo Preparing x64 Native tool ...

rem for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (set VSPATH=%%i)

rem call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat"
rem pause

set QMSD0=%~dp0
    
cd /D %QMSD0%

echo Switched Native tool to %cd%

rem Delete all files --------------------------------------------
rmdir /s /q ..\Files

IF ERRORLEVEL 1 (
    echo [ERROR] RMDIR failed with error code %ERRORLEVEL%.
    exit /b %ERRORLEVEL%
) ELSE (
    echo RMDIR successful.
)

pause

mkdir ..\Files


rem Include and run user settings
for /f "tokens=2 delims=:" %%a in (QMSUserCfg.dir) do (
echo Include dir: %%a
set USERDIR=%%a

echo Starting file copy  step 1 ...

pause

call %%a\CopyFilesGis_add.bat
)

echo Starting file copy step 2 ...
pause



rem Copy QMapShack Files (removed bin subdir! 28.04.25 ------
copy %QMSI_BUILD_PATH%\Release\qmapshack.exe
copy %QMSI_BUILD_PATH%\Release\qmaptool.exe
copy %QMSI_BUILD_PATH%\Release\qmt_map2jnx.exe
copy %QMSI_BUILD_PATH%\Release\qmt_rgb2pct.exe

copy %QMSI_QT_PATH%\bin\assistant.exe

rem Copy Qt files -------------------------------------------------

set PATH=%QMSI_QT_PATH%\bin;%PATH%

windeployqt.exe  --force-openssl --no-translations .\qmapshack.exe .\qmaptool.exe .\qmt_map2jnx.exe .\qmt_rgb2pct.exe .\assistant.exe

pause

mkdir translations

for %%i in (ca, cs, de, en, es, fr, it, nl, ru) do (

    if exist %QMSI_QT_PATH%\translations\qt_%%i.qm (copy %QMSI_QT_PATH%\translations\qt_%%i.qm translations)
    if exist %QMSI_QT_PATH%\translations\qtbase_%%i.qm (copy %QMSI_QT_PATH%\translations\qtbase_%%i.qm translations)
    if exist %QMSI_QT_PATH%\translations\assistant_%%i.qm (copy %QMSI_QT_PATH%\translations\assistant_%%i.qm translations)
    if exist %QMSI_QT_PATH%\translations\qt_help_%%i.qm (copy %QMSI_QT_PATH%\translations\qt_help_%%i.qm translations)
)

rem Qt6WebEngine translations
cd translations
mkdir qtwebengine_locales

for %%i in (ca, cs, de, en-US, en-GB, es, fr, it, nl, ru) do if exist %QMSI_QT_PATH%\translations\qtwebengine_locales\%%i.pak (copy %QMSI_QT_PATH%\translations\qtwebengine_locales\%%i.pak qtwebengine_locales)

cd ..


if %QT%==5 (
copy %QMSI_QT_PATH%\bin\libEGL.dll
copy %QMSI_QT_PATH%\bin\libGLESv2.dll
copy %QMSI_QT_PATH%\bin\Qt%QT%WebEngine.dll

mkdir printsupport
cd printsupport
copy %QMSI_QT_PATH%\plugins\printsupport\windowsprintersupport.dll
cd ..
) 

rem Copy Routino files ----------------------------------------------
copy %QMSI_ROUT_PATH%\lib\routino.dll
copy %QMSI_ROUT_PATH%\bin\planetsplitter.exe
copy %QMSI_MGW6_PATH%\libwinpthread-1.dll
copy %QMSI_MGW6_PATH%\zlib1.dll
xcopy %QMSI_ROUT_PATH%\xml routino-xml /s /i

rem Copy Quazip --------------------------------------------------------
copy %QMSI_QUAZIP_PATH%\bin\quazip1-Qt%QT%.dll

rem Copy mysql 

echo.
echo.
echo Copy mysql
rem copy %QMSI_MYSQL_PATH%\qsqlmysql.dll
robocopy %QMSI_MYSQL_PATH% "%cd%" /E /NJH /NJS /NFL /NDL     
pause

copy ..\*.ico

rem Copy qt.conf -----------------------------------------------------------
copy ..\qt.conf

This file includes the file CopyFileGis_add.bat:

set QMSI_QMS_PATH=d:\QtProjects\QMS
set QMSI_GIS_PATH=d:\QtProjects\QMS\GISInternals\1930_260118\release-1930-x64
set QMSI_QT_PATH="c:\Qt\6.10.0\msvc2022_64"
set QMSI_VCREDIST_PATH="C:\Program Files\Microsoft Visual Studio\18\Community\VC\Redist\MSVC\14.50.35710\"
set QMSI_ROUT_PATH="d:\QtProjects\QMS\routino\routino-3.4.3\install"
set QMSI_MYSQL_PATH="d:\QtProjects\QMS\mysql\6.10.0"
set QMSI_MGW6_PATH="c:\msys64\ucrt64\bin"
set QMSI_QUAZIP_PATH="d:\QtProjects\QMS\quazip\quazip-1.5\install"
set QMSI_BUILD_PATH="d:\QtProjects\QMS\QMS4Qt6\build"
set QMSI_SRC_PATH="d:\QtProjects\QMS\QMS4Qt6\src"
set QT=6
 
cd ..\Files
mkdir data
pause
xcopy %QMSI_GIS_PATH%\bin\gdal-data data /s /i
if '260118' LSS '241207' (
    copy  %QMSI_GIS_PATH%\bin\proj_9_6.dll
) else (
    copy  %QMSI_GIS_PATH%\bin\proj_9.dll
)
xcopy %QMSI_GIS_PATH%\bin\*.dll /I /EXCLUDE:..\gisexclude.txt
mkdir gdalplugins
xcopy %QMSI_GIS_PATH%\bin\gdal\plugins gdalplugins /s /i /EXCLUDE:..\gisexclude.txt
copy %QMSI_GIS_PATH%\bin\curl-ca-bundle.crt
copy %QMSI_GIS_PATH%\bin\gdal\apps\*.exe
copy %QMSI_GIS_PATH%\bin\proj9\apps\*.exe
copy %QMSI_GIS_PATH%\bin\curl.exe
copy %QMSI_GIS_PATH%\bin\openssl.exe
copy %QMSI_GIS_PATH%\bin\sqlite3.exe
copy %QMSI_GIS_PATH%\..\license.txt GISInternals_license.txt
xcopy %QMSI_QMS_PATH%\mysql\6.10.0\sqldrivers\qsqlmysql.dll .\sqldrivers\ /i
mkdir share\proj
xcopy %QMSI_GIS_PATH%\bin\proj9\share share\proj /s /i

Prev (GDAL support for additional map formats) | Home | Manual | Index | Top | (Ubuntu-14.04) Next

⚠️ **GitHub.com Fallback** ⚠️