Rename test/help demo program to test/help_dialog.

This change avoids a name conflict with CMake's auto-generated target 'help'
for "Unix Makefiles", "Ninja", and supposedly other generators as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2017-02-08 02:06:52 +00:00
parent 759d2f1c99
commit 16774ddc4e
9 changed files with 41 additions and 24 deletions

2
.gitignore vendored
View File

@ -161,7 +161,7 @@
/test/gl_overlay
/test/glpuzzle
/test/hello
/test/help
/test/help_dialog
/test/icon
/test/iconize
/test/image

View File

@ -43,6 +43,8 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2017
Other Improvements
- (add new items here)
- Renamed test/help demo program to test/help_dialog to avoid name
conflict with CMake auto-generated target 'help'.
- Many documentation fixes, clarifications, and enhancements.

View File

@ -109,11 +109,6 @@ macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
set (tname ${NAME}) # target name
set (oname ${NAME}) # output (executable) name
# rename reserved target name "help" (CMake 2.8.12 and later)
if (${tname} MATCHES "^help$")
set (tname "test_help")
endif (${tname} MATCHES "^help$")
foreach(src ${SOURCES})
if ("${src}" MATCHES "\\.fl$")
list(APPEND flsrcs ${src})

View File

@ -60,7 +60,7 @@ you build FLTK, unlike those in the 'test' directory shown below.
</tr>
<tr>
<td> \ref examples_hello </td>
<td> \ref examples_help </td>
<td> \ref examples_help_dialog </td>
<td> \ref examples_iconize </td>
<td> \ref examples_image </td>
<td> \ref examples_inactive </td>
@ -326,10 +326,10 @@ easily under FLTK.
tiny demo shows how little is needed to get a functioning application
running with FLTK. Quite impressive, I'd say.
\subsection examples_help help
\subsection examples_help_dialog help_dialog
\par
\c help displays the built-in FLTK help browser. The
\c help_dialog displays the built-in FLTK help browser. The
Fl_Help_Dialog understands a subset of html and renders
various image formats. This widget makes it easy to provide help
pages to the user without depending on the operating system's

View File

@ -1,3 +1,22 @@
#
# "$Id$"
#
# CMakeLists.txt used to build test and demo apps by the CMake build system
#
# Copyright 2004-2017 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:
#
# http://www.fltk.org/COPYING.php
#
# Please report all bugs and problems on the following page:
#
# http://www.fltk.org/str.php
#
#######################################################################
set(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin/examples)
#######################################################################
@ -45,7 +64,7 @@ CREATE_EXAMPLE(file_chooser file_chooser.cxx "fltk;fltk_images")
CREATE_EXAMPLE(fonts fonts.cxx fltk)
CREATE_EXAMPLE(forms forms.cxx "fltk;fltk_forms")
CREATE_EXAMPLE(hello hello.cxx fltk)
CREATE_EXAMPLE(help help.cxx "fltk;fltk_images")
CREATE_EXAMPLE(help_dialog help_dialog.cxx "fltk;fltk_images")
CREATE_EXAMPLE(icon icon.cxx fltk)
CREATE_EXAMPLE(iconize iconize.cxx fltk)
CREATE_EXAMPLE(image image.cxx fltk)
@ -112,7 +131,7 @@ endif(FLTK_HAVE_CAIRO)
# Note: this is incomplete as of 11 Feb 2015
# Todo: currently all files are copied, but some of them need configuration:
# - demo.menu: fluid can't be started (wrong path)
# - demo.menu: help (help-test.html) can't find its images (not copied)
# - demo.menu: help_dialog (help_dialog.html) can't find its images (not copied)
# - maybe more ...
# prepare for a "better" test file installation path
@ -127,12 +146,12 @@ configure_file(demo.menu ${TESTFILE_PATH}/demo.menu COPYONLY)
# use target directory only to avoid redundancy
configure_file(rgb.txt ${TESTFILE_PATH} COPYONLY)
configure_file(help-test.html ${TESTFILE_PATH} COPYONLY)
configure_file(help_dialog.html ${TESTFILE_PATH} COPYONLY)
configure_file(browser.cxx ${TESTFILE_PATH} COPYONLY)
configure_file(editor.cxx ${TESTFILE_PATH} COPYONLY)
if(APPLE AND NOT OPTION_APPLE_X11)
configure_file(demo.menu "${TESTFILE_PATH}/demo.app/Contents/Resources/demo.menu" COPYONLY)
configure_file(browser.cxx "${TESTFILE_PATH}/browser.app/Contents/Resources/browser.cxx" COPYONLY)
configure_file(rgb.txt ${TESTFILE_PATH}/colbrowser.app/Contents/Resources/rgb.txt COPYONLY)
configure_file(help-test.html ${TESTFILE_PATH}/help.app/Contents/Resources/help-test.html COPYONLY)
configure_file(help_dialog.html ${TESTFILE_PATH}/help_dialog.app/Contents/Resources/help_dialog.html COPYONLY)
endif(APPLE AND NOT OPTION_APPLE_X11)

View File

@ -3,7 +3,7 @@
#
# Test/example program makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2010 by Bill Spitzak and others.
# Copyright 1998-2017 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
@ -53,7 +53,7 @@ CPPFILES =\
gl_overlay.cxx \
glpuzzle.cxx \
hello.cxx \
help.cxx \
help_dialog.cxx \
icon.cxx \
iconize.cxx \
image.cxx \
@ -126,7 +126,7 @@ ALL = \
fonts$(EXEEXT) \
forms$(EXEEXT) \
hello$(EXEEXT) \
help$(EXEEXT) \
help_dialog$(EXEEXT) \
icon$(EXEEXT) \
iconize$(EXEEXT) \
image$(EXEEXT) \
@ -368,12 +368,12 @@ forms$(EXEEXT): forms.o
hello$(EXEEXT): hello.o
help$(EXEEXT): help.o $(IMGLIBNAME)
help_dialog$(EXEEXT): help_dialog.o $(IMGLIBNAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) help.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) help_dialog.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
$(OSX_ONLY) mkdir -p help.app/Contents/Resources
$(OSX_ONLY) cp -f help-test.html help.app/Contents/Resources/
$(OSX_ONLY) mkdir -p help_dialog.app/Contents/Resources
$(OSX_ONLY) cp -f help_dialog.html help_dialog.app/Contents/Resources/
icon$(EXEEXT): icon.o

View File

@ -77,7 +77,7 @@
@o:Font Tests...:@of
@of:Fonts:fonts
@of:UTF-8:utf8
@o:HelpDialog:help
@o:HelpDialog:help_dialog
@o:Input Choice:input_choice
@o:Preferences:preferences
@o:Threading:threads

View File

@ -4,6 +4,7 @@
// Fl_Help_Dialog test program.
//
// Copyright 1999-2010 by Easy Software Products.
// Copyright 2011-2017 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
@ -44,7 +45,7 @@ main(int argc, // I - Number of command-line arguments
strcpy(htmlname, argv[0]);
char *slash = strrchr(htmlname, '/');
if (slash)
strcpy(slash, "/../Resources/help-test.html");
strcpy(slash, "/../Resources/help_dialog.html");
FILE *in = fl_fopen(htmlname, "r");
if (in) {
fclose(in);
@ -54,7 +55,7 @@ main(int argc, // I - Number of command-line arguments
#endif
if (argc <= 1)
help->load("help-test.html");
help->load("help_dialog.html");
else
help->load(argv[1]);