Xboard GTK for Windows
Posted: 28 Dec 2015, 20:45
I've been thinking about trying this for a while. In theory rather then have 2 separate code bases we could just use xboardGTK instead as GTK2 is available for windows as well. This has a few advantages
1. Easier to maintain
2. Librsvg/cairo is much more advanced then win32's rendering:
- SVG images on top of looking cleaner are much more practical and easier to create then chess fonts. (Inkscape is free and does a great job converting raster images to vector. Proper font software can cost hundreds of dollars )
-Resizable png images over the cumbersome bitmaps for every size cannot be overstated.
-Board Scalable to any size, not just fixed ones.
Fact is after using Xboard on OSX for years, Winbord just looks ugly
We would have to figure out the bundling later. Perhaps to some relative directory system: But it should be more then possible.
Step 1 though is to try to get it to compile.
Anyway I installed the mingw/msys package over here (mingw is a version of GCC modified to make native windows binaries)
http://www.mingw.org/
and downloaded the mingw GTK+ package here, and merged the folder into the mingw root folder:
http://sourceforge.net/projects/gtk-min ... s/gtk%2B2/
and did the same for mingw librsvg package here:
http://sourceforge.net/projects/gtk-min ... s/librsvg/
By default MSYS root folder is separate from the MinGW folder. This is cumbersome and I found it much easier to take the contents of ./MSYS/1.0/ folder to the root folder of MinGW, then deal with finding the libraries.
autogen.sh ran fine (I first tried it with a development build and got the same issue)
configure ran fine:
But make failed with:
Leaves me scratching my head. Must be some MinGW quirk as there is no line 0 in backend.c or any file. Does anyone have any ideas?
1. Easier to maintain
2. Librsvg/cairo is much more advanced then win32's rendering:
- SVG images on top of looking cleaner are much more practical and easier to create then chess fonts. (Inkscape is free and does a great job converting raster images to vector. Proper font software can cost hundreds of dollars )
-Resizable png images over the cumbersome bitmaps for every size cannot be overstated.
-Board Scalable to any size, not just fixed ones.
Fact is after using Xboard on OSX for years, Winbord just looks ugly
We would have to figure out the bundling later. Perhaps to some relative directory system: But it should be more then possible.
Step 1 though is to try to get it to compile.
Anyway I installed the mingw/msys package over here (mingw is a version of GCC modified to make native windows binaries)
http://www.mingw.org/
and downloaded the mingw GTK+ package here, and merged the folder into the mingw root folder:
http://sourceforge.net/projects/gtk-min ... s/gtk%2B2/
and did the same for mingw librsvg package here:
http://sourceforge.net/projects/gtk-min ... s/librsvg/
By default MSYS root folder is separate from the MinGW folder. This is cumbersome and I found it much easier to take the contents of ./MSYS/1.0/ folder to the root folder of MinGW, then deal with finding the libraries.
autogen.sh ran fine (I first tried it with a development build and got the same issue)
configure ran fine:
- Code: Select all
$ ./configure --with-gtk -prefix=/mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for library containing strerror... none required
checking whether NLS is requested... yes
checking for msgfmt... /bin/msgfmt
checking for gmsgfmt... /bin/msgfmt
checking for xgettext... /bin/xgettext
checking for msgmerge... /bin/msgmerge
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for ld used by GCC... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... /mingw32/lib/libiconv.dll.a -L/mingw32/lib
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl
checking for remsh... no
checking for rsh... rsh
checking for makeinfo... makeinfo
checking for nroff... cat
checking for awk... /bin/awk
checking for perl... /bin/perl
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking return type of signal handlers... void
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/systeminfo.h usability... no
checking sys/systeminfo.h presence... no
checking for sys/systeminfo.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
checking lan/socket.h usability... no
checking lan/socket.h presence... no
checking for lan/socket.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for _getpty... no
checking for grantpt... no
checking for setitimer... no
checking for usleep... yes
checking for gettimeofday... yes
checking for random... no
checking for rand48... no
checking for gethostname... no
checking for sysinfo... no
checking for setlocale... yes
checking for getpseudotty in -lseq... no
checking whether compiler understands -Wall -Wno-parentheses... yes
checking for pkg-config... pkg-config
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for CAIRO... yes
checking for xdg-mime... no
checking for xdg-desktop-menu... no
checking for xdg-icon-resource... no
checking for GTK... yes
checking whether ptys or pipes should be used... pipes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cmail
config.status: creating po/Makefile.in
config.status: creating osxapp/Info.plist
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing test-stamp-h commands
config.status: executing chmod-cmail commands
Configurations summary:
prefix: /mingw32
datarootdir: ${prefix}/share
datadir: ${datarootdir}
gamedatadir: $(datadir)/games/xboard
desktopdir: $(datadir)/applications
mimedir: $(datadir)/mime/packages
iconsdir: $(datadir)/icons/hicolor/48x48/apps
svgiconsdir: $(datadir)/icons/hicolor/scalable/apps
infodir: ${datarootdir}/info (info files will go here)
sysconfdir: ${prefix}/etc (xboard.conf will go here)
update mimedb: yes
NLS support: yes
GTK: yes
Xaw3d: no
Xaw: no
ptys: pipes
zippy: no
sigint: yes
But make failed with:
- Code: Select all
$ make
make all-recursive
make[1]: Entering directory `/home/herec/xboard-4.8.0'
Making all in po
make[2]: Entering directory `/home/herec/xboard-4.8.0/po'
make[2]: Leaving directory `/home/herec/xboard-4.8.0/po'
make[2]: Entering directory `/home/herec/xboard-4.8.0'
CC backend.o
<command-line>:0:9: error: expected identifier or '(' before string constant
backend.c: In function 'read_from_ics':
backend.c:4024:21: warning: variable 'blackname' set but not used [-Wunused-but-set-variable]
char *whitename, *blackname, *why, *endtoken;
^
backend.c:4024:9: warning: variable 'whitename' set but not used [-Wunused-but-set-variable]
char *whitename, *blackname, *why, *endtoken;
^
backend.c: In function 'HandleMachineMove':
backend.c:9453:10: warning: unknown conversion type character 'l' in format [-Wformat=]
&plylev, &plyext, &curscore, &time, &nodes, buf1) >= 5) {
^
backend.c:9453:10: warning: format '%[^
' expects argument of type 'char *', but argument 7 has type 'long long unsigned int *' [-Wformat=]
backend.c:9453:10: warning: too many arguments for format [-Wformat-extra-args]
backend.c:9601:10: warning: unknown conversion type character 'l' in format [-Wformat=]
&mvtot, mvname) >= 5) {
^
backend.c:9601:10: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'long long unsigned int *' [-Wformat=]
backend.c:9601:10: warning: format '%s' expects argument of type 'char *', but argument 7 has type 'int *' [-Wformat=]
backend.c:9601:10: warning: too many arguments for format [-Wformat-extra-args]
backend.c:9664:10: warning: unknown conversion type character 'l' in format [-Wformat=]
&plylev, &plyext, &curscore, &time, &nodes, buf1) >= 5)
^
backend.c:9664:10: warning: format '%[^
' expects argument of type 'char *', but argument 7 has type 'long long unsigned int *' [-Wformat=]
backend.c:9664:10: warning: too many arguments for format [-Wformat-extra-args]
make[2]: *** [backend.o] Error 1
make[2]: Leaving directory `/home/herec/xboard-4.8.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/herec/xboard-4.8.0'
make: *** [all] Error 2
Leaves me scratching my head. Must be some MinGW quirk as there is no line 0 in backend.c or any file. Does anyone have any ideas?