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)] Greg Ercolano Aug 14, 2020  
 
>> 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.

	Could cmake add a special mac build step that on creation of the app,
	also creates the help_dialog.app/Contents/Resources subdir and copies
	the html file into it?

	Since Resources I think is how Apple suggests packaging files
	that an app depends on (along with icons, language files, config files, etc)
	I expect we should try to preserve this for the demo.

> 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

	For the other platforms, I suppose we could just have a data subdir
	and the executable's code could use, pseudocode:

		htmlfile = directory(argv[0]) + "/data/help_dialog.html"

	..with the directory hierarchy being:

		<build>/bin/help_dialog.exe
		<build>/bin/data/help_dialog.html

	And if we wanted to standardize this across all platforms, then
	there wouldn't need to be #ifdef's in the code.

	Thing is it /might/ be good that at least one app shows the
	"Apple way", which means creating the Resources subdir and copying
	the file into it.

-- 
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/fe42b4bc-8b47-f65e-490e-a2967688de53%40seriss.com.
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'.