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: 26.0 iOS: "18.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
- package: VorleserKit
product: BookParser
- package: VorleserKit
product: Storage
- package: VorleserKit
product: Synthesizer
- package: VorleserKit
product: AudioEngine
settings: settings:
base: base:
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser
IPHONEOS_DEPLOYMENT_TARGET: 26.0 INFOPLIST_VALUES: >-
GENERATE_INFOPLIST_FILE: true UIBackgroundModes=(audio);
INFOPLIST_KEY_CFBundleVersion: "1" UILaunchScreen={};
INFOPLIST_KEY_CFBundleShortVersionString: "0.1.0" UIFileSharingEnabled=YES;
INFOPLIST_KEY_UIBackgroundModes: [audio, processing] LSSupportsOpeningDocumentsInPlace=YES;
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace: true resources:
INFOPLIST_KEY_UIFileSharingEnabled: true - path: Resources/Models
dependencies: buildPhase: resources
- package: ZipFoundation - path: Resources/Voices
product: ZIPFoundation buildPhase: resources
- package: SwiftSoup
product: SwiftSoup
VorleserMac: Vorleser-macOS:
type: application type: application
platform: macOS platform: macOS
sources: sources:
- path: VorleserMac - Vorleser-macOS
resources:
- path: VorleserMac/Resources/Models
- path: VorleserMac/Resources/Voices
- path: VorleserMac/Resources/Config
- path: VorleserMac/Resources/Tools
dependencies: dependencies:
- package: ZipFoundation - package: VorleserKit
product: ZIPFoundation product: VorleserKit
- package: SwiftSoup - package: VorleserKit
product: SwiftSoup product: BookParser
configFiles: - package: VorleserKit
Debug: Config/Signing.xcconfig product: Storage
Release: Config/Signing.xcconfig - package: VorleserKit
postBuildScripts: product: Synthesizer
- name: Bundle espeak-ng - package: VorleserKit
script: | product: AudioEngine
set -euo pipefail
BIN_SRC="/opt/homebrew/bin/espeak-ng"
DATA_SRC="/opt/homebrew/share/espeak-ng-data"
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: settings:
base: base:
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser.mac PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser.mac
MACOSX_DEPLOYMENT_TARGET: 15.0 resources:
GENERATE_INFOPLIST_FILE: true - path: Resources/Models
INFOPLIST_KEY_CFBundleVersion: "1" buildPhase: resources
INFOPLIST_KEY_CFBundleShortVersionString: "0.1.0" - path: Resources/Voices
buildPhase: resources