webdrop-bridge/build/scripts
2026-03-12 13:59:33 +01:00
..
brand_config.py feat: Add toolbar icon configuration and update handling for Agravity 2026-03-12 09:07:14 +01:00
build_macos.sh feat: Add toolbar icon configuration and update handling for Agravity 2026-03-12 09:07:14 +01:00
build_windows.py fix: Rename WiX object file and correct source directory path for Heat-generated files 2026-03-12 11:23:58 +01:00
create_release.ps1 feat: Enhance asset upload process with Python script for reliability and retry logic 2026-03-12 13:59:33 +01:00
create_release.sh Enhance branding and release workflows 2026-03-12 08:38:40 +01:00
download_release.ps1 feat: add installation scripts and update documentation for downloading WebDrop Bridge releases 2026-03-03 09:23:09 +01:00
download_release.sh feat: add installation scripts and update documentation for downloading WebDrop Bridge releases 2026-03-03 09:23:09 +01:00
README.md feat: add installation scripts and update documentation for downloading WebDrop Bridge releases 2026-03-03 09:23:09 +01:00
sync_remotes.ps1 fix: Correct PowerShell syntax in sync_remotes.ps1 and add graceful error handling 2026-01-28 13:07:45 +01:00
sync_version.py refactor: Enhance Unicode handling in build scripts and rename sync_version function 2026-02-18 13:54:17 +01:00
version_utils.py feat: Implement centralized version management and sync process 2026-01-30 09:16:12 +01:00

Build Scripts

Automation scripts for building, releasing, and downloading WebDrop Bridge.

Scripts Overview

Script Purpose OS
download_release.ps1 Download installer from Forgejo via wget Windows
download_release.sh Download installer from Forgejo via wget macOS/Linux
build_windows.py Build Windows MSI installer Windows
build_macos.sh Build macOS DMG installer macOS
create_release.ps1 Create GitHub/Forgejo release Windows
create_release.sh Create GitHub/Forgejo release macOS/Linux
sync_remotes.ps1 Sync git remotes Windows
sync_version.py Manage version synchronization All

Download Scripts

Purpose

The download_release.ps1 (Windows) and download_release.sh (macOS/Linux) scripts download pre-built WebDrop Bridge installers from the Forgejo repository using wget. This is the recommended way to:

  • Initial Installation: First-time users can bootstrap without building from source
  • Enterprise Deployments: Automated setup scripts in larger organizations
  • Offline/Air-Gapped Systems: Download on one machine, transfer to another
  • Proxy Environments: Works with corporate proxies (via wget)
  • CI/CD Automation: Internal deployment pipelines
  • Command-Line Preference: Admins who prefer CLI tools over GUIs

Features

Automatic platform detection - Prefers .dmg on macOS, .msi on Windows SHA256 checksum verification - Ensures integrity of downloaded files Progress indication - Shows download progress with wget Error handling - Clear error messages for common issues Version selection - Download specific releases or latest Offline-friendly - Works in environments with limited connectivity

Prerequisites

  • wget (required)
    • Windows: choco install wget or winget install GNU.Wget
    • macOS: brew install wget
    • Linux: apt-get install wget (Ubuntu/Debian) or equivalent

Direct wget Commands (No Script Needed)

Simplest: If you know the version

# Download directly by version tag
wget https://git.him-tools.de/HIM-public/webdrop-bridge/releases/download/v0.8.0/WebDropBridge_Setup.msi
wget https://git.him-tools.de/HIM-public/webdrop-bridge/releases/download/v0.8.0/WebDropBridge_Setup.dmg

If you need to auto-detect latest (with grep/cut, no jq needed)

# Get latest release and download MSI/DMG
wget -qO- https://git.him-tools.de/api/v1/repos/HIM-public/webdrop-bridge/releases/latest | \
  grep -o '"browser_download_url":"[^"]*\.\(msi\|dmg\)"' | head -1 | cut -d'"' -f4 | \
  xargs wget -O installer.msi

With checksum verification

# Download installer and checksum
INSTALLER=$(wget -qO- https://git.him-tools.de/api/v1/repos/HIM-public/webdrop-bridge/releases/latest | \
  grep -o '"browser_download_url":"[^"]*\.\(msi\|dmg\)"' | head -1 | cut -d'"' -f4)

wget -O installer.msi "$INSTALLER"
wget -O installer.sha256 "${INSTALLER}.sha256"

# Verify (macOS: shasum -a 256 -c installer.sha256)
sha256sum -c installer.sha256

Windows PowerShell

# Latest release to current directory
.\download_release.ps1

# Specific version to Downloads folder
.\download_release.ps1 -Version "0.8.0" -OutputDir "$env:USERPROFILE\Downloads"

# Skip checksum verification
.\download_release.ps1 -Verify $false

macOS / Linux Bash

# Latest release
./build/scripts/download_release.sh

# Specific version to Downloads
./build/scripts/download_release.sh 0.8.0 ~/Downloads

# Skip checksum verification
./build/scripts/download_release.sh latest --no-verify

Build Scripts

build_windows.py

Builds Windows MSI installer using PyInstaller and WIX toolset.

python build/scripts/build_windows.py --msi

build_macos.sh

Builds macOS DMG installer with code signing and notarization.

bash build/scripts/build_macos.sh

Release Scripts

create_release.ps1 / create_release.sh

Automated release creation with versioning and asset uploads.

# Windows
.\build\scripts\create_release.ps1

# macOS/Linux
./build/scripts/create_release.sh

Version Management

sync_version.py

Manages consistent versioning across the project.

python build/scripts/sync_version.py --version 0.8.0

Integration Flow

download_release.ps1/sh
    ↓
Fetches release from Forgejo API
    ↓
Downloads installer (.msi or .dmg)
    ↓
Verifies SHA256 checksum
    ↓
Installer ready for execution
    ↓
(Application auto-update handles future updates)

Testing Scripts Locally

# Test download script (dry-run)
.\build\scripts\download_release.ps1 -Version "0.7.1"

# Test with different output directory
.\build\scripts\download_release.ps1 -OutputDir ".\test_download"

Troubleshooting

wget not found

  • Windows: Install via winget install GNU.Wget or Chocolatey
  • macOS: brew install wget
  • Linux: apt-get install wget (or equivalent)

Checksum verification failed

  • File may be corrupted in transit
  • Retry download: .\download_release.ps1 -Verify $false then manually verify
  • Report issue with download URL and Forgejo release info

Network timeouts

  • Check connectivity to https://git.him-tools.de
  • May indicate temporary Forgejo API unavailability
  • Retry after a few minutes

Permission denied (macOS/Linux)

chmod +x build/scripts/download_release.sh
chmod +x build/scripts/build_macos.sh

For user-facing documentation, see QUICKSTART.md and README.md