Publish the logger and the recorder in one archive
publish.sh takes a runtime id and publishes both programs into dist/nonemm-<rid>, which holds the runtime and the Avalonia files once. The archive is a zip for Windows and a tar.gz for the rest. publish-windows.sh and publish-linux.sh call it with their default id. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,13 +50,19 @@ audio devices into one Opus file. See [docs/recorder.md](docs/recorder.md).
|
|||||||
Build the Windows copy on any machine that has the .NET 10 SDK:
|
Build the Windows copy on any machine that has the .NET 10 SDK:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./publish-windows.sh # writes dist/nonemm-win-x64/ and dist/nonemm-win-x64.zip
|
./publish-windows.sh # dist/nonemm-win-x64.zip
|
||||||
|
./publish-linux.sh # dist/nonemm-linux-x64.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Each archive holds the logger (`Nonemm.App`) and the recorder
|
||||||
|
(`nonemm-recorder`) as two programs in one folder. Both scripts call
|
||||||
|
`publish.sh`, which takes any runtime id, for example `./publish.sh win-arm64`.
|
||||||
|
|
||||||
On Windows itself, run this from PowerShell instead:
|
On Windows itself, run this from PowerShell instead:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
dotnet publish src\Nonemm.App -c Release -r win-x64 --self-contained -o dist\nonemm-win-x64
|
dotnet publish src\Nonemm.App -c Release -r win-x64 --self-contained -o dist\nonemm-win-x64
|
||||||
|
dotnet publish src\Nonemm.Recorder.App -c Release -r win-x64 --self-contained -o dist\nonemm-win-x64
|
||||||
```
|
```
|
||||||
|
|
||||||
The result needs no .NET install. Unzip it anywhere you can write to and run
|
The result needs no .NET install. Unzip it anywhere you can write to and run
|
||||||
|
|||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Linux x64 by default; pass another runtime id such as linux-arm64.
|
||||||
|
exec "$(dirname "$0")/publish.sh" "${1:-linux-x64}"
|
||||||
+2
-14
@@ -1,15 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Builds a self-contained Windows x64 copy in dist/nonemm-win-x64 and zips it.
|
# Windows x64 by default; pass another runtime id such as win-arm64.
|
||||||
# The target machine needs no .NET install. Pass another runtime id as the
|
exec "$(dirname "$0")/publish.sh" "${1:-win-x64}"
|
||||||
# first argument, for example win-arm64 (the bridge and XMMT.ocx are 32 bit
|
|
||||||
# x86 either way).
|
|
||||||
rid="${1:-win-x64}"
|
|
||||||
cd "$(dirname "$0")" || exit 1
|
|
||||||
out="dist/nonemm-$rid"
|
|
||||||
rm -rf "$out"
|
|
||||||
./build.sh publish src/Nonemm.App -c Release -r "$rid" --self-contained -o "$out" || exit 1
|
|
||||||
rm -f "$out"/*.pdb
|
|
||||||
rm -f "dist/nonemm-$rid.zip"
|
|
||||||
python3 -c 'import shutil, sys; shutil.make_archive(sys.argv[1], "zip", "dist", sys.argv[2])' \
|
|
||||||
"dist/nonemm-$rid" "nonemm-$rid" || exit 1
|
|
||||||
echo "dist/nonemm-$rid.zip"
|
|
||||||
|
|||||||
Executable
+32
@@ -0,0 +1,32 @@
|
|||||||
|
#!/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).
|
||||||
|
rid="${1:?usage: publish.sh <runtime id>}"
|
||||||
|
cd "$(dirname "$0")" || exit 1
|
||||||
|
name="nonemm-$rid"
|
||||||
|
out="dist/$name"
|
||||||
|
mkdir -p dist
|
||||||
|
rm -rf "$out"
|
||||||
|
|
||||||
|
for project in Nonemm.App Nonemm.Recorder.App; do
|
||||||
|
./build.sh publish "src/$project" -c Release -r "$rid" --self-contained -o "$out" || exit 1
|
||||||
|
done
|
||||||
|
rm -f "$out"/*.pdb
|
||||||
|
|
||||||
|
case "$rid" in
|
||||||
|
win-*)
|
||||||
|
rm -f "dist/$name.zip"
|
||||||
|
python3 -c 'import shutil, sys; shutil.make_archive(sys.argv[1], "zip", "dist", sys.argv[2])' \
|
||||||
|
"$out" "$name" || exit 1
|
||||||
|
echo "dist/$name.zip"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tar -C dist -czf "dist/$name.tar.gz" "$name" || exit 1
|
||||||
|
echo "dist/$name.tar.gz"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user