-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.yml
More file actions
125 lines (120 loc) · 4.86 KB
/
Copy pathproject.yml
File metadata and controls
125 lines (120 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: LangAutoSwitcher
options:
bundleIdPrefix: com.dklaturov
deploymentTarget:
macOS: "14.0"
minimumXcodeGenVersion: "2.30"
settings:
base:
SWIFT_VERSION: "5.9"
DEVELOPMENT_TEAM: ""
# Default version — overridden per-release by scripts/release.sh via
# MARKETING_VERSION=… CURRENT_PROJECT_VERSION=… on the xcodebuild line.
# Keep this equal to the latest published release: Sparkle compares
# CFBundleVersion against the appcast, and a lower default means any
# locally installed dev build gets silently replaced within the hour.
MARKETING_VERSION: "2.8.4"
CURRENT_PROJECT_VERSION: "20804"
packages:
Sparkle:
url: https://github.com/sparkle-project/Sparkle
from: "2.9.0"
schemes:
LangAutoSwitcherTests:
build:
targets:
LangAutoSwitcherTests: all
test:
gatherCoverageData: false
targets:
- LangAutoSwitcherTests
targets:
# Unit tests for the pure Swift logic (TextHeuristics). The sources under
# test are compiled directly into the bundle so the tests don't need the
# app as a host — no IMK, no Sparkle, no Rust static lib.
LangAutoSwitcherTests:
type: bundle.unit-test
platform: macOS
sources:
- path: LangAutoSwitcherTests
- path: LangAutoSwitcher/Sources/TextHeuristics.swift
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.dklaturov.LangAutoSwitcherTests
CODE_SIGN_IDENTITY: "-"
GENERATE_INFOPLIST_FILE: YES
LangAutoSwitcher:
type: application
platform: macOS
dependencies:
- package: Sparkle
sources:
- path: LangAutoSwitcher/Sources
- path: LangAutoSwitcher/Resources/bg-dictionary.txt
buildPhase: resources
- path: LangAutoSwitcher/Resources/en-dictionary.txt
buildPhase: resources
- path: LangAutoSwitcher/Resources/icon.tiff
buildPhase: resources
- path: LangAutoSwitcher/Resources/AppIcon.icns
buildPhase: resources
# Asset catalog with light + dark AppIcon variants. Xcode compiles this
# into Assets.car alongside the legacy .icns; CFBundleIconName picks it.
- path: LangAutoSwitcher/Resources/Assets.xcassets
buildPhase: resources
info:
path: LangAutoSwitcher/Resources/Info.plist
properties:
CFBundleDisplayName: LangAutoSwitcher
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
LSBackgroundOnly: true
LSUIElement: true
InputMethodConnectionName: LangAutoSwitcher_Connection
InputMethodServerControllerClass: InputController
tsInputMethodCharacterRepertoireKey:
- Latn
- Cyrl
tsInputMethodIconFileKey: icon.tiff
# Treat icon.tiff as a template image (black + alpha): the system
# tints the plate for menu state — light plate in dark menus, dark
# in light menus — exactly like the native БГ/A input icons. Without
# this the black plate renders literally and looks like a blob.
TISIconIsTemplate: true
CFBundleIconFile: AppIcon
# macOS 11+ honors CFBundleIconName from an asset catalog; this gives
# us light/dark theme support that a static .icns can't provide.
CFBundleIconName: AppIcon
TISIntendedLanguage: en
# Sparkle auto-update configuration. Public key only — the matching
# private key lives in the developer's macOS Keychain and never ships.
SUFeedURL: https://bulgariamitko.github.io/lang-auto-switcher/appcast.xml
SUPublicEDKey: hqwuql1C6NLqHU8XUQAX8ZXJxuA3byj9DIl0hnf2Xhg=
# Check every hour instead of once a day.
SUScheduledCheckInterval: 3600
SUEnableAutomaticChecks: true
# Download AND install updates automatically in the background.
# User no longer sees the "A new version is available" dialog.
SUAutomaticallyUpdate: true
preBuildScripts:
- name: Build Rust core (langauto-core)
script: "\"${SRCROOT}/scripts/build_rust.sh\""
basedOnDependencyAnalysis: false
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.dklaturov.inputmethod.LangAutoSwitcher
ENABLE_APP_SANDBOX: false
# Tell actool which asset is our app icon (for the asset-catalog flow).
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
INFOPLIST_KEY_NSMainStoryboardFile: ""
# Link InputMethodKit + the Rust static library
OTHER_LDFLAGS:
- "-framework"
- "InputMethodKit"
- "-L$(SRCROOT)/langauto-core/target/universal/$(CONFIGURATION:lower)"
- "-llangauto_core"
# Swift sees the C ABI through this bridging header
SWIFT_OBJC_BRIDGING_HEADER: "LangAutoSwitcher/Sources/LangAutoSwitcher-Bridging-Header.h"
# So #import "langauto_core.h" resolves
HEADER_SEARCH_PATHS:
- "$(SRCROOT)/langauto-core/include"