mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-26 13:16:18 +03:00
revert some of the "deprecated" fixes so that older OSX versions are still supported. my thanks to Cpuroast for additional macos testing.
This commit is contained in:
parent
a8d0dfdacc
commit
f5b5258f4a
@ -3,13 +3,15 @@
|
||||
# change this to rename the installer package
|
||||
B_DMG="Barrier-v1.9.dmg"
|
||||
|
||||
# sanity check so we don't distribute packages full of debug symbols
|
||||
echo Make sure you have built the Release version!!
|
||||
echo Press Enter to continue or Ctrl+C to abort
|
||||
read
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
# sanity check so we don't distribute packages full of debug symbols
|
||||
B_BUILD_TYPE=$(grep -E ^CMAKE_BUILD_TYPE build/CMakeCache.txt | cut -d= -f2)
|
||||
if [ "$B_BUILD_TYPE" != "Release" ]; then
|
||||
echo Will only build installers for Release builds
|
||||
exit 1
|
||||
fi
|
||||
|
||||
B_REREF_SCRIPT=$(pwd)/mac_reref_dylibs.sh
|
||||
if [ ! -x $B_REREF_SCRIPT ]; then
|
||||
echo Missing script: $B_REREF_SCRIPT
|
||||
|
@ -13,9 +13,10 @@ if [ "$(uname)" = "Darwin" ]; then
|
||||
# OSX needs a lot of extra help, poor thing
|
||||
# run the osx_environment.sh script to fix paths
|
||||
[ -r ../osx_environment.sh ] && source ../osx_environment.sh
|
||||
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk $B_CMAKE_FLAGS"
|
||||
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
||||
fi
|
||||
B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$B_BUILD_TYPE $B_CMAKE_FLAGS"
|
||||
echo Starting Barrier $B_BUILD_TYPE build...
|
||||
$B_CMAKE $B_CMAKE_FLAGS .. || exit 1
|
||||
make || exit 1
|
||||
echo "Build completed successfully"
|
||||
|
@ -35,7 +35,7 @@ runCocoaApp()
|
||||
|
||||
NSWindow* window = [[NSWindow alloc]
|
||||
initWithContentRect: NSMakeRect(0, 0, 3, 3)
|
||||
styleMask: NSWindowStyleMaskBorderless
|
||||
styleMask: NSBorderlessWindowMask
|
||||
backing: NSBackingStoreBuffered
|
||||
defer: NO];
|
||||
[window setTitle: @""];
|
||||
|
@ -71,14 +71,14 @@ bool
|
||||
fakeNativeMediaKey(KeyID id)
|
||||
{
|
||||
|
||||
NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
|
||||
NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined
|
||||
location: NSMakePoint(0, 0) modifierFlags:0xa00
|
||||
timestamp:0 windowNumber:0 context:0 subtype:8
|
||||
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
|
||||
data2:-1];
|
||||
CGEventRef downEvent = [downRef CGEvent];
|
||||
|
||||
NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
|
||||
NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined
|
||||
location: NSMakePoint(0, 0) modifierFlags:0xa00
|
||||
timestamp:0 windowNumber:0 context:0 subtype:8
|
||||
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)
|
||||
|
@ -133,14 +133,14 @@ bool
|
||||
fakeNativeMediaKey(KeyID id)
|
||||
{
|
||||
|
||||
NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
|
||||
NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined
|
||||
location: NSMakePoint(0, 0) modifierFlags:0xa00
|
||||
timestamp:0 windowNumber:0 context:0 subtype:8
|
||||
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
|
||||
data2:-1];
|
||||
CGEventRef downEvent = [downRef CGEvent];
|
||||
|
||||
NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
|
||||
NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined
|
||||
location: NSMakePoint(0, 0) modifierFlags:0xa00
|
||||
timestamp:0 windowNumber:0 context:0 subtype:8
|
||||
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)
|
||||
|
@ -21,7 +21,7 @@
|
||||
CFStringRef
|
||||
getDraggedFileURL()
|
||||
{
|
||||
NSString* pbName = NSPasteboardNameDrag;
|
||||
NSString* pbName = NSDragPboard;
|
||||
NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName];
|
||||
|
||||
NSMutableString* string;
|
||||
|
Loading…
Reference in New Issue
Block a user