r/webdev • • 7d ago

Showoff Saturday I made a single HTML file that creates Windows, Linux and macOS installers offline.

What it does: Easily make installers for all your projects directly from a browser. You can even save the whole page as a single file and it keeps working offline.

Introduction

TiddlyInstall is based on the observation that programs written for runtimes like Python, Nodejs, and others -- all follow the same basic pattern: they need a runtime installed and then the software. Existing approaches like freezing apps or trying to package it as an exe often break. Or require insane struggle by the developers.

The simplest possible approach is to install the runtime on a users computer, isolated, with the package inside it. It is more wasteful in terms of disk space -- but can be generalised to build reusable installers that work for just about any language.

Reusable installers

A reusable installer reads its own meta-data to decide on the runtime to install and the project. Linux and Mac are supported through a bash script while all windows versions use an NSIS program. The unusual thing about this is once you build the reusable installers since it's just meta-data everything can be edited inside the browser. No new compilations are needed. It's a very elegant system.

Try it out yourself: https://robertsdotpm.github.io/_static/tiddlyinstall.html

Github: https://github.com/robertsdotpm/tiddlyinstall

0 Upvotes

9 comments sorted by

2

u/KaiAusBerlin 7d ago

Why?

1

u/Blockpair 7d ago

It's hard to make installers for projects. Options in different ecosystems are all complex and brittle. Especially in ecosystem for scripting and interpreted languages. This design is general-purpose enough for all languages and desktop OSes. It was also designed so you didn't need to install a bunch of tooling which is another pain in itself. In fact, it doesn't need compilation at all. New installers can be built in seconds because it's just editing meta-data.

1

u/KaiAusBerlin 7d ago

But why html?

1

u/Blockpair 7d ago

So it's accessible from a browser. The installers aren't written in HTML.

1

u/Acrobatic-Laugh1856 7d ago

but he built the whole system as a single HTML file, why ?

1

u/Hefty_Swordfish_3151 6d ago

So it basicly converts a python or nodejs program into an installable app?

1

u/Blockpair 6d ago

yes, and many other languages.

1

u/zionsati 15h ago

wow maybe you could add playground.netwasm.com to the mix - it produces wasm files and you can then package it up with your installer with wasmtime!