Repository navigation
Expand file tree
/
Copy pathproject.yml
More file actions
80 lines (76 loc) · 3.28 KB
/
Copy pathproject.yml
File metadata and controls
80 lines (76 loc) · 3.28 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
name: ChillMac
options:
bundleIdPrefix: com.idevtim
deploymentTarget:
macOS: "13.0"
xcodeVersion: "15.0"
generateEmptyDirectories: true
settings:
base:
SWIFT_VERSION: "5.9"
packages:
Sparkle:
url: https://github.com/sparkle-project/Sparkle
from: "2.6.0"
targets:
ChillMac:
type: application
platform: macOS
sources:
- path: ChillMac
- path: Shared
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.idevtim.ChillMac
INFOPLIST_FILE: ChillMac/Info.plist
CODE_SIGN_ENTITLEMENTS: ChillMac/ChillMac.entitlements
CODE_SIGN_IDENTITY: "-"
CODE_SIGN_STYLE: Automatic
LD_RUNPATH_SEARCH_PATHS: "$(inherited) @executable_path/../Frameworks"
ENABLE_HARDENED_RUNTIME: YES
dependencies:
- target: com.idevtim.ChillMac.Helper
embed: false
codeSign: false
# In-app updates. Helper target deliberately excluded — the daemon never updates itself.
- package: Sparkle
postCompileScripts:
- name: "Copy Helper Tool"
script: |
mkdir -p "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Library/LaunchServices"
cp "${BUILT_PRODUCTS_DIR}/com.idevtim.ChillMac.Helper" "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Library/LaunchServices/"
# SMAppService reads the daemon definition from Contents/Library/LaunchDaemons
# and only from there. Omitting it makes register() fail with error 108 and the
# app ends up with no privileged helper at all.
mkdir -p "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Library/LaunchDaemons"
cp "${SRCROOT}/FanControlHelper/LaunchDaemon.plist" "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Library/LaunchDaemons/com.idevtim.ChillMac.Helper.plist"
inputFiles:
# The helper binary has to be declared, not just the plist. Xcode skips a script
# phase whose declared inputs are unchanged and whose outputs exist, so with only
# the plist listed here a rebuilt helper was never copied into the app bundle:
# incremental builds kept running whatever helper the first build of the day had
# produced. Release builds were spared only because build-dmg.sh cleans first,
# which removes the outputs and forces the copy.
- "$(BUILT_PRODUCTS_DIR)/com.idevtim.ChillMac.Helper"
- "$(SRCROOT)/FanControlHelper/LaunchDaemon.plist"
outputFiles:
- "$(BUILT_PRODUCTS_DIR)/$(CONTENTS_FOLDER_PATH)/Library/LaunchServices/com.idevtim.ChillMac.Helper"
- "$(BUILT_PRODUCTS_DIR)/$(CONTENTS_FOLDER_PATH)/Library/LaunchDaemons/com.idevtim.ChillMac.Helper.plist"
com.idevtim.ChillMac.Helper:
type: tool
platform: macOS
sources:
- path: FanControlHelper
- path: Shared
- path: ChillMac/SMC
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.idevtim.ChillMac.Helper
PRODUCT_NAME: com.idevtim.ChillMac.Helper
INFOPLIST_FILE: FanControlHelper/Info.plist
CODE_SIGN_IDENTITY: "-"
CODE_SIGN_STYLE: Automatic
ENABLE_HARDENED_RUNTIME: YES
CREATE_INFOPLIST_SECTION_IN_BINARY: YES
INFOPLIST_OTHER_PREPROCESSOR_FLAGS: ""
OTHER_LDFLAGS: "-sectcreate __TEXT __launchd_plist $(SRCROOT)/FanControlHelper/Launchd.plist"