diff --git a/bin/procInfoExample b/bin/procInfoExample new file mode 100755 index 0000000..ff12677 Binary files /dev/null and b/bin/procInfoExample differ diff --git a/libprocInfo.a b/libprocInfo.a index bec9634..42b1974 100644 Binary files a/libprocInfo.a and b/libprocInfo.a differ diff --git a/procInfoExample.xcodeproj/project.pbxproj b/procInfoExample.xcodeproj/project.pbxproj index dd5014e..3ffc77c 100644 --- a/procInfoExample.xcodeproj/project.pbxproj +++ b/procInfoExample.xcodeproj/project.pbxproj @@ -8,18 +8,19 @@ /* Begin PBXBuildFile section */ 7D6E87671F38F16500D6BD7C /* libbsm.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D6E87661F38F16500D6BD7C /* libbsm.tbd */; }; - 7D6E876D1F3934B100D6BD7C /* libprocInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D6E876C1F3934B100D6BD7C /* libprocInfo.a */; }; + 7D6E877A1F3BD42F00D6BD7C /* libprocInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D6E87791F3BD42F00D6BD7C /* libprocInfo.a */; }; 7DD0A9431F37F2F4000EA15D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DD0A9421F37F2F4000EA15D /* main.m */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - 7D83AA271EBA39AC001506F0 /* CopyFiles */ = { + 7D83AA271EBA39AC001506F0 /* Copy Files */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( ); + name = "Copy Files"; runOnlyForDeploymentPostprocessing = 1; }; /* End PBXCopyFilesBuildPhase section */ @@ -27,8 +28,8 @@ /* Begin PBXFileReference section */ 7D6E87631F38232800D6BD7C /* procInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = procInfo.h; path = procInfoExample/procInfo.h; sourceTree = SOURCE_ROOT; }; 7D6E87661F38F16500D6BD7C /* libbsm.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbsm.tbd; path = usr/lib/libbsm.tbd; sourceTree = SDKROOT; }; - 7D6E876C1F3934B100D6BD7C /* libprocInfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libprocInfo.a; sourceTree = ""; }; - 7D83AA291EBA39AC001506F0 /* procInfoExample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = procInfoExample; sourceTree = BUILT_PRODUCTS_DIR; }; + 7D6E87791F3BD42F00D6BD7C /* libprocInfo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libprocInfo.a; sourceTree = ""; }; + 7D6E877C1F3BD50F00D6BD7C /* procInfoExample */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = procInfoExample; path = bin/procInfoExample; sourceTree = ""; }; 7DD0A9421F37F2F4000EA15D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = procInfoExample/main.m; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ @@ -38,7 +39,7 @@ buildActionMask = 2147483647; files = ( 7D6E87671F38F16500D6BD7C /* libbsm.tbd in Frameworks */, - 7D6E876D1F3934B100D6BD7C /* libprocInfo.a in Frameworks */, + 7D6E877A1F3BD42F00D6BD7C /* libprocInfo.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -49,17 +50,17 @@ isa = PBXGroup; children = ( 7D83AA2B1EBA39AC001506F0 /* src */, - 7D83AA2A1EBA39AC001506F0 /* Products */, + 7D83AA2A1EBA39AC001506F0 /* bin */, 7D83AA331EBA7121001506F0 /* Frameworks */, ); sourceTree = ""; }; - 7D83AA2A1EBA39AC001506F0 /* Products */ = { + 7D83AA2A1EBA39AC001506F0 /* bin */ = { isa = PBXGroup; children = ( - 7D83AA291EBA39AC001506F0 /* procInfoExample */, + 7D6E877C1F3BD50F00D6BD7C /* procInfoExample */, ); - name = Products; + name = bin; sourceTree = ""; }; 7D83AA2B1EBA39AC001506F0 /* src */ = { @@ -76,7 +77,7 @@ isa = PBXGroup; children = ( 7D6E87661F38F16500D6BD7C /* libbsm.tbd */, - 7D6E876C1F3934B100D6BD7C /* libprocInfo.a */, + 7D6E87791F3BD42F00D6BD7C /* libprocInfo.a */, ); name = Frameworks; sourceTree = ""; @@ -90,7 +91,8 @@ buildPhases = ( 7D83AA251EBA39AC001506F0 /* Sources */, 7D83AA261EBA39AC001506F0 /* Frameworks */, - 7D83AA271EBA39AC001506F0 /* CopyFiles */, + 7D83AA271EBA39AC001506F0 /* Copy Files */, + 7D6E877B1F3BD4EE00D6BD7C /* ShellScript */, ); buildRules = ( ); @@ -98,7 +100,7 @@ ); name = procInfoExample; productName = procmonConsumer; - productReference = 7D83AA291EBA39AC001506F0 /* procInfoExample */; + productReference = 7D6E877D1F3BD53A00D6BD7C /* procInfoExample */; productType = "com.apple.product-type.tool"; }; /* End PBXNativeTarget section */ @@ -124,7 +126,7 @@ en, ); mainGroup = 7D83AA201EBA39AC001506F0; - productRefGroup = 7D83AA2A1EBA39AC001506F0 /* Products */; + productRefGroup = 7D83AA2A1EBA39AC001506F0 /* bin */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -133,6 +135,22 @@ }; /* End PBXProject section */ +/* Begin PBXShellScriptBuildPhase section */ + 7D6E877B1F3BD4EE00D6BD7C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#move binary into top-level bin/ folder\nmv $CODESIGNING_FOLDER_PATH $SRCROOT/bin/"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 7D83AA251EBA39AC001506F0 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -236,6 +254,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -248,6 +267,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = ""; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", diff --git a/procInfoExample/main.m b/procInfoExample/main.m old mode 100644 new mode 100755 index 744a8d4..f0c9857 --- a/procInfoExample/main.m +++ b/procInfoExample/main.m @@ -39,7 +39,7 @@ int main(int argc, const char * argv[]) } //dump process info - NSLog(@"process: %@", process); + NSLog(@"process:\n%@", process); //bail goto bail; @@ -56,7 +56,7 @@ int main(int argc, const char * argv[]) for(Process* process in [processInfo currentProcesses]) { //dump process info - NSLog(@"new process: %@", process); + NSLog(@"new process:\n%@", process); } //bail @@ -85,7 +85,7 @@ int main(int argc, const char * argv[]) if(process.type != EVENT_EXIT) { //print - NSLog(@"process start: %@\n", process); + NSLog(@"process start:\n%@\n", process); } //process exit event else