(同じ利用者による、間の13版が非表示)
8行目: 8行目:
  sudo zypper addrepo 'https://download.opensuse.org/repositories/M17N/$releasever/' M17N
  sudo zypper addrepo 'https://download.opensuse.org/repositories/M17N/$releasever/' M17N
  または
  または
  sudo zypper addrepo 'https://download.opensuse.org/repositories/home:/ftake:/branches:/M17N/buildtools_$releasever/' ftake
  sudo zypper addrepo 'https://download.opensuse.org/repositories/home:/ftake:/mozc/$releasever/' ftake
<br>
<br>
追加したリポジトリを更新する。<br>
リポジトリを更新する。<br>
  sudo zypper refresh
  sudo zypper refresh
<br>
<br>
Fcitx5をインストールする。<br>
Fcitx5をインストールする。<br>
Fcitx5の設定ツールは自動的にインストールされる。<br>
この時、Fcitx5の設定ツールは自動的にインストールされる。<br>
  # KKCを使用する場合
  # KKCを使用する場合
  sudo zypper install fcitx5-kkc fcitx5-table-other
  sudo zypper install fcitx5-kkc fcitx5-table-other
125行目: 125行目:
  make install
  make install
<br>
<br>
もし、FcitxおよびFcitxライブラリをホームディレクトリ等にインストールする場合、~/.profileファイルに環境変数の設定を追記する。<br>
もし、Fcitx5をホームディレクトリ等の任意のディレクトリにインストールする場合、~/.profileファイル等に環境変数を設定する。<br>
vi ~/.profile
<br>
<syntaxhighlight lang="sh">
# ~/.profileファイル等
  export PATH="/<Fcitx5のインストールディレクトリ>/bin:$PATH"
  export PATH="/<Fcitx5のインストールディレクトリ>/bin:$PATH"
  export LD_LIBRARY_PATH="/<Fcitx5のインストールディレクトリ>/lib:$LD_LIBRARY_PATH"
  export LD_LIBRARY_PATH="/<Fcitx5のインストールディレクトリ>/lib:$LD_LIBRARY_PATH"
  export PKG_CONFIG_PATH="$(pkg-config --variable pc_path pkg-config)"
  export PKG_CONFIG_PATH="$(pkg-config --variable pc_path pkg-config)"
  export PKG_CONFIG_PATH="/<Fcitx5のインストールディレクトリ>/lib/pkgconfig:$PKG_CONFIG_PATH"
  export PKG_CONFIG_PATH="/<Fcitx5のインストールディレクトリ>/lib/pkgconfig:$PKG_CONFIG_PATH"
</syntaxhighlight>
<br>
Fcitx5のD-Busサービスファイル (セッションバス) を作成する。<br>
sudo vi /usr/share/dbus-1/services/org.fcitx.Fcitx5.service
<br>
<syntaxhighlight lang="ini">
# /usr/share/dbus-1/services/org.fcitx.Fcitx5.serviceファイル
[D-BUS Service]
Name=org.fcitx.Fcitx5
Exec=/<Fcitx5のインストールディレクトリ>/bin/fcitx5
</syntaxhighlight>
<br>
<br>
<br>
==== Fcitx5-qtのインストール ====
==== Fcitx5-qtのインストール ====
[https://github.com/fcitx/fcitx5-qt/tags Fcitx5-qtのGithub]にアクセスして、ソースコードをダウンロードする。<br>
[https://github.com/fcitx/fcitx5-qt/tags Fcitx5-qtのGithub]にアクセスして、ソースコードをダウンロードする。<br>
141行目: 160行目:
<br>
<br>
Fcitx5-qtのビルドに必要なライブラリをインストールする。<br>
Fcitx5-qtのビルドに必要なライブラリをインストールする。<br>
  sudo zypper install libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libQt5DBus-devel libQt5Concurrent-devel \
  sudo zypper install  
                    # Qt 5を有効化する場合
                    libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libQt5DBus-devel libQt5Concurrent-devel \
                     libqt5-qtbase-devel libqt5-qtbase-private-headers-devel
                     libqt5-qtbase-devel libqt5-qtbase-private-headers-devel
                    # Qt 6を有効化する場合
                    qt6-core-devel qt6-gui-devel qt6-widgets-devel qt6-dbus-devel qt6-concurrent-devel \
                    qt6-base-devel qt6-base-private-devel
<br>
<br>
Fcitx5-qtをビルドおよびインストールする。<br>
Fcitx5-qtをビルドおよびインストールする。<br>
160行目: 185行目:
  sudo cp libfcitx5platforminputcontextplugin.so /usr/lib64/qt5/plugins/platforminputcontexts/
  sudo cp libfcitx5platforminputcontextplugin.so /usr/lib64/qt5/plugins/platforminputcontexts/
<br>
<br>
==== Fcitx5-gtkのインストール ====
==== Fcitx5-gtkのインストール ====
[https://github.com/fcitx/fcitx5-gtk/tags Fcitx5-gtkのGithub]にアクセスして、ソースコードをダウンロードする。<br>
[https://github.com/fcitx/fcitx5-gtk/tags Fcitx5-gtkのGithub]にアクセスして、ソースコードをダウンロードする。<br>
363行目: 389行目:
  make -j $(nproc)
  make -j $(nproc)
  make install
  make install
<br>
==== Fcitx5のデスクトップエントリファイルの作成 ====
Fcitx5の自動起動を設定するファイルを作成する。<br>
vi ~/.share/local/applications/org.fcitx.Fcitx5.desktop
# または
sudo vi /usr/share/applications/org.fcitx.Fcitx5.desktop
<br>
<syntaxhighlight lang="ini">
[Desktop Entry]
Type=Application
Name=Fcitx 5
Name[ja]=Fcitx 5
GenericName=Input Method
GenericName[ja]=入力メソッド
Comment=Start Input Method
Comment[ja]=入力メソッドを開始
Exec=/<Fcitx5のインストールディレクトリ>/bin/fcitx5
Icon=fcitx
Terminal=false
Categories=System;Utility;X-SuSE-DesktopUtility;
StartupNotify=false
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-Wayland-VirtualKeyboard=true
</syntaxhighlight>
<br>
==== Fcitx5の自動起動設定 ====
Fcitx5の自動起動を設定するファイルを作成する。<br>
vi ~/.config/autostart/org.fcitx.Fcitx5.desktop
# または
sudo vi /etc/xdg/autostart/org.fcitx.Fcitx5.desktop
<br>
<syntaxhighlight lang="ini">
# ~/.config/autostart/org.fcitx.Fcitx5.desktopファイル
# または
# /etc/xdg/autostart/org.fcitx.Fcitx5.desktopファイル
[Desktop Entry]
Type=Application
Name[ja]=Fcitx 5
Name=Fcitx 5
GenericName[ja]=入力メソッド
GenericName=Input Method
Comment[ja]=入力メソッドを開始
Comment=Start Input Method
Exec=/<Fcitx5のインストールディレクトリ>/bin/fcitx5
Icon=fcitx
Categories=System;Utility;X-SuSE-DesktopUtility;
Terminal=false
StartupNotify=false
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-Wayland-VirtualKeyboard=true
</syntaxhighlight>
<br>
==== D-Bus設定ファイルの作成 ====
Fcitx5のD-Bus設定ファイルを作成する。<br>
sudo vi /usr/share/dbus-1/services/org.fcitx.Fcitx5.service
<br>
<syntaxhighlight lang="ini>
# /usr/share/dbus-1/services/org.fcitx.Fcitx5.serviceファイル
[D-BUS Service]
Name=org.fcitx.Fcitx5
Exec=/<Fcitx5のインストールディレクトリ>/bin/fcitx5
</syntaxhighlight>
<br><br>
<br><br>


403行目: 499行目:
   
   
  LINUX_MOZC_BROWSER_COMMAND = "/usr/bin/xdg-open"
  LINUX_MOZC_BROWSER_COMMAND = "/usr/bin/xdg-open"
  LINUX_MOZC_ICONS_DIR = "/<Mozcのインストールディクトリ>/share/icons/mozc"
  LINUX_MOZC_ICONS_DIR       = "/<Mozcのインストールディクトリ>/share/icons/mozc"
  LINUX_MOZC_SERVER_DIR = "/<Mozcのインストールディクトリ>/lib/mozc"
  LINUX_MOZC_SERVER_DIR     = "/<Mozcのインストールディクトリ>/lib/mozc"
  LINUX_MOZC_DOCUMENT_DIR = LINUX_MOZC_SERVER_DIR + "/documents"
  LINUX_MOZC_DOCUMENT_DIR   = LINUX_MOZC_SERVER_DIR + "/documents"
  IBUS_COMPONENT_DIR = "/<Mozcのインストールディクトリ>/share/ibus/component"
  IBUS_COMPONENT_DIR         = "/<Mozcのインストールディクトリ>/share/ibus/component"
  IBUS_MOZC_INSTALL_DIR = "/<Mozcのインストールディクトリ>/share/ibus-mozc"
  IBUS_MOZC_INSTALL_DIR     = "/<Mozcのインストールディクトリ>/share/ibus-mozc"
  IBUS_MOZC_ICON_PATH = IBUS_MOZC_INSTALL_DIR + "/product_icon.png"
  IBUS_MOZC_ICON_PATH       = IBUS_MOZC_INSTALL_DIR + "/product_icon.png"
  IBUS_MOZC_PATH = "/<Mozcのインストールディクトリ>/lib/ibus-mozc/ibus-engine-mozc"
  IBUS_MOZC_PATH             = "/<Mozcのインストールディクトリ>/lib/ibus-mozc/ibus-engine-mozc"
  EMACS_MOZC_CLIENT_DIR = "/<Mozcのインストールディクトリ>/share/emacs/site-lisp/emacs-mozc"
  EMACS_MOZC_CLIENT_DIR     = "/<Mozcのインストールディクトリ>/share/emacs/site-lisp/emacs-mozc"
  EMACS_MOZC_HELPER_DIR = "/<Mozcのインストールディクトリ>/bin"
  EMACS_MOZC_HELPER_DIR     = "/<Mozcのインストールディクトリ>/bin"
<br>
<br>


420行目: 516行目:
<br>
<br>
* パッケージ管理システムからFcitx5をインストールしている場合
* パッケージ管理システムからFcitx5をインストールしている場合
  # src/src/WORKSPACE.bazelファイル
  # src/WORKSPACE.bazelファイル
  ## 111行目あたり
  ## 138行目あたり
   
   
  # Fcitx
  # Fcitx
439行目: 535行目:
<br>
<br>
* ソースコードからFcitx5をインストールしている場合
* ソースコードからFcitx5をインストールしている場合
  # src/src/WORKSPACE.bazelファイル
  # src/WORKSPACE.bazelファイル
  ## 111行目あたり
  ## 138行目あたり
   
   
  # Fcitx
  # Fcitx
451行目: 547行目:
  )
  )
   
   
# Fcitx 5
  new_local_repository(
  new_local_repository(
   name = "fcitx5",
   name = "fcitx5",
584行目: 681行目:
  </syntaxhighlight>
  </syntaxhighlight>
<br>
<br>
===== Mozcのウインドウレンダリングのソースコードの変更 =====
===== Mozcのウインドウレンダリングの変更 =====
  vi src/renderer/qt/qt_window_manager.cc
  vi src/renderer/qt/qt_window_manager.cc
<br>
<br>
  <syntaxhighlight lang="c++">
  <syntaxhighlight lang="c++">
  # src/renderer/qt/qt_window_manager.ccファイル
  // src/renderer/qt/qt_window_manager.ccファイル
  # 35行目あたり
  // 35行目あたり
# 編集前
   
   
  #include "absl/strings/str_cat.h"
  // 編集前
  #include "base/logging.h"
  #include "base/logging.h"
  #include "protocol/candidates.pb.h"
  #include "protocol/candidates.pb.h"
#include "absl/strings/str_cat.h"
  #include "renderer/renderer_style_handler.h"
  #include "renderer/renderer_style_handler.h"
  #include "renderer/window_util.h"
  #include "renderer/window_util.h"
   
   
  # 編集後
  // 編集後
  #include "absl/strings/str_cat.h"
  #include "absl/strings/str_cat.h"
  #include "base/logging.h"
  #include "base/logging.h"
609行目: 704行目:
<br>
<br>
  <syntaxhighlight lang="c++">
  <syntaxhighlight lang="c++">
  # src/renderer/qt/qt_window_manager.ccファイル
  // src/renderer/qt/qt_window_manager.ccファイル
  # 344行目あたり
  // 344行目あたり
   
   
  # 追加
  // 追加
  struct VirtualRect {
  struct VirtualRect {
     const QScreen* screen;
     const QScreen* screen;
650行目: 745行目:
<br>
<br>
  <syntaxhighlight lang="c++">
  <syntaxhighlight lang="c++">
  # src/renderer/qt/qt_window_manager.ccファイル
  // src/renderer/qt/qt_window_manager.ccファイル
  # 379行目あたり
  // 379行目あたり
# 編集前
   
   
// 編集前
  Point QtWindowManager::GetWindowPosition(
  Point QtWindowManager::GetWindowPosition(
     const commands::RendererCommand &command, const Size &win_size) {
     const commands::RendererCommand &command, const Size &win_size) {
670行目: 764行目:
  }
  }
   
   
  # 編集後
  // 編集後
  Point QtWindowManager::GetWindowPosition(
  Point QtWindowManager::GetWindowPosition(
     const commands::RendererCommand &command, const Size &win_size) {
     const commands::RendererCommand &command, const Size &win_size) {
689行目: 782行目:
  </syntaxhighlight>
  </syntaxhighlight>
<br>
<br>
===== IBus-Mozcの設定 =====
===== IBus-Mozcの設定 =====
  vi src/unix/ibus/gen_mozc_xml.py
  vi src/unix/ibus/gen_mozc_xml.py
749行目: 843行目:
  # Fcitx 5をソースコードからインストールしている場合
  # Fcitx 5をソースコードからインストールしている場合
   
   
  FCITX5_DIR="<Fcitx5のインストールディレクトリ>"; \
  export FCITX5_DIR="<Fcitx5のインストールディレクトリ>"; \
  export PATH="$FCITX5_DIR/bin:$PATH";     \
  export PATH="$FCITX5_DIR/bin:$PATH";                   \
  export LD_LIBRARY_PATH="$FCITX5_DIR/lib64:$FCITX5_DIR/lib:$LD_LIBRARY_PATH";                    \
  export LD_LIBRARY_PATH="$FCITX5_DIR/lib64:$FCITX5_DIR/lib:$LD_LIBRARY_PATH";                    \
  export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pkg-config --variable pc_path pkg-config)";          \
  export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pkg-config --variable pc_path pkg-config)";          \
865行目: 959行目:
最後に、PCを再起動する。<br>
最後に、PCを再起動する。<br>
<br><br>
<br><br>
{{#seo:
|title={{PAGENAME}} : Exploring Electronics and SUSE Linux | MochiuWiki
|keywords=MochiuWiki,Mochiu,Wiki,Mochiu Wiki,Electric Circuit,Electric,pcb,Mathematics,AVR,TI,STMicro,AVR,ATmega,MSP430,STM,Arduino,Xilinx,FPGA,Verilog,HDL,PinePhone,Pine Phone,Raspberry,Raspberry Pi,C,C++,C#,Qt,Qml,MFC,Shell,Bash,Zsh,Fish,SUSE,SLE,Suse Enterprise,Suse Linux,openSUSE,open SUSE,Leap,Linux,uCLnux,Podman,電気回路,電子回路,基板,プリント基板
|description={{PAGENAME}} - 電子回路とSUSE Linuxに関する情報 | This page is {{PAGENAME}} in our wiki about electronic circuits and SUSE Linux
|image=/resources/assets/MochiuLogo_Single_Blue.png
}}


__FORCETOC__
__FORCETOC__
[[カテゴリ:RHEL]][[カテゴリ:SUSE]]
[[カテゴリ:RHEL]][[カテゴリ:SUSE]]