Skip to content

Commit 78a9988

Browse files
committed
UI Improvement
1 parent 7de3919 commit 78a9988

34 files changed

+2941
-2000
lines changed

Assets.xcassets/RimeIcon.appiconset/Contents.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"images" : [
33
{
4-
"filename" : "rime-16 1.png",
4+
"filename" : "rime-16.png",
55
"idiom" : "mac",
66
"scale" : "1x",
77
"size" : "16x16"
88
},
99
{
10-
"filename" : "rime-32 1.png",
10+
"filename" : "rime-32.png",
1111
"idiom" : "mac",
1212
"scale" : "2x",
1313
"size" : "16x16"
Loading
652 Bytes
Loading
-2.03 KB
Binary file not shown.
540 Bytes
Loading
Loading
Binary file not shown.
-1.25 KB
Loading
5.86 KB
Loading
-541 Bytes
Loading

INSTALL.md

+19-8
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ Choose one of the following options.
6161
``` sh
6262
export BUILD_UNIVERSAL=1
6363

64-
make -C librime xcode/deps/boost
64+
export BOOST_ROOT="$(pwd)/librime/deps/boost_1_83_0"
6565

66-
export BOOST_ROOT="$(pwd)/librime/deps/boost_1_78_0"
66+
export CMAKE_GENERATOR=Ninja
67+
68+
bash librime/install-boost.sh
6769
```
6870

6971
Let's set `BUILD_UNIVERSAL` to tell `make` that we are building Boost as
@@ -96,8 +98,14 @@ port install boost -no_static
9698

9799
* Make sure you have updated all the dependencies. If you cloned squirrel with the command in this guide, you've already done it. But if not, this command will update submodules.
98100

99-
```
101+
``` sh
100102
git submodule update --init --recursive
103+
104+
export BUILD_UNIVERSAL=1
105+
export CMAKE_GENERATOR=Ninja
106+
107+
make -C librime
108+
make deps
101109
```
102110

103111
* With all dependencies ready, build `Squirrel.app`:
@@ -109,11 +117,14 @@ make
109117
To build only for the native architecture, and/or specify the lowest supported macOS version, pass variable `ARCHS`/`MACOSX_DEPLOYMENT_TARGET` to `make`:
110118

111119
``` sh
112-
# for Universal macOS App, targetting Ventura
113-
make ARCHS='arm64 x86_64' MACOSX_DEPLOYMENT_TARGET='13.0'
120+
# for Universal macOS App
121+
make ARCHS='arm64 x86_64' MACOSX_DEPLOYMENT_TARGET='10.15'
122+
123+
# for Mac computers with Apple Silicon
124+
make ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='10.15'
114125

115-
# for ARM macOS App, targetting Ventura
116-
make ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='13.0'
126+
# for Intel-based Mac
127+
make ARCHS='x86_64' MACOSX_DEPLOYMENT_TARGET='10.15'
117128
```
118129

119130
## Install it on your Mac
@@ -123,7 +134,7 @@ make ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='13.0'
123134
Just add `package` after `make`
124135

125136
```
126-
make package ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='13.0'
137+
make package ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='10.14'
127138
```
128139

129140
Define or echo `DEV_ID` to automatically handle code signing and [notarization](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution) (Apple Developer ID needed)

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
all: release
44
install: install-release
55

6-
# Change to `xcode/dist-with-icu` if boost is linked to icu libraries.
7-
RIME_DIST_TARGET = xcode/dist
6+
# Change to `dist-with-icu` if boost is linked to icu libraries.
7+
RIME_DIST_TARGET = install
88

99
RIME_BIN_DIR = librime/dist/bin
1010
RIME_LIB_DIR = librime/dist/lib
@@ -39,7 +39,7 @@ $(RIME_LIBRARY):
3939
$(MAKE) librime
4040

4141
$(RIME_DEPS):
42-
$(MAKE) -C librime xcode/deps
42+
$(MAKE) -C librime deps
4343

4444
librime: $(RIME_DEPS)
4545
$(MAKE) -C librime $(RIME_DIST_TARGET)
@@ -67,7 +67,7 @@ plum-data:
6767
$(MAKE) copy-plum-data
6868

6969
opencc-data:
70-
$(MAKE) -C librime xcode/deps/opencc
70+
$(MAKE) -C librime deps/opencc
7171
$(MAKE) copy-opencc-data
7272

7373
copy-plum-data:
@@ -88,9 +88,9 @@ _=$() $()
8888
export CMAKE_OSX_ARCHITECTURES = $(subst $(_),;,$(ARCHS))
8989
endif
9090

91-
ifdef MACOSX_DEPLOYMENT_TARGET
91+
# https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
92+
MACOSX_DEPLOYMENT_TARGET ?= 10.15
9293
BUILD_SETTINGS += MACOSX_DEPLOYMENT_TARGET="$(MACOSX_DEPLOYMENT_TARGET)"
93-
endif
9494

9595
release: $(DEPS_CHECK)
9696
bash package/add_data_files
@@ -170,5 +170,5 @@ clean:
170170

171171
clean-deps:
172172
$(MAKE) -C plum clean
173-
$(MAKE) -C librime xcode/clean
173+
$(MAKE) -C librime clean
174174
$(MAKE) clean-sparkle

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
安裝輸入法
2929
---
3030

31-
本品適用於 macOS 12.0+
31+
本品適用於 macOS 10.15+
3232

3333
初次安裝,如果在部份應用程序中打不出字,請註銷並重新登錄。
3434

Sparkle

Submodule Sparkle updated 663 files

Squirrel.xcodeproj/project.pbxproj

+15-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 51;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -303,8 +303,8 @@
303303
44AC95171430CF6000C888FB /* SquirrelApplicationDelegate.m */,
304304
44AC95181430CF6000C888FB /* SquirrelInputController.h */,
305305
44AC95191430CF6000C888FB /* SquirrelInputController.m */,
306-
A47C48DE105E8CE8006D528B /* macos_keycode.m */,
307306
A44571AB0DBF42C200F793F9 /* macos_keycode.h */,
307+
A47C48DE105E8CE8006D528B /* macos_keycode.m */,
308308
32CA4F630368D1EE00C91783 /* Squirrel_Prefix.pch */,
309309
4443A8391828CC5100731305 /* input_source.m */,
310310
29B97316FDCFA39411CA2CEA /* main.m */,
@@ -505,7 +505,8 @@
505505
29B97313FDCFA39411CA2CEA /* Project object */ = {
506506
isa = PBXProject;
507507
attributes = {
508-
LastUpgradeCheck = 1220;
508+
BuildIndependentTargetsInParallel = YES;
509+
LastUpgradeCheck = 1510;
509510
};
510511
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Squirrel" */;
511512
compatibilityVersion = "Xcode 10.0";
@@ -600,12 +601,13 @@
600601
C01FCF4B08A954540054247B /* Debug */ = {
601602
isa = XCBuildConfiguration;
602603
buildSettings = {
604+
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
603605
CLANG_CXX_LIBRARY = "libc++";
604606
CLANG_ENABLE_OBJC_ARC = YES;
605607
CODE_SIGN_IDENTITY = "-";
606608
COMBINE_HIDPI_IMAGES = YES;
607609
COPY_PHASE_STRIP = NO;
608-
CURRENT_PROJECT_VERSION = 0.17.2;
610+
CURRENT_PROJECT_VERSION = 0.16.2u;
609611
DEAD_CODE_STRIPPING = YES;
610612
FRAMEWORK_SEARCH_PATHS = (
611613
"$(inherited)",
@@ -631,7 +633,7 @@
631633
"$(inherited)",
632634
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
633635
);
634-
MACOSX_DEPLOYMENT_TARGET = 12.0;
636+
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
635637
OTHER_CODE_SIGN_FLAGS = "--deep";
636638
OTHER_CPLUSPLUSFLAGS = (
637639
"-DLEOPARD",
@@ -650,11 +652,12 @@
650652
C01FCF4C08A954540054247B /* Release */ = {
651653
isa = XCBuildConfiguration;
652654
buildSettings = {
655+
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
653656
CLANG_CXX_LIBRARY = "libc++";
654657
CLANG_ENABLE_OBJC_ARC = YES;
655658
CODE_SIGN_IDENTITY = "-";
656659
COMBINE_HIDPI_IMAGES = YES;
657-
CURRENT_PROJECT_VERSION = 0.17.2;
660+
CURRENT_PROJECT_VERSION = 0.16.2u;
658661
DEAD_CODE_STRIPPING = YES;
659662
FRAMEWORK_SEARCH_PATHS = (
660663
"$(inherited)",
@@ -679,7 +682,7 @@
679682
"$(inherited)",
680683
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
681684
);
682-
MACOSX_DEPLOYMENT_TARGET = 12.0;
685+
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
683686
OTHER_CODE_SIGN_FLAGS = "--deep";
684687
OTHER_CPLUSPLUSFLAGS = (
685688
"-DLEOPARD",
@@ -722,6 +725,7 @@
722725
DEAD_CODE_STRIPPING = YES;
723726
ENABLE_STRICT_OBJC_MSGSEND = YES;
724727
ENABLE_TESTABILITY = YES;
728+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
725729
GCC_NO_COMMON_BLOCKS = YES;
726730
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
727731
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -743,7 +747,7 @@
743747
/usr/local/lib,
744748
);
745749
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/lib";
746-
MACOSX_DEPLOYMENT_TARGET = 12.0;
750+
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
747751
ONLY_ACTIVE_ARCH = YES;
748752
SDKROOT = macosx;
749753
SYSTEM_HEADER_SEARCH_PATHS = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Headers;
@@ -777,6 +781,7 @@
777781
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/Release";
778782
DEAD_CODE_STRIPPING = YES;
779783
ENABLE_STRICT_OBJC_MSGSEND = YES;
784+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
780785
GCC_NO_COMMON_BLOCKS = YES;
781786
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
782787
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -795,8 +800,8 @@
795800
/usr/lib,
796801
);
797802
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/lib";
798-
MACOSX_DEPLOYMENT_TARGET = 12.0;
799-
ONLY_ACTIVE_ARCH = YES;
803+
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
804+
ONLY_ACTIVE_ARCH = NO;
800805
SDKROOT = macosx;
801806
SYSTEM_HEADER_SEARCH_PATHS = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Headers;
802807
};

SquirrelApplicationDelegate.h

+12-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@class SquirrelConfig;
44
@class SquirrelPanel;
5+
@class SquirrelOptionSwitcher;
56

67
// Note: the SquirrelApplicationDelegate is instantiated automatically as an outlet of NSApp's instance
78
@interface SquirrelApplicationDelegate : NSObject
@@ -13,17 +14,18 @@
1314
@property(nonatomic, readonly, strong) SquirrelConfig *config;
1415
@property(nonatomic, readonly) BOOL enableNotifications;
1516

16-
-(IBAction)deploy:(id)sender;
17-
-(IBAction)syncUserData:(id)sender;
18-
-(IBAction)configure:(id)sender;
19-
-(IBAction)openWiki:(id)sender;
17+
- (IBAction)deploy:(id)sender;
18+
- (IBAction)syncUserData:(id)sender;
19+
- (IBAction)configure:(id)sender;
20+
- (IBAction)openWiki:(id)sender;
2021

21-
-(void)setupRime;
22-
-(void)startRimeWithFullCheck:(BOOL)fullCheck;
23-
-(void)loadSettings;
24-
-(void)loadSchemaSpecificSettings:(NSString *)schemaId;
22+
- (void)setupRime;
23+
- (void)startRimeWithFullCheck:(BOOL)fullCheck;
24+
- (void)loadSettings;
25+
- (void)loadSchemaSpecificSettings:(NSString *)schemaId;
26+
- (void)loadSchemaSpecificLabels:(NSString *)schemaId;
2527

26-
@property (nonatomic, readonly) BOOL problematicLaunchDetected;
28+
@property(nonatomic, readonly) BOOL problematicLaunchDetected;
2729

2830
@end
2931

@@ -34,4 +36,4 @@
3436
@end
3537

3638
// also used in main.m
37-
extern void show_message(const char* msg_text, const char* msg_id);
39+
extern void show_message(const char *msg_text, const char *msg_id);

0 commit comments

Comments
 (0)