ghaerr / microwindows

The Nano-X Window System
Other
659 stars 90 forks source link

Is there any up-to-date documentation of how to build fltk with NX11? #34

Open Mathias-Fuchs opened 5 years ago

Mathias-Fuchs commented 5 years ago

Hello! I'd be great if there were ... the most recent information on that topic I've found is this one https://www.fltk.org/articles.php?L1352 from 2014, despite fltk being advertised prominently on the README.md of this repository .. are the instructions given there still valid? Thanks for info and/or adding a few words on the topic! Mathias

georgp24 commented 5 years ago

In the doc/html directory there is a faq2.html file which also describes how to build different versions of fltk for NX11.

Mathias-Fuchs commented 5 years ago

Thanks, ... I saw it and read it but I'm having a few issues:

georgp24 commented 5 years ago

I am sorry my documentation was correct up to last December. Greg has moved and modified files since then. Maybe he can provide new documention.

Mathias-Fuchs commented 5 years ago

ok, thanks ... would be great to have new doc on that topic.

georgp24 commented 5 years ago

Do you want to run FLTK on Linux or what are your plans with NX11 and FLTK?

In the current config file there is a switch "NX11 = Y" which must be set to get an NX11 libary: Libraries to build: microwin, nano-X, nxlib, engine MICROWIN = Y NANOX = Y NUKLEARUI = Y NX11 = Y

Also the switch "ARCH = MACOSX" is probably only useful for Greg who develops on his Mac. Look into the Arch.rules file for valid options, e.g. LINUX-NATIVE

ghaerr commented 5 years ago

I have updated the microwindows/doc/html/faq2.html documentation concerning the path changes to finding the NX11 library. In summary, set NX11=Y in the config file, and FLTK is configured on a system not configured for X11, then point the FLTK includes to the NX11 local versions, which are at microwindows/src/nx11/X11-local/X11, and follow the rest of Georg's instructions in the FAQ. The -lX11 and -lXext libraries in the FLTK makefiles need to be replaced with -lNX11 and -lnano-X.

Let me know if you have other build problems, we're glad to help.

georgp24 commented 5 years ago

Martin, I tested the FLTK build and the documentation and it works as described now. If you develop on Linux you have to modify the config file in the src directory to: ARCH = LINUX-NATIVE and INCFT2LIB = /usr/include/freetype2

georgp24 commented 5 years ago

Mathias, the faq2 file is now current and I hope you will have a chance to test the build again. I got it to work following these instructions. What project do you plan to use Microwindows and FLTK for?

Georg

Mathias-Fuchs commented 5 years ago

Hello Georg, sorry for late answer .... thanks for updating faq2.html! Yes, I'm trying to build fltk on a debian-based SOC that doesn't have X11 (well it does, but I want to get rid of it ...) After copying Configs/config.linux-fb to config and setting NX11=Y (and setting the freetype2 path) I get the following error when make'ing: make[1]: *** No rule to make target '/home/mathias/Downloads/microwindows/src/obj/nx11/Xinerama.o', needed by '/home/mathias/Downloads/microwindows/src/lib/libNX11.a'. Stop. so that it still doesn't build NX11 ... Mathias

EDIT: Uncommenting the line "NXOBJS += Xinerama.o" in the Makefile of the NX11 folder solved that issue ...

georgp24 commented 5 years ago

I am sorry, I forgot to commit the xinerama.c file in my last commit and therefore the NX11 library did not build. Uncommenting the line in the Makefile as you have done should have generated a working version for FLTK. I just made a new commit which includes xinerama.c. I tested NX11 now and it will work with FLTK as described in the faq2.html file.

Georg

georgp24 commented 5 years ago

If you are looking for a very small Linux distro you may try my Nanolinux :) This is based on Tinycore Linux, NX11 and FLTK. https://sourceforge.net/projects/nanolinux/