Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taodongl opened this issue Jan 17, 2022 · 2 comments
Labels

Comments

@taodongl
Copy link

taodongl commented Jan 17, 2022

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 taodongl changed the title Could provide example to load resource files(icon, css, js) which doesn't rely on "packfolder.exe"? Could provide example to load resource files(html, icon, css, js) from disk? Jan 17, 2022
@pravic
Copy link
Member

pravic commented Jan 17, 2022

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: c-smile/sciter-sdk#164.

@pravic
Copy link
Member

pravic commented Jan 17, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants