T25: release builds: scripts/windows-zip.ps1 zips elyterminal.exe, the icon inside as resource 1 (build.rs, embed-resource), a GUI program carrying its C runtime, git started without a console; scripts/linux-tar.sh builds on Debian 12, glibc 2.35 for this build, with a desktop entry and the icon; every window names itself com.zacharyzhang.elyterminal; rust-toolchain.toml pins 1.95.0, and CI installs it without rustup default
This commit is contained in:
21 files changed
+211
-39
No files matched your search
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# linux-tar.sh: the release build on Debian 12's glibc 2.36, in a tarball with its desktop entry and icon.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
docker build -q -t elyterminal-release - >/dev/null <<'EOF'
|
||||
FROM rust:1.95.0-bookworm
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends pkg-config libwayland-dev libxkbcommon-dev \
|
||||
libxkbcommon-x11-dev libxcb1-dev libx11-xcb-dev libfontconfig-dev libfreetype-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rustup component add clippy rustfmt
|
||||
EOF
|
||||
run() { docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/src" -w /src elyterminal-release "$@"; }
|
||||
run cargo build --release --locked
|
||||
version=$(run cargo pkgid)
|
||||
version=${version##*[#@]}
|
||||
case $version in [0-9]*) ;; *) echo "linux-tar: cargo pkgid names no version" >&2; exit 1 ;; esac
|
||||
out=target/release
|
||||
id=com.zacharyzhang.elyterminal
|
||||
name=ELYTerminal-$version-linux-$(uname -m)
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
mkdir "$work/$name"
|
||||
cp "$out/elyterminal" "$work/$name/"
|
||||
cp assets/icons/elyterminal.svg "$work/$name/$id.svg"
|
||||
cat > "$work/$name/$id.desktop" <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=ELYTerminal
|
||||
Exec=elyterminal
|
||||
Icon=$id
|
||||
Terminal=false
|
||||
Categories=System;TerminalEmulator;
|
||||
StartupWMClass=$id
|
||||
EOF
|
||||
tar -C "$work" -czf "$out/$name.tar.gz" "$name"
|
||||
glibc=$(run sh -c "objdump -T $out/elyterminal | grep -o 'GLIBC_[0-9.]*' | sort -u -V | tail -n 1")
|
||||
echo "linux-tar: $out/$name.tar.gz, glibc ${glibc#GLIBC_} or later"
|
||||
+3
-3
@@ -1,17 +1,17 @@
|
||||
#!/bin/sh
|
||||
# mac-app.sh: target/release/ELYTerminal.app, signed ad hoc, and its disk image.
|
||||
# mac-app.sh: ELYTerminal.app in target/release, signed ad hoc, and its disk image.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
cargo build --release --locked
|
||||
version=$(cargo pkgid)
|
||||
version=${version##*[#@]}
|
||||
case $version in [0-9]*) ;; *) echo "mac-app: cargo pkgid names no version" >&2; exit 1 ;; esac
|
||||
out=target/release
|
||||
out=${CARGO_TARGET_DIR:-target}/release
|
||||
app=$out/ELYTerminal.app
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
cargo run --release --locked --quiet --example icons -- \
|
||||
assets/icons/elyterminal-macos.svg "$work/ELYTerminal.iconset"
|
||||
iconset assets/icons/elyterminal-macos.svg "$work/ELYTerminal.iconset"
|
||||
rm -rf "$app"
|
||||
mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources"
|
||||
cp "$out/elyterminal" "$app/Contents/MacOS/"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# windows-zip.ps1: the release build, its icon inside, in a zip.
|
||||
Set-Location (Join-Path $PSScriptRoot '..') -ErrorAction Stop
|
||||
cargo build --release --locked
|
||||
if ($LASTEXITCODE -ne 0) { throw "windows-zip: cargo build failed" }
|
||||
$version = ((cargo pkgid) -split '[#@]')[-1]
|
||||
if ($version -notmatch '^[0-9]') { throw "windows-zip: cargo pkgid names no version" }
|
||||
$arch = @{ AMD64 = 'x86_64'; ARM64 = 'aarch64' }[$env:PROCESSOR_ARCHITECTURE]
|
||||
if (-not $arch) { throw "windows-zip: no name for $env:PROCESSOR_ARCHITECTURE" }
|
||||
$target = if ($env:CARGO_TARGET_DIR) { $env:CARGO_TARGET_DIR } else { 'target' }
|
||||
$out = Join-Path $target 'release'
|
||||
$zip = Join-Path $out "ELYTerminal-$version-windows-$arch.zip"
|
||||
Compress-Archive -Force -Path (Join-Path $out 'elyterminal.exe') -DestinationPath $zip -ErrorAction Stop
|
||||
Write-Output "windows-zip: $zip"
|
||||
Reference in new issue
Block a user