Add uploader downloads for Windows macOS Linux
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-13 08:49:08 +01:00
parent 1ca7545f86
commit fd7a3c846a
4 changed files with 81 additions and 11 deletions

View File

@@ -1205,6 +1205,13 @@
"uploader": { "uploader": {
"hint": "POST mit Mediendatei oder base64-Feld \"media\"; die App nutzt diese Zugangsdaten." "hint": "POST mit Mediendatei oder base64-Feld \"media\"; die App nutzt diese Zugangsdaten."
}, },
"uploaderDownload": {
"title": "Fotospiel Uploader App",
"description": "Die Fotospiel Uploader App wird benötigt, damit Uploads stabil laufen, die Zugangsdaten geschützt bleiben und keine Dateien verloren gehen.",
"actionWindows": "Uploader herunterladen (Windows)",
"actionMac": "Uploader herunterladen (macOS)",
"actionLinux": "Uploader herunterladen (Linux)"
},
"actions": { "actions": {
"enable": "Photobooth aktivieren", "enable": "Photobooth aktivieren",
"disable": "Deaktivieren", "disable": "Deaktivieren",

View File

@@ -918,6 +918,13 @@
"uploader": { "uploader": {
"hint": "POST with media file or base64 \"media\" field; app uses these credentials." "hint": "POST with media file or base64 \"media\" field; app uses these credentials."
}, },
"uploaderDownload": {
"title": "Fotospiel Uploader App",
"description": "The Fotospiel Uploader App is required so uploads stay stable, credentials remain protected, and no files are lost.",
"actionWindows": "Download uploader (Windows)",
"actionMac": "Download uploader (macOS)",
"actionLinux": "Download uploader (Linux)"
},
"actions": { "actions": {
"enable": "Activate photobooth", "enable": "Activate photobooth",
"disable": "Disable", "disable": "Disable",

View File

@@ -250,6 +250,41 @@ export default function MobileEventPhotoboothPage() {
</Text> </Text>
</MobileCard> </MobileCard>
<MobileCard space="$2">
<Text fontSize="$sm" fontWeight="700" color={text}>
{t('photobooth.uploaderDownload.title', 'Fotospiel Uploader App')}
</Text>
<Text fontSize="$xs" color={muted}>
{t(
'photobooth.uploaderDownload.description',
'Die Fotospiel Uploader App ist verpflichtend, damit Uploads stabil laufen, die Zugangsdaten geschützt bleiben und keine Dateien verloren gehen.'
)}
</Text>
<CTAButton
label={t('photobooth.uploaderDownload.actionWindows', 'Uploader herunterladen (Windows)')}
onPress={() => {
const url = new URL('/downloads/PhotoboothUploader-win-x64.exe', window.location.origin).toString();
window.open(url, '_blank', 'noopener,noreferrer');
}}
/>
<CTAButton
label={t('photobooth.uploaderDownload.actionMac', 'Uploader herunterladen (macOS)')}
tone="ghost"
onPress={() => {
const url = new URL('/downloads/PhotoboothUploader-macos-x64', window.location.origin).toString();
window.open(url, '_blank', 'noopener,noreferrer');
}}
/>
<CTAButton
label={t('photobooth.uploaderDownload.actionLinux', 'Uploader herunterladen (Linux)')}
tone="ghost"
onPress={() => {
const url = new URL('/downloads/PhotoboothUploader-linux-x64', window.location.origin).toString();
window.open(url, '_blank', 'noopener,noreferrer');
}}
/>
</MobileCard>
<MobileCard space="$2"> <MobileCard space="$2">
<XStack alignItems="center" justifyContent="space-between"> <XStack alignItems="center" justifyContent="space-between">
<Text fontSize="$sm" fontWeight="700" color={text}> <Text fontSize="$sm" fontWeight="700" color={text}>

View File

@@ -4,7 +4,9 @@ set -euo pipefail
WORKDIR=${WORKDIR:-/var/www/html} WORKDIR=${WORKDIR:-/var/www/html}
SRC_DIR="${WORKDIR}/clients/photobooth-uploader/PhotoboothUploader" SRC_DIR="${WORKDIR}/clients/photobooth-uploader/PhotoboothUploader"
OUT_DIR="${WORKDIR}/public/downloads" OUT_DIR="${WORKDIR}/public/downloads"
OUT_FILE="${OUT_DIR}/PhotoboothUploader.exe" WIN_FILE="${OUT_DIR}/PhotoboothUploader-win-x64.exe"
MAC_FILE="${OUT_DIR}/PhotoboothUploader-macos-x64"
LINUX_FILE="${OUT_DIR}/PhotoboothUploader-linux-x64"
STAMP_FILE="${OUT_DIR}/photobooth-uploader.hash" STAMP_FILE="${OUT_DIR}/photobooth-uploader.hash"
if [[ ! -d "$SRC_DIR" ]]; then if [[ ! -d "$SRC_DIR" ]]; then
@@ -27,7 +29,7 @@ compute_hash() {
HASH=$(compute_hash) HASH=$(compute_hash)
if [[ -f "$OUT_FILE" && -f "$STAMP_FILE" ]]; then if [[ -f "$WIN_FILE" && -f "$MAC_FILE" && -f "$LINUX_FILE" && -f "$STAMP_FILE" ]]; then
CURRENT_HASH=$(cat "$STAMP_FILE" || true) CURRENT_HASH=$(cat "$STAMP_FILE" || true)
if [[ "$CURRENT_HASH" == "$HASH" ]]; then if [[ "$CURRENT_HASH" == "$HASH" ]]; then
echo "[photobooth-uploader] Up to date, skipping publish." echo "[photobooth-uploader] Up to date, skipping publish."
@@ -35,14 +37,33 @@ if [[ -f "$OUT_FILE" && -f "$STAMP_FILE" ]]; then
fi fi
fi fi
echo "[photobooth-uploader] Publishing uploader exe..." publish_target() {
dotnet publish "${SRC_DIR}/PhotoboothUploader.csproj" \ local rid="$1"
-c Release \ local output_file="$2"
-r win-x64 \ local temp_dir
--self-contained true \ temp_dir=$(mktemp -d)
/p:PublishSingleFile=true \
/p:IncludeNativeLibrariesForSelfExtract=true \ dotnet publish "${SRC_DIR}/PhotoboothUploader.csproj" \
-o "$OUT_DIR" -c Release \
-r "$rid" \
--self-contained true \
/p:PublishSingleFile=true \
/p:IncludeNativeLibrariesForSelfExtract=true \
-o "$temp_dir"
if [[ "$rid" == "win-x64" ]]; then
mv -f "$temp_dir/PhotoboothUploader.exe" "$output_file"
else
mv -f "$temp_dir/PhotoboothUploader" "$output_file"
fi
rm -rf "$temp_dir"
}
echo "[photobooth-uploader] Publishing uploader binaries..."
publish_target "win-x64" "$WIN_FILE"
publish_target "osx-x64" "$MAC_FILE"
publish_target "linux-x64" "$LINUX_FILE"
echo "$HASH" > "$STAMP_FILE" echo "$HASH" > "$STAMP_FILE"
echo "[photobooth-uploader] Published to ${OUT_FILE}" echo "[photobooth-uploader] Published to ${OUT_DIR}"