Including HTML files in a built application

The app I’m writing has an internal HTTP server (based on Brandon Skrtich’s great port of Thom McGrath’s HTTPServer) which allows the user to interact with it from a web browser (by visiting a local IP address).

Rather than hard code the HTML to be served up I’d rather just serve up HTML files that I write in another text editor. I would need to include these in my built application so the internal HTTP server can access them as FolderItems. Where should I store these files in the built application? Is there a convenience method to access this location from Xojo? The app runs on OS X, Win and Linux so if anybody knows the relevant locations for all three platforms, that would be great.

Also, is there a way to copy these HTML files into the app at debug/run time from the IDE?

Just drag them into your projects. They will turn into constants.

I did not know that. I think I’d prefer the be able to use actual files though that can be included as I tweak them. I’d worry I’d forget to re-drag the file to the project. I discovered the copy files build step and used that to copy the HTML files to the resources sub folder of the application.

With 2015R2.1 all files you drag into the project are placed in the Resources folder. See for Tim Parnel’s TPSF which will help you access these files in both Mac and Windows.