Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
LufsX committed Mar 9, 2024
2 parents 4c84287 + baeb420 commit 1d42abc
Show file tree
Hide file tree
Showing 20 changed files with 1,743 additions and 1,305 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BasedOnStyle: Chromium
SortIncludes: false
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# apply clang format
ce94f9c4403b9c33d5e251fc7f1e15c44725d881

6 changes: 6 additions & 0 deletions .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
with:
submodules: true

- name: Install clang-format
run: brew install clang-format

- name: Lint
run: make clang-format-lint

- name: Configure build environment
run: |
echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ jobs:
with:
submodules: true

- name: Install clang-format
run: brew install clang-format

- name: Lint
run: make clang-format-lint

- name: Configure build environment
run: |
echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
fetch-depth: 0
submodules: true

- name: Install clang-format
run: brew install clang-format

- name: Lint
run: make clang-format-lint

- name: Build Squirrel
run: ./action-build.sh archive

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $(RIME_DEPS):
$(MAKE) -C librime deps

librime: $(RIME_DEPS)
$(MAKE) -C librime install
$(MAKE) -C librime release install
$(MAKE) copy-rime-binaries

copy-rime-binaries:
Expand Down Expand Up @@ -78,6 +78,12 @@ copy-opencc-data:

deps: librime data

clang-format-lint:
find . -name '*.m' -o -name '*.h' -maxdepth 1 | xargs clang-format -Werror --dry-run || { echo Please lint your code by '"'"make clang-format-apply"'"'.; false; }

clang-format-apply:
find . -name '*.m' -o -name '*.h' -maxdepth 1 | xargs clang-format --verbose -i

ifdef ARCHS
BUILD_SETTINGS += ARCHS="$(ARCHS)"
BUILD_SETTINGS += ONLY_ACTIVE_ARCH=NO
Expand Down
4 changes: 4 additions & 0 deletions Squirrel.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
A4FC48CB0F6530EF0069BE81 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A4FC48C90F6530EF0069BE81 /* Localizable.strings */; };
D26434552706A15100857391 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D26434542706A15100857391 /* QuartzCore.framework */; };
E93074B70A5C264700470842 /* InputMethodKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E93074B60A5C264700470842 /* InputMethodKit.framework */; };
F45E005F2B8CA81C00179B75 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F45E005E2B8CA81C00179B75 /* UserNotifications.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -278,6 +279,7 @@
A4FC48CA0F6530EF0069BE81 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
D26434542706A15100857391 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
E93074B60A5C264700470842 /* InputMethodKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InputMethodKit.framework; path = /System/Library/Frameworks/InputMethodKit.framework; sourceTree = "<absolute>"; };
F45E005E2B8CA81C00179B75 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -287,6 +289,7 @@
files = (
D26434552706A15100857391 /* QuartzCore.framework in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
F45E005F2B8CA81C00179B75 /* UserNotifications.framework in Frameworks */,
E93074B70A5C264700470842 /* InputMethodKit.framework in Frameworks */,
A4B8E1B30F645B870094E08B /* Carbon.framework in Frameworks */,
447765C925C30E97002415AF /* Sparkle.framework in Frameworks */,
Expand Down Expand Up @@ -379,6 +382,7 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
F45E005E2B8CA81C00179B75 /* UserNotifications.framework */,
D26434542706A15100857391 /* QuartzCore.framework */,
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
Expand Down
32 changes: 17 additions & 15 deletions SquirrelApplicationDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@
@class SquirrelConfig;
@class SquirrelPanel;

// Note: the SquirrelApplicationDelegate is instantiated automatically as an outlet of NSApp's instance
// Note: the SquirrelApplicationDelegate is instantiated automatically as an
// outlet of NSApp's instance
@interface SquirrelApplicationDelegate : NSObject

@property(nonatomic, copy) IBOutlet NSMenu *menu;
@property(nonatomic, strong) IBOutlet SquirrelPanel *panel;
@property(nonatomic, strong) IBOutlet id updater;
@property(nonatomic, weak) IBOutlet NSMenu* menu;
@property(nonatomic, weak) IBOutlet SquirrelPanel* panel;
@property(nonatomic, weak) IBOutlet id updater;

@property(nonatomic, readonly, strong) SquirrelConfig *config;
@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;

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

@end

@interface NSApplication (SquirrelApp)

@property(nonatomic, readonly, strong) SquirrelApplicationDelegate *squirrelAppDelegate;
@property(nonatomic, readonly, strong)
SquirrelApplicationDelegate* squirrelAppDelegate;

@end

Expand Down
Loading

0 comments on commit 1d42abc

Please sign in to comment.