Files
Nonemm/publish.sh
erikbrockoandClaude Sonnet 5.5 fe70f9b058 Cut CPU use and move heavy work off the UI thread
Redraws:
- Merge bursts of session and bandmap events into one redraw
  (Coalesced). Closed Bandmap and Available windows now unsubscribe.
- Grayline and Voice Keyer no longer subscribe to the session twice.
- Available summary, Score table and Log rows redraw only when their
  contents change. Telnet lines are added in batches.
- Bandmap view reuses its layout, shaped text and brushes. Grayline
  draws the coastlines as one cached shape.

Threads:
- Available, Bandmap colours, Check and Statistics do their judging
  and counting on the thread pool and draw the result on the UI thread.
- ContestLog takes a lock in Judge and in each method that changes the
  log, so a background Judge cannot read the indexes mid-edit.

Refresh rate:
- Statistics refreshes every 30 seconds and when the QSO count changes.
- Grayline refreshes at most every 15 seconds on session events.

Publish with ReadyToRun to cut startup JIT time.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:25:46 +00:00

53 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
# Builds self-contained copies of the logger and the recorder for one runtime
# id into one folder, dist/nonemm-<rid>, and archives it: a zip for Windows, a
# tar.gz for the rest. The two programs share the runtime and the Avalonia
# files, so the second publish only adds what the first lacks. The target
# machine needs no .NET install. Use publish-windows.sh or publish-linux.sh, or
# pass the runtime id, for example win-arm64 (the bridge and XMMT.ocx are 32
# bit x86 either way). When an archive from an earlier run exists, a second
# archive, dist/nonemm-<rid>-update, holds only the files that are new or
# changed since then, for unpacking over the old install.
rid="${1:?usage: publish.sh <runtime id>}"
cd "$(dirname "$0")" || exit 1
name="nonemm-$rid"
out="dist/$name"
mkdir -p dist
rm -rf "$out"
case "$rid" in
win-*) extension=zip ;;
*) extension=tar.gz ;;
esac
archive="dist/$name.$extension"
update="dist/$name-update.$extension"
# the full archive is replaced below, so keep the old one to compare against
previous=""
if [ -f "$archive" ]; then
previous="dist/$name.previous.$extension"
cp "$archive" "$previous" || exit 1
fi
for project in Nonemm.App Nonemm.Recorder.App; do
./build.sh publish "src/$project" -c Release -r "$rid" --self-contained -p:PublishReadyToRun=true -o "$out" || exit 1
done
rm -f "$out"/*.pdb
case "$extension" in
zip)
python3 -c 'import shutil, sys; shutil.make_archive(sys.argv[1], "zip", "dist", sys.argv[2])' \
"$out" "$name" || exit 1
;;
*)
tar -C dist -czf "$archive" "$name" || exit 1
;;
esac
echo "$archive"
rm -f "$update"
if [ -n "$previous" ]; then
python3 "$(dirname "$0")/publish-update.py" "$previous" "$out" "$update" || exit 1
rm -f "$previous"
fi