diff --git a/README.md b/README.md index e528e84..6db0e2d 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,7 @@ * macOS `brew install raylib` + +* iOS + + `brew install xcodegen` diff --git a/components/chkgfx/ios/view/ChkgfxView.swift b/components/chkgfx/ios/view/ChkgfxView.swift new file mode 120000 index 0000000..3a1e13d --- /dev/null +++ b/components/chkgfx/ios/view/ChkgfxView.swift @@ -0,0 +1 @@ +../../mac/view/ChkgfxView.swift \ No newline at end of file diff --git a/ogs-chkgfx/ver-ios/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/ogs-chkgfx/ver-ios/Assets.xcassets/AppIcon.appiconset/AppIcon.png new file mode 100644 index 0000000..f2520ea Binary files /dev/null and b/ogs-chkgfx/ver-ios/Assets.xcassets/AppIcon.appiconset/AppIcon.png differ diff --git a/ogs-chkgfx/ver-ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/ogs-chkgfx/ver-ios/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..ca34fdb --- /dev/null +++ b/ogs-chkgfx/ver-ios/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "AppIcon.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} \ No newline at end of file diff --git a/ogs-chkgfx/ver-ios/Info.plist b/ogs-chkgfx/ver-ios/Info.plist new file mode 100644 index 0000000..1b3f948 --- /dev/null +++ b/ogs-chkgfx/ver-ios/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleName + OGS chkgfx + CFBundleDisplayName + OGS chkgfx + CFBundleIdentifier + org.opengamestudio.chkgfx + CFBundleExecutable + ogs-chkgfx + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + UILaunchScreen + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/ogs-chkgfx/ver-ios/project.yml b/ogs-chkgfx/ver-ios/project.yml new file mode 100644 index 0000000..bddd15f --- /dev/null +++ b/ogs-chkgfx/ver-ios/project.yml @@ -0,0 +1,14 @@ +name: OGS chkgfx +options: + bundleIdPrefix: org.opengamestudio +targets: + ogs-chkgfx: + type: application + platform: iOS + deploymentTarget: "15.0" + sources: + - path: Assets.xcassets + - path: src + settings: + base: + INFOPLIST_FILE: Info.plist diff --git a/ogs-chkgfx/ver-ios/src/AppDelegate.swift b/ogs-chkgfx/ver-ios/src/AppDelegate.swift new file mode 100644 index 0000000..5f14539 --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/AppDelegate.swift @@ -0,0 +1,19 @@ +import UIKit + +final class AppDelegate: + NSObject, + UIApplicationDelegate +{ + let chkgfx = ChkgfxComponent() + let chkgfxVM = ChkgfxVM() + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + otherSetupConsoleLogging(chkgfx.ctrl, "Chkgfx") + chkgfx.setup() + + return true + } +} diff --git a/ogs-chkgfx/ver-ios/src/ChkgfxApp.swift b/ogs-chkgfx/ver-ios/src/ChkgfxApp.swift new file mode 100644 index 0000000..7aa819c --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/ChkgfxApp.swift @@ -0,0 +1,12 @@ +import SwiftUI + +@main +struct ChkgfxApp: App { + @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate + + var body: some Scene { + WindowGroup { + ChkgfxView(appDelegate.chkgfxVM) + } + } +} diff --git a/ogs-chkgfx/ver-ios/src/chkgfx/chkgfx.swift b/ogs-chkgfx/ver-ios/src/chkgfx/chkgfx.swift new file mode 120000 index 0000000..3c6bb5e --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/chkgfx/chkgfx.swift @@ -0,0 +1 @@ +../../../../components/chkgfx/chkgfx.swift \ No newline at end of file diff --git a/ogs-chkgfx/ver-ios/src/chkgfx/chkgfxVM.swift b/ogs-chkgfx/ver-ios/src/chkgfx/chkgfxVM.swift new file mode 120000 index 0000000..cf74ca4 --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/chkgfx/chkgfxVM.swift @@ -0,0 +1 @@ +../../../../components/chkgfx/chkgfxVM.swift \ No newline at end of file diff --git a/ogs-chkgfx/ver-ios/src/chkgfx/view/ChkgfxView.swift b/ogs-chkgfx/ver-ios/src/chkgfx/view/ChkgfxView.swift new file mode 120000 index 0000000..6c25613 --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/chkgfx/view/ChkgfxView.swift @@ -0,0 +1 @@ +../../../../../components/chkgfx/ios/view/ChkgfxView.swift \ No newline at end of file diff --git a/ogs-chkgfx/ver-ios/src/dialect.swift b/ogs-chkgfx/ver-ios/src/dialect.swift new file mode 120000 index 0000000..a931c95 --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/dialect.swift @@ -0,0 +1 @@ +../../ver-mac/src/dialect.swift \ No newline at end of file diff --git a/ogs-chkgfx/ver-ios/src/other/other.swift b/ogs-chkgfx/ver-ios/src/other/other.swift new file mode 120000 index 0000000..f91488c --- /dev/null +++ b/ogs-chkgfx/ver-ios/src/other/other.swift @@ -0,0 +1 @@ +../../../../components/other/other.swift \ No newline at end of file diff --git a/ogs-chkgfx/ver-mac/src/ChkgfxApp.swift b/ogs-chkgfx/ver-mac/src/ChkgfxApp.swift index 105f2dc..090c94b 100644 --- a/ogs-chkgfx/ver-mac/src/ChkgfxApp.swift +++ b/ogs-chkgfx/ver-mac/src/ChkgfxApp.swift @@ -1,4 +1,3 @@ -import AppKit import SwiftUI @main diff --git a/ogs-mahjong/ver-mac/src/GameApp.swift b/ogs-mahjong/ver-mac/src/MahjongApp.swift similarity index 90% rename from ogs-mahjong/ver-mac/src/GameApp.swift rename to ogs-mahjong/ver-mac/src/MahjongApp.swift index 449a921..3d71dfe 100644 --- a/ogs-mahjong/ver-mac/src/GameApp.swift +++ b/ogs-mahjong/ver-mac/src/MahjongApp.swift @@ -1,8 +1,7 @@ -import AppKit import SwiftUI @main -struct GameApp: App { +struct MahjongApp: App { @NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate var body: some Scene {