Interactive GUI Installer Builder is a Bash-based packaging helper that creates desktop-friendly installers for Linux and macOS from an existing published application build.
It asks for the required packaging information interactively, such as the app name, version, target platform, build folder, app icon, install path, output directory, desktop metadata, and macOS package settings. This makes it easier to reuse the same script for different apps without hard-coding project-specific values.
- Interactive prompts for all important installer settings
- Linux self-extracting
.runinstaller generation - Linux
.desktoplauncher creation - App icon support for Linux and macOS
- Custom app name, slug, version, binary name, and output directory
- Linux install path and terminal command customization
- Linux application menu entry with categories and keywords
- Built-in Linux uninstaller script
- macOS
.appbundle generation - macOS
.pkginstaller generation - macOS
.dmgdisk image generation - Optional macOS signing identity input
- Automatic host platform detection
| Platform | Output | Notes |
|---|---|---|
| Linux | .run |
Self-extracting installer for Linux desktop apps |
| Linux | .desktop |
Optional launcher for running the installer from the desktop |
| macOS | .app |
Application bundle created from the published app files |
| macOS | .pkg |
Installer package with macOS installer flow |
| macOS | .dmg |
Drag-and-drop disk image for distribution |
- Bash
- A published application build folder
- Main executable/binary inside the build folder
- Optional app icon/image file
To build and run the Linux installer, you need:
- Linux host system
tarchmod,cp,mkdir,ln, and other standard Unix utilitiespkexecif you want to use the generated.desktopinstaller launcher
To build macOS packages, you must run the script on macOS because the required packaging tools are native macOS tools:
pkgbuildproductbuildhdiutilsipsiconutil
your-project/
├── interactive_gui_installer_builder.sh
├── Build/
│ └── Release/
│ └── 1.0.0/
│ ├── linux-x64/
│ │ └── YourApp
│ └── macos-x64/
│ └── YourApp
├── assets/
│ └── app-icon.png
└── Installers/
The exact folder names can be changed during the interactive setup. The script asks for the build folder and output directory before creating the installers.
Clone the repository and make the script executable:
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
cd YOUR_REPOSITORY
sed -i 's/\r$//' interactive_gui_installer_builder.sh
chmod +x interactive_gui_installer_builder.shRun the script interactively:
./interactive_gui_installer_builder.shYou can also pass the target platform as the first argument:
./interactive_gui_installer_builder.sh linux
./interactive_gui_installer_builder.sh macos
./interactive_gui_installer_builder.sh bothThe script supports these target values:
| Target | Description |
|---|---|
auto |
Detects the host platform and builds the matching installer |
linux |
Builds the Linux .run installer |
macos |
Builds macOS .pkg and .dmg installers |
both |
Builds both targets when possible |
macOS installers can only be created on macOS. If
bothis selected on Linux, the script continues with the Linux build only.
During execution, the script asks for values such as:
Application display name
Application slug / file prefix
Main binary/executable name inside publish folder
Version
Target platform
Where generated setup files should be saved
Icon/image path
App comment/description
Generic name
Website
Linux publish/build folder
Linux install path
Linux terminal command / symlink name
Linux desktop categories
Linux desktop keywords
macOS publish/build folder
macOS .app bundle name
macOS bundle/package identifier
macOS DMG size
macOS Developer ID signing identity
This keeps the builder reusable across multiple projects and versions.
Example values:
Application display name: MyApp
Application slug / file prefix: myapp
Main binary/executable name: MyApp
Version: 1.0.0
Target platform: linux
Output directory: Installers
Icon/image path: assets/app-icon.png
Linux publish/build folder: Build/Release/1.0.0/linux-x64
Linux install path: /opt/myapp
Linux terminal command: myapp
Generated files:
Installers/myapp-1.0.0-Linux-GUI.run
Installers/myapp-installer.desktop
Install on Linux:
cd Installers
sudo bash myapp-1.0.0-Linux-GUI.runAfter installation, the app can be launched from:
myappOr from the desktop application menu.
Uninstall:
sudo bash /opt/myapp/uninstall.shExample values:
Application display name: MyApp
Application slug / file prefix: myapp
Main binary/executable name: MyApp
Version: 1.0.0
Target platform: macos
Output directory: Installers
Icon/image path: assets/app-icon.icns
macOS publish/build folder: Build/Release/1.0.0/macos-x64
macOS .app bundle name: myapp.app
macOS bundle/package identifier: com.example.myapp
macOS DMG size: 500m
Generated files:
Installers/myapp-1.0.0-macOS-GUI.pkg
Installers/myapp-1.0.0-macOS.dmg
For Linux, a .png icon is recommended.
For macOS, an .icns icon is recommended. If a .png file is provided on macOS, the script can convert it into an .icns file using native macOS tools.
For public macOS distribution, signing and notarization are recommended.
The script supports an optional signing identity input. If you skip signing, the generated package can still be created, but macOS Gatekeeper may show security warnings when users try to open the app.
Example signing identity format:
Developer ID Application: Your Name (TEAMID)
Make sure the app is published before running the packaging script.
Example:
dotnet publish -c Release -r linux-x64 --self-contained
dotnet publish -c Release -r osx-x64 --self-containedThen provide the correct publish folder path when the script asks for it.
Check that the binary name entered during setup exactly matches the executable file inside the publish folder.
Run the macOS target on a macOS machine with Xcode Command Line Tools installed.
The generated Linux installer writes to system folders such as /opt, /usr/local/bin, and /usr/share/applications, so it must be run with root permissions:
sudo bash your-app-version-Linux-GUI.runRecommended files for this repository:
.
├── README.md
├── interactive_gui_installer_builder.sh
└── assets/
└── interactive-installer-builder.png
Choose a license that fits your project. Common options include MIT, Apache-2.0, and GPL-3.0.
If you use MIT, add a LICENSE file and update this section:
MIT License
Copyright (c) YEAR YOUR_NAME
Contributions are welcome. You can improve the project by opening issues, suggesting new packaging targets, improving platform support, or submitting pull requests.
Created for building reusable Linux and macOS GUI installers from a single interactive Bash script.
