Skip to content

Commit de08647

Browse files
authored
Merge pull request #37 from qizh/weekly/progress/2
Ongoing weekly progress №2
2 parents 3cce3c7 + b6ebf1f commit de08647

13 files changed

Lines changed: 1352 additions & 232 deletions

Package.swift

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ import PackageDescription
55
import Foundation // ← for ProcessInfo
66

77
/// Decide if HDR APIs should be enabled for QizhKit.
8-
let isHDREnabled: Bool = {
9-
/// You can choose any env var name you like.
10-
/// On your Mac, set QIZHKIT_ENABLE_HDR=1 in the environment when building.
8+
/// On your Mac, set `QIZHKIT_ENABLE_HDR=1` in the environment when building.
9+
/// - Experiment:
10+
/// ```zsh
11+
/// launchctl setenv QIZHKIT_ENABLE_HDR 1
12+
/// launchctl getenv QIZHKIT_ENABLE_HDR # should output 1
13+
/// ```
14+
let isHDREnabled: Bool =
1115
if let value = ProcessInfo.processInfo.environment["QIZHKIT_ENABLE_HDR"] {
12-
return value == "1" || value.lowercased() == "true"
16+
value == "1" || value.lowercased() == "true"
17+
} else {
18+
false
1319
}
14-
return false
15-
}()
20+
21+
/*
22+
print("QIZHKIT_ENABLE_HDR in Package.swift:",
23+
ProcessInfo.processInfo.environment["QIZHKIT_ENABLE_HDR"] ?? "nil")
24+
print("HDR enabled:", isHDREnabled)
25+
*/
1626

1727
/// Base swift settings for QizhKit.
1828
var qizhKitSwiftSettings: [SwiftSetting] = [

0 commit comments

Comments
 (0)