Hi, I guess this list has been abandoned (no activity since the last release at all), still wanted to share my patch that
1. Further fixes bitblt race for 8bpp graphics on Windows during window init phase (first repaint event sent/processed too fast), locking the DC (and leaving the window white, not always but intermittently across multiple app starts);
2. Fixes LIBBCC.H decls for C++ (posted earlier);
3. Replaces an outdated header <values.h> in speedtst.c;
4. Adds processing of Shift-Tab on Windows, a very popular choice of a key for moving backwards on controls (lbgrx provided it undistinguishable from a regular Tab as returned by GrKeyRead());
5. And finally, removes optimization (-O2) in debug builds (which otherwise clobbers the source code line sequencing and makes it very difficult to use in a debugger).
Hope this helps, AL
Hello,
Yes it seems that grx and maybe mgrx have been abandoned? Don't really know.
Chris
Hi, I guess this list has been abandoned (no activity since the last release at all), still wanted to share my patch that
- Further fixes bitblt race for 8bpp graphics on Windows during
window init phase (first repaint event sent/processed too fast), locking the DC (and leaving the window white, not always but intermittently across multiple app starts);
Fixes LIBBCC.H decls for C++ (posted earlier);
Replaces an outdated header <values.h> in speedtst.c;
Adds processing of Shift-Tab on Windows, a very popular choice of a
key for moving backwards on controls (lbgrx provided it undistinguishable from a regular Tab as returned by GrKeyRead());
- And finally, removes optimization (-O2) in debug builds (which
otherwise clobbers the source code line sequencing and makes it very difficult to use in a debugger).
Hope this helps, AL
Grx mailing list Grx@gnu.de https://www.g-n-u.de/mailman/listinfo/grx
Hi Maurice
These are the chances i did for the most simple build with X11. There were additional issues when enabling tiff, ..., but i think we should fix these first. I also had a first try with pascal headers compatible with freepascal. But this is quite involved and i did not manage to finish the job and left it for later.
****** the apple linker ld has no option -s. ****** No urgent need, it gives a warning only.
diff -r '-x*.*o' ../grx249 2/makedefs.grx ./makedefs.grx 77c77 < LDOPT = -s ---
LDOPT =
****** The linker does not find the X11 libraries and it does not have the -soname option. ****** Libs on macosx do not have .so, but .dylib. ****** I do not completely understand in detail, what's done here with the renaming and ****** how to do this in the same way on macosx. I guess, these changes have a bad smell. ****** If you have some suggestions, i can try to figure out, how to achieve that.
diff -r '-x*.*o' ../grx249 2/src/makefile.x11 ./src/makefile.x11 42c58 < GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.so ---
GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a
44c60 < GRX20SHna = $(GRX20SH).$(GRX_VERSION) ---
GRX20SHna = $(GRX20SH)
146c164 < $(CC) $(LDOPT) -shared -Wl,-soname,$(notdir $(GRX20SHli)) -o $(GRX20SHna) $(LO) ---
$(CC) $(LDOPT) -shared -lX11 -L/usr/X11/lib -o $(GRX20SHna) $(LO)
****** unix does not seem to be set. Could that be achieved? My hack: simply remove the conditions ****** in case you need another switch, darwin is commonly used and can be obtained with uname or similar
diff -r '-x*.*o' ../grx249 2/src/mouse/input.h ./src/mouse/input.h 139c139 < #if !defined(real_time) && defined(unix) ---
#if !defined(real_time)
diff -r '-x*.*o' ../grx249 2/include/grx20.h ./include/grx20.h 112d111 < #if defined(unix) || defined(__unix) || defined(__unix__) || defined(_AIX) 114d112 < #endif
****** the rest are easy and straight forward changes:
****** change of include files: malloc.h -> stdlib.h; values.h -> limits.h
diff -r '-x*.*o' ../grx249 2/src/bgi/bccgrx00.h ./src/bgi/bccgrx00.h 29d28 < #include <malloc.h> 30a30
#include <stdlib.h>
diff -r '-x*.*o' ../grx249 2/src/utilprog/bin2c.c ./src/utilprog/bin2c.c 29c29 < #include <malloc.h> ---
#include <stdlib.h>
diff -r '-x*.*o' ../grx249 2/test/life.c ./test/life.c 23c23 < #include <malloc.h> ---
#include <stdlib.h>
diff -r '-x*.*o' ../grx249 2/test/speedtst.c ./test/speedtst.c 32c32 < #include <values.h> ---
#include <limits.h>
****** rename setmode, because there is already one in a system header file
diff -r '-x*.*o' ../grx249 2/src/vdrivers/vd_xwin.c ./src/vdrivers/vd_xwin.c 73c73 < static int setmode(GrVideoMode *mp,int noclear); ---
static int mysetmode(GrVideoMode *mp,int noclear);
82c82 < setmode, /* mode set */ ---
mysetmode, /* mode set */
97c97 < setmode, /* mode set */ ---
mysetmode, /* mode set */
181c181 < static int setmode(GrVideoMode *mp,int noclear) ---
static int mysetmode(GrVideoMode *mp,int noclear)
Le 25/10/2012 20:20, Schindler Karl-Michael a écrit :
****** The linker does not find the X11 libraries
please check that in makedefs.grx, in the X11 specific section, you have replaced X11BASE=/usr/X11R6 by X11BASE=/usr
and it does not have the -soname option.
****** Libs on macosx do not have .so, but .dylib. ****** I do not completely understand in detail, what's done here with the renaming and ****** how to do this in the same way on macosx. I guess, these changes have a bad smell. ****** If you have some suggestions, i can try to figure out, how to achieve that.
diff -r '-x*.*o' ../grx249 2/src/makefile.x11 ./src/makefile.x11 42c58
< GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.so
GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.a
44c60
< GRX20SHna = $(GRX20SH).$(GRX_VERSION)
GRX20SHna = $(GRX20SH)
146c164
< $(CC) $(LDOPT) -shared -Wl,-soname,$(notdir $(GRX20SHli)) -o $(GRX20SHna) $(LO)
$(CC) $(LDOPT) -shared -lX11 -L/usr/X11/lib -o $(GRX20SHna) $(LO)
try to replace this by
$ diff -r '-x*.*o' grx249.orig/src/makefile.x11 grx249.macosx/src/makefile.osx 42,44c42,44 < GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.so < GRX20SHli = $(GRX20SH).$(word 1,$(subst ., ,$(GRX_VERSION))) < GRX20SHna = $(GRX20SH).$(GRX_VERSION) ---
GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X GRX20SHli = $(GRX20SH).$(word 1,$(subst ., ,$(GRX_VERSION))).dylib GRX20SHna = $(GRX20SH).$(GRX_VERSION).dylib
146c146 < $(CC) $(LDOPT) -shared -Wl,-soname,$(notdir $(GRX20SHli)) -o $(GRX20SHna) $(LO) ---
$(CC) $(LDOPT) -dynamiclib -dylib_install_name,$(notdir
$(GRX20SHli)) -o $(GRX20SHna) $(LO)
this is taken from the makefile of the rts of gpc, which builds the dynamic libgpc, and gpc346u2-patches.diff in the gpc346u2-sources on the microbizz site. May be you will have to replace -dylib_install_name by -dylinker_install_name (I find only the second in the gcc.html help file)
in linux GRX20SHli is libgrx20X.so.2 GRX20SHna is libgrx20X.so.2.4.9 and I do not know if .dylib can replace .so at the same place. I have supposed that .dylib must be at the end (otherwise of course you have only to replace .so by .dylib in the original makefile)
Maurice
Le 27/10/2012 14:58, Maurice Lombardi a écrit :
Le 25/10/2012 20:20, Schindler Karl-Michael a écrit :
****** The linker does not find the X11 libraries
please check that in makedefs.grx, in the X11 specific section, you have replaced X11BASE=/usr/X11R6 by X11BASE=/usr
try to replace this by
--- snip ---
this is taken from the makefile of the rts of gpc, which builds the dynamic libgpc, and build-gpc.command in the gpc346u2-sources on the microbizz site.
the previous won't work for install/uninstall
try instead
$ diff grx249.orig/src/makefile.x11 grx249.macosx/src/makefile.osx 42,44c42,44 < GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X.so < GRX20SHli = $(GRX20SH).$(word 1,$(subst ., ,$(GRX_VERSION))) < GRX20SHna = $(GRX20SH).$(GRX_VERSION) ---
GRX20SH = ../lib/$(GRX_LIB_SUBDIR)/libgrx20X GRX20SHli = $(GRX20SH).$(word 1,$(subst ., ,$(GRX_VERSION))).dylib GRX20SHna = $(GRX20SH).$(GRX_VERSION).dylib
146c146 < $(CC) $(LDOPT) -shared -Wl,-soname,$(notdir $(GRX20SHli)) -o $(GRX20SHna) $(LO) ---
$(CC) $(LDOPT) -dynamiclib -dylib_install_name,$(notdir
$(GRX20SHna)) -o $(GRX20SHna) $(LO) 185c185 < ln -sf $(notdir $(GRX20SHli)) $(DESTDIR)$(libdir)/$(notdir $(GRX20SH)) ---
ln -sf $(notdir $(GRX20SHli)) $(DESTDIR)$(libdir)/$(notdir
$(GRX20SH).dylib) 202c202 < rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SH)) ---
rm -f $(DESTDIR)$(libdir)/$(notdir $(GRX20SH).dylib)
May be you will have to replace -dylib_install_name by -dylinker_install_name (I find only the second in the gcc.html help file)
in linux GRX20SHli is libgrx20X.so.2 GRX20SHna is libgrx20X.so.2.4.9
here you should find in the directory grx249/lib/unix libgrx20X.2.4.9.dylib libgrx20X.2.dylib (symlink to the previous) and after install into /usr/lib the same two plus an additional symlink to the previous libgrx20X.dylib which is referred to in the user programs
Maurice
Le 25/10/2012 20:20, Schindler Karl-Michael a écrit :
I have uploaded to the "more things" sections of GRX a tentative patch for the Mac OS X / X11 system http://grx.gnu.de/macosx.diff
It includes a set of makefile.osx, a saparate section in makedefs.grx, and an update of the configure script
With respect to your suggestions:
1) Mac OS X target is recognized through the conditional defined(__APPLE__) && defined(__MACH__) as in gpc patches from microbizz. It is included in .c/.h files to avoid conflicts witn other targets.
2) GRX_VERSION can be GRX_VERSION_GCC_386_X11 GRX_VERSION_GCC_X86_64_X11 for intel cpus GRX_VERSION_GENERIC_X11 for powerpc but this is used only in demo programs
3) The dynamic lib is named libgrx20X-2.4.9.dylib with symlinks libgrx20X-2.dylib and libgrx20X.dylib like in other dynamic libraries found in XCode.
3) I have left USE_X86DGA_DRIVER stuff I do not know if this makes sense in darwin
4) no change to the readme files and to the manual
All this is completely tentative, as I have no Mac computer to check
Maurice
Le 24/10/2012 07:34, A L a écrit :
I have checked your patches, corrected for an error (the orig and new files where interchanged when generating the patches) and uploaded it in the "more things" section of GRX, where it will be easier to find for users.
I have packed GRX releases for 2.4.7, 2.4.8 and 2.4.9, mainly because Mariano had dropped the GPC and BGI interfaces when forking to MGRX, and I use mainly these two interfaces on djgpp, mingw and linux/x11 systems ! I have added/cleaned contributions/suggestions and bug cleanups from various authors (including some of mine), and backports from MGRX.
But I have no plan to make big improvements. In fact I make mainly lengthy scientific computations, and I use GRX to display in real time 2D and 3D plots of my computations. It is this way much easier to control / interrupt them early than computing blindly and displaying the results at the end whith some standard software, as most people do. GRX suits perfectly my needs for this purpose, but this is not the most demanding graphical application !
If somebody wants to do more, he can step up, and I will be delighted to give him control. But if he is not interested in GPC and BGI, I will still need to maintain them.
Maurice