From 215b461a65cb1ff8529707b4e4928b6d6a523fa6 Mon Sep 17 00:00:00 2001 From: crschnick Date: Tue, 16 Jul 2024 15:28:36 +0000 Subject: [PATCH] Rework --- .gitignore | 3 +++ .../io/xpipe/app/core/window/NativeMacOsWindowControl.java | 2 +- app/src/main/java/io/xpipe/app/util/NativeBridge.java | 2 +- dist/base.gradle | 5 +++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 48b701855..04312448a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ ComponentsGenerated.wxs !dist/javafx/**/lib !dist/javafx/**/bin dev.properties +xcuserdata/ +*.dylib +project.xcworkspace diff --git a/app/src/main/java/io/xpipe/app/core/window/NativeMacOsWindowControl.java b/app/src/main/java/io/xpipe/app/core/window/NativeMacOsWindowControl.java index fccaca849..7ed6c80b0 100644 --- a/app/src/main/java/io/xpipe/app/core/window/NativeMacOsWindowControl.java +++ b/app/src/main/java/io/xpipe/app/core/window/NativeMacOsWindowControl.java @@ -33,6 +33,6 @@ public class NativeMacOsWindowControl { return; } - NativeBridge.MacOsLibrary.INSTANCE.setAppearance(new NativeLong(nsWindow), darkMode); + NativeBridge.MacOsLibrary.INSTANCE.setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode); } } diff --git a/app/src/main/java/io/xpipe/app/util/NativeBridge.java b/app/src/main/java/io/xpipe/app/util/NativeBridge.java index 9a5a24daf..3badbdd50 100644 --- a/app/src/main/java/io/xpipe/app/util/NativeBridge.java +++ b/app/src/main/java/io/xpipe/app/util/NativeBridge.java @@ -13,6 +13,6 @@ public class NativeBridge { public static MacOsLibrary INSTANCE = Native.load("xpipe_bridge", MacOsLibrary.class, Map.of()); - public abstract void setAppearance(NativeLong window, boolean dark); + public abstract void setAppearance(NativeLong window, boolean seamlessFrame, boolean dark); } } diff --git a/dist/base.gradle b/dist/base.gradle index df2df9c90..2cf7b31ff 100644 --- a/dist/base.gradle +++ b/dist/base.gradle @@ -234,10 +234,11 @@ if (org.gradle.internal.os.OperatingSystem.current().isWindows()) { def nativeLib = "$projectDir/native_lib/macos" def proj = "$nativeLib/xpipe_bridge.xcodeproj" exec { - commandLine 'xcodebuild', proj, '-scheme', 'xpipe_bridge', "CONFIGURATION_BUILD_DIR=${project.getLayout().getBuildDirectory().dir("native_lib")}", 'build' + environment 'CONFIGURATION_BUILD_DIR', project.getLayout().getBuildDirectory().dir("native_lib") + commandLine '/Users/crschnick/Downloads/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild', '-configuration', 'Release', '-project', proj, '-scheme', 'xpipe_bridge', '-derivedDataPath', project.getLayout().getBuildDirectory().dir("native_lib").get(), 'build' } copy { - from project.getLayout().getBuildDirectory().dir("native_lib").get().file('xpipe_bridge.dylib') + from project.getLayout().getBuildDirectory().dir("native_lib").get().dir('macos').file('libxpipe_bridge.dylib') into "$distDir/$app/Contents/runtime/Contents/Home/bin/" } }