Skip to content

Commit 35c2963

Browse files
author
dashodanger
committed
FLTK/MinGW updates
1 parent aac0d40 commit 35c2963

File tree

146 files changed

+13812
-607
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+13812
-607
lines changed

.github/workflows/cmake.yml

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,40 @@ env:
1414

1515
jobs:
1616
build-win32:
17-
runs-on: windows-latest
17+
runs-on: ubuntu-24.04
18+
1819
steps:
19-
- uses: actions/checkout@v4
20-
- name: Download w64devkit
21-
run: invoke-webrequest https://github.com/skeeto/w64devkit/releases/download/v2.0.0/w64devkit-x86-2.0.0.exe -outfile ${{github.workspace}}\w64devkit.exe
22-
- name: Extract w64devkit
23-
run: ${{github.workspace}}\w64devkit.exe -y
24-
- name: Set environment variables and build
25-
run: |
26-
$env:Path = "${{github.workspace}}\w64devkit\bin;" + $env:Path
27-
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-isystem ${{github.workspace}}\w64devkit\include" -DCMAKE_C_FLAGS="-isystem ${{github.workspace}}\w64devkit\include" -G "MinGW Makefiles"
28-
cmake --build build --config ${{env.BUILD_TYPE}}
29-
strip ${{github.workspace}}\obsidian.exe
30-
- uses: actions/upload-artifact@v4
31-
with:
32-
name: obsidian-win32
33-
path: |
34-
addons
35-
data
36-
engines
37-
games
38-
language
39-
modules
40-
ports
41-
presets
42-
scripts
43-
theme
44-
tools
45-
obsidian.exe
46-
retention-days: ${{env.RETENTION_DAYS}}
20+
- uses: actions/checkout@v4
21+
22+
- name: Install dependencies
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y mingw-w64
26+
27+
- name: Configure CMake
28+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=Toolchain-mingw32.cmake
29+
30+
- name: Build
31+
# Build your program with the given configuration
32+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
33+
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
name: obsidian-win32
37+
path: |
38+
${{github.workspace}}/addons
39+
${{github.workspace}}/data
40+
${{github.workspace}}/engines
41+
${{github.workspace}}/games
42+
${{github.workspace}}/language
43+
${{github.workspace}}/modules
44+
${{github.workspace}}/ports
45+
${{github.workspace}}/presets
46+
${{github.workspace}}/scripts
47+
${{github.workspace}}/theme
48+
${{github.workspace}}/tools
49+
${{github.workspace}}/obsidian.exe
50+
retention-days: ${{env.RETENTION_DAYS}}
4751
build-win64:
4852
runs-on: windows-latest
4953
steps:

CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ if(MSVC)
2727
set(CMAKE_EXE_LINKER_FLAGS "/SUBSYSTEM:WINDOWS")
2828
endif()
2929
endif()
30-
if(MSYS OR MINGW)
31-
if(NOT CONSOLE_ONLY)
32-
set(CMAKE_EXE_LINKER_FLAGS "-static -mwindows")
33-
else()
34-
set(CMAKE_EXE_LINKER_FLAGS "-static")
35-
endif()
36-
endif()
3730
if(APPLE OR ${CMAKE_SYSTEM} MATCHES "BSD")
3831
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I /usr/local/include")
3932
endif()

Toolchain-mingw32.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ set(CMAKE_SYSTEM_NAME Windows)
55
set(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc)
66
set(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++)
77
set(CMAKE_RC_COMPILER /usr/bin/i686-w64-mingw32-windres)
8-
# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -lm
9-
# -mwindows -lcomdlg32 -lole32 -luuid
10-
# -lgdi32 -lcomctl32 -lwsock32 -lsupc++") Above line works on Ubuntu; below line
11-
# works on OpenSUSE (my personal build platform), so switch between them as
12-
# needed - Dasho
138
set(CMAKE_EXE_LINKER_FLAGS
149
"-static -mwindows"
1510
)
@@ -23,8 +18,3 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
2318
# search headers and libraries in the target environment,
2419
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
2520
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
26-
27-
set(CMAKE_INSTALL_PREFIX
28-
${CMAKE_FIND_ROOT_PATH}/usr
29-
CACHE FILEPATH "install path prefix"
30-
)

Toolchain-mingw64.cmake

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ set(CMAKE_SYSTEM_NAME Windows)
55
set(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)
66
set(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
77
set(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres)
8-
# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -lm
9-
# -mwindows -lcomdlg32 -lole32 -luuid
10-
# -lgdi32 -lcomctl32 -lwsock32 -lsupc++") Above line works on Ubuntu; below line
11-
# works on OpenSUSE (my personal build platform), so switch between them as
12-
# needed - Dasho
138
set(CMAKE_EXE_LINKER_FLAGS
149
"-static -mwindows ")
1510

@@ -21,9 +16,4 @@ set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
2116
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
2217
# search headers and libraries in the target environment,
2318
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
24-
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
25-
26-
set(CMAKE_INSTALL_PREFIX
27-
${CMAKE_FIND_ROOT_PATH}/usr
28-
CACHE FILEPATH "install path prefix"
29-
)
19+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

libraries/fltk/CHANGES.txt

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,84 @@
1+
Changes in FLTK 1.4.1 Released: Dec 12 2024
2+
3+
FLTK 1.4.1 is a maintenance release with bug fixes and improvements.
4+
5+
Bug Fixes
6+
7+
- Fix rounding issues with Fl_RGB_Image::draw() + window scaling (#1128)
8+
- Fix fullscreen regression on macOS( #1129)
9+
- Fix fl_draw_image sometimes crashes when window is scaled (#1134)
10+
- Fix: Can't control scale of Fl_Copy_Surface dimensions on Linux (#1135)
11+
- Improve output of 'fltk-options -h' and 'fltk-options -L*'
12+
- Windows: Fix rescale bug while window is maximized or fullscreen
13+
- Fix graphical glitches on 101 DPI screen (#1138)
14+
- Fix changed flag for radio buttons (#1146)
15+
- Fix Fl_Scroll with real *_BOX draws over scrollbars at non-default scales (#1149)
16+
- Fix drawing bugs on Windows at very large scales (#1144)
17+
- Fix button down state when triggered by shortcut (#1145)
18+
- Give access to some Fl_Text_Display member variables (#1153)
19+
- Fix: Mouse hover + Enter key selects inactive menu items (#1159)
20+
- Fix hang/infinite loop on submenu with all inactive/invisible items (#1158)
21+
- Fix triggering callback for inactive menu items (#1159)
22+
- Fix inconsistencies with Tab/Backspace handling in menus (#1157)
23+
- Fix Fl_Menu_Item::measure() width calculation (#1164)
24+
- Fix drawing issue for checkbox buttons with bad box type (#1130)
25+
- Fix: Window can be moved while menu is open (#1166)
26+
27+
Image libraries
28+
29+
- Update bundled libpng to version 1.6.44
30+
31+
Fixes and Improvements in Fluid:
32+
33+
- Fix autodocs file leak and memory leak
34+
- Fix autodoc image memory allocation
35+
- Fix project modflags when adding shell commands
36+
- Avoid generating undo on spurious relayout events (#1152)
37+
- Minor improvements to buffer handling (#1152)
38+
- Clear cached browser values and cached pointers (#1152)
39+
- Fix default settings tab
40+
- Avoid trailing spaces in empty comment lines (#1161)
41+
- Command line arguments '-v' and '--version' show fltk version
42+
- Command line argument '--help' shows brief usage information
43+
44+
Optional ABI changes: these require configure or CMake option
45+
to define FL_ABI_VERSION = 10401
46+
47+
- Increase clipping stack size from 10 to 64 entries (#1139)
48+
- Fix potential (likely false positive) compiler warning in Fl_Help_View
49+
50+
Documentation Improvements
51+
52+
- Update build instructions in README.Unix.txt (#67)
53+
- Update README.Windows.txt
54+
- Update README.CMake.txt for cross-building (#1154)
55+
- Document that fl_scroll() doesn't work OK with non-integral scaling factors
56+
- Add details about fl_override_scale() and clip
57+
- Clarify use of Fl_Tabs::client_area()
58+
- Fix Makefile example in chapter "FLTK Basics"
59+
60+
Improvements and minor Fixes in Test and Demo Programs
61+
62+
- MSVC: Fix array allocation in test/fltk-versions (#1131)
63+
- Enable building the CubeView demo w/o requiring '<config.h>'
64+
- Use a constant frame rate (25 fps) in test/cube demo
65+
- Add comment linking source code to related information in issue #1149
66+
- Improve timer statistics in test/cube demo
67+
- glpuzzle: fix timer and trackball max speed, make smoother animation at 72fps
68+
69+
Technical Details and Build Procedure Improvements
70+
71+
- Fix FL_EXPORT qualifiers
72+
- Fix compiler warnings
73+
- Remove unnecessary friend declaration
74+
- Restore building with configure --disable-print (#1147)
75+
- macOS: Improve procedure to construct best link command
76+
- Fix: Building with FLTK_BUILD_GL=0 fails on systems without opengl installed (#1151)
77+
- Don't link to libgtk when using package libdecor-0-dev
78+
- Update makesrcdist for releases on GitHub (1.4.1 and higher)
79+
- Update CHANGES.txt for release 1.4.1
80+
81+
182
Changes in FLTK 1.4.0 Released: Nov 17 2024
283

384
Bug Fixes:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
#include <AvailabilityMacros.h>
3-
#if __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
4-
#error __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
3+
#if MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
4+
#error MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
55
#endif
66
int main(int argc, char** argv) { return 0; }

libraries/fltk/CMake/options.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,15 +970,15 @@ endif((X11_Xft_FOUND OR NOT USE_PANGOXFT) AND FLTK_USE_PANGO)
970970
if(FLTK_BACKEND_WAYLAND)
971971

972972
# Note: Disable FLTK_USE_LIBDECOR_GTK to get cairo titlebars rather than GTK
973-
if(FLTK_USE_LIBDECOR_GTK)
973+
if(FLTK_USE_LIBDECOR_GTK AND NOT USE_SYSTEM_LIBDECOR)
974974
pkg_check_modules(GTK IMPORTED_TARGET gtk+-3.0)
975975
if(GTK_FOUND)
976976
list(APPEND FLTK_BUILD_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS})
977977
else()
978978
message(WARNING "Installation of the development files for the GTK library "
979979
"(e.g., libgtk-3-dev) is recommended when using the gnome desktop.")
980980
endif(GTK_FOUND)
981-
endif(FLTK_USE_LIBDECOR_GTK)
981+
endif(FLTK_USE_LIBDECOR_GTK AND NOT USE_SYSTEM_LIBDECOR)
982982

983983
endif()
984984

libraries/fltk/CMake/setup.cmake

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,29 @@ endif(WIN32)
176176

177177
#######################################################################
178178
# size of ints
179+
include(CheckTypeSize)
179180

180-
set(U16 "unsigned short")
181-
set(U32 "unsigned")
182-
set(U64 "unsigned long long")
181+
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
182+
CHECK_TYPE_SIZE(int SIZEOF_INT)
183+
CHECK_TYPE_SIZE(long SIZEOF_LONG)
184+
CHECK_TYPE_SIZE("long long" HAVE_LONG_LONG)
185+
186+
if(${SIZEOF_SHORT} MATCHES "^2$")
187+
set(U16 "unsigned short")
188+
endif(${SIZEOF_SHORT} MATCHES "^2$")
189+
190+
if(${SIZEOF_INT} MATCHES "^4$")
191+
set(U32 "unsigned")
192+
else()
193+
if(${SIZEOF_LONG} MATCHES "^4$")
194+
set(U32 "unsigned long")
195+
endif(${SIZEOF_LONG} MATCHES "^4$")
196+
endif(${SIZEOF_INT} MATCHES "^4$")
197+
198+
if(${SIZEOF_INT} MATCHES "^8$")
199+
set(U64 "unsigned")
200+
else()
201+
if(${SIZEOF_LONG} MATCHES "^8$")
202+
set(U64 "unsigned long")
203+
endif(${SIZEOF_LONG} MATCHES "^8$")
204+
endif(${SIZEOF_INT} MATCHES "^8$")

libraries/fltk/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR)
3636
# define the FLTK project and version
3737
#######################################################################
3838

39-
project(FLTK VERSION 1.4.0)
39+
project(FLTK VERSION 1.4.1)
4040

4141
#######################################################################
4242
# include macro and function definitions for general usage
@@ -105,8 +105,8 @@ unset(debug_build)
105105

106106
#######################################################################
107107
# Build a dummy ("empty") Cairo library for backwards compatibility.
108-
# This should be removed some time after 1.4.0 was released, maybe
109-
# in FLTK 1.4.1, 1.4.2, 1.5.0, or whatever the next minor release is.
108+
# This should be removed in the next minor release after 1.4.x, likely
109+
# in FLTK 1.5.0.
110110
#######################################################################
111111

112112
if(FLTK_HAVE_CAIRO)

libraries/fltk/FL/Enumerations.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
6464
FLTK remains binary compatible between patches.
6565
*/
66-
#define FL_PATCH_VERSION 0
66+
#define FL_PATCH_VERSION 1
6767

6868
/**
6969
The FLTK version number as a \em double.

0 commit comments

Comments
 (0)