Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fcitx bazel build #65

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions scripts/install_fcitx_bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

_bldtype="${_bldtype:-Debug}"
PREFIX="${PREFIX:-/usr}"

for pofile in unix/fcitx/po/*.po
do
filename=`basename $pofile`
lang=${filename/.po/}
mofile=${pofile/.po/.mo}
msgfmt $pofile -o $mofile
install -D -m 644 "$mofile" "${PREFIX}/share/locale/$lang/LC_MESSAGES/fcitx-mozc.mo"
rm -f $mofile
done

install -D -m 755 "bazel-bin/unix/fcitx/fcitx-mozc.so" "${PREFIX}/lib/fcitx/fcitx-mozc.so"
install -D -m 644 unix/fcitx/fcitx-mozc.conf "${PREFIX}/share/fcitx/addon/fcitx-mozc.conf"
install -D -m 644 unix/fcitx/mozc.conf "${PREFIX}/share/fcitx/inputmethod/mozc.conf"

install -d "${PREFIX}/share/fcitx/mozc/icon"
install -D -m 644 data/images/product_icon_32bpp-128.png "${PREFIX}/share/fcitx/mozc/icon/mozc.png"
install -D -m 644 ../scripts/icons/ui-alpha_full.png "${PREFIX}/share/fcitx/mozc/icon/mozc-alpha_full.png"
install -D -m 644 ../scripts/icons/ui-alpha_half.png "${PREFIX}/share/fcitx/mozc/icon/mozc-alpha_half.png"
install -D -m 644 ../scripts/icons/ui-direct.png "${PREFIX}/share/fcitx/mozc/icon/mozc-direct.png"
install -D -m 644 ../scripts/icons/ui-hiragana.png "${PREFIX}/share/fcitx/mozc/icon/mozc-hiragana.png"
install -D -m 644 ../scripts/icons/ui-katakana_full.png "${PREFIX}/share/fcitx/mozc/icon/mozc-katakana_full.png"
install -D -m 644 ../scripts/icons/ui-katakana_half.png "${PREFIX}/share/fcitx/mozc/icon/mozc-katakana_half.png"
install -D -m 644 ../scripts/icons/ui-dictionary.png "${PREFIX}/share/fcitx/mozc/icon/mozc-dictionary.png"
install -D -m 644 ../scripts/icons/ui-properties.png "${PREFIX}/share/fcitx/mozc/icon/mozc-properties.png"
install -D -m 644 ../scripts/icons/ui-tool.png "${PREFIX}/share/fcitx/mozc/icon/mozc-tool.png"
10 changes: 5 additions & 5 deletions src/unix/fcitx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mozc_cc_library(
"//base:vlog",
"//client:client",
"//protocol:commands_cc_proto",
"@com_google_absl//absl/log:check",
]
)

Expand All @@ -42,6 +43,7 @@ mozc_cc_library(
"//base:vlog",
"//protocol:commands_cc_proto",
"//client:client_interface",
"@com_google_absl//absl/log:check",
],
)

Expand All @@ -56,12 +58,12 @@ mozc_cc_library(
"fcitx_key_translator.h",
],
deps = [
"//base:logging",
"//base:port",
"//base:singleton",
"//base:vlog",
"//protocol:config_cc_proto",
"//protocol:commands_cc_proto",
"@fcitx//:fcitx",
"@com_google_absl//absl/log:check",
],
)

Expand All @@ -75,10 +77,9 @@ mozc_cc_library(
],
deps = [
"//base:util",
"//base:logging",
"//base:port",
"//base:vlog",
"@fcitx//:fcitx",
"@com_google_absl//absl/log:check",
],
)

Expand All @@ -88,7 +89,6 @@ mozc_cc_binary(
deps = [
":fcitx_mozc",
"//base:init_mozc",
"@fcitx//:fcitx",
],
local_defines = [
'LOCALEDIR=\\"/usr/share/locale\\"',
Expand Down
2 changes: 1 addition & 1 deletion src/unix/fcitx/fcitx_key_event_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include <map>

#include "base/logging.h"
#include "absl/log/check.h"
#include "base/vlog.h"
#include "base/singleton.h"

Expand Down
2 changes: 1 addition & 1 deletion src/unix/fcitx/fcitx_key_translator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <set>
#include <string>

#include "base/logging.h"
#include "absl/log/check.h"
#include "base/vlog.h"

namespace mozc {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/fcitx/fcitx_mozc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
// Resolve macro naming conflict with absl.
#undef InvokeFunction

#include "absl/log/check.h"
#include "base/const.h"
#include "base/logging.h"
#include "base/vlog.h"
#include "base/process.h"
#include "base/util.h"
Expand Down
2 changes: 1 addition & 1 deletion src/unix/fcitx/mozc_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include <string>

#include "base/logging.h"
#include "absl/log/check.h"
#include "base/vlog.h"
#include "base/util.h"
#include "client/client.h"
Expand Down
2 changes: 1 addition & 1 deletion src/unix/fcitx/mozc_response_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <string>
#include <vector>

#include "base/logging.h"
#include "absl/log/check.h"
#include "base/vlog.h"
#include "base/util.h"
#include "protocol/commands.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion src/unix/fcitx/surrounding_text_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#undef InvokeFunction
#endif

#include "absl/log/check.h"
#include "base/port.h"
#include "base/logging.h"
#include "base/vlog.h"
#include "base/util.h"

Expand Down