Skip to content

Commit a288f58

Browse files
authored
[NFC] Update OpenBox to OpenRenderBox (#9)
1 parent f757b0a commit a288f58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+800
-800
lines changed

.github/workflows/compatibility_tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
xcode-version: "16.4" # Swift 6.1.2
1818
runs-on: ${{ matrix.os }}
1919
env:
20-
OPENBOX_WERROR: 1
21-
OPENBOX_RENDERBOX: 1
22-
OPENBOX_COMPATIBILITY_TEST: 1
23-
OPENBOX_USE_LOCAL_DEPS: 1
24-
OPENBOX_TARGET_RELEASE: 2024
20+
OPENRENDERBOX_WERROR: 1
21+
OPENRENDERBOX_RENDERBOX: 1
22+
OPENRENDERBOX_COMPATIBILITY_TEST: 1
23+
OPENRENDERBOX_USE_LOCAL_DEPS: 1
24+
OPENRENDERBOX_TARGET_RELEASE: 2024
2525
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
2626
GH_TOKEN: ${{ github.token }}
2727
steps:
@@ -37,14 +37,14 @@ jobs:
3737
run: swift --version
3838
- name: Run tests against Apple's RENDERBOX on macOS via SwiftPM
3939
env:
40-
OPENBOX_LIBRARY_EVOLUTION: 0
40+
OPENRENDERBOX_LIBRARY_EVOLUTION: 0
4141
run: |
4242
swift test \
4343
--build-path .build-compatibility-test-debug
4444
- name: Run tests against Apple's RENDERBOX on macOS via Xcode
4545
run: |
4646
xcodebuild test \
47-
-scheme OpenBox-Package \
47+
-scheme OpenRenderBox-Package \
4848
-sdk macosx \
4949
-destination "platform=macOS" \
5050
-skipPackagePluginValidation \

.github/workflows/ios.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
ios-simulator-name: "iPhone 16 Pro"
2121
runs-on: ${{ matrix.os }}
2222
env:
23-
OPENBOX_WERROR: 1
24-
OPENBOX_RENDERBOX: 0
25-
OPENBOX_COMPATIBILITY_TEST: 0
26-
OPENBOX_USE_LOCAL_DEPS: 1
27-
OPENBOX_TARGET_RELEASE: 2024
23+
OPENRENDERBOX_WERROR: 1
24+
OPENRENDERBOX_RENDERBOX: 0
25+
OPENRENDERBOX_COMPATIBILITY_TEST: 0
26+
OPENRENDERBOX_USE_LOCAL_DEPS: 1
27+
OPENRENDERBOX_TARGET_RELEASE: 2024
2828
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
2929
GH_TOKEN: ${{ github.token }}
3030
steps:
@@ -41,7 +41,7 @@ jobs:
4141
- name: Build in debug mode on iOS
4242
run: |
4343
xcodebuild build \
44-
-scheme OpenBox-Package \
44+
-scheme OpenRenderBox-Package \
4545
-configuration Debug \
4646
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
4747
-derivedDataPath .build-debug \
@@ -51,7 +51,7 @@ jobs:
5151
- name: Build and run tests in debug mode with coverage on iOS Simulator
5252
run: |
5353
xcodebuild test \
54-
-scheme OpenBox-Package \
54+
-scheme OpenRenderBox-Package \
5555
-configuration Debug \
5656
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
5757
-enableCodeCoverage=YES \

.github/workflows/macos.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
xcode-version: [16.4] # Swift 6.1.2
1717
runs-on: ${{ matrix.os }}
1818
env:
19-
OPENBOX_WERROR: 1
20-
OPENBOX_RENDERBOX: 0
21-
OPENBOX_COMPATIBILITY_TEST: 0
22-
OPENBOX_USE_LOCAL_DEPS: 1
23-
OPENBOX_TARGET_RELEASE: 2024
19+
OPENRENDERBOX_WERROR: 1
20+
OPENRENDERBOX_RENDERBOX: 0
21+
OPENRENDERBOX_COMPATIBILITY_TEST: 0
22+
OPENRENDERBOX_USE_LOCAL_DEPS: 1
23+
OPENRENDERBOX_TARGET_RELEASE: 2024
2424
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
2525
GH_TOKEN: ${{ github.token }}
2626
steps:
@@ -36,19 +36,19 @@ jobs:
3636
run: swift --version
3737
- name: Build and run tests in debug mode with coverage
3838
env:
39-
OPENBOX_LIBRARY_EVOLUTION: 0
39+
OPENRENDERBOX_LIBRARY_EVOLUTION: 0
4040
run: |
4141
swift test \
4242
-c debug \
4343
--enable-code-coverage \
4444
--build-path .build-test-debug
4545
xcrun llvm-cov show \
4646
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
47-
.build-test-debug/debug/OPENBOXPackageTests.xctest/Contents/MacOS/OPENBOXPackageTests \
47+
.build-test-debug/debug/OpenRenderBoxPackageTests.xctest/Contents/MacOS/OpenRenderBoxPackageTests \
4848
> coverage.txt
4949
- name: Build and run tests in release mode
5050
env:
51-
OPENBOX_LIBRARY_EVOLUTION: 0
51+
OPENRENDERBOX_LIBRARY_EVOLUTION: 0
5252
run: |
5353
swift test \
5454
-c release \

.github/workflows/ubuntu.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
swift_version: ["6.1.2"]
1616
runs-on: ubuntu-22.04
1717
env:
18-
OPENBOX_WERROR: 1
19-
OPENBOX_RENDERBOX: 0
20-
OPENBOX_COMPATIBILITY_TEST: 0
18+
OPENRENDERBOX_WERROR: 1
19+
OPENRENDERBOX_RENDERBOX: 0
20+
OPENRENDERBOX_COMPATIBILITY_TEST: 0
2121
container: swift:${{ matrix.swift_version }}-jammy
2222
steps:
2323
- uses: actions/checkout@v4
@@ -36,7 +36,7 @@ jobs:
3636
--build-path .build-test-debug
3737
llvm-cov show \
3838
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
39-
.build-test-debug/debug/OpenBoxPackageTests.xctest \
39+
.build-test-debug/debug/OpenRenderBoxPackageTests.xctest \
4040
> coverage.txt
4141
- name: Building and running tests in release mode
4242
run: |

.spi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ version: 1
22
builder:
33
configs:
44
- swift_version: 6.0
5-
documentation_targets: [OpenBox]
5+
documentation_targets: [OpenRenderBox]

Package.swift

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ let isSPIBuild = envEnable("SPI_BUILD")
3131
// MARK: - Env and Config
3232

3333
let isXcodeEnv = Context.environment["__CFBundleIdentifier"] == "com.apple.dt.Xcode"
34-
let development = envEnable("OPENBOX_DEVELOPMENT")
34+
let development = envEnable("OPENRENDERBOX_DEVELOPMENT")
3535

36-
let releaseVersion = Context.environment["OPENBOX_TARGET_RELEASE"].flatMap { Int($0) } ?? 2024
36+
let releaseVersion = Context.environment["OPENRENDERBOX_TARGET_RELEASE"].flatMap { Int($0) } ?? 2024
3737

3838
let swiftBinPath = Context.environment["_"] ?? "/usr/bin/swift"
3939
let swiftBinURL = URL(fileURLWithPath: swiftBinPath)
@@ -54,37 +54,37 @@ var sharedSwiftSettings: [SwiftSetting] = [
5454
.swiftLanguageMode(.v5),
5555
]
5656

57-
// MARK: - [env] OPENBOX_LIBRARY_EVOLUTION
57+
// MARK: - [env] OPENRENDERBOX_LIBRARY_EVOLUTION
5858

59-
let libraryEvolutionCondition = envEnable("OPENBOX_LIBRARY_EVOLUTION", default: buildForDarwinPlatform)
59+
let libraryEvolutionCondition = envEnable("OPENRENDERBOX_LIBRARY_EVOLUTION", default: buildForDarwinPlatform)
6060

6161
if libraryEvolutionCondition {
6262
// NOTE: -enable-library-evolution will cause module verify failure for `swift build`.
63-
// Either set OPENBOX_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
63+
// Either set OPENRENDERBOX_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
6464
sharedSwiftSettings.append(.unsafeFlags(["-enable-library-evolution", "-no-verify-emitted-module-interface"]))
6565
}
6666

6767
// MARK: - Targets
6868

6969
let openBoxTarget = Target.target(
70-
name: "OpenBox",
70+
name: "OpenRenderBox",
7171
cSettings: sharedCSettings,
7272
cxxSettings: sharedCxxSettings
7373
)
7474
let openBoxShimsTarget = Target.target(
75-
name: "OpenBoxShims",
75+
name: "OpenRenderBoxShims",
7676
swiftSettings: sharedSwiftSettings
7777
)
7878
let openBoxTestTarget = Target.testTarget(
79-
name: "OpenBoxTests",
79+
name: "OpenRenderBoxTests",
8080
dependencies: [
81-
"OpenBox",
81+
"OpenRenderBox",
8282
],
8383
exclude: ["README.md"],
8484
swiftSettings: sharedSwiftSettings
8585
)
8686
let openBoxCompatibilityTestTarget = Target.testTarget(
87-
name: "OpenBoxCompatibilityTests",
87+
name: "OpenRenderBoxCompatibilityTests",
8888
dependencies: [
8989
.product(name: "RealModule", package: "swift-numerics"),
9090
],
@@ -95,7 +95,7 @@ let openBoxCompatibilityTestTarget = Target.testTarget(
9595
// MARK: - Package
9696

9797
let libraryType: Product.Library.LibraryType?
98-
switch Context.environment["OPENBOX_LIBRARY_TYPE"] {
98+
switch Context.environment["OPENRENDERBOX_LIBRARY_TYPE"] {
9999
case "dynamic":
100100
libraryType = .dynamic
101101
case "static":
@@ -105,10 +105,10 @@ default:
105105
}
106106

107107
let package = Package(
108-
name: "OpenBox",
108+
name: "OpenRenderBox",
109109
products: [
110-
.library(name: "OpenBox", type: libraryType, targets: ["OpenBox"]),
111-
.library(name: "OpenBoxShims", type: libraryType, targets: ["OpenBoxShims"]),
110+
.library(name: "OpenRenderBox", type: libraryType, targets: ["OpenRenderBox"]),
111+
.library(name: "OpenRenderBoxShims", type: libraryType, targets: ["OpenRenderBoxShims"]),
112112
],
113113
dependencies: [
114114
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),
@@ -123,9 +123,9 @@ let package = Package(
123123
cxxLanguageStandard: .cxx20
124124
)
125125

126-
let useLocalDeps = envEnable("OPENBOX_USE_LOCAL_DEPS")
126+
let useLocalDeps = envEnable("OPENRENDERBOX_USE_LOCAL_DEPS")
127127

128-
let renderBoxCondtion = envEnable("OPENBOX_RENDERBOX", default: buildForDarwinPlatform && !isSPIBuild )
128+
let renderBoxCondtion = envEnable("OPENRENDERBOX_RENDERBOX", default: buildForDarwinPlatform && !isSPIBuild )
129129

130130
if renderBoxCondtion {
131131
let privateFrameworkRepo: Package.Dependency
@@ -136,7 +136,7 @@ if renderBoxCondtion {
136136
}
137137
package.dependencies.append(privateFrameworkRepo)
138138
var swiftSettings: [SwiftSetting] = (openBoxShimsTarget.swiftSettings ?? [])
139-
swiftSettings.append(.define("OPENBOX_RENDERBOX"))
139+
swiftSettings.append(.define("OPENRENDERBOX_RENDERBOX"))
140140
openBoxShimsTarget.swiftSettings = swiftSettings
141141
openBoxShimsTarget.dependencies.append(
142142
.product(name: "RenderBox", package: "DarwinPrivateFrameworks")
@@ -149,20 +149,20 @@ if renderBoxCondtion {
149149
default: nil
150150
}
151151
} else {
152-
openBoxShimsTarget.dependencies.append("OpenBox")
152+
openBoxShimsTarget.dependencies.append("OpenRenderBox")
153153
}
154154

155-
let compatibilityTestCondition = envEnable("OPENBOX_COMPATIBILITY_TEST")
155+
let compatibilityTestCondition = envEnable("OPENRENDERBOX_COMPATIBILITY_TEST")
156156
if compatibilityTestCondition && renderBoxCondtion {
157157
openBoxCompatibilityTestTarget.dependencies.append(
158158
.product(name: "RenderBox", package: "DarwinPrivateFrameworks")
159159
)
160160

161161
var swiftSettings: [SwiftSetting] = (openBoxCompatibilityTestTarget.swiftSettings ?? [])
162-
swiftSettings.append(.define("OPENBOX_COMPATIBILITY_TEST"))
162+
swiftSettings.append(.define("OPENRENDERBOX_COMPATIBILITY_TEST"))
163163
openBoxCompatibilityTestTarget.swiftSettings = swiftSettings
164164
} else {
165-
openBoxCompatibilityTestTarget.dependencies.append("OpenBox")
165+
openBoxCompatibilityTestTarget.dependencies.append("OpenRenderBox")
166166
}
167167

168168
extension [Platform] {

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# OpenBox
1+
# OpenRenderBox
22

3-
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenSwiftUIProject%2FOpenBox%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/OpenSwiftUIProject/OpenBox)
3+
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenSwiftUIProject%2FOpenRenderBox%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/OpenSwiftUIProject/OpenRenderBox)
44

5-
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenSwiftUIProject%2FOpenBox%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/OpenSwiftUIProject/OpenBox)
5+
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenSwiftUIProject%2FOpenRenderBox%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/OpenSwiftUIProject/OpenRenderBox)
66

7-
[![codecov](https://codecov.io/github/OpenSwiftUIProject/OpenBox/graph/badge.svg?token=1MC561FQUR)](https://codecov.io/github/OpenSwiftUIProject/OpenBox)
7+
[![codecov](https://codecov.io/github/OpenSwiftUIProject/OpenRenderBox/graph/badge.svg?token=1MC561FQUR)](https://codecov.io/github/OpenSwiftUIProject/OpenRenderBox)
88

9-
OpenBox is an open source implementation of Apple's Private framework - RenderBox.
9+
OpenRenderBox is an open source implementation of Apple's Private framework - RenderBox.
1010

1111
RenderBox is a high performance rendering engine written in C++.
1212

@@ -26,10 +26,10 @@ The current suggested toolchain to build the project is Swift 6.1.2 / Xcode 16.4
2626

2727
| **CI Status** |
2828
|---|
29-
|[![Compatibility tests](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/compatibility_tests.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/compatibility_tests.yml)|
30-
|[![macOS](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/macos.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/macos.yml)|
31-
|[![iOS](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ios.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ios.yml)|
32-
|[![Ubuntu](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenBox/actions/workflows/ubuntu.yml)|
29+
|[![Compatibility tests](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/compatibility_tests.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/compatibility_tests.yml)|
30+
|[![macOS](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/macos.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/macos.yml)|
31+
|[![iOS](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/ios.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/ios.yml)|
32+
|[![Ubuntu](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenRenderBox/actions/workflows/ubuntu.yml)|
3333

3434
## License
3535

Scripts/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ filepath() {
55
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
66
}
77

8-
OPENBOX_ROOT="$(dirname $(dirname $(filepath $0)))"
8+
OPENRENDERBOX_ROOT="$(dirname $(dirname $(filepath $0)))"
99

10-
cd $OPENBOX_ROOT
10+
cd $OPENRENDERBOX_ROOT
1111

1212
swift build

Scripts/build_swiftinterface.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ filepath() {
55
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
66
}
77

8-
OPENBOX_ROOT="$(dirname $(dirname $(filepath $0)))"
8+
OPENRENDERBOX_ROOT="$(dirname $(dirname $(filepath $0)))"
99

10-
cd $OPENBOX_ROOT
10+
cd $OPENRENDERBOX_ROOT
1111

1212
swift build -Xswiftc -emit-module-interface -Xswiftc -enable-library-evolution -Xswiftc -no-verify-emitted-module-interface

Sources/OpenBox/Path/OBPath.cpp

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)