From b01dcb775c98cc48abe65a91ef9bf093be875682 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 2 Mar 2026 23:52:25 +0800 Subject: improve template dirs --- .../macapp_with_framework/src/app/AppDelegate.h | 15 + .../macapp_with_framework/src/app/AppDelegate.m | 30 + .../AppIcon.appiconset/Contents.json | 58 ++ .../src/app/Assets.xcassets/Contents.json | 6 + .../src/app/Base.lproj/Main.storyboard | 717 +++++++++++++++++++++ .../xcode/macapp_with_framework/src/app/Info.plist | 38 ++ .../macapp_with_framework/src/app/ViewController.h | 15 + .../macapp_with_framework/src/app/ViewController.m | 27 + .../xcode/macapp_with_framework/src/app/main.m | 16 + .../src/app/test.entitlements | 10 + .../macapp_with_framework/src/framework/Info.plist | 24 + .../macapp_with_framework/src/framework/test.h | 3 + .../macapp_with_framework/src/framework/test.m | 9 + 13 files changed, 968 insertions(+) create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.h create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.m create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/Contents.json create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/Base.lproj/Main.storyboard create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/Info.plist create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.h create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.m create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/main.m create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/app/test.entitlements create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/framework/Info.plist create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.h create mode 100644 xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.m (limited to 'xmake/templates/objc/xcode/macapp_with_framework/src') diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.h b/xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.h new file mode 100644 index 000000000..5f5ba059e --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.m b/xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.m new file mode 100644 index 000000000..667420c8c --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/AppDelegate.m @@ -0,0 +1,30 @@ +// +// AppDelegate.m +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import "AppDelegate.h" +#import + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application + int c = add(1, 2); + NSLog(@"result: %d", c); +} + + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + +@end diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..2db2b1c7c --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/Contents.json b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/Base.lproj/Main.storyboard b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Base.lproj/Main.storyboard new file mode 100644 index 000000000..7a6d659a5 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Base.lproj/Main.storyboard @@ -0,0 +1,717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/Info.plist b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Info.plist new file mode 100644 index 000000000..ce53d780c --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundleDisplayName + $(PRODUCT_DISPLAY_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2020 tboox. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + NSSupportsAutomaticTermination + + NSSupportsSuddenTermination + + + diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.h b/xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.h new file mode 100644 index 000000000..a974fc934 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import + +@interface ViewController : NSViewController + + +@end + diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.m b/xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.m new file mode 100644 index 000000000..bccdf6189 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/ViewController.m @@ -0,0 +1,27 @@ +// +// ViewController.m +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import "ViewController.h" + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Do any additional setup after loading the view. +} + + +- (void)setRepresentedObject:(id)representedObject { + [super setRepresentedObject:representedObject]; + + // Update the view, if already loaded. +} + + +@end diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/main.m b/xmake/templates/objc/xcode/macapp_with_framework/src/app/main.m new file mode 100644 index 000000000..ae3706f51 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/main.m @@ -0,0 +1,16 @@ +// +// main.m +// test3 +// +// Created by ruki on 2020/4/4. +// Copyright © 2020 tboox. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + } + return NSApplicationMain(argc, argv); +} diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/app/test.entitlements b/xmake/templates/objc/xcode/macapp_with_framework/src/app/test.entitlements new file mode 100644 index 000000000..f2ef3ae02 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/app/test.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/framework/Info.plist b/xmake/templates/objc/xcode/macapp_with_framework/src/framework/Info.plist new file mode 100644 index 000000000..20608314e --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/framework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2020 tboox. All rights reserved. + + diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.h b/xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.h new file mode 100644 index 000000000..d882546d1 --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.h @@ -0,0 +1,3 @@ +#import + +FOUNDATION_EXPORT int add(int a, int b); diff --git a/xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.m b/xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.m new file mode 100644 index 000000000..71214544b --- /dev/null +++ b/xmake/templates/objc/xcode/macapp_with_framework/src/framework/test.m @@ -0,0 +1,9 @@ +#import "test.h" +#import + +int add(int a, int b) +{ + NSLog(@"add(%d, %d)", a, b); + return a + b; +} + -- cgit v1.3.1