packaging: Flatpak manifest, desktop file, metainfo, NSIS installer
Neutral placeholder app id io.github.faumaray.TsClient and name "TS Client". The Flatpak builds offline from generated cargo sources on the 25.08 runtime with portal-based push-to-talk and screen capture, PulseAudio, PipeWire, notifications and Secret Service access. The Windows README covers the toolchain (MSVC, CMake, NASM, vcpkg libvpx) and signing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
7 files changed
+301
No files matched your search
@@ -0,0 +1,41 @@
|
||||
# Packaging
|
||||
|
||||
The product name is not decided yet: `TS Client` and the app id
|
||||
`io.github.faumaray.TsClient` are placeholders (also in
|
||||
`tsc_platform::{APP_NAME, APP_ID}`); rename them everywhere together.
|
||||
|
||||
| Path | What |
|
||||
|---|---|
|
||||
| `linux/` | Desktop file, AppStream metainfo and a placeholder icon, named by app id |
|
||||
| `flatpak/io.github.faumaray.TsClient.yml` | Flatpak manifest |
|
||||
| `windows/` | NSIS installer and how to build and sign on Windows ([README](windows/README.md)) |
|
||||
|
||||
## Flatpak
|
||||
|
||||
flatpak-builder builds offline, so the crates from `Cargo.lock` are listed as
|
||||
sources in `flatpak/cargo-sources.json`, generated (not committed) with
|
||||
[flatpak-cargo-generator](https://github.com/flatpak/flatpak-builder-tools/tree/master/cargo):
|
||||
|
||||
```sh
|
||||
curl -LO https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py
|
||||
python3 flatpak-cargo-generator.py Cargo.lock -o packaging/flatpak/cargo-sources.json
|
||||
|
||||
flatpak install flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08 \
|
||||
org.freedesktop.Sdk.Extension.rust-stable//25.08
|
||||
flatpak-builder --user --install --force-clean build-flatpak packaging/flatpak/io.github.faumaray.TsClient.yml
|
||||
flatpak run io.github.faumaray.TsClient
|
||||
```
|
||||
|
||||
Regenerate `cargo-sources.json` whenever `Cargo.lock` changes. Inside the build
|
||||
`rust-toolchain.toml` does not apply: the `rust-stable` extension must provide at
|
||||
least the workspace's `rust-version`. The SDK has everything else the build needs
|
||||
(CMake for libopus, ALSA, fontconfig, xkbcommon, libvpx, PipeWire, clang).
|
||||
|
||||
Permissions (`finish-args`): network, Wayland with X11 fallback, DRI, PulseAudio
|
||||
(microphone and speakers), the PipeWire socket (application audio when streaming),
|
||||
notifications and the Secret Service. Push-to-talk (GlobalShortcuts) and screen
|
||||
capture (ScreenCast) go through portals and need no permission.
|
||||
|
||||
Desktops match windows to the desktop file (taskbar icon, portal permissions) by
|
||||
X11 `WM_CLASS`, which is the binary name `tsc-desktop` (hence `StartupWMClass`),
|
||||
and on Wayland by the window's app id, which the app should set to the app id.
|
||||
@@ -0,0 +1,54 @@
|
||||
# Flatpak manifest for the desktop app. See packaging/README.md for how to
|
||||
# build it. The app id is a placeholder until the product has a name.
|
||||
id: io.github.faumaray.TsClient
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: "25.08"
|
||||
sdk: org.freedesktop.Sdk
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.rust-stable
|
||||
command: tsc-desktop
|
||||
|
||||
finish-args:
|
||||
- --share=network
|
||||
- --share=ipc
|
||||
# Wayland, with X11 only where there is no Wayland session.
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
# GPU for video decoding and rendering.
|
||||
- --device=dri
|
||||
# Microphone and speakers (the PulseAudio API, served by PipeWire on
|
||||
# current desktops).
|
||||
- --socket=pulseaudio
|
||||
# PipeWire for capturing application audio when streaming. Screen capture
|
||||
# itself goes through the ScreenCast portal.
|
||||
- --filesystem=xdg-run/pipewire-0
|
||||
# Desktop notifications.
|
||||
- --talk-name=org.freedesktop.Notifications
|
||||
# Passwords in the Secret Service keyring.
|
||||
- --talk-name=org.freedesktop.secrets
|
||||
# Portals (GlobalShortcuts for push-to-talk, ScreenCast, file chooser) need
|
||||
# no permission.
|
||||
|
||||
build-options:
|
||||
append-path: /usr/lib/sdk/rust-stable/bin
|
||||
env:
|
||||
CARGO_HOME: /run/build/tsc/cargo
|
||||
CARGO_NET_OFFLINE: "true"
|
||||
|
||||
modules:
|
||||
- name: tsc
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- cargo --offline build --release --locked -p tsc-ui
|
||||
- install -Dm755 target/release/tsc-desktop -t /app/bin/
|
||||
- install -Dm644 packaging/linux/io.github.faumaray.TsClient.desktop -t /app/share/applications/
|
||||
- install -Dm644 packaging/linux/io.github.faumaray.TsClient.metainfo.xml -t /app/share/metainfo/
|
||||
- install -Dm644 packaging/linux/io.github.faumaray.TsClient.svg -t /app/share/icons/hicolor/scalable/apps/
|
||||
sources:
|
||||
- type: dir
|
||||
path: ../..
|
||||
skip:
|
||||
- target
|
||||
- .git
|
||||
# Vendored crates, generated from Cargo.lock (see packaging/README.md).
|
||||
- cargo-sources.json
|
||||
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=TS Client
|
||||
Comment=Voice chat, text chat and screen sharing
|
||||
Exec=tsc-desktop
|
||||
Icon=io.github.faumaray.TsClient
|
||||
Terminal=false
|
||||
Categories=Network;Chat;InstantMessaging;AudioVideo;
|
||||
Keywords=voice;chat;voip;push-to-talk;
|
||||
StartupNotify=true
|
||||
StartupWMClass=tsc-desktop
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- AppStream metadata template. The name and app id are placeholders until
|
||||
the product has a name. -->
|
||||
<component type="desktop-application">
|
||||
<id>io.github.faumaray.TsClient</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>MIT OR Apache-2.0</project_license>
|
||||
<name>TS Client</name>
|
||||
<summary>Voice chat, text chat and screen sharing</summary>
|
||||
<description>
|
||||
<p>
|
||||
A desktop voice client written in Rust: talk with push-to-talk or voice
|
||||
activation, chat in channels you are not in, see who is online without
|
||||
joining, and watch and share screens.
|
||||
</p>
|
||||
<ul>
|
||||
<li>Echo cancellation, noise suppression and automatic gain control</li>
|
||||
<li>Global push-to-talk on Wayland (desktop portal), X11 and Windows</li>
|
||||
<li>Per-user volume</li>
|
||||
</ul>
|
||||
</description>
|
||||
<launchable type="desktop-id">io.github.faumaray.TsClient.desktop</launchable>
|
||||
<provides>
|
||||
<binary>tsc-desktop</binary>
|
||||
</provides>
|
||||
<url type="homepage">https://github.com/Faumaray/teamspeak_client_rs</url>
|
||||
<url type="bugtracker">https://github.com/Faumaray/teamspeak_client_rs/issues</url>
|
||||
<developer id="io.github.faumaray">
|
||||
<name>Faumaray</name>
|
||||
</developer>
|
||||
<content_rating type="oars-1.1">
|
||||
<content_attribute id="social-chat">intense</content_attribute>
|
||||
<content_attribute id="social-audio">intense</content_attribute>
|
||||
</content_rating>
|
||||
<requires>
|
||||
<internet>always</internet>
|
||||
</requires>
|
||||
<recommends>
|
||||
<control>keyboard</control>
|
||||
<control>pointing</control>
|
||||
</recommends>
|
||||
<releases>
|
||||
<release version="0.1.0" date="2026-09-26">
|
||||
<description>
|
||||
<p>First packaged build.</p>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
</component>
|
||||
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128">
|
||||
<!-- Placeholder icon: a speech bubble with sound waves. -->
|
||||
<rect x="8" y="8" width="112" height="112" rx="24" fill="#238636"/>
|
||||
<path d="M36 40h56a8 8 0 0 1 8 8v28a8 8 0 0 1-8 8H60l-16 14v-14h-8a8 8 0 0 1-8-8V48a8 8 0 0 1 8-8z" fill="#ffffff"/>
|
||||
<g fill="none" stroke="#238636" stroke-width="5" stroke-linecap="round">
|
||||
<path d="M52 56v12"/>
|
||||
<path d="M64 50v24"/>
|
||||
<path d="M76 56v12"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 507 B |
@@ -0,0 +1,50 @@
|
||||
# Windows build and installer
|
||||
|
||||
CI (`release-build` in `.github/workflows/ci.yml`) builds `tsc-desktop.exe` on
|
||||
`windows-2025` and uploads it as an artifact, with the installer when NSIS is on
|
||||
the runner. Nothing is signed there.
|
||||
|
||||
## Build
|
||||
|
||||
Needs the MSVC build tools, CMake (bundled libopus), NASM (assembly of
|
||||
`aws-lc-sys`, used by the WebRTC stack) and libvpx (video, `tsc-media`):
|
||||
|
||||
```powershell
|
||||
winget install NASM.NASM Kitware.CMake NSIS.NSIS
|
||||
vcpkg install libvpx:x64-windows-static-md
|
||||
|
||||
$vpx = "$env:VCPKG_ROOT\installed\x64-windows-static-md"
|
||||
$env:VPX_LIB_DIR = "$vpx\lib"
|
||||
$env:VPX_INCLUDE_DIR = "$vpx\include"
|
||||
$env:VPX_VERSION = "1.15.2" # what `vcpkg list libvpx` shows
|
||||
$env:VPX_STATIC = "1"
|
||||
|
||||
cargo build --release --locked -p tsc-ui
|
||||
makensis /DVERSION=0.1.0 packaging\windows\installer.nsi
|
||||
```
|
||||
|
||||
This gives `target\release\tsc-desktop.exe` and
|
||||
`packaging\windows\tsc-desktop-0.1.0-setup.exe`. The installer puts the app in
|
||||
`Program Files\TS Client`, adds a Start menu shortcut and an uninstaller; user
|
||||
data stays in `%APPDATA%\tsc`.
|
||||
|
||||
The executable uses the dynamic MSVC runtime (`VCRUNTIME140.dll`, present on most
|
||||
systems). To drop that dependency build with
|
||||
`RUSTFLAGS="-C target-feature=+crt-static"` and libvpx from the
|
||||
`x64-windows-static` triplet, or ship the Visual C++ redistributable.
|
||||
|
||||
## Signing
|
||||
|
||||
Unsigned builds trigger SmartScreen warnings. Sign the executable before packaging
|
||||
it, then the installer and the uninstaller it writes (NSIS 3.08+ runs the `SIGN`
|
||||
command on both):
|
||||
|
||||
```powershell
|
||||
signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /f cert.pfx /p $env:CERT_PASSWORD target\release\tsc-desktop.exe
|
||||
makensis /DVERSION=0.1.0 "/DSIGN=signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /f cert.pfx /p $env:CERT_PASSWORD %1" packaging\windows\installer.nsi
|
||||
```
|
||||
|
||||
Options for the certificate: an OV/EV code-signing certificate on a hardware token
|
||||
or in a cloud HSM, Azure Trusted Signing, or SignPath's free plan for open-source
|
||||
projects. In CI, keep the certificate (base64) and password in repository secrets,
|
||||
decode it to a file in the job, sign, and delete it.
|
||||
@@ -0,0 +1,86 @@
|
||||
; NSIS installer for the desktop app (tsc-desktop.exe). See README.md.
|
||||
;
|
||||
; makensis /DVERSION=0.1.0 packaging\windows\installer.nsi
|
||||
;
|
||||
; Paths are relative to this file. Optional defines:
|
||||
; BINARY the executable (default ..\..\target\release\tsc-desktop.exe)
|
||||
; OUTDIR where the installer goes (default: next to this file)
|
||||
; SIGN a signing command; "%1" is replaced by the file to sign, e.g.
|
||||
; /DSIGN="signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /a %1"
|
||||
;
|
||||
; The product name and app id are placeholders until the product has a name.
|
||||
|
||||
Unicode true
|
||||
SetCompressor /SOLID lzma
|
||||
|
||||
!ifndef VERSION
|
||||
!define VERSION "0.1.0"
|
||||
!endif
|
||||
!ifndef BINARY
|
||||
!define BINARY "..\..\target\release\tsc-desktop.exe"
|
||||
!endif
|
||||
!ifndef OUTDIR
|
||||
!define OUTDIR "."
|
||||
!endif
|
||||
|
||||
!define APP_NAME "TS Client"
|
||||
!define APP_ID "io.github.faumaray.TsClient"
|
||||
!define PUBLISHER "Faumaray"
|
||||
!define EXE "tsc-desktop.exe"
|
||||
!define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_ID}"
|
||||
|
||||
!ifdef SIGN
|
||||
; Sign the installer and the uninstaller it writes (NSIS 3.08+).
|
||||
!finalize '${SIGN}'
|
||||
!uninstfinalize '${SIGN}'
|
||||
!endif
|
||||
|
||||
Name "${APP_NAME}"
|
||||
OutFile "${OUTDIR}\tsc-desktop-${VERSION}-setup.exe"
|
||||
InstallDir "$PROGRAMFILES64\${APP_NAME}"
|
||||
InstallDirRegKey HKLM "${UNINSTALL_KEY}" "InstallLocation"
|
||||
RequestExecutionLevel admin
|
||||
|
||||
VIProductVersion "${VERSION}.0"
|
||||
VIAddVersionKey "ProductName" "${APP_NAME}"
|
||||
VIAddVersionKey "ProductVersion" "${VERSION}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
VIAddVersionKey "CompanyName" "${PUBLISHER}"
|
||||
VIAddVersionKey "FileDescription" "${APP_NAME} installer"
|
||||
VIAddVersionKey "LegalCopyright" "MIT OR Apache-2.0"
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\${EXE}"
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Section "Install"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "/oname=${EXE}" "${BINARY}"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
||||
CreateShortcut "$SMPROGRAMS\${APP_NAME}.lnk" "$INSTDIR\${EXE}"
|
||||
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayName" "${APP_NAME}"
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "Publisher" "${PUBLISHER}"
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "InstallLocation" "$INSTDIR"
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\${EXE}"
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegStr HKLM "${UNINSTALL_KEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
|
||||
WriteRegDWORD HKLM "${UNINSTALL_KEY}" "NoModify" 1
|
||||
WriteRegDWORD HKLM "${UNINSTALL_KEY}" "NoRepair" 1
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
; User data in %APPDATA%\tsc (identities, bookmarks, history) is kept.
|
||||
Delete "$INSTDIR\${EXE}"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
RMDir "$INSTDIR"
|
||||
Delete "$SMPROGRAMS\${APP_NAME}.lnk"
|
||||
DeleteRegKey HKLM "${UNINSTALL_KEY}"
|
||||
SectionEnd
|
||||
Reference in new issue
Block a user