From c7248df922a22890b150d4b022481a83b55a554d Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Fri, 6 Jan 2023 23:48:03 +0800 Subject: [PATCH] Remove xcodeproj userdata Don't check out dynamic file for Xcode state. --- .gitignore | 3 ++- CMakeLists.txt | 6 ++--- .../UserInterfaceState.xcuserstate | Bin 19854 -> 0 bytes src/main.m | 22 ++++-------------- 4 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/.gitignore b/.gitignore index 72823be..4860d33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea/ cmake-build-debug/ -.DS_Store \ No newline at end of file +.DS_Store +*.xcodeproj/project.xcworkspace/xcuserdata/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9316a1b..4efe54d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.24) -project(cerberus C) set(CMAKE_C_STANDARD 11) +project(cerberus C) if (WIN32) # TODO set arch on target instead of generator @@ -17,9 +17,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # does not work, use Xcode to build # TODO use makefile instead of cmake? add_definitions(-DMACOS) - add_executable(cerberus src/main.h src/main.m) - include_directories(/usr/include) - link_directories() + add_executable(cerberus MACOSX_BUNDLE src/main.h src/main.m) elseif(UNIX) add_definitions(-DUNIX) endif () diff --git a/cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate b/cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 25a5f3ffad53fac591e5c47d50d4c74bfc9800c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19854 zcmeHucU)6f`}jF`0Ln-LVI-^sR3MN*LdXEBBn(9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|{s>7-eR3E86RvlM;ulh}ON_ARwMjfIKQ;$|hsH4MV7!x?EkWo~53n zo~v$Bx2oIK3)CIzF7;ydO7&&x%hjvYSE+ANZ&2T=zC+!o9#HR8?^fTh{+Ie8_4Df2 z)NiQwsQ0Q5sSm4lC}Z)Cicu|MNr z#=99uGCs&Smhnl(smz4ToJ?zGP3EPUH)r0L`F!RFnO|o9koi;QFPXn(p)4wk%?isJ zon_4G%37ASB8y~Qnsr&$6dYRQI9onC^J)+T4NMhjSmxeKPl%+~;#& z%6&EWjoi0#_vaqW{UZ14+;4Ng&;2p?m)zfSPvxG@LwQsllc&xr$!p2GJa2p6TX{d~ zWAq07H2qBd9Q{1~1$vj>qwmo#)-TmB*RRkM{WbdQ^=tHN_3QN;^$+V`(7&pGL%&CV zK>v>Zu>Oet3;kF6pY^}!e=~#_!VQrIsUg;oU`RA18*&U*L$zVLq24gVFxxQKaDk!O z&}wiQIt-j)rQveJD#KNVYYf*JZZNDdtTn7NY%n}zIB57iKPkT?zcv4={JZjB&Oe_2 zb^dqxKj#0Of5sSQ9Bqs+Mj55XXk)4|%{bPWY0NfijgyTtjOQDhj1FU~vE8`P*lApD zywZ5B@p|JL<2vI;<88(}jJu4F8Q(JQHy$*;Ydm87zMZudi z$+XtA&a~0A&9uX`%e33{fayWge$$7h|lB z&YW*HnXTp`^JMc3^E|V|++uDscbP9V`^<~YOUxV0`^={-VU}=9ltpHdTjDIKmP|{Y z#cCT_>ssr2>#f#1to_zIt=p_Sth=nct -#import "main.h" - int main() { - // https://stackoverflow.com/questions/30269329/creating-window-application-in-pure-c-on-mac-osx - @autoreleasepool { + @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 - | NSWindowStyleMaskClosable - | NSWindowStyleMaskMiniaturizable - | NSWindowStyleMaskResizable - backing:NSBackingStoreBuffered - defer:NO - ]; - [window cascadeTopLeftFromPoint:NSMakePoint(20, 20)]; - [window setTitle:applicationName]; + id window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 120, 120) + styleMask:NSWindowStyleMaskTitled backing:NSBackingStoreBuffered defer:NO]; + [window cascadeTopLeftFromPoint:NSMakePoint(20,20)]; + [window setTitle: applicationName]; [window makeKeyAndOrderFront:nil]; [NSApp activateIgnoringOtherApps:YES]; [NSApp run];