app-id: io.github.dd86k.vrcd runtime: org.freedesktop.Platform runtime-version: '26.08' sdk: org.freedesktop.Sdk command: vrcd_client # Install flatpak and flatpak-builder: # - sudo apt install flatpak flatpak-builder # Add Flathub repo if it doesn't exist: # - flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo # Install Freedesktop runtime: # - flatpak install --system flathub org.freedesktop.Platform//26.08 org.freedesktop.Sdk//26.08 # Build package: takes a build directory and the manifest, in that order # - flatpak-builder --state-dir=/tmp/flatpak-state --force-clean /tmp/flatpak-build packaging/flatpak/io.github.dd86k.vrcd.yml # - can add "--user --install" to install # Run package: "--run" needs a directory already built, it does not build one # - flatpak-builder --run /tmp/flatpak-build packaging/flatpak/io.github.dd86k.vrcd.yml vrcd_client # - once installed, "flatpak run io.github.dd86k.vrcd" instead finish-args: # Display and rendering - --share=ipc - --socket=x11 - --socket=wayland - --device=dri # Network: server connection (TCP) and XSOverlay notifications (UDP/localhost) - --share=network # VRChat Steam data: log files and screenshot metadata (read+write). # The actual VRChat compatdata lives inside the Steam library which may be at # any of these standard locations. Custom library paths on other drives are # not covered and would require --filesystem=host or a portal override. - --filesystem=~/.steam - --filesystem=~/.local/share/Steam - --filesystem=~/.var/app/com.valvesoftware.Steam modules: ## LDC2 D compiler (build-only) # Pre-built binary tarball placed under /app/ldc2 and referenced via # prepend-path in the client module. Removed from the final image by cleanup. - name: ldc2 buildsystem: simple build-commands: - cp -rp . /app/ldc2 cleanup: - /ldc2 sources: - type: archive url: https://github.com/ldc-developers/ldc/releases/download/v1.42.0/ldc2-1.42.0-linux-x86_64.tar.xz sha256: a7bc9c956138f558cadf9c962352f59d41c80df6eb3ae3f8039f25be14a69303 strip-components: 1 # No SDL modules. The runtime carries sdl3, sdl3-ttf and sdl3-image itself, # which is what let the hand-built SDL2_ttf and SDL2_image modules go away # with the SDL3 port. The Platform ships the sonames without the bare `.so` # development symlinks, so the client's loader falls back to libSDL3*.so.0 -- # see loadSDLLibraries in client/source/client/gui.d. ## vrcd client - name: vrcd-client buildsystem: simple build-options: # Expose the LDC2 toolchain installed above prepend-path: /app/ldc2/bin build-commands: # Archives don't carry the registry-set version field; patch each package # descriptor (dub.json or dub.sdl) so dub's path/version check passes. # Textual rather than parsed: dub accepts relaxed JSON (trailing commas), # which a strict parser rejects. Replace the field where there is one, # otherwise insert it. - | set -e patch_json() { VER="$2" perl -0777 -i -pe 's/"version"\s*:\s*"[^"]*"/"version": "$ENV{VER}"/ or s/\{/{\n "version": "$ENV{VER}",/' "$1"; } patch_sdl() { VER="$2" perl -0777 -i -pe 's/^version\s+"[^"]*"/version "$ENV{VER}"/m or $_ = qq{version "$ENV{VER}"\n} . $_' "$1"; } patch_json .dub/packages/bindbc-sdl/2.4.2/bindbc-sdl/dub.json 2.4.2 patch_json .dub/packages/bindbc-common/1.0.5/bindbc-common/dub.json 1.0.5 patch_sdl .dub/packages/bindbc-loader/1.1.5/bindbc-loader/dub.sdl 1.1.5 # --skip-registry=all only blocks the dub registry; git deps are fetched # separately and there is no flag to suppress that. Rewrite them as path # deps pointing at the pre-extracted archives, then drop the git entries # from selections.json so there is no version conflict. - sed -i 's|dependency "ddlogger" repository=.*|dependency "ddlogger" path="../.dub/packages/ddlogger/4397d8e57a88bd6b3a3e5e4c846ba97ac3bfd364/ddlogger"|' client/dub.sdl - sed -i 's|dependency "ddui" repository=.*|dependency "ddui" path="../.dub/packages/ddui/a70e43e45ceec730a34c5f49f6d3cdb43094b7ab/ddui"|' client/dub.sdl - | cat > client/dub.selections.json <<'EOF' { "fileVersion": 1, "versions": { "bindbc-common": "1.0.5", "bindbc-loader": "1.1.5", "bindbc-sdl": "2.4.2" } } EOF # Offline dub build: registry packages are in .dub/packages/ (--cache=local); # git deps have been rewritten to path deps above. - dub build :client --skip-registry=all --cache=local -b release --compiler=ldc2 # Install - install -Dm755 client/vrcd_client /app/bin/vrcd_client - install -Dm644 packaging/flatpak/io.github.dd86k.vrcd.desktop /app/share/applications/io.github.dd86k.vrcd.desktop - install -Dm644 packaging/flatpak/io.github.dd86k.vrcd.metainfo.xml /app/share/metainfo/io.github.dd86k.vrcd.metainfo.xml - install -Dm644 packaging/flatpak/io.github.dd86k.vrcd.png /app/share/icons/hicolor/512x512/apps/io.github.dd86k.vrcd.png sources: ## Project source # Swap to `type: dir` with `path: ../..` otherwise # Building a tag is more predictable than a commit - type: git url: https://github.com/dd86k/vrcd.git tag: v0.3.0 ## dub registry packages # Each archive is extracted (strip-components:1 drops the top-level # directory) directly into the path dub expects for --cache=local: .dub/packages//// - type: archive url: https://codeload.github.com/BindBC/bindbc-sdl/tar.gz/refs/tags/v2.4.2 sha256: fcab293861551eb8b51551b9dff394a821ebce4d52611595dc7668e0106279f9 dest-filename: bindbc-sdl-2.4.2.tar.gz dest: .dub/packages/bindbc-sdl/2.4.2/bindbc-sdl strip-components: 1 - type: archive url: https://codeload.github.com/BindBC/bindbc-common/tar.gz/refs/tags/v1.0.5 sha256: 737c8aafffa0ddd73e3f2efa20dc22354184b47608d39653e895c8a4f46182fc dest-filename: bindbc-common-1.0.5.tar.gz dest: .dub/packages/bindbc-common/1.0.5/bindbc-common strip-components: 1 - type: archive url: https://codeload.github.com/BindBC/bindbc-loader/tar.gz/refs/tags/v1.1.5 sha256: cd64a9fdd00d1ab08f8334747b0b2883d40ff0461ccb248d53e5c5c75058007a dest-filename: bindbc-loader-1.1.5.tar.gz dest: .dub/packages/bindbc-loader/1.1.5/bindbc-loader strip-components: 1 ## dub git packages # Pinned to the exact commits in client/dub.selections.json. - type: archive url: https://github.com/dd86k/ddlogger/archive/4397d8e57a88bd6b3a3e5e4c846ba97ac3bfd364.tar.gz sha256: a0e6cb463102d30080b789fecc851584ef4485a803237e8da72458615c6212df dest: .dub/packages/ddlogger/4397d8e57a88bd6b3a3e5e4c846ba97ac3bfd364/ddlogger strip-components: 1 - type: archive url: https://github.com/dd86k/ddui/archive/a70e43e45ceec730a34c5f49f6d3cdb43094b7ab.tar.gz sha256: 07f2d4a7cbfa09efb040cd82316d3433d70786b59a70af5c6d999550bac624a8 dest: .dub/packages/ddui/a70e43e45ceec730a34c5f49f6d3cdb43094b7ab/ddui strip-components: 1