From 347d35a8c06869627fb1fbf2df494b662e84426b Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 8 Mar 2025 17:08:54 +0100 Subject: Update README and configure related stuff for 1.5.0 - remove configure stuff from more README files - move documentation/README.txt to README.documentation.txt --- README.Unix.txt | 13 ++-- README.Wayland.txt | 18 +++--- README.documentation.txt | 144 +++++++++++++++++++++++++++++++++++++++++++ documentation/README.txt | 151 ---------------------------------------------- src/Fl_win32.cxx | 6 +- test/README-unittests.txt | 36 +++++------ test/forms.cxx | 6 +- 7 files changed, 181 insertions(+), 193 deletions(-) create mode 100644 README.documentation.txt delete mode 100644 documentation/README.txt diff --git a/README.Unix.txt b/README.Unix.txt index b2c572f58..77b9b4390 100644 --- a/README.Unix.txt +++ b/README.Unix.txt @@ -32,10 +32,9 @@ README.Unix.txt - Building FLTK on Unix/Linux Systems ------------------------------------------------------------------- - Note: usage of autotools, configure, and the included Makefiles - to build the FLTK library is deprecated since FLTK 1.4 and will - be removed in the next minor version (1.5). - Please consider using CMake instead, see README.CMake.txt. + Note: usage of autotools, configure, and included Makefiles to + build the FLTK library is no longer available since FLTK 1.5.0. + You must use CMake instead, see README.CMake.txt. ------------------------------------------------------------------- @@ -187,15 +186,11 @@ To update to the latest version, just `cd` into the fltk directory and type git pull If you have installed JPEG and PNG libraries from pkgsrc, configure your -environment as follows so that the FLTK configure script can find them: +environment as follows so that CMake can find them: export CPPFLAGS="-I/usr/pkg/include" export LDFLAGS="-L/usr/pkg/lib" -To install GNU autoconf from pkgsrc: - - cd /usr/pkgsrc/devel/autoconf - bmake install 2.4 OpenSuSE diff --git a/README.Wayland.txt b/README.Wayland.txt index ea834c4cc..08caed437 100644 --- a/README.Wayland.txt +++ b/README.Wayland.txt @@ -34,10 +34,10 @@ CJK text-input methods, as well as dead and compose keys are supported. 2 Wayland Support for FLTK ========================== -On Linux and FreeBSD systems, the FLTK library is by default configured so FLTK apps -do all their windowing through the Wayland protocol, all their graphics with -Cairo or EGL, and all text-drawing with Pango. If no Wayland compositor is -available at run-time, FLTK apps fall back to using X11 for windowing. +On Linux and FreeBSD systems, the FLTK library is by default configured so FLTK +apps do all their windowing through the Wayland protocol, all their graphics +withCairo or EGL, and all text-drawing with Pango. If no Wayland compositor +is available at run-time, FLTK apps fall back to using X11 for windowing. Cairo and Pango remain used for graphics and text, respectively. Environment variable FLTK_BACKEND can be used to control whether Wayland or @@ -122,12 +122,12 @@ On Linux and FreeBSD systems equipped with the adequate software packages hybrid library. On systems lacking all or part of Wayland-required packages, the default building procedure produces a X11-based library. -Use "-D FLTK_BACKEND_WAYLAND=OFF" with CMake or "configure --disable-wayland" -to build FLTK for the X11 library when the default would build for Wayland. +Use "-D FLTK_BACKEND_WAYLAND=OFF" with CMake to build FLTK for the X11 +library when the default would build for Wayland. -CMake option FLTK_BACKEND_X11=OFF or configure argument "--disable-x11" can -be used to produce a Wayland-only library which can be useful, e.g., when -cross-compiling for systems that lack X11 headers and libraries. +CMake option FLTK_BACKEND_X11=OFF can be used to produce a Wayland-only +library which can be useful, e.g., when cross-compiling for systems that +lack X11 headers and libraries. The FLTK Wayland platform uses a library called libdecor which handles window decorations (i.e., titlebars, shade). On very recent Linux distributions (e.g., Debian trixie) diff --git a/README.documentation.txt b/README.documentation.txt new file mode 100644 index 000000000..42f228dd4 --- /dev/null +++ b/README.documentation.txt @@ -0,0 +1,144 @@ +README.documentation.txt +------------------------ + +Documentation is available in HTML and PDF format built using 'doxygen' +since FLTK 1.3. The documentation must be generated in a separate step +or downloaded from FLTK's software download pages. The documentation can +also be accessed online. + +To read the docs after downloading or generating them, open the files: + + build/documentation/html/index.html + build/documentation/fltk.pdf + +with your browser or PDF viewer, respectively. +Note that 'build' represents your CMake build folder. + + +Online Documentation (Latest Release): +-------------------------------------- +A documentation version is available online at the FLTK web site, +along with the PDF version of the manual. The docs on the web site +are usually somewhat older (latest release). The active development +version is updated from time to time. + +Use this URL to find the current online documentation: + + https://www.fltk.org/documentation.php + + +Online Documentation (Daily CI Build): +-------------------------------------- +The documentation of the development branch 'master' is generated +daily in the CI (Continuous Integration) build on our GitLab mirror. +This is experimental and may be discontinued at any time. + +Documentation can be found at these URL's: + + HTML: https://fltk.gitlab.io/fltk/ + PDF: https://fltk.gitlab.io/fltk/fltk.pdf + + +Documentation Download: +----------------------- +To download pre-generated docs, go to + + https://www.fltk.org/software.php + +and look for the files + + fltk--docs-html.tar.gz + fltk--docs-pdf.tar.gz + +Extract the documentation tarballs into the same directory as you +did with the source tarball. + + +Generation of Documentation (Common Part): +------------------------------------------ +To generate the documentation yourself you should have Doxygen +version 1.9.8 or later. Recommended version as of this writing +(March 2025) is 1.12.0 or later. +Older Doxygen versions than 1.9 may or may not work. + +Full documentation generation is supported only on Unix/Linux +platforms that provide a POSIX compatible shell (e.g. 'bash') and +some standard Unix tools. Doxygen alone may be enough to generate +HTML docs but PDF documentation *requires* a POSIX shell and the +mentioned Unix tools. + +On the Windows platform building HTML and particularly PDF docs +*may* work if you install and use MinGW, MSYS2, or Cygwin and all +required LaTeX tools but this is not supported and we don't +recommend it. + +To generate the PDF version you also need a current version of LaTeX. +To install all required packages on recent Debian and Ubuntu Linux +distributions you can install the package 'doxygen-latex' which +"adds dependencies for all LaTeX packages required to build documents +using the default stylesheet" according to its description. + +On other (and older) distributions you may use the packages tetex (older) +or texlive (current as of Ubuntu 18.04) if your distribution provides +them. You may need to install additional fonts and other sub-packages +for the PDF version to be generated correctly. + + +Generation of Documentation with CMake: +--------------------------------------- +We assume that you use an out-of-source build as recommended. +Documentation is not generated in a default build. You must set one or +more CMake options using cmake-gui, ccmake, or cmake -DOPTION... + +For simplicity we use 'make' in the following description. If you +use another build system (e.g. 'ninja') please replace 'make' with +your preferred build command. + +The following two options are predefined ON if you have the +required software packages (doxygen, LaTeX) installed. You can +always leave them ON because the documentation is not built +automatically (it is excluded from the default target "ALL"). + + - FLTK_BUILD_HTML_DOCS:BOOL=ON target: html + - FLTK_BUILD_PDF_DOCS:BOOL=ON target: pdf + +The following two options default to OFF and can be switched ON. +They are only used when installing the software ('make install') +and the corresponding build options are ON. + + - FLTK_INSTALL_HTML_DOCS:BOOL=OFF + - FLTK_INSTALL_PDF_DOCS:BOOL=OFF + +If you switch one or both of the first two options ON, then the build +targets 'html' and/or 'pdf' are generated, respectively. Target 'docs' +is added to generate both 'html' and 'pdf'. As said above, you need +installed Doxygen and LaTeX software for this to work. + +Use 'make html' in the root directory of the build tree to generate the +HTML documentation, or 'make pdf' to generate the PDF version. +'make docs' generates both versions in one step (as would do +'make clean html pdf'). + +To read the HTML or PDF docs, see above, but use the build directory. + +Note: if you enable one or more of the "*INSTALL*" options, then +'make install' will install the docs, but you must still build them +manually, because the generation is not included in the standard ('all') +target. This may be changed in the future. + + +FLTK Developer Snapshots or Git Usage: +-------------------------------------- +There is no pre-generated documentation available if you use a current +developer snapshot or git. You must generate the documentation +yourself or access the online documentation. + + +Bugs and Feature Requests: +-------------------------- +If you find any typos, things that are unclear, or would like to +contribute an example, section, or chapter to the FLTK manual, please +post a question in the fltk group fltk.general or post a bug report +or feature request. For more information see this page: + + https://www.fltk.org/bugs.php diff --git a/documentation/README.txt b/documentation/README.txt deleted file mode 100644 index 7871737a5..000000000 --- a/documentation/README.txt +++ /dev/null @@ -1,151 +0,0 @@ -README.txt (documentation) ---------------------------- -Documentation is available in HTML and PDF format built using 'doxygen' -since FLTK 1.3. The documentation must be generated in a separate step -or downloaded from FLTK's software download pages. The documentation can -also be accessed online. - -To read the docs after downloading or generating them, open the files: - - documentation/html/index.html - documentation/fltk.pdf - -with your browser or PDF viewer, respectively. - - -Online Documentation (Latest Release): --------------------------------------- -A documentation version is available online at the FLTK web site, -along with the PDF version of the manual. The docs on the web site -are usually somewhat older (latest release). The active development -version is updated from time to time. - -Use this URL to find the current online documentation: - - https://www.fltk.org/documentation.php - - -Online Documentation (Daily CI Build): --------------------------------------- -The documentation of the development branch 'master' is generated -daily in the CI (Continuous Integration) build on our GitLab mirror. -This is experimental and may be discontinued at any time. - -Documentation can be found at these URL's: - - HTML: https://fltk.gitlab.io/fltk/ - PDF: https://fltk.gitlab.io/fltk/fltk.pdf - - -Documentation Download: ------------------------ -To download pre-generated docs, go to - - https://www.fltk.org/software.php - -and look for the files - - fltk--docs-html.tar.gz - fltk--docs-pdf.tar.gz - -Extract the documentation tarballs into the same directory as you -did with the source tarball. - - -Generation of Documentation (Common Part): ------------------------------------------- -To generate the documentation yourself you should have Doxygen -version 1.8 or later. Recommended version as of this writing -(October 2023) is 1.9.8 or later. -Older Doxygen versions than 1.8 may or may not work. - -Full documentation generation is supported only on Unix/Linux -platforms that provide a POSIX compatible shell (e.g. 'bash') and -some standard Unix tools. Doxygen alone may be enough to generate -HTML docs but PDF documentation *requires* a POSIX shell and the -mentioned Unix tools. - -On the Windows platform building HTML and particularly PDF docs -*may* work if you install and use MinGW, MSYS2, or Cygwin and all -required LaTeX tools but this is not supported and we don't -recommend it. - -To generate the PDF version you also need a current version of LaTeX. -To install all required packages on recent Debian and Ubuntu Linux -distributions you can install the package 'doxygen-latex' which -"adds dependencies for all LaTeX packages required to build documents -using the default stylesheet" according to its description. - -On other (and older) distributions you may use the packages tetex (older) -or texlive (current as of Ubuntu 18.04) if your distribution provides -them. You may need to install additional fonts and other sub-packages -for the PDF version to be generated correctly. - - -Generation of Documentation with autoconf (configure) + make: -------------------------------------------------------------- -Use "make html" in the documentation directory to generate the HTML -documentation, or "make pdf" to generate the PDF version. "make docs" -generates both versions in one step (as would do "make clean html pdf"). - -To read the HTML or PDF docs, see above. - - -Generation of Documentation with CMake: ---------------------------------------- -We assume that you use an out-of-source build as recommended. -Documentation is not generated in a default build. You must set one or -more CMake options using cmake-gui, ccmake, or cmake -DOPTION... - -For simplicity we use 'make' in the following description. If you -use another build system (e.g. 'ninja') please replace 'make' with -your preferred build command. - -The following two options are predefined ON if you have the -required software packages (doxygen, LaTeX) installed. You can -always leave them ON because the documentation is not built -automatically (it is excluded from the default target "ALL"). - - - FLTK_BUILD_HTML_DOCS:BOOL=ON target: html - - FLTK_BUILD_PDF_DOCS:BOOL=ON target: pdf - -The following two options default to OFF and can be switched ON. -They are only used when installing the software ('make install') -and the corresponding build options are ON. - - - FLTK_INSTALL_HTML_DOCS:BOOL=OFF - - FLTK_INSTALL_PDF_DOCS:BOOL=OFF - -If you switch one or both of the first two options ON, then the build -targets 'html' and/or 'pdf' are generated, respectively. Target 'docs' -is added to generate both 'html' and 'pdf'. As said above, you need -installed Doxygen and LaTeX software for this to work. - -Use 'make html' in the root directory of the build tree to generate the -HTML documentation, or 'make pdf' to generate the PDF version. -'make docs' generates both versions in one step (as would do -'make clean html pdf'). - -To read the HTML or PDF docs, see above, but use the build directory. - -Note: if you enable one or more of the "*INSTALL*" options, then -'make install' will install the docs, but you must still build them -manually, because the generation is not included in the standard ('all') -target. This may be changed in the future. - - -FLTK Developer Snapshots or Git Usage: --------------------------------------- -There is no pre-generated documentation available if you use a current -developer snapshot or git. You must generate the documentation -yourself or access the online documentation. - - -Bugs and Feature Requests: --------------------------- -If you find any typos, things that are unclear, or would like to -contribute an example, section, or chapter to the FLTK manual, please -post a question in the fltk group fltk.general or post a bug report -or feature request. For more information see this page: - - https://www.fltk.org/bugs.php diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index e7539737f..960638887 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,7 +1,7 @@ // // Windows-specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2024 by Bill Spitzak and others. +// Copyright 1998-2025 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -105,8 +105,8 @@ extern void fl_cleanup_pens(void); // MSVC 2010 can't find round() although is included above, // which is surprising because ceil() works fine. -// We could (should?) probably add configure/CMake feature tests for -// round() and ceil() rather than depending on MSVC version numbers. +// We could (should?) probably add CMake feature tests for round() +// and ceil() rather than depending on MSVC version numbers. // AlbrechtS, 02/2010 - Note: we don't know about MSVC 2012 - 2015, see // https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros diff --git a/test/README-unittests.txt b/test/README-unittests.txt index 77489e86f..b51d329de 100644 --- a/test/README-unittests.txt +++ b/test/README-unittests.txt @@ -1,7 +1,7 @@ HOW TO CREATE A NEW UNIT TEST ----------------------------- - 1) Create your new test/unittest_xxx.cxx file (or use an existing one) + 1) Create your new test/unittest_xxx.cxx file (or copy an existing one) 2) In your new cxx file, define a class derived from Fl_Group for your test (e.g. Ut_Test_Foo). @@ -50,30 +50,30 @@ HOW TO CREATE A NEW UNIT TEST 3) Add an entry anywhere to the enum {} at the top of the unittests.h file. Example: - enum { - UT_TEST_ABOUT = 0, - UT_TEST_POINTS, - ... - UT_TEST_FOO, <-- ADD YOUR TEST CLASS NAME IN ALL CAPS - ... - }; + enum { + UT_TEST_ABOUT = 0, + UT_TEST_POINTS, + ... + UT_TEST_FOO, <-- ADD YOUR TEST CLASS NAME IN ALL CAPS + ... + }; 4) Add your new unittest_xxx.cxx file to: - a) test/CMakeLists.txt -- cmake needs this - b) test/Makefile -- configure needs this (?) + test/CMakeLists.txt -- cmake needs this - You should then be able to use cmake to create a build directory that - builds with your new test. e.g. + You should then be able to use cmake to create a build directory that + builds with your new test. e.g. - mkdir build - cmake .. + mkdir build + cd build + cmake .. - ..and from there, you should be able to go through the common - edit/make/run development cycle: + ..and from there, you should be able to go through the common + edit/make/run development cycle: - make -j 4 <-- should build bin/test/unittests with your test - bin/test/unittests <-- run unittests to check your work + make -j 4 <-- should build bin/test/unittests with your test + bin/test/unittests <-- run unittests to check your work 5) That's it! diff --git a/test/forms.cxx b/test/forms.cxx index e19fade77..ba5a4ff58 100644 --- a/test/forms.cxx +++ b/test/forms.cxx @@ -6,7 +6,7 @@ // This demo show the different boxtypes. Note that some // boxtypes are not appropriate for some objects // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2025 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -186,8 +186,8 @@ int main(int argc, char *argv[]) { int main(int argc, char **argv) { fl_message_title("This program needs the Forms compatibility library"); fl_message( - "Please configure FLTK with Forms enabled (--enable-forms)\n" - "or the CMake option FLTK_BUILD_FORMS=ON."); + "Please configure FLTK with Forms enabled, i.e.\n" + "use the CMake option FLTK_BUILD_FORMS=ON."); return 0; } #endif // (FLTK_HAVE_FORMS) -- cgit v1.2.3