Merge branch 'msvc-proj-more-data' into 'gtk-3-24'
Visual Studio projects: Make installed data files better match the autotools/Meson builds See merge request GNOME/gtk!4814
This commit is contained in:
@@ -71,3 +71,14 @@ 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.
|
||||
|
||||
@@ -42,6 +42,10 @@ GDBUS_CODEGEN = $(PREFIX)\bin\gdbus-codegen
|
||||
GLIB_COMPILE_SCHEMAS = $(PREFIX)\bin\glib-compile-schemas.exe
|
||||
!endif
|
||||
|
||||
!ifndef MSGFMT
|
||||
MSGFMT = msgfmt
|
||||
!endif
|
||||
|
||||
!if "$(PLAT)" == "x64"
|
||||
AT_PLAT=x86_64
|
||||
!elseif "$(PLAT)" == "arm64"
|
||||
|
||||
@@ -80,6 +80,14 @@ GTK3_DEMO_VCPROJS = \
|
||||
$(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 \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\fr.gresource.xml \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\zh.gresource.xml
|
||||
|
||||
EMOJI_GRESOURCE = $(EMOJI_GRESOURCE_XML:.gresource.xml=.gresource)
|
||||
|
||||
generate-base-sources: \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\config.h \
|
||||
$(GDK_GENERATED_SOURCES) \
|
||||
@@ -91,7 +99,8 @@ generate-base-sources: \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demo_resources.c \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c \
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-widget-factory\widget_factory_resources.c
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-widget-factory\widget_factory_resources.c \
|
||||
$(EMOJI_GRESOURCE)
|
||||
|
||||
# Copy the pre-defined config.h.win32 and demos.h.win32
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\config.h: ..\config.h.win32
|
||||
@@ -412,6 +421,25 @@ 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
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\zh.gresource.xml: ..\gtk\emoji\gresource.xml.in
|
||||
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\de.gresource: .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\de.gresource.xml ..\gtk\emoji\de.data
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\es.gresource: .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\es.gresource.xml ..\gtk\emoji\es.data
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\fr.gresource: .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\fr.gresource.xml ..\gtk\emoji\fr.data
|
||||
.\vs$(VSVER)\$(CFG)\$(PLAT)\bin\zh.gresource: .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\zh.gresource.xml ..\gtk\emoji\zh.data
|
||||
|
||||
$(EMOJI_GRESOURCE_XML):
|
||||
@echo Generating $@...
|
||||
@if not exist $(@D)\ mkdir $(@D)
|
||||
@$(PYTHON) replace.py -i=$** -o=$@ --action=replace-var --var=lang --outstring=$(@B:.gresource=)
|
||||
|
||||
$(EMOJI_GRESOURCE):
|
||||
@echo Generating $@...
|
||||
@$(GLIB_COMPILE_RESOURCES) --sourcedir=..\gtk\emoji $@.xml --target=$@
|
||||
|
||||
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
|
||||
@@ -421,6 +449,8 @@ regenerate-demos-h-win32: ..\demos\gtk-demo\geninclude.py $(demo_actual_sources)
|
||||
|
||||
# Remove the generated files
|
||||
clean:
|
||||
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gresource
|
||||
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gresource.xml
|
||||
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c
|
||||
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demo_resources.c
|
||||
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h
|
||||
|
||||
@@ -51,7 +51,13 @@ GTK_TYPE_BULITINS_H = .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-$(GTK_API_VERSION)\gtk
|
||||
GTK_VERSION_H = .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-$(GTK_API_VERSION)\gtk\gtkversion.h
|
||||
GTK_GENERATED_PUBLIC_H = $(GTK_TYPE_BULITINS_H) $(GTK_VERSION_H)
|
||||
|
||||
all: install-bin install-headers install-data
|
||||
!ifdef INSTALL_TRANSLATIONS
|
||||
DATA_TARGETS = install-data install-translations
|
||||
!else
|
||||
DATA_TARGETS = install-data
|
||||
!endif
|
||||
|
||||
all: install-bin install-headers $(DATA_TARGETS)
|
||||
|
||||
# Copy the built files
|
||||
install-bin:
|
||||
@@ -122,6 +128,18 @@ install-data:
|
||||
@for %f in (..\gtk\org.gtk.Settings.*.gschema.xml ..\demos\gtk-demo\org.gtk.Demo.gschema.xml) do @copy %f "$(PREFIX)\share\glib-2.0\schemas"
|
||||
@-$(GLIB_COMPILE_SCHEMAS) $(PREFIX)\share\glib-2.0\schemas
|
||||
# Demo icons
|
||||
@for %t in (16 22 24 32 48 256) do @for %d in ($(PREFIX)\share\icons\hicolor\%tx%t\apps) do @((if not exist %d\ mkdir %d) & copy /b ..\demos\gtk-demo\data\%tx%t\gtk3-demo.png "%d")
|
||||
@for %t in (16 22 24 32 48 256) do @for %d in ($(PREFIX)\share\icons\hicolor\%tx%t\apps) do @((if not exist %d\ mkdir %d) & copy /b ..\demos\gtk-demo\data\%tx%t\gtk3-demo*.png "%d")
|
||||
@for %t in (16 22 24 32 48 256) do @for %d in ($(PREFIX)\share\icons\hicolor\%tx%t\apps) do @((if not exist %d\ mkdir %d) & copy /b ..\demos\widget-factory\data\%tx%t\gtk3-widget-factory*.png "%d")
|
||||
@-$(BASE_BUILT_BIN_DIR)\gtk-update-icon-cache.exe --ignore-theme-index --force "$(PREFIX)\share\icons\hicolor"
|
||||
# Auxiliary build-related data files (m4, ITS files, RelaxNG files)
|
||||
@for %d in (aclocal gettext\its gtk-3.0\emoji) do @if not exist $(PREFIX)\share\%d\ mkdir $(PREFIX)\share\%d
|
||||
@copy ..\m4macros\gtk-3.0.m4 $(PREFIX)\share\aclocal
|
||||
@for %x in (its loc) do @copy ..\gtk\gtkbuilder.%x $(PREFIX)\share\gettext\its
|
||||
@for %x in (rng) do @copy ..\gtk\gtkbuilder.%x $(PREFIX)\share\gtk-3.0
|
||||
@for %l in (de es fr zh) do @for %f in ($(BASE_BUILT_BIN_DIR)\%l.gresource) do @copy %f $(PREFIX)\share\gtk-3.0\emoji
|
||||
|
||||
# Generate and install the translations
|
||||
install-translations:
|
||||
@for %d in (po po-properties) do @for %l in (..\%d\*.po) do @if not exist $(PREFIX)\share\locale\%~nl\LC_MESSAGES\ md $(PREFIX)\share\locale\%~nl\LC_MESSAGES
|
||||
@for %l in (..\po\*.po) do @$(MSGFMT) -c -v -o $(PREFIX)\share\locale\%~nl\LC_MESSAGES\gtk30.mo %l
|
||||
@for %l in (..\po-properties\*.po) do @$(MSGFMT) -c -v -o $(PREFIX)\share\locale\%~nl\LC_MESSAGES\gtk30-properties.mo %l
|
||||
|
||||
Reference in New Issue
Block a user