61 lines
1.4 KiB
Bash
Executable File
61 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build-Skript für dicom2pacs Mac App
|
|
|
|
echo "=== dicom2pacs Mac App Builder ==="
|
|
echo ""
|
|
|
|
# Prüfe Python-Version
|
|
echo "1. Prüfe Python-Version..."
|
|
python3 --version
|
|
|
|
# Erstelle virtuelles Environment
|
|
echo ""
|
|
echo "2. Erstelle virtuelles Environment..."
|
|
if [ -d "venv" ]; then
|
|
echo "Virtuelles Environment existiert bereits"
|
|
else
|
|
python3 -m venv venv
|
|
fi
|
|
|
|
# Aktiviere virtuelles Environment
|
|
echo ""
|
|
echo "3. Aktiviere virtuelles Environment..."
|
|
source venv/bin/activate
|
|
|
|
# Installiere Dependencies
|
|
echo ""
|
|
echo "4. Installiere benötigte Dependencies..."
|
|
pip install --upgrade pip setuptools
|
|
pip install py2app pydicom aiohttp aiofiles tqdm
|
|
|
|
# Prüfe ob Icon existiert
|
|
echo ""
|
|
echo "5. Prüfe Icon-Datei..."
|
|
if [ -f "images/Logo.icns" ]; then
|
|
echo "✓ Icon gefunden: images/Logo.icns"
|
|
else
|
|
echo "⚠ Warnung: Icon-Datei nicht gefunden!"
|
|
fi
|
|
|
|
# Lösche alte Builds
|
|
echo ""
|
|
echo "6. Lösche alte Build-Ordner..."
|
|
rm -rf build/ dist/
|
|
|
|
# Erstelle die App
|
|
echo ""
|
|
echo "7. Erstelle Mac App..."
|
|
python setup.py py2app
|
|
|
|
# Prüfe Ergebnis
|
|
echo ""
|
|
if [ -d "dist/dicom2pacs.app" ]; then
|
|
echo "✓ App erfolgreich erstellt: dist/dicom2pacs.app"
|
|
echo ""
|
|
echo "Die App befindet sich im Ordner 'dist/'"
|
|
echo "Sie können sie per Doppelklick starten oder in den Applications-Ordner kopieren."
|
|
else
|
|
echo "✗ Fehler beim Erstellen der App"
|
|
exit 1
|
|
fi
|