一,安装:OSGeo4W
二,安装:Cygwin64
https://www.cygwin.com/setup-x86_64.exe
三,安装: 安装bison和flex
四)QGIS_3.28
下载QGIS_3.28的源码包
五 环境变量设置:
@echo off
set VS190COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools
call “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat” x64
set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Windows Kits\10\Include
set LIB=%LIB%;C:\Program Files (x86)\Windows Kits\10\Lib
set OSGEO4W_ROOT=D:\OSGeo4W
call “%OSGEO4W_ROOT%\bin\o4w_env.bat”
SET PYTHONHOME=%OSGEO4W_ROOT%\apps\Python39
SET PYTHONPATH=%PYTHONHOME%;%PYTHONHOME%\Scripts
set PYTHON_EXECUTABLE=%PYTHONHOME%/python3.exe
PATH %PYTHONPATH%;%PATH%
path %OSGEO4W_ROOT%\apps\qt5\bin;%PATH%
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\Qt5\plugins
set O4W_QT_PREFIX=%OSGEO4W_ROOT:=/%/apps/Qt5
set O4W_QT_BINARIES=%OSGEO4W_ROOT:=/%/apps/Qt5/bin
set O4W_QT_PLUGINS=%OSGEO4W_ROOT:=/%/apps/Qt5/plugins
set O4W_QT_LIBRARIES=%OSGEO4W_ROOT:=/%/apps/Qt5/lib
set O4W_QT_TRANSLATIONS=%OSGEO4W_ROOT:=/%/apps/Qt5/translations
set O4W_QT_HEADERS=%OSGEO4W_ROOT:=/%/apps/Qt5/include
set O4W_ROOT=%OSGEO4W_ROOT:=/%
set LIB_DIR=%O4W_ROOT%
path %path%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin
path %PATH%;D:\OSGeo4W\apps\Qt5\bin;C:\cygwin64\bin
@set GRASS_PREFIX=D:\OSGeo4W\apps\grass\grass83
@set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include
@set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\lib
set LIB=%LIB%;%OSGEO4W_ROOT%\apps\Qt5\lib;%OSGEO4W_ROOT%\lib
set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\apps\Qt5\include;%OSGEO4W_ROOT%\include
call "C:\Program Files\CMake\bin\cmake-gui.exe
参考:https://blog.csdn.net/KK_2018/article/details/132008152
GEO4W 版本下载:https://ftp.osuosl.org/pub/osgeo/download/qgis/windows/