From 7a0f8a088970da8a3317dd2332a4d7107df5aaae Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 22 Jan 2022 13:33:03 +0800 Subject: [PATCH] Shiki: Deprecate "main.m" in the Swiftified Installer. --- Source/Installer/AppDelegate.swift | 1 + Source/Installer/main.m | 14 -------------- vChewing.xcodeproj/project.pbxproj | 4 ---- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 Source/Installer/main.m diff --git a/Source/Installer/AppDelegate.swift b/Source/Installer/AppDelegate.swift index 32eb616b..21d0268b 100644 --- a/Source/Installer/AppDelegate.swift +++ b/Source/Installer/AppDelegate.swift @@ -18,6 +18,7 @@ private let kTargetFullBinPartialPath = "~/Library/Input Methods/vChewing.app/Co private let kTranslocationRemovalTickInterval: TimeInterval = 0.5 private let kTranslocationRemovalDeadline: TimeInterval = 60.0 +@main @objc (AppDelegate) class AppDelegate: NSWindowController, NSApplicationDelegate { @IBOutlet weak private var installButton: NSButton! diff --git a/Source/Installer/main.m b/Source/Installer/main.m deleted file mode 100644 index 13f89c58..00000000 --- a/Source/Installer/main.m +++ /dev/null @@ -1,14 +0,0 @@ -/* - * main.m - * - * Copyright 2021-2022 vChewing Project (3-Clause BSD License). - * Derived from 2011-2022 OpenVanilla Project (MIT License). - * Some rights reserved. See "LICENSE.TXT" for details. - */ - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 6317409b..b2e62e06 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -61,7 +61,6 @@ 6ACA41FA15FC1D9000935EF6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6ACA41EA15FC1D9000935EF6 /* InfoPlist.strings */; }; 6ACA41FC15FC1D9000935EF6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6ACA41EE15FC1D9000935EF6 /* Localizable.strings */; }; 6ACA41FD15FC1D9000935EF6 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6ACA41F015FC1D9000935EF6 /* MainMenu.xib */; }; - 6ACA41FF15FC1D9000935EF6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ACA41F415FC1D9000935EF6 /* main.m */; }; 6ACA420215FC1E5200935EF6 /* vChewing.app in Resources */ = {isa = PBXBuildFile; fileRef = 6A0D4EA215FC0D2D00ABF4B3 /* vChewing.app */; }; 6AFF97F2253B299E007F1C49 /* NonModalAlertWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF97F0253B299E007F1C49 /* NonModalAlertWindowController.xib */; }; D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */; }; @@ -223,7 +222,6 @@ 6ACA41EF15FC1D9000935EF6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 6ACA41F215FC1D9000935EF6 /* Installer-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Installer-Info.plist"; path = "Source/Installer/Installer-Info.plist"; sourceTree = SOURCE_ROOT; }; 6ACA41F315FC1D9000935EF6 /* Installer-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Installer-Prefix.pch"; path = "Source/Installer/Installer-Prefix.pch"; sourceTree = SOURCE_ROOT; }; - 6ACA41F415FC1D9000935EF6 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Source/Installer/main.m; sourceTree = SOURCE_ROOT; }; 6ACA41F515FC1D9000935EF6 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; 6ACA41F715FC1D9000935EF6 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = ""; }; 6AFF97F0253B299E007F1C49 /* NonModalAlertWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NonModalAlertWindowController.xib; sourceTree = ""; }; @@ -522,7 +520,6 @@ 6ACA41F015FC1D9000935EF6 /* MainMenu.xib */, 6ACA41F215FC1D9000935EF6 /* Installer-Info.plist */, 6ACA41F315FC1D9000935EF6 /* Installer-Prefix.pch */, - 6ACA41F415FC1D9000935EF6 /* main.m */, ); path = Installer; sourceTree = ""; @@ -730,7 +727,6 @@ files = ( 5B21711E279B9AD900F91A2B /* ArchiveUtil.swift in Sources */, 5B21711B279B998C00F91A2B /* Chronosphere.m in Sources */, - 6ACA41FF15FC1D9000935EF6 /* main.m in Sources */, 5B217126279BA37500F91A2B /* AppDelegate.swift in Sources */, 5BDF2CFF2791BECC00838ADB /* InputSourceHelper.swift in Sources */, );