feat: Windows-EXE mit Icon und Versionsinformationen
- Windows-Preset bettet Icon (app_icon.png), Produktname, Beschreibung und Version 0.1.0.0 ein (application/modify_resources=true) - tools/setup_windows_export.sh richtet portables Wine + rcedit ohne Root ein, legt einen Wrapper an und setzt export/windows/rcedit - docs/builds.md beschreibt die Einrichtung - geprüft: 6 Icon-Größen, RT_GROUP_ICON, Version-Ressource mit ProductName/FileDescription/FileVersion/ProductVersion
This commit is contained in:
parent
7c313c0cc2
commit
dd8cc20de8
3 changed files with 111 additions and 9 deletions
|
|
@ -32,10 +32,19 @@ Weitergeben). `build/` ist nicht versioniert.
|
|||
./tools/export_macos.sh
|
||||
```
|
||||
|
||||
**Windows:** Icon und Versionsinformationen sind deaktiviert
|
||||
(`application/modify_resources=false`), damit der Export ohne `rcedit` auf
|
||||
Linux läuft. Wer das will, installiert `rcedit` und schaltet die Option im
|
||||
Preset ein.
|
||||
**Windows:** Die .exe enthält Icon, Produktname, Beschreibung und Version.
|
||||
Godot bettet sie mit `rcedit` ein; auf Linux läuft `rcedit` über ein
|
||||
portables Wine. Einmalig einrichten (kein Root nötig):
|
||||
|
||||
```bash
|
||||
./tools/setup_windows_export.sh
|
||||
```
|
||||
|
||||
Das Skript lädt Wine (Kron4ek-Build) und `rcedit` nach
|
||||
`~/.local/share/rinkplanner-toolchain`, legt einen Wrapper an und trägt ihn
|
||||
als `export/windows/rcedit` in die Godot-Editor-Settings ein. Die Werte
|
||||
selbst stehen im Preset unter `application/*` (Icon `app_icon.png`,
|
||||
Version `0.1.0.0`).
|
||||
|
||||
**macOS:** Das Bundle ist ad-hoc signiert, aber **nicht notarisiert**. Beim
|
||||
ersten Start auf einem Mac:
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ codesign/timestamp_server_url=""
|
|||
codesign/digest_algorithm=1
|
||||
codesign/description=""
|
||||
codesign/custom_options=PackedStringArray()
|
||||
application/modify_resources=false
|
||||
application/icon=""
|
||||
application/modify_resources=true
|
||||
application/icon="res://assets/icons/app_icon.png"
|
||||
application/console_wrapper_icon=""
|
||||
application/icon_interpolation=4
|
||||
application/file_version=""
|
||||
application/product_version=""
|
||||
application/file_version="0.1.0.0"
|
||||
application/product_version="0.1.0.0"
|
||||
application/company_name=""
|
||||
application/product_name="Rinkplanner"
|
||||
application/file_description="2D-Whiteboard fuer Eiskunstlauf"
|
||||
application/file_description="2D-Whiteboard für Eiskunstlauf"
|
||||
application/copyright=""
|
||||
application/trademarks=""
|
||||
application/export_angle=0
|
||||
|
|
|
|||
93
tools/setup_windows_export.sh
Executable file
93
tools/setup_windows_export.sh
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
#!/usr/bin/env bash
|
||||
# Richtet rcedit für Windows-Exporte auf Linux ein.
|
||||
#
|
||||
# Godot bettet Icon, Versionsinfo und Produktdaten in die .exe ein, indem es
|
||||
# rcedit aufruft. rcedit ist ein Windows-Programm; auf Linux läuft es über ein
|
||||
# portables Wine (kein Root nötig).
|
||||
#
|
||||
# Aufruf:
|
||||
# ./tools/setup_windows_export.sh
|
||||
#
|
||||
# Danach den Windows-Build neu erzeugen:
|
||||
# ./tools/export_windows.sh
|
||||
set -euo pipefail
|
||||
|
||||
TOOLCHAIN="${TOOLCHAIN:-$HOME/.local/share/rinkplanner-toolchain}"
|
||||
WINE_VERSION="${WINE_VERSION:-11.20}"
|
||||
RCEDIT_VERSION="${RCEDIT_VERSION:-2.0.0}"
|
||||
WINE_URL="https://github.com/Kron4ek/Wine-Builds/releases/download/${WINE_VERSION}/wine-${WINE_VERSION}-amd64.tar.xz"
|
||||
RCEDIT_URL="https://github.com/electron/rcedit/releases/download/v${RCEDIT_VERSION}/rcedit-x64.exe"
|
||||
|
||||
log() { printf '\n==> %s\n' "$*"; }
|
||||
command -v curl >/dev/null || { echo "Fehlt: curl" >&2; exit 1; }
|
||||
command -v tar >/dev/null || { echo "Fehlt: tar" >&2; exit 1; }
|
||||
command -v python3 >/dev/null || { echo "Fehlt: python3" >&2; exit 1; }
|
||||
|
||||
mkdir -p "$TOOLCHAIN"
|
||||
|
||||
if compgen -G "$TOOLCHAIN/wine-*/bin/wine" >/dev/null; then
|
||||
log "Wine vorhanden: $(ls -d "$TOOLCHAIN"/wine-*/bin/wine | head -1)"
|
||||
else
|
||||
log "Lade portables Wine $WINE_VERSION"
|
||||
curl -fL --retry 3 -o "$TOOLCHAIN/wine.tar.xz" "$WINE_URL"
|
||||
tar -xf "$TOOLCHAIN/wine.tar.xz" -C "$TOOLCHAIN"
|
||||
rm -f "$TOOLCHAIN/wine.tar.xz"
|
||||
fi
|
||||
|
||||
if [[ -f "$TOOLCHAIN/rcedit-x64.exe" ]]; then
|
||||
log "rcedit vorhanden"
|
||||
else
|
||||
log "Lade rcedit $RCEDIT_VERSION"
|
||||
curl -fL --retry 3 -o "$TOOLCHAIN/rcedit-x64.exe" "$RCEDIT_URL"
|
||||
fi
|
||||
|
||||
log "Schreibe Wrapper $TOOLCHAIN/rcedit"
|
||||
cat > "$TOOLCHAIN/rcedit" <<'WRAPPER'
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
TOOLCHAIN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
WINE_BIN="$(ls -d "$TOOLCHAIN"/wine-*/bin/wine | head -1)"
|
||||
export WINEPREFIX="${WINEPREFIX:-$TOOLCHAIN/wineprefix}"
|
||||
export WINEDEBUG="${WINEDEBUG:--all}"
|
||||
exec "$WINE_BIN" "$TOOLCHAIN/rcedit-x64.exe" "$@" \
|
||||
2> >(grep -vE "libEGL|pci id|egl: failed" >&2)
|
||||
WRAPPER
|
||||
chmod +x "$TOOLCHAIN/rcedit"
|
||||
|
||||
log "Initialisiere Wine-Prefix (einmalig)"
|
||||
WINEPREFIX="$TOOLCHAIN/wineprefix" WINEDEBUG=-all \
|
||||
"$(ls -d "$TOOLCHAIN"/wine-*/bin/wine | head -1)" --version >/dev/null
|
||||
|
||||
log "Trage rcedit in die Godot-Editor-Settings ein"
|
||||
python3 - "$TOOLCHAIN/rcedit" <<'PY'
|
||||
import pathlib
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
wrapper = sys.argv[1]
|
||||
patched = 0
|
||||
for path in sorted((pathlib.Path.home() / ".config" / "godot").glob("editor_settings-4.*.tres")):
|
||||
text = path.read_text()
|
||||
shutil.copy2(path, path.with_suffix(path.suffix + ".bak"))
|
||||
line = f'export/windows/rcedit = "{wrapper}"'
|
||||
if re.search(r'^export/windows/rcedit = .*$', text, flags=re.M):
|
||||
text = re.sub(r'^export/windows/rcedit = .*$', line, text, flags=re.M)
|
||||
else:
|
||||
text = text.rstrip() + "\n" + line + "\n"
|
||||
path.write_text(text)
|
||||
print(f" {path}")
|
||||
patched += 1
|
||||
if patched == 0:
|
||||
print(" keine passende editor_settings-4.*.tres gefunden")
|
||||
PY
|
||||
|
||||
log "Fertig"
|
||||
cat <<EOF
|
||||
|
||||
rcedit-Wrapper: $TOOLCHAIN/rcedit
|
||||
Windows-Build: ./tools/export_windows.sh
|
||||
|
||||
Die .exe enthält danach Icon, Produktname, Beschreibung und Version aus
|
||||
rinkplanner/export_presets.cfg (application/*).
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue