Skip to content

Commit

Permalink
harmonic menu icon (#184)
Browse files Browse the repository at this point in the history
Co-authored-by: ksqsf <[email protected]>
Co-authored-by: XYZSUN <[email protected]>
  • Loading branch information
3 people committed Aug 2, 2024
1 parent 74bc7af commit e4cc709
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
brew install \
nlohmann-json \
extra-cmake-modules \
librsvg \
md5sha1sum \
ninja
./install-deps.sh ${{ matrix.arch }}
npm i -g pnpm
Expand Down Expand Up @@ -83,7 +85,9 @@ jobs:
Fcitx5-${{ matrix.arch }}.tar.bz2
- name: Check validity
run: ./check-validity.sh
run: |
./check-validity.sh
md5sum -c checksum
- name: Generate meta.json
if: ${{ matrix.os == 'macos-14' }}
Expand Down
12 changes: 12 additions & 0 deletions assets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/fcitx.icns"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/menu_icon.pdf
COMMAND SOURCE_DATE_EPOCH=0 rsvg-convert -f pdf -o ${CMAKE_CURRENT_BINARY_DIR}/menu_icon.pdf ${CMAKE_CURRENT_SOURCE_DIR}/penguin.svg
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/penguin.svg
)
add_custom_target(GeneratePDF ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/menu_icon.pdf
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/menu_icon.pdf"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)

# Preserve execution permission
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/uninstall.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/update.sh"
Expand Down
5 changes: 5 additions & 0 deletions assets/penguin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions checksum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
235e1b78a18fe9a5fccbac5b23d7d91b build/assets/menu_icon.pdf
8 changes: 7 additions & 1 deletion cmake/MacOSXBundleInfo.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<string>Latn</string>
</array>
<key>tsInputMethodIconFileKey</key>
<string>fcitx.icns</string>
<string>menu_icon.pdf</string>
<key>ComponentInputModeDict</key>
<dict>
<key>tsInputModeListKey</key>
Expand All @@ -36,6 +36,12 @@
<!-- register as Chinese to disable on login/Terminal sudo password input -->
<key>TISIntendedLanguage</key>
<string>zh-Hans</string>
<key>tsInputModeMenuIconFileKey</key>
<string>menu_icon.pdf</string>
<key>tsInputModeAlternateMenuIconFileKey</key>
<string>menu_icon.pdf</string>
<key>tsInputModePaletteIconFileKey</key>
<string>menu_icon.pdf</string>
</dict>
</dict>
</dict>
Expand Down

0 comments on commit e4cc709

Please sign in to comment.