this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Adding a basic structure of crash.app (application crash report)

+268
+1
CMakeLists.txt
··· 103 103 install(FILES etc/dylib.conf DESTINATION /etc/darling) 104 104 add_subdirectory(src/macbinary) 105 105 add_subdirectory(src/libmacarchive) 106 + add_subdirectory(src/crash) 106 107 add_subdirectory(tests) 107 108 endif(NOT DEFINED SUFFIX OR SUFFIX STREQUAL "64") 108 109
+39
src/crash/AppController.h
··· 1 + /* 2 + Project: crash 3 + 4 + Author: lubos 5 + 6 + Created: 2012-11-06 15:43:05 +0100 by lubos 7 + 8 + Application Controller 9 + */ 10 + 11 + #ifndef _PCAPPPROJ_APPCONTROLLER_H 12 + #define _PCAPPPROJ_APPCONTROLLER_H 13 + 14 + #import <AppKit/AppKit.h> 15 + // Uncomment if your application is Renaissance-based 16 + //#import <Renaissance/Renaissance.h> 17 + 18 + @interface AppController : NSObject 19 + { 20 + } 21 + 22 + + (void) initialize; 23 + 24 + - (id) init; 25 + - (void) dealloc; 26 + 27 + - (void) awakeFromNib; 28 + 29 + - (void) applicationDidFinishLaunching: (NSNotification *)aNotif; 30 + - (BOOL) applicationShouldTerminate: (id)sender; 31 + - (void) applicationWillTerminate: (NSNotification *)aNotif; 32 + - (BOOL) application: (NSApplication *)application 33 + openFile: (NSString *)fileName; 34 + 35 + - (void) showPrefPanel: (id)sender; 36 + 37 + @end 38 + 39 + #endif
+73
src/crash/AppController.m
··· 1 + /* 2 + Project: crash 3 + 4 + Author: lubos 5 + 6 + Created: 2012-11-06 15:43:05 +0100 by lubos 7 + 8 + Application Controller 9 + */ 10 + 11 + #import "AppController.h" 12 + 13 + @implementation AppController 14 + 15 + + (void) initialize 16 + { 17 + NSMutableDictionary *defaults = [NSMutableDictionary dictionary]; 18 + 19 + /* 20 + * Register your app's defaults here by adding objects to the 21 + * dictionary, eg 22 + * 23 + * [defaults setObject:anObject forKey:keyForThatObject]; 24 + * 25 + */ 26 + 27 + [[NSUserDefaults standardUserDefaults] registerDefaults: defaults]; 28 + [[NSUserDefaults standardUserDefaults] synchronize]; 29 + } 30 + 31 + - (id) init 32 + { 33 + if ((self = [super init])) 34 + { 35 + } 36 + return self; 37 + } 38 + 39 + - (void) dealloc 40 + { 41 + [super dealloc]; 42 + } 43 + 44 + - (void) awakeFromNib 45 + { 46 + } 47 + 48 + - (void) applicationDidFinishLaunching: (NSNotification *)aNotif 49 + { 50 + // Uncomment if your application is Renaissance-based 51 + // [NSBundle loadGSMarkupNamed: @"Main" owner: self]; 52 + } 53 + 54 + - (BOOL) applicationShouldTerminate: (id)sender 55 + { 56 + return YES; 57 + } 58 + 59 + - (void) applicationWillTerminate: (NSNotification *)aNotif 60 + { 61 + } 62 + 63 + - (BOOL) application: (NSApplication *)application 64 + openFile: (NSString *)fileName 65 + { 66 + return NO; 67 + } 68 + 69 + - (void) showPrefPanel: (id)sender 70 + { 71 + } 72 + 73 + @end
+31
src/crash/CMakeLists.txt
··· 1 + project(crash) 2 + 3 + cmake_minimum_required(VERSION 2.4.0) 4 + if(COMMAND cmake_policy) 5 + cmake_policy(SET CMP0003 NEW) 6 + endif(COMMAND cmake_policy) 7 + 8 + #if (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") 9 + # message(FATAL_ERROR "Clang is the only supported compiler.") 10 + #endif (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") 11 + 12 + 13 + set(crash_SRCS 14 + AppController.m 15 + CrashManager.m 16 + crash_main.m 17 + ) 18 + 19 + add_executable(crash ${crash_SRCS}) 20 + target_link_libraries(crash -lgnustep-base -lgnustep-gui) 21 + 22 + install(TARGETS crash DESTINATION "libexec/darling/crash.app/") 23 + 24 + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/Resources/Main.gsmarkup" 25 + "${CMAKE_CURRENT_SOURCE_DIR}/Resources/Info-gnustep.plist" 26 + DESTINATION "libexec/darling/crash.app/Resources/") 27 + 28 + FILE( GLOB gorm ${CMAKE_CURRENT_SOURCE_DIR}/Resources/crash.gorm/* ) 29 + install(FILES ${gorm} DESTINATION 30 + "libexec/darling/crash.app/Resources/crash.gorm/") 31 +
+15
src/crash/CrashManager.h
··· 1 + #include <AppKit/AppKit.h> 2 + 3 + @interface CrashManager : NSObject 4 + { 5 + id descriptionLabel; 6 + NSString* executablePath; 7 + NSString* commandLine; 8 + NSString* shortDescription; 9 + NSString* fullLog; 10 + } 11 + - (void) close: (id)sender; 12 + - (void) debugInfo: (id)sender; 13 + - (void) reopen: (id)sender; 14 + - (id) init; 15 + @end
+53
src/crash/CrashManager.m
··· 1 + #include <AppKit/AppKit.h> 2 + #include <Foundation/NSProcessInfo.h> 3 + #include <Foundation/NSArray.h> 4 + #include <Foundation/NSString.h> 5 + #include "CrashManager.h" 6 + 7 + @implementation CrashManager 8 + 9 + 10 + - (void) close: (id)sender 11 + { 12 + [NSApp terminate: nil]; 13 + } 14 + 15 + 16 + - (void) debugInfo: (id)sender 17 + { 18 + /* insert your code here */ 19 + } 20 + 21 + 22 + - (void) reopen: (id)sender 23 + { 24 + /* insert your code here */ 25 + } 26 + 27 + - (id) init 28 + { 29 + self = [super init]; 30 + 31 + NSArray* args = [[NSProcessInfo processInfo] arguments]; 32 + if ([args count] == 2) 33 + { 34 + NSString* dumpPath = [args objectAtIndex: 1]; 35 + NSString* text = [NSString stringWithContentsOfFile:dumpPath encoding:NSUTF8StringEncoding error:NULL]; 36 + NSArray* elems = [text componentsSeparatedByString:@"---CUT---"]; 37 + 38 + if ([elems count] >= 4) 39 + { 40 + executablePath = [elems objectAtIndex:0]; 41 + commandLine = [elems objectAtIndex:1]; 42 + shortDescription = [elems objectAtIndex:2]; 43 + fullLog = [elems objectAtIndex:3]; 44 + } 45 + 46 + [elems release]; 47 + [text release]; 48 + } 49 + 50 + return self; 51 + } 52 + 53 + @end
+13
src/crash/Resources/Info-gnustep.plist
··· 1 + { 2 + ApplicationDescription = "Forced quit dialog"; 3 + ApplicationName = crash; 4 + ApplicationRelease = "0.1"; 5 + Copyright = "Copyright (C) 2012 Lubos Dolezel"; 6 + CopyrightDescription = "Released under GNU GPLv3+"; 7 + FullVersionID = "0.1"; 8 + GSMainMarkupFile = ""; 9 + NSExecutable = crash; 10 + NSMainNibFile = "crash.gorm"; 11 + NSPrincipalClass = NSApplication; 12 + NSRole = Application; 13 + }
+8
src/crash/Resources/Main.gsmarkup
··· 1 + <?xml version="1.0"?> 2 + <!DOCTYPE gsmarkup> 3 + <gsmarkup> 4 + 5 + <objects> 6 + <window/> 7 + </objects> 8 + </gsmarkup>
src/crash/Resources/crash.gorm/Warning.png

This is a binary file and will not be displayed.

+28
src/crash/Resources/crash.gorm/data.classes
··· 1 + { 2 + "## Comment" = "Do NOT change this file, Gorm maintains it"; 3 + CrashManager = { 4 + Actions = ( 5 + "close:", 6 + "debugInfo:", 7 + "reopen:" 8 + ); 9 + Outlets = ( 10 + descriptionLabel 11 + ); 12 + Super = NSObject; 13 + }; 14 + FirstResponder = { 15 + Actions = ( 16 + "debugInfo:", 17 + "reopen:" 18 + ); 19 + Super = NSObject; 20 + }; 21 + NewClass1 = { 22 + Actions = ( 23 + ); 24 + Outlets = ( 25 + ); 26 + Super = NSWindow; 27 + }; 28 + }
src/crash/Resources/crash.gorm/data.info

This is a binary file and will not be displayed.

src/crash/Resources/crash.gorm/objects.gorm

This is a binary file and will not be displayed.

+7
src/crash/crash_main.m
··· 1 + #import <AppKit/AppKit.h> 2 + 3 + int main(int argc, const char *argv[]) 4 + { 5 + return NSApplicationMain (argc, argv); 6 + } 7 +