-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 12da72c
Showing
21 changed files
with
2,042,267 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
Language: Cpp | ||
# BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
ConstructorInitializerIndentWidth: 4 | ||
AlignEscapedNewlinesLeft: false | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: All | ||
AlwaysBreakTemplateDeclarations: true | ||
AlwaysBreakBeforeMultilineStrings: false | ||
BreakBeforeBinaryOperators: false | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BinPackParameters: true | ||
ColumnLimit: 80 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
DerivePointerAlignment: false | ||
ExperimentalAutoDetectBinPacking: false | ||
IndentCaseLabels: false | ||
IndentWrappedFunctionNames: false | ||
IndentFunctionDeclarationAfterType: false | ||
MaxEmptyLinesToKeep: 1 | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
NamespaceIndentation: None | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 60 | ||
PointerAlignment: Right | ||
SpacesBeforeTrailingComments: 1 | ||
Cpp11BracedListStyle: true | ||
Standard: Cpp11 | ||
IndentWidth: 4 | ||
TabWidth: 4 | ||
UseTab: Never | ||
BreakBeforeBraces: Attach | ||
SpacesInParentheses: false | ||
SpacesInAngles: false | ||
SpaceInEmptyParentheses: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInContainerLiterals: true | ||
SpaceBeforeAssignmentOperators: true | ||
ContinuationIndentWidth: 4 | ||
CommentPragmas: '^ IWYU pragma:' | ||
ForEachMacros: [ Q_FOREACH, BOOST_FOREACH ] | ||
SpaceBeforeParens: ControlStatements | ||
DisableFormat: false | ||
SortIncludes: true | ||
... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt install -y ninja-build \ | ||
clang-format \ | ||
extra-cmake-modules \ | ||
gettext \ | ||
fcitx5-modules-dev \ | ||
libfcitx5core-dev \ | ||
libfcitx5utils-dev \ | ||
libfmt-dev \ | ||
libjson-c-dev \ | ||
marisa \ | ||
libmarisa-dev | ||
- name: Lint | ||
run: | | ||
find . -name '*.cpp' -o -name '*.h' | xargs clang-format -Werror --dry-run || { echo Please lint your code by '"'"find . -name '*.cpp' -o -name '*.h' | xargs clang-format -i"'"'.; false; } | ||
- name: Build | ||
run: | | ||
cmake -B build -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON | ||
cmake --build build | ||
sudo cmake --install build | ||
- name: Test | ||
run: | ||
ctest --output-on-failure --test-dir build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*~ | ||
build/* | ||
*.kdev4 | ||
.kdev_include_paths | ||
.directory | ||
*.kate-swp | ||
*.orig | ||
tags | ||
astyle.sh | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
cmake_minimum_required(VERSION 3.6.0) | ||
|
||
project(fcitx5-hallelujah VERSION 5.0.0) | ||
|
||
find_package(ECM 1.0.0 REQUIRED) | ||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) | ||
include(FeatureSummary) | ||
include(GNUInstallDirs) | ||
include(ECMUninstallTarget) | ||
|
||
option(ENABLE_TEST "Build Test" On) | ||
option(BUILD_DATA "Build data" On) | ||
|
||
find_package(Gettext REQUIRED) | ||
find_package(Fcitx5Core 5.0.0 REQUIRED) | ||
find_package(Fcitx5Module REQUIRED COMPONENTS Spell TestFrontend) | ||
find_package(PkgConfig REQUIRED) | ||
find_package(fmt REQUIRED) | ||
|
||
if (NOT DEFINED MARISA_TARGET) | ||
pkg_check_modules(Marisa REQUIRED IMPORTED_TARGET marisa) | ||
set(MARISA_TARGET PkgConfig::Marisa) | ||
endif() | ||
|
||
if (NOT DEFINED JSONC_TARGET) | ||
pkg_check_modules(JsonC REQUIRED IMPORTED_TARGET "json-c") | ||
set(JSONC_TARGET PkgConfig::JsonC) | ||
endif() | ||
|
||
add_definitions(-DFCITX_GETTEXT_DOMAIN=\"fcitx5-hallelujah\") | ||
fcitx5_add_i18n_definition() | ||
|
||
include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake") | ||
|
||
add_subdirectory(src) | ||
if (ENABLE_TEST) | ||
enable_testing() | ||
add_subdirectory(test) | ||
endif() | ||
if (BUILD_DATA) | ||
add_subdirectory(data) | ||
endif() | ||
|
||
fcitx5_translate_desktop_file(org.fcitx.Fcitx5.Addon.Hallelujah.metainfo.xml.in | ||
org.fcitx.Fcitx5.Addon.Hallelujah.metainfo.xml XML) | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.fcitx.Fcitx5.Addon.Hallelujah.metainfo.xml" DESTINATION ${FCITX_INSTALL_DATADIR}/metainfo) | ||
|
||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) |
Oops, something went wrong.