This commit is contained in:
crschnick 2024-07-16 15:28:36 +00:00
parent 63a579cf05
commit 215b461a65
4 changed files with 8 additions and 4 deletions

3
.gitignore vendored
View file

@ -19,3 +19,6 @@ ComponentsGenerated.wxs
!dist/javafx/**/lib !dist/javafx/**/lib
!dist/javafx/**/bin !dist/javafx/**/bin
dev.properties dev.properties
xcuserdata/
*.dylib
project.xcworkspace

View file

@ -33,6 +33,6 @@ public class NativeMacOsWindowControl {
return; return;
} }
NativeBridge.MacOsLibrary.INSTANCE.setAppearance(new NativeLong(nsWindow), darkMode); NativeBridge.MacOsLibrary.INSTANCE.setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode);
} }
} }

View file

@ -13,6 +13,6 @@ public class NativeBridge {
public static MacOsLibrary INSTANCE = Native.load("xpipe_bridge", MacOsLibrary.class, Map.of()); 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);
} }
} }

5
dist/base.gradle vendored
View file

@ -234,10 +234,11 @@ if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
def nativeLib = "$projectDir/native_lib/macos" def nativeLib = "$projectDir/native_lib/macos"
def proj = "$nativeLib/xpipe_bridge.xcodeproj" def proj = "$nativeLib/xpipe_bridge.xcodeproj"
exec { 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 { 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/" into "$distDir/$app/Contents/runtime/Contents/Home/bin/"
} }
} }