diff -Nur grass-8.3.2/include/Make/Compile.make ../grass-8.3.2/include/Make/Compile.make
--- grass-8.3.2/include/Make/Compile.make	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/include/Make/Compile.make	2024-03-08 13:40:10.196998500 +0100
@@ -47,14 +47,14 @@
 %.manifest.res: %.manifest.rc %.exe.manifest
 	$(WINDRES) --input=$< --input-format=rc --output=$@ --output-format=coff -I$(MODULE_TOPDIR)/mswindows
 
-%.manifest.rc: $(MODULE_TOPDIR)/mswindows/generic.manifest.rc
+%.manifest.rc: $(MODULE_TOPDIR)/mswindows/generic.manifest.rc.in
 	sed	-e 's/@CMD@/$(notdir $*)/' \
 		-e 's/@VER_MAJOR@/$(GRASS_VERSION_MAJOR)/' \
 		-e 's/@VER_MINOR@/$(GRASS_VERSION_MINOR)/' \
 		-e 's/@VER_RELEASE@/$(GRASS_VERSION_RELEASE)/' \
-		$(MODULE_TOPDIR)/mswindows/generic.manifest.rc > $@
+		$^ > $@
 
 %.exe.manifest: $(MODULE_TOPDIR)/mswindows/generic.manifest
-	sed 's/@CMD@/$(notdir $*)/' $(MODULE_TOPDIR)/mswindows/generic.manifest > $@
+	sed 's/@CMD@/$(notdir $*)/' $^ > $@
 
 -include $(DEPFILE)
diff -Nur grass-8.3.2/include/Make/Grass.make ../grass-8.3.2/include/Make/Grass.make
--- grass-8.3.2/include/Make/Grass.make	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/include/Make/Grass.make	2024-03-08 13:40:10.206025700 +0100
@@ -196,7 +196,7 @@
 FORMDEPS         = $(DBMILIB) $(GISLIB)
 RASTER3DDEPS     = $(RASTERLIB) $(GISLIB)
 GISDEPS          = $(DATETIMELIB) $(ZLIBLIBPATH) $(ZLIB) $(BZIP2LIBPATH) $(BZIP2LIB) $(ZSTDLIBPATH) $(ZSTDLIB) $(INTLLIB) $(REGEXLIBPATH) $(REGEXLIB) $(ICONVLIB) $(PTHREADLIBPATH) $(PTHREADLIB) $(MATHLIB)
-GMATHDEPS        = $(GISLIB) $(FFTWLIB) $(LAPACKLIB) $(BLASLIB) $(CCMATHLIB) $(OPENMP_CFLAGS) $(OPENMP_LIBPATH) $(OPENMP_LIB)
+GMATHDEPS        = $(GISLIB) $(FFTWLIB) $(LAPACKLIB) $(BLASLIB) $(CCMATHLIB) $(OPENMP_LIBPATH) $(OPENMP_LIB)
 GPDEDEPS         = $(RASTER3DLIB) $(RASTERLIB) $(GISLIB) $(GMATHLIB) $(OPENMP_LIBPATH) $(OPENMP_LIB) $(MATHLIB)
 GPROJDEPS        = $(GISLIB) $(GDALLIBS) $(PROJLIB) $(MATHLIB)
 HTMLDRIVERDEPS   = $(DRIVERLIB) $(GISLIB) $(MATHLIB)
diff -Nur grass-8.3.2/include/Make/Platform.make.in ../grass-8.3.2/include/Make/Platform.make.in
--- grass-8.3.2/include/Make/Platform.make.in	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/include/Make/Platform.make.in	2024-03-08 13:40:10.214828200 +0100
@@ -229,7 +229,7 @@
 #OpenMP
 OPENMP_INCPATH      = @OPENMP_INCPATH@
 OPENMP_LIBPATH      = @OPENMP_LIBPATH@
-OPENMP_LIB          = @OPENMP_LIB@
+OPENMP_LIB          = @OPENMP_CFLAGS@ @OPENMP_LIB@
 OPENMP_CFLAGS       = @OPENMP_CFLAGS@
 USE_OPENMP          = @USE_OPENMP@
 
diff -Nur grass-8.3.2/lib/gis/gisinit.c ../grass-8.3.2/lib/gis/gisinit.c
--- grass-8.3.2/lib/gis/gisinit.c	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/lib/gis/gisinit.c	2024-03-08 13:40:10.223353400 +0100
@@ -49,6 +49,7 @@
 
     G_set_program_name(pgm);
 
+#ifndef _WIN32
     /* verify version of GRASS headers (and anything else in include) */
     if (strcmp(version, GIS_H_VERSION) != 0)
         G_fatal_error(_("Module built against version %s but "
@@ -56,6 +57,7 @@
                         "You need to rebuild GRASS GIS or untangle multiple "
                         "installations."),
                       version, GIS_H_VERSION);
+#endif
 
     /* Make sure location and mapset are set */
     G_location_path();
@@ -85,6 +87,7 @@
     if (initialized)
         return;
 
+#ifndef _WIN32
     /* verify version of GRASS headers (and anything else in include) */
     if (strcmp(version, GIS_H_VERSION) != 0)
         G_fatal_error(_("Module built against version %s but "
@@ -92,6 +95,8 @@
                         "You need to rebuild GRASS GIS or untangle multiple "
                         "installations."),
                       version, GIS_H_VERSION);
+#endif
+
     gisinit();
 }
 
diff -Nur grass-8.3.2/mswindows/generic.manifest.rc ../grass-8.3.2/mswindows/generic.manifest.rc
--- grass-8.3.2/mswindows/generic.manifest.rc	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/mswindows/generic.manifest.rc	1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-#include "winver.h"
-#include "winuser.h"
-
-1 RT_MANIFEST "@CMD@.exe.manifest"
-
-1 ICON "grass.ico"
-
-#define VER_FILEVERSION             @VER_MAJOR@,@VER_MINOR@,0,0
-#define VER_FILEVERSION_STR         "@VER_MAJOR@.@VER_MINOR@.@VER_RELEASE@\0"
-
-#define VER_PRODUCTVERSION          @VER_MAJOR@,@VER_MINOR@,0,0
-#define VER_PRODUCTVERSION_STR      "@VER_MAJOR@.@VER_MINOR@.@VER_RELEASE@\0"
-
-#define VER_PRIVATEBUILD	VS_FF_PRIVATEBUILD
-#define VER_PRERELEASE		VS_FF_PRERELEASE
-#define VER_DEBUG		VS_FF_DEBUG
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION    	VER_FILEVERSION
-PRODUCTVERSION 	VER_PRODUCTVERSION
-FILEFLAGSMASK  	VS_FFI_FILEFLAGSMASK
-FILEFLAGS      	(VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
-FILEOS         	VOS__WINDOWS32
-FILETYPE       	VFT_APP
-FILESUBTYPE    	VFT2_UNKNOWN
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904E4"
-        BEGIN
-            VALUE "CompanyName",      "GRASS Development Team"
-            VALUE "FileDescription",  "GRASS @VER_MAJOR@"
-            VALUE "FileVersion",      VER_FILEVERSION_STR
-            VALUE "LegalCopyright",   "Copyright GRASS Development Team"
-            VALUE "OriginalFilename", "@CMD@.exe"
-            VALUE "ProductName",      "GRASS @VER_MAJOR@"
-            VALUE "ProductVersion",   VER_PRODUCTVERSION_STR
-        END
-    END
-
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
diff -Nur grass-8.3.2/mswindows/generic.manifest.rc.in ../grass-8.3.2/mswindows/generic.manifest.rc.in
--- grass-8.3.2/mswindows/generic.manifest.rc.in	1970-01-01 01:00:00.000000000 +0100
+++ ../grass-8.3.2/mswindows/generic.manifest.rc.in	2024-03-08 13:40:04.813279500 +0100
@@ -0,0 +1,45 @@
+#include "winver.h"
+#include "winuser.h"
+
+1 RT_MANIFEST "@CMD@.exe.manifest"
+
+1 ICON "grass.ico"
+
+#define VER_FILEVERSION             @VER_MAJOR@,@VER_MINOR@,0,0
+#define VER_FILEVERSION_STR         "@VER_MAJOR@.@VER_MINOR@.@VER_RELEASE@\0"
+
+#define VER_PRODUCTVERSION          @VER_MAJOR@,@VER_MINOR@,0,0
+#define VER_PRODUCTVERSION_STR      "@VER_MAJOR@.@VER_MINOR@.@VER_RELEASE@\0"
+
+#define VER_PRIVATEBUILD	VS_FF_PRIVATEBUILD
+#define VER_PRERELEASE		VS_FF_PRERELEASE
+#define VER_DEBUG		VS_FF_DEBUG
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION    	VER_FILEVERSION
+PRODUCTVERSION 	VER_PRODUCTVERSION
+FILEFLAGSMASK  	VS_FFI_FILEFLAGSMASK
+FILEFLAGS      	(VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
+FILEOS         	VOS__WINDOWS32
+FILETYPE       	VFT_APP
+FILESUBTYPE    	VFT2_UNKNOWN
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"
+        BEGIN
+            VALUE "CompanyName",      "GRASS Development Team"
+            VALUE "FileDescription",  "GRASS @VER_MAJOR@"
+            VALUE "FileVersion",      VER_FILEVERSION_STR
+            VALUE "LegalCopyright",   "Copyright GRASS Development Team"
+            VALUE "OriginalFilename", "@CMD@.exe"
+            VALUE "ProductName",      "GRASS @VER_MAJOR@"
+            VALUE "ProductVersion",   VER_PRODUCTVERSION_STR
+        END
+    END
+
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
diff -Nur grass-8.3.2/mswindows/osgeo4w/env.bat.tmpl ../grass-8.3.2/mswindows/osgeo4w/env.bat.tmpl
--- grass-8.3.2/mswindows/osgeo4w/env.bat.tmpl	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/mswindows/osgeo4w/env.bat.tmpl	2024-03-08 13:40:10.231835800 +0100
@@ -8,6 +8,7 @@
 REM Note that msys package must be also installed
 REM set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
 
+set PYTHONPATH=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@\etc\python;%PYTHONPATH%
 set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python3.exe
 set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
 
diff -Nur grass-8.3.2/mswindows/osgeo4w/package.sh ../grass-8.3.2/mswindows/osgeo4w/package.sh
--- grass-8.3.2/mswindows/osgeo4w/package.sh	2024-03-06 22:24:05.000000000 +0100
+++ ../grass-8.3.2/mswindows/osgeo4w/package.sh	2024-03-08 13:40:10.245891600 +0100
@@ -110,30 +110,21 @@
 	/mingw64/bin/zlib1.dll
 	/mingw64/bin/libbz2-1.dll
 	/mingw64/bin/libiconv-2.dll
-	/mingw64/bin/libexpat-1.dll
-	/mingw64/bin/libfontconfig-1.dll
 	/mingw64/bin/libgfortran-5.dll
-	/mingw64/bin/libbrotlidec.dll
-	/mingw64/bin/libbrotlicommon.dll
 	/mingw64/bin/libintl-8.dll
 	/mingw64/bin/libsystre-0.dll
 	/mingw64/bin/libtre-5.dll
 	/mingw64/bin/libwinpthread-1.dll
-	/mingw64/bin/libcairo-2.dll
-	/mingw64/bin/libpixman-1-0.dll
 	/mingw64/bin/libpng16-16.dll
-	/mingw64/bin/libfreetype-6.dll
-	/mingw64/bin/libharfbuzz-0.dll
-	/mingw64/bin/libglib-2.0-0.dll
 	/mingw64/bin/libgomp-1.dll
-	/mingw64/bin/libgraphite2.dll
-	/mingw64/bin/libpcre-1.dll
+	/mingw64/bin/libomp.dll
 	/mingw64/bin/libstdc++-6.dll
 	/mingw64/bin/libgcc_s_seh-1.dll
 	/mingw64/bin/libfftw3-3.dll
 	/mingw64/bin/libblas.dll
 	/mingw64/bin/liblapack.dll
 	/mingw64/bin/libquadmath-0.dll
+	/mingw64/bin/libreadline8.dll
 "
 
 if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
@@ -149,18 +140,18 @@
 	cp -uv $DLLS dist.x86_64-w64-mingw32/bin
 
 	mkdir -p mswindows/osgeo4w/lib
-	cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/pq.lib
 	cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/sqlite3.lib
 
+
 	log configure
 	./configure \
 		--host=x86_64-w64-mingw32 \
-		--with-libs="$OSGEO4W_ROOT_MSYS/lib" \
-		--with-includes=$OSGEO4W_ROOT_MSYS/include \
-		--libexecdir=$OSGEO4W_ROOT_MSYS/bin \
-		--prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
-		--bindir=$OSGEO4W_ROOT_MSYS/bin \
-		--includedir=$OSGEO4W_ROOT_MSYS/include \
+		--with-libs="${OSGEO4W_ROOT_MSYS}/lib ${OSGEO4W_ROOT_MSYS}/bin" \
+		--with-includes=${OSGEO4W_ROOT_MSYS}/include \
+		--libexecdir=${OSGEO4W_ROOT_MSYS}/bin \
+		--prefix=${OSGEO4W_ROOT_MSYS}/apps/grass \
+		--bindir=${OSGEO4W_ROOT_MSYS}/bin \
+		--includedir=${OSGEO4W_ROOT_MSYS}/include \
 		--with-opengl=windows \
 		--without-x \
 		--with-cxx \
@@ -168,13 +159,13 @@
 		--enable-largefile \
 		--with-fftw \
 		--with-freetype \
-		--with-freetype-includes=/mingw64/include/freetype2 \
-		--with-proj-share=$OSGEO4W_ROOT_MSYS/share/proj \
-		--with-proj-includes=$OSGEO4W_ROOT_MSYS/include \
-		--with-proj-libs=$OSGEO4W_ROOT_MSYS/lib \
+		--with-freetype-includes=${OSGEO4W_ROOT_MSYS}/include/freetype2 \
+		--with-proj-share=${OSGEO4W_ROOT_MSYS}/share/proj \
+		--with-proj-includes=${OSGEO4W_ROOT_MSYS}/include \
+		--with-proj-libs=${OSGEO4W_ROOT_MSYS}/lib \
 		--with-postgres \
-		--with-postgres-includes=$OSGEO4W_ROOT_MSYS/include \
-		--with-postgres-libs=$PWD/mswindows/osgeo4w/lib \
+		--with-postgres-includes=${OSGEO4W_ROOT_MSYS}/include \
+		--with-postgres-libs=${OSGEO4W_ROOT_MSYS}/lib \
 		--with-gdal=$PWD/mswindows/osgeo4w/gdal-config \
 		--with-geos=$PWD/mswindows/osgeo4w/geos-config \
 		--with-sqlite \
@@ -190,10 +181,11 @@
 		--with-lapack-includes=/mingw64/include \
 		--with-openmp \
 		--with-cairo \
-		--with-cairo-includes=$OSGEO4W_ROOT_MSYS/include \
-		--with-cairo-ldflags="-L$PWD/mswindows/osgeo4w/lib -lcairo -lfontconfig" \
+		--with-cairo-includes=${OSGEO4W_ROOT_MSYS}/include \
+		--with-cairo-ldflags="-L$PWD/mswindows/osgeo4w/lib -lcairo" \
 		--with-bzlib \
 		--with-liblas=$PWD/mswindows/osgeo4w/liblas-config \
+		--with-netcdf=${OSGEO4W_ROOT_MSYS}/bin/nc-config \
 		--without-pdal
 
 	touch mswindows/osgeo4w/configure-stamp
@@ -249,7 +241,9 @@
 
     # copy dependencies (TODO: to be reduced)
     cp -uv $DLLS apps/grass/grass$POSTFIX/bin
-    cp -uv /mingw64/etc/fonts/fonts.conf apps/grass/grass$POSTFIX/etc
+
+    # copy R batch files
+    cp -uv $SRC/mswindows/external/rbatch/* apps/grass/grass$POSTFIX/bin
 
     # creating grass package
     /bin/tar -cjf $PDIR/grass$PACKAGE_POSTFIX-$VERSION-$PACKAGE_PATCH.tar.bz2 \
