{"id":17654941,"url":"https://github.com/grandchild/linux_installer","last_synced_at":"2025-08-02T15:40:24.676Z","repository":{"id":54791165,"uuid":"324665577","full_name":"grandchild/linux_installer","owner":"grandchild","description":"Graphical Linux application installer for audiences that are used to Windows installers. Imitates the look-and-feel of NSIS/Wizard97.","archived":false,"fork":false,"pushed_at":"2025-04-10T09:01:21.000Z","size":19254,"stargazers_count":38,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T20:54:01.806Z","etag":null,"topics":["graphical-installer","gtk3","gui-installer","installer","installer-builder","linux","linux-installer","nsis","wizard97"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grandchild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-27T01:30:42.000Z","updated_at":"2025-04-18T12:25:28.000Z","dependencies_parsed_at":"2024-06-19T13:27:31.219Z","dependency_job_id":"d5fc0034-5a39-4bd5-a8b5-0a5df60a2f19","html_url":"https://github.com/grandchild/linux_installer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grandchild%2Flinux_installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grandchild%2Flinux_installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grandchild%2Flinux_installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grandchild%2Flinux_installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grandchild","download_url":"https://codeload.github.com/grandchild/linux_installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252854337,"owners_count":21814669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphical-installer","gtk3","gui-installer","installer","installer-builder","linux","linux-installer","nsis","wizard97"],"created_at":"2024-10-23T12:40:22.913Z","updated_at":"2025-05-07T09:47:02.820Z","avatar_url":"https://github.com/grandchild.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Installer\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/grandchild/linux_installer.svg)](https://pkg.go.dev/github.com/grandchild/linux_installer)\n[![License](https://img.shields.io/github/license/grandchild/linux_installer.svg)](\nhttps://creativecommons.org/publicdomain/zero/1.0/)\n\nGraphical Linux application installer for audiences that are used to Windows\ninstallers. When all you would _really_ need is `unzip`, but want a nice user\nexperience nonetheless. Imitates the look and feel of\n[NSIS](https://nsis.sourceforge.io/Screenshots), or rather\n[Wizard97](https://docs.microsoft.com/en-us/windows/win32/controls/wizards)-type\ninstallers.\n\n![Screenshot](.doc/screenshot_welcome.png)\n\n\u003csub\u003e\u003csub\u003e\n(Example installer [splash image](https://unsplash.com/photos/t1XLQvDqt_4) by\n[_Deniz Altindas_](https://unsplash.com/@omeganova) and\n[banner image](https://unsplash.com/photos/_TqnKtKCb5w) by\n[_Victoria_](https://unsplash.com/@pixeldebris) via [unsplash.com](unsplash.com))\n\u003c/sub\u003e\u003c/sub\u003e\n\n## Features\n\n* Application menu entry creation (_.desktop_-files)\n* Pre-/post-install script hooks\n* Automatic uninstaller script creation\n* Commandline or *\"silent\"* mode\n* Cancel with full rollback during install process\n* Run application after finish\n* Full internationalization for both GUI and CLI\n\n#### Missing Features\n\n* No partial installation, no installation by \"components\"\n* No automatic detection of previous installations for updates\n\n\n## Contents\n\n* [Quickstart: Run the Example-Installer](#quickstart-run-the-example-installer)\n* [Dev Setup \u0026 Build a Linux Installer](#dev-setup--build-a-linux-installer)\n  * [Overview](#overview)\n  * [Requirements](#requirements)\n  * [Setup](#setup)\n  * [Build](#build)\n* [Customization](#customization)\n  * [Images](#images)\n  * [Installer Style \u0026 Layout](#installer-style-layout)\n    * [GUI CSS](#gui-css)\n  * [Hooks](#hooks)\n  * [New Language Translation](#new-language-translation)\n  * [New Installer Screens](#new-installer-screens)\n    * [Layout](#layout)\n    * [Behavior](#behavior)\n* [Hacking](#hacking)\n* [Troubleshooting](#troubleshooting)\n* [License and Acknowledgments](#license-and-acknowledgments)\n\n## Quickstart: Run the Example-Installer\n\n[Download the latest builder](\nhttps://nightly.link/grandchild/linux_installer/workflows/installer-builder-installer/main/setup-installer-builder.zip)\nand extract the `setup-installer-builder` executable from it.\n\n```shell\n# Run the Setup for the installer-builder (it's a showcase within a showcase 🙂)\nchmod +x setup-installer-builder\n./setup-installer-builder\n\n# Go to the installed path\ncd ~/LinuxInstallerBuilder/  # (or the path you selected during installation)\n\n# (Add/edit file(s) in the \"data\" subfolder here, but the example has one already.)\n\n# Create the example installer, and give it a version of 1.0 (optional)\nmake VERSION=1.0\n\n# Run the default output file\n./Setup\n```\n\n## Dev Setup \u0026 Build a Linux Installer\n\n### Overview\n\nThis project creates an _installer builder_, which is used to create the actual\ninstallers. The installer builder comes in the shape of a zip archive containing:\n\n - an empty `data/` source folder for your files\n - the naked `linux-installer` binary\n   - _\"naked\"_ means \"only the installer logic\", your payload(s) will be appended to\n     this file later to create the full installer.\n - all installer GUI files in `resources/` — to customize and modify\n - a `Makefile`/`make.bat` (for building on Linux/Windows respectively) to put\n   it all together\n\nThe installer builder has no external dependencies (except for `make` on Linux, and\n`Powershell` on Windows), and can be run on a minimal dedicated build machine.\n\n### Requirements\n\n* The following dependencies need to be installed to build:\n\n  `go` `gcc` `gtk3` `make` `pkg-config` `zip`\n\n  \u003csup\u003e(Technically, BSD-Make works just as well as GNU-Make, so if you have `bmake`\n  that'll work too).\u003c/sup\u003e\n\n  Prepared install commands for popular distributions are below:\n\n  \u003cdetails\u003e\u003csummary\u003e\u003cem\u003eArchlinux / Manjaro\u003c/em\u003e\u003c/summary\u003e\n\n    `sudo pacman -S --needed go gcc gtk3 make pkg-config zip`\n  \u003c/details\u003e\n\n  \u003cdetails\u003e\u003csummary\u003e\u003cem\u003eDebian / Ubuntu\u003c/em\u003e\u003c/summary\u003e\n\n    `sudo apt install golang-go gcc libgtk-3-dev libglib2.0-dev make pkg-config zip`\n  \u003c/details\u003e\n\n  \u003cdetails\u003e\u003csummary\u003e\u003cem\u003eGentoo\u003c/em\u003e\u003c/summary\u003e\n\n    `sudo emerge dev-lang/go x11-libs/gtk+:3 dev-libs/glib dev-util/pkgconfig app-arch/zip`\n  \u003c/details\u003e\n\n  \u003cdetails\u003e\u003csummary\u003e\u003cem\u003eFedora / RedHat\u003c/em\u003e\u003c/summary\u003e\n\n    `sudo dnf install golang gcc gtk3-devel make pkgconf zip`\n  \u003c/details\u003e\n\n* If you're new to Go, verify that your installation works by running `go version`. It\n  should print the installed Go version.\n\n* If you want to edit the installer GUI layout you should install\n  [Glade](https://glade.gnome.org/) as well.\n\n### Setup\n\nThese steps need to be executed only initially and after updating the installer builder\nitself.\n\n1. [Install all dependencies](#requirements).\n1. `cd` into the local copy of this repository and run `make linux-builder.zip`.\n1. Copy the resulting `linux-builder.zip` archive to builder machine (if different). The\n   builder machine can run Linux or Windows.\n1. Extract anywhere.\n\n### Build\n\nThese steps need to be executed in the extracted builder directory, and for every\ninstaller.\n\n1. Add necessary application files to the `data` subfolder\n1. Set `variables.version` (and possibly other variables) in\n   `resources`/`config.yml`\n1. Run `make` to create installer.\n   ```shell\n   cd ~/path/to/linux-builder\n   make\n   # or set version and filename directly on the commandline:\n   make VERSION=10.0 OUTPUT=Setup_ExampleApp_v1.1\n   ```\n1. The same on Windows:\n   ```cmd\n   cd /d D:\\Data\\linux-builder\\\n   make.bat\n   :: or:\n   make.bat VERSION=10.0 OUTPUT=Setup_ExampleApp_v1.1\n   ```\n   If you set the variables in `resources`/`config.yml` before you can also\n   simply run `make.bat` by double-clicking.\n\n#### Speed-Up Installer Creation\n\nYou can pre-compress files that are the same for several installers into zip archives\nand put them into the `data_compressed` folder. This can speed up the creation of a\nbatch of mostly-similar installers.\n\n*Note:* The archive name `data.zip` is used by the builder, so don't use that specific\nfilename.\n\n\n## Customization\n\nVarious parts of the installer can be customized and changed without touching the code,\nsuch as the style and layout of elements, and the translation strings. The way to do\nthis is described in this section.\n\nAdding a new screen (or removing one) requires only minor code changes, and is explained\nbelow as well.\n\n\n### Images\n\nThe `splash.bmp` image is shown on the left-hand side of the language-, welcome- and\nsuccess-/failure screens, and should be a vertical 164×314 pixels in size. The *right\nside* of the image should connect well with the `window.background` color (currently\nplain white `#ffffff`).\n\nThe `banner.bmp` image is shown on the top of all other screens and should be a\nhorizontal 497×60 pixels in size. The *bottom* of the image should connect well with the\n`window.background` color like above.\n\nThe `icon.gif` image is used as the icon in the taskbar and possibly the window's title\nbar while the installer is running. It should be a square GIF image, not too large\n(16×16 or 32×32 pixels).\n\n\n### Installer Style \u0026 Layout\n\nThe GUI layout of the installer is specified in `resources/gui/gui.glade`. This file can\nbe edited with [Glade](https://glade.gnome.org/), a WYSIWYG GTK3 UI editor.\n\nThe layout consists of the main installer window and a do-you-really-want-to-quit dialog\nbox.\n\nThe installer window consists mainly of the \"Stack\" of screens that the installer can go\nthrough. Not all have to be visited (e.g. installation failure), and not necessarily in\norder (although they are mostly run through sequentially).\n\n#### GUI CSS\n\nGTK3 supports styling UI elements with CSS. Elements can have *id*s, *class*es and are\nof a type, just like regular HTML elements.\n\nThe GUI CSS is loaded from a variable in `resources/config.yml` called `gui_css`, which\ncontrols some colors in the GUI, and mostly sets the background color to white, and\nchanges some font properties so the license text is not too large, and the filenames in\nthe installer progress not too prominent.\n\nTo change the styling of the installer, simply change the content of that variable. See\n[the GTK3 CSS docs](https://developer.gnome.org/gtk3/stable/chap-css-overview.html) for\ninformation and both the [example `config.yml`](resources/config.yml) and the\n[`config.yml` for this repository's installer](.release/resources/config.yml) for hints.\n\n\n### Hooks\n\nBefore installation starts, and after, there is the possibility of running a custom\nscript to do any tasks necessary at that time. Currently these are present, but empty.\n\nThe hook scripts live in `resources/hooks/` and are named after their execution time,\nnamely `pre-install.sh` and `post-install.sh`, which run before and after installation,\nrespectively.\n\nYou can write custom commands into these files and they will be executed. Their output\n(for debugging purposes) is logged into the installer.log file that is created when the\ninstaller is run.\n\n\n### New Language Translation\n\nIn short: Add a new file named `xx.yml` inside `resources/languages/` (or better, copy\n`en.yml`), where \"*xx*\" is the language's two-letter [ISO\n639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Then translate all\nmessages. The language should now be available in the language selection in the GUI and\nthe help text in the CLI mode.\n\nE.g. in order to add French, create and translate `resources/languages/fr.yml`.\n\n\n### New Installer Screens\n\nA new installer screen is a two-step process:\n\n1. *Layout*: Create a new installer screen in `resources/gui/gui.glade`\n1. *Behavior*: Add screen to `screenHandlers()` inside `gui/gui.go`\n\n#### Layout\n\nIn the list of screens in Glade, right-click on the screen after which you want to\ninsert your new screen, and select \"*Insert Page After*\" at the bottom of the context\nmenu. Double-click inside the resulting empty space and select GtkBox to create a layout\nbase for the new screen. Give the Box an ID in the details panel on the right in the\n\"General\" tab. This ID is needed in the next step.\n\nYou can then design the inside of the Box however you like. Remember to add IDs to\nrelevant elements in order to reach them from the behavior code.\n\n#### Behavior\n\nIn `gui/gui.go` inside `screenHandlers()` add a new section for the screen like this:\n\n```go\n    {\n        name: \"myscreen\",\n        disabled: false,\n        before: func() {\n            // ...\n        },\n        after: func() {\n            // ...\n        },\n        undo: func() bool {\n            // ...\n        }\n    },\n```\n\nThe \"*name*\" key is the ID you chose in the layout step. The \"*disabled*\", \"*before*\",\n\"*after*\" and \"*undo*\" keys are documented in the comment for the ScreenHandler struct a\nlittle bit earlier in `gui/gui.go`. See there for details.\n\nIf a function for a key is empty (or if \"*disabled*\" is `false`), the key can be omitted\ncompletely.\n\n\n## Hacking\n\nSee [HACKING.md](HACKING.md).\n\n\n## Troubleshooting\n\n#### `libc.so.6: version GLIBC_... not found`\n\nThe installer might fail to run on another machine with an error like this:\n\n```\n./linux-installer-dev: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./linux-installer-dev)\n```\n\nThe installer builder was linked on a machine with a newer libc than the one on the\nrunning system. The solution is to build on a system with the lowest libc version that\nyou want to target. Generally this means to build the installer builder on the oldest\nLinux version that you are targeting.\n\nTo check which version you are running, run `ldd --version`.\n\n(Note that this does not affect the machine on which you are packaging the actual\ninstallers. You can run the installer builder on any system.)\n\n\n## License and Acknowledgments\n\nThis software has a [CC0](https://creativecommons.org/publicdomain/zero/1.0/) license.\n\nTo the extent possible under law, all copyright and related or neighboring rights to\nthis work are waived.\n\n(And yes, this means commercial use is explicitly allowed.)\n\n\nThis software was developed and tested for years at\n[Contecs engineering services GmbH](http://www.contecs-engineering.de/) who have\ngraciously allowed publication as free and open source software. Thank you very much!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrandchild%2Flinux_installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrandchild%2Flinux_installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrandchild%2Flinux_installer/lists"}