summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-08-25 17:01:31 +0000
committerFabien Costantini <fabien@onepost.net>2008-08-25 17:01:31 +0000
commit0174324bdf6147aac1df52d149b711e2e0e61ae6 (patch)
treed371fcc91c5300fa42aba9eef20f10087be54b6e /test
parentb6b746cd69e8ab7a55e7559c94cb14cff85316df (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/demo.cxx14
1 files changed, 12 insertions, 2 deletions
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;