Skip to content

Commit

Permalink
update INSTALL.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 14, 2024
1 parent 40246d3 commit 3327baf
Showing 1 changed file with 37 additions and 11 deletions.
48 changes: 37 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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) [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++"

Expand All @@ -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:

Expand All @@ -613,18 +613,18 @@ 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).

### 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
Expand All @@ -649,10 +649,36 @@ 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 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).

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
```

After the build is succeeded the OSGeo4W packages will be in
`x86_64/release/qgis/qgis-dev`.

To install the package you can add the `osgeo4w-build` directory as `User URL`
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
Expand Down

0 comments on commit 3327baf

Please sign in to comment.