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
options:
bundleIdPrefix: de.felixfoertsch
developmentLanguage: en
deploymentTarget:
iOS: 26.0
macOS: 15.0
createIntermediateGroups: true
settings:
base:
SWIFT_VERSION: 5.9
CURRENT_PROJECT_VERSION: 1
MARKETING_VERSION: 0.1.0
bundleIdPrefix: de.felixfoertsch
deploymentTarget:
iOS: "18.0"
macOS: "15.0"
xcodeVersion: "16.0"
createIntermediateGroups: true
packages:
ZipFoundation:
path: Vendor/ZipFoundation
SwiftSoup:
path: Vendor/SwiftSoup
VorleserKit:
path: VorleserKit
targets:
Vorleser:
type: application
platform: iOS
sources:
- path: Vorleser
configFiles:
Debug: Config/Signing.xcconfig
Release: Config/Signing.xcconfig
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser
IPHONEOS_DEPLOYMENT_TARGET: 26.0
GENERATE_INFOPLIST_FILE: true
INFOPLIST_KEY_CFBundleVersion: "1"
INFOPLIST_KEY_CFBundleShortVersionString: "0.1.0"
INFOPLIST_KEY_UIBackgroundModes: [audio, processing]
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace: true
INFOPLIST_KEY_UIFileSharingEnabled: true
dependencies:
- package: ZipFoundation
product: ZIPFoundation
- package: SwiftSoup
product: SwiftSoup
Vorleser-iOS:
type: application
platform: iOS
sources:
- Vorleser-iOS
dependencies:
- package: VorleserKit
product: VorleserKit
- package: VorleserKit
product: BookParser
- package: VorleserKit
product: Storage
- package: VorleserKit
product: Synthesizer
- package: VorleserKit
product: AudioEngine
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser
INFOPLIST_VALUES: >-
UIBackgroundModes=(audio);
UILaunchScreen={};
UIFileSharingEnabled=YES;
LSSupportsOpeningDocumentsInPlace=YES;
resources:
- path: Resources/Models
buildPhase: resources
- path: Resources/Voices
buildPhase: resources
VorleserMac:
type: application
platform: macOS
sources:
- path: VorleserMac
resources:
- path: VorleserMac/Resources/Models
- path: VorleserMac/Resources/Voices
- path: VorleserMac/Resources/Config
- path: VorleserMac/Resources/Tools
dependencies:
- package: ZipFoundation
product: ZIPFoundation
- package: SwiftSoup
product: SwiftSoup
configFiles:
Debug: Config/Signing.xcconfig
Release: Config/Signing.xcconfig
postBuildScripts:
- name: Bundle espeak-ng
script: |
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:
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"
Vorleser-macOS:
type: application
platform: macOS
sources:
- Vorleser-macOS
dependencies:
- package: VorleserKit
product: VorleserKit
- package: VorleserKit
product: BookParser
- package: VorleserKit
product: Storage
- package: VorleserKit
product: Synthesizer
- package: VorleserKit
product: AudioEngine
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: de.felixfoertsch.vorleser.mac
resources:
- path: Resources/Models
buildPhase: resources
- path: Resources/Voices
buildPhase: resources