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:
walker0643 2018-02-15 01:17:18 -05:00
parent a8d0dfdacc
commit f5b5258f4a
6 changed files with 15 additions and 12 deletions

View File

@ -3,13 +3,15 @@
# change this to rename the installer package # change this to rename the installer package
B_DMG="Barrier-v1.9.dmg" 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) 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 B_REREF_SCRIPT=$(pwd)/mac_reref_dylibs.sh
if [ ! -x $B_REREF_SCRIPT ]; then if [ ! -x $B_REREF_SCRIPT ]; then
echo Missing script: $B_REREF_SCRIPT echo Missing script: $B_REREF_SCRIPT

View File

@ -13,9 +13,10 @@ if [ "$(uname)" = "Darwin" ]; then
# OSX needs a lot of extra help, poor thing # OSX needs a lot of extra help, poor thing
# run the osx_environment.sh script to fix paths # run the osx_environment.sh script to fix paths
[ -r ../osx_environment.sh ] && source ../osx_environment.sh [ -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 fi
B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$B_BUILD_TYPE $B_CMAKE_FLAGS" 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 $B_CMAKE $B_CMAKE_FLAGS .. || exit 1
make || exit 1 make || exit 1
echo "Build completed successfully" echo "Build completed successfully"

View File

@ -35,7 +35,7 @@ runCocoaApp()
NSWindow* window = [[NSWindow alloc] NSWindow* window = [[NSWindow alloc]
initWithContentRect: NSMakeRect(0, 0, 3, 3) initWithContentRect: NSMakeRect(0, 0, 3, 3)
styleMask: NSWindowStyleMaskBorderless styleMask: NSBorderlessWindowMask
backing: NSBackingStoreBuffered backing: NSBackingStoreBuffered
defer: NO]; defer: NO];
[window setTitle: @""]; [window setTitle: @""];

View File

@ -71,14 +71,14 @@ bool
fakeNativeMediaKey(KeyID id) fakeNativeMediaKey(KeyID id)
{ {
NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
data2:-1]; data2:-1];
CGEventRef downEvent = [downRef CGEvent]; CGEventRef downEvent = [downRef CGEvent];
NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)

View File

@ -133,14 +133,14 @@ bool
fakeNativeMediaKey(KeyID id) fakeNativeMediaKey(KeyID id)
{ {
NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
data2:-1]; data2:-1];
CGEventRef downEvent = [downRef CGEvent]; CGEventRef downEvent = [downRef CGEvent];
NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)

View File

@ -21,7 +21,7 @@
CFStringRef CFStringRef
getDraggedFileURL() getDraggedFileURL()
{ {
NSString* pbName = NSPasteboardNameDrag; NSString* pbName = NSDragPboard;
NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName]; NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName];
NSMutableString* string; NSMutableString* string;