Skip to content
Open
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
40 changes: 28 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ LDFLAGS := -arch $(ARCH) -mmacosx-version-min=$(MIN_VER) \

FRAMEWORKS := -framework CoreFoundation -framework CFNetwork

DOBBY_DIR := build/vendor/dobby
DOBBY_REV := 5dfc8546954ce3b3198132ab13fddb89ee92cdd7
DOBBY_DIR := build
DOBBY_STAMP := $(DOBBY_DIR)/.dobby-revision
DOBBY_LIBS := $(DOBBY_DIR)/libdobby.a \
$(DOBBY_DIR)/builtin-plugin/SymbolResolver/libdobby_symbol_resolver.a \
$(DOBBY_DIR)/builtin-plugin/SymbolResolver/libmacho_ctx_kit.a \
Expand Down Expand Up @@ -65,9 +67,9 @@ DEPS := $(OBJS:.o=.d)

all: $(TARGET)

$(ARM64_DYLIB): $(OBJS)
$(ARM64_DYLIB): $(OBJS) $(DOBBY_STAMP)
@mkdir -p $(dir $@)
$(CC) $(LDFLAGS) -o $@ $^ $(DOBBY_LIBS) $(FRAMEWORKS) -lc++
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(DOBBY_LIBS) $(FRAMEWORKS) -lc++

$(X86_STUB): src/stub_x86_64.c
@mkdir -p $(dir $@)
Expand Down Expand Up @@ -143,13 +145,27 @@ test:
-include $(DEPS)

.PHONY: dobby
$(DOBBY_STAMP): dobby
@test -f "$@"

dobby:
@echo "==> Building Dobby from source..."
@mkdir -p build
cd build && cmake ../vendor/dobby \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DDOBBY_DEBUG=OFF \
-DDOBBY_GENERATE_SHARED=OFF \
-G "Unix Makefiles"
$(MAKE) -C build -j$(shell sysctl -n hw.ncpu)
@echo "==> Dobby rebuilt."
@if [ ! -d vendor/dobby/.git ]; then \
echo "==> Cloning Dobby..."; \
git clone https://github.com/jmpews/Dobby.git vendor/dobby; \
fi
@if [ "$$(git -C vendor/dobby rev-parse HEAD)" != "$(DOBBY_REV)" ]; then \
echo "==> Checking out pinned Dobby revision $(DOBBY_REV)..."; \
git -C vendor/dobby fetch --depth=1 origin $(DOBBY_REV); \
git -C vendor/dobby checkout --detach $(DOBBY_REV); \
fi
@if [ ! -f "$(DOBBY_DIR)/libdobby.a" ] || \
[ "$$(cat "$(DOBBY_STAMP)" 2>/dev/null)" != "$(DOBBY_REV)" ]; then \
echo "==> Building Dobby from source..."; \
cmake -S vendor/dobby -B "$(DOBBY_DIR)" \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$(MIN_VER) \
-DDOBBY_DEBUG=OFF \
-G "Unix Makefiles"; \
$(MAKE) -C "$(DOBBY_DIR)" -j$$(sysctl -n hw.ncpu); \
echo "$(DOBBY_REV)" > "$(DOBBY_STAMP)"; \
fi
30 changes: 18 additions & 12 deletions macsteam-app/Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// swift-tools-version: 6.0
import Foundation
import PackageDescription

var targets: [Target] = [
.executableTarget(
name: "MacsteamApp",
dependencies: ["Sparkle"],
path: "Sources/MacsteamApp"
)
]

if FileManager.default.fileExists(atPath: "Tests/MacsteamAppTests") {
targets.append(.testTarget(
name: "MacsteamAppTests",
dependencies: ["MacsteamApp"],
path: "Tests/MacsteamAppTests"
))
}

let package = Package(
name: "MacsteamApp",
platforms: [
Expand All @@ -9,16 +26,5 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.9.6"),
],
targets: [
.executableTarget(
name: "MacsteamApp",
dependencies: ["Sparkle"],
path: "Sources/MacsteamApp"
),
.testTarget(
name: "MacsteamAppTests",
dependencies: ["MacsteamApp"],
path: "Tests/MacsteamAppTests"
)
]
targets: targets
)
4 changes: 0 additions & 4 deletions macsteam-app/Sources/MacsteamApp/DesignSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ final class SettingsCard: NSView {
applyCardSurfaceColors()
}

@available(macOS 27, *)
override var cornerConfiguration: NSViewCornerConfiguration? {
.uniformCorners(radius: .containerConcentric(Metrics.cornerRadius))
}
}

@MainActor
Expand Down
18 changes: 0 additions & 18 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
cd "$PROJECT_DIR"

if [ ! -d "vendor/dobby" ]; then
echo "[build] Cloning Dobby..."
git clone --depth=1 https://github.com/jmpews/Dobby.git vendor/dobby
fi

if [ ! -f "build/vendor/dobby/libdobby.a" ]; then
echo "[build] Building Dobby..."
mkdir -p build
cd build
cmake ../vendor/dobby \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DDOBBY_DEBUG=OFF \
-DDOBBY_GENERATE_SHARED=OFF \
-G "Unix Makefiles"
make -j$(sysctl -n hw.ncpu)
cd "$PROJECT_DIR"
fi

make -j$(sysctl -n hw.ncpu)

if [ -f out/macsteam.dylib ]; then
Expand Down