Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 20 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ let compatibilityTestCondition = envBoolValue("COMPATIBILITY_TEST")

let useLocalDeps = envBoolValue("USE_LOCAL_DEPS")
let attributeGraphCondition = envBoolValue("ATTRIBUTEGRAPH", default: buildForDarwinPlatform && !isSPIBuild)
let renderBoxCondition = envBoolValue("OPENRENDERBOX_RENDERBOX", default: buildForDarwinPlatform && !isSPIBuild)
let renderBoxCondition = envBoolValue("RENDERBOX", default: buildForDarwinPlatform && !isSPIBuild)

// For #39
let anyAttributeFix = envBoolValue("ANY_ATTRIBUTE_FIX", default: !buildForDarwinPlatform)
Expand Down Expand Up @@ -192,6 +192,13 @@ let bridgeFramework = envStringValue("OPENSWIFTUI_BRIDGE_FRAMEWORK", default: "S
// Workaround iOS CI build issue (We need to disable this on iOS CI)
let supportMultiProducts: Bool = envBoolValue("SUPPORT_MULTI_PRODUCTS", default: true)

/// CGFloat and CGRect def in CFCGTypes.h will conflict with Foundation's CGSize/CGRect def on Linux.
/// macOS: true -> no issue
/// macOS: false -> use Swift implementation with OpenCoreGraphics Swift CGPath
/// Linux: true + No CGPathRef support in ORBPath -> confilict with Foundation def
/// Linux: false -> use Swift implementation with OpenCoreGraphics Swift CGPath
let cfCGTypes = envBoolValue("CF_CGTYPES", default: buildForDarwinPlatform)

// MARK: - Shared Settings

var sharedCSettings: [CSetting] = [
Expand Down Expand Up @@ -373,6 +380,15 @@ if enableRuntimeConcurrencyCheck {
sharedSwiftSettings.append(.define("OPENSWIFTUI_ENABLE_RUNTIME_CONCURRENCY_CHECK"))
}

if cfCGTypes {
sharedCSettings.append(.define("OPENSWIFTUI_CF_CGTYPES"))
sharedCxxSettings.append(.define("OPENSWIFTUI_CF_CGTYPES"))
sharedSwiftSettings.append(.define("OPENSWIFTUI_CF_CGTYPES"))
sharedCSettings.append(.define("OPENRENDERBOX_CF_CGTYPES"))
sharedCxxSettings.append(.define("OPENRENDERBOX_CF_CGTYPES"))
sharedSwiftSettings.append(.define("OPENRENDERBOX_CF_CGTYPES"))
}

// MARK: - Extension

extension Target {
Expand All @@ -390,15 +406,15 @@ extension Target {
// "could not determine executable path for bundle 'RenderBox.framework'"
dependencies.append(.product(name: "RenderBox", package: "DarwinPrivateFrameworks"))
var swiftSettings = swiftSettings ?? []
swiftSettings.append(.define("OPENRENDERBOX_RENDERBOX"))
swiftSettings.append(.define("OPENSWIFTUI_RENDERBOX"))
self.swiftSettings = swiftSettings

var cSettings = cSettings ?? []
cSettings.append(.define("OPENRENDERBOX_RENDERBOX"))
cSettings.append(.define("OPENSWIFTUI_RENDERBOX"))
self.cSettings = cSettings

var cxxSettings = cxxSettings ?? []
cxxSettings.append(.define("OPENRENDERBOX_RENDERBOX"))
cxxSettings.append(.define("OPENSWIFTUI_RENDERBOX"))
self.cxxSettings = cxxSettings
}

Expand Down
4 changes: 3 additions & 1 deletion Scripts/CI/darwin_setup_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ filepath() {
REPO_ROOT="$(dirname $(dirname $(dirname $(filepath $0))))"
cd $REPO_ROOT

Scripts/CI/opencoregraphics_setup.sh
# The order of these scripts matters.
# The more foundational frameworks should be set up last.
Scripts/CI/openattributegraph_setup.sh
Scripts/CI/openrenderbox_setup.sh
Scripts/CI/opencoregraphics_setup.sh
Scripts/CI/openobservation_setup.sh
Scripts/CI/framework_setup.sh
Loading
Loading