Search code examples
javascripthtmlcssexecutable

How to package an html webpage such as html, js, css into a single .exe executable program file?


I wrote an example of a web page lottery written in jQuery, which was changed according to some examples. I want to turn it into an .exe executable.

How can I do that?

The file structure is as follows:

jquery-app
|-----css
| |--demo.css
|-----images
| |--1.jpg
| |--2.jpg
| |--......
|-----js
| |--awardRotate.js
| |--jquery.min.js
|
|-----index.html

How should I proceed?


Solution

  • Electron is the most used framework for this. It's not going to be a simple copy/paste into a wrapper, if that is what you are asking for, but it's got a lot going for it - good docs and a great community. Bit of a memory hog though.

    https://www.electronjs.org/

    You could also use Visual Studio to create a new windows application and use a web view as a wrapper, but I'm not sure if the browser code is bundled with that; or if it uses a natively installed browser at runtime.