- Software to convert HTML, CSS and JavaScript into an exe?
- 4 Answers 4
- For window apps
- A real compiler: JSC
- A bonus track: «chrome —app» and RAR
- Сайт внутри EXE файла
- Шаг первый — создание HTML страницы.
- Создание файла ресурсов
- Показ страницы в браузере
- Показ страницы в своем приложении
- Exe программирование на html
- Tagged as
- Stats
- Comments and Discussions
Software to convert HTML, CSS and JavaScript into an exe?
Do you want something that translates Javascript to native x86 code? That seems like a pretty tall order.
4 Answers 4
While the (previously) accepted answer was correct, in the intervening years the industry has gone ahead by leaps and bounds. Two very good open-source and extremely actively developed options are
- Electron, by GitHub. Lets you build cross-platform Windows, MacOS, and Ubuntu applications from HTML/JavaScript/CSS. It works by embedding them into a Chromium build alongside with Node.js. Many applications such as Slack and Visual Studio code are built with Electron.
- Cordova, by the Apache Foundation. Targets Android, iOS, and Windows from HTML/JavaScript/CSS. It works by embedding them into a WebView (or whatever is the equivalent on the target platform).
- Proton Native. Works with React Native components and does not use Electron (see above), which makes generated apps therefore more «lightweight» than the ones generated by Electron. Uses libui under the hood.
I’m assuming you mean «such» and not «suck». Tried to add an edit but the edit requires at least 6 characters changed.
@GuidoDomenici Please check out Scriptonit (scriptonit.deneskellner.com) and add to your answer if you find it useful. I just finished it recently as a free product but I’ve been using it for years while it was half-baked. And I think it’s easy to like.
Yes there is a program HTML Compiler that allows you to convert an entire HTML application (using CSS, JavaScript, Images and more) into an standalone Windows application.
There is also ExeOutput for PHP that lets you create applications in native format for Windows with PHP, JavaScript and HTML. Convert PHP scripts, websites, JavaScript, HTML, databases into stand-alone apps for Windows (single EXE files) that do not require a Web server nor PHP distribution.
There is nothing wrong with self-answered questions, however, one should disclose one’s affiliation — especially with commercial products. Are you in any way affiliated with HTML Compiler?
I am not taking exe literaly, but you can setup a desktop application with node-webkit which will basicaly run your webapp localy in a webkit browser. see http://strongloop.com/strongblog/creating-desktop-applications-with-node-webkit/
For window apps
UPDATE — I just finished a freeware solution for this; check out Scriptonit, I think it’s closest to what you need. But I’m surely biased so let’s see all the others.
If you need something to present you a window environment and a webserver emulation, choose ZZEE or ExeOutput, these are decent tools, maybe ZZEE is a bit outdated regarding the PHP version. So for «HTML, CSS and Javascript», the answer is clearly something like this.
A real compiler: JSC
If you want (something-like-)javascript to be compiled to a standalone EXE, give a chance to JSC, it’s there in your Windows, you just probably never met before. JSC gives you extremely small executables (because of the .NET already built into Windows itself) and they have full power of .NET so you can do pretty much anything you want. Flipside: apart from the syntax being familiar, not a lot will remind you of Javascript, you have to learn a lot of new practices to get along.
A bonus track: «chrome —app» and RAR
If you can live with a dependency such as Chrome, you can do a nasty but working solution: RAR can create a self-extracting EXE for you and run a command after extraction (!!), so you can pack up a little micro-universe of HTML/CSS/JS files; then you can call Chrome with «—app=something.html» that will give you a plain window with a browser environment and your HTML file in it. I know this is not a compiler; however, it’s a way to create an EXE that is self-contained and gives the user a web-liek experience in an application-like window. Sure, Javascript will be a bit limited because you’re running in a local file, not a proper website, but it’s not that painful. One lovely thing about this technique is that Chrome will remember the position and size of your window so it will pretty much feel like an application.
Сайт внутри EXE файла
В этой статье мы рассмотрим как хранить HTML страницы и входящие в него картинки в вашем проекте. В конечном итоге мы получим один исполнимый файл содержащий HTML страницу.
Шаг первый — создание HTML страницы.
Для начала мы создадим две простеньких HTML страницы. Для их создания вы можете воспользоваться вашим любимым HTML редактором. Создайте одну страницу с одним рисунком и ссылкой на другую страницу. Я назову свои delphiandprogramming.html и page2.html. Когда вы добавите картинку в страницу, то редактор напишет что-то вроде:
Но нам нужно поменять в коде HTML значение параметра SRC так чтобы он был равен имени ресурса:
Вот код моей странички delphiandprogramming.html:
Delhi And Programming Test Resources 3 Look at second page
Welcome to !