Skip to content

Commit c616268

Browse files
homes32csete
authored andcommitted
Removed GooCanvas dependencies from Win32 makefile following 2a57f14
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
1 parent 1879bf3 commit c616268

3 files changed

Lines changed: 25 additions & 51 deletions

File tree

win32/Makefile

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ nxjsondir = $(gpreddir)/nxjson
1616

1717
# tools
1818
CC = gcc -Wall -O2 -mms-bitfields -DWIN32
19-
AS = as
20-
DLLWRAP = dllwrap
21-
DLLWRAP_FLAGS = --as=$(AS) --export-all --driver-name $(CC) -s
2219
RC = windres
2320
# NB: .rc file create various version formats from the numbers
2421
RCFLAGS = --define __WIN32__ --define __WIN95__ --define MSRC --define __GNUWIN32__ \
@@ -27,14 +24,12 @@ RCFLAGS = --define __WIN32__ --define __WIN95__ --define MSRC --define __GNUWIN3
2724
# libraries
2825
GTKLIBS := $(shell pkg-config --define-prefix --libs gtk+-3.0)
2926
GLIBLIB := $(shell pkg-config --define-prefix --libs glib-2.0 gthread-2.0)
30-
GOOLIBS := $(shell pkg-config --define-prefix --libs goocanvas-3.0)
31-
GUI_LIBS = $(GTKLIBS) $(GLIBLIB) $(GOOLIBS) libsgpsdp.lib -lwinmm -lwininet -lws2_32
27+
GUI_LIBS = $(GTKLIBS) $(GLIBLIB) libsgpsdp.lib -lwinmm -lwininet -lws2_32
3228
LIBS = -lm
3329

3430
# flags/defines
3531
GTK_CFLAGS := $(shell pkg-config --define-prefix --cflags gtk+-3.0)
36-
GOO_CFLAGS := $(shell pkg-config --define-prefix --cflags goocanvas-3.0)
37-
CFLAGS = -DVERSION_SHORT=$(VERSION_SHORT) -DHAVE_CONFIG_H -DPACKAGE_LOCALE_DIR=\"/\" -I. -I.. -I$(gpreddir) $(GOO_CFLAGS)
32+
CFLAGS = -DVERSION_SHORT=$(VERSION_SHORT) -DHAVE_CONFIG_H -DPACKAGE_LOCALE_DIR=\"/\" -I. -I.. -I$(gpreddir)
3833

3934
# source paths
4035
vpath %.c $(sgpsdpdir)
@@ -63,40 +58,15 @@ NXJSONSRC = \
6358

6459
NXJSONOBJ = $(NXJSONSRC:.c=.o)
6560

66-
GOOCANVSRC = \
67-
goocanvasatk.c \
68-
goocanvasellipse.c \
69-
goocanvasenumtypes.c \
70-
goocanvasgroup.c \
71-
goocanvasimage.c \
72-
goocanvasitem.c \
73-
goocanvasitemmodel.c \
74-
goocanvasitemsimple.c \
75-
goocanvasmarshal.c \
76-
goocanvaspolyline.c \
77-
goocanvaspath.c \
78-
goocanvasprivate.h \
79-
goocanvasrect.c \
80-
goocanvasstyle.c \
81-
goocanvastable.c \
82-
goocanvastext.c \
83-
goocanvasutils.c \
84-
goocanvaswidget.c \
85-
goocanvas.c
86-
87-
88-
GOOCANVOBJ = $(GOOCANVSRC:.c=.o)
89-
90-
9161
GPREDICTSRC = \
9262
about.c \
9363
compat.c \
9464
first-time.c \
9565
gpredict-help.c \
9666
gpredict-utils.c \
9767
gtk-azel-plot.c \
98-
gtk-event-list.c \
99-
gtk-event-list-popup.c \
68+
gtk-event-list.c \
69+
gtk-event-list-popup.c \
10070
gtk-freq-knob.c \
10171
gtk-polar-plot.c \
10272
gtk-polar-view.c \
@@ -113,7 +83,7 @@ GPREDICTSRC = \
11383
gtk-sat-module.c \
11484
gtk-sat-module-popup.c \
11585
gtk-sat-module-tmg.c \
116-
gtk-sat-popup-common.c \
86+
gtk-sat-popup-common.c \
11787
gtk-sat-selector.c \
11888
gtk-single-sat.c \
11989
gtk-sky-glance.c \
@@ -184,14 +154,13 @@ OBJS = $(SGPSDPOBJ) $(NXJSONOBJ) $(GPREDICTOBJ)
184154
$(CC) -c $(CFLAGS) $(GTK_CFLAGS) $<
185155
$(CC) -MM $(CFLAGS) $(GTK_CFLAGS) $< > $*.d
186156

187-
188157
# targets begin
189158

190159
all: libsgpsdp.dll gpredict.exe gpredict-con.exe
191160

192-
dist: gpredict-$(GITMAJ).$(GITMIN).$(GITBLD).zip
161+
dist: gpredict-$(VERSION_SHORT).zip
193162

194-
gpredict-$(GITMAJ).$(GITMIN).$(GITBLD).zip: all
163+
gpredict-$(VERSION_SHORT).zip: all
195164
mkdir -p gpredict/doc
196165
cp -p ../AUTHORS ../COPYING ../NEWS ../README gpredict/doc
197166
mkdir -p gpredict/share/gpredict
@@ -206,9 +175,14 @@ gpredict-$(GITMAJ).$(GITMIN).$(GITBLD).zip: all
206175
cp -rp $(SCHEMAS) gpredict/share/glib-2.0
207176
mkdir -p gpredict/share/icons/Adwaita
208177
cp -rp $(ADWAITA)/scalable gpredict/share/icons/Adwaita/
209-
cp -rp $(ADWAITA)/scalable-up-to-32 gpredict/share/icons/Adwaita/
210178
cp -rp $(ADWAITA)/index.theme gpredict/share/icons/Adwaita/
211179
cp -rp $(ADWAITA)/icon-theme.cache gpredict/share/icons/Adwaita/
180+
181+
# gtk runtime
182+
for dll in $(shell ldd ./gpredict.exe | grep /mingw64 | awk '{print $$3}'); do \
183+
cp -p "$$dll" gpredict/; \
184+
done
185+
212186
zip -r $@ gpredict
213187
rm -rf gpredict
214188

@@ -223,15 +197,10 @@ gpredict.exe gpredict-con.exe: $(OBJS) gpredict_res.o
223197
gpredict_res.o: gpredict.rc
224198
$(RC) $(RCFLAGS) gpredict.rc $@
225199

226-
libgoocanvas.dll: $(GOOCANVOBJ)
227-
$(CC) -shared $(CFLAGS) $(GTK_CFLAGS) $(GOOCANVOBJ) $(GTKLIBS) -lm -lmingwex \
228-
-Wl,--enable-auto-image-base -Wl,--out-implib,libgoocanvas.lib -o libgoocanvas.dll
229-
230200
libsgpsdp.dll: $(SGPSDPOBJ)
231201
$(CC) -shared $(CFLAGS) $(GTK_CFLAGS) $(SGPSDPOBJ) $(GLIBLIB) -lm -lmingwex \
232202
-Wl,--enable-auto-image-base -Wl,--out-implib,libsgpsdp.lib -o libsgpsdp.dll
233203

234204
clean:
235205
rm -f *.o *.d *.def *.a *.lib *.dll *.exe *.zip
236206
rm -rf gpredict
237-

win32/config.mk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ MINGW_ROOT=/mingw64
2929
PKG_CONFIG_PATH = "$(abspath $(MINGW_ROOT)/lib/pkgconfig)"
3030

3131
# binary dependencies to be deployed with gpredict.exe
32+
# librsvg-2-2.dll and libxml2-16.dll are needed for pixbufloader_svg.dll
33+
# gspawn-win64-helper.exe and gspawn-win64-helper-console.exe are required for hyperlinks to launch
3234
BINDEPS = \
3335
$(wildcard $(MINGW_ROOT)/bin/*.dll) \
34-
$(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll \
36+
$(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/pixbufloader_svg.dll \
3537
$(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.dll \
36-
$(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll
38+
$(MINGW_ROOT)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll \
39+
$(MINGW_ROOT)/bin/librsvg-2-2.dll \
40+
$(MINGW_ROOT)/bin/libxml2-16.dll \
41+
$(MINGW_ROOT)/bin/gspawn-win64-helper.exe \
42+
$(MINGW_ROOT)/bin/gspawn-win64-helper-console.exe
3743

3844
# where to put the loaders.cache file
3945
LOADERS = lib/gdk-pixbuf-2.0/2.10.0

win32/loaders.cache

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# GdkPixbuf Image Loader Modules file
22
# Automatically generated file, do not edit
3-
# Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.30.1
3+
# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.44.5
44
#
5-
# LoaderDir = Z:\srv\win32builder\fixed_3104\build\win32/lib/gdk-pixbuf-2.0/2.10.0/loaders
5+
# LoaderDir = C:\msys64\mingw64\lib\gdk-pixbuf-2.0\2.10.0\loaders
66
#
7-
"libpixbufloader-svg.dll"
8-
"svg" 2 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
7+
"pixbufloader_svg.dll"
8+
"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
99
"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
1010
"svg" "svgz" "svg.gz" ""
1111
" <svg" "* " 100
@@ -23,4 +23,3 @@
2323
"jpeg" "jpe" "jpg" ""
2424
"\377\330" "" 100
2525

26-

0 commit comments

Comments
 (0)