add XcodeGen project config with iOS and macOS targets, resource directories

This commit is contained in:
2026-03-13 22:23:31 +01:00
parent 8d429dc1db
commit 6a8a290672
3 changed files with 62 additions and 104 deletions

View File

View File

View File

@@ -1,110 +1,68 @@
name: Vorleser name: Vorleser
options: options:
bundleIdPrefix: de.felixfoertsch bundleIdPrefix: de.felixfoertsch
developmentLanguage: en deploymentTarget:
deploymentTarget: iOS: "18.0"
iOS: 26.0 macOS: "15.0"
macOS: 15.0 xcodeVersion: "16.0"
createIntermediateGroups: true createIntermediateGroups: true
settings:
base:
SWIFT_VERSION: 5.9
CURRENT_PROJECT_VERSION: 1
MARKETING_VERSION: 0.1.0
packages: packages:
ZipFoundation: VorleserKit:
path: Vendor/ZipFoundation path: VorleserKit
SwiftSoup:
path: Vendor/SwiftSoup
targets: targets:
Vorleser: Vorleser-iOS:
type: application type: application
platform: iOS platform: iOS
sources: sources:
- path: Vorleser - Vorleser-iOS
configFiles: dependencies:
Debug: Config/Signing.xcconfig - package: VorleserKit
Release: Config/Signing.xcconfig product: VorleserKit
settings: - package: VorleserKit
base: product: BookParser
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser - package: VorleserKit
IPHONEOS_DEPLOYMENT_TARGET: 26.0 product: Storage
GENERATE_INFOPLIST_FILE: true - package: VorleserKit
INFOPLIST_KEY_CFBundleVersion: "1" product: Synthesizer
INFOPLIST_KEY_CFBundleShortVersionString: "0.1.0" - package: VorleserKit
INFOPLIST_KEY_UIBackgroundModes: [audio, processing] product: AudioEngine
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace: true settings:
INFOPLIST_KEY_UIFileSharingEnabled: true base:
dependencies: PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser
- package: ZipFoundation INFOPLIST_VALUES: >-
product: ZIPFoundation UIBackgroundModes=(audio);
- package: SwiftSoup UILaunchScreen={};
product: SwiftSoup UIFileSharingEnabled=YES;
LSSupportsOpeningDocumentsInPlace=YES;
resources:
- path: Resources/Models
buildPhase: resources
- path: Resources/Voices
buildPhase: resources
VorleserMac: Vorleser-macOS:
type: application type: application
platform: macOS platform: macOS
sources: sources:
- path: VorleserMac - Vorleser-macOS
resources: dependencies:
- path: VorleserMac/Resources/Models - package: VorleserKit
- path: VorleserMac/Resources/Voices product: VorleserKit
- path: VorleserMac/Resources/Config - package: VorleserKit
- path: VorleserMac/Resources/Tools product: BookParser
dependencies: - package: VorleserKit
- package: ZipFoundation product: Storage
product: ZIPFoundation - package: VorleserKit
- package: SwiftSoup product: Synthesizer
product: SwiftSoup - package: VorleserKit
configFiles: product: AudioEngine
Debug: Config/Signing.xcconfig settings:
Release: Config/Signing.xcconfig base:
postBuildScripts: PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser.mac
- name: Bundle espeak-ng resources:
script: | - path: Resources/Models
set -euo pipefail buildPhase: resources
BIN_SRC="/opt/homebrew/bin/espeak-ng" - path: Resources/Voices
DATA_SRC="/opt/homebrew/share/espeak-ng-data" buildPhase: resources
DYLIB_SRC="/opt/homebrew/lib/libespeak-ng.dylib"
if [ ! -x "$BIN_SRC" ]; then
echo "espeak-ng not found at $BIN_SRC. Install via: brew install espeak-ng"
exit 1
fi
if [ ! -d "$DATA_SRC" ]; then
echo "espeak-ng data not found at $DATA_SRC"
exit 1
fi
if [ ! -f "$DYLIB_SRC" ]; then
echo "libespeak-ng.dylib not found at $DYLIB_SRC"
exit 1
fi
RES_DIR="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources"
TOOL_DIR="${RES_DIR}/Tools"
FRAMEWORK_DIR="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Frameworks"
mkdir -p "$TOOL_DIR" "$FRAMEWORK_DIR"
cp -f "$BIN_SRC" "$TOOL_DIR/espeak-ng"
chmod +x "$TOOL_DIR/espeak-ng"
rsync -a "$DATA_SRC/" "$TOOL_DIR/espeak-ng-data/"
cp -f "$DYLIB_SRC" "$FRAMEWORK_DIR/libespeak-ng.dylib"
install_name_tool -id "@rpath/libespeak-ng.dylib" "$FRAMEWORK_DIR/libespeak-ng.dylib"
install_name_tool -change "$DYLIB_SRC" "@rpath/libespeak-ng.dylib" "$TOOL_DIR/espeak-ng"
install_name_tool -add_rpath "@executable_path/../Frameworks" "$TOOL_DIR/espeak-ng" || true
codesign --force --sign - --timestamp=none "$FRAMEWORK_DIR/libespeak-ng.dylib"
codesign --force --sign - --timestamp=none "$TOOL_DIR/espeak-ng"
outputFiles:
- ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/Tools/espeak-ng
- ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/Tools/espeak-ng-data/phondata
- ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Frameworks/libespeak-ng.dylib
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser.mac
MACOSX_DEPLOYMENT_TARGET: 15.0
GENERATE_INFOPLIST_FILE: true
INFOPLIST_KEY_CFBundleVersion: "1"
INFOPLIST_KEY_CFBundleShortVersionString: "0.1.0"