Mac OS platform: make the help demo load its data file when started after configure build.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11916 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2016-09-03 07:35:59 +00:00
parent c0fb27cc2f
commit c98f143ccb
2 changed files with 5 additions and 4 deletions
+2
View File
@@ -367,6 +367,8 @@ help$(EXEEXT): help.o $(IMGLIBNAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) help.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/
icon$(EXEEXT): icon.o
+3 -4
View File
@@ -39,10 +39,9 @@ main(int argc, // I - Number of command-line arguments
help = new Fl_Help_Dialog;
int argn = 1;
#ifdef USING_XCODE
#ifdef __APPLE__
char buf[2048];
strcpy(buf, argv[0]);
char *slash = strrchr(buf, '/');
@@ -52,7 +51,7 @@ main(int argc, // I - Number of command-line arguments
#else
if (argc <= argn)
if (argc <= 1)
help->load("help-test.html");
else
help->load(argv[1]);