Introducing a new way to review your PRs.

Read the announcement

transmission-remote-gui / transgui

🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.

View on GitHub

19 documents · Updated Sep 25, 2026

docs / build-release-and-packaging

Build, release, and packaging

Transmission Remote GUI uses Free Pascal and Lazarus to produce one desktop application for several operating systems. The build flow turns the Lazarus project into a platform-specific executable, then adds the files and runtime support needed for each distribution format. Continuous integration (CI) checks these outputs before tagged builds publish release files.

Build system

The build system has two linked entrypoints. The Lazarus project describes the application and its component package, while the generated Makefile selects the compiler target, widget set, and distribution action. The application lifecycle and startup and component wiring pages explain what the resulting executable does after it starts.

Project entrypoints

The program entrypoint is transgui.lpr. It selects the Lazarus widget layer for the target system and starts the main form. transgui.lpi is the Lazarus project definition; it links the application to the reusable trcomp package and the Lazarus Component Library (LCL). A normal build first makes the package and project resources with lazbuild, then uses make to create the final executable. References: transgui.lpr#L25-L65, transgui.lpi#L28-L53, Makefile#L2255-L2267

Build outputs

The build creates the transgui executable and places temporary compiler files in units and lib. The zipdist target collects the executable with the license, readme files, change history, icon, and language files. It then creates a versioned archive in Release. VERSION.txt supplies the release number used in archive and package names. References: Makefile#L2264-L2285, VERSION.txt• L1, setup/…/build.sh• L5-7

The target system selects the desktop widget set. Linux and other Unix targets use GTK2, Windows targets use Win32, and Darwin targets use Cocoa. This lets one project definition produce native desktop behavior while the packaging steps add the files expected by each operating system. References: Makefile#L307-L315, transgui.lpr#L34-L43

Continuous integration

CI is the automated gate for source quality, build results, and release assets. Pull requests and pushes to master run checks; a tag also enables release publication after all required builds finish.

Validation stages

The main workflow checks shell formatting, shell safety, Markdown links, file style, and the generated table of contents. It then builds a Linux zip archive, builds Unix tarballs for four architectures, starts the x86_64 GTK2 application in a virtual display, and builds a macOS disk image. The Windows workflow runs separately for 32-bit and 64-bit targets. References: .github/…/ci.yml• L19-30, .github/…/ci.yml• L104-123, .github/…/ci.yml• L125-219, .github/…/ci.yml• L245-287, .github/…/windows-ci.yml• L17-27

The checks use isolated build environments and print hashes for the produced files. The Windows build also installs the result, checks the executable version and machine type, removes it, and tests the portable archive. These checks confirm both that the program compiles and that users can use the main distribution paths. References: .github/scripts/build-windows.ps1#L65-L150, .github/scripts/build-windows.ps1#L248-L299, setup/…/smoke_test_gtk2_startup.sh• L158-235

Release publication

The release job runs only for a Git tag. It waits for the Linux archive, macOS disk image, and Linux zip validation jobs, downloads their artifacts, checks that the expected names exist, and creates or updates the matching GitHub Release. Windows artifacts are checked and uploaded by the separate Windows workflow rather than by this release job. References: .github/…/ci.yml• L313-367, .github/…/windows-ci.yml• L89-109

Distribution packaging

Packaging turns the same executable into formats that match the install model of each platform. The package files carry the program version and include the runtime data that the application needs at launch.

Unix packages

The Unix release script installs the Lazarus and Free Pascal tools, builds the component package and application with a clean Lazarus configuration, and records compiler information in the About form for the build. It then makes a compressed txz archive for the host architecture. The archive contains the executable and the user-facing documentation, license, icon, history, and language resources. References: setup/…/debian-ubuntu-install_deps.sh• L1-6, setup/…/build.sh• L12-38

The CI matrix repeats this package flow for x86_64, i686, ARMv6, and ARMv7 Linux environments. The resulting files use names that include the version and architecture so that a release can offer the correct binary for each supported system. References: .github/…/ci.yml• L125-194, .github/…/ci.yml• L207-219

Windows packages

Windows provides two distribution choices. The portable ZIP contains the executable and its data files. The installer is built with Inno Setup and adds an install and uninstall flow, optional file and magnet-link associations, language files, and OpenSSL libraries. Separate 32-bit and 64-bit setup definitions select the matching executable architecture and runtime files. References: setup/win/make_zipdist.bat#L16-L33, setup/win/make_setup.bat#L22-L43, setup/win/setup.iss#L68-L120, setup/win_amd64/setup.iss#L68-L120

The installer can fetch the matching Microsoft Visual C++ runtime when the OpenSSL component needs it. Before installation continues, the setup checks that the downloaded runtime has a valid Microsoft signature. Code signing is optional and is enabled only when the build environment supplies a certificate. References: setup/win/setup.iss#L143-L225, setup/win_amd64/setup.iss#L145-L227, setup/vcredist_authenticode.iss#L84-L214

macOS disk images

The current macOS path builds the Cocoa application with pinned Lazarus and Free Pascal tool versions. It places the executable, language resources, icon, metadata, readme, and history into an application bundle, then creates a compressed DMG with an Applications shortcut. The result is a versioned file in Release. References: setup/…/install_deps.sh• L6-10, setup/…/install_deps.sh• L168-190, setup/…/create_app_new.sh• L119-162, setup/…/create_app_new.sh• L164-203

Snap packages

The Snap definition provides a Linux package with strict confinement. It takes the application and its desktop entry as the package payload, declares the graphical and network access it needs, and stages the GTK and OpenSSL libraries needed at runtime. The version comes from VERSION.txt, so the Snap and the other release formats share one version source. References: snap/snapcraft.yaml• L2-13, snap/snapcraft.yaml• L15-47, snap/snapcraft.yaml• L49-60, snap/local/transgui.desktop#L1-L14

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep VERSION.txt, the Lazarus version metadata in transgui.lpi, and the artifact names in the CI workflows aligned. The Windows checks compare the executable version with VERSION.txt.
  • Keep each target's widget set and compiler target aligned with its package name. A mismatched target can create a valid-looking file for the wrong operating system or CPU.
  • Keep the payload lists aligned across Makefile, the Windows setup files, the macOS bundle step, and the Snap prime list. Missing language or metadata files can make a package incomplete even when compilation passes.
  • Keep architecture-specific Windows OpenSSL and Visual C++ runtime choices matched to the executable. Do not copy files between the x86 and x86_64 package paths.
  • Keep the release asset names in .github/…/ci.yml aligned with the names emitted by the Unix and macOS scripts. A successful build cannot publish if the release job cannot find an expected name.
  • Keep the Snap desktop entry and declared plugs aligned with the application launch mode. Changes to desktop file paths or graphical and network access can stop the confined app from launching.

Important failure modes

TriggerConsequenceGuard
Lazarus, Free Pascal, or the required component package is missingThe project or resource build stops before an executable is madeThe build scripts install or validate the required tool versions and build trcomp before transgui
A stale compiler state remains in units or libA package can contain output from an earlier target or configurationUnix, macOS, and CI Windows flows remove these paths and use a private Lazarus configuration before building
VERSION.txt and embedded executable metadata disagreeNames or release checks do not match the program shown to usersWindows Assert-Artifact compares file metadata with VERSION.txt; release jobs check exact asset names
A Windows archive uses the wrong OpenSSL or Visual C++ runtime architectureTLS support or application startup can fail on the user's systemSeparate x86 and x86_64 setup paths include matching DLLs and runtime checks
The GTK2 binary cannot keep one visible main window in the virtual displayLinux CI rejects a binary that compiles but does not start correctlyThe GTK2 smoke test checks process life, window visibility, window count, and startup output
A tagged build omits one required Linux or macOS artifactGitHub Release creation stops without publishing the release setThe publish job waits for build jobs and verifies every expected file before upload
A Snap desktop path or required access plug is wrongThe confined application may not appear or may not reach its daemonThe Snap definition keeps the desktop entry, command, and graphical, home, and network plugs together

Key files

FileWhy to read it
transgui.lprShows the application build entrypoint and platform conditionals.
transgui.lpiDefines the Lazarus project, required packages, source units, and version metadata.
MakefileShows the common executable, clean, and portable archive targets.
VERSION.txtDefines the shared release version.
.github/…/ci.ymlDescribes source checks, Unix and macOS builds, artifact checks, and tagged release publication.
.github/…/windows-ci.ymlDescribes the Windows architecture matrix and artifact upload.
.github/scripts/build-windows.ps1Shows the Windows artifact, install, uninstall, and architecture checks.
setup/…/build.shShows the Unix archive flow and package contents.
setup/win/setup.issShows the 32-bit Windows installer behavior and payload.
setup/win_amd64/setup.issShows the 64-bit Windows installer behavior and payload.
setup/…/create_app_new.shShows the current macOS application bundle and DMG flow.
snap/snapcraft.yamlShows the Snap version source, payload, runtime libraries, confinement, and access needs.