diff --git a/INSTALL.md b/INSTALL.md index ca474a1b4abe..5239d380c319 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -29,7 +29,7 @@ Building QGIS from source - step by step * [4.1.1. Visual Studio 2019 Community Edition](#411-visual-studio-2019-community-edition) * [4.1.2. Other tools and dependencies](#412-other-tools-and-dependencies) * [4.1.3. Clone the QGIS Source Code](#413-clone-the-qgis-source-code) - * [4.1.4. Configure and build from command line](#414-configure-and-build-from-command-line) + * [4.1.4. OSGeo4W](#414-OSGeo4W) * [4.2. Building on Linux with mingw64](#42-building-on-linux-with-mingw64) * [4.2.1. Building with Docker](#421-building-with-docker) * [4.2.1.1. Initial setup](#4211-initial-setup) @@ -579,14 +579,14 @@ cmake .. -DBUILD_WITH_QT6=ON -DWITH_QTWEBKIT=OFF -DWITH_QTWEBENGINE=ON ## 4.1. Building with Microsoft Visual Studio This section describes how to build QGIS using Visual Studio (MSVC) 2019 on Windows. -This is currently also how the binary QGIS packages are made. +The official Windows packages are built using OSGeo4W. This section describes the setup required to allow Visual Studio to be used to build QGIS. -### 4.1.1. Visual Studio 2019 Community Edition +### 4.1.1. Visual Studio 2022 Community Edition -Download the [free (as in free beer) Community installer](https://download.visualstudio.microsoft.com/download/pr/68d6b204-9df0-4fcc-abcc-08ee0eff9cb2/b029547488a9383b0c8d8a9c813e246feb3ec19e0fe55020d4878fde5f0983fe/vs_Community.exe) +Download and install the [free (as in free beer) Community installer](https://download.visualstudio.microsoft.com/download/pr/68d6b204-9df0-4fcc-abcc-08ee0eff9cb2/b029547488a9383b0c8d8a9c813e246feb3ec19e0fe55020d4878fde5f0983fe/vs_Community.exe) Select "Desktop Development with C++" @@ -596,8 +596,8 @@ Download and install following packages: * [CMake](https://cmake.org/files/v3.12/cmake-3.12.3-win64-x64.msi) * GNU flex, GNU bison and GIT with [cygwin 64bit](https://cygwin.com/setup-x86_64.exe) -* [OSGeo4W 64bit](https://download.osgeo.org/osgeo4w/v2/osgeo4w-setup.exe) -* [ninja](https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip): Copy the `ninja.exe` to `C:\OSGeo4W64\bin\` +* [OSGeo4W](https://download.osgeo.org/osgeo4w/v2/osgeo4w-setup.exe) +* [ninja](https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip): Copy the `ninja.exe` to `C:\OSGeo4W\bin\` For the QGIS build you need to install following packages from cygwin: @@ -613,7 +613,7 @@ and from OSGeo4W (select *Advanced Install*): * Note: If you install other packages, this might cause issues. Particularly, make sure **not** to install the msinttypes package. It installs a stdint.h file in - `OSGeo4W[64]\include`, that conflicts with Visual Studio own stdint.h, which for + `OSGeo4W\include`, that conflicts with Visual Studio own stdint.h, which for example breaks the build of the virtual layer provider. If you intend to also build all the dependencies, you can refer to [the OSGeo4W repository](https://github.com/jef-n/OSGeo4W). @@ -621,10 +621,10 @@ If you intend to also build all the dependencies, you can refer to [the OSGeo4W ### 4.1.3. Clone the QGIS Source Code Choose a directory to store the QGIS source code. -For example, to put it in the OSGeo4W64 install, navigate there: +For example, to put it in the OSGeo4W install, navigate there: ```cmd -cd C:\OSGeo4W64 +cd C:\OSGeo4W ``` This directory will be assumed for all instructions @@ -649,10 +649,41 @@ cd QGIS git config core.filemode false ``` -### 4.1.4. Configure and build from command line +### 4.1.4. OSGeo4W -The best reference for building QGIS can be found in the [build scripts for OSGeo4W]( - https://github.com/jef-n/OSGeo4W/blob/master/src/qgis-dev/osgeo4w/package.sh) +The official Windows packages are made in OSGeo4W. Also standalone MSI +installers are also produced using the packages from OSGeo4W. + +The nightly build of master (package qgis-dev) is made with the [OSGeo4W build +recipe](https://github.com/jef-n/OSGeo4W/blob/master/src/qgis-dev/osgeo4w/package.sh). + +There are others for the long-term release build (qgis-ltr), the nightly of the +next long-term point release (qgis-ltr-dev), the latest release (qgis), the +nightly build of the next point release (qgis-rel-dev). All of those are +currently based on Qt5. A build recipe for master with Qt6 is available as +qgis-qt6-dev. + +To setup a build environment (including Visual C++ if not already installed) and to +build the nightly run in a command line (cmd): + +```cmd +mkdir osgeo4w-build +cd osgeo4w-build +curl -JLO https://raw.githubusercontent.com/jef-n/OSGeo4W/refs/heads/master/bootstrap.cmd +curl -JLO https://raw.githubusercontent.com/jef-n/OSGeo4W/refs/heads/master/bootstrap.sh +bootstrap.cmd qgis-dev +``` + +To build other packages you can simply replace qgis-dev with other packages. +Calling `bootstrap.cmd` without any arguments will build all packages +(including all dependencies). + +After the build is succeeded the OSGeo4W packages will be in `x86_64/`. + +To install the package you can add the `osgeo4w-build` directory as `User URL` +in the OSGeo4W installer and select your `qgis-dev` package. + +The MSIs are created with `scripts\msis.sh` (actually `scripts/creatmsi.pl`). ## 4.2. Building on Linux with mingw64