From f357f4311c6faedcb87f40144b83e2219538386c Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 23 Jul 2020 01:53:24 +0200 Subject: Use local images in test/help_dialog(.html) - create subdir test/images - copy images used by test/help_dialog to this subdir - fix image URL's in test/help_dialog.html accordingly CMake: copy the entire test/images folder to the /data folder This enables the demo test/help_dialog.cxx to find its images. --- test/CMakeLists.txt | 30 ++++++++++++++++++------------ test/help_dialog.html | 26 ++++++++++++++++++++------ test/images/FL200.png | Bin 0 -> 2626 bytes test/images/Fl_Value_Input.png | Bin 0 -> 540 bytes test/images/Fl_Value_Output.png | Bin 0 -> 573 bytes test/images/tiny.png | Bin 0 -> 170 bytes 6 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 test/images/FL200.png create mode 100644 test/images/Fl_Value_Input.png create mode 100644 test/images/Fl_Value_Output.png create mode 100644 test/images/tiny.png diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d7ad60750..c1a98617b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,11 +15,16 @@ # ####################################################################### +include (../CMake/FLTK-Functions.cmake) +include (../CMake/fl_create_example.cmake) + set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../bin) set (TESTFILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../data) -include (../CMake/FLTK-Functions.cmake) -include (../CMake/fl_create_example.cmake) +# create data and binary directory to copy scripts and data files + +file (MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) +file (MAKE_DIRECTORY ${TESTFILE_PATH}) ####################################################################### # audio libs for test apps @@ -202,17 +207,11 @@ endif (OPTION_BUILD_SHARED_LIBS) endif (NOT ANDROID) -# We need some support files for the demo programs: - -# Note: this is incomplete as of July 2020 -# Todo: currently all files are copied, but some of them may need configuration: -# - demo.menu: help_dialog (help_dialog.html) can't find its images (not copied) +##################################################### +# We need some support files for the demo programs +##################################################### -# create data directory for test and demo programs if it doesn't exist - -file (MAKE_DIRECTORY ${TESTFILE_PATH}) - -# copy the test files +# copy the required test files file (COPY demo.menu rgb.txt browser.cxx editor.cxx valuators.fl @@ -220,6 +219,13 @@ file (COPY DESTINATION ${TESTFILE_PATH} ) +# copy the image directory for help_dialog.html + +file (COPY + ${CMAKE_CURRENT_SOURCE_DIR}/images + DESTINATION ${TESTFILE_PATH} +) + # the main test program 'demo' needs additional hints and configurations target_compile_definitions (demo PRIVATE GENERATED_BY_CMAKE) diff --git a/test/help_dialog.html b/test/help_dialog.html index 01809f234..dffaf4cb1 100644 --- a/test/help_dialog.html +++ b/test/help_dialog.html @@ -1,5 +1,19 @@

Simple HTML Tests