From 8bd186555831818d0c426d8b09e82df77f53dd53 Mon Sep 17 00:00:00 2001 From: Homes32 Date: Wed, 25 Feb 2026 18:07:20 -0600 Subject: [PATCH] Removed GooCanvas dependencies from Win32 makefile following https://github.com/csete/gpredict/commit/2a57f14693e0af49235dc80c905f54a058fabc07 Include GTK Run-time binaries in the zip package when building with the dist target Updated Binary Dependencies for Win32 Builds: - Fixed gdk-pixbuf-2.0 SVG dependencies - Added gspawn-win64-helper.exe and gspawn-win64-helper-console.exe as they are required for hyperlinks to launch --- win32/Makefile | 57 +++++++++++---------------------------------- win32/config.mk | 10 ++++++-- win32/loaders.cache | 9 ++++--- 3 files changed, 25 insertions(+), 51 deletions(-) diff --git a/win32/Makefile b/win32/Makefile index 0da7b5a4..1d34fe4a 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -16,9 +16,6 @@ nxjsondir = $(gpreddir)/nxjson # tools CC = gcc -Wall -O2 -mms-bitfields -DWIN32 -AS = as -DLLWRAP = dllwrap -DLLWRAP_FLAGS = --as=$(AS) --export-all --driver-name $(CC) -s RC = windres # NB: .rc file create various version formats from the numbers RCFLAGS = --define __WIN32__ --define __WIN95__ --define MSRC --define __GNUWIN32__ \ @@ -27,14 +24,12 @@ RCFLAGS = --define __WIN32__ --define __WIN95__ --define MSRC --define __GNUWIN3 # libraries GTKLIBS := $(shell pkg-config --define-prefix --libs gtk+-3.0) GLIBLIB := $(shell pkg-config --define-prefix --libs glib-2.0 gthread-2.0) -GOOLIBS := $(shell pkg-config --define-prefix --libs goocanvas-3.0) -GUI_LIBS = $(GTKLIBS) $(GLIBLIB) $(GOOLIBS) libsgpsdp.lib -lwinmm -lwininet -lws2_32 +GUI_LIBS = $(GTKLIBS) $(GLIBLIB) libsgpsdp.lib -lwinmm -lwininet -lws2_32 LIBS = -lm # flags/defines GTK_CFLAGS := $(shell pkg-config --define-prefix --cflags gtk+-3.0) -GOO_CFLAGS := $(shell pkg-config --define-prefix --cflags goocanvas-3.0) -CFLAGS = -DVERSION_SHORT=$(VERSION_SHORT) -DHAVE_CONFIG_H -DPACKAGE_LOCALE_DIR=\"/\" -I. -I.. -I$(gpreddir) $(GOO_CFLAGS) +CFLAGS = -DVERSION_SHORT=$(VERSION_SHORT) -DHAVE_CONFIG_H -DPACKAGE_LOCALE_DIR=\"/\" -I. -I.. -I$(gpreddir) # source paths vpath %.c $(sgpsdpdir) @@ -63,31 +58,6 @@ NXJSONSRC = \ NXJSONOBJ = $(NXJSONSRC:.c=.o) -GOOCANVSRC = \ - goocanvasatk.c \ - goocanvasellipse.c \ - goocanvasenumtypes.c \ - goocanvasgroup.c \ - goocanvasimage.c \ - goocanvasitem.c \ - goocanvasitemmodel.c \ - goocanvasitemsimple.c \ - goocanvasmarshal.c \ - goocanvaspolyline.c \ - goocanvaspath.c \ - goocanvasprivate.h \ - goocanvasrect.c \ - goocanvasstyle.c \ - goocanvastable.c \ - goocanvastext.c \ - goocanvasutils.c \ - goocanvaswidget.c \ - goocanvas.c - - -GOOCANVOBJ = $(GOOCANVSRC:.c=.o) - - GPREDICTSRC = \ about.c \ compat.c \ @@ -95,8 +65,8 @@ GPREDICTSRC = \ gpredict-help.c \ gpredict-utils.c \ gtk-azel-plot.c \ - gtk-event-list.c \ - gtk-event-list-popup.c \ + gtk-event-list.c \ + gtk-event-list-popup.c \ gtk-freq-knob.c \ gtk-polar-plot.c \ gtk-polar-view.c \ @@ -113,7 +83,7 @@ GPREDICTSRC = \ gtk-sat-module.c \ gtk-sat-module-popup.c \ gtk-sat-module-tmg.c \ - gtk-sat-popup-common.c \ + gtk-sat-popup-common.c \ gtk-sat-selector.c \ gtk-single-sat.c \ gtk-sky-glance.c \ @@ -184,14 +154,13 @@ OBJS = $(SGPSDPOBJ) $(NXJSONOBJ) $(GPREDICTOBJ) $(CC) -c $(CFLAGS) $(GTK_CFLAGS) $< $(CC) -MM $(CFLAGS) $(GTK_CFLAGS) $< > $*.d - # targets begin all: libsgpsdp.dll gpredict.exe gpredict-con.exe -dist: gpredict-$(GITMAJ).$(GITMIN).$(GITBLD).zip +dist: gpredict-$(VERSION_SHORT).zip -gpredict-$(GITMAJ).$(GITMIN).$(GITBLD).zip: all +gpredict-$(VERSION_SHORT).zip: all mkdir -p gpredict/doc cp -p ../AUTHORS ../COPYING ../NEWS ../README gpredict/doc mkdir -p gpredict/share/gpredict @@ -206,9 +175,14 @@ gpredict-$(GITMAJ).$(GITMIN).$(GITBLD).zip: all cp -rp $(SCHEMAS) gpredict/share/glib-2.0 mkdir -p gpredict/share/icons/Adwaita cp -rp $(ADWAITA)/scalable gpredict/share/icons/Adwaita/ - cp -rp $(ADWAITA)/scalable-up-to-32 gpredict/share/icons/Adwaita/ cp -rp $(ADWAITA)/index.theme gpredict/share/icons/Adwaita/ cp -rp $(ADWAITA)/icon-theme.cache gpredict/share/icons/Adwaita/ + + # gtk runtime + for dll in $(shell ldd ./gpredict.exe | grep /mingw64 | awk '{print $$3}'); do \ + cp -p "$$dll" gpredict/; \ + done + zip -r $@ gpredict rm -rf gpredict @@ -223,10 +197,6 @@ gpredict.exe gpredict-con.exe: $(OBJS) gpredict_res.o gpredict_res.o: gpredict.rc $(RC) $(RCFLAGS) gpredict.rc $@ -libgoocanvas.dll: $(GOOCANVOBJ) - $(CC) -shared $(CFLAGS) $(GTK_CFLAGS) $(GOOCANVOBJ) $(GTKLIBS) -lm -lmingwex \ - -Wl,--enable-auto-image-base -Wl,--out-implib,libgoocanvas.lib -o libgoocanvas.dll - libsgpsdp.dll: $(SGPSDPOBJ) $(CC) -shared $(CFLAGS) $(GTK_CFLAGS) $(SGPSDPOBJ) $(GLIBLIB) -lm -lmingwex \ -Wl,--enable-auto-image-base -Wl,--out-implib,libsgpsdp.lib -o libsgpsdp.dll @@ -234,4 +204,3 @@ libsgpsdp.dll: $(SGPSDPOBJ) clean: rm -f *.o *.d *.def *.a *.lib *.dll *.exe *.zip rm -rf gpredict - diff --git a/win32/config.mk b/win32/config.mk index 30aa1ca6..25e78cf9 100644 --- a/win32/config.mk +++ b/win32/config.mk @@ -29,11 +29,17 @@ MINGW_ROOT=/mingw64 PKG_CONFIG_PATH = "$(abspath $(MINGW_ROOT)/lib/pkgconfig)" # binary dependencies to be deployed with gpredict.exe +# librsvg-2-2.dll and libxml2-16.dll are needed for pixbufloader_svg.dll +# gspawn-win64-helper.exe and gspawn-win64-helper-console.exe are required for hyperlinks to launch BINDEPS = \ $(wildcard $(MINGW_ROOT)/bin/*.dll) \ - $(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll \ + $(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/pixbufloader_svg.dll \ $(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.dll \ - $(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll + $(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll \ + $(MINGW_ROOT)/bin/librsvg-2-2.dll \ + $(MINGW_ROOT)/bin/libxml2-16.dll \ + $(MINGW_ROOT)/bin/gspawn-win64-helper.exe \ + $(MINGW_ROOT)/bin/gspawn-win64-helper-console.exe # where to put the loaders.cache file LOADERS = lib/gdk-pixbuf-2.0/2.10.0 diff --git a/win32/loaders.cache b/win32/loaders.cache index 30fe14a4..78ab66e1 100644 --- a/win32/loaders.cache +++ b/win32/loaders.cache @@ -1,11 +1,11 @@ # GdkPixbuf Image Loader Modules file # Automatically generated file, do not edit -# Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.30.1 +# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.44.5 # -# LoaderDir = Z:\srv\win32builder\fixed_3104\build\win32/lib/gdk-pixbuf-2.0/2.10.0/loaders +# LoaderDir = C:\msys64\mingw64\lib\gdk-pixbuf-2.0\2.10.0\loaders # -"libpixbufloader-svg.dll" -"svg" 2 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL" +"pixbufloader_svg.dll" +"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL" "image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" "" "svg" "svgz" "svg.gz" "" "