rust-sciter icon indicating copy to clipboard operation
rust-sciter copied to clipboard

Could provide example to load resource files(html, icon, css, js) from disk?

Open taodongl opened this issue 3 years ago • 2 comments

take "minimal" as an example: <html window-icon="icon.png"> doesn't work, because "icon.png" isn't found in memory Could give an example to load files from disk. It is helpful to hot-reload

taodongl avatar Jan 17 '22 07:01 taodongl

Oh right, it will not be loaded because the URL we use is a virtual one: example://minimal.htm. So, it should be either a file path or all resources should be packed to a single resource package (for example, archived.rs). Or via a custom resource loader.

Regarding the hot reload - it can also be done via a script itself: https://github.com/c-smile/sciter-sdk/pull/164.

pravic avatar Jan 17 '22 15:01 pravic

Could provide example to load resource files(icon, css, js) which doesn't rely on "packfolder.exe"?

Well, besides packfolder there could also be:

  • file path
  • zip archive
  • custom resource loader

For live reloading (or in debug (edit-and-reload) environment) file paths are better, for sure.

pravic avatar Jan 17 '22 15:01 pravic