Fixed bug in "disable" logic
Improved handling for setting action scripts/binaries
This commit is contained in:
Patrick Wardle 2023-11-22 11:36:57 -10:00
parent fd2d903328
commit bd58fdf8cb
6 changed files with 73 additions and 34 deletions

View File

@ -22,7 +22,6 @@
CD2F800C24455333009C3D77 /* AboutWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD2F800924455333009C3D77 /* AboutWindow.xib */; }; CD2F800C24455333009C3D77 /* AboutWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD2F800924455333009C3D77 /* AboutWindow.xib */; };
CD2F800D24455333009C3D77 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2F800B24455333009C3D77 /* AboutWindowController.m */; }; CD2F800D24455333009C3D77 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD2F800B24455333009C3D77 /* AboutWindowController.m */; };
CD2F801724468A8C009C3D77 /* patrons.txt in Resources */ = {isa = PBXBuildFile; fileRef = CD2F801624468A8C009C3D77 /* patrons.txt */; }; CD2F801724468A8C009C3D77 /* patrons.txt in Resources */ = {isa = PBXBuildFile; fileRef = CD2F801624468A8C009C3D77 /* patrons.txt */; };
CD3052C72AF6D86600250347 /* OverSight Installer.app in Resources */ = {isa = PBXBuildFile; fileRef = CD3052C62AF6D86600250347 /* OverSight Installer.app */; };
CD6836682391DB6F00CF19C1 /* security.plist in Resources */ = {isa = PBXBuildFile; fileRef = CD6836672391DB6F00CF19C1 /* security.plist */; }; CD6836682391DB6F00CF19C1 /* security.plist in Resources */ = {isa = PBXBuildFile; fileRef = CD6836672391DB6F00CF19C1 /* security.plist */; };
CD8FD5D523BAE2D200EFE0FB /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD8FD5D323BAE2D100EFE0FB /* Preferences.xib */; }; CD8FD5D523BAE2D200EFE0FB /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD8FD5D323BAE2D100EFE0FB /* Preferences.xib */; };
CD8FD5D623BAE2D200EFE0FB /* PrefsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD8FD5D423BAE2D200EFE0FB /* PrefsWindowController.m */; }; CD8FD5D623BAE2D200EFE0FB /* PrefsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD8FD5D423BAE2D200EFE0FB /* PrefsWindowController.m */; };
@ -34,6 +33,7 @@
CDC60991263CBD36006D1332 /* AVMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC60990263CBD36006D1332 /* AVMonitor.m */; }; CDC60991263CBD36006D1332 /* AVMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC60990263CBD36006D1332 /* AVMonitor.m */; };
CDC60994263CBEE7006D1332 /* Client.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC60993263CBEE7006D1332 /* Client.m */; }; CDC60994263CBEE7006D1332 /* Client.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC60993263CBEE7006D1332 /* Client.m */; };
CDCBF0DE26499DFF001D9F9A /* Event.m in Sources */ = {isa = PBXBuildFile; fileRef = CDCBF0DD26499DFF001D9F9A /* Event.m */; }; CDCBF0DE26499DFF001D9F9A /* Event.m in Sources */ = {isa = PBXBuildFile; fileRef = CDCBF0DD26499DFF001D9F9A /* Event.m */; };
CDE4C11A2B0EAA7A001521CE /* OverSight Installer.app in Resources */ = {isa = PBXBuildFile; fileRef = CDE4C1192B0EAA7A001521CE /* OverSight Installer.app */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@ -76,7 +76,6 @@
CD2F800A24455333009C3D77 /* AboutWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutWindowController.h; sourceTree = "<group>"; }; CD2F800A24455333009C3D77 /* AboutWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutWindowController.h; sourceTree = "<group>"; };
CD2F800B24455333009C3D77 /* AboutWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutWindowController.m; sourceTree = "<group>"; }; CD2F800B24455333009C3D77 /* AboutWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutWindowController.m; sourceTree = "<group>"; };
CD2F801624468A8C009C3D77 /* patrons.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = patrons.txt; path = ../Shared/patrons.txt; sourceTree = "<group>"; }; CD2F801624468A8C009C3D77 /* patrons.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = patrons.txt; path = ../Shared/patrons.txt; sourceTree = "<group>"; };
CD3052C62AF6D86600250347 /* OverSight Installer.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = "OverSight Installer.app"; sourceTree = "<group>"; };
CD6836672391DB6F00CF19C1 /* security.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = security.plist; sourceTree = "<group>"; }; CD6836672391DB6F00CF19C1 /* security.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = security.plist; sourceTree = "<group>"; };
CD8FD5D223BAE2D100EFE0FB /* PrefsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefsWindowController.h; sourceTree = "<group>"; }; CD8FD5D223BAE2D100EFE0FB /* PrefsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefsWindowController.h; sourceTree = "<group>"; };
CD8FD5D323BAE2D100EFE0FB /* Preferences.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Preferences.xib; sourceTree = "<group>"; }; CD8FD5D323BAE2D100EFE0FB /* Preferences.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Preferences.xib; sourceTree = "<group>"; };
@ -96,6 +95,7 @@
CDC60993263CBEE7006D1332 /* Client.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = "<group>"; }; CDC60993263CBEE7006D1332 /* Client.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = "<group>"; };
CDCBF0DC26499DFF001D9F9A /* Event.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = "<group>"; }; CDCBF0DC26499DFF001D9F9A /* Event.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = "<group>"; };
CDCBF0DD26499DFF001D9F9A /* Event.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Event.m; sourceTree = "<group>"; }; CDCBF0DD26499DFF001D9F9A /* Event.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Event.m; sourceTree = "<group>"; };
CDE4C1192B0EAA7A001521CE /* OverSight Installer.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = "OverSight Installer.app"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -214,7 +214,7 @@
CDE09AF12919829000561CFF /* Uninstaller */ = { CDE09AF12919829000561CFF /* Uninstaller */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CD3052C62AF6D86600250347 /* OverSight Installer.app */, CDE4C1192B0EAA7A001521CE /* OverSight Installer.app */,
); );
path = Uninstaller; path = Uninstaller;
sourceTree = "<group>"; sourceTree = "<group>";
@ -292,7 +292,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
CD8FD5D523BAE2D200EFE0FB /* Preferences.xib in Resources */, CD8FD5D523BAE2D200EFE0FB /* Preferences.xib in Resources */,
CD3052C72AF6D86600250347 /* OverSight Installer.app in Resources */, CDE4C11A2B0EAA7A001521CE /* OverSight Installer.app in Resources */,
CD6836682391DB6F00CF19C1 /* security.plist in Resources */, CD6836682391DB6F00CF19C1 /* security.plist in Resources */,
CD2F800C24455333009C3D77 /* AboutWindow.xib in Resources */, CD2F800C24455333009C3D77 /* AboutWindow.xib in Resources */,
7D16D6951F64E43300DB3161 /* UpdateWindow.xib in Resources */, 7D16D6951F64E43300DB3161 /* UpdateWindow.xib in Resources */,
@ -465,7 +465,7 @@
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO;
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.0; CURRENT_PROJECT_VERSION = 2.2.2;
DEVELOPMENT_TEAM = VBG97UB4TA; DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
@ -476,7 +476,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)) @executable_path/../Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)) @executable_path/../Frameworks";
LIBRARY_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.0; MARKETING_VERSION = 2.2.2;
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight"; PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight";
PRODUCT_NAME = OverSight; PRODUCT_NAME = OverSight;
@ -491,7 +491,7 @@
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO;
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.0; CURRENT_PROJECT_VERSION = 2.2.2;
DEVELOPMENT_TEAM = VBG97UB4TA; DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
@ -502,7 +502,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)) @executable_path/../Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)) @executable_path/../Frameworks";
LIBRARY_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.0; MARKETING_VERSION = 2.2.2;
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight"; PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight";
PRODUCT_NAME = OverSight; PRODUCT_NAME = OverSight;

View File

@ -19,7 +19,6 @@
#import "Event.h" #import "Event.h"
#import "LogMonitor.h" #import "LogMonitor.h"
@interface AVMonitor : NSObject <UNUserNotificationCenterDelegate> @interface AVMonitor : NSObject <UNUserNotificationCenterDelegate>
//log monitor //log monitor
@ -67,6 +66,9 @@
//last alert (default) interaction //last alert (default) interaction
@property(nonatomic, retain)NSDate* lastNotificationDefaultAction; @property(nonatomic, retain)NSDate* lastNotificationDefaultAction;
//listener queue
@property(nonatomic, retain)dispatch_queue_t eventQueue;
/* METHODS */ /* METHODS */
//start //start

View File

@ -62,6 +62,9 @@ extern os_log_t logHandle;
//init video listeners //init video listeners
self.cameraListeners = [NSMutableDictionary dictionary]; self.cameraListeners = [NSMutableDictionary dictionary];
//init event queue
self.eventQueue = dispatch_queue_create([[NSString stringWithFormat:@"%s.eventQueue", BUNDLE_ID] UTF8String], DISPATCH_QUEUE_CONCURRENT);
//set up delegate //set up delegate
UNUserNotificationCenter.currentNotificationCenter.delegate = self; UNUserNotificationCenter.currentNotificationCenter.delegate = self;
@ -789,7 +792,7 @@ extern os_log_t logHandle;
}; };
//add property listener for audio changes //add property listener for audio changes
status = AudioObjectAddPropertyListenerBlock(deviceID, &propertyStruct, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), listenerBlock); status = AudioObjectAddPropertyListenerBlock(deviceID, &propertyStruct, self.eventQueue, listenerBlock);
if(noErr != status) if(noErr != status)
{ {
//err msg //err msg
@ -803,7 +806,7 @@ extern os_log_t logHandle;
self.audioListeners[device.uniqueID] = listenerBlock; self.audioListeners[device.uniqueID] = listenerBlock;
//dbg msg //dbg msg
os_log_debug(logHandle, "monitoring %{public}@ for audio changes", device.localizedName); os_log_debug(logHandle, "monitoring %{public}@ (uuid: %{public}@ / %x) for audio changes", device.localizedName, device.uniqueID, deviceID);
//happy //happy
bRegistered = YES; bRegistered = YES;
@ -922,7 +925,7 @@ bail:
}; };
//register (add) property block listener //register (add) property block listener
status = CMIOObjectAddPropertyListenerBlock(deviceID, &propertyStruct, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), listenerBlock); status = CMIOObjectAddPropertyListenerBlock(deviceID, &propertyStruct, self.eventQueue, listenerBlock);
if(noErr != status) if(noErr != status)
{ {
//err msg //err msg
@ -936,7 +939,7 @@ bail:
self.cameraListeners[device.uniqueID] = listenerBlock; self.cameraListeners[device.uniqueID] = listenerBlock;
//dbg msg //dbg msg
os_log_debug(logHandle, "monitoring %{public}@ for video changes", device.localizedName); os_log_debug(logHandle, "monitoring %{public}@ (uuid: %{public}@ / %x) for video changes", device.localizedName, device.uniqueID, deviceID);
//happy //happy
bRegistered = YES; bRegistered = YES;
@ -1023,7 +1026,7 @@ bail:
builtInMic = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; builtInMic = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
//dbg msg //dbg msg
os_log_debug(logHandle, "Apple Mic not found, defaulting to default device: %{public}@/%{public}@)", builtInMic.manufacturer, builtInMic.localizedName); os_log_debug(logHandle, "Apple Mic not found, defaulting to default device: %{public}@/%{public}@", builtInMic.manufacturer, builtInMic.localizedName);
} }
return builtInMic; return builtInMic;
@ -1046,7 +1049,8 @@ bail:
{ {
//is built in camera? //is built in camera?
if( (YES == [currentCamera.uniqueID isEqualToString:@"FaceTime HD Camera"]) || if( (YES == [currentCamera.uniqueID isEqualToString:@"FaceTime HD Camera"]) ||
(YES == [currentCamera.localizedName isEqualToString:@"FaceTime-HD-camera"]) ) (YES == [currentCamera.localizedName isEqualToString:@"FaceTime-HD-camera"]) ||
(YES == [currentCamera.localizedName isEqualToString:@"FaceTime HD Camera"]) )
{ {
//found //found
builtInCamera = currentCamera; builtInCamera = currentCamera;
@ -1215,6 +1219,20 @@ bail:
//extract its last event //extract its last event
deviceLastEvent = self.deviceEvents[deviceID]; deviceLastEvent = self.deviceEvents[deviceID];
//disabled?
// really shouldn't ever get here, but can't hurt to check
if(YES == [NSUserDefaults.standardUserDefaults boolForKey:PREF_IS_DISABLED])
{
//set result
result = NOTIFICATION_SPURIOUS;
//dbg msg
os_log_debug(logHandle, "disable is set, so ignoring event");
//bail
goto bail;
}
//inactive alerting off? //inactive alerting off?
// ignore if event is an inactive/off // ignore if event is an inactive/off
if( (NSControlStateValueOff == event.state) && if( (NSControlStateValueOff == event.state) &&
@ -1380,14 +1398,15 @@ bail:
{ {
//deliver //deliver
[self showNotification:event]; [self showNotification:event];
}
//execute user-specified action? //should (also) exec user action?
if(YES == [NSUserDefaults.standardUserDefaults boolForKey:PREF_EXECUTE_ACTION]) if( (NOTIFICATION_ERROR != result) &&
(NOTIFICATION_SPURIOUS != result) &&
(0 != [[NSUserDefaults.standardUserDefaults objectForKey:PREF_EXECUTE_PATH] length]) )
{ {
//exec //exec
[self executeUserAction:event]; [self executeUserAction:event];
} }
}
return; return;
} }
@ -1590,7 +1609,7 @@ bail:
propertyStruct.mElement = kAudioObjectPropertyElementMaster; propertyStruct.mElement = kAudioObjectPropertyElementMaster;
//remove //remove
status = AudioObjectRemovePropertyListenerBlock(deviceID, &propertyStruct, dispatch_get_main_queue(), self.audioListeners[device.uniqueID]); status = AudioObjectRemovePropertyListenerBlock(deviceID, &propertyStruct, self.eventQueue, self.audioListeners[device.uniqueID]);
if(noErr != status) if(noErr != status)
{ {
//err msg //err msg
@ -1600,6 +1619,9 @@ bail:
goto bail; goto bail;
} }
//dbg msg
os_log_debug(logHandle, "stopped monitoring %{public}@ (uuid: %{public}@ / %x) for audio changes", device.localizedName, device.uniqueID, deviceID);
//unset listener block //unset listener block
self.audioListeners[device.uniqueID] = nil; self.audioListeners[device.uniqueID] = nil;
@ -1633,7 +1655,7 @@ bail:
propertyStruct.mElement = kAudioObjectPropertyElementMaster; propertyStruct.mElement = kAudioObjectPropertyElementMaster;
//remove //remove
status = CMIOObjectRemovePropertyListenerBlock(deviceID, &propertyStruct, dispatch_get_main_queue(), self.cameraListeners[device.uniqueID]); status = CMIOObjectRemovePropertyListenerBlock(deviceID, &propertyStruct, self.eventQueue, self.cameraListeners[device.uniqueID]);
if(noErr != status) if(noErr != status)
{ {
//err msg //err msg
@ -1643,6 +1665,9 @@ bail:
goto bail; goto bail;
} }
//dbg msg
os_log_debug(logHandle, "stopped monitoring %{public}@ (uuid: %{public}@ / %x) for video changes", device.localizedName, device.uniqueID, deviceID);
//unset listener block //unset listener block
self.cameraListeners[device.uniqueID] = nil; self.cameraListeners[device.uniqueID] = nil;

View File

@ -27,7 +27,7 @@
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5"> <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="196" y="240" width="600" height="426"/> <rect key="contentRect" x="196" y="240" width="600" height="426"/>
<rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/> <rect key="screenRect" x="0.0" y="0.0" width="3440" height="1415"/>
<view key="contentView" wantsLayer="YES" id="se5-gp-TjO"> <view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="600" height="426"/> <rect key="frame" x="0.0" y="0.0" width="600" height="426"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

View File

@ -466,6 +466,9 @@ bail:
{ {
//uncheck //uncheck
self.executePathButton.state = NSControlStateValueOff; self.executePathButton.state = NSControlStateValueOff;
//unset
[NSUserDefaults.standardUserDefaults setBool:NSControlStateValueOff forKey:PREF_EXECUTE_ACTION];
} }
//bail //bail
@ -478,6 +481,15 @@ bail:
//ensure its executable //ensure its executable
execTask(CHMOD, @[@"+x", panel.URL.path], YES, NO); execTask(CHMOD, @[@"+x", panel.URL.path], YES, NO);
//enable
self.executePath.enabled = NSControlStateValueOn;
//check button as well
self.executePathButton.state = NSControlStateValueOn;
//save execute state
[NSUserDefaults.standardUserDefaults setBool:NSControlStateValueOn forKey:PREF_EXECUTE_ACTION];
//save path & sync //save path & sync
[NSUserDefaults.standardUserDefaults setObject:self.executePath.stringValue forKey:PREF_EXECUTE_PATH]; [NSUserDefaults.standardUserDefaults setObject:self.executePath.stringValue forKey:PREF_EXECUTE_PATH];
[NSUserDefaults.standardUserDefaults synchronize]; [NSUserDefaults.standardUserDefaults synchronize];

View File

@ -329,7 +329,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "#Note: To build uninstaller for app (menu)\n# 0. Delete this script and Installer.app from App's on-disk folder \n# 1. Build Installer\n# 2. Copy into App \"Uninstaller\" folder (& proj if needed)\n# 3. Re-add script, and then build (archive) for deployment\n\n#archive\n# copy in main application \nif [[ $BUILT_PRODUCTS_DIR = *\"ArchiveIntermediates\"* ]]; then\n cp -R -f \"$PROJECT_TEMP_ROOT/UninstalledProducts/macosx/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n \n#normal build\n# delete and copy in main application \nelse\n\nrm -rf \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources/OverSight.app\"\ncp -R -f \"$BUILT_PRODUCTS_DIR/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n\nfi\n\n\n"; shellScript = "#Note: To build uninstaller for app (menu)\n# 0. Delete this script and Installer.app from App's on-disk folder \n# 1. Build Installer\n# 2. Copy into App \"Uninstaller\" folder (& proj if needed)\n# 3. Re-add script, and then build (archive) for deployment\n\n#archive\n# copy in main application \nif [[ $BUILT_PRODUCTS_DIR = *\"ArchiveIntermediates\"* ]]; then\n cp -R -f \"$PROJECT_TEMP_ROOT/UninstalledProducts/macosx/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n \n#normal build\n# delete and copy in main application \nelse\n\nrm -rf \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources/OverSight.app\"\ncp -R -f \"$BUILT_PRODUCTS_DIR/OverSight.app\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Resources\"\n\nfi\n\n";
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -380,14 +380,14 @@
CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.2.0; CURRENT_PROJECT_VERSION = 2.2.2;
DEVELOPMENT_TEAM = VBG97UB4TA; DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
INFOPLIST_FILE = Helper/Info.plist; INFOPLIST_FILE = Helper/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.0; MARKETING_VERSION = 2.2.2;
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = ""; OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
@ -415,14 +415,14 @@
CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.2.0; CURRENT_PROJECT_VERSION = 2.2.2;
DEVELOPMENT_TEAM = VBG97UB4TA; DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO;
INFOPLIST_FILE = Helper/Info.plist; INFOPLIST_FILE = Helper/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.0; MARKETING_VERSION = 2.2.2;
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = ""; OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
@ -451,7 +451,7 @@
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.0; CURRENT_PROJECT_VERSION = 2.2.2;
DEVELOPMENT_TEAM = VBG97UB4TA; DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
@ -463,7 +463,7 @@
); );
LIBRARY_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.0; MARKETING_VERSION = 2.2.2;
OTHER_CODE_SIGN_FLAGS = ""; OTHER_CODE_SIGN_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight.installer"; PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight.installer";
PRODUCT_NAME = "OverSight Installer"; PRODUCT_NAME = "OverSight Installer";
@ -480,7 +480,7 @@
CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.2.0; CURRENT_PROJECT_VERSION = 2.2.2;
DEVELOPMENT_TEAM = VBG97UB4TA; DEVELOPMENT_TEAM = VBG97UB4TA;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
@ -492,7 +492,7 @@
); );
LIBRARY_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 2.2.0; MARKETING_VERSION = 2.2.2;
OTHER_CODE_SIGN_FLAGS = ""; OTHER_CODE_SIGN_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight.installer"; PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.oversight.installer";
PRODUCT_NAME = "OverSight Installer"; PRODUCT_NAME = "OverSight Installer";