How vencord/installer works
Purpose and build entry points
This Go repository builds the cross-platform Vencord Installer: a desktop GUI by default and a terminal CLI with the cli build tag. It locates an installed Discord client, obtains required Vencord/OpenAsar assets, patches Discord’s application archive layout, and can update itself. Main entry selection is split between gui.go, cli.go, and platform-specific CLI files such as cli_windows.go.
Application modes and UI boundary
The default build is a graphical installer; the CLI is an alternate compile-time frontend rather than a separate service. UI-specific build selection is represented by buildinfo/ui_type.go, buildinfo/ui_type_gui.go, and buildinfo/ui_type_cli.go. Linux GUI builds require native SDL/OpenGL/X11 or Wayland dependencies, while Windows and macOS carry platform packaging resources in winres/winres.json and macos/Info.plist.
Discord discovery
Platform-specific discovery isolates filesystem and installation-layout differences for the target Discord desktop installation:
• find_discord_windows.go
• find_discord_darwin.go
• find_discord_linux.go
This boundary supplies the Discord location to the installer/patcher rather than embedding one universal path convention.
Installation and patching pipeline
The core mutation path is centered on patcher.go, with archive/application handling in app_asar.go and OpenAsar-specific work in openasar.go. These components likely manage Discord’s app.asar-based resource structure and perform the installation or replacement steps needed for Vencord. Shared operational constants and utilities are kept in constants.go and util.go; logging is centralized in log.go.
Remote artifact and release integration
Network-facing update/download responsibilities are separated from patching:
• github_downloader.go retrieves release assets from GitHub.
• self_updater.go updates the installer binary itself.
• buildinfo/git_data.go exposes source/revision metadata for builds.
This keeps external GitHub release retrieval and installer self-maintenance distinct from local Discord modification.
Distribution and runtime infrastructure
The project is compiled with Go and native GUI dependencies; Linux requires SDL2, OpenGL, and either X11 or Wayland development libraries. User-facing bootstrap scripts are install.sh and install.ps1. Release automation and Windows package publication are defined in .github/workflows/release.yml and .github/workflows/winget-submission.yml, indicating GitHub Actions is the release pipeline and WinGet is a downstream distribution channel.
Main entry points: patcher.go Installer patcher · cli.go CLI entry · gui.go GUI entry · github_downloader.go GitHub downloader
Components 19
Installer Frontends
Compile-time GUI or CLI entry selection.
- GUI entry · Default desktop installer frontend.
gui.go - CLI entry · Alternate build selected with the cli tag.
cli.go - Windows CLI
cli_windows.go - UI build selection · Selects GUI or CLI UI identity at build time.
buildinfo/ui_type.go
Discovery & Patching
Local Discord discovery and archive mutation.
- Installer patcher · Coordinates Discord modification.
patcher.go - Windows discovery
find_discord_windows.go - macOS discovery
find_discord_darwin.go - Linux discovery
find_discord_linux.go - Discord app archive · Handles app.asar application layout.
app_asar.go - OpenAsar handling
openasar.go - Shared runtime support · Operational constants, utilities, and centralized logging.
constants.go
Artifacts & Updates
GitHub release retrieval and installer maintenance.
- GitHub downloader · Retrieves Vencord and related release assets.
github_downloader.go - Self updater · Updates the installer executable.
self_updater.go - Build revision data
buildinfo/git_data.go - GitHub releases · Source of downloadable assets and releases.
Distribution
Bootstrap and release publishing.
- Bootstrap scripts · Shell and PowerShell install entry points.
install.sh - Release workflow · Builds and publishes installer releases.
.github/workflows/release.yml - WinGet submission · Publishes the Windows package downstream.
.github/workflows/winget-submission.yml - WinGet · Downstream Windows distribution channel.
Connections 19
- GUI entry → UI build selection: build identity
- CLI entry → UI build selection: build identity
- Windows CLI → CLI entry: Windows implementation
- GUI entry → Installer patcher: starts install
- CLI entry → Installer patcher: starts install
- Windows discovery → Installer patcher: Discord location
- macOS discovery → Installer patcher: Discord location
- Linux discovery → Installer patcher: Discord location
- Installer patcher → Discord app archive: modifies
- Installer patcher → OpenAsar handling: installs or replaces
- Installer patcher → Shared runtime support: uses
- GitHub downloader → GitHub releases: downloads assets
- GitHub downloader → Installer patcher: provides artifacts
- Self updater → GitHub releases: checks releases
- Build revision data → Self updater: version metadata
- Bootstrap scripts → GitHub releases: installs release
- Release workflow → GitHub releases: publishes
- Release workflow → WinGet submission: triggers downstream release
- WinGet submission → WinGet: submits package