Mac OS platform: make the colbrowser demo load its data file from its bundle when started
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11917 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
c98f143ccb
commit
f84f5821b0
@ -322,6 +322,8 @@ colbrowser$(EXEEXT): colbrowser.o
|
||||
echo Linking $@...
|
||||
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ colbrowser.o $(LINKFLTKFORMS) $(LDLIBS)
|
||||
$(OSX_ONLY) ../fltk-config --post $@
|
||||
$(OSX_ONLY) mkdir -p colbrowser.app/Contents/Resources
|
||||
$(OSX_ONLY) cp -f rgb.txt colbrowser.app/Contents/Resources/
|
||||
|
||||
color_chooser$(EXEEXT): color_chooser.o
|
||||
|
||||
|
@ -62,8 +62,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
create_form_cl();
|
||||
|
||||
#ifdef USING_XCODE
|
||||
// Xcode apps do not set the current directory
|
||||
#ifdef __APPLE__
|
||||
// search for rgb.txt within the bundle
|
||||
strcpy(dbname, argv[0]);
|
||||
char *slash = strrchr(dbname, '/');
|
||||
if (slash)
|
||||
|
Loading…
Reference in New Issue
Block a user