diff --git a/build_mac_installer.sh b/build_mac_installer.sh index b2d98ad9..021562dd 100755 --- a/build_mac_installer.sh +++ b/build_mac_installer.sh @@ -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 diff --git a/clean_build.sh b/clean_build.sh index f5a99807..290d570e 100755 --- a/clean_build.sh +++ b/clean_build.sh @@ -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" diff --git a/src/lib/platform/OSXDragSimulator.m b/src/lib/platform/OSXDragSimulator.m index 5112ad91..affed383 100644 --- a/src/lib/platform/OSXDragSimulator.m +++ b/src/lib/platform/OSXDragSimulator.m @@ -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: @""]; diff --git a/src/lib/platform/OSXMediaKeySimulator.m b/src/lib/platform/OSXMediaKeySimulator.m index 08d43ef8..5aacd107 100644 --- a/src/lib/platform/OSXMediaKeySimulator.m +++ b/src/lib/platform/OSXMediaKeySimulator.m @@ -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) diff --git a/src/lib/platform/OSXMediaKeySupport.m b/src/lib/platform/OSXMediaKeySupport.m index e73a0914..9c9dbc31 100644 --- a/src/lib/platform/OSXMediaKeySupport.m +++ b/src/lib/platform/OSXMediaKeySupport.m @@ -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) diff --git a/src/lib/platform/OSXPasteboardPeeker.m b/src/lib/platform/OSXPasteboardPeeker.m index cf61046e..ab39e262 100644 --- a/src/lib/platform/OSXPasteboardPeeker.m +++ b/src/lib/platform/OSXPasteboardPeeker.m @@ -21,7 +21,7 @@ CFStringRef getDraggedFileURL() { - NSString* pbName = NSPasteboardNameDrag; + NSString* pbName = NSDragPboard; NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName]; NSMutableString* string;