FLTK logo

Re: [fltk.coredev] CMake: add 'examples' to build [was: Something in progress? (table examples broken on Linux)]

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: CMake: add 'examples' to build [was: Something in progress? (table examples broken on Linux)] Albrecht Schlosser Aug 14, 2020  
 
On 8/14/20 8:31 PM Greg Ercolano wrote:
On 2020-08-14 11:18, Manolo wrote:
Under macOS and after CMake build, test programs help_dialog, browser and colbrowser don't find their
respective support file which sits in the data folder.

      Confirmed; when I run the wrapper:

$ bin/help_dialog

      I get the error dialog:

Error
Unable to follow the link "bin/help_dialog.app/Contents/MacOS/../Resources/help_dialog.html" - No such file or directory.

      There doesn't appear to be a Resources directory under help_dialog.app/Contents:

$ ls -la bin/help_dialog.app/Contents/
total 8
drwxr-xr-x  4 root  wheel  136 Aug 14 09:53 .
drwxr-xr-x  3 root  wheel  102 Aug 14 09:53 ..
-rw-rw-r--  1 root  wheel  995 Aug 14 09:53 Info.plist
drwxr-xr-x  3 root  wheel  102 Aug 14 09:53 MacOS

      HTH

Well, this is still some macOS specific code that assumes that the support file (in this case 'help_dialog.html') is in the bundle's Resources folder, but we don't do this anymore since the redesign of the test/demo app and introduction of the data/ directory.

I'm not sure what to suggest to fix this. For now there are two ways that /should/ work though:

(1) run the demo app and start the help_dialog app by using the menu. This was the main reason to rewrite the test/demo app.

(2) run the help_dialog app (bundle or wrapper) with an explicit path to the html file, something like `./help_dialog ../data/help_dialog.html`.

Both ways *should* work, and both are using an explicit argument with a full or relative path respectively.

Note: running the application `help_dialog` in the build folder w/o an explicit argument doesn't work on all platforms. Putting the html file into the bundle and using the macOS specific "hack" to open the file in the bundle seemed to work but without the images this would also be only an incomplete solution.

I don't have a solution right now. My priority was to make the test/demo program work with all programs executed via the demo menu. I'm pretty sure this works now.

Although we could fix the issue on macOS by packaging all support files in their respective bundles this wouldn't solve the issue for any other platform, i.e. you can't run build/bin/colbrowser under Linux and expect it to find the rgb.txt file in the data/ directory. It would be less complicated if the Visual Studio and Xcode build didn't use their own subdirs per build type, i.e. build/bin/Debug/colbrowser.exe (VS) or build/bin/Debug/colbrowser.app (macOS bundle).

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/ae5eaee1-0731-0fdf-156e-44409e62d4c0%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.