diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51f7e401..7686670a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,8 @@ jobs: freeglut \ libpng \ meson \ - ninja + ninja \ + fltk brew install --cask xquartz cd /opt/homebrew/opt/llvm/bin #ln -s clang++ clang++-19 diff --git a/meson.build b/meson.build index add9384e..462024c7 100644 --- a/meson.build +++ b/meson.build @@ -61,11 +61,13 @@ if need_pugixml or get_option('use_system_pugixml') == false endif if get_option('use_system_fltk') - libfltk_dep = dependency('fltk', version: '>=1.4', required: false) - libfltk_images_dep = dependency('fltk-images', version: '>=1.4', required: false) - libfltk_forms_dep = dependency('fltk-forms', version: '>=1.4', required: false) - if libfltk_dep.found() == false or libfltk_images_dep.found() == false or libfltk_forms_dep.found() == false - need_fltk = true + libfltk_dep = dependency('FLTK', version: '>=1.4.0', modules: ['fltk::fltk', 'fltk::images', 'fltk::forms'], required: false) + if libfltk_dep.found() == false + #For MacOS14 assuming a brew dependency because there is something broken in there. + libfltk_dep = dependency('fltk', required: false) + if libfltk_dep.found() == false + need_fltk = true + endif endif endif if need_fltk == true or get_option('use_system_fltk') == false @@ -86,9 +88,7 @@ if need_fltk == true or get_option('use_system_fltk') == false endif libfltk_proj = cmake.subproject('libfltk', options: opt_fltk) - libfltk_dep = libfltk_proj.dependency(['fltk-shared']) - libfltk_images_dep = libfltk_proj.dependency(['fltk-images-shared']) - libfltk_forms_dep = libfltk_proj.dependency(['fltk-forms-shared']) + libfltk_dep = [ libfltk_proj.dependency(['fltk-shared']), libfltk_proj.dependency(['fltk-images-shared']), libfltk_proj.dependency(['fltk-forms-shared'])] #libfltk_gl_dep = libfltk_proj.dependency(['fltk-gl']) endif @@ -199,8 +199,6 @@ include_dirs = include_directories(['./include']) vs_fltk_deps += [ libfltk_dep, - libfltk_images_dep, - libfltk_forms_dep, pugixml_dep, json_dep, diff --git a/scripts/build-default.sh b/scripts/build-default.sh index 78f91a31..ae611567 100755 --- a/scripts/build-default.sh +++ b/scripts/build-default.sh @@ -53,7 +53,7 @@ else if [ "$(uname)" != "Darwin" ]; then bun run meson-setup.clang-release else - meson setup -Dforce_x11_backend=true --reconfigure build --buildtype=release --native-file toolchains/flatpak.ini + meson setup -Dforce_x11_backend=false --reconfigure build --buildtype=release --native-file toolchains/flatpak.ini # Unclear fix to be investigated rm subprojects/libtcc/VERSION fi diff --git a/src/themes/default-cute.cpp b/src/themes/default-cute.cpp index 7d6e425a..8fe8f520 100644 --- a/src/themes/default-cute.cpp +++ b/src/themes/default-cute.cpp @@ -2,7 +2,7 @@ #include "FL/Fl.H" #include "FL/Fl_SVG_Image.H" #include "FL/fl_draw.H" -#include "nanosvg/nanosvg.h" +//#include "nanosvg/nanosvg.h" #include #include #include @@ -11,28 +11,28 @@ namespace vs{ namespace theme_cute{ void up_box(int x, int y, int w, int h, Fl_Color c){ - std::string s = std::format("\ + /* std::string s = std::format("\ \ ",w, h, c&(0xff<<24),c&(0xff<<16),c&(0xff<<8)); Fl_SVG_Image img (">",s.c_str()); - img.draw(x,y,w,h); + img.draw(x,y,w,h);*/ //fl_draw_box(Fl_Boxtype::FL_FLAT_BOX, x, y, w, h, c); - /* let col1 = c.to_rgb(); - let col = Color::color_average(c, Color::Background, 0.8).to_rgb(); - draw::draw_rbox(x, y, w, h, 5, true, Color::from_rgb(col.0, col.1, col.2));*/ + // let col1 = c.to_rgb(); + //let col = Color::color_average(c, Color::Background, 0.8).to_rgb(); + //draw::draw_rbox(x, y, w, h, 5, true, Color::from_rgb(col.0, col.1, col.2)); } void diamondup_box(int x, int y, int w, int h, Fl_Color c){ - std::string s = std::format("\ + /* std::string s = std::format("\ \ ",w, h, c&(0xff<<24),c&(0xff<<16),c&(0xff<<8)); Fl_SVG_Image img (">>",s.c_str()); - img.draw(x,y,w,h); - /* let col1 = c.to_rgb(); - let col = Color::color_average(c, Color::Background, 0.8).to_rgb(); - draw::draw_rbox(x, y, w, h, 5, true, Color::from_rgb(col.0, col.1, col.2));*/ + img.draw(x,y,w,h);*/ + // let col1 = c.to_rgb(); + //let col = Color::color_average(c, Color::Background, 0.8).to_rgb(); + //draw::draw_rbox(x, y, w, h, 5, true, Color::from_rgb(col.0, col.1, col.2)); //fl_draw_box(Fl_Boxtype::FL_FLAT_BOX, x, y, w, h, c); } @@ -97,7 +97,7 @@ constexpr uint8_t colors[][3] = { }*/ void apply(){ //for(int i =0;i