diff --git a/README.win32 b/README.win32 index 7a243a147c..3f63458394 100644 --- a/README.win32 +++ b/README.win32 @@ -175,6 +175,27 @@ instance the makefile.msc files might not produce identically named DLLs and import libraries as the "autoconfiscated" makefiles and libtool do. If this bothers you, you will have to fix the makefiles. +If desiring to build binaries for ARM64 (aarch64), one needs to use the +Visual Studio 2017 or 2019 solution files, or use Meson with a +cross-compilation file, with a Windows 10 SDK that supports ARM64 +builds. At this point, building the introspection files is not supported +for ARM64 builds, and you will need a Python interpreter and +glib-compile-resources binaries that run on the build machine. For Visual Studio +2017 ARM64 builds, do also check the Directory.Build.props file in $(srcroot)/win32/vs15 +indicates a Windows 10 SDK version that supports ARM64 builds exists on the build machine. + +For building ARM64 binaries with the Visual Studio projects, prior to the build, +you may need to update gtk3-gen-srcs.props to pass in the variables GLIB_MKENUMS, +GLIB_GENMARSHAL, GDBUS_CODEGEN and/or GLIB_COMPILE_RESOURCES in the nmake command line +indicated by so that they point to the glib-mkenums, +glib-genmarshal, gdbus-codegen and glib-compile-resources that will run on the build +machine. You may also need to update gtk3-version-paths.props to update PythonDir to +the installation of the Python interpreter that will run on the build machine. To carry +out the actual build using the solution files, use the "Configuration Manager" to add the +ARM64 build configs by copying the settings from the x64 configs, and then build the solution. +The build instructions for such builds otherwise follow the standard Win32 (x86) and +x64 builds, but you need to ensure that you have ARM64 builds of the various dependencies. + 3) Using Meson (for Visual Studio and MinGW builds) --- diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak index 787a897417..22facfee23 100644 --- a/win32/detectenv-msvc.mak +++ b/win32/detectenv-msvc.mak @@ -21,6 +21,8 @@ _HASH=^# && ![echo PLAT=Win32 >> vercl.x] \ && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \ && ![echo PLAT=x64 >> vercl.x] \ + && ![echo $(_HASH)elif defined(_M_ARM64) >> vercl.x] \ + && ![echo PLAT=arm64 >> vercl.x] \ && ![echo $(_HASH)endif >> vercl.x] \ && ![cl -nologo -TC -P vercl.x $(ERRNUL)] !include vercl.i diff --git a/win32/vs10/gtk3-build-defines.props b/win32/vs10/gtk3-build-defines.props index 83df528492..0a20f662d9 100644 --- a/win32/vs10/gtk3-build-defines.props +++ b/win32/vs10/gtk3-build-defines.props @@ -10,7 +10,8 @@ GDK_COMPILATION;G_LOG_DOMAIN="Gdk" INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED - pangowin32-1.0.lib;fribidi.lib;imm32.lib + ole32.lib;advapi32.lib;shell32.lib;gdi32.lib + pangowin32-1.0.lib;fribidi.lib;imm32.lib;$(CommonARM64SystemLibs) winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs) ws2_32.lib atk-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs) @@ -43,6 +44,9 @@ nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstall + + $(CommonARM64SystemLibs) + $(GtkBinaryVersion) diff --git a/win32/vs15/Directory.Build.props b/win32/vs15/Directory.Build.props new file mode 100644 index 0000000000..70e8617358 --- /dev/null +++ b/win32/vs15/Directory.Build.props @@ -0,0 +1,5 @@ + + + 10.0.19041.0 + + diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am index c9f0429f13..a921879d3e 100644 --- a/win32/vs15/Makefile.am +++ b/win32/vs15/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/Makefile.decl -EXTRA_DIST += \ +EXTRA_DIST_COPIED = \ README.txt \ gtk+.sln \ gtk3-prebuild.vcxproj \ @@ -40,7 +40,9 @@ EXTRA_DIST += \ gtk3-install.props \ gtk3-version-paths.props -DISTCLEANFILES = $(EXTRA_DIST) +EXTRA_DIST += $(EXTRA_DIST_COPIED) Directory.build.props + +DISTCLEANFILES = $(EXTRA_DIST_COPIED) MSVC_VER = 15 MSVC_VER_LONG = 15