Compare commits
1 Commits
gtk3_fix_c
...
fix_crash_
Author | SHA1 | Date | |
---|---|---|---|
|
45519b47cb |
@@ -15,7 +15,7 @@ EXTRA_DIST += \
|
||||
INSTALL.in \
|
||||
NEWS.pre-1-0 \
|
||||
README.commits \
|
||||
README.win32.md \
|
||||
README.win32 \
|
||||
check-version.py \
|
||||
config.h.win32 \
|
||||
makefile.msc \
|
||||
|
379
README.win32
Normal file
379
README.win32
Normal file
@@ -0,0 +1,379 @@
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv at least.
|
||||
See http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
For people compiling GTK+ with Visual C++ or later, it is recommended that
|
||||
the same compiler is used for at least GDK-Pixbuf, Pango, atk and glib
|
||||
so that crashes and errors caused by different CRTs can be avoided. Currently
|
||||
building with Visual Studio 2008 or later is supported, either via Visual Studio
|
||||
project files or via the Meson build system, as described in the below sections.
|
||||
For Visual Studio 2008, 2010, a special setup making use of the Windows 8.0 SDK
|
||||
is required, see at the bottom of this document for guidance.
|
||||
Interchanging between Visual Studio 2015, 2017 and 2019 builds should be fine
|
||||
as they use the same CRT (UCRT) DLLs.
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
|
||||
1) GNU tools, ./configure && make install
|
||||
-----------------------------------------
|
||||
|
||||
This requires you have mingw and MSYS.
|
||||
|
||||
Use the configure script, and the resulting Makefiles (which use
|
||||
libtool and gcc to do the compilation). I use this myself, but it can
|
||||
be hard to setup correctly.
|
||||
|
||||
The full script I run to build GTK+ 2.16 unpacked from a source
|
||||
distribution is as below. This is from bulding GTK+ 2.16.5. I don't
|
||||
use any script like this to build the development branch, as I don't
|
||||
distribute any binaries from development branches.
|
||||
|
||||
# This is a shell script that calls functions and scripts from
|
||||
# tml@iki.fi's personal work env<6E>ronment. It is not expected to be
|
||||
# usable unmodified by others, and is included only for reference.
|
||||
|
||||
MOD=gtk+
|
||||
VER=2.16.5
|
||||
REV=1
|
||||
ARCH=win32
|
||||
|
||||
THIS=${MOD}_${VER}-${REV}_${ARCH}
|
||||
|
||||
RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
|
||||
DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
|
||||
|
||||
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||
TARGET=c:/devel/target/$HEX
|
||||
|
||||
usedev
|
||||
usemsvs6
|
||||
|
||||
(
|
||||
|
||||
set -x
|
||||
|
||||
DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
|
||||
PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
|
||||
|
||||
PKG_CONFIG_PATH=
|
||||
for D in $DEPS; do
|
||||
PATH=/devel/dist/${ARCH}/$D/bin:$PATH
|
||||
[ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
done
|
||||
|
||||
LIBPNG=`latest --arch=${ARCH} libpng`
|
||||
ZLIB=`latest --arch=${ARCH} zlib`
|
||||
LIBTIFF=`latest --arch=${ARCH} libtiff`
|
||||
JPEG=`latest --arch=${ARCH} jpeg`
|
||||
|
||||
patch -p0 <<'EOF'
|
||||
EOF
|
||||
|
||||
lt_cv_deplibs_check_method='pass_all' \
|
||||
CC='gcc -mtune=pentium3 -mthreads' \
|
||||
CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
|
||||
-I/devel/dist/${ARCH}/${ZLIB}/include \
|
||||
-I/devel/dist/${ARCH}/${LIBTIFF}/include \
|
||||
-I/devel/dist/${ARCH}/${JPEG}/include \
|
||||
-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
|
||||
LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
|
||||
-L/devel/dist/${ARCH}/${ZLIB}/lib \
|
||||
-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
|
||||
-L/devel/dist/${ARCH}/${JPEG}/lib \
|
||||
-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
|
||||
-Wl,--enable-auto-image-base" \
|
||||
LIBS=-lintl \
|
||||
CFLAGS=-O2 \
|
||||
./configure \
|
||||
--enable-win32-backend \
|
||||
--disable-gdiplus \
|
||||
--with-included-immodules \
|
||||
--without-libjasper \
|
||||
--enable-debug=yes \
|
||||
--enable-explicit-deps=no \
|
||||
--disable-gtk-doc \
|
||||
--disable-static \
|
||||
--prefix=$TARGET &&
|
||||
|
||||
libtoolcacheize &&
|
||||
rm gtk/gtk.def &&
|
||||
(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
|
||||
|
||||
PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
|
||||
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||
|
||||
./gtk-zip.sh &&
|
||||
|
||||
mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
|
||||
mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
|
||||
|
||||
) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
|
||||
|
||||
(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
|
||||
manifestify /tmp/$RUNZIP /tmp/$DEVZIP
|
||||
|
||||
You should not just copy the above blindly. There are some things in
|
||||
the script that are very specific to *my* build setup on *my* current
|
||||
machine. For instance the "latest" command, the "usedev" and
|
||||
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||
is really just meant for reference, to give an idea. You really need
|
||||
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||
properly after installing the dependencies before building GTK+.
|
||||
|
||||
As you see above, after running configure, one can just say "make
|
||||
install", like on Unix. A post-build fix is needed, running
|
||||
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||
file.
|
||||
|
||||
For a 64-bit build you need to remove the gtk/gtk.def file and let it
|
||||
be regenerated by the makefilery. This is because the 64-bit GTK dll
|
||||
has a slightly different list of exported function names. This is on
|
||||
purpose and not a bug. The API is the same at the source level, and
|
||||
the same #defines of some function names to actually have a _utf8
|
||||
suffix is used (just to keep the header simpler). But the
|
||||
corresponding non-suffixed function to maintain ABI stability are not
|
||||
needed in the 64-bit case (because there are no older EXEs around that
|
||||
would require such for ABI stability).
|
||||
|
||||
|
||||
2) Microsoft's tools
|
||||
--------------------
|
||||
|
||||
There are VS 2008~2019 solution and project files to build GTK+, which
|
||||
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
|
||||
provided that the afore-mentioned dependencies are installed. They will
|
||||
build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in),
|
||||
the GAIL-Util library and the gtk-demo program. Please also refer to the
|
||||
README file(s) that reside in win32 on how to enable additional features
|
||||
that are not enabled by default, such as EGL support via libANGLE, which
|
||||
emulate the GL/EGL calls using Direct3D 9/11.
|
||||
|
||||
Please refer to the following GNOME Live! page for a more detailed ouline
|
||||
on the process of building the GTK+ stack and its dependencies with Visual
|
||||
C++:
|
||||
|
||||
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I (Tor) use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
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 3.x 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 <GenerateRequiredSourcesBase> 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 3.x 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.
|
||||
|
||||
It may still be possible to carry out the build and build the introspection files with Python 2.7.x
|
||||
using older versions of GLib and GObject-Introspection, but please note that this is not recommended
|
||||
and one is on his/her own by doing so.
|
||||
|
||||
3) Using Meson (for Visual Studio and MinGW builds)
|
||||
---
|
||||
|
||||
Meson can now be used to build GTK+-3.x with either MinGW or Visual Studio.
|
||||
You will need the following items in addition to all the dependencies
|
||||
listed above:
|
||||
|
||||
- Python 3.5 or later
|
||||
- Meson build system, 0.48.0 or later
|
||||
- Ninja (if not using the Visual Studio project generator for
|
||||
Visual Studio 2010, 2015, 2017, 2019)
|
||||
- CMake (optional, used for dependency searching)
|
||||
- pkg-config (optional, or some compatible tool, highly recommended)
|
||||
|
||||
For all Windows builds, note that unless -Dbuiltin_immodules=no is specified,
|
||||
the input modules (immodules) are built directly into the GTK DLL.
|
||||
|
||||
For building with Meson using Visual Studio, do the following:
|
||||
|
||||
Create an empty build directory somewhere that is on the same drive
|
||||
as the source tree, and launch the Visual Studio command prompt that
|
||||
matches the build configuration (Visual Studio version and architecture),
|
||||
and run the following:
|
||||
|
||||
- Ensure that both the installation directory of Python 3.5+ and its script
|
||||
directory is in your PATH, as well as the Ninja, CMake and pkg-config
|
||||
executables (if used). If a pkg-config compatible drop-in replacement
|
||||
tool is being used, ensure that PKG_CONFIG is set to point to the
|
||||
executable of that tool as well.
|
||||
|
||||
- For non-GNOME dependencies (such as Cairo and Harfbuzz), where pkg-config
|
||||
files or CMake files could not be properly located, set INCLUDE and LIB
|
||||
to ensure that their header files and .lib files can be found respectively.
|
||||
The DLLs of those dependencies should also be in the PATH during the build
|
||||
as well, especially if introspection files are to be built.
|
||||
|
||||
- For GNOME dependencies, the pkg-config files for those dependencies should
|
||||
be searchable by pkg-config (or a compatible tool). Verify this by running
|
||||
$(PKG_CONFIG) --modversion <dependency>.
|
||||
|
||||
- Run the following:
|
||||
meson <path_to_directory_of_this_file> --buildtype=... --prefix=...,
|
||||
where buildtype can be release, debugoptimized, debug or plain. Please
|
||||
refer to the Meson documentation for more details. You may also wish to
|
||||
pass in -Dbroadway_backend=true if building the Broadway GDK backend is
|
||||
desired, and/or pass in -Dbuiltin_immodules=no to build the immodules as
|
||||
standalone DLLs that can be loaded by GTK dynamically. For Visual Studio
|
||||
2010, 2015, 2017 and 2019 builds, you may pass in --backend=vs to generate
|
||||
Visual Studio project files to be used to carry out the builds.
|
||||
|
||||
If you are building with Visual Studio 2008, note the following items as well:
|
||||
|
||||
- For x64 builds, the compiler may hang when building the certain files, due
|
||||
to optimization issues in the compiler. If this happens, use the Windows
|
||||
Task Manager and terminate all cl.exe processes, and the build will fail
|
||||
with the source files that did not finish compiling due to the hang.
|
||||
Look for them in build.ninja in the build directory, and change their compiler
|
||||
flag "/O2" to "/O1", and the compilation and linking should proceed normally.
|
||||
At this time of writing, the following files are known to cause this hang:
|
||||
|
||||
gtk\gtkfilechoosernativewin32.c
|
||||
gtk\gtkfilesystemmodel.c
|
||||
gtk\gtktextsegment.c
|
||||
gtk\gtktextbtree.c
|
||||
gtk\gtkrbtree.c
|
||||
testsuite\gtk\treemodel.c
|
||||
testsuite\gtk\textbuffer.c
|
||||
testsuite\gtk\rbtree.c
|
||||
testsuite\gtk\icontheme.c
|
||||
|
||||
- Upon running install (via "ninja install"), it is likely that
|
||||
gtk-query-immodules-3.0.exe will fail to run as it cannot find msvcr90.dll or
|
||||
msvcr90D.dll. You can ignore this if you did not specify -Dbuiltin_immodules=no
|
||||
when configuring via Meson. If -Dbuiltin_immodules=no is specified, you need to
|
||||
run the following after embedding the manifests as outlined in the next point:
|
||||
|
||||
<gtk_install_prefix>\bin\gtk-query-immodules-3.0.exe > <gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules.cache
|
||||
|
||||
- You will need to run the following upon completing install, from the build
|
||||
directory in the Visual Studio 2008/SDK 6.0 command prompt (third line is not
|
||||
needed unless -Dbuiltin_immodules=no is specified) so that the built binaries
|
||||
can run:
|
||||
|
||||
for /r %f in (*.dll.manifest) do if exist <gtk_install_prefix>\bin\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\bin\%~nf;2
|
||||
for /r %f in (*.exe.manifest) do if exist <gtk_install_prefix>\bin\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\bin\%~nf;1
|
||||
for /r %f in (*.dll.manifest) do if exist <gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules\%~nf;2
|
||||
|
||||
- The more modern visual style for the print dialog is not applied for Visual
|
||||
Studio 2008 builds. Any solutions to this is really appreciated.
|
||||
|
||||
Support for pre-2012 Visual Studio
|
||||
==================================
|
||||
|
||||
This release of GTK+ requires at least the Windows 8.0 SDK in order to be built
|
||||
successfully using Visual Studio, which means that building with Visual Studio
|
||||
2008 or 2010 is possible only with a special setup and must be done in the
|
||||
command line with Ninja. Please see
|
||||
https://devblogs.microsoft.com/cppblog/using-the-windows-software-development-kit-sdk-for-windows-8-consumer-preview-with-visual-studio-2010/
|
||||
for references; basically, assuming that your Windows 8.0 SDK is installed in
|
||||
`C:\Program Files (x86)\Windows Kits\8.0` (`$(WIN8SDKDIR)` in short), you need
|
||||
to ensure the following before invoking Meson to configure the build:
|
||||
|
||||
- Your `%INCLUDE%` must not include the Windows 7.0/7.1 SDK include directories,
|
||||
and `$(WIN8SDKDIR)\include\um`, `$(WIN8SDKDIR)\include\um\share` and
|
||||
`$(WIN8SDKDIR)\include\winrt` (in this order) must be before your stock
|
||||
Visual Studio 2008/2010 header directories. If you have the DirectX SDK installed,
|
||||
you should remove its include directory from your `%INCLUDE%` as well.
|
||||
- You must replace the Windows 7.0/7.1 SDK library directory in `%LIB%` with the
|
||||
Windows 8.0 SDK library directory, i.e. `$(WIN8SDKDIR)\lib\win8\um\[x86|x64]`.
|
||||
If you have the DirectX SDK installed, you should remove its library directory
|
||||
from your `%INCLUDE%` as well.
|
||||
- You must replace the Windows 7.0/7.1 SDK tools directory from your `%PATH%` with
|
||||
the Windows 8.0 SDK tools directory, i.e. `$(WIN8SDKDIR)\bin\[x86|x64]`.
|
||||
If you have the DirectX SDK installed, you should remove its utility directory
|
||||
from your `%PATH%` as well.
|
||||
|
||||
The Windows 8.0 SDK headers may contain an `roapi.h` that cannot be used under plain
|
||||
C, so to remedy that, change the following lines (around lines 55-57):
|
||||
|
||||
// RegisterActivationFactory/RevokeActivationFactory registration cookie
|
||||
typedef struct {} *RO_REGISTRATION_COOKIE;
|
||||
// RegisterActivationFactory/DllGetActivationFactory callback
|
||||
|
||||
to
|
||||
|
||||
// RegisterActivationFactory/RevokeActivationFactory registration cookie
|
||||
#ifdef __cplusplus
|
||||
typedef struct {} *RO_REGISTRATION_COOKIE;
|
||||
#else
|
||||
typedef struct _RO_REGISTRATION_COOKIE *RO_REGISTRATION_COOKIE; /* make this header includable in C files */
|
||||
#endif
|
||||
// RegisterActivationFactory/DllGetActivationFactory callback
|
||||
|
||||
This follows what is done in the Windows 8.1 SDK, which contains an `roapi.h`
|
||||
that is usable under plain C. Please note that you might need to copy that file
|
||||
into a location that is in your `%INCLUDE%` which precedes the include path for the
|
||||
Windows 8.0 SDK headers, if you do not have administrative privileges.
|
||||
|
||||
Visual Studio 2008 hacks
|
||||
========================
|
||||
|
||||
- You need to run the following lines from your build directory, to embed the
|
||||
manifests that are generated during the build, assuming the built binaries
|
||||
are installed to `$(PREFIX)`, after a successful build/installation:
|
||||
|
||||
```cmd
|
||||
> for /r %f in (*.dll.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f (PREFIX)\bin\%~nf;2
|
||||
> for /r %f in (*.exe.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f (PREFIX)\bin\%~nf;1
|
||||
```
|
||||
|
||||
|
||||
- If building for amd64/x86_64/x64, sometimes the compilation of sources may seem to hang, which
|
||||
is caused by an optimization issue in the 2008 x64 compiler. You need to use Task Manager to
|
||||
remove all running instances of `cl.exe`, which will cause the build process to terminate. Update
|
||||
the build flags of the sources that hang on compilation by changing its `"/O2"` flag to `"/O1"`
|
||||
in `build.ninja`, and retry the build, where things should continue to build normally.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
--Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>
|
484
README.win32.md
484
README.win32.md
@@ -1,484 +0,0 @@
|
||||
Notes on running GTK on Windows in general
|
||||
===
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Notes on using OpenGL (GtkGLArea/GdkGLArea) on Win32
|
||||
===
|
||||
Note that on Windows, if one is running Nahimic 3 on a system with
|
||||
nVidia graphics, one needs to stop the "Nahimic service" or insert
|
||||
the GTK application into the Nahimic blacklist, as noted in
|
||||
https://www.nvidia.com/en-us/geforce/forums/game-ready-drivers/13/297952/nahimic-and-nvidia-drivers-conflict/2334568/
|
||||
if using programs that utilise GtkGLArea and/or GdkGLArea, or use
|
||||
GDK_GL=gles if you know that GLES support is enabled for the build.
|
||||
|
||||
This is a known issue, as the above link indicates, and affects quite
|
||||
a number of applications--sadly, since this issue lies within the
|
||||
nVidia graphics driver and/or the Nahimic 3 code, we are not able
|
||||
to rememdy this on the GTK side; the best bet before trying the above
|
||||
workarounds is to try to update your graphics drivers and Nahimic
|
||||
installation.
|
||||
|
||||
Building GTK+ on Win32
|
||||
===
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv at least.
|
||||
See http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
For people compiling GTK+ with Visual C++, it is recommended that
|
||||
the same compiler is used for at least GDK-Pixbuf, Pango, atk and glib
|
||||
so that crashes and errors caused by different CRTs can be avoided.
|
||||
|
||||
Currently building with Visual Studio 2008 or later is supported,
|
||||
either via Visual Studio project files or via the Meson build system,
|
||||
as described in the below sections.
|
||||
|
||||
For Visual Studio 2008 and 2010, a special setup making use of the Windows
|
||||
8.0 SDK is required, see at the bottom of this document for guidance.
|
||||
Interchanging between Visual Studio 2015, 2017, 2019 and 2022 builds
|
||||
should be fine as they use the same CRT (UCRT) DLLs.
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
|
||||
GNU tools, ./configure && make install (info here may be out of date,
|
||||
consider using Meson instead)
|
||||
---
|
||||
|
||||
This requires you have mingw and MSYS.
|
||||
|
||||
Use the configure script, and the resulting Makefiles (which use
|
||||
libtool and gcc to do the compilation). I use this myself, but it can
|
||||
be hard to setup correctly.
|
||||
|
||||
The full script I run to build GTK+ 2.16 unpacked from a source
|
||||
distribution is as below. This is from bulding GTK+ 2.16.5. I don't
|
||||
use any script like this to build the development branch, as I don't
|
||||
distribute any binaries from development branches.
|
||||
|
||||
```
|
||||
# This is a shell script that calls functions and scripts from
|
||||
# tml@iki.fi's personal work env<6E>ronment. It is not expected to be
|
||||
# usable unmodified by others, and is included only for reference.
|
||||
|
||||
MOD=gtk+
|
||||
VER=2.16.5
|
||||
REV=1
|
||||
ARCH=win32
|
||||
|
||||
THIS=${MOD}_${VER}-${REV}_${ARCH}
|
||||
|
||||
RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
|
||||
DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
|
||||
|
||||
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||
TARGET=c:/devel/target/$HEX
|
||||
|
||||
usedev
|
||||
usemsvs6
|
||||
|
||||
(
|
||||
|
||||
set -x
|
||||
|
||||
DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
|
||||
PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
|
||||
|
||||
PKG_CONFIG_PATH=
|
||||
for D in $DEPS; do
|
||||
PATH=/devel/dist/${ARCH}/$D/bin:$PATH
|
||||
[ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
done
|
||||
|
||||
LIBPNG=`latest --arch=${ARCH} libpng`
|
||||
ZLIB=`latest --arch=${ARCH} zlib`
|
||||
LIBTIFF=`latest --arch=${ARCH} libtiff`
|
||||
JPEG=`latest --arch=${ARCH} jpeg`
|
||||
|
||||
patch -p0 <<'EOF'
|
||||
EOF
|
||||
|
||||
lt_cv_deplibs_check_method='pass_all' \
|
||||
CC='gcc -mtune=pentium3 -mthreads' \
|
||||
CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
|
||||
-I/devel/dist/${ARCH}/${ZLIB}/include \
|
||||
-I/devel/dist/${ARCH}/${LIBTIFF}/include \
|
||||
-I/devel/dist/${ARCH}/${JPEG}/include \
|
||||
-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
|
||||
LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
|
||||
-L/devel/dist/${ARCH}/${ZLIB}/lib \
|
||||
-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
|
||||
-L/devel/dist/${ARCH}/${JPEG}/lib \
|
||||
-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
|
||||
-Wl,--enable-auto-image-base" \
|
||||
LIBS=-lintl \
|
||||
CFLAGS=-O2 \
|
||||
./configure \
|
||||
--enable-win32-backend \
|
||||
--disable-gdiplus \
|
||||
--with-included-immodules \
|
||||
--without-libjasper \
|
||||
--enable-debug=yes \
|
||||
--enable-explicit-deps=no \
|
||||
--disable-gtk-doc \
|
||||
--disable-static \
|
||||
--prefix=$TARGET &&
|
||||
|
||||
libtoolcacheize &&
|
||||
rm gtk/gtk.def &&
|
||||
(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
|
||||
|
||||
PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
|
||||
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||
|
||||
./gtk-zip.sh &&
|
||||
|
||||
mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
|
||||
mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
|
||||
|
||||
) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
|
||||
|
||||
(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
|
||||
manifestify /tmp/$RUNZIP /tmp/$DEVZIP
|
||||
```
|
||||
|
||||
You should not just copy the above blindly. There are some things in
|
||||
the script that are very specific to *my* build setup on *my* current
|
||||
machine. For instance the "latest" command, the "usedev" and
|
||||
"usemsvs6" shell functions, the `/devel/dist` folder. The above script
|
||||
is really just meant for reference, to give an idea. You really need
|
||||
to understand what things like `PKG_CONFIG_PATH` are and set them up
|
||||
properly after installing the dependencies before building GTK+.
|
||||
|
||||
As you see above, after running configure, one can just say "make
|
||||
install", like on Unix. A post-build fix is needed, running
|
||||
gdk-pixbuf-query-loaders once more to get a correct `gdk-pixbuf.loaders`
|
||||
file.
|
||||
|
||||
For a 64-bit build you need to remove the `gtk/gtk.def` file and let it
|
||||
be regenerated by the makefilery. This is because the 64-bit GTK dll
|
||||
has a slightly different list of exported function names. This is on
|
||||
purpose and not a bug. The API is the same at the source level, and
|
||||
the same #defines of some function names to actually have a _utf8
|
||||
suffix is used (just to keep the header simpler). But the
|
||||
corresponding non-suffixed function to maintain ABI stability are not
|
||||
needed in the 64-bit case (because there are no older EXEs around that
|
||||
would require such for ABI stability).
|
||||
|
||||
|
||||
Microsoft's tools
|
||||
---
|
||||
|
||||
There are VS 2008~2022 solution and project files to build GTK+, which
|
||||
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
|
||||
provided that the afore-mentioned dependencies are installed. They will
|
||||
build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in),
|
||||
the GAIL-Util library and the gtk3-demo program. Please also refer to the
|
||||
README_FEATURES_MSVC.md file that reside in win32 on how to enable
|
||||
additional features that are not enabled by default, such as EGL support
|
||||
via libANGLE, which emulate the GL/EGL calls using Direct3D 9/11.
|
||||
|
||||
Please refer to the following GNOME Live! page for a more detailed ouline
|
||||
on the process of building the GTK+ stack and its dependencies with Visual
|
||||
C++:
|
||||
|
||||
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I (Tor) use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
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.
|
||||
|
||||
You may need or wish to update `gtk3-build-defines.[vs]props` (under the
|
||||
entry `GenerateRequiredSourcesBase` and/or `GtkIntrospectNMakeCmd` and/or
|
||||
`InstallBuildsBase`) to pass in the variables if they are not in:
|
||||
|
||||
* `$(PREFIX)\bin` (used for generating code for the build):
|
||||
* `GLIB_MKENUMS` (path to your glib-mkenums script)
|
||||
* `GLIB_GENMARSHAL` (path to your glib-genmarshal script)
|
||||
* `GDBUS_CODEGEN` (path to your gdbus-codegen script)
|
||||
* `GLIB_COMPILE_RESOURCES` (path to your glib-compile-resources program)
|
||||
|
||||
* `%PATH%`:
|
||||
* `PYTHON` (path to your Python interpreter, for generating code for
|
||||
the build as well as for introspection; for introspection, this must
|
||||
match the version series and architecture for the Python that is used
|
||||
to build gobject-introspection)
|
||||
* `PKG_CONFIG` (path to your pkg-config or compatible tool, for
|
||||
building introspection files in the `gtk3-introspect` project)
|
||||
* `MSGFMT` (path to your msgfmt program, if building translations
|
||||
during install; append ` install-translations` to `InstallBuildsBase`
|
||||
in `gtk3-build-defines.[vs]props])
|
||||
|
||||
`LIBDIR` and `INCLUDEDIR` can also be passed in if they are not under
|
||||
`$(PREFIX)\lib` and `$(PREFIX)\include` respectively. Note that
|
||||
`$(LIBDIR)` is architecture-dependent.
|
||||
|
||||
If desiring to build binaries for ARM64 (`aarch64`), one needs to use the
|
||||
Visual Studio 2017 or 2019 or 2022 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 3.x 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-build-defines.props` to pass in the variables as indicated earlier:
|
||||
|
||||
* GLIB_MKENUMS
|
||||
* GLIB_GENMARSHAL
|
||||
* GDBUS_CODEGEN
|
||||
* GLIB_COMPILE_RESOURCES
|
||||
* PYTHON
|
||||
|
||||
in the nmake command line indicated by `<GenerateRequiredSourcesBase>` so
|
||||
that they point to the respective tools and scripts 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 3.x interpreter
|
||||
that will run on the build machine (or just update `PYTHON=...` in the
|
||||
command line in `<GenerateRequiredSourcesBase>`). 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.
|
||||
|
||||
It may still be possible to carry out the build and build the
|
||||
introspection files with Python 2.7.x using older versions of GLib and
|
||||
GObject-Introspection, but please note that this is not recommended
|
||||
and one is on his/her own by doing so.
|
||||
|
||||
It is now supported to build with the Visual Studio projects directly
|
||||
from a GIT checkout. Run in a Visual Studio command prompt, in
|
||||
$(srcroot)/win32:
|
||||
|
||||
`nmake /f bootstrap-msvc.mak [PYTHON=...] [PERL=...] [FONT_FEATURES_DEMO=1] [FONT_FEATURES_USE_PANGOFT2=1] [USE_EGL=1]`
|
||||
|
||||
where `PYTHON` and `PERL` are the respective paths to the Python and PERL
|
||||
interpreters, if they are not in your `%PATH%`-they are both required to
|
||||
generate the full sets of project files, as well as the auxiliary build
|
||||
files and headers that is not available in a GIT checkout and must be
|
||||
generated prior to opening the project files.
|
||||
|
||||
For `FONT_FEATURES_DEMO`, `FONT_FEATURES_USE_PANGOFT2` and `USE_EGL`,
|
||||
please refer to `win32\README_FEATURES_MSVC.md` for more details, to
|
||||
enable features that is optional and not enabled by default (i.e. in the
|
||||
release tarballs).
|
||||
|
||||
It is also possible to regenerate some or all of the visual studio
|
||||
projects with the following, if necessary:
|
||||
|
||||
`nmake /f generate-msvc.mak [PYTHON=...] [FONT_FEATURES_DEMO=1] [FONT_FEATURES_USE_PANGOFT2=1] [USE_EGL=1] <target>`
|
||||
|
||||
Where target can be (they will update all related VS2008~2022 projects):
|
||||
|
||||
* `regenerate-demos-h-win32`: Regenerate the `gtk3-demo` projects along
|
||||
with `demos.h.win32`, useful to enable or disable the Font Features
|
||||
demo.
|
||||
* `regenerate-gdk-vsproj`: Regenerate all the GDK projects with
|
||||
`broadwayd`, useful to enable or disable EGL on Windows.
|
||||
* `regenerate-gtk-vsproj`: Regenerate the `gtk-3` and `gailutil-3` library
|
||||
projects.
|
||||
* `regenerate-all-msvc-projs`: Re-generate all project files, and re-copy
|
||||
all the Visual Studio 2010 project files for VS 2012~2022.
|
||||
|
||||
Using Meson (for Visual Studio and MinGW builds)
|
||||
---
|
||||
|
||||
Meson can now be used to build GTK+-3.x with either MinGW or Visual Studio.
|
||||
You will need the following items in addition to all the dependencies
|
||||
listed above:
|
||||
|
||||
* Python 3.5 or later
|
||||
* Meson build system, 0.48.0 or later
|
||||
* Ninja (if not using the Visual Studio project generator for
|
||||
Visual Studio 2010 or later)
|
||||
* CMake (optional, used for dependency searching)
|
||||
* pkg-config (optional, or some compatible tool, highly recommended)
|
||||
|
||||
For all Windows builds, note that unless `-Dbuiltin_immodules=no` is
|
||||
specified, the input modules (immodules) are built directly into the GTK
|
||||
DLL.
|
||||
|
||||
For building with Meson using Visual Studio, do the following:
|
||||
|
||||
* Create an empty build directory somewhere that is on the same drive
|
||||
as the source tree, and launch the Visual Studio command prompt that
|
||||
matches the build configuration (Visual Studio version and architecture),
|
||||
and run the following:
|
||||
|
||||
* Ensure that both the installation directory of Python 3.5+ and its script
|
||||
directory is in your `%PATH%`, as well as the Ninja, CMake and pkg-config
|
||||
executables (if used). If a pkg-config compatible drop-in replacement
|
||||
tool is being used, ensure that `PKG_CONFIG` is set to point to the
|
||||
executable of that tool as well.
|
||||
|
||||
* For non-GNOME dependencies (such as Cairo and Harfbuzz), where pkg-config
|
||||
files or CMake files could not be properly located, set `%INCLUDE%` and
|
||||
`%LIB%` to ensure that their header files and .lib files can be found
|
||||
respectively. The DLLs of those dependencies should also be in the
|
||||
`%PATH%` during the build as well, especially if introspection files ar
|
||||
to be built.
|
||||
|
||||
* For GNOME dependencies, the pkg-config files for those dependencies
|
||||
should be searchable by `pkg-config` (or a compatible tool). Verify
|
||||
this by running `$(PKG_CONFIG) --modversion <dependency>`.
|
||||
|
||||
* Run the following:
|
||||
`meson <path_to_directory_of_this_file> --buildtype=... --prefix=...,
|
||||
where `buildtype` can be:
|
||||
|
||||
* release
|
||||
* debugoptimized
|
||||
* debug
|
||||
* plain.
|
||||
|
||||
Please refer to the Meson documentation for more details. You may also
|
||||
wish to pass in `-Dbroadway_backend=true` if building the Broadway GDK
|
||||
backend is desired, and/or pass in `-Dbuiltin_immodules=no` to build the
|
||||
immodules as standalone DLLs that can be loaded by GTK dynamically. For
|
||||
Visual Studio 2010 or later builds, you may pass in --backend=vs to
|
||||
generate Visual Studio project files to be used to carry out the builds.
|
||||
|
||||
If you are building with Visual Studio 2008, note the following items as
|
||||
well:
|
||||
|
||||
* For x64 builds, the compiler may hang when building the certain
|
||||
files, due to optimization issues in the compiler. If this happens,
|
||||
use the Windows Task Manager and terminate all `cl.exe` processes,
|
||||
and the build will fail with the source files that did not finish
|
||||
compiling due to the hang. Look for them in build.ninja in the build
|
||||
directory, and change their compiler
|
||||
flag `/O2` to `/O1`, and the compilation and linking should proceed
|
||||
normally.
|
||||
|
||||
* At this time of writing, the following files are known to cause this
|
||||
hang:
|
||||
|
||||
* gtk\gtkfilechoosernativewin32.c
|
||||
* gtk\gtkfilesystemmodel.c
|
||||
* gtk\gtktextsegment.c
|
||||
* gtk\gtktextbtree.c
|
||||
* gtk\gtkrbtree.c
|
||||
* testsuite\gtk\treemodel.c
|
||||
* testsuite\gtk\textbuffer.c
|
||||
* testsuite\gtk\rbtree.c
|
||||
* testsuite\gtk\icontheme.c
|
||||
* Upon running install (via "ninja install"), it is likely that
|
||||
`gtk-query-immodules-3.0.exe` will fail to run as it cannot find
|
||||
`msvcr90.dll` or `msvcr90D.dll`. You can ignore this if you did not
|
||||
specify `-Dbuiltin_immodules=no` when configuring via Meson.
|
||||
If `-Dbuiltin_immodules=no` is specified, you need to run the
|
||||
following after embedding the manifests as outlined in the next
|
||||
point:
|
||||
`$(gtk_install_prefix)\bin\gtk-query-immodules-3.0.exe > $(gtk_install_prefix)\lib\gtk-3.0\3.0.0\immodules.cache`
|
||||
|
||||
* You will need to run the following upon completing install, from the
|
||||
build directory in the Visual Studio 2008/SDK 6.0 command prompt
|
||||
(third line is not needed unless `-Dbuiltin_immodules=no` is
|
||||
specified) so that the built binaries can run:
|
||||
```
|
||||
for /r %f in (*.dll.manifest) do if exist $(gtk_install_prefix)\bin\%~nf mt /manifest %f /outputresource:$(gtk_install_prefix)\bin\%~nf;2
|
||||
for /r %f in (*.exe.manifest) do if exist $(gtk_install_prefix)\bin\%~nf mt /manifest %f /outputresource:$(gtk_install_prefix)\bin\%~nf;1
|
||||
for /r %f in (*.dll.manifest) do if exist $(gtk_install_prefix)\lib\gtk-3.0\3.0.0\immodules\%~nf mt /manifest %f /outputresource:$(gtk_install_prefix)\lib\gtk-3.0\3.0.0\immodules\%~nf;2
|
||||
```
|
||||
|
||||
* The more modern visual style for the print dialog is not applied for
|
||||
Visual Studio 2008 builds. Any solutions to this is really
|
||||
appreciated.
|
||||
|
||||
Support for all pre-2012 Visual Studio builds
|
||||
---
|
||||
|
||||
This release of GTK+ requires at least the Windows 8.0 or later SDK in
|
||||
order to be built successfully using Visual Studio, which means that
|
||||
building with Visual Studio 2008 or 2010 is possible only with a special
|
||||
setup and must be done in the command line with Ninja, if using Meson.
|
||||
Please see
|
||||
https://devblogs.microsoft.com/cppblog/using-the-windows-software-development-kit-sdk-for-windows-8-consumer-preview-with-visual-studio-2010/
|
||||
for references; basically, assuming that your Windows 8.0 SDK is installed
|
||||
in `C:\Program Files (x86)\Windows Kits\8.0` (`$(WIN8SDKDIR)` in short),
|
||||
you need to ensure the following before invoking Meson to configure the build. Your project files or Visual Studio IDE must also be similarly
|
||||
configured (using the Windows 8.1 SDK is also possible for Visual Studio
|
||||
2008~2012, replacing `$(WIN8SDKDIR)` with `$(WIN81SDKDIR)`, which is in
|
||||
`C:\Program Files (x86)\Windows Kits\8.1` unless otherwise indicated):
|
||||
|
||||
* Your `%INCLUDE%` (i.e. "Additional Include Directories" in the IDE)
|
||||
must not include the Windows 7.0/7.1 SDK include directories,
|
||||
and `$(WIN8SDKDIR)\include\um`, `$(WIN8SDKDIR)\include\um\share` and
|
||||
`$(WIN8SDKDIR)\include\winrt` (in this order) must be before your stock
|
||||
Visual Studio 2008/2010 header directories. If you have the DirectX
|
||||
SDK (2010 June or earlier) installed, you should remove its include
|
||||
directory from your `%INCLUDE%` as well.
|
||||
* You must replace the Windows 7.0/7.1 SDK library directory in `%LIB%`
|
||||
(i.e. "Additional Library Paths" in the IDE) with the Windows 8.0/8.1
|
||||
SDK library directory, i.e. `$(WIN8SDKDIR)\lib\win8\um\[x86|x64]` or
|
||||
`$(WIN81SDKDIR)\lib\winv6.3\um\[x86|x64]`.
|
||||
If you have the DirectX SDK installed, you should remove its library
|
||||
directory from your `%LIB%` as well.
|
||||
* You must replace the Windows 7.0/7.1 SDK tools directory from your
|
||||
`%PATH%` ("Executables Directories" in the IDE) with the Windows 8.0
|
||||
SDK tools directory, i.e. `$(WIN8SDKDIR)\bin\[x86|x64]`. If you have
|
||||
the DirectX SDK installed, you should remove its utility directory from
|
||||
your `%PATH%` as well.
|
||||
|
||||
* The Windows 8.0 SDK headers may contain an `roapi.h` that cannot be
|
||||
used under plain C, so to remedy that, change the following lines
|
||||
(around lines 55-57) (this is not necessary for the Windows 8.1 or
|
||||
later SDKs):
|
||||
|
||||
```
|
||||
// RegisterActivationFactory/RevokeActivationFactory registration cookie
|
||||
typedef struct {} *RO_REGISTRATION_COOKIE;
|
||||
// RegisterActivationFactory/DllGetActivationFactory callback
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```
|
||||
// RegisterActivationFactory/RevokeActivationFactory registration cookie
|
||||
#ifdef __cplusplus
|
||||
typedef struct {} *RO_REGISTRATION_COOKIE;
|
||||
#else
|
||||
typedef struct _RO_REGISTRATION_COOKIE *RO_REGISTRATION_COOKIE; /* make this header includable in C files */
|
||||
#endif
|
||||
// RegisterActivationFactory/DllGetActivationFactory callback
|
||||
```
|
||||
|
||||
This follows what is done in the Windows 8.1 SDK, which contains an
|
||||
`roapi.h` that is usable under plain C. Please note that you might need
|
||||
to copy that file into a location that is in your `%INCLUDE%` which
|
||||
precedes the include path for the Windows 8.0 SDK headers, if you do not
|
||||
have administrative privileges.
|
||||
|
||||
Visual Studio 2008 hacks
|
||||
---
|
||||
(Please see the section on Meson builds which touch on this topic)
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
---
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
* Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
* Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>
|
2
demos/gtk-demo/.gitignore
vendored
2
demos/gtk-demo/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
demos.h.win32
|
||||
demos.h
|
@@ -40,10 +40,10 @@ EXTRA_DIST += broadway.js rawinflate.min.js
|
||||
|
||||
# built headers that don't get installed
|
||||
broadway_built_sources = \
|
||||
$(broadway_built_private_headers)
|
||||
${broadway_built_private_headers}
|
||||
|
||||
libgdk_broadway_la_SOURCES = \
|
||||
$(broadway_built_private_headers)\
|
||||
${broadway_built_private_headers}\
|
||||
$(GDK_BROADWAY_NON_GENERATED_SOURCES)
|
||||
|
||||
if OS_UNIX
|
||||
|
@@ -4937,7 +4937,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
native,
|
||||
GDK_OWNERSHIP_NONE,
|
||||
owner_events,
|
||||
GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
|
||||
GDK_ALL_EVENTS_MASK,
|
||||
_gdk_display_get_next_serial (display),
|
||||
evtime,
|
||||
FALSE);
|
||||
@@ -4959,7 +4959,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
native,
|
||||
GDK_OWNERSHIP_NONE,
|
||||
owner_events,
|
||||
GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
|
||||
GDK_ALL_EVENTS_MASK,
|
||||
_gdk_display_get_next_serial (display),
|
||||
evtime,
|
||||
FALSE);
|
||||
@@ -4977,7 +4977,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
native,
|
||||
GDK_OWNERSHIP_NONE,
|
||||
owner_events,
|
||||
GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
|
||||
GDK_ALL_EVENTS_MASK,
|
||||
_gdk_display_get_next_serial (display),
|
||||
evtime,
|
||||
FALSE);
|
||||
@@ -5003,7 +5003,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
native,
|
||||
GDK_OWNERSHIP_NONE,
|
||||
owner_events,
|
||||
GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
|
||||
GDK_ALL_EVENTS_MASK,
|
||||
_gdk_display_get_next_serial (display),
|
||||
evtime,
|
||||
FALSE);
|
||||
|
@@ -165,7 +165,7 @@ widget_needs_widget_path (GtkWidget *widget)
|
||||
}
|
||||
|
||||
parent = _gtk_widget_get_parent (widget);
|
||||
if (parent == NULL)
|
||||
if (parent == NULL || !GTK_IS_CONTAINER (parent))
|
||||
return FALSE;
|
||||
|
||||
parent_func = GTK_CONTAINER_GET_CLASS (GTK_CONTAINER (parent))->get_path_for_child;
|
||||
|
@@ -115,7 +115,6 @@ static void set_completion_folder (GtkFileChooserEntry *chooser_entry,
|
||||
static void finished_loading_cb (GtkFileSystemModel *model,
|
||||
GError *error,
|
||||
GtkFileChooserEntry *chooser_entry);
|
||||
static void _gtk_file_chooser_entry_unselect_text (GtkFileChooserEntry *chooser_entry);
|
||||
|
||||
G_DEFINE_TYPE (GtkFileChooserEntry, _gtk_file_chooser_entry, GTK_TYPE_ENTRY)
|
||||
|
||||
@@ -484,6 +483,7 @@ static void
|
||||
gtk_file_chooser_entry_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
GTK_WIDGET_CLASS (_gtk_file_chooser_entry_parent_class)->grab_focus (widget);
|
||||
_gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -543,7 +543,6 @@ gtk_file_chooser_entry_focus_out_event (GtkWidget *widget,
|
||||
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (widget);
|
||||
|
||||
set_complete_on_load (chooser_entry, FALSE);
|
||||
_gtk_file_chooser_entry_unselect_text (chooser_entry);
|
||||
|
||||
return GTK_WIDGET_CLASS (_gtk_file_chooser_entry_parent_class)->focus_out_event (widget, event);
|
||||
}
|
||||
@@ -1051,18 +1050,6 @@ _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry)
|
||||
gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, (gint) len);
|
||||
}
|
||||
|
||||
/*
|
||||
* _gtk_file_chooser_entry_unselect_text:
|
||||
* @chooser_entry: a #GtkFileChooserEntry
|
||||
*
|
||||
* Unselects any existing text selection.
|
||||
*/
|
||||
static void
|
||||
_gtk_file_chooser_entry_unselect_text (GtkFileChooserEntry *chooser_entry)
|
||||
{
|
||||
gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_file_chooser_entry_set_local_only (GtkFileChooserEntry *chooser_entry,
|
||||
gboolean local_only)
|
||||
|
@@ -5466,6 +5466,9 @@ update_chooser_entry (GtkFileChooserWidget *impl)
|
||||
g_signal_handlers_block_by_func (priv->location_entry, G_CALLBACK (location_entry_changed_cb), impl);
|
||||
gtk_entry_set_text (GTK_ENTRY (priv->location_entry), priv->browse_files_last_selected_name);
|
||||
g_signal_handlers_unblock_by_func (priv->location_entry, G_CALLBACK (location_entry_changed_cb), impl);
|
||||
|
||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
||||
_gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (priv->location_entry));
|
||||
}
|
||||
|
||||
return;
|
||||
|
12
po/ca.po
12
po/ca.po
@@ -35,8 +35,8 @@ msgstr ""
|
||||
"Project-Id-Version: gtk+ 2.8.2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-02-18 00:07+0000\n"
|
||||
"PO-Revision-Date: 2022-08-16 20:44+0200\n"
|
||||
"Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
|
||||
"PO-Revision-Date: 2019-08-31 22:51+0200\n"
|
||||
"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
|
||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -2764,15 +2764,15 @@ msgstr "Lligadures"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2354
|
||||
msgid "Letter Case"
|
||||
msgstr "Majúscules i minúscules"
|
||||
msgstr "Ignora les diferències entre majúscules i minúscules"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2355
|
||||
msgid "Number Case"
|
||||
msgstr "Mida del número"
|
||||
msgstr "Número de cas"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2356
|
||||
msgid "Number Spacing"
|
||||
msgstr "Espaiat entre números"
|
||||
msgstr "Espaiat dels nombres"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2357
|
||||
msgid "Number Formatting"
|
||||
@@ -5604,7 +5604,7 @@ msgstr "A4 extra"
|
||||
#: gtk/paper_names_offsets.c:25
|
||||
msgctxt "paper size"
|
||||
msgid "A4 Tab"
|
||||
msgstr "A4 tabulat"
|
||||
msgstr "A4 tabloide"
|
||||
|
||||
#: gtk/paper_names_offsets.c:26
|
||||
msgctxt "paper size"
|
||||
|
1
win32/.gitignore
vendored
1
win32/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
config-msvc.mak
|
@@ -19,13 +19,12 @@ EXTRA_DIST += \
|
||||
detectenv-msvc.mak \
|
||||
gen-version-items.py \
|
||||
generate-msvc.mak \
|
||||
generate-msvcprojs.mak \
|
||||
gtk-introspection-msvc.mak \
|
||||
introspection-msvc.mak \
|
||||
install-msvc.mak \
|
||||
replace.py \
|
||||
pc_base.py \
|
||||
gtkpc.py \
|
||||
README_FEATURES_MSVC.md
|
||||
README_FEATURES_MSVC.txt
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -1,98 +0,0 @@
|
||||
Preameble
|
||||
---
|
||||
This file attempts to give further info about how to enable features
|
||||
that are not available in the Visual Studio project files shipped
|
||||
with the source release archive, i.e. beyond building GTK with the GDK
|
||||
Win32 backend, with or without the Broadway GDK backend.
|
||||
|
||||
The following also apply to Visual Studio builds done with Meson in terms
|
||||
of getting the required dependencies for the optional features.
|
||||
|
||||
Notes on enabling EGL (ANGLE/D3D support) for Windows/Visual Studio builds
|
||||
---
|
||||
There is now support in the GL context creation code for Windows in GDK for
|
||||
creating and using EGL (OpenGL ES 3) contexts, which can be used instead of
|
||||
the existing OpenGL (Desktop) support, especially when the graphics drivers
|
||||
do not support OpenGL adequately.
|
||||
|
||||
This support is not enabled by default in the project files. In order to
|
||||
do so, please do the following:
|
||||
|
||||
* Obtain or compile a build of recent version of ANGLE. The one that comes
|
||||
with QT 5.10.x is sufficiently recent, but not the one that comes with
|
||||
QT-5.6.x. Note that Visual Studio 2013 or later is required for building
|
||||
ANGLE from QT-5.10.x, but the Visual Studio 2013-built ANGLE DLLs does
|
||||
work without problems with GTK+ built with Visual Studio 2008~2013.
|
||||
You may need to obtain `D3Dcompiler_[47|43|42].dll` if it does not come
|
||||
with the system (which is part of the DirectX runtimes). Visual Studio
|
||||
2015 or later can use ANGLE from QT 5.11.x or later, or from Google's
|
||||
GIT repos, which may require later version of Visual Studio to build.
|
||||
Its headers and .lib needs to be set to be found by the compiler and
|
||||
linker respectively before building libepoxy.
|
||||
|
||||
* Build libepoxy with EGL support, which has to be enabled explicitly on
|
||||
Windows builds. Pass in `-Degl=yes` when building libepoxy using Meson.
|
||||
Build and install, making sure the headers and .lib can be located by the
|
||||
compiler and linker respectively.
|
||||
|
||||
* Either:
|
||||
* Open the `vsX/gtk+.sln`, and open the project properties in the
|
||||
`gdk3-win32` project. Under "C/C++", add `GDK_WIN32_ENABLE_EGL` in
|
||||
the `Preprocessor Definitions` to the existing definitions in there
|
||||
for the configuration that is being built. Then build the solution.
|
||||
* Or:
|
||||
* Run in a Visual Studio command prompt:
|
||||
Go to `$(srcroot)\win32`, and run
|
||||
`nmake /f generate-msvc.mak regenerate-gdk-vsproj USE_EGL=1`.
|
||||
To undo that, run that command without `USE_EGL=1`. Python 3.x
|
||||
must be present in your `%PATH%` or passed in via
|
||||
`PYTHON=<path_to_python_interpreter>`. This will update all
|
||||
`gdk3-win32` projects (i.e. VS2008~2022).
|
||||
|
||||
* To force the use of the EGL code, set the envvar `GDK_GL=(...,)gles`,
|
||||
where `(...,)` are the other `GDK_GL` options desired.
|
||||
|
||||
Enabling the font tweaking features and the font features demo
|
||||
---
|
||||
The font tweaking features in the GTK DLL is enabled automatically if
|
||||
the Pango 1.44.0 and HarfBuzz 2.2.0 (or later) headers and libraries
|
||||
(and hence DLLs) are found during compile time. Check in
|
||||
`gtkfontchooserwidget.c` that the `#pragma comment(lib, "harfbuzz")` line
|
||||
to ensure that you have your HarfBuzz .lib file named as such, which
|
||||
is the default .lib name for HarfBuzz builds.
|
||||
|
||||
Alternatively, they can be manually enabled by running `nmake /f generate-msvc.mak regenerate-gtk-vsproj FONT_FEATURES_USE_PANGOFT2=1`
|
||||
meaning that PangoFT2 must be present, which depends on HarfBuzz,
|
||||
FontConfig and FreeType. You will then need to ensure the `gtk-3`
|
||||
projects have the correct .lib's of PangoFT2, HarfBuzz and FreeType
|
||||
in the `Additional Libraries` entry under the linker settings, as they
|
||||
assume the most common names are used there.
|
||||
|
||||
Please note that the font features demo is not built into gtk3-demo
|
||||
by default. To do that, run in a Visual Studio command prompt:
|
||||
|
||||
* Go to `$(srcroot)\win32`, and run
|
||||
`nmake /f generate-msvc.mak regenerate-demos-h-win32 FONT_FEATURES_DEMO=1`.
|
||||
To undo that, run that command without `FONT_FEATURES_DEMO=1`. Python 3.x
|
||||
must be present in your `%PATH%` or passed in via
|
||||
`PYTHON=<path_to_python_interpreter>`.
|
||||
|
||||
* If you are building the font features demo with the older PangoFT2-style
|
||||
(i.e. pre-Pango-1.44.x and pre-HarfBuzz-2.2.0) support, pass in
|
||||
`FONT_FEATURES_USE_PANGOFT2=1` in addition to `FONT_FEATURES_DEMO=1` in
|
||||
the NMake command line. The gtk3-demo project files will also be updated
|
||||
with the appropriate dependent libraries linked in-please check that the
|
||||
project settings contain the correct .lib file names for your system, as
|
||||
they assume the most common names are used there.
|
||||
|
||||
Building the translations
|
||||
---
|
||||
Building translations is supported via Meson builds or via the Visual
|
||||
Studio projects, both of which require a working `msgfmt.exe` (from
|
||||
`gettext-tools`, a part of gettext) in the `%PATH%`, or for the Visual
|
||||
Studio projects, passed into the arguments in `InstallBuildsBase`
|
||||
in `gtk3-build-defines.[props|vsprops]` with `MSGFMT=<path_to_msgfmt.exe>`.
|
||||
For the Visual Studio projects, for this to work one needs to also supply
|
||||
a `INSTALL_TRANSLATIONS=1` (without the quotes) argument to the same
|
||||
`InstallBuildsBase` in the afore-mentioned property sheet. Using
|
||||
`msgfmt.exe` from Cygwin or MSYS2 is supported as well.
|
84
win32/README_FEATURES_MSVC.txt
Normal file
84
win32/README_FEATURES_MSVC.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
Preameble
|
||||
=========
|
||||
This file attempts to give further info about how to enable features
|
||||
that are not available in the Visual Studio project files shipped
|
||||
with the source release archive, i.e. beyond building GTK with the GDK
|
||||
Win32 backend, with or without the Broadway GDK backend.
|
||||
|
||||
The following also apply to Visual Studio builds done with Meson in terms
|
||||
of getting the required dependencies for the optional features.
|
||||
|
||||
==========================================================================
|
||||
Notes on enabling EGL (ANGLE/D3D support) for Windows/Visual Studio builds
|
||||
==========================================================================
|
||||
There is now support in the GL context creation code for Windows in GDK for
|
||||
creating and using EGL (OpenGL ES 3) contexts, which can be used instead of
|
||||
the existing OpenGL (Desktop) support, especially when the graphics drivers
|
||||
do not support OpenGL adequately.
|
||||
|
||||
This support is not enabled by default in the project files. In order to do
|
||||
so, please do the following:
|
||||
|
||||
-Obtain or compile a build of recent version of ANGLE. The one that comes
|
||||
with QT 5.10.x is sufficiently recent, but not the one that comes with QT-
|
||||
5.6.x. Note that Visual Studio 2013 or later is required for building
|
||||
ANGLE from QT-5.10.x, but the Visual Studio 2013-built ANGLE DLLs does
|
||||
work without problems with GTK+ built with Visual Studio 2008~2013.
|
||||
You may need to obtain D3Dcompiler_[47|43|42].dll if it does not come
|
||||
with the system (which is part of the DirectX runtimes). Visual Studio
|
||||
2015 or later can use ANGLE from QT 5.11.x or later, or from Google's
|
||||
GIT repos, which may require later version of Visual Studio to build.
|
||||
Its headers and .lib needs to be set to be found by the compiler and
|
||||
linker respectively before building libepoxy.
|
||||
-Build libepoxy with EGL support, which has to be enabled explicitly on
|
||||
Windows builds. Pass in -Degl=yes when building libepoxy using Meson.
|
||||
Build and install, making sure the headers and .lib can be located by the
|
||||
compiler and linker respectively.
|
||||
-Open the vsX/gtk+.sln, and open the project properties in the "gdk3-win32"
|
||||
project. Under "C/C++", add GDK_WIN32_ENABLE_EGL in the "Preprocessor
|
||||
Definitions" to the existing definitions in there for the configuration
|
||||
that is being built. Then build the solution.
|
||||
-To force the use of the EGL code, set the envvar GDK_GL=(...,)gles ,
|
||||
where (...,) are the other GDK_GL options desired.
|
||||
|
||||
==============================================================
|
||||
Enabling the font tweaking features and the font features demo
|
||||
==============================================================
|
||||
The font tweaking features in the GTK DLL is enabled automatically if
|
||||
the Pango 1.44.0 and HarfBuzz 2.2.0 (or later) headers and libraries
|
||||
(and hence DLLs) are found during compile time. Check in
|
||||
gtkfontchooserwidget.c that the `#pragma comment(lib, "harfbuzz")` line
|
||||
to ensure that you have your HarfBuzz .lib file named as such, which
|
||||
is the default .lib name for HarfBuzz builds.
|
||||
|
||||
Alternatively, they can be manually enabled by making sure that
|
||||
`HAVE_HARFBUZZ` and `HAVE_PANGOFT2` are defined in config.h.win32,
|
||||
meaning that PangoFT2 must be present, which depends on HarfBuzz,
|
||||
FontConfig and FreeType. You will then need to add to the `gtk3`
|
||||
projects the .lib's of PangoFT2, HarfBuzz and FreeType in the
|
||||
"Additional Libraries" entry under the linker settings.
|
||||
|
||||
Please note that the font features demo is not built into gtk3-demo
|
||||
by default. To do that, run in a Visual Studio command prompt, go to
|
||||
$(srcroot)\win32, and run
|
||||
"nmake /f generate-msvc.mak regenerate-demos-h-win32 FONT_FEATURES_DEMO=1".
|
||||
To undo that, run that command without "FONT_FEATURES_DEMO=1". Python 3.x must
|
||||
be present in your PATH or passed in via PYTHON=<path_to_python_interpreter>.
|
||||
If you are building the font features demo with the older PangoFT2-style
|
||||
(i.e. pre-Pango-1.44.x and pre-HarfBuzz-2.2.0) support, pass in
|
||||
"FONT_FEATURES_USE_PANGOFT2=1" in addition to "FONT_FEATURES_DEMO=1" in the
|
||||
NMake command line. The gtk3-demo project files will also be updated with the
|
||||
appropriate dependent libraries linked in-please check that the project settings
|
||||
contain the correct .lib file names for your system, as they assume the most
|
||||
common names are used there.
|
||||
|
||||
=========================
|
||||
Building the translations
|
||||
=========================
|
||||
Building translations is supported via Meson builds or via the Visual Studio projects,
|
||||
both of which require a working msgfmt.exe (from gettext-tools, a part of gettext) in the
|
||||
PATH, or for the Visual Studio projects, passed into the arguments in "InstallBuildsBase"
|
||||
in gtk3-build-defines.[props|vsprops] with MSGFMT=xxx. For the Visual Studio projects, for
|
||||
this to work one needs to also supply a "INSTALL_TRANSLATIONS=1" (without the quotes)
|
||||
argument to the same "InstallBuildsBase" in the afore-mentioned property sheet. Using
|
||||
msgfmt.exe from Cygwin or MSYS2 is supported as well.
|
@@ -1,59 +0,0 @@
|
||||
# NMake Makefile portion for generating Visual Studio
|
||||
# projects and the other related items from a GIT checkout.
|
||||
# Items in here should not need to be edited unless
|
||||
# one is maintaining the NMake build files.
|
||||
|
||||
!ifndef PYTHON
|
||||
PYTHON=python
|
||||
!endif
|
||||
!ifndef PERL
|
||||
PERL=perl
|
||||
!endif
|
||||
|
||||
NMAKE_ARGS = PYTHON=$(PYTHON) PERL=$(PERL)
|
||||
!ifdef USE_EGL
|
||||
NMAKE_ARGS = $(NMAKE_ARGS) USE_EGL=$(USE_EGL)
|
||||
!endif
|
||||
!ifdef FONT_FEATURES_DEMO
|
||||
NMAKE_ARGS = $(NMAKE_ARGS) FONT_FEATURES_DEMO=$(FONT_FEATURES_DEMO)
|
||||
!endif
|
||||
!ifdef FONT_FEATURES_USE_PANGOFT2
|
||||
NMAKE_ARGS = $(NMAKE_ARGS) FONT_FEATURES_USE_PANGOFT2=$(FONT_FEATURES_USE_PANGOFT2)
|
||||
!endif
|
||||
|
||||
GENERATED_ITEMS = \
|
||||
config-msvc.mak \
|
||||
..\config.h.win32 \
|
||||
vs9\gtk3-version-paths.vsprops \
|
||||
vs1x-props\gtk3-version-paths.props
|
||||
|
||||
all: bootstrap-msvc-projects
|
||||
|
||||
config-msvc.mak: config-msvc.mak.in ..\configure.ac gen-version-items.py
|
||||
..\config.h.win32: ..\config.h.win32.in ..\configure.ac gen-version-items.py
|
||||
vs9\gtk3-version-paths.vsprops: vs9\gtk3-version-paths.vsprops.in ..\configure.ac gen-version-items.py
|
||||
vs1x-props\gtk3-version-paths.props: vs1x-props\gtk3-version-paths.props.in ..\configure.ac gen-version-items.py
|
||||
|
||||
config-msvc.mak \
|
||||
..\config.h.win32 \
|
||||
vs9\gtk3-version-paths.vsprops \
|
||||
vs1x-props\gtk3-version-paths.props:
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) .\gen-version-items.py --source=$@.in -o=$@
|
||||
|
||||
bootstrap-msvc-projects: $(GENERATED_ITEMS)
|
||||
$(MAKE) /f generate-msvc.mak $(NMAKE_ARGS) generate-broadway-items regenerate-all-msvc-projs
|
||||
|
||||
clean:
|
||||
@-for %%v in (11 12 14 15 16 17) do @for %%x in (sln vcxproj vcxproj.filters) do @del vs%%v\*.%%x
|
||||
@for %%x in (vcxproj vcxproj.filters) do @for %%f in (vs10\*.%%x) do @if exist %%fin del %%f
|
||||
@for %%x in (vcxproj vcxproj.filters) do @for %%f in (vs10\*.%%x) do @if exist %%fin del %%f
|
||||
@for %%x in (vcproj) do @for %%f in (vs9\*.%%x) do @if exist %%fin del %%f
|
||||
@-del ..\gdk\broadway\broadwayjs.h ..\gdk\broadway\clienthtml.h
|
||||
@-del ..\config.h.win32 config-msvc.mak
|
||||
@-del vs9\gtk3-version-paths.vsprops
|
||||
@-del vs1x-props\gtk3-version-paths.props
|
||||
@-for %%v in (9 10 11 12 14 15 16 17) do for %%d in (Debug Release Debug_Broadway Release_Broadway .vs) do rmdir /s/q vs%%v\%%d
|
||||
@-rmdir /s/q __pycache__
|
||||
@-del ..\gdk-*-build
|
||||
@-for %%v in (9 10 11 12 14 15 16 17) do for %%f in (vs%%v\*.user vs%%v\gtk+.vc.db vs%%v\gtk+.suo) do del /f %%f
|
@@ -46,14 +46,6 @@ GLIB_COMPILE_SCHEMAS = $(PREFIX)\bin\glib-compile-schemas.exe
|
||||
MSGFMT = msgfmt
|
||||
!endif
|
||||
|
||||
!ifndef INCLUDEDIR
|
||||
INCLUDEDIR=$(PREFIX)\include
|
||||
!endif
|
||||
|
||||
!ifndef LIBDIR
|
||||
LIBDIR=$(PREFIX)\lib
|
||||
!endif
|
||||
|
||||
!if "$(PLAT)" == "x64"
|
||||
AT_PLAT=x86_64
|
||||
!elseif "$(PLAT)" == "arm64"
|
||||
@@ -65,10 +57,6 @@ AT_PLAT=unknown
|
||||
!endif
|
||||
|
||||
demo_sources = $(demos_base)
|
||||
more_demo_sources = \
|
||||
..\demos\gtk-demo\gtkfishbowl.c \
|
||||
..\demos\gtk-demo\main.c
|
||||
|
||||
!ifdef FONT_FEATURES_DEMO
|
||||
demo_sources = $(demo_sources) $(font_features_demo)
|
||||
!endif
|
||||
@@ -93,15 +81,15 @@ GTK_PREPROCESSOR_FLAGS = \
|
||||
/I.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3 \
|
||||
/I.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3 \
|
||||
/I.. \
|
||||
/I$(INCLUDEDIR)\gdk-pixbuf-2.0 \
|
||||
/I$(INCLUDEDIR)\pango-1.0 \
|
||||
/I$(INCLUDEDIR)\atk-1.0 \
|
||||
/I$(INCLUDEDIR)\harfbuzz \
|
||||
/I$(INCLUDEDIR)\cairo \
|
||||
/I$(INCLUDEDIR)\gio-win32-2.0 \
|
||||
/I$(INCLUDEDIR)\glib-2.0 \
|
||||
/I$(LIBDIR)\glib-2.0\include \
|
||||
/I$(INCLUDEDIR) \
|
||||
/I$(PREFIX)\include\gdk-pixbuf-2.0 \
|
||||
/I$(PREFIX)\include\pango-1.0 \
|
||||
/I$(PREFIX)\include\atk-1.0 \
|
||||
/I$(PREFIX)\include\harfbuzz \
|
||||
/I$(PREFIX)\include\cairo \
|
||||
/I$(PREFIX)\include\gio-win32-2.0 \
|
||||
/I$(PREFIX)\include\glib-2.0 \
|
||||
/I$(PREFIX)\lib\glib-2.0\include \
|
||||
/I$(PREFIX)\include \
|
||||
/DHAVE_CONFIG_H \
|
||||
/DG_DISABLE_SINGLE_INCLUDES \
|
||||
/DATK_DISABLE_SINGLE_INCLUDES \
|
||||
@@ -134,3 +122,10 @@ GTK_PREPROCESSOR_FLAGS = \
|
||||
/DGTK_BINARY_VERSION=\"3.0.0\" \
|
||||
/DGDK_DISABLE_DEPRECATED \
|
||||
/DISOLATION_AWARE_ENABLED
|
||||
|
||||
DEMO_VS9_PROJ = gtk3-demo.vcproj
|
||||
DEMO_VS1X_PROJ = $(DEMO_VS9_PROJ:.vcproj=.vcxproj)
|
||||
DEMO_VS1X_PROJ_FILTERS = $(DEMO_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
DEMO_DEP_LIBS_NEW_PANGO=harfbuzz.lib
|
||||
DEMO_DEP_LIBS_PANGOFT2_VS1X=pangoft2-1.0.lib;harfbuzz.lib;freetype.lib
|
||||
DEMO_DEP_LIBS_PANGOFT2_VS9=$(DEMO_DEP_LIBS_PANGOFT2_VS1X:;= )
|
||||
|
@@ -66,15 +66,6 @@ NULL=
|
||||
!if [call create-lists.bat footer gdk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gdk_sources_msvc$(VSVER)_$(PLAT).mak GDK_WIN32_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(libgdk_win32_la_SOURCES)) do @if "%~xf" == ".c" call create-lists.bat file gdk_sources_msvc$(VSVER)_$(PLAT).mak ..\gdk\win32\%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gdk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gdk_sources_msvc$(VSVER)_$(PLAT).mak GDK_WIN32_INTROSPECTION_SRCS]
|
||||
!endif
|
||||
|
||||
@@ -87,24 +78,6 @@ NULL=
|
||||
# For GDK-Broadway public headers
|
||||
!include ..\gdk\broadway\gdk-broadway-sources.inc
|
||||
|
||||
!if [call create-lists.bat header gdk_sources_msvc$(VSVER)_$(PLAT).mak GDK_BROADWAY_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(GDK_BROADWAY_NON_GENERATED_SOURCES)) do @if "%~xf" == ".c" call create-lists.bat file gdk_sources_msvc$(VSVER)_$(PLAT).mak ..\gdk\broadway\%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gdk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gdk_sources_msvc$(VSVER)_$(PLAT).mak BROADWAYD_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(broadwayd_SOURCES)) do @if "%~xf" == ".c" call create-lists.bat file gdk_sources_msvc$(VSVER)_$(PLAT).mak ..\gdk\broadway\%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gdk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!include gdk_sources_msvc$(VSVER)_$(PLAT).mak
|
||||
|
||||
!if [del /f /q gdk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
@@ -130,9 +103,6 @@ NULL=
|
||||
!include ..\gtk\deprecated\Makefile.inc
|
||||
!include ..\gtk\inspector\Makefile.inc
|
||||
|
||||
# For the libgail-util public headers
|
||||
!include ..\libgail-util\libgail-util-sources.inc
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_PUBLIC_ENUM_HEADERS]
|
||||
!endif
|
||||
|
||||
@@ -163,68 +133,32 @@ NULL=
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_MISC_C_SRCS]
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(a11y_c_sources) $(gtk_deprecated_c_sources) $(inspector_c_sources)) do @call create-lists.bat file gtk_sources_msvc$(VSVER)_$(PLAT).mak ../gtk/%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_C_SRCS_A_H]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(gtk_base_c_sources_base_gtka_gtkh:.c=)) do @call create-lists.bat file gtk_sources_msvc$(VSVER)_$(PLAT).mak ../gtk/%f.c]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_C_SRCS_I_W]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(gtk_base_c_sources_base_gtki_gtkw:.c=)) do @call create-lists.bat file gtk_sources_msvc$(VSVER)_$(PLAT).mak ../gtk/%f.c]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_OS_WIN32_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(gtk_os_win32_c_sources)) do @call create-lists.bat file gtk_sources_msvc$(VSVER)_$(PLAT).mak ../gtk/%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [echo GTK_C_SRCS = ^$(GTK_MISC_C_SRCS) ^$(GTK_C_SRCS_A_H) ^$(GTK_C_SRCS_I_W) ^$(GTK_OS_WIN32_C_SRCS)>>gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GTK_MORE_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(gtk_use_win32_c_sources) $(gtk_clipboard_dnd_c_sources_generic)) do @call create-lists.bat file gtk_sources_msvc$(VSVER)_$(PLAT).mak ..\gtk\%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat header gtk_sources_msvc$(VSVER)_$(PLAT).mak GAILUTIL_C_SRCS]
|
||||
!endif
|
||||
|
||||
!if [for %f in ($(util_c_sources)) do @call create-lists.bat file gtk_sources_msvc$(VSVER)_$(PLAT).mak ..\libgail-util\%f]
|
||||
!endif
|
||||
|
||||
!if [call create-lists.bat footer gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
!include gtk_sources_msvc$(VSVER)_$(PLAT).mak
|
||||
|
||||
!if [del /f /q gtk_sources_msvc$(VSVER)_$(PLAT).mak]
|
||||
!endif
|
||||
|
||||
# For the libgail-util public headers
|
||||
!include ..\libgail-util\libgail-util-sources.inc
|
||||
|
||||
# For GTK resources
|
||||
|
||||
!if [for %f in ($(adwaita_theme_css_sources:/=\)) do @call create-lists.bat file resource_sources_msvc$(VSVER)_$(PLAT).mak ..\gtk\%f]
|
||||
|
@@ -5,72 +5,39 @@
|
||||
# Author: Fan, Chun-wei
|
||||
# Date: July 25, 2019
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
from replace import replace_multi, replace
|
||||
|
||||
def get_srcroot():
|
||||
if not os.path.isabs(__file__):
|
||||
path = os.path.abspath(__file__)
|
||||
else:
|
||||
path = __file__
|
||||
dirname = os.path.dirname(path)
|
||||
return os.path.abspath(os.path.join(dirname, '..'))
|
||||
|
||||
def get_version(srcroot):
|
||||
ver = {}
|
||||
RE_VERSION = re.compile(r'^m4_define\(\[(gtk_\w+)\],\s*\[(\d+)\]\)')
|
||||
with open(os.path.join(srcroot, 'configure.ac'), 'r') as ac:
|
||||
for i in ac:
|
||||
mo = RE_VERSION.search(i)
|
||||
if mo:
|
||||
ver[mo.group(1).upper()] = int(mo.group(2))
|
||||
ver['GTK_VERSION'] = '%d.%d.%d' % (ver['GTK_MAJOR_VERSION'],
|
||||
ver['GTK_MINOR_VERSION'],
|
||||
ver['GTK_MICRO_VERSION'])
|
||||
return ver
|
||||
|
||||
def main(argv):
|
||||
srcdir = os.path.dirname(__file__)
|
||||
top_srcdir = os.path.join(srcdir, os.pardir)
|
||||
parser = argparse.ArgumentParser(description='Generate various items with version info')
|
||||
parser.add_argument('--version', help='Version of the package')
|
||||
parser.add_argument('--interface-age', help='Interface age of the package')
|
||||
parser.add_argument('--version', help='Version of the package',
|
||||
required=True)
|
||||
parser.add_argument('--interface-age', help='Interface age of the package',
|
||||
required=True)
|
||||
parser.add_argument('--source', help='Source file template to process',
|
||||
required=True)
|
||||
parser.add_argument('--output', '-o', help='Output generated file location',
|
||||
required=True)
|
||||
args = parser.parse_args()
|
||||
version_info = get_version(get_srcroot())
|
||||
|
||||
# If version and/or interface-age were specified, use them,
|
||||
# otherwise use the info we have from configure.ac.
|
||||
if args.version is not None:
|
||||
gtk_version = args.version
|
||||
else:
|
||||
gtk_version = version_info['GTK_VERSION']
|
||||
if args.interface_age is not None:
|
||||
interface_age = args.interface_age
|
||||
else:
|
||||
interface_age = version_info['GTK_INTERFACE_AGE']
|
||||
|
||||
version_parts = gtk_version.split('.')
|
||||
gdk_sourcedir = os.path.join(top_srcdir, 'gdk')
|
||||
version_parts = args.version.split('.')
|
||||
# (100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)
|
||||
binary_age = (int(version_parts[1]) * 100) + int(version_parts[2])
|
||||
lt_current = (int(version_parts[1]) * 100) + int(version_parts[2]) - int(interface_age)
|
||||
lt_age = binary_age - int(interface_age)
|
||||
lt_current = (int(version_parts[1]) * 100) + int(version_parts[2]) - int(args.interface_age)
|
||||
lt_age = binary_age - int(args.interface_age)
|
||||
|
||||
version_info_replace_items = {'@GTK_MAJOR_VERSION@': version_parts[0],
|
||||
'@GTK_MINOR_VERSION@': version_parts[1],
|
||||
'@GTK_MICRO_VERSION@': version_parts[2],
|
||||
'@GTK_API_VERSION@': '3.0',
|
||||
'@GTK_VERSION@': gtk_version,
|
||||
'@GTK_VERSION@': args.version,
|
||||
'@GTK_BINARY_AGE@': str(binary_age),
|
||||
'@GTK_INTERFACE_AGE@': str(interface_age),
|
||||
'@GETTEXT_PACKAGE@': 'gtk30',
|
||||
'@GTK_INTERFACE_AGE@': args.interface_age,
|
||||
'@LT_CURRENT_MINUS_AGE@': str(lt_current - lt_age)}
|
||||
|
||||
replace_multi(args.source, args.output, version_info_replace_items)
|
||||
|
@@ -6,7 +6,6 @@
|
||||
!include config-msvc.mak
|
||||
!include ../demos/gtk-demo/demos-sources.mak
|
||||
!include create-lists-msvc.mak
|
||||
!include generate-msvcprojs.mak
|
||||
|
||||
# Copy the pre-defined gdkconfig.h.[win32|win32_broadway]
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "Release"
|
||||
@@ -59,6 +58,28 @@ GTK_GENERATED_SOURCES = \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtkresources.c \
|
||||
$(GTK_VERSION_H)
|
||||
|
||||
GTK3_DEMO_VC1X_PROJS = \
|
||||
vs10\$(DEMO_VS1X_PROJ) \
|
||||
vs11\$(DEMO_VS1X_PROJ) \
|
||||
vs12\$(DEMO_VS1X_PROJ) \
|
||||
vs14\$(DEMO_VS1X_PROJ) \
|
||||
vs15\$(DEMO_VS1X_PROJ) \
|
||||
vs16\$(DEMO_VS1X_PROJ) \
|
||||
vs17\$(DEMO_VS1X_PROJ)
|
||||
|
||||
GTK3_DEMO_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_DEMO_VCPROJS = \
|
||||
vs9\$(DEMO_VS9_PROJ) \
|
||||
$(GTK3_DEMO_VC1X_PROJS) \
|
||||
$(GTK3_DEMO_VC1X_PROJ_FILTERS)
|
||||
|
||||
EMOJI_GRESOURCE_XML = \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\de.gresource.xml \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\es.gresource.xml \
|
||||
@@ -121,19 +142,6 @@ generate-base-sources: \
|
||||
@$(PYTHON) $(GLIB_MKENUMS) --template $(@F).template $(gdk_public_h_sources) $(gdk_deprecated_h_sources) > ..\win32\$@
|
||||
@cd ..\win32
|
||||
|
||||
# Generate the private headers needed for broadway-server.c
|
||||
generate-broadway-items: ..\gdk\broadway\clienthtml.h ..\gdk\broadway\broadwayjs.h
|
||||
|
||||
..\gdk\broadway\clienthtml.h: ..\gdk\broadway\client.html
|
||||
@echo Generating $@...
|
||||
@$(PERL) ..\gdk\broadway\toarray.pl client_html $**>$@
|
||||
|
||||
..\gdk\broadway\broadwayjs.h: \
|
||||
..\gdk\broadway\broadway.js \
|
||||
..\gdk\broadway\rawinflate.min.js
|
||||
@echo Generating $@...
|
||||
@$(PERL) ..\gdk\broadway\toarray.pl broadway_js $**>$@
|
||||
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypebuiltins.h \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypebuiltins.c:
|
||||
@echo Generating $@...
|
||||
@@ -299,6 +307,120 @@ generate-broadway-items: ..\gdk\broadway\clienthtml.h ..\gdk\broadway\broadwayjs
|
||||
@$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=..\demos\widget-factory \
|
||||
--generate-source ..\demos\widget-factory\widget-factory.gresource.xml
|
||||
|
||||
gtk3-demo.sourcefiles: $(demo_actual_sources)
|
||||
@-del vs9\$(DEMO_VS9_PROJ)
|
||||
@for %%s in ($**) do @echo. ^<File RelativePath^="..\%%s" /^>>>$@
|
||||
@for %%s in (gtkfishbowl.c main.c) do @echo. ^<File RelativePath^="..\..\demos\gtk-demo\%%s" /^>>>$@
|
||||
|
||||
gtk3-demo.vs10.sourcefiles: $(demo_actual_sources)
|
||||
@-del vs10\$(DEMO_VS1X_PROJ)
|
||||
@for %%s in ($**) do @echo. ^<ClCompile Include^="..\%%s" /^>>>$@
|
||||
@for %%s in (gtkfishbowl.c main.c) do @echo. ^<ClCompile Include^="..\..\demos\gtk-demo\%%s" /^>>>$@
|
||||
|
||||
gtk3-demo.vs10.sourcefiles.filters: $(demo_actual_sources)
|
||||
@-del vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
@for %%s in ($**) do @echo. ^<ClCompile Include^="..\%%s"^>^<Filter^>Source Files^</Filter^>^</ClCompile^>>>$@
|
||||
@for %%s in (gtkfishbowl.c main.c) do @echo. ^<ClCompile Include^="..\..\demos\gtk-demo\%%s"^>^<Filter^>Source Files^</Filter^>^</ClCompile^>>>$@
|
||||
|
||||
vs9\$(DEMO_VS9_PROJ).pre: gtk3-demo.sourcefiles vs9\$(DEMO_VS9_PROJ)in
|
||||
vs10\$(DEMO_VS1X_PROJ).pre: gtk3-demo.vs10.sourcefiles vs10\$(DEMO_VS1X_PROJ)in
|
||||
vs10\$(DEMO_VS1X_PROJ_FILTERS): gtk3-demo.vs10.sourcefiles.filters vs10\$(DEMO_VS1X_PROJ_FILTERS)in
|
||||
|
||||
vs9\$(DEMO_VS9_PROJ).pre vs10\$(DEMO_VS1X_PROJ).pre vs10\$(DEMO_VS1X_PROJ_FILTERS):
|
||||
@$(CPP) /nologo /EP /I. $(@:.pre=)in>$(@F:.pre=).tmp
|
||||
@for /f "usebackq tokens=* delims=" %%l in ($(@F:.pre=).tmp) do @echo %%l>>$@
|
||||
@-del $(@F:.pre=).tmp
|
||||
@-if "$@" == "vs9\$(DEMO_VS9_PROJ).pre" del gtk3-demo.sourcefiles
|
||||
@-if "$@" == "vs10\$(DEMO_VS1X_PROJ).pre" del gtk3-demo.vs10.sourcefiles
|
||||
@-if "$@" == "vs10\$(DEMO_VS1X_PROJ_FILTERS)" del gtk3-demo.vs10.sourcefiles.filters
|
||||
|
||||
!ifdef FONT_FEATURES_DEMO
|
||||
!ifdef FONT_FEATURES_USE_PANGOFT2
|
||||
vs9\$(DEMO_VS9_PROJ): vs9\$(DEMO_VS9_PROJ).pre
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="AdditionalDependencies=\"\"" \
|
||||
--outstring="AdditionalDependencies=\"$(DEMO_DEP_LIBS_PANGOFT2_VS9)\""
|
||||
@-del $**
|
||||
|
||||
vs10\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ).pre
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=">%(AdditionalDependencies)<" \
|
||||
--outstring=">$(DEMO_DEP_LIBS_PANGOFT2_VS1X);%(AdditionalDependencies)<"
|
||||
@-del $**
|
||||
!else
|
||||
vs9\$(DEMO_VS9_PROJ): vs9\$(DEMO_VS9_PROJ).pre
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="AdditionalDependencies=\"\"" \
|
||||
--outstring="AdditionalDependencies=\"$(DEMO_DEP_LIBS_NEW_PANGO)\""
|
||||
@-del $**
|
||||
|
||||
vs10\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ).pre
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=">%(AdditionalDependencies)<" \
|
||||
--outstring=">$(DEMO_DEP_LIBS_NEW_PANGO);%(AdditionalDependencies)<"
|
||||
@-del $**
|
||||
!endif
|
||||
!else
|
||||
vs9\$(DEMO_VS9_PROJ): vs9\$(DEMO_VS9_PROJ).pre
|
||||
vs10\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ).pre
|
||||
|
||||
vs9\$(DEMO_VS9_PROJ) vs10\$(DEMO_VS1X_PROJ):
|
||||
@echo Renaming $** to $@...
|
||||
@move $** $@
|
||||
!endif
|
||||
|
||||
vs11\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ)
|
||||
vs12\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ)
|
||||
vs14\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ)
|
||||
vs15\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ)
|
||||
vs16\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ)
|
||||
vs17\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ)
|
||||
|
||||
vs11\$(DEMO_VS1X_PROJ_FILTERS): vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
vs12\$(DEMO_VS1X_PROJ_FILTERS): vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
vs14\$(DEMO_VS1X_PROJ_FILTERS): vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
vs15\$(DEMO_VS1X_PROJ_FILTERS): vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
vs16\$(DEMO_VS1X_PROJ_FILTERS): vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
vs17\$(DEMO_VS1X_PROJ_FILTERS): vs10\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
|
||||
vs11\$(DEMO_VS1X_PROJ):
|
||||
@echo Copying and updating $** for VS2012
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ --instring=">v100<" --outstring=">v110<"
|
||||
|
||||
vs12\$(DEMO_VS1X_PROJ):
|
||||
@echo Copying and updating $** for VS2013
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ --instring=">v100<" --outstring=">v120<"
|
||||
|
||||
vs14\$(DEMO_VS1X_PROJ):
|
||||
@echo Copying and updating $** for VS2015
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ --instring=">v100<" --outstring=">v140<"
|
||||
|
||||
vs15\$(DEMO_VS1X_PROJ):
|
||||
@echo Copying and updating $** for VS2017
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ --instring=">v100<" --outstring=">v141<"
|
||||
|
||||
vs16\$(DEMO_VS1X_PROJ):
|
||||
@echo Copying and updating $** for VS2019
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ --instring=">v100<" --outstring=">v142<"
|
||||
|
||||
vs17\$(DEMO_VS1X_PROJ):
|
||||
@echo Copying and updating $** for VS2022
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ --instring=">v100<" --outstring=">v143<"
|
||||
|
||||
# VS2012+ .vcxproj.filters: We simply copy the VS2010 ones
|
||||
vs11\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(DEMO_VS1X_PROJ_FILTERS):
|
||||
@echo Copying $** to $@...
|
||||
@copy $** $@
|
||||
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\de.gresource.xml: ..\gtk\emoji\gresource.xml.in
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\es.gresource.xml: ..\gtk\emoji\gresource.xml.in
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\fr.gresource.xml: ..\gtk\emoji\gresource.xml.in
|
||||
@@ -318,35 +440,13 @@ $(EMOJI_GRESOURCE):
|
||||
@echo Generating $@...
|
||||
@$(GLIB_COMPILE_RESOURCES) --sourcedir=..\gtk\emoji $@.xml --target=$@
|
||||
|
||||
regenerate-demos-h-win32: ..\demos\gtk-demo\geninclude.py $(demo_actual_sources) regenerate-demos-h-win32-msg $(GTK3_DEMO_VCPROJS)
|
||||
regenerate-demos-h-win32: ..\demos\gtk-demo\geninclude.py $(demo_actual_sources) $(GTK3_DEMO_VCPROJS)
|
||||
@echo Regenerating demos.h.win32 and gtk3-demo VS project files...
|
||||
@-del ..\demos\gtk-demo\demos.h.win32
|
||||
@cd ..\demos\gtk-demo
|
||||
@$(PYTHON) geninclude.py demos.h.win32 $(demo_sources)
|
||||
@cd ..\..\win32
|
||||
|
||||
..\po\gtk30.pot: ..\gtk\gtkbuilder.its
|
||||
$(XGETTEXT) --default-domain="$(@B)" \
|
||||
--copyright-holder="GTK+ Team and others. See AUTHORS" \
|
||||
--package-name="gtk+" \
|
||||
--package-version="$(GTK_VERSION)" \
|
||||
--msgid-bugs-address="https://gitlab.gnome.org/GNOME/gtk/-/issues/" \
|
||||
--directory=".." \
|
||||
--add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_ \
|
||||
--keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments \
|
||||
--files-from="$(@D:\=/)/POTFILES.in" --output=$(@F)
|
||||
@move $(@F) $@
|
||||
|
||||
..\po-properties\gtk30-properties.pot:
|
||||
$(XGETTEXT) --default-domain="$(@B)" \
|
||||
--copyright-holder="GTK+ Team and others. See AUTHORS" \
|
||||
--package-name="gtk+" \
|
||||
--package-version="$(GTK_VERSION)" \
|
||||
--msgid-bugs-address="https://gitlab.gnome.org/GNOME/gtk/-/issues/" \
|
||||
--directory=".." \
|
||||
--from-code=UTF-8 --keyword --keyword=P_ --add-comments \
|
||||
--files-from="$(@D:\=/)/POTFILES.in"
|
||||
@move $(@B).po $@
|
||||
|
||||
# Remove the generated files
|
||||
clean:
|
||||
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gresource
|
||||
|
@@ -1,616 +0,0 @@
|
||||
# NMake Makefile portion for (re-)generating Visual Studio
|
||||
# projects. Items in here should not need to be edited unless
|
||||
# one is maintaining the NMake build files.
|
||||
|
||||
|
||||
GTK3_VS10_STATIC_PROJS = \
|
||||
vs10\gtk+.sln \
|
||||
vs10\gtk-builder-tool.vcxproj \
|
||||
vs10\gtk-encode-symbolic-svg.vcxproj \
|
||||
vs10\gtk-query-settings.vcxproj \
|
||||
vs10\gtk-update-icon-cache.vcxproj \
|
||||
vs10\gtk3-demo-application.vcxproj \
|
||||
vs10\gtk3-icon-browser.vcxproj \
|
||||
vs10\gtk3-install.vcxproj \
|
||||
vs10\gtk3-introspect.vcxproj \
|
||||
vs10\gtk3-prebuild.vcxproj \
|
||||
vs10\gtk3-widget-factory.vcxproj \
|
||||
vs10\gtk-builder-tool.vcxproj.filters \
|
||||
vs10\gtk-encode-symbolic-svg.vcxproj.filters \
|
||||
vs10\gtk-query-settings.vcxproj.filters \
|
||||
vs10\gtk-update-icon-cache.vcxproj.filters \
|
||||
vs10\gtk3-demo-application.vcxproj.filters \
|
||||
vs10\gtk3-icon-browser.vcxproj.filters \
|
||||
vs10\gtk3-widget-factory.vcxproj.filters
|
||||
|
||||
GTK3_VS11_STATIC_PROJS = $(GTK3_VS10_STATIC_PROJS:vs10\=vs11\)
|
||||
GTK3_VS12_STATIC_PROJS = $(GTK3_VS10_STATIC_PROJS:vs10\=vs12\)
|
||||
GTK3_VS14_STATIC_PROJS = $(GTK3_VS10_STATIC_PROJS:vs10\=vs14\)
|
||||
GTK3_VS15_STATIC_PROJS = $(GTK3_VS10_STATIC_PROJS:vs10\=vs15\)
|
||||
GTK3_VS16_STATIC_PROJS = $(GTK3_VS10_STATIC_PROJS:vs10\=vs16\)
|
||||
GTK3_VS17_STATIC_PROJS = $(GTK3_VS10_STATIC_PROJS:vs10\=vs17\)
|
||||
|
||||
GDK_VS9_PROJ = gdk-3.vcproj
|
||||
GDKWIN32_VS9_PROJ = gdk3-win32.vcproj
|
||||
GDKBROADWAY_VS9_PROJ = $(GDKWIN32_VS9_PROJ:-win32=-broadway)
|
||||
GTK_VS9_PROJ = gtk-3.vcproj
|
||||
GAILUTIL_VS9_PROJ = gailutil-3.vcproj
|
||||
BROADWAYD_VS9_PROJ = broadwayd.vcproj
|
||||
DEMO_VS9_PROJ = gtk3-demo.vcproj
|
||||
|
||||
GDK_VS1X_PROJ = $(GDK_VS9_PROJ:.vcproj=.vcxproj)
|
||||
GDKWIN32_VS1X_PROJ = $(GDKWIN32_VS9_PROJ:.vcproj=.vcxproj)
|
||||
GDKBROADWAY_VS1X_PROJ = $(GDKBROADWAY_VS9_PROJ:.vcproj=.vcxproj)
|
||||
GTK_VS1X_PROJ = $(GTK_VS9_PROJ:.vcproj=.vcxproj)
|
||||
GAILUTIL_VS1X_PROJ = $(GAILUTIL_VS9_PROJ:.vcproj=.vcxproj)
|
||||
BROADWAYD_VS1X_PROJ = $(BROADWAYD_VS9_PROJ:.vcproj=.vcxproj)
|
||||
DEMO_VS1X_PROJ = $(DEMO_VS9_PROJ:.vcproj=.vcxproj)
|
||||
|
||||
GDK_VS1X_PROJ_FILTERS = $(GDK_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
GDKWIN32_VS1X_PROJ_FILTERS = $(GDKWIN32_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
GDKBROADWAY_VS1X_PROJ_FILTERS = $(GDKBROADWAY_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
GTK_VS1X_PROJ_FILTERS = $(GTK_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
GAILUTIL_VS1X_PROJ_FILTERS = $(GAILUTIL_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
BROADWAYD_VS1X_PROJ_FILTERS = $(BROADWAYD_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
DEMO_VS1X_PROJ_FILTERS = $(DEMO_VS9_PROJ:.vcproj=.vcxproj.filters)
|
||||
|
||||
GTK3_GDK_VC1X_PROJS = \
|
||||
vs10\$(GDK_VS1X_PROJ) \
|
||||
vs11\$(GDK_VS1X_PROJ) \
|
||||
vs12\$(GDK_VS1X_PROJ) \
|
||||
vs14\$(GDK_VS1X_PROJ) \
|
||||
vs15\$(GDK_VS1X_PROJ) \
|
||||
vs16\$(GDK_VS1X_PROJ) \
|
||||
vs17\$(GDK_VS1X_PROJ)
|
||||
|
||||
GTK3_GDK_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(GDK_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(GDK_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(GDK_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(GDK_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(GDK_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(GDK_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GDK_WIN32_VC1X_PROJS = \
|
||||
vs10\$(GDKWIN32_VS1X_PROJ) \
|
||||
vs11\$(GDKWIN32_VS1X_PROJ) \
|
||||
vs12\$(GDKWIN32_VS1X_PROJ) \
|
||||
vs14\$(GDKWIN32_VS1X_PROJ) \
|
||||
vs15\$(GDKWIN32_VS1X_PROJ) \
|
||||
vs16\$(GDKWIN32_VS1X_PROJ) \
|
||||
vs17\$(GDKWIN32_VS1X_PROJ)
|
||||
|
||||
GTK3_GDK_WIN32_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(GDKWIN32_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(GDKWIN32_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(GDKWIN32_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(GDKWIN32_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(GDKWIN32_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(GDKWIN32_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GDK_BROADWAY_VC1X_PROJS = \
|
||||
vs10\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs11\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs12\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs14\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs15\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs16\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs17\$(GDKBROADWAY_VS1X_PROJ)
|
||||
|
||||
GTK3_GDK_BROADWAY_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(GDKBROADWAY_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(GDKBROADWAY_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(GDKBROADWAY_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(GDKBROADWAY_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(GDKBROADWAY_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(GDKBROADWAY_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GTK_VC1X_PROJS = \
|
||||
vs10\$(GTK_VS1X_PROJ) \
|
||||
vs11\$(GTK_VS1X_PROJ) \
|
||||
vs12\$(GTK_VS1X_PROJ) \
|
||||
vs14\$(GTK_VS1X_PROJ) \
|
||||
vs15\$(GTK_VS1X_PROJ) \
|
||||
vs16\$(GTK_VS1X_PROJ) \
|
||||
vs17\$(GTK_VS1X_PROJ)
|
||||
|
||||
GTK3_GTK_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(GTK_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(GTK_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(GTK_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(GTK_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(GTK_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(GTK_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GAILUTIL_VC1X_PROJS = \
|
||||
vs10\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs11\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs12\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs14\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs15\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs16\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs17\$(GAILUTIL_VS1X_PROJ)
|
||||
|
||||
GTK3_GAILUTIL_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(GAILUTIL_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(GAILUTIL_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(GAILUTIL_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(GAILUTIL_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(GAILUTIL_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(GAILUTIL_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_BROADWAYD_VC1X_PROJS = \
|
||||
vs10\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs11\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs12\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs14\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs15\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs16\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs17\$(BROADWAYD_VS1X_PROJ)
|
||||
|
||||
GTK3_BROADWAYD_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(BROADWAYD_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(BROADWAYD_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(BROADWAYD_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(BROADWAYD_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(BROADWAYD_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(BROADWAYD_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_DEMO_VC1X_PROJS = \
|
||||
vs10\$(DEMO_VS1X_PROJ) \
|
||||
vs11\$(DEMO_VS1X_PROJ) \
|
||||
vs12\$(DEMO_VS1X_PROJ) \
|
||||
vs14\$(DEMO_VS1X_PROJ) \
|
||||
vs15\$(DEMO_VS1X_PROJ) \
|
||||
vs16\$(DEMO_VS1X_PROJ) \
|
||||
vs17\$(DEMO_VS1X_PROJ)
|
||||
|
||||
GTK3_DEMO_VC1X_PROJ_FILTERS = \
|
||||
vs11\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs12\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs14\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs15\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs16\$(DEMO_VS1X_PROJ_FILTERS) \
|
||||
vs17\$(DEMO_VS1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GDK_WIN32_VCPROJS = \
|
||||
vs9\$(GDKWIN32_VS9_PROJ) \
|
||||
$(GTK3_GDK_WIN32_VC1X_PROJS) \
|
||||
$(GTK3_GDK_WIN32_VC1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GDK_BROADWAY_VCPROJS = \
|
||||
vs9\$(GDKBROADWAY_VS9_PROJ) \
|
||||
$(GTK3_GDK_BROADWAY_VC1X_PROJS) \
|
||||
$(GTK3_GDK_BROADWAY_VC1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_BROADWAYD_VCPROJS = \
|
||||
vs9\$(BROADWAYD_VS9_PROJ) \
|
||||
$(GTK3_BROADWAYD_VC1X_PROJS) \
|
||||
$(GTK3_BROADWAYD_VC1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GDK_VCPROJS = \
|
||||
vs9\$(GDK_VS9_PROJ) \
|
||||
$(GTK3_GDK_VC1X_PROJS) \
|
||||
$(GTK3_GDK_VC1X_PROJ_FILTERS) \
|
||||
$(GTK3_GDK_WIN32_VCPROJS) \
|
||||
$(GTK3_GDK_BROADWAY_VCPROJS) \
|
||||
$(GTK3_BROADWAYD_VCPROJS)
|
||||
|
||||
GTK3_GTK_VCPROJS = \
|
||||
vs9\$(GTK_VS9_PROJ) \
|
||||
$(GTK3_GTK_VC1X_PROJS) \
|
||||
$(GTK3_GTK_VC1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_GAILUTIL_VCPROJS = \
|
||||
vs9\$(GAILUTIL_VS9_PROJ) \
|
||||
$(GTK3_GAILUTIL_VC1X_PROJS) \
|
||||
$(GTK3_GAILUTIL_VC1X_PROJ_FILTERS)
|
||||
|
||||
GTK3_DEMO_VCPROJS = \
|
||||
vs9\$(DEMO_VS9_PROJ) \
|
||||
$(GTK3_DEMO_VC1X_PROJS) \
|
||||
$(GTK3_DEMO_VC1X_PROJ_FILTERS)
|
||||
|
||||
DEMO_DEP_LIBS_NEW_PANGO=harfbuzz.lib
|
||||
DEMO_DEP_LIBS_PANGOFT2_VS1X=pangoft2-1.0.lib;harfbuzz.lib;freetype.lib
|
||||
DEMO_DEP_LIBS_PANGOFT2_VS9=$(DEMO_DEP_LIBS_PANGOFT2_VS1X:;= )
|
||||
|
||||
# (Re-) generate Visual Studio projects
|
||||
# Dependencies for library projects
|
||||
gdk-3.sourcefiles \
|
||||
gdk-3.vs10.sourcefiles \
|
||||
gdk-3.vs10.sourcefiles.filters: $(GDK_C_SRCS:/=\)
|
||||
|
||||
gdk3-win32.sourcefiles \
|
||||
gdk3-win32.vs10.sourcefiles \
|
||||
gdk3-win32.vs10.sourcefiles.filters: $(GDK_WIN32_C_SRCS)
|
||||
|
||||
gdk3-broadway.sourcefiles \
|
||||
gdk3-broadway.vs10.sourcefiles \
|
||||
gdk3-broadway.vs10.sourcefiles.filters: $(GDK_BROADWAY_C_SRCS)
|
||||
|
||||
# GTK projects-Darn the fatal error U1095...!
|
||||
gtk-3.misc.sourcefiles \
|
||||
gtk-3.misc.vs10.sourcefiles \
|
||||
gtk-3.misc.vs10.sourcefiles.filters: $(GTK_MISC_C_SRCS:/=\)
|
||||
|
||||
gtk-3.a-h.sourcefiles \
|
||||
gtk-3.a-h.vs10.sourcefiles \
|
||||
gtk-3.a-h.vs10.sourcefiles.filters: $(GTK_C_SRCS_A_H:/=\)
|
||||
|
||||
gtk-3.i-w.sourcefiles \
|
||||
gtk-3.i-w.vs10.sourcefiles \
|
||||
gtk-3.i-w.vs10.sourcefiles.filters: $(GTK_C_SRCS_I_W:/=\)
|
||||
|
||||
gtk-3.win32.sourcefiles \
|
||||
gtk-3.win32.vs10.sourcefiles \
|
||||
gtk-3.win32.vs10.sourcefiles.filters: $(GTK_OS_WIN32_C_SRCS:/=\) $(GTK_MORE_C_SRCS)
|
||||
|
||||
gtk-3.sourcefiles: \
|
||||
gtk-3.a-h.sourcefiles \
|
||||
gtk-3.i-w.sourcefiles \
|
||||
gtk-3.misc.sourcefiles \
|
||||
gtk-3.win32.sourcefiles
|
||||
|
||||
gtk-3.vs10.sourcefiles: \
|
||||
gtk-3.a-h.vs10.sourcefiles \
|
||||
gtk-3.i-w.vs10.sourcefiles \
|
||||
gtk-3.misc.vs10.sourcefiles \
|
||||
gtk-3.win32.vs10.sourcefiles
|
||||
|
||||
gtk-3.vs10.sourcefiles.filters: \
|
||||
gtk-3.a-h.vs10.sourcefiles.filters \
|
||||
gtk-3.i-w.vs10.sourcefiles.filters \
|
||||
gtk-3.misc.vs10.sourcefiles.filters \
|
||||
gtk-3.win32.vs10.sourcefiles.filters
|
||||
|
||||
gtk-3.sourcefiles gtk-3.vs10.sourcefiles gtk-3.vs10.sourcefiles.filters:
|
||||
@echo Genarating the final $@ from $**...
|
||||
@for %%f in ($**) do @type %%f>>$@ & del %%f
|
||||
|
||||
gailutil-3.sourcefiles \
|
||||
gailutil-3.vs10.sourcefiles \
|
||||
gailutil-3.vs10.sourcefiles.filters: $(GAILUTIL_C_SRCS)
|
||||
|
||||
# Dependencies for executable projects
|
||||
broadwayd.sourcefiles \
|
||||
broadwayd.vs10.sourcefiles \
|
||||
broadwayd.vs10.sourcefiles.filters: $(BROADWAYD_C_SRCS)
|
||||
|
||||
gtk3-demo.sourcefiles \
|
||||
gtk3-demo.vs10.sourcefiles \
|
||||
gtk3-demo.vs10.sourcefiles.filters: $(demo_actual_sources) $(more_demo_sources)
|
||||
|
||||
gdk-3.sourcefiles gdk3-win32.sourcefiles \
|
||||
gdk3-broadway.sourcefiles gailutil-3.sourcefiles \
|
||||
broadwayd.sourcefiles gtk3-demo.sourcefiles:
|
||||
@-del vs9\$(@B).vcproj
|
||||
@for %%s in ($**) do @echo. ^<File RelativePath^="..\%%s" /^>>>$@
|
||||
|
||||
gtk-3.a-h.sourcefiles gtk-3.i-w.sourcefiles \
|
||||
gtk-3.misc.sourcefiles gtk-3.win32.sourcefiles:
|
||||
@echo Generating $@...
|
||||
@if exist vs9\$(GTK_VS9_PROJ) del vs9\$(GTK_VS9_PROJ)
|
||||
@for %%s in ($(**:..\gtk\=)) do @echo. ^<File RelativePath^="..\..\gtk\%%s" /^>>>$@
|
||||
|
||||
gdk-3.vs10.sourcefiles \
|
||||
gdk3-win32.vs10.sourcefiles \
|
||||
gdk3-broadway.vs10.sourcefiles \
|
||||
gailutil-3.vs10.sourcefiles \
|
||||
broadwayd.vs10.sourcefiles \
|
||||
gtk3-demo.vs10.sourcefiles:
|
||||
@echo Generating $@...
|
||||
@-del vs10\$(@B:.vs10=.vcxproj)
|
||||
@for %%s in ($**) do @echo. ^<ClCompile Include^="..\%%s" /^>>>$@
|
||||
|
||||
gtk-3.a-h.vs10.sourcefiles \
|
||||
gtk-3.i-w.vs10.sourcefiles \
|
||||
gtk-3.misc.vs10.sourcefiles \
|
||||
gtk-3.win32.vs10.sourcefiles:
|
||||
@echo Generating $@...
|
||||
@if exist vs10\$(GTK_VS1X_PROJ) del vs10\$(GTK_VS1X_PROJ)
|
||||
@for %%s in ($(**:..\gtk\=)) do @echo. ^<ClCompile Include^="..\..\gtk\%%s" /^>>>$@
|
||||
|
||||
gdk-3.vs10.sourcefiles.filters \
|
||||
gdk3-win32.vs10.sourcefiles.filters \
|
||||
gdk3-broadway.vs10.sourcefiles.filters \
|
||||
gailutil-3.vs10.sourcefiles.filters \
|
||||
broadwayd.vs10.sourcefiles.filters \
|
||||
gtk3-demo.vs10.sourcefiles.filters:
|
||||
@-del vs10\$(@F:.vs10.sourcefiles=.vcxproj)
|
||||
@for %%s in ($**) do @echo. ^<ClCompile Include^="..\%%s"^>^<Filter^>Source Files^</Filter^>^</ClCompile^>>>$@
|
||||
|
||||
gtk-3.a-h.vs10.sourcefiles.filters \
|
||||
gtk-3.i-w.vs10.sourcefiles.filters \
|
||||
gtk-3.misc.vs10.sourcefiles.filters \
|
||||
gtk-3.win32.vs10.sourcefiles.filters:
|
||||
@if exist vs10\$(GTK_VS1X_PROJ_FILTERS) del vs10\$(GTK_VS1X_PROJ_FILTERS)
|
||||
@for %%s in ($(**:..\gtk\=)) do @echo. ^<ClCompile Include^="..\..\gtk\%%s"^>^<Filter^>Source Files^</Filter^>^</ClCompile^>>>$@
|
||||
|
||||
# Dependencies for GDK projects
|
||||
vs9\$(GDK_VS9_PROJ): gdk-3.sourcefiles vs9\$(GDK_VS9_PROJ)in
|
||||
vs9\$(GDKWIN32_VS9_PROJ).pre: gdk3-win32.sourcefiles vs9\$(GDKWIN32_VS9_PROJ)in
|
||||
vs9\$(GDKBROADWAY_VS9_PROJ): gdk3-broadway.sourcefiles vs9\$(GDKBROADWAY_VS9_PROJ)in
|
||||
vs9\$(GTK_VS9_PROJ).pre: gtk-3.sourcefiles vs9\$(GTK_VS9_PROJ)in
|
||||
vs9\$(GAILUTIL_VS9_PROJ): gailutil-3.sourcefiles vs9\$(GAILUTIL_VS9_PROJ)in
|
||||
|
||||
vs10\$(GDK_VS1X_PROJ): gdk-3.vs10.sourcefiles vs10\$(GDK_VS1X_PROJ)in
|
||||
vs10\$(GDKWIN32_VS1X_PROJ).pre: gdk3-win32.vs10.sourcefiles vs10\$(GDKWIN32_VS1X_PROJ)in
|
||||
vs10\$(GDKBROADWAY_VS1X_PROJ): gdk3-broadway.vs10.sourcefiles vs10\$(GDKBROADWAY_VS1X_PROJ)in
|
||||
vs10\$(GTK_VS1X_PROJ).pre: gtk-3.vs10.sourcefiles vs10\$(GTK_VS1X_PROJ)in
|
||||
vs10\$(GAILUTIL_VS1X_PROJ): gailutil-3.vs10.sourcefiles vs10\$(GAILUTIL_VS1X_PROJ)in
|
||||
|
||||
vs10\$(GDK_VS1X_PROJ_FILTERS): gdk-3.vs10.sourcefiles.filters vs10\$(GDK_VS1X_PROJ_FILTERS)in
|
||||
vs10\$(GDKWIN32_VS1X_PROJ_FILTERS): gdk3-win32.vs10.sourcefiles.filters vs10\$(GDKWIN32_VS1X_PROJ_FILTERS)in
|
||||
vs10\$(GDKBROADWAY_VS1X_PROJ_FILTERS): gdk3-broadway.vs10.sourcefiles.filters vs10\$(GDKBROADWAY_VS1X_PROJ_FILTERS)in
|
||||
vs10\$(GTK_VS1X_PROJ_FILTERS): gtk-3.vs10.sourcefiles.filters vs10\$(GTK_VS1X_PROJ_FILTERS)in
|
||||
vs10\$(GAILUTIL_VS1X_PROJ_FILTERS): gailutil-3.vs10.sourcefiles.filters vs10\$(GAILUTIL_VS1X_PROJ_FILTERS)in
|
||||
|
||||
# Dependencies for tool executables
|
||||
vs9\$(BROADWAYD_VS9_PROJ): broadwayd.sourcefiles vs9\$(BROADWAYD_VS9_PROJ)in
|
||||
vs10\$(BROADWAYD_VS1X_PROJ): broadwayd.vs10.sourcefiles vs10\$(BROADWAYD_VS1X_PROJ)in
|
||||
vs10\$(BROADWAYD_VS1X_PROJ_FILTERS): broadwayd.vs10.sourcefiles.filters vs10\$(BROADWAYD_VS1X_PROJ_FILTERS)in
|
||||
|
||||
# Dependencies for demos
|
||||
vs9\$(DEMO_VS9_PROJ).pre: gtk3-demo.sourcefiles vs9\$(DEMO_VS9_PROJ)in
|
||||
vs10\$(DEMO_VS1X_PROJ).pre: gtk3-demo.vs10.sourcefiles vs10\$(DEMO_VS1X_PROJ)in
|
||||
vs10\$(DEMO_VS1X_PROJ_FILTERS): gtk3-demo.vs10.sourcefiles.filters vs10\$(DEMO_VS1X_PROJ_FILTERS)in
|
||||
|
||||
# Create the project files themselves without customization with options
|
||||
vs9\$(GDKWIN32_VS9_PROJ).pre \
|
||||
vs9\$(GDKBROADWAY_VS9_PROJ) \
|
||||
vs9\$(GDK_VS9_PROJ) \
|
||||
vs9\$(GTK_VS9_PROJ).pre \
|
||||
vs9\$(GAILUTIL_VS9_PROJ) \
|
||||
vs9\$(BROADWAYD_VS9_PROJ) \
|
||||
vs9\$(DEMO_VS9_PROJ).pre \
|
||||
vs10\$(GDKWIN32_VS1X_PROJ).pre \
|
||||
vs10\$(GDKBROADWAY_VS1X_PROJ) \
|
||||
vs10\$(GDK_VS1X_PROJ) \
|
||||
vs10\$(GTK_VS1X_PROJ).pre \
|
||||
vs10\$(GAILUTIL_VS1X_PROJ) \
|
||||
vs10\$(BROADWAYD_VS1X_PROJ) \
|
||||
vs10\$(DEMO_VS1X_PROJ).pre \
|
||||
vs10\$(GDKWIN32_VS1X_PROJ_FILTERS) \
|
||||
vs10\$(GDKBROADWAY_VS1X_PROJ_FILTERS) \
|
||||
vs10\$(GDK_VS1X_PROJ_FILTERS) \
|
||||
vs10\$(GTK_VS1X_PROJ_FILTERS) \
|
||||
vs10\$(GAILUTIL_VS1X_PROJ_FILTERS) \
|
||||
vs10\$(BROADWAYD_VS1X_PROJ_FILTERS) \
|
||||
vs10\$(DEMO_VS1X_PROJ_FILTERS):
|
||||
@$(CPP) /nologo /EP /I. $(@:.pre=)in>$(@F:.pre=).tmp
|
||||
@for /f "usebackq tokens=* delims=" %%l in ($(@F:.pre=).tmp) do @echo %%l>>$@
|
||||
@-del $(@F:.pre=).tmp
|
||||
@-for %%f in ($**) do @if not "%%f" == "$(@:.pre=)in" del %%f
|
||||
|
||||
vs9\$(GDKWIN32_VS9_PROJ): vs9\$(GDKWIN32_VS9_PROJ).pre
|
||||
vs10\$(GDKWIN32_VS1X_PROJ): vs10\$(GDKWIN32_VS1X_PROJ).pre
|
||||
|
||||
vs9\$(DEMO_VS9_PROJ): vs9\$(DEMO_VS9_PROJ).pre
|
||||
vs10\$(DEMO_VS1X_PROJ): vs10\$(DEMO_VS1X_PROJ).pre
|
||||
|
||||
!ifdef USE_EGL
|
||||
regenerate-gdk-vsproj-msg:
|
||||
@echo Regenerating GDK Visual Studio projects with EGL support...
|
||||
|
||||
vs9\$(GDKWIN32_VS9_PROJ):
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=";INSIDE_GDK_WIN32\"" \
|
||||
--outstring=";INSIDE_GDK_WIN32;GDK_WIN32_ENABLE_EGL\""
|
||||
@-del $**
|
||||
|
||||
vs10\$(GDKWIN32_VS1X_PROJ):
|
||||
@echo Generating $@...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=";INSIDE_GDK_WIN32;%" \
|
||||
--outstring=";INSIDE_GDK_WIN32;GDK_WIN32_ENABLE_EGL;%"
|
||||
@-del $**
|
||||
!else
|
||||
regenerate-gdk-vsproj-msg:
|
||||
@echo Regenerating GDK Visual Studio projects without EGL support...
|
||||
|
||||
vs9\$(GDKWIN32_VS9_PROJ) vs10\$(GDKWIN32_VS1X_PROJ):
|
||||
@echo Renaming $** to $@...
|
||||
@move $** $@
|
||||
!endif
|
||||
|
||||
# Generate the gtk-3 project with or without using the older PangoFT2 +
|
||||
# HarfBuzz APIs for the font features support (this code is not used if
|
||||
# Pango 1.44.0 and HarfBuzz 2.2.0 or later are used)
|
||||
!ifdef FONT_FEATURES_USE_PANGOFT2
|
||||
vs9\$(GTK_VS9_PROJ): vs9\$(GTK_VS9_PROJ).pre2
|
||||
@echo Generating final $@ using older PangoFT2 APIs...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="AdditionalDependencies=\"$$(" \
|
||||
--outstring="AdditionalDependencies=\"$(DEMO_DEP_LIBS_PANGOFT2_VS9) $$("
|
||||
@del $**
|
||||
|
||||
vs10\$(GTK_VS1X_PROJ): vs10\$(GTK_VS1X_PROJ).pre2
|
||||
@echo Generating final $@ using older PangoFT2 APIs...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=";%(AdditionalDependencies)<" \
|
||||
--outstring=";$(DEMO_DEP_LIBS_PANGOFT2_VS1X);%(AdditionalDependencies)<"
|
||||
@del $**
|
||||
|
||||
vs9\$(GTK_VS9_PROJ).pre2: vs9\$(GTK_VS9_PROJ).pre
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="$$(GtkDefines" \
|
||||
--outstring="HAVE_HARFBUZZ;HAVE_PANGOFT;$$(GtkDefines"
|
||||
@del $**
|
||||
|
||||
vs10\$(GTK_VS1X_PROJ).pre2: vs10\$(GTK_VS1X_PROJ).pre
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="$$(GtkDefines);%" \
|
||||
--outstring="HAVE_HARFBUZZ;HAVE_PANGOFT;$$(GtkDefines);%"
|
||||
@del $**
|
||||
!else
|
||||
vs9\$(GTK_VS9_PROJ): vs9\$(GTK_VS9_PROJ).pre
|
||||
vs10\$(GTK_VS1X_PROJ): vs10\$(GTK_VS1X_PROJ).pre
|
||||
|
||||
vs9\$(GTK_VS9_PROJ) vs10\$(GTK_VS1X_PROJ):
|
||||
@echo Generating final $@...
|
||||
@move $** $@
|
||||
!endif
|
||||
|
||||
!ifdef FONT_FEATURES_DEMO
|
||||
!ifdef FONT_FEATURES_USE_PANGOFT2
|
||||
DEMO_MSG = with font features demo using PangoFT2
|
||||
vs9\$(DEMO_VS9_PROJ):
|
||||
@echo (Re-)Generating $@ $(DEMO_MSG)...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="AdditionalDependencies=\"\"" \
|
||||
--outstring="AdditionalDependencies=\"$(DEMO_DEP_LIBS_PANGOFT2_VS9)\""
|
||||
@-del $**
|
||||
|
||||
vs10\$(DEMO_VS1X_PROJ):
|
||||
@echo (Re-)Generating $@ $(DEMO_MSG)...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=">%(AdditionalDependencies)<" \
|
||||
--outstring=">$(DEMO_DEP_LIBS_PANGOFT2_VS1X);%(AdditionalDependencies)<"
|
||||
@-del $**
|
||||
!else
|
||||
DEMO_MSG = with font features demo
|
||||
vs9\$(DEMO_VS9_PROJ):
|
||||
@echo (Re-)Generating $@ $(DEMO_MSG)...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring="AdditionalDependencies=\"\"" \
|
||||
--outstring="AdditionalDependencies=\"$(DEMO_DEP_LIBS_NEW_PANGO)\""
|
||||
@-del $**
|
||||
|
||||
vs10\$(DEMO_VS1X_PROJ):
|
||||
@echo (Re-)Generating $@ $(DEMO_MSG)...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$** -o=$@ \
|
||||
--instring=">%(AdditionalDependencies)<" \
|
||||
--outstring=">$(DEMO_DEP_LIBS_NEW_PANGO);%(AdditionalDependencies)<"
|
||||
@-del $**
|
||||
!endif
|
||||
!else
|
||||
DEMO_MSG = without font features demo
|
||||
vs9\$(DEMO_VS9_PROJ) vs10\$(DEMO_VS1X_PROJ):
|
||||
@echo (Re-)Generating $@ $(DEMO_MSG)...
|
||||
@move $** $@
|
||||
!endif
|
||||
|
||||
regenerate-demos-h-win32-msg:
|
||||
@echo (Re-)Generating demos.h.win32 $(DEMO_MSG)...
|
||||
|
||||
# VS2012+ .vcxproj: Update the toolset version as appropriate
|
||||
{vs10\}.vcxproj{vs11\}.vcxproj:
|
||||
@echo Copying and updating $< for VS2012
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@ --instring=">v100<" --outstring=">v110<"
|
||||
|
||||
{vs10\}.vcxproj{vs12\}.vcxproj:
|
||||
@echo Copying and updating $< for VS2013
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@ --instring=">v100<" --outstring=">v120<"
|
||||
|
||||
{vs10\}.vcxproj{vs14\}.vcxproj:
|
||||
@echo Copying and updating $< for VS2015
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@ --instring=">v100<" --outstring=">v140<"
|
||||
|
||||
{vs10\}.vcxproj{vs15\}.vcxproj:
|
||||
@echo Copying and updating $< for VS2017
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@ --instring=">v100<" --outstring=">v141<"
|
||||
|
||||
{vs10\}.vcxproj{vs16\}.vcxproj:
|
||||
@echo Copying and updating $< for VS2019
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@ --instring=">v100<" --outstring=">v142<"
|
||||
|
||||
{vs10\}.vcxproj{vs17\}.vcxproj:
|
||||
@echo Copying and updating $< for VS2022
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@ --instring=">v100<" --outstring=">v143<"
|
||||
|
||||
# VS2012+ .vcxproj.filters: We simply copy the VS2010 ones
|
||||
{vs10\}.filters{vs11\}.filters:
|
||||
@echo Copying $< to $@...
|
||||
@copy $< $@
|
||||
|
||||
{vs10\}.filters{vs12\}.filters:
|
||||
@echo Copying $< to $@...
|
||||
@copy $< $@
|
||||
|
||||
{vs10\}.filters{vs14\}.filters:
|
||||
@echo Copying $< to $@...
|
||||
@copy $< $@
|
||||
|
||||
{vs10\}.filters{vs15\}.filters:
|
||||
@echo Copying $< to $@...
|
||||
@copy $< $@
|
||||
|
||||
{vs10\}.filters{vs16\}.filters:
|
||||
@echo Copying $< to $@...
|
||||
@copy $< $@
|
||||
|
||||
{vs10\}.filters{vs17\}.filters:
|
||||
@echo Copying $< to $@...
|
||||
@copy $< $@
|
||||
|
||||
{vs10\}.sln{vs11\}.sln:
|
||||
@echo Copying and updating $< for VS2012...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@.tmp \
|
||||
--instring="Format Version 11.00" --outstring="Format Version 12.00"
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$@.tmp -o=$@ \
|
||||
--instring="# Visual Studio 2010" --outstring="# Visual Studio 2012"
|
||||
@del $@.tmp
|
||||
|
||||
{vs10\}.sln{vs12\}.sln:
|
||||
@echo Copying and updating $< for VS2013...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@.tmp \
|
||||
--instring="Format Version 11.00" --outstring="Format Version 12.00"
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$@.tmp -o=$@ \
|
||||
--instring="# Visual Studio 2010" --outstring="# Visual Studio 2013"
|
||||
@del $@.tmp
|
||||
|
||||
{vs10\}.sln{vs14\}.sln:
|
||||
@echo Copying and updating $< for VS2015...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@.tmp \
|
||||
--instring="Format Version 11.00" --outstring="Format Version 12.00"
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$@.tmp -o=$@ \
|
||||
--instring="# Visual Studio 2010" --outstring="# Visual Studio 14"
|
||||
@del $@.tmp
|
||||
|
||||
{vs10\}.sln{vs15\}.sln:
|
||||
@echo Copying and updating $< for VS2017...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@.tmp \
|
||||
--instring="Format Version 11.00" --outstring="Format Version 12.00"
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$@.tmp -o=$@ \
|
||||
--instring="# Visual Studio 2010" --outstring="# Visual Studio 15"
|
||||
@del $@.tmp
|
||||
|
||||
{vs10\}.sln{vs16\}.sln:
|
||||
@echo Copying and updating $< for VS2019...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@.tmp \
|
||||
--instring="Format Version 11.00" --outstring="Format Version 12.00"
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$@.tmp -o=$@ \
|
||||
--instring="# Visual Studio 2010" --outstring="# Visual Studio 16"
|
||||
@del $@.tmp
|
||||
|
||||
{vs10\}.sln{vs17\}.sln:
|
||||
@echo Copying and updating $< for VS2022...
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$< -o=$@.tmp \
|
||||
--instring="Format Version 11.00" --outstring="Format Version 12.00"
|
||||
@$(PYTHON) replace.py -a=replace-str -i=$@.tmp -o=$@ \
|
||||
--instring="# Visual Studio 2010" --outstring="# Visual Studio 17"
|
||||
@del $@.tmp
|
||||
|
||||
copy-update-static-projects: \
|
||||
$(GTK3_VS11_STATIC_PROJS) \
|
||||
$(GTK3_VS12_STATIC_PROJS) \
|
||||
$(GTK3_VS14_STATIC_PROJS) \
|
||||
$(GTK3_VS15_STATIC_PROJS) \
|
||||
$(GTK3_VS16_STATIC_PROJS) \
|
||||
$(GTK3_VS17_STATIC_PROJS)
|
||||
|
||||
regenerate-gtk-vsproj-msg:
|
||||
@echo Regenerating GTK and gailutil projects...
|
||||
|
||||
regenerate-gdk-vsproj: regenerate-gdk-vsproj-msg $(GTK3_GDK_VCPROJS)
|
||||
regenerate-gtk-vsproj: regenerate-gtk-vsproj-msg $(GTK3_GTK_VCPROJS) $(GTK3_GAILUTIL_VCPROJS)
|
||||
|
||||
regenerate-all-msvc-projs: \
|
||||
copy-update-static-projects \
|
||||
regenerate-gdk-vsproj \
|
||||
regenerate-gtk-vsproj \
|
||||
regenerate-demos-h-win32
|
||||
|
||||
.SUFFIXES: .vcxproj .filters .sln
|
14
win32/vs10/.gitignore
vendored
14
win32/vs10/.gitignore
vendored
@@ -1,14 +0,0 @@
|
||||
broadwayd.vcxproj.filters
|
||||
broadwayd.vcxproj
|
||||
gailutil-3.vcxproj.filters
|
||||
gailutil-3.vcxproj
|
||||
gdk-3.vcxproj.filters
|
||||
gdk-3.vcxproj
|
||||
gdk3-broadway.vcxproj.filters
|
||||
gdk3-broadway.vcxproj
|
||||
gdk3-win32.vcxproj.filters
|
||||
gdk3-win32.vcxproj
|
||||
gtk-3.vcxproj.filters
|
||||
gtk-3.vcxproj
|
||||
gtk3-demo.vcxproj.filters
|
||||
gtk3-demo.vcxproj
|
@@ -50,7 +50,7 @@
|
||||
<AdditionalIncludeDirectories>$(GdkBaseIncludes);..\..\gdk\broadway;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader></PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
||||
|
||||
<!-- For Broadway_Debug -->
|
||||
<Optimization Condition="'$(Configuration)' == 'Debug_Broadway'">Disabled</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)' == 'Debug_Broadway'">_DEBUG;$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
3
win32/vs11/.gitignore
vendored
3
win32/vs11/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
3
win32/vs12/.gitignore
vendored
3
win32/vs12/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
3
win32/vs14/.gitignore
vendored
3
win32/vs14/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
3
win32/vs15/.gitignore
vendored
3
win32/vs15/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
3
win32/vs16/.gitignore
vendored
3
win32/vs16/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
3
win32/vs17/.gitignore
vendored
3
win32/vs17/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
1
win32/vs1x-props/.gitignore
vendored
1
win32/vs1x-props/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
gtk3-version-paths.props
|
8
win32/vs9/.gitignore
vendored
8
win32/vs9/.gitignore
vendored
@@ -1,8 +0,0 @@
|
||||
broadwayd.vcproj
|
||||
gailutil-3.vcproj
|
||||
gdk-3.vcproj
|
||||
gdk3-broadway.vcproj
|
||||
gdk3-win32.vcproj
|
||||
gtk-3.vcproj
|
||||
gtk3-demo.vcproj
|
||||
gtk3-version-paths.vsprops
|
Reference in New Issue
Block a user