Bläddra i källkod

Add macOS functional implementation

Include Objective-C code that works.
master
TheoryOfNekomata 1 år sedan
förälder
incheckning
5e97e87b91
7 ändrade filer med 344 tillägg och 0 borttagningar
  1. +280
    -0
      cerberus.xcodeproj/project.pbxproj
  2. +7
    -0
      cerberus.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  3. +8
    -0
      cerberus.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  4. Binär
      cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate
  5. +14
    -0
      cerberus.xcodeproj/xcuserdata/theoryofnekomata.xcuserdatad/xcschemes/xcschememanagement.plist
  6. +16
    -0
      src/main.h
  7. +19
    -0
      src/main.m

+ 280
- 0
cerberus.xcodeproj/project.pbxproj Visa fil

@@ -0,0 +1,280 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {

/* Begin PBXBuildFile section */
C85AB75829684B4F00615620 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C85AB75729684B4F00615620 /* main.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
C85AB75229684B4F00615620 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
C85AB75429684B4F00615620 /* cerberus */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cerberus; sourceTree = BUILT_PRODUCTS_DIR; };
C85AB75729684B4F00615620 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
C85AB75E29684B7200615620 /* main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
C85AB75129684B4F00615620 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
C85AB74B29684B4F00615620 = {
isa = PBXGroup;
children = (
C85AB75629684B4F00615620 /* src */,
C85AB75529684B4F00615620 /* Products */,
);
sourceTree = "<group>";
};
C85AB75529684B4F00615620 /* Products */ = {
isa = PBXGroup;
children = (
C85AB75429684B4F00615620 /* cerberus */,
);
name = Products;
sourceTree = "<group>";
};
C85AB75629684B4F00615620 /* src */ = {
isa = PBXGroup;
children = (
C85AB75729684B4F00615620 /* main.m */,
C85AB75E29684B7200615620 /* main.h */,
);
path = src;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
C85AB75329684B4F00615620 /* cerberus */ = {
isa = PBXNativeTarget;
buildConfigurationList = C85AB75B29684B4F00615620 /* Build configuration list for PBXNativeTarget "cerberus" */;
buildPhases = (
C85AB75029684B4F00615620 /* Sources */,
C85AB75129684B4F00615620 /* Frameworks */,
C85AB75229684B4F00615620 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = cerberus;
productName = cerberus;
productReference = C85AB75429684B4F00615620 /* cerberus */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
C85AB74C29684B4F00615620 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastUpgradeCheck = 1420;
TargetAttributes = {
C85AB75329684B4F00615620 = {
CreatedOnToolsVersion = 14.2;
};
};
};
buildConfigurationList = C85AB74F29684B4F00615620 /* Build configuration list for PBXProject "cerberus" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = C85AB74B29684B4F00615620;
productRefGroup = C85AB75529684B4F00615620 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C85AB75329684B4F00615620 /* cerberus */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
C85AB75029684B4F00615620 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C85AB75829684B4F00615620 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
C85AB75929684B4F00615620 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
C85AB75A29684B4F00615620 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
};
name = Release;
};
C85AB75C29684B4F00615620 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
C85AB75D29684B4F00615620 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
C85AB74F29684B4F00615620 /* Build configuration list for PBXProject "cerberus" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C85AB75929684B4F00615620 /* Debug */,
C85AB75A29684B4F00615620 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C85AB75B29684B4F00615620 /* Build configuration list for PBXNativeTarget "cerberus" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C85AB75C29684B4F00615620 /* Debug */,
C85AB75D29684B4F00615620 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = C85AB74C29684B4F00615620 /* Project object */;
}

+ 7
- 0
cerberus.xcodeproj/project.xcworkspace/contents.xcworkspacedata Visa fil

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

+ 8
- 0
cerberus.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Visa fil

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

Binär
cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate Visa fil


+ 14
- 0
cerberus.xcodeproj/xcuserdata/theoryofnekomata.xcuserdatad/xcschemes/xcschememanagement.plist Visa fil

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>cerberus.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

+ 16
- 0
src/main.h Visa fil

@@ -0,0 +1,16 @@
//
// main.h
// cerberus
//
// Created by Allan Crisostomo on 2023-01-06.
//

#ifndef main_h
#define main_h

#define WINDOW_X 0
#define WINDOW_Y 0
#define WINDOW_WIDTH 350
#define WINDOW_HEIGHT 250

#endif /* main_h */

+ 19
- 0
src/main.m Visa fil

@@ -0,0 +1,19 @@
#import <Cocoa/Cocoa.h>
#import "main.h"

int main ()
{
@autoreleasepool{
[NSApplication sharedApplication];
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
id applicationName = [[NSProcessInfo processInfo] processName];
id window = [[NSWindow alloc] initWithContentRect:NSMakeRect(WINDOW_X, WINDOW_Y, WINDOW_WIDTH, WINDOW_HEIGHT)
styleMask:NSWindowStyleMaskTitled backing:NSBackingStoreBuffered defer:NO];
[window cascadeTopLeftFromPoint:NSMakePoint(20,20)];
[window setTitle: applicationName];
[window makeKeyAndOrderFront:nil];
[NSApp activateIgnoringOtherApps:YES];
[NSApp run];
}
return 0;
}

Laddar…
Avbryt
Spara