SPB Git forge

spb/ka-macos

Public
3commits 1branches 0releases
6.1 MBsize
maindefault branch
1 mo agolast push
Swift 98.3% Shell 1.7%
1.9 KB · 48 lines shellscript
Raw Blame History
1#!/bin/bash2# Auteur : Simon-Pierre Boucher — contact@spboucher.ai3# Compile l'exécutable SwiftPM et l'assemble en dist/KA.app (signature ad-hoc4# pour l'itération locale ; scripts/notarize.sh fait la vraie signature).5# Pipeline repris de forge-studio (scripts/package-app.sh).6set -euo pipefail7cd "$(dirname "$0")/.."89CONFIG="${1:-release}"10swift build -c "$CONFIG"1112BIN=".build/$CONFIG/KA"13APP_DIR="dist/KA.app"14rm -rf "$APP_DIR"15mkdir -p "$APP_DIR/Contents/MacOS" "$APP_DIR/Contents/Resources"1617cp "$BIN" "$APP_DIR/Contents/MacOS/KA"18if [ ! -f Assets/AppIcon.icns ]; then ./scripts/generate-icon.sh; fi19cp Assets/AppIcon.icns "$APP_DIR/Contents/Resources/AppIcon.icns"20# Bundle de ressources SwiftPM (logos des 13 marques) — requis par Bundle.module21cp -R ".build/$CONFIG/KA_KA.bundle" "$APP_DIR/Contents/Resources/"2223cat > "$APP_DIR/Contents/Info.plist" <<'PLIST'24<?xml version="1.0" encoding="UTF-8"?>25<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">26<plist version="1.0">27<dict>28    <key>CFBundleName</key><string>KA</string>29    <key>CFBundleDisplayName</key><string>KA</string>30    <key>CFBundleIdentifier</key><string>com.groupeka.ka.mac</string>31    <key>CFBundleExecutable</key><string>KA</string>32    <key>CFBundleVersion</key><string>3</string>33    <key>CFBundleShortVersionString</key><string>2.1.0</string>34    <key>CFBundlePackageType</key><string>APPL</string>35    <key>LSMinimumSystemVersion</key><string>14.0</string>36    <key>LSApplicationCategoryType</key><string>public.app-category.lifestyle</string>37    <key>CFBundleIconFile</key><string>AppIcon</string>38    <key>CFBundleDevelopmentRegion</key><string>fr</string>39    <key>NSHighResolutionCapable</key><true/>40    <key>NSHumanReadableCopyright</key><string>© Simon-Pierre Boucher — Groupe KA</string>41</dict>42</plist>43PLIST4445codesign --force --deep --sign - "$APP_DIR"46codesign --verify --deep --strict --verbose=2 "$APP_DIR"47echo "OK : $APP_DIR"48