Skip to content

Commit

Permalink
UI Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
groverlynn committed Oct 20, 2023
1 parent 7de3919 commit bea4313
Show file tree
Hide file tree
Showing 34 changed files with 3,013 additions and 2,026 deletions.
4 changes: 2 additions & 2 deletions Assets.xcassets/RimeIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"images" : [
{
"filename" : "rime-16 1.png",
"filename" : "rime-16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "rime-32 1.png",
"filename" : "rime-32.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
Expand Down
Binary file modified Assets.xcassets/RimeIcon.appiconset/rime-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets.xcassets/RimeIcon.appiconset/rime-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Assets.xcassets/RimeIcon.appiconset/rime-16 1.png
Binary file not shown.
Binary file added Assets.xcassets/RimeIcon.appiconset/rime-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets.xcassets/RimeIcon.appiconset/rime-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Assets.xcassets/RimeIcon.appiconset/rime-32 1.png
Binary file not shown.
Binary file modified Assets.xcassets/RimeIcon.appiconset/rime-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets.xcassets/RimeIcon.appiconset/rime-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets.xcassets/RimeIcon.appiconset/rime-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 19 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ Choose one of the following options.
``` sh
export BUILD_UNIVERSAL=1

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

export BOOST_ROOT="$(pwd)/librime/deps/boost_1_78_0"
export CMAKE_GENERATOR=Ninja

bash librime/install-boost.sh
```

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

* 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.

```
``` sh
git submodule update --init --recursive

export BUILD_UNIVERSAL=1
export CMAKE_GENERATOR=Ninja

make -C librime
make deps
```

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

``` sh
# for Universal macOS App, targetting Ventura
make ARCHS='arm64 x86_64' MACOSX_DEPLOYMENT_TARGET='13.0'
# for Universal macOS App
make ARCHS='arm64 x86_64' MACOSX_DEPLOYMENT_TARGET='10.15'

# for Mac computers with Apple Silicon
make ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='10.15'

# for ARM macOS App, targetting Ventura
make ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='13.0'
# for Intel-based Mac
make ARCHS='x86_64' MACOSX_DEPLOYMENT_TARGET='10.15'
```

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

```
make package ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='13.0'
make package ARCHS='arm64' MACOSX_DEPLOYMENT_TARGET='10.14'
```

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)
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
all: release
install: install-release

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

RIME_BIN_DIR = librime/dist/bin
RIME_LIB_DIR = librime/dist/lib
Expand Down Expand Up @@ -39,7 +39,7 @@ $(RIME_LIBRARY):
$(MAKE) librime

$(RIME_DEPS):
$(MAKE) -C librime xcode/deps
$(MAKE) -C librime deps

librime: $(RIME_DEPS)
$(MAKE) -C librime $(RIME_DIST_TARGET)
Expand Down Expand Up @@ -67,7 +67,7 @@ plum-data:
$(MAKE) copy-plum-data

opencc-data:
$(MAKE) -C librime xcode/deps/opencc
$(MAKE) -C librime deps/opencc
$(MAKE) copy-opencc-data

copy-plum-data:
Expand All @@ -88,9 +88,9 @@ _=$() $()
export CMAKE_OSX_ARCHITECTURES = $(subst $(_),;,$(ARCHS))
endif

ifdef MACOSX_DEPLOYMENT_TARGET
# https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
MACOSX_DEPLOYMENT_TARGET ?= 10.15
BUILD_SETTINGS += MACOSX_DEPLOYMENT_TARGET="$(MACOSX_DEPLOYMENT_TARGET)"
endif

release: $(DEPS_CHECK)
bash package/add_data_files
Expand Down Expand Up @@ -170,5 +170,5 @@ clean:

clean-deps:
$(MAKE) -C plum clean
$(MAKE) -C librime xcode/clean
$(MAKE) -C librime clean
$(MAKE) clean-sparkle
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
安裝輸入法
---

本品適用於 macOS 12.0+
本品適用於 macOS 10.15+

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

Expand Down
2 changes: 1 addition & 1 deletion Sparkle
Submodule Sparkle updated 663 files
25 changes: 15 additions & 10 deletions Squirrel.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -303,8 +303,8 @@
44AC95171430CF6000C888FB /* SquirrelApplicationDelegate.m */,
44AC95181430CF6000C888FB /* SquirrelInputController.h */,
44AC95191430CF6000C888FB /* SquirrelInputController.m */,
A47C48DE105E8CE8006D528B /* macos_keycode.m */,
A44571AB0DBF42C200F793F9 /* macos_keycode.h */,
A47C48DE105E8CE8006D528B /* macos_keycode.m */,
32CA4F630368D1EE00C91783 /* Squirrel_Prefix.pch */,
4443A8391828CC5100731305 /* input_source.m */,
29B97316FDCFA39411CA2CEA /* main.m */,
Expand Down Expand Up @@ -505,7 +505,8 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1220;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Squirrel" */;
compatibilityVersion = "Xcode 10.0";
Expand Down Expand Up @@ -600,12 +601,13 @@
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.17.2;
CURRENT_PROJECT_VERSION = 0.16.2u;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -631,7 +633,7 @@
"$(inherited)",
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CODE_SIGN_FLAGS = "--deep";
OTHER_CPLUSPLUSFLAGS = (
"-DLEOPARD",
Expand All @@ -650,11 +652,12 @@
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0.17.2;
CURRENT_PROJECT_VERSION = 0.16.2u;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -679,7 +682,7 @@
"$(inherited)",
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CODE_SIGN_FLAGS = "--deep";
OTHER_CPLUSPLUSFLAGS = (
"-DLEOPARD",
Expand Down Expand Up @@ -722,6 +725,7 @@
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -743,7 +747,7 @@
/usr/local/lib,
);
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/lib";
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SYSTEM_HEADER_SEARCH_PATHS = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Headers;
Expand Down Expand Up @@ -777,6 +781,7 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/Release";
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -795,8 +800,8 @@
/usr/lib,
);
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/lib";
MACOSX_DEPLOYMENT_TARGET = 12.0;
ONLY_ACTIVE_ARCH = YES;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx;
SYSTEM_HEADER_SEARCH_PATHS = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Headers;
};
Expand Down
22 changes: 12 additions & 10 deletions SquirrelApplicationDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

@class SquirrelConfig;
@class SquirrelPanel;
@class SquirrelOptionSwitcher;

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

-(IBAction)deploy:(id)sender;
-(IBAction)syncUserData:(id)sender;
-(IBAction)configure:(id)sender;
-(IBAction)openWiki:(id)sender;
- (IBAction)deploy:(id)sender;
- (IBAction)syncUserData:(id)sender;
- (IBAction)configure:(id)sender;
- (IBAction)openWiki:(id)sender;

-(void)setupRime;
-(void)startRimeWithFullCheck:(BOOL)fullCheck;
-(void)loadSettings;
-(void)loadSchemaSpecificSettings:(NSString *)schemaId;
- (void)setupRime;
- (void)startRimeWithFullCheck:(BOOL)fullCheck;
- (void)loadSettings;
- (void)loadSchemaSpecificSettings:(NSString *)schemaId;
- (void)loadSchemaSpecificLabels:(NSString *)schemaId;

@property (nonatomic, readonly) BOOL problematicLaunchDetected;
@property(nonatomic, readonly) BOOL problematicLaunchDetected;

@end

Expand All @@ -34,4 +36,4 @@
@end

// also used in main.m
extern void show_message(const char* msg_text, const char* msg_id);
extern void show_message(const char *msg_text, const char *msg_id);
Loading

0 comments on commit bea4313

Please sign in to comment.