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 <build>/data folder This enables the demo test/help_dialog.cxx to find its images.
This commit is contained in:
parent
0015e64671
commit
f357f4311c
@ -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:
|
||||
#####################################################
|
||||
# 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)
|
||||
|
||||
# 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)
|
||||
|
@ -1,5 +1,19 @@
|
||||
<!--
|
||||
Test the Fl_Help_View's ability to parse simple HTML.
|
||||
*
|
||||
* Test file for Fl_Help_View for the Fast Light Tool Kit (FLTK).
|
||||
*
|
||||
* Copyright 1998-2020 by Bill Spitzak and others.
|
||||
*
|
||||
* 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
|
||||
* file is missing or damaged, see the license at:
|
||||
*
|
||||
* https://www.fltk.org/COPYING.php
|
||||
*
|
||||
* Please see the following page on how to report bugs and issues:
|
||||
*
|
||||
* https://www.fltk.org/bugs.php
|
||||
*
|
||||
-->
|
||||
<H1>Simple HTML Tests</H1>
|
||||
<UL>
|
||||
@ -211,16 +225,16 @@ End of DL.
|
||||
<TR>
|
||||
<TD>Column 1</TD> <TD>Column 2</TD>
|
||||
</TR><TR>
|
||||
<TD><IMG SRC="../documentation/src/FL200.png"></TD>
|
||||
<TD><IMG SRC="images/FL200.png"></TD>
|
||||
<TD>This is the FLTK logo</TD>
|
||||
</TR><TR>
|
||||
<TD><IMG SRC="../documentation/src/tiny.png"></TD>
|
||||
<TD><IMG SRC="images/tiny.png"></TD>
|
||||
<TD>Tiny FLTK logo.</TD>
|
||||
</TR><TR>
|
||||
<TD><IMG SRC="../documentation/src/Fl_Value_Input.png"></TD>
|
||||
<TD><IMG SRC="images/Fl_Value_Input.png"></TD>
|
||||
<TD>This is an image of Fl_Value_Input</TD>
|
||||
</TR><TR>
|
||||
<TD><IMG SRC="../documentation/src/Fl_Value_Output.png"></TD>
|
||||
<TD><IMG SRC="images/Fl_Value_Output.png"></TD>
|
||||
<TD>This is an image of Fl_Value_Output</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
@ -237,7 +251,7 @@ This text should be in a paragraph break. This is paragraph #1 of 2.
|
||||
This text should be in a paragraph break as well. This is paragraph #2 of 2.
|
||||
<P>
|
||||
What follows should be a centered image.<BR>
|
||||
<IMG SRC="../documentation/src/FL200.png"><BR>
|
||||
<IMG SRC="images/FL200.png"><BR>
|
||||
That should be a centered image.
|
||||
<P>
|
||||
</center>
|
||||
|
BIN
test/images/FL200.png
Normal file
BIN
test/images/FL200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
test/images/Fl_Value_Input.png
Normal file
BIN
test/images/Fl_Value_Input.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 540 B |
BIN
test/images/Fl_Value_Output.png
Normal file
BIN
test/images/Fl_Value_Output.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 573 B |
BIN
test/images/tiny.png
Normal file
BIN
test/images/tiny.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 170 B |
Loading…
Reference in New Issue
Block a user