From 0174324bdf6147aac1df52d149b711e2e0e61ae6 Mon Sep 17 00:00:00 2001 From: Fabien Costantini Date: Mon, 25 Aug 2008 17:01:31 +0000 Subject: STR2025 fix:now both debug and release mode compiles beautifully, demo compile and works with its bundled file. Hardcoded debug paths in fluid sh invocation have been set to TARGET_BUILD_DIR variable so that it now works in debug and in release mode properly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/demo.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/demo.cxx b/test/demo.cxx index 32a4687de..5d03d547c 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -301,8 +301,18 @@ int load_the_menu(const char* fname) fin = fopen(fname,"r"); if (fin == NULL) { -// fl_show_message("ERROR","","Cannot read the menu description file."); - return 0; +#if defined ( __APPLE__ ) + // mac os bundle menu detection: + char* pos = strrchr(fname,'/'); + if (!pos) return 0; + *pos='\0'; + pos = strrchr(fname,'/'); + if (!pos) return 0; + strcpy(pos,"/Resources/demo.menu"); + fin = fopen(fname,"r"); + if (fin == NULL) +#endif + return 0; } for (;;) { if (fgets(line,256,fin) == NULL) break; -- cgit v1.2.3