- A daemon keeps running the copy it was started from, so after an update the old one ran until the next login and nothing said so; clients compared only the major protocol version. Every build now carries a UUID, the daemon reports it as ServerInfo.build_id under protocol 1.3, and a daemon too old to report one counts as outdated. - The window shows a notice above every page when the daemon it reached is another build, with both versions. Update now registers the copy that was opened as the service and restarts the daemon from it; Not now puts the notice away. Nothing is restarted unless the user asks, so two copies open at once cannot replace each other's daemon in turn. A newer daemon is offered as Use this version, and one the service did not start, or one reached with --socket, gets no button. - service install --start now stops a running daemon before registering and starting, so the daemon started is the program that was asked. Under systemd and Task Scheduler it used to rewrite the registration and leave the old daemon running, since starting a running service does nothing. - service status says when the daemon is another build than the program asked, and --json carries same_build. - The App Store app stops a daemon another build of the app left running and starts its own, instead of attaching to it. - Packaging sets MIDI_HARBOR_BUILD_ID once for everything a run builds, because the App Store app, its helper and each architecture are compiled separately and must agree. Packages of one release share an identifier, so neither replaces the other's daemon.
214 lines
7.5 KiB
YAML
214 lines
7.5 KiB
YAML
# Builds every release artifact from one machine, inside the image packaging/cross/Dockerfile
|
|
# makes. Run it through the Makefile: `make snapshot` or `make release`.
|
|
version: 2
|
|
|
|
project_name: midi-harbor
|
|
|
|
builds:
|
|
# The full build, with the graphical interface, for Linux and Windows.
|
|
- id: full
|
|
builder: rust
|
|
binary: midi-harbor
|
|
targets:
|
|
# Linux against Debian 12's glibc, the sysroots' release.
|
|
- x86_64-unknown-linux-gnu.2.36
|
|
- aarch64-unknown-linux-gnu.2.36
|
|
- x86_64-pc-windows-gnu
|
|
flags: &flags
|
|
- --release
|
|
- --locked
|
|
- --package=midi-harbor
|
|
env: &env
|
|
# One identifier for everything this run builds, so a window and the daemon installed
|
|
# with it agree, and differ from every other release (research R-108).
|
|
- MIDI_HARBOR_BUILD_ID={{ .Env.MIDI_HARBOR_BUILD_ID }}
|
|
- MACOSX_DEPLOYMENT_TARGET=11.0
|
|
- SDKROOT=/osxcross/MacOSX.sdk
|
|
- PKG_CONFIG_ALLOW_CROSS=1
|
|
- PKG_CONFIG_SYSROOT_DIR={{ if eq .Os "linux" }}/sysroot/linux_{{ .Arch }}{{ end }}
|
|
- PKG_CONFIG_LIBDIR={{ if eq .Os "linux" }}/sysroot/linux_{{ .Arch }}/usr/lib/{{ if eq .Arch "amd64" }}x86_64{{ else }}aarch64{{ end }}-linux-gnu/pkgconfig{{ end }}
|
|
# cargo-zigbuild hands bindgen zig's own libc headers in place of the system's, so the
|
|
# sysroot's are added after them for the Avahi bindings.
|
|
# Room in the Mach-O header for the code signature packaging/macos/bundle.sh adds, which zig
|
|
# otherwise leaves too little of.
|
|
- CARGO_TARGET_X86_64_APPLE_DARWIN_RUSTFLAGS=-C link-arg=-Wl,-headerpad_max_install_names
|
|
- CARGO_TARGET_AARCH64_APPLE_DARWIN_RUSTFLAGS=-C link-arg=-Wl,-headerpad_max_install_names
|
|
- BINDGEN_EXTRA_CLANG_ARGS={{ if eq .Os "linux" }}-idirafter /sysroot/linux_{{ .Arch }}/usr/include -idirafter /sysroot/linux_{{ .Arch }}/usr/include/{{ if eq .Arch "amd64" }}x86_64{{ else }}aarch64{{ end }}-linux-gnu{{ end }}
|
|
hooks:
|
|
# GoReleaser's own edition makes no AppImages, so the script does, for each Linux target.
|
|
post:
|
|
- cmd: '{{ if eq .Os "linux" }}packaging/linux/appimage.sh "{{ .Path }}" "{{ .Arch }}" "{{ .Version }}" dist{{ else }}true{{ end }}'
|
|
|
|
# The full build for the Mac, which ships only inside the app on the disk image, never in an
|
|
# archive of its own.
|
|
- id: full-macos
|
|
builder: rust
|
|
binary: midi-harbor
|
|
targets:
|
|
- x86_64-apple-darwin
|
|
- aarch64-apple-darwin
|
|
flags: *flags
|
|
env: *env
|
|
|
|
# The headless build carries none of the GUI toolkit, for servers and machines without a
|
|
# display. It is the only loose binary the Mac gets.
|
|
- id: headless
|
|
builder: rust
|
|
binary: midi-harbor
|
|
targets:
|
|
- x86_64-unknown-linux-gnu.2.36
|
|
- aarch64-unknown-linux-gnu.2.36
|
|
- x86_64-apple-darwin
|
|
- aarch64-apple-darwin
|
|
flags:
|
|
- --release
|
|
- --locked
|
|
- --package=midi-harbor
|
|
- --no-default-features
|
|
env: *env
|
|
|
|
# One binary for both kinds of Mac, which the app bundle carries. Its id keeps it out of the
|
|
# archives, which on the Mac hold only the headless binaries.
|
|
universal_binaries:
|
|
- id: macos-app
|
|
ids: [full-macos]
|
|
name_template: midi-harbor
|
|
hooks:
|
|
# GoReleaser's own edition makes no app bundles or disk images, so the script does.
|
|
post:
|
|
- cmd: packaging/macos/bundle.sh "{{ .Path }}" "{{ .Version }}" dist/macos dist
|
|
|
|
archives:
|
|
- id: full
|
|
ids: [full]
|
|
name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
|
|
formats: [tar.gz]
|
|
format_overrides:
|
|
- goos: windows
|
|
formats: [zip]
|
|
files: &files
|
|
- LICENSE.txt
|
|
- src: docs/*.md
|
|
dst: docs
|
|
- id: headless
|
|
ids: [headless]
|
|
name_template: "{{ .ProjectName }}-headless-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
|
|
formats: [tar.gz]
|
|
files: *files
|
|
|
|
nfpms:
|
|
- id: full
|
|
ids: [full]
|
|
package_name: midi-harbor
|
|
file_name_template: "{{ .ConventionalFileName }}"
|
|
formats: [deb, rpm]
|
|
vendor: Midi Harbor
|
|
homepage: https://github.com/grmrgecko/midi-harbor
|
|
# Taken from the environment at build time rather than written into the repository.
|
|
maintainer: "{{ .Env.MIDI_HARBOR_MAINTAINER }}"
|
|
description: &description |-
|
|
Manages virtual MIDI ports, MIDI hardware, RTP-MIDI network sessions and
|
|
Bluetooth LE MIDI links, and reconnects every one of them by itself after
|
|
sleep, network changes, unplugging and restarts.
|
|
license: MIT
|
|
section: sound
|
|
conflicts: [midi-harbor-headless]
|
|
replaces: [midi-harbor-headless]
|
|
contents:
|
|
# Named for the window's application ID, which is how a desktop pairs the running window
|
|
# with this entry and its icon.
|
|
- src: packaging/linux/com.mrgeckosmedia.MidiHarbor.desktop
|
|
dst: /usr/share/applications/com.mrgeckosmedia.MidiHarbor.desktop
|
|
- src: Icon.svg
|
|
dst: /usr/share/icons/hicolor/scalable/apps/com.mrgeckosmedia.MidiHarbor.svg
|
|
- src: LICENSE.txt
|
|
dst: /usr/share/doc/midi-harbor/copyright
|
|
- src: docs/*.md
|
|
dst: /usr/share/doc/midi-harbor/
|
|
overrides:
|
|
deb:
|
|
dependencies:
|
|
# The binary uses symbols up to glibc 2.35, which nfpm does not detect by itself.
|
|
- libc6 (>= 2.35)
|
|
- libasound2
|
|
- libavahi-client3
|
|
- libavahi-common3
|
|
- libdbus-1-3
|
|
- libxkbcommon0
|
|
# Without these the package still works, but sessions are not advertised and Bluetooth
|
|
# is unavailable. The rest are what the interface loads while it runs rather than links
|
|
# against: one of X11 or Wayland to draw a window, and one of EGL or Vulkan to render.
|
|
recommends:
|
|
- avahi-daemon
|
|
- bluez
|
|
- libwayland-client0
|
|
- libx11-6
|
|
- libx11-xcb1
|
|
- libxi6
|
|
- libxkbcommon-x11-0
|
|
- libegl1
|
|
- libvulkan1
|
|
rpm:
|
|
dependencies:
|
|
- glibc >= 2.35
|
|
- alsa-lib
|
|
- avahi-libs
|
|
- dbus-libs
|
|
- libxkbcommon
|
|
recommends:
|
|
- avahi
|
|
- bluez
|
|
- libwayland-client
|
|
- libX11
|
|
- libX11-xcb
|
|
- libXi
|
|
- libxkbcommon-x11
|
|
- libglvnd-egl
|
|
- vulkan-loader
|
|
- id: headless
|
|
ids: [headless]
|
|
package_name: midi-harbor-headless
|
|
file_name_template: "{{ .ConventionalFileName }}"
|
|
formats: [deb, rpm]
|
|
vendor: Midi Harbor
|
|
homepage: https://github.com/grmrgecko/midi-harbor
|
|
maintainer: "{{ .Env.MIDI_HARBOR_MAINTAINER }}"
|
|
description: *description
|
|
license: MIT
|
|
section: sound
|
|
conflicts: [midi-harbor]
|
|
replaces: [midi-harbor]
|
|
contents:
|
|
- src: LICENSE.txt
|
|
dst: /usr/share/doc/midi-harbor-headless/copyright
|
|
- src: docs/*.md
|
|
dst: /usr/share/doc/midi-harbor-headless/
|
|
overrides:
|
|
deb:
|
|
dependencies: ["libc6 (>= 2.35)", libasound2, libavahi-client3, libavahi-common3, libdbus-1-3]
|
|
recommends: [avahi-daemon, bluez]
|
|
rpm:
|
|
dependencies: [glibc >= 2.35, alsa-lib, avahi-libs, dbus-libs]
|
|
recommends: [avahi, bluez]
|
|
|
|
checksum:
|
|
name_template: checksums.txt
|
|
extra_files:
|
|
- glob: dist/*.dmg
|
|
- glob: dist/*.AppImage
|
|
|
|
# A release takes its version from the tag, which make release checks against VERSION. A snapshot
|
|
# has no tag, so it takes VERSION, which the Makefile passes in.
|
|
snapshot:
|
|
version_template: "{{ .Env.MIDI_HARBOR_VERSION }}-SNAPSHOT-{{ .ShortCommit }}"
|
|
|
|
changelog:
|
|
sort: asc
|
|
|
|
release:
|
|
github:
|
|
owner: grmrgecko
|
|
name: midi-harbor
|
|
extra_files:
|
|
- glob: dist/*.dmg
|
|
- glob: dist/*.AppImage
|