More (mostly) documentation updates for FLTK 1.5.0
All files: remove autoconf/configure related stuff, update links. - README.txt: describe prerequisites, provide generic instructions on how to use CMake to build FLTK - test/demo.cxx: remove code used for configure/make build - test/CMakeLists.txt: remove obsolete 'target_compile_definitions()'
This commit is contained in:
parent
f4f93fda15
commit
8838e976a0
@ -258,7 +258,7 @@ The configuration summary should not show any errors. You can now continue to bu
|
|||||||
For the advanced user there are a few more options to the _CMake_ setup. Type
|
For the advanced user there are a few more options to the _CMake_ setup. Type
|
||||||
`cmake -L ../..` to get a complete list of options. These should be pretty
|
`cmake -L ../..` to get a complete list of options. These should be pretty
|
||||||
self-explanatory. Some more details can be found in
|
self-explanatory. Some more details can be found in
|
||||||
[online documentation](https://www.fltk.org/doc-1.4/intro.html#intro_unix).
|
[online documentation](https://www.fltk.org/doc-1.5/intro.html#intro_cmake).
|
||||||
|
|
||||||
<a name="bcm_build"></a>
|
<a name="bcm_build"></a>
|
||||||
### Building FLTK (CMake, make)
|
### Building FLTK (CMake, make)
|
||||||
@ -429,7 +429,7 @@ The configuration summary should not show any errors. You can now continue to bu
|
|||||||
For the advanced user there are a few more options to the _configure_ script. Type
|
For the advanced user there are a few more options to the _configure_ script. Type
|
||||||
`./configure --help` to get a complete list of options. These should be pretty
|
`./configure --help` to get a complete list of options. These should be pretty
|
||||||
self-explanatory. Some more details can be found in
|
self-explanatory. Some more details can be found in
|
||||||
[online documentation](https://www.fltk.org/doc-1.4/intro.html#intro_unix).
|
[online documentation](https://www.fltk.org/doc-1.5/intro.html#intro_cmake).
|
||||||
|
|
||||||
<a name="bam_build"></a>
|
<a name="bam_build"></a>
|
||||||
### Building FLTK (autoconf, make)
|
### Building FLTK (autoconf, make)
|
||||||
@ -507,7 +507,7 @@ CFBundleDocumentTypes/Item 0/CFBundleTypeExtensions/Item 0
|
|||||||
from the current "*" to the desired file extension. Use several items to
|
from the current "*" to the desired file extension. Use several items to
|
||||||
declare several extensions.
|
declare several extensions.
|
||||||
|
|
||||||
- Call function <a href=https://www.fltk.org/doc-1.4/group__group__macosx.html#ga0702a54934d10f5b72157137cf291296>fl\_open\_callback()</a> at the beginning of your main() function to set
|
- Call function <a href=https://www.fltk.org/doc-1.5/group__group__macosx.html#ga0702a54934d10f5b72157137cf291296>fl\_open\_callback()</a> at the beginning of your main() function to set
|
||||||
what function will be called when a file is dropped on the application icon.
|
what function will be called when a file is dropped on the application icon.
|
||||||
|
|
||||||
- In Xcode, set the "Info.plist File" build setting of your target application
|
- In Xcode, set the "Info.plist File" build setting of your target application
|
||||||
|
|||||||
146
README.txt
146
README.txt
@ -1,10 +1,10 @@
|
|||||||
README - Fast Light Tool Kit (FLTK) Version 1.5.0
|
README - Fast Light Tool Kit (FLTK) Version 1.5
|
||||||
-------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
WHAT IS FLTK?
|
What is FLTK?
|
||||||
|
|
||||||
The Fast Light Tool Kit is a cross-platform C++ GUI toolkit for
|
The Fast Light Tool Kit (FLTK) is a cross-platform C++ GUI toolkit
|
||||||
UNIX®/Linux® (X11 or Wayland), Microsoft® Windows®, and macOS®.
|
for UNIX®/Linux® (X11 or Wayland), Microsoft® Windows®, and macOS®.
|
||||||
FLTK provides modern GUI functionality without bloat and supports
|
FLTK provides modern GUI functionality without bloat and supports
|
||||||
3D graphics via OpenGL® and its built-in GLUT emulation.
|
3D graphics via OpenGL® and its built-in GLUT emulation.
|
||||||
It was originally developed by Mr. Bill Spitzak and is currently
|
It was originally developed by Mr. Bill Spitzak and is currently
|
||||||
@ -15,7 +15,7 @@ WHAT IS FLTK?
|
|||||||
https://github.com/fltk/fltk/
|
https://github.com/fltk/fltk/
|
||||||
|
|
||||||
|
|
||||||
LICENSING
|
Licensing
|
||||||
|
|
||||||
FLTK comes with complete free source code. FLTK is available
|
FLTK comes with complete free source code. FLTK is available
|
||||||
under the terms of the GNU Library General Public License with
|
under the terms of the GNU Library General Public License with
|
||||||
@ -24,61 +24,142 @@ LICENSING
|
|||||||
software! (Even Bill Gates could use it.)
|
software! (Even Bill Gates could use it.)
|
||||||
|
|
||||||
|
|
||||||
ON-LINE DOCUMENTATION
|
Online Documentation
|
||||||
|
|
||||||
The documentation in HTML and PDF forms can be created by
|
The documentation in HTML and PDF forms can be created by
|
||||||
Doxygen from the source files. HTML and PDF versions of this
|
Doxygen from the source files. HTML and PDF versions of this
|
||||||
documentation is also available from the FLTK web site at:
|
documentation are also available from the FLTK web site at:
|
||||||
|
|
||||||
https://www.fltk.org/documentation.php
|
https://www.fltk.org/documentation.php
|
||||||
|
|
||||||
|
|
||||||
BUILDING AND INSTALLING FLTK UNDER UNIX AND macOS
|
Prerequisites for Building FLTK
|
||||||
|
|
||||||
Since FLTK 1.5.0 the only available build system is CMake. CMake is a
|
To build FLTK 1.5 and higher you need:
|
||||||
|
|
||||||
|
- CMake
|
||||||
|
- a C++11 capable compiler, e.g. gcc, clang, Visual Studio, Xcode
|
||||||
|
- system specific build files (headers etc.)
|
||||||
|
|
||||||
|
CMake is used to generate the build environment on your system.
|
||||||
|
It can create build environments for a lot of different build tools,
|
||||||
|
please see the CMake documentation for more info. For details and the
|
||||||
|
required CMake version please see README.CMake.txt.
|
||||||
|
|
||||||
|
Since FLTK 1.5 we use C++11 features and you need at least a C++11 capable
|
||||||
|
compiler running in C++11 mode. The minimal C++ standard used for building
|
||||||
|
FLTK and your application *may* be raised in future versions.
|
||||||
|
|
||||||
|
The required header files etc. (build environment or SDK) vary across
|
||||||
|
platforms and are described in platform specific README.* files, e.g. on
|
||||||
|
Unix/Linux systems these are typically provided by the package manager.
|
||||||
|
|
||||||
|
|
||||||
|
Building and Installing FLTK With CMake (Generic Instructions)
|
||||||
|
|
||||||
|
Since FLTK 1.5 the only available build system is CMake. CMake is a
|
||||||
"build system generator" and can be used to create Makefile's, Ninja
|
"build system generator" and can be used to create Makefile's, Ninja
|
||||||
build files, Xcode (macOS), Visual Studio (Windows) IDE files, and
|
build files, Xcode (macOS), Visual Studio (Windows) IDE files, and
|
||||||
many more. Use `cmake --help` to display the available generators
|
many more. Use `cmake --help` or the CMake GUI tools (cmake-gui or
|
||||||
on your platform.
|
ccmake) to display the available generators on your platform.
|
||||||
|
|
||||||
Please see also README.CMake.txt for further details. There are *many*
|
Please see also README.CMake.txt for further details. There are *many*
|
||||||
options to configure the build as you need.
|
options to configure the build as you need.
|
||||||
|
|
||||||
In a nutshell:
|
CMake comes in two flavors: a commandline utility and a GUI program.
|
||||||
|
On many platforms both can be used to generate the build files and
|
||||||
|
even to *build* the project (i.e. the FLTK library and programs).
|
||||||
|
|
||||||
|
The following paragraphs describe both tools in a nutshell.
|
||||||
|
For details please see README.CMake.txt.
|
||||||
|
|
||||||
|
|
||||||
|
Building and Installing FLTK With CMake (Commandline)
|
||||||
|
|
||||||
|
On systems where a commandline `CMake` utility is available (this is
|
||||||
|
the case even on Windows), the commands to build FLTK using CMake can
|
||||||
|
be similar to:
|
||||||
|
|
||||||
$ cd /path/to/fltk
|
$ cd /path/to/fltk
|
||||||
$ cmake . -B build
|
$ cmake . -B build [ options ]
|
||||||
$ cmake --build build
|
$ cmake --build build
|
||||||
|
|
||||||
These commands create the build folder 'build' inside your source tree,
|
These commands create the build folder 'build' inside your source tree,
|
||||||
build the library and all test programs. You may want to test the demo
|
build the library and all test programs. Note that parameters in '[ ... ]'
|
||||||
programs by running `build/bin/test/demo`.
|
are optional and '.' represents the current directory (the source folder).
|
||||||
|
|
||||||
|
You may want to test the demo programs by running `build/bin/test/demo`.
|
||||||
|
|
||||||
|
Instead of building FLTK with a CMake command you can also use the
|
||||||
|
build tool you generated in the first step and/or run CMake from the
|
||||||
|
build directory, for instance:
|
||||||
|
|
||||||
|
$ cd /path/to/fltk
|
||||||
|
$ mkdir build
|
||||||
|
$ cd build
|
||||||
|
$ cmake .. -G "Unix Makefiles" [ options ]
|
||||||
|
$ make [ -j N ]
|
||||||
|
|
||||||
|
You may want to test the demo programs by running `bin/test/demo`.
|
||||||
|
|
||||||
After successful tests you may install the library with the following
|
After successful tests you may install the library with the following
|
||||||
command, but please be aware that this will install FLTK in a system
|
command or a similar one, but please be aware that this will install
|
||||||
directory for system-wide use. We don't recommend this unless you know
|
FLTK in a system directory for system-wide use if you don't change the
|
||||||
|
default installation path. We don't recommend this unless you know
|
||||||
what you're doing.
|
what you're doing.
|
||||||
|
|
||||||
$ sudo cmake --install build # default: to /usr/local/...
|
$ sudo cmake --install build # from the source tree (with CMake)
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
$ sudo make install # from the build folder (with make)
|
||||||
|
|
||||||
|
Other commands (e.g. `ninja`) may be used as well, depending on the
|
||||||
|
CMake generator you used.
|
||||||
|
|
||||||
|
|
||||||
BUILDING FLTK UNDER MICROSOFT WINDOWS
|
Building and Installing FLTK With CMake (GUI)
|
||||||
|
|
||||||
|
On most systems CMake comes with a GUI program called `cmake-gui`, on
|
||||||
|
Unix/Linux like systems also a "TUI" called `ccmake` (a "grapical" utility
|
||||||
|
for a terminal). The latter is out of scope for this README file.
|
||||||
|
|
||||||
|
If you want to use CMake's GUI program, execute it by running `cmake-gui`
|
||||||
|
and then follow the dialog on the screen.
|
||||||
|
|
||||||
|
You need to select the source folder and the build folder at the top
|
||||||
|
of the screen. After clicking on `Configure` CMake will prompt you to
|
||||||
|
select the build system or compilers of your choice. In many cases
|
||||||
|
you can select the default compilers, e.g Visual Studio on Windows.
|
||||||
|
For more details please see the CMake documentation.
|
||||||
|
|
||||||
|
Note: on Windows it may be necessary to run CMake from a "Visual Studio
|
||||||
|
Command Prompt" so CMake can find the existing Visual Studio compilers
|
||||||
|
and SDK's, but details are beyond the scope of this document.
|
||||||
|
|
||||||
|
After running `Configure` successfully (look for error messages in the
|
||||||
|
window) you need to click on `Generate` to create the actual build files,
|
||||||
|
for instance Makefiles, the Visual Studio IDE project files on Windows,
|
||||||
|
or the Xcode IDE project on macOS, etc..
|
||||||
|
|
||||||
|
With some CMake generators for IDE projects (VS, Xcode) you can finally
|
||||||
|
click on `Open Project` to launch the IDE tool of your choice. In other
|
||||||
|
cases you may execute the build system by running `make`, `ninja`, etc.
|
||||||
|
after leaving the GUI to build the library and FLTK (test) programs.
|
||||||
|
|
||||||
|
|
||||||
|
Building FLTK under Microsoft Windows
|
||||||
|
|
||||||
There are two ways to build FLTK under Microsoft Windows.
|
There are two ways to build FLTK under Microsoft Windows.
|
||||||
|
|
||||||
The first is to use CMake to create the Visual C++ project or NMake files
|
The first is to use CMake to create the Visual Studio IDE project or
|
||||||
in your favorite development directory, then build FLTK with Visual Studio.
|
NMake files as described above, then build FLTK with Visual Studio or
|
||||||
|
NMake.
|
||||||
|
|
||||||
The second method is to use a GNU-based development tool. To build with
|
The second method is to use a GNU-based development tool. To build with
|
||||||
the Cygwin, MinGW, or MSYS2 tools, use CMake to create the build files
|
the Cygwin, MinGW, or MSYS2 tools, use CMake to create the build files
|
||||||
as described above.
|
from the `cmake` commandline and build the library as described above.
|
||||||
|
On some of these systems you may also install and use `cmake-gui`.
|
||||||
In most cases it's useful to install a binary CMake distribution from
|
|
||||||
https://cmake.org/download/ .
|
|
||||||
|
|
||||||
Then execute `cmake-gui` and generate Visual Studio project files or any
|
|
||||||
other build files of your choice, e.g. "Unix Makefiles" for MinGW, but
|
|
||||||
note that there are other options as well.
|
|
||||||
|
|
||||||
See README.Windows.txt and README.CMake.txt for more info.
|
See README.Windows.txt and README.CMake.txt for more info.
|
||||||
|
|
||||||
@ -86,7 +167,8 @@ BUILDING FLTK UNDER MICROSOFT WINDOWS
|
|||||||
BUILDING HTML DOCUMENTATION
|
BUILDING HTML DOCUMENTATION
|
||||||
|
|
||||||
FLTK uses Doxygen for documentation, so you'll at least need doxygen
|
FLTK uses Doxygen for documentation, so you'll at least need doxygen
|
||||||
installed for creating html docs, and LaTeX for creating PDF docs.
|
installed for creating html docs, and additionally LaTeX for creating
|
||||||
|
PDF documentation.
|
||||||
|
|
||||||
If you want to build the documentation, change directory to your build
|
If you want to build the documentation, change directory to your build
|
||||||
folder, for instance
|
folder, for instance
|
||||||
@ -100,7 +182,7 @@ BUILDING HTML DOCUMENTATION
|
|||||||
|
|
||||||
Note: instead of using the generic CMake commands above you can also
|
Note: instead of using the generic CMake commands above you can also
|
||||||
use equivalent commands of your build system, e.g. `make html` or
|
use equivalent commands of your build system, e.g. `make html` or
|
||||||
`ninja pdf`.
|
`ninja pdf`, respectively.
|
||||||
|
|
||||||
|
|
||||||
INTERNET RESOURCES
|
INTERNET RESOURCES
|
||||||
|
|||||||
@ -16,7 +16,7 @@ It has always been Bill's belief that the GUI API of all
|
|||||||
modern systems is much too high level. Toolkits (even FLTK) are
|
modern systems is much too high level. Toolkits (even FLTK) are
|
||||||
\e not what should be provided and documented as part of an
|
\e not what should be provided and documented as part of an
|
||||||
operating system. The system only has to provide arbitrary
|
operating system. The system only has to provide arbitrary
|
||||||
shaped but featureless windows, a powerful set of graphics
|
shaped but featureless windows, a powerful set of graphics
|
||||||
drawing calls, and a simple \e unalterable method of
|
drawing calls, and a simple \e unalterable method of
|
||||||
delivering events to the owners of the windows. NeXT (if you
|
delivering events to the owners of the windows. NeXT (if you
|
||||||
ignored NextStep) provided this, but they chose to hide it and
|
ignored NextStep) provided this, but they chose to hide it and
|
||||||
@ -83,6 +83,10 @@ simple pixel drawing, but this experimental code is not included
|
|||||||
in FLTK 1.4. There are thoughts to enable more platforms in later
|
in FLTK 1.4. There are thoughts to enable more platforms in later
|
||||||
FLTK versions.
|
FLTK versions.
|
||||||
|
|
||||||
|
FLTK 1.5 removed autotools (configure + Makefile) support in favor
|
||||||
|
of exclusive use of CMake to generate the build files. FLTK 1.5
|
||||||
|
allows to use a basic set of C++ features from the C++11 standard.
|
||||||
|
|
||||||
|
|
||||||
\section intro_features Features
|
\section intro_features Features
|
||||||
|
|
||||||
@ -93,12 +97,12 @@ parts that are used, and thus do not get linked in. This allows
|
|||||||
you to make an easy-to-install program or to modify FLTK to
|
you to make an easy-to-install program or to modify FLTK to
|
||||||
the exact requirements of your application without worrying
|
the exact requirements of your application without worrying
|
||||||
about bloat. FLTK works fine as a shared library, though, and
|
about bloat. FLTK works fine as a shared library, though, and
|
||||||
is now included with several Linux distributions.
|
is included with several Linux distributions.
|
||||||
|
|
||||||
Here are some of the core features unique to FLTK:
|
Here are some of the core features unique to FLTK:
|
||||||
|
|
||||||
Note: sizes given below are mostly from 32-bit systems and FLTK 1.1
|
Note: sizes given below are mostly from 32-bit systems and FLTK 1.1
|
||||||
or earlier, this list needs updates for current FLTK (1.4).
|
or earlier, this list needs updates for current FLTK 1.5 (64-bit).
|
||||||
|
|
||||||
\li sizeof(Fl_Widget) == 64 to 92 (120 in FLTK 1.4 on 64-bit Linux).
|
\li sizeof(Fl_Widget) == 64 to 92 (120 in FLTK 1.4 on 64-bit Linux).
|
||||||
|
|
||||||
@ -110,19 +114,21 @@ or earlier, this list needs updates for current FLTK (1.4).
|
|||||||
(FLTK 1.4 with more widgets on 64-bit Linux: 2.3 MB and
|
(FLTK 1.4 with more widgets on 64-bit Linux: 2.3 MB and
|
||||||
2.0 MB on 32-bit Windows).
|
2.0 MB on 32-bit Windows).
|
||||||
|
|
||||||
\li Written directly atop core libraries (Xlib, Wayland, Windows or Cocoa) for
|
\li Written directly atop core libraries (Xlib, Wayland, Windows or Cocoa)
|
||||||
maximum speed, and carefully optimized for code size and performance.
|
for maximum speed and carefully optimized for code size and performance.
|
||||||
|
|
||||||
\li Precise low-level compatibility between the X11, Windows and MacOS
|
\li Precise low-level compatibility between the X11/Wayland, Windows, and
|
||||||
versions - only about 10% of the code is different.
|
macOS versions - only about 10% of the code is different.
|
||||||
|
|
||||||
\li Interactive user interface builder program FLUID. Its output is
|
\li Interactive user interface builder program FLUID. Its output is
|
||||||
human-readable and editable C++ source code.
|
human-readable and editable C++ source code.
|
||||||
|
|
||||||
\li Support for overlay hardware, with emulation if none is available.
|
\li Support for overlay hardware, with emulation if none is available.
|
||||||
|
Note: hardware support has been removed in 1.4.0.
|
||||||
|
|
||||||
\li Very small & fast portable 2-D drawing library to hide Xlib, Cairo,
|
\li Very small & fast portable 2-D drawing library to hide Xlib, Cairo,
|
||||||
Windows, or macOS Quartz.
|
Windows, or macOS Quartz. Since FLTK 1.4 Wayland graphics use Cairo
|
||||||
|
for drawing. This is optionally available for X11 drawing as well.
|
||||||
|
|
||||||
\li OpenGL/Mesa drawing area widget.
|
\li OpenGL/Mesa drawing area widget.
|
||||||
|
|
||||||
@ -175,142 +181,46 @@ target in the CMake build environment.
|
|||||||
|
|
||||||
\section intro_cmake Building and Installing FLTK with CMake
|
\section intro_cmake Building and Installing FLTK with CMake
|
||||||
|
|
||||||
Starting with version 1.4, the recommended FLTK building system is CMake.
|
Starting with version 1.4, the \b recommended FLTK build system was CMake.
|
||||||
|
Since FLTK 1.5.0 CMake is the \b only available build system for FLTK.
|
||||||
|
|
||||||
CMake is a "Build System Generator" that can generate build environments
|
CMake is a "Build System Generator" that can generate build environments
|
||||||
for usage with Ninja, Make, and many more, for instance IDE's.
|
for usage with Ninja, Make, and many more, for instance several IDE's.
|
||||||
See file README.CMake.txt of the FLTK source tree for more information.
|
See file README.CMake.txt of the FLTK source tree for more information.
|
||||||
|
|
||||||
\note
|
By default CMake will look for a C++ compiler named \p CC, \p c++, \p g++,
|
||||||
In FLTK 1.4 you can also use \p configure and \p make as follows to build and
|
or \p gcc. To use another compiler you can set the \p CXX and \p CC
|
||||||
install FLTK. However, configure/make support will be dropped in FLTK 1.5.0.
|
environment variables for the C++ and C compiler, respectively. The code
|
||||||
|
to use depends on your shell, for instance:
|
||||||
|
|
||||||
\section intro_unix Building and Installing FLTK Under UNIX and macOS with make
|
|
||||||
|
|
||||||
In most cases you can just type "make". This will run configure with
|
|
||||||
the default of no options and then compile everything.
|
|
||||||
|
|
||||||
FLTK uses GNU autoconf to configure itself for your UNIX
|
|
||||||
platform. The main things that the configure script will look
|
|
||||||
for are the X11 and OpenGL (or Mesa) header and library files.
|
|
||||||
If these cannot be found in the standard include/library
|
|
||||||
locations you'll need to define the \p CFLAGS,
|
|
||||||
\p CXXFLAGS, and \p LDFLAGS environment variables.
|
|
||||||
For the Bourne and Korn shells you'd use:
|
|
||||||
|
|
||||||
\code
|
\code
|
||||||
CFLAGS=-Iincludedir; export CFLAGS
|
CXX=clang++; export CXX
|
||||||
CXXFLAGS=-Iincludedir; export CXXFLAGS
|
setenv CXX "clang++"
|
||||||
LDFLAGS=-Llibdir; export LDFLAGS
|
|
||||||
|
CC=clang; export CC
|
||||||
|
setenv CC "clang"
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
For C shell and tcsh, use:
|
Then execute CMake like
|
||||||
|
\code
|
||||||
|
cd /path/to/fltk
|
||||||
|
cmake . -B build [ -G <GENERATOR> ] [ options ... ]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Note that you can also specify the compiler and build tools on the CMake
|
||||||
|
command line or in the CMake GUI.
|
||||||
|
|
||||||
|
When CMake is done you can just run CMake again to build the FLTK library,
|
||||||
|
fluid, fltk-options (setup tool), and all test programs, depending on the
|
||||||
|
configuration.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
setenv CFLAGS "-Iincludedir"
|
cmake --build build
|
||||||
setenv CXXFLAGS "-Iincludedir"
|
|
||||||
setenv LDFLAGS "-Llibdir"
|
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
By default configure will look for a C++ compiler named
|
To install the library, become root and type "cmake --install build".
|
||||||
\p CC, \p c++, \p g++, or \p gcc in that
|
This will copy the "fluid" executable to "bindir", the header files
|
||||||
order. To use another compiler you need to set the \p CXX
|
to "includedir", and the library files to "libdir".
|
||||||
environment variable:
|
|
||||||
|
|
||||||
\code
|
|
||||||
CXX=xlC; export CXX
|
|
||||||
setenv CXX "xlC"
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
The \p CC environment variable can also be used to
|
|
||||||
override the default C compiler (\p cc or \p gcc),
|
|
||||||
which is used for a few FLTK source files.
|
|
||||||
|
|
||||||
You can run configure yourself to get the exact setup you need.
|
|
||||||
Type "./configure <options>", where some of the options are:
|
|
||||||
|
|
||||||
\par --enable-cygwin
|
|
||||||
Enable the Cygwin libraries under Windows
|
|
||||||
|
|
||||||
\par --enable-debug
|
|
||||||
Enable debugging code & symbols
|
|
||||||
|
|
||||||
\par --disable-gl
|
|
||||||
Disable OpenGL support
|
|
||||||
|
|
||||||
\par --disable-svg
|
|
||||||
Disable support of reading and writing of Scalable Vector Graphics (.svg) files.
|
|
||||||
|
|
||||||
\par --disable-print
|
|
||||||
Disable print support for an X11/Wayland platform
|
|
||||||
|
|
||||||
\par --enable-shared
|
|
||||||
Enable generation of shared libraries
|
|
||||||
|
|
||||||
\par --enable-threads
|
|
||||||
Enable multithreading support
|
|
||||||
|
|
||||||
\par --enable-wayland
|
|
||||||
This is the default for Linux and FreeBSD systems equipped with the Wayland software.
|
|
||||||
Enable the use of Wayland for all window operations, of Cairo for all graphics, and
|
|
||||||
of Pango for text drawing. Resulting FLTK apps run as Wayland clients if a Wayland
|
|
||||||
compositor is available at run-time, and as X11 clients otherwise but keep using
|
|
||||||
Cairo and Pango for all graphics.
|
|
||||||
|
|
||||||
\par --disable-xft
|
|
||||||
Disables the Xft library, resulting in non anti-aliased fonts (X11 platform).
|
|
||||||
This is not recommended.
|
|
||||||
|
|
||||||
\par --enable-usecairo
|
|
||||||
All drawing operations use the Cairo library (rather than Xlib) producing
|
|
||||||
antialiased graphics (X11 platform, implies --enable-pango).
|
|
||||||
|
|
||||||
\par --enable-pango
|
|
||||||
Enable the Pango library for drawing any text in any script with any font
|
|
||||||
under X11/Wayland.
|
|
||||||
|
|
||||||
\par --enable-x11
|
|
||||||
When targeting Cygwin, build with X11 GUI instead of windows GDI.
|
|
||||||
Also applicable to macOS platforms supplemented with XQuartz.
|
|
||||||
|
|
||||||
\par --enable-cairo
|
|
||||||
Enable support of class Fl_Cairo_Window (all platforms, requires Cairo as
|
|
||||||
an external library).
|
|
||||||
|
|
||||||
\par --enable-cairoext
|
|
||||||
Enable the FLTK instrumentation for cairo extended use (implies --enable-cairo).
|
|
||||||
|
|
||||||
\par --disable-gdiplus
|
|
||||||
Don't use GDI+ when drawing curves and oblique lines (Windows platform).
|
|
||||||
|
|
||||||
\par --enable-cp936
|
|
||||||
Under X11, enable use of the GB2312 locale.
|
|
||||||
|
|
||||||
\par --bindir=/path
|
|
||||||
Set the location for executables. [default = $prefix/bin]
|
|
||||||
|
|
||||||
\par --datadir=/path
|
|
||||||
Set the location for data files. [default = $prefix/share]
|
|
||||||
|
|
||||||
\par --libdir=/path
|
|
||||||
Set the location for libraries. [default = $prefix/lib]
|
|
||||||
|
|
||||||
\par --includedir=/path
|
|
||||||
Set the location for include files. [default = $prefix/include]
|
|
||||||
|
|
||||||
\par --mandir=/path
|
|
||||||
Set the location for man pages. [default = $prefix/man]
|
|
||||||
|
|
||||||
\par --prefix=/dir
|
|
||||||
Set the directory prefix for files. [default = /usr/local]
|
|
||||||
|
|
||||||
When the configure script is done you can just run the
|
|
||||||
"make" command. This will build the library, FLUID tool,
|
|
||||||
fltk-options (setup tool), and all of the test programs.
|
|
||||||
|
|
||||||
To install the library, become root and type "make install".
|
|
||||||
This will copy the "fluid" executable to "bindir", the header
|
|
||||||
files to "includedir", and the library files to "libdir".
|
|
||||||
|
|
||||||
|
|
||||||
\section intro_windows Building FLTK Under Microsoft Windows
|
\section intro_windows Building FLTK Under Microsoft Windows
|
||||||
@ -321,51 +231,62 @@ up-to-date information for this release may be available in the files
|
|||||||
these files to determine if there are changes that may be
|
these files to determine if there are changes that may be
|
||||||
applicable to your build environment.
|
applicable to your build environment.
|
||||||
|
|
||||||
FLTK 1.4 is officially supported on Windows (2000,) 2003,
|
FLTK 1.5 is \b officially \b supported on Windows 10 (11) and later. We don't
|
||||||
XP, and later. Older Windows versions prior to Windows 2000
|
intend to remove the ability to build and run FLTK 1.5 programs on older
|
||||||
are not officially supported but may still work.
|
Windows versions but the FLTK Team can't build and test on Windows systems
|
||||||
The main reason is that the OS version needs to support UTF-8.
|
that are no longer supported by Microsoft. Therefore, such older systems
|
||||||
FLTK 1.4 is known to work on recent versions of Windows such as
|
(including Windows 10, starting in Oct. 2025, when Microsoft does no longer
|
||||||
Windows 7, Windows 8/8.1, Windows 10 and Windows 11, and has been
|
support Windows 10) may work with FLTK or not.
|
||||||
reported to work in both 32-bit and 64-bit Windows versions.
|
|
||||||
|
\note FLTK 1.4 is known to work on Windows (2000,) 2003, XP, and later. The
|
||||||
|
main prerequisite is that the OS version supports UTF-8. FLTK 1.4 is also
|
||||||
|
known to work on recent versions of Windows such as Windows 7, Windows 8/8.1,
|
||||||
|
Windows 10, and Windows 11, and has been reported to work in both 32-bit and
|
||||||
|
64-bit Windows versions. If you need to use FLTK on older versions than
|
||||||
|
Windows 11 (or Windows 10) you may use FLTK 1.4.x.
|
||||||
|
|
||||||
|
\n
|
||||||
|
|
||||||
\note Libraries built by any one of the following build environments
|
\note Libraries built by any one of the following build environments
|
||||||
can not be mixed with object files from any of the other environments
|
can not be mixed with object files from any of the other environments
|
||||||
because they use incompatible C++ conventions internally.
|
because they use incompatible C++ conventions internally.
|
||||||
|
|
||||||
FLTK currently supports the following development environments on the
|
FLTK currently supports the following development environments on the
|
||||||
Windows platform:
|
Windows platform:
|
||||||
|
|
||||||
|
|
||||||
\subsection intro_msvc Free and Commercial Microsoft Visual Studio Versions
|
\subsection intro_msvc Free and Commercial Microsoft Visual Studio Versions
|
||||||
|
|
||||||
Visual Studio 2015 Community or later versions use workspace and project
|
Visual Studio 2015 Community or later versions use workspace and project
|
||||||
files generated by CMake. Older versions and the commercial versions can
|
files generated by CMake. Older versions and the commercial versions can
|
||||||
be used as well, if they can open the project files generated by CMake.
|
be used as well, if they can open the project files generated by CMake.
|
||||||
FLTK support of Visual C++ is limited to the support of CMake for these
|
However, FLTK 1.5 and later requires newer C++ features (C++11 or higher)
|
||||||
Visual Studio versions.
|
that may not be available in older versions of Visual Studio.
|
||||||
Be sure to get your service packs!
|
|
||||||
|
|
||||||
Since FLTK 1.4 the project files MUST be generated with CMake.
|
FLTK support of Visual Studio is limited to CMake's support for these
|
||||||
Please read "README.CMake.txt" for more information about this.
|
Visual Studio versions. Be sure to get your service packs!
|
||||||
|
|
||||||
|
Since FLTK 1.5 the project files MUST be generated with CMake. Please
|
||||||
|
read "README.txt", "README.CMake.txt", and "README.Windows.txt" for more
|
||||||
|
information about this.
|
||||||
|
|
||||||
|
|
||||||
\subsection intro_msvc_dll Using the Visual C++ DLL Library
|
\subsection intro_msvc_dll Using the Visual C++ DLL Library
|
||||||
|
|
||||||
The Visual Studio project files can be used to build a DLL version
|
The Visual Studio project files can be used to build a DLL version of the
|
||||||
of the FLTK library if CMake option 'FLTK_BUILD_SHARED_LIBS=ON' is
|
FLTK library if CMake option 'FLTK_BUILD_SHARED_LIBS=ON' is set. Because
|
||||||
set. Because of name mangling differences between PC compilers (even
|
of name mangling differences between PC compilers (even between different
|
||||||
between different versions of Visual Studio) you can only use the DLL
|
versions of Visual Studio) you can only use the DLL that is generated with
|
||||||
that is generated with the same compiler version that you built it with.
|
the same compiler version that you built it with.
|
||||||
|
|
||||||
When compiling an application or DLL that uses the FLTK DLL with Visual
|
When compiling an application or DLL that uses the FLTK DLL with Visual
|
||||||
Studio, you need to define the \p FL_DLL preprocessor symbol to get
|
Studio, you need to define the \p FL_DLL preprocessor symbol to get
|
||||||
the correct linkage commands embedded within the FLTK header files.
|
the correct linkage commands embedded within the FLTK header files.
|
||||||
|
|
||||||
New since FLTK 1.4.0:
|
New since FLTK 1.4.0:
|
||||||
|
|
||||||
If you build your application project with CMake and use the CMake target
|
If you build your application project with CMake and use the CMake target
|
||||||
'fltk::fltk-shared' to link your application, then 'FL_DLL' is defined
|
'fltk::fltk-shared' to link your application, then 'FL_DLL' is defined
|
||||||
automatically for you (by CMake Compile Definition). If you use your
|
automatically for you (by CMake Compile Definitions). If you use your
|
||||||
own (hand-made) Visual Studio project you still need to define FL_DLL
|
own (hand-made) Visual Studio project you still need to define FL_DLL
|
||||||
to compile all source files that use FLTK headers.
|
to compile all source files that use FLTK headers.
|
||||||
|
|
||||||
@ -374,18 +295,16 @@ to compile all source files that use FLTK headers.
|
|||||||
|
|
||||||
If using Cygwin with the Cygwin shell, or MinGW with the Msys shell,
|
If using Cygwin with the Cygwin shell, or MinGW with the Msys shell,
|
||||||
these build environments behave very much like a Unix or macOS build
|
these build environments behave very much like a Unix or macOS build
|
||||||
and the notes above in the section on
|
and the notes above can be applied. Build files are generated by CMake for
|
||||||
<i>Building and Installing FLTK Under UNIX and Apple macOS</i>
|
the platform you are using. See README.CMake.txt for more info.
|
||||||
apply, in particular the descriptions of using the
|
|
||||||
"configure" script and its related options.
|
|
||||||
|
|
||||||
In general for a build using these tools, e.g. for the Msys shell with
|
In general for a build using these tools, e.g. for the Msys shell with
|
||||||
MinGW, it should suffice to "cd" into the directory where you have
|
MinGW, it should suffice to "cd" into the directory where you have
|
||||||
extracted the FLTK tarball and type:
|
extracted the FLTK tarball and type:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
./configure
|
cmake . -B build
|
||||||
make
|
cmake --build build
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
This will build the FLTK libraries and they can then be
|
This will build the FLTK libraries and they can then be
|
||||||
@ -398,43 +317,39 @@ For example, if you "install" the libraries using Msys/MinGW
|
|||||||
with the following command
|
with the following command
|
||||||
|
|
||||||
\code
|
\code
|
||||||
make install
|
cmake --install build
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
then Msys will "install" the libraries to where it thinks
|
then Msys will "install" the libraries to where it thinks the path
|
||||||
the path "/usr/local/" leads to. If you only ever build code
|
"/usr/local/" leads to. If you only ever build code from within the Msys
|
||||||
from within the Msys environment this works well, but the
|
environment this works well, but the actual "Windows path" these files
|
||||||
actual "Windows path" these files are located in will be
|
are located in will be something like "C:\msys\1.0\local\lib", depending
|
||||||
something like "C:\msys\1.0\local\lib", depending
|
on where your Msys installation is rooted, which may not be useful to
|
||||||
on where your Msys installation is rooted, which may
|
other tools.
|
||||||
not be useful to other tools.
|
|
||||||
|
|
||||||
If you want to install your built FLTK libraries in a
|
If you want to install your built FLTK libraries in a
|
||||||
non-standard location you may do:
|
non-standard location you may do:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
sh configure --prefix=C:/FLTK
|
cmake . -B build -D CMAKE_INSTALL_PATH="C:/FLTK"
|
||||||
make
|
cmake --build build
|
||||||
|
cmake --install build
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Where the value passed to "prefix" is the path at which
|
Where the value passed to "CMAKE_INSTALL_PATH" is the path at which
|
||||||
you would like FLTK to be installed.
|
you would like FLTK to be installed. Depending on the build environment
|
||||||
|
using standard Windows path syntax may work, or you need to use MinGW
|
||||||
A subsequent invocation of "make install" will then place
|
(or Cygwin) syntax.
|
||||||
the FLTK libraries and header files into that path.
|
|
||||||
|
|
||||||
The other options to "configure" may also be used to
|
|
||||||
tailor the build to suit your environment.
|
|
||||||
|
|
||||||
|
|
||||||
\section intro_internet Internet Resources
|
\section intro_internet Internet Resources
|
||||||
|
|
||||||
FLTK is available on the 'net in a bunch of locations:
|
FLTK is available on the internet in a bunch of locations:
|
||||||
|
|
||||||
\par FLTK Source Repository on GitHub
|
\par FLTK Source Repository on GitHub
|
||||||
https://github.com/fltk/fltk
|
https://github.com/fltk/fltk
|
||||||
|
|
||||||
\par WWW
|
\par WWW (fltk.org)
|
||||||
https://www.fltk.org/ <br>
|
https://www.fltk.org/ <br>
|
||||||
https://www.fltk.org/bugs.php [for reporting bugs] <br>
|
https://www.fltk.org/bugs.php [for reporting bugs] <br>
|
||||||
https://www.fltk.org/software.php [download source code]<br>
|
https://www.fltk.org/software.php [download source code]<br>
|
||||||
@ -445,6 +360,12 @@ https://groups.google.com/forum/#!forum/fltkgeneral [Google Groups interface] <b
|
|||||||
news://fltk.org:1024/ [NNTP interface]<br>
|
news://fltk.org:1024/ [NNTP interface]<br>
|
||||||
https://www.fltk.org/newsgroups.php [web interface]
|
https://www.fltk.org/newsgroups.php [web interface]
|
||||||
|
|
||||||
|
\par GitHub
|
||||||
|
https://github.com/fltk/fltk
|
||||||
|
https://github.com/fltk/fltk/discussions [FLTK Discussions on GitHub]
|
||||||
|
https://github.com/fltk/fltk/discussions/categories/q-a [Q&A: Questions and Answers]
|
||||||
|
https://github.com/fltk/fltk/releases [Releases, i.e. Source Code and Documentation]
|
||||||
|
|
||||||
|
|
||||||
\section intro_reporting Reporting Bugs
|
\section intro_reporting Reporting Bugs
|
||||||
|
|
||||||
@ -455,7 +376,8 @@ or ask for help on using FLTK.
|
|||||||
|
|
||||||
For general support and questions, please use the fltk.general newsgroup
|
For general support and questions, please use the fltk.general newsgroup
|
||||||
(see above, "NNTP Newsgroups") or the web interface to the newsgroups at
|
(see above, "NNTP Newsgroups") or the web interface to the newsgroups at
|
||||||
<A href="https://www.fltk.org/newsgroups.php">https://www.fltk.org/newsgroups.php</A>.
|
<A href="https://www.fltk.org/newsgroups.php">https://www.fltk.org/newsgroups.php</A>,
|
||||||
|
or GitHub Discussions (see link above).
|
||||||
|
|
||||||
\htmlonly
|
\htmlonly
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@ -1379,14 +1379,14 @@ void show_help(const char *name) {
|
|||||||
"the <code>.cxx</code> file so it still appears to be a single source file.<p>"
|
"the <code>.cxx</code> file so it still appears to be a single source file.<p>"
|
||||||
"<img src=\"embedded:/fluid_flow_chart_800.png\"></p>"
|
"<img src=\"embedded:/fluid_flow_chart_800.png\"></p>"
|
||||||
"<p>More information is available online at <a href="
|
"<p>More information is available online at <a href="
|
||||||
"\"https://www.fltk.org/doc-1.4/fluid.html\">https://www.fltk.org/</a>"
|
"\"https://www.fltk.org/doc-1.5/fluid.html\">https://www.fltk.org/</a>"
|
||||||
"</body></html>"
|
"</body></html>"
|
||||||
);
|
);
|
||||||
} else if (strcmp(name, "license.html")==0) {
|
} else if (strcmp(name, "license.html")==0) {
|
||||||
fl_open_uri("https://www.fltk.org/doc-1.4/license.html");
|
fl_open_uri("https://www.fltk.org/doc-1.5/license.html");
|
||||||
return;
|
return;
|
||||||
} else if (strcmp(name, "index.html")==0) {
|
} else if (strcmp(name, "index.html")==0) {
|
||||||
fl_open_uri("https://www.fltk.org/doc-1.4/index.html");
|
fl_open_uri("https://www.fltk.org/doc-1.5/index.html");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
snprintf(helpname, sizeof(helpname), "https://www.fltk.org/%s", name);
|
snprintf(helpname, sizeof(helpname), "https://www.fltk.org/%s", name);
|
||||||
|
|||||||
@ -352,5 +352,3 @@ file(COPY
|
|||||||
# The main test program 'demo' needs additional hints and configurations.
|
# The main test program 'demo' needs additional hints and configurations.
|
||||||
# Note: CMake defines "CMAKE_INTDIR" which is the build type folder (e.g. "Debug")
|
# Note: CMake defines "CMAKE_INTDIR" which is the build type folder (e.g. "Debug")
|
||||||
# for multi config builds (MSVC, Xcode)
|
# for multi config builds (MSVC, Xcode)
|
||||||
|
|
||||||
target_compile_definitions (demo PRIVATE GENERATED_BY_CMAKE)
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Main demo program for the Fast Light Tool Kit (FLTK).
|
// Main demo program for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// 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
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
@ -549,7 +549,6 @@ int main(int argc, char **argv) {
|
|||||||
fix_path(app_path);
|
fix_path(app_path);
|
||||||
|
|
||||||
// fluid's path is relative to app_path:
|
// fluid's path is relative to app_path:
|
||||||
// - "../fluid" for autoconf/make builds
|
|
||||||
// - ".." (parent directory) for single configuration CMake builds
|
// - ".." (parent directory) for single configuration CMake builds
|
||||||
// - "../../$CMAKE_INTDIR" for multi-config (Visual Studio or Xcode) CMake builds
|
// - "../../$CMAKE_INTDIR" for multi-config (Visual Studio or Xcode) CMake builds
|
||||||
|
|
||||||
@ -564,16 +563,11 @@ int main(int argc, char **argv) {
|
|||||||
fix_path(fluid_path); // remove folder name ("test")
|
fix_path(fluid_path); // remove folder name ("test")
|
||||||
fix_path(options_path);
|
fix_path(options_path);
|
||||||
|
|
||||||
#if !defined(GENERATED_BY_CMAKE)
|
|
||||||
strcat(fluid_path, "/fluid");
|
|
||||||
strcat(options_path, "/fltk-options");
|
|
||||||
#else
|
|
||||||
// CMake: potentially Visual Studio or Xcode (multi config)
|
// CMake: potentially Visual Studio or Xcode (multi config)
|
||||||
if (cmake_intdir) {
|
if (cmake_intdir) {
|
||||||
strcat(fluid_path, cmake_intdir); // append e.g. "/Debug"
|
strcat(fluid_path, cmake_intdir); // append e.g. "/Debug"
|
||||||
strcat(options_path, cmake_intdir);
|
strcat(options_path, cmake_intdir);
|
||||||
}
|
}
|
||||||
#endif // GENERATED_BY_CMAKE
|
|
||||||
|
|
||||||
// construct data_path for the menu file and all resources (data files)
|
// construct data_path for the menu file and all resources (data files)
|
||||||
// CMake: replace "/bin/test/*" with "/data"
|
// CMake: replace "/bin/test/*" with "/data"
|
||||||
@ -581,13 +575,11 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
strcpy(data_path, app_path);
|
strcpy(data_path, app_path);
|
||||||
|
|
||||||
#if defined(GENERATED_BY_CMAKE)
|
|
||||||
{
|
{
|
||||||
char *pos = strstr(data_path, "/bin/test");
|
char *pos = strstr(data_path, "/bin/test");
|
||||||
if (pos)
|
if (pos)
|
||||||
strcpy(pos, "/data");
|
strcpy(pos, "/data");
|
||||||
}
|
}
|
||||||
#endif // GENERATED_BY_CMAKE
|
|
||||||
|
|
||||||
// Construct the menu file name, optionally overridden by command args.
|
// Construct the menu file name, optionally overridden by command args.
|
||||||
// Use data_path and append "/<exe-file-name>.menu"
|
// Use data_path and append "/<exe-file-name>.menu"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user