Skip to content

Commit

Permalink
Update FLTK to latest release (Windows builds); update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Nov 22, 2024
1 parent 3424fdf commit 4f44802
Show file tree
Hide file tree
Showing 240 changed files with 6,501 additions and 3,232 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ jobs:
obsidian.exe
retention-days: ${{env.RETENTION_DAYS}}
build-linux:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxft-dev libfontconfig1-dev libgl-dev
sudo apt-get install -y libxft-dev libfontconfig1-dev libgl-dev libfltk1.3-dev
- name: Configure CMake Ubuntu
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build Ubuntu
Expand All @@ -108,6 +108,8 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install HomeBrew FLTK
run: brew install fltk
- name: Configure CMake MacOS
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build MacOS
Expand Down
56 changes: 45 additions & 11 deletions libraries/fltk/ANNOUNCEMENT
Original file line number Diff line number Diff line change
@@ -1,15 +1,49 @@
FLTK 1.4 is based on the final release of FLTK 1.3.4.
FLTK 1.4 is based on the final release of FLTK 1.3.4. Later updates
have been backported to 1.3.5 - 1.3.10.

Technically the branch was forked earlier, but all changes in FLTK 1.3.4
have also been (modified and) committed in branch-1.3-porting, which is
the base of branch-1.4.

FLTK 1.4 is intended to be mostly API compatible with FLTK 1.3.4 so
FLTK 1.4 is intended to be mostly API compatible with FLTK 1.3.x so
you don't need to change source code when you switch to FLTK 1.4.
However, all programs must be recompiled with FLTK 1.4 because the
ABI (Application Binary Interface) has changed.

Potential source code conflicts are documented in chapter "Migrating
Code from FLTK 1.3 to 1.4" of the user documentation [1].

FLTK 1.4 adds some new widgets (e.g. Fl_Flex, Fl_Grid) for flexible GUI
layout, Fl_Scheme_Choice for scheme selection by users, and more.
Other widgets (Fl_Tabs, Fl_Tile, Fl_Spinner etc.) have been improved
for better user experience.

FLTK 1.4 supports HighDPI displays under Linux/Unix and Windows and
improves HighDPI support on macOS. The initial screen scaling factor is
read from the system and application windows can be zoomed (in/out/reset)
by the user with ctrl/+/-/0 shortcuts, respectively.

CMake support has been improved significantly and requires CMake 3.15 or
higher, autotools/configure/make is still supported. The latter will be
dropped in the next minor release (1.5.0).

macOS is supported up to 15.0 "Sequoia".

The platform dependent code in FLTK 1.4 was rewritten to enable easier
porting to new platforms. Basically all platform dependent code has
been isolated and implemented in virtual methods of "driver" classes.
For details see 'src/drivers' and subdirectories.

FLTK is now compatible with the Wayland platform on current Linux
distributions and FreeBSD. The default build of the library on these
platforms supports both X11 and Wayland in a "hybrid" library. Programs
compiled and linked to this library start using Wayland if it is
available at runtime and fall back to using X11 if not. Programs using
X11 specific code that are not yet ported to Wayland can still be used
on pure X11 systems or by disabling the Wayland support on startup so
they fall back to using X11 only. This requires 'XWayland' support on
Wayland enabled (Linux) systems.

However, the platform dependent code in FLTK 1.4 was rewritten to enable
better porting to new platforms. Basically all platform dependent code
has been isolated and implemented in virtual methods of "driver" classes.
See src/drivers and subdirectories.
The current development branch on GitHub [2] is `master`. This will be
changed to `branch-1.4` when development of FLTK 1.5.0 begins and 1.4
will be switched to maintenance mode.

More to come ...
[1] https://www.fltk.org/doc-1.4/ (HTML) and
https://www.fltk.org/doc-1.4/fltk.pdf (PDF)
[2] https://github.com/fltk/fltk.git
167 changes: 148 additions & 19 deletions libraries/fltk/CHANGES.txt

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions libraries/fltk/CHANGES_1.3.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,187 @@
CHANGES IN FLTK 1.3.9 RELEASED: Dec 09 2023

FLTK 1.3.9 is a maintenance release with some fixes and enhancements.

Highlights in this release:

- Support macOS up to macOS 14 "Sonoma".
- Update bundled libraries to current versions (see below).
- Introduce bundled image library "prefixing" to avoid conflicts
with system libraries.
- New CMake option FLTK_MSVC_RUNTIME_DLL to select Visual Studio
Runtime version: DLL (/MDx) or static (/MTx), see README.CMake.txt


Bundled library versions (see also README.bundled-libs.txt):

Library Version Release date
---------------------------------------------
jpeg jpeg-9e 2022-01-16
png libpng-1.6.40 2023-06-21
zlib zlib-1.3 2023-08-18


Details:

Albrecht Schlosser:
Backport X11 INCR protocol fixes from 1.4.0 (issue #451)
X11: Suppress compiler warnings when using gcc or clang
Fix crash if a program exits before it opens a window (STR 3484).
Fix compilation error with current Visual Studio 2022
Windows: #define WIN32 if not defined by user
Backport warning fixes from 1.4.0 in src/fl_draw.cxx (#693)
Fix compiler warning as pointed out in PR #693
Fix another compiler warning (#693)
Remove unused variable, fix "type issue" (#445, part 2)
Fix stack buffer overflow found by address sanitizer
Fix "gtk+ rendering" (GitHub Issue #443)
Fix doxygen warnings
Bump version numbers, prepare release 1.3.9
Fix several compiler warnings
Update bundled image libraries and zlib to current versions
Update README, README.CMake.txt, and some support files
Fix compiler warnings: backported from 1.4 (git 'master')
CMake/MSVC: remove confusing recommendation to rerun CMake
Documentation: remove dark color on title page
Raise CMake minimum required version to 3.15 and more

ManoloFLTK:
macOS platform: Issue #325 "Disabling IM disables Greek and Cyrillic layouts"
Fix fullscreen window level corner cases on macOS
Fix issue #373 apparent with macOS platform and SDK ≤ 10.13
Issue #452: Fl::get_font_name failure on OS-X.
Issue #454: crash in Fl::get_font_name().
Issue #469: Fl_Sys_Menu_Bar menu item shortcuts using Esc or Tab don't work on Mac
Fix "Focus is lost leaving full screen on macOS 13" (#608)
Add support of macOS Ventura 13.0 and macOS Sonoma 14.0
macOS: remove configure option --enable-x11 and CMake OPTION_APPLE_X11;
this functionality remains in FLTK 1.4.
configure.ac: make sure local-png and local-zlib always run together
Remove the -mwindows argument from CFLAGS and CXXFLAGS

Matthias Melcher:
Issue #188: Fix reference counts and search for Fl_Shared_Image original

YX:
Fix IME problem (issue #270)


CHANGES IN FLTK 1.3.8 RELEASED: Nov 20 2021

FLTK 1.3.8 is a maintenance release with some fixes and enhancements.

Details:

Albrecht Schlosser:
Make "FLTK_CONSOLIDATE_MOTION" user-definable (issue #76)
Fix compiler warnings (backported from 1.4)
Add new dialog fl_choice_n() with extended return values (#282)

ManoloFLTK:
Account for deprecation of [NSBitmapImageRep initWithFocusedViewRect:]
in macOS 10.14
macOS: fix fullscreen window when other windows were created before
Fix issue #287: "FLTK 1.3.6 doesn't handle fullscreen on macOS"
Fix issue #288: "FLTK 1.3.6+ doesn't notify window movement on macOS"
Fix issue #279: "HiDpi issue on macOS with retina display"
macOS: Allow building with non-Apple compiler that may not support blocks


CHANGES IN FLTK 1.3.7 RELEASED: Jul 25 2021

FLTK 1.3.7 is a maintenance release for macOS only. It fixes one
regression introduced in FLTK 1.3.6 and two long standing timer
issues on macOS.

Other platforms than macOS are not concerned.

Changes:

Avoid premature FL_RELEASE event at start of drag-n-drop operation
Fix a timer inconsistency and prevent a crash
Fl::add_timeout() must always create a new timer (#248)



CHANGES IN FLTK 1.3.6 RELEASED: May 15 2021

There have been no changes since FLTK 1.3.6rc2.


CHANGES IN FLTK 1.3.6rc2 RELEASED: May 04 2021

FLTK 1.3.6rc2 fixes some minor issues of 1.3.6rc1, particularly macOS
bundle generation. It addresses an issue that bundles can't be executed
on macOS 11.3 Big Sur if built with configure/make after downloading
the release tarball because of the macOS "quarantine" feature.

Details:

Albrecht Schlosser:
Rename file 'VERSION' to 'fltk_version.dat' (#191)
Fix version number in doxygen docs
Fix build with Cairo for CMake < 3.13
CMake: fix old (pre 3.13) link_directories() usage
Enhance CMake build configuration summary
Refactor macOS bundle generation to avoid "quarantine"
Fix a new compiler warning


CHANGES IN FLTK 1.3.6rc1 RELEASED: Apr 26 2021

FLTK 1.3.6 is a maintenance release with new macOS Big Sur support
and some bug fixes. macOS Big Sur is supported on both Intel and the
new Apple Silicon (M1) chips.

CMake support has been improved but is not yet "perfect". Documentation
has been enhanced, bundled image libraries have been updated to current
versions.

The following lists are subsets of all commits. References in '(...)'
are either STR numbers (STR xxxx) or GitHub Issues or Pull Requests
(#nnn).


Bug fixes and other improvements

Albrecht Schlosser:
Fix Fl::add_timeout() in draw() under Linux (STR 3188)
X11: Fix X Input Methods (XIM) (STR 3502, 3192)
Fix overly restrictive JPEG filter (#81)
Fix DND in read-only Fl_Input (Fl_Output) (#113)
Fix offscreen drawing under X11 (STR 3384)
Fix potential fluid crashes (STR 3420) + memory leak
Fix X11 copy-paste and drag-and-drop target selection (#182)
Fix CMake install procedure (#212)
Avoid "Bogus FL_MOVE/FL_DRAG events" (#76)
CMake: Document FLTKConfig.cmake and set FLTK_INCLUDE_DIR

Greg Ercolano:
Fix issue92, added -d debug flag to fluid (#92)
Merge pull request #176 from ComputerNerd/errmsg-fix-13

ManoloFLTK:
X11: add support for copy+paste of image within one app
Windows: add bitmap version of graphics when copying to clipboard
Fix use of Xrender extension with old, 16-bit framebuffers.
Fix for Fl_Native_File_Chooser under macOS 10.15 Catalina and ...
Restore macOS capacity to turn window fullscreen encompassing several screens.
Improve Fl_Copy_Surface under macOS
Set OPTION_USE_SYSTEM_LIBPNG/JPEG off under macOS by default
Have Fl_Pack::draw() call Fl_Group::init_sizes() on its parent group.
CMake support of the Darwin+XQuartz test platform
Add support of macOS "Big Sur" 11.0
Fix when building with SDK 10.15 and running with 11.0 Big Sur
Backport fix for issue #185 "Shared Image reload() loses initial dimensions" from branch 1.4
Fix fl_endpoints() for macOS platform that was not effective.
Fix stack corruption when loading GIF (pull request #200)
Restore ./configure --enable-x11 on macOS
Fix crash when terminating any macOS app by cmd-Q

OKAMURA, Yasunobu:
Fix JIS Keyboard dead keys


CHANGES IN FLTK 1.3.5 RELEASED: Mar 03 2019

Bug fixes and other improvements
Expand Down
6 changes: 6 additions & 0 deletions libraries/fltk/CMake/macOSMaxAllowed.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#include <AvailabilityMacros.h>
#if __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
#error __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
#endif
int main(int argc, char** argv) { return 0; }
39 changes: 26 additions & 13 deletions libraries/fltk/CMake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,23 @@ set(FL_ABI_VERSION ${FLTK_ABI_VERSION})
# Note: this might be handled better by the 'MSVC_RUNTIME_LIBRARY'
# target property for each target rather than setting a global
# CMake variable - but this version does the latter.
# This also applies when using LLVM/clang on Windows (#1058).
#######################################################################

if(MSVC)
if(WIN32 AND NOT MINGW AND NOT MSYS)
option(FLTK_MSVC_RUNTIME_DLL "use MSVC Runtime-DLL (/MDx)" ON)
if(FLTK_MSVC_RUNTIME_DLL)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
endif(MSVC)
else(WIN32 AND NOT MINGW AND NOT MSYS)
# suppress CMake warning if the user sets FLTK_MSVC_RUNTIME_DLL on other platforms
if(DEFINED FLTK_MSVC_RUNTIME_DLL)
unset(FLTK_MSVC_RUNTIME_DLL)
unset(FLTK_MSVC_RUNTIME_DLL CACHE)
endif()
endif(WIN32 AND NOT MINGW AND NOT MSYS)

#######################################################################

Expand All @@ -111,15 +118,21 @@ endif(APPLE)
# Bundled Library Options
#######################################################################

option(FLTK_USE_SYSTEM_LIBJPEG "use system libjpeg" OFF)
option(FLTK_USE_SYSTEM_LIBPNG "use system libpng" OFF)
option(FLTK_USE_SYSTEM_ZLIB "use system zlib" OFF)
if(WIN32 OR (APPLE AND NOT FLTK_BACKEND_X11))
option(FLTK_USE_SYSTEM_LIBJPEG "use system libjpeg" OFF)
option(FLTK_USE_SYSTEM_LIBPNG "use system libpng" OFF)
option(FLTK_USE_SYSTEM_ZLIB "use system zlib" OFF)
else()
option(FLTK_USE_SYSTEM_LIBJPEG "use system libjpeg" ON)
option(FLTK_USE_SYSTEM_LIBPNG "use system libpng" ON)
option(FLTK_USE_SYSTEM_ZLIB "use system zlib" ON)
endif()

# Set default values of internal build options

set(FLTK_USE_BUNDLED_JPEG TRUE)
set(FLTK_USE_BUNDLED_PNG TRUE)
set(FLTK_USE_BUNDLED_ZLIB TRUE)
set(FLTK_USE_BUNDLED_JPEG FALSE)
set(FLTK_USE_BUNDLED_PNG FALSE)
set(FLTK_USE_BUNDLED_ZLIB FALSE)

# Collect libraries to build fltk_images (starting empty)

Expand Down Expand Up @@ -418,7 +431,7 @@ option(FLTK_USE_POLL "use poll if available" OFF)
mark_as_advanced(FLTK_USE_POLL)

if(FLTK_USE_POLL)
check_function_exists(poll USE_POLL)
check_symbol_exists(poll "poll.h" USE_POLL)
endif(FLTK_USE_POLL)

#######################################################################
Expand Down Expand Up @@ -605,7 +618,7 @@ endif(FLTK_OPTION_SVG)

#######################################################################

# FIXME: GL libs have already been searched in resources.cmake
# FIXME: GLU libs have already been searched in resources.cmake

set(HAVE_GL LIB_GL OR LIB_MesaGL)
set(FLTK_USE_GL FALSE)
Expand Down Expand Up @@ -675,8 +688,8 @@ set(FLTK_GL_FOUND FALSE)

if(OPENGL_FOUND)
set(FLTK_GL_FOUND TRUE)
find_path(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR} ${X11_INCLUDE_DIR})
set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR}/GL ${OPENGL_GLU_INCLUDE_DIR})
find_path(FLTK_OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR} ${X11_INCLUDE_DIR})
set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR}/GL ${FLTK_OPENGL_GLU_INCLUDE_DIR})

if(WIN32)
list(APPEND GLLIBS -lglu32 -lopengl32)
Expand All @@ -693,7 +706,7 @@ if(OPENGL_FOUND)
# check if function glXGetProcAddressARB exists
set(TEMP_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_LIBRARIES})
check_function_exists(glXGetProcAddressARB HAVE_GLXGETPROCADDRESSARB)
check_symbol_exists(glXGetProcAddressARB "glx.h" HAVE_GLXGETPROCADDRESSARB)
set(CMAKE_REQUIRED_LIBRARIES ${TEMP_REQUIRED_LIBRARIES})
unset(TEMP_REQUIRED_LIBRARIES)
endif(OPENGL_FOUND)
Expand Down
Loading

0 comments on commit 4f44802

Please sign in to comment.