cht電腦資訊gcin
adm Find login register

gcin source 2.8.4 released

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
1subject: gcin source 2.8.4 releasedPromote 0 Bookmark 02015-10-08quote  
2.8.4
- gtab 使用彈出式 window 沒有自動隱藏。
- 如果 compile 時有用 Ubuntu indicator,則內定的 icon 顯示為 indicator.
- 倚天26鍵&許氏注音鍵盤輸入「生」時沒有顯示正確的注音。
- ubuntu indicator icon problem
- ()[]\ 如果不是 gtab 鍵時,按了之後會自動送出內容。
- gtab 輸入法沒有開啟自動選字/預選詞(如行列)也可以使用英數的預選詞。不需要者可以在「內定輸入法開啟關閉→編輯區英數預選詞  」關閉
- 在firefox/chrome 有時候不正常
- 詞音在選字時,←→鍵可用來切換上下頁。
yochenhsieh
joined: 2009-11-16
posted: 29
promoted:
bookmarked:
2subject: Promote 0 Bookmark 02015-10-10quote  

不好意思

Mageia 需要在 qt5-im/Makefile 加上
INCS+=-I/usr/lib64/qt5/include/QtGui/$(MODVERSION)/QtGui/ -I/usr/lib/qt5/include/QtGui/$(MODVERSION)/QtGui/

可能有更好的辦法 不過目前還沒找到
先麻煩您幫忙了

guest
3subject: Promote 0 Bookmark 02015-10-11quote  

我下載了gcin-2.8.4 用在gentoo的lxqt上面,

發現pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags

的QtDBus要改為Qt5DBus才能正常編譯

否則會出現以下錯誤訊息:

Package QtDBus was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtDBus.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtDBus' found
In file included from gcin-qt5.h:3:0,
                 from moc_gcin-qt5.cpp:9:
/usr/include/qt5/QtGui/5.4.2/QtGui/qpa/qplatforminputcontextplugin_p.h:48:28: 嚴重錯誤:QtCore/qplugin.h:沒有此一檔案或目錄
 #include <QtCore/qplugin.h>

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
4subject: Promote 0 Bookmark 02015-10-12quote  

guest
的QtDBus要改為Qt5DBus才能正常編譯

gentoo 的 naming 與別人不一樣,我想這還是交給 packager 自己用 patch 處理。

czchen
joined: 2014-04-15
posted: 3
promoted:
bookmarked:
5subject: Promote 0 Bookmark 02015-10-15quote  

yochenhsieh

不好意思

Mageia 需要在 qt5-im/Makefile 加上
INCS+=-I/usr/lib64/qt5/include/QtGui/$(MODVERSION)/QtGui/ -I/usr/lib/qt5/include/QtGui/$(MODVERSION)/QtGui/

可能有更好的辦法 不過目前還沒找到
先麻煩您幫忙了

用 pkg-config ?

INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
6subject: Promote 0 Bookmark 02015-10-16quote  

czchen
INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui

感謝,真的可以用,這樣就不用亂七八糟的 INC 了。

yochenhsieh
joined: 2009-11-16
posted: 29
promoted:
bookmarked:
7subject: Promote 0 Bookmark 02015-10-16quote  

czchen

 

用 pkg-config ?

INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui

謝謝 剛才試過這樣也能用 而且應該可以適合大部分distro

edited: 1
guest
8subject: 提供在 MANJARO XFCE 15.09 版編譯時所需的 PATCHPromote 0 Bookmark 02015-10-18quote  

czchen

 

用 pkg-config ?

INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui

 

企盼多時的2.8.4版推出後,為了嚐鮮,所以就在 MANJARO XFCE 15.09 64位元版的 LiveDVD 環境中自己編譯。過程中我修改了四個檔案,除了少部分是自己的判斷外,大多數修改的依據都是在本站耙文所得,因為作者好像忘了把某些人對上一版之缺點所提出的解法一併納入2.8.4版之中。以下是文字說明:

(1) 修正 configure

  * 修正依據:http://hyperrate.com/thread.php?tid=31470#31470 所反映的方法。另外,受到本棟5樓czchen所提供方法的啟發,在決定 QT5_IM_DIR 的資料時也改用透過pkg-config的方式。還有,在 BUILD_MODULE='Y' 這一列之後的 if 敘述(共有三列)其實是多餘的,可以刪掉。

(2) 修正 qt5-im/Makefile

  * 修正依據:採用本棟5樓czchen所提供的修正方法。其次,IMMODULES 的資料其實就是等於 config.mak 之中的 QT5_IM_DIR,所以加以簡化,直接拿來用就行了。最後,MANJARO 在QT5當中的package有Qt5DBus但沒有QtDBus,所以把這個檔案中的QtDBus改成Qt5DBus。

(3) 修正 qt5-im/gcin-qt5.h

 * 修正依據:http://hyperrate.com/thread.php?tid=31756#31756 以及 http://hyperrate.com/thread.php?tid=31752#31752 所提出的方法。

(4) 修正 qt4-im/Makefile

  * 修正依據:仿照 qt5-im/Makefile 的修改方式(但「QtDBus改成Qt5DBus」除外)

=============

為了方便起見,我把上述修正的PATCH提供如下所示,MANJARO XFCE的用戶只要把PATCH應用到2.8.4版的原始碼,然後執行下列指令:

tar xJf gcin-2.8.4.tar.xz

patch < 以下的PATCH內容存成一個文字檔

cd gcin-2.8.4

./configure --prefix=/usr

make

sudo make install

sudo ldconfig

sudo gtk-query-immodules-2.0 --update-cache

sudo gtk-query-immodules-3.0 --update-cache

並把以下5列的資料加到 ~/.xprofile 的最後面:

export LC_CTYPE=$LANG
export XMODIFIERS=@im=gcin
export GTK_IM_MODULE=gcin
export QT_IM_MODULE=gcin
exec gcin&

最後,只要登出再登入,就可以使用gcin了。

======以下是PATCH的內容=======

--- gcin-2.8.4/configure.ORIG    2015-04-15 22:23:15.000000000 +0000
+++ gcin-2.8.4/configure    2015-10-18 03:41:26.493846650 +0000
@@ -1,4 +1,4 @@
-##!/bin/bash
+#!/bin/bash
 
 
 if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]; then
@@ -244,7 +244,10 @@
 
 
 QT5_IM='N'
-QT5_IM_DIR=/usr/$LIB/qt5/plugins/platforminputcontexts
+#QT5_IM_DIR=/usr/$LIB/qt5/plugins/platforminputcontexts
+__ZZZ__=`pkg-config --variable=host_bins Qt5Core`
+QT5_IM_DIR=`dirname $__ZZZ__`/plugins/platforminputcontexts
+__ZZZ__=
 echo "testing if you have qt5 support"
 pkg-config --libs Qt5Core Qt5Gui > /dev/null 2> /dev/null
 if [ $? = 0 ]; then
@@ -339,11 +342,12 @@
 
 
 BUILD_MODULE='Y'
-if [ $USE_ANTHY = 'Y' ] || [ $USE_CHEWING = 'Y' ]; then
-  BUILD_MODULE='Y'
-fi
+##if [ $USE_ANTHY = 'Y' ] || [ $USE_CHEWING = 'Y' ]; then
+#if [ "$USE_ANTHY" = 'Y' ] || [ "$USE_CHEWING" = 'Y' ]; then
+#  BUILD_MODULE='Y'
+#fi
 
-OPTFLAGS="-g -O"
+OPTFLAGS="-O"
 
 if [ -z $CC ]; then
   CC=gcc
--- gcin-2.8.4/qt5-im/Makefile.ORIG    2015-06-21 08:16:35.000000000 +0000
+++ gcin-2.8.4/qt5-im/Makefile    2015-10-18 03:56:53.633898015 +0000
@@ -1,13 +1,16 @@
 include ../config.mak
-QT=qt5
-QTIM=$(QT)/plugins/platforminputcontexts
-IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+#QT=qt5
+#QTIM=$(QT)/plugins/platforminputcontexts
+#IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+IMMODULES=$QT5_IM_DIR
 
-INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags`
+#INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags`
+INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport Qt5DBus --cflags`
 # dirty fix for ubuntu 14.04,  pkg-config Qt5Gui --cflags return -I/usr/include/qt5/QtGui, missing 5.2.1/QtGui
 MODVERSION=`pkg-config --modversion Qt5Gui`
-INCS+=-I/usr/include/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/i386-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
-INCS+=-I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
+#INCS+=-I/usr/include/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/i386-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
+#INCS+=-I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
+INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui
 
 CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="0$(GCIN_DEBUG)"
 OBJS= moc_gcin-qt5.o gcin-qt5.o gcin-imcontext-qt5.o moc_qgcinplatforminputcontext.o
--- gcin-2.8.4/qt5-im/gcin-qt5.h.ORIG    2014-11-02 08:47:00.000000000 +0000
+++ gcin-2.8.4/qt5-im/gcin-qt5.h    2015-10-18 02:35:26.040293841 +0000
@@ -9,7 +9,7 @@
 {
     Q_OBJECT
 public:
-    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "gcin.json")
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" FILE "gcin.json")
     QStringList keys() const;
     QGcinPlatformInputContext *create(const QString& system, const QStringList& paramList);
 };
--- gcin-2.8.4/qt4-im/Makefile.ORIG    2012-03-05 12:26:54.000000000 +0000
+++ gcin-2.8.4/qt4-im/Makefile    2015-10-18 03:58:29.183903317 +0000
@@ -1,7 +1,8 @@
 include ../config.mak
-QT=qt4
-QTIM=$(QT)/plugins/inputmethods
-IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+#QT=qt4
+#QTIM=$(QT)/plugins/inputmethods
+#IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+IMMODULES=$QT4_IM_DIR
 
 INCS=-I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags`
 CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED \

guest
9subject: 提供在 MANJARO XFCE 15.09 版編譯時所需的 PATCHPromote 0 Bookmark 02015-10-18quote  

guest

 

=============

為了方便起見,我把上述修正的PATCH提供如下所示,MANJARO XFCE的用戶只要把PATCH應用到2.8.4版的原始碼,然後執行下列指令:

tar xJf gcin-2.8.4.tar.xz

patch < 以下的PATCH內容存成一個文字檔

cd gcin-2.8.4

./configure --prefix=/usr

make

sudo make install

sudo ldconfig

sudo gtk-query-immodules-2.0 --update-cache

sudo gtk-query-immodules-3.0 --update-cache

並把以下5列的資料加到 ~/.xprofile 的最後面:

export LC_CTYPE=$LANG
export XMODIFIERS=@im=gcin
export GTK_IM_MODULE=gcin
export QT_IM_MODULE=gcin
exec gcin&

最後,只要登出再登入,就可以使用gcin了。

...(略)...

 

 

抱歉,上面一篇有一點小錯誤,請把修改其中2列之順序以及參數,詳細如下所示:

#以下為修正前的內容

patch < 以下的PATCH內容存成一個文字檔

cd gcin-2.8.4

#以下為修正後的內容

cd gcin-2.8.4

patch -p 1 < 以下的PATCH內容存成一個文字檔

descent
joined: 2015-05-14
posted: 3
promoted:
bookmarked:
10subject: 提供在 MANJARO XFCE 15.09 版編譯時所需的 PATCHPromote 0 Bookmark 02015-11-13quote  

guest

並把以下5列的資料加到 ~/.xprofile 的最後面:

export LC_CTYPE=$LANG
export XMODIFIERS=@im=gcin
export GTK_IM_MODULE=gcin
export QT_IM_MODULE=gcin
exec gcin&

感謝, 我終於可以在 debian/qt5 使用 gcin 輸入中文了。

guest
11subject: 提供在 MANJARO XFCE 15.09 版編譯時所需的 PATCHPromote 0 Bookmark 02015-11-21quote  

各位好,我在這棟大樓先前已建了第8樓及第9樓,而剛才發現我沒有把第8樓第(3)點所提的第一個鏈結(http://hyperrate.com/thread.php?tid=31756#31756)的內容給好好看完,真是對不起作者felixonmars大大。felixonmars大大在文中最後面所寫的大意是說與其把org.qt-project.Qt.QPlatformInputContextFactoryInterface改寫成org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1,還不如改用QPlatformInputContextFactoryInterface_iid這用巨集。(註:至於原因為何,有興趣的人可以參考我在網路上所找到的文章https://github.com/maliit/framework/issues/13,簡單講起來就是可以增加程式原始碼的相容性,不論Qt5的版本究竟是5.5.0以前還是以後的都能適用)

因此我就修改了第8樓的PATCH檔內容(註:其實就只改了其中一列而已),內容如下:


--- gcin-2.8.4/configure.ORIG    2015-04-15 22:23:15.000000000 +0000
+++ gcin-2.8.4/configure    2015-10-18 03:41:26.493846650 +0000
@@ -1,4 +1,4 @@
-##!/bin/bash
+#!/bin/bash
 
 
 if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]; then
@@ -47,7 +47,8 @@
   SO_FLAGS="-dynamic -bundle -undefined suppress -flat_namespace"
 fi
 
-prefix="/usr/local"
+#prefix="/usr/local"
+prefix="/usr"
 use_xim='Y'
 use_tray='Y'
 use_i18n='N'
@@ -244,7 +245,10 @@
 
 
 QT5_IM='N'
-QT5_IM_DIR=/usr/$LIB/qt5/plugins/platforminputcontexts
+#QT5_IM_DIR=/usr/$LIB/qt5/plugins/platforminputcontexts
+__ZZZ__=`pkg-config --variable=host_bins Qt5Core`
+QT5_IM_DIR=`dirname $__ZZZ__`/plugins/platforminputcontexts
+__ZZZ__=
 echo "testing if you have qt5 support"
 pkg-config --libs Qt5Core Qt5Gui > /dev/null 2> /dev/null
 if [ $? = 0 ]; then
@@ -339,11 +343,12 @@
 
 
 BUILD_MODULE='Y'
-if [ $USE_ANTHY = 'Y' ] || [ $USE_CHEWING = 'Y' ]; then
-  BUILD_MODULE='Y'
-fi
+##if [ $USE_ANTHY = 'Y' ] || [ $USE_CHEWING = 'Y' ]; then
+#if [ "$USE_ANTHY" = 'Y' ] || [ "$USE_CHEWING" = 'Y' ]; then
+#  BUILD_MODULE='Y'
+#fi
 
-OPTFLAGS="-g -O"
+OPTFLAGS="-O"
 
 if [ -z $CC ]; then
   CC=gcc
--- gcin-2.8.4/qt5-im/Makefile.ORIG    2015-06-21 08:16:35.000000000 +0000
+++ gcin-2.8.4/qt5-im/Makefile    2015-10-18 03:56:53.633898015 +0000
@@ -1,13 +1,16 @@
 include ../config.mak
-QT=qt5
-QTIM=$(QT)/plugins/platforminputcontexts
-IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+#QT=qt5
+#QTIM=$(QT)/plugins/platforminputcontexts
+#IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+IMMODULES=$(QT5_IM_DIR)
 
-INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags`
+#INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags`
+INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport Qt5DBus --cflags`
 # dirty fix for ubuntu 14.04,  pkg-config Qt5Gui --cflags return -I/usr/include/qt5/QtGui, missing 5.2.1/QtGui
 MODVERSION=`pkg-config --modversion Qt5Gui`
-INCS+=-I/usr/include/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/i386-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
-INCS+=-I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
+#INCS+=-I/usr/include/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/i386-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
+#INCS+=-I/usr/include/x86_64-linux-gnu/qt5/QtGui/$(MODVERSION)/QtGui
+INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui
 
 CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="0$(GCIN_DEBUG)"
 OBJS= moc_gcin-qt5.o gcin-qt5.o gcin-imcontext-qt5.o moc_qgcinplatforminputcontext.o
@@ -36,8 +39,8 @@
         install -d $(DESTDIR)/$(QT5_IM_DIR); \
         install -m 755 $(GCIN_QT5) $(DESTDIR)/$(QT5_IM_DIR); \
     else \
-        install -d $(IMMODULES); \
-                install -m 755 $(GCIN_QT5) $(IMMODULES); \
+        install -d $(DESTDIR)/$(IMMODULES); \
+        install -m 755 $(GCIN_QT5) $(DESTDIR)/$(IMMODULES); \
     fi
 clean:
     rm -f $(OBJS) $(GCIN_QT5) *~ core.* *moc*.cpp *.E .depend
--- gcin-2.8.4/qt5-im/gcin-qt5.h.ORIG    2014-11-02 08:47:00.000000000 +0000
+++ gcin-2.8.4/qt5-im/gcin-qt5.h    2015-11-21 01:20:21.010293811 +0000
@@ -9,7 +9,7 @@
 {
     Q_OBJECT
 public:
-    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "gcin.json")
+    Q_PLUGIN_METADATA(IID "QPlatformInputContextFactoryInterface_iid" FILE "gcin.json")
     QStringList keys() const;
     QGcinPlatformInputContext *create(const QString& system, const QStringList& paramList);
 };
--- gcin-2.8.4/qt4-im/Makefile.ORIG    2012-03-05 12:26:54.000000000 +0000
+++ gcin-2.8.4/qt4-im/Makefile    2015-10-18 03:58:29.183903317 +0000
@@ -1,7 +1,8 @@
 include ../config.mak
-QT=qt4
-QTIM=$(QT)/plugins/inputmethods
-IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+#QT=qt4
+#QTIM=$(QT)/plugins/inputmethods
+#IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)
+IMMODULES=$(QT4_IM_DIR)
 
 INCS=-I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags`
 CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED \
@@ -26,8 +27,8 @@
         install -d $(DESTDIR)/$(QT4_IM_DIR); \
         install -m 755 im-gcin.so $(DESTDIR)/$(QT4_IM_DIR); \
     else \
-        install -d $(IMMODULES); \
-                install -m 755 im-gcin.so $(IMMODULES); \
+        install -d $(DESTDIR)/$(IMMODULES); \
+        install -m 755 im-gcin.so $(DESTDIR)/$(IMMODULES); \
     fi
 clean:
     rm -f $(OBJS) im-gcin.so *~ core.* *moc*.cpp *.E .depend

guest
12subject: Promote 0 Bookmark 02015-11-29quote  

我在Manjaro KDE 15.09六十四位元版(既有Qt4也有Qt5,而Qt5是5.5.0版;另有gtk-query-immodules-2.0及gtk-query-immodules-3.0)compile gcin 2.8.4,並採用第8,9,11篇貼文的補丁,結果就很順利地完成compile以及install。

可是遇到3個困難,第1個是滑鼠click螢幕右下方的gcin小圖示之後,並不會列出一堆我所勾選的輸入法,而只有列出一個英文輸入法(如下面的螢幕擷圖)。<img src="http://i.imgur.com/YcDYXEc.png">

第2個困難是:雖然在使用LibreOffice Writer時可以使用Ctrl-Space,也能用Ctrl-Shift來改變中文輸入法。可是執行Qt Assistant時,按Edit選單中的Find Text後,準備要輸入想搜尋的中文字時,Ctrl-Space與Ctrl-Shift都沒有作用,也就無法叫出中文輸入法來用。

第3個困難是,我在~/.gcin/icons放了一些winlin所製作的icons,可是卻沒有產生作用。正常的話,應該放進去之後就馬上生效,圖示就改成自訂的才對。

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
13subject: Promote 0 Bookmark 02015-11-30quote  

guest

第3個困難是,我在~/.gcin/icons放了一些winlin所製作的icons,可是卻沒有產生作用。正常的話,應該放進去之後就馬上生效,圖示就改成自訂的才對。

關於這個,記得重新啟動gcin。
如果這樣還沒生效,那就把圖示放到gcin icon的系統資料夾取代原來的icon,一般是放在:
/usr/share/icons/gcin/
放好後,然後再重新啟動gcin試試。

-------------------------------------------------------------------
好用的gcin連結:

felixonmars
joined: 2015-09-11
posted: 3
promoted:
bookmarked:
Wuhan, China
14subject: Promote 0 Bookmark 02016-03-17quote  

Qt 5.6 不再提供 Qt5PlatformSupport.pc,去掉 Makefile 里 pkg-config 调用中对应的部分即可顺利编译:

sed -i 's/Qt5PlatformSupport//' qt5-im/Makefile

guest
15subject: Promote 0 Bookmark 02016-07-18quote  

請教個問題,我依照前述修正後,可以編譯了。

然而在configure時顯示

QT5_MOC=/usr/lib/qt5/bin/moc

明明我是 /usr/lib64/qt5/bin/moc

  for i in /usr/share/qt5/bin/moc /usr/lib/qt5/bin/moc\

/usr/lib/x86_64-linux-gnu/qt5/bin/moc\ 

/usr/lib/i38 /usr/bin/moc6-linux-gnu/qt5/bin/moc\

/usr/lib64/qt5/bin/moc

  do
    [ ! -x $i ] && continue
    QT5_MOC=$i
    echo "QT5_MOC=$QT5_MOC"
    break
  done

很奇怪的抓錯了

 

另外在安裝時

libgcinplatforminputcontextplugin.so
裝在根目錄下的 /T5_IM_DIR 這個目錄

明顯的 qt5-im下的Makefile中的

        else \
                install -d $(DESTDIR)/$(IMMODULES); \
                install -m 755 $(GCIN_QT5) $(DESTDIR)/$(IMMODULES); \

路徑出錯了

現在只能用確定的目錄修改。

guest
16subject: Promote 0 Bookmark 02016-07-20quote  

在gentoo下終於可以使用gcin

qt5下也沒有發生問題

主要修正了QT5_MOC的路徑

將for i in /usr/share/qt5/bin/moc /usr/lib/qt5/bin/moc /usr/lib/x86_64-linux-gnu/qt5/bin/moc /usr/lib/i386-linux-gnu/qt5/bin/moc /usr/lib64/qt5/bin/moc /usr/bin/moc

的/usr/lib64/qt5/bin/moc 改到 for i in的後面,這樣就可以找到正確路徑

另外qt5-im/gcin-qt5.h也要改為

Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" FILE "gcin.json")

11樓的方式不能使用還有qt5-im/Makefile

INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5DBus --cflags`

INCS+=-I`pkg-config --variable=includedir Qt5Gui`/QtGui/$(MODVERSION)/QtGui

LDFLAGS=-L../im-client -lgcin-im-client `pkg-config Qt5Core Qt5Gui --libs`

這些地方改好

在gentoo下使用手動修改記的要用ebuild path/file.ebuild command的方式

像我就是使用

ebuild /usr/local/portage/app-i18n/gcin/gcin-2.8.4.ebuild clean

ebuild /usr/local/portage/app-i18n/gcin/gcin-2.8.4.ebuild prepare

cd /var/tmp/portage/app-i18n/gcin-2.8.4/work

ebuild /usr/local/portage/app-i18n/gcin/gcin-2.8.4.ebuild configure

ebuild /usr/local/portage/app-i18n/gcin/gcin-2.8.4.ebuild compile

ebuild /usr/local/portage/app-i18n/gcin/gcin-2.8.4.ebuild install

ebuild /usr/local/portage/app-i18n/gcin/gcin-2.8.4.ebuild qmerge

記的要 emerge --noreplace app-i18n/gcin把gcin加入'world'

guest
17subject: Promote 0 Bookmark 02016-08-03quote  

所以現在ubuntu 16.04無法使用gcin就是了。有打算要先處理那個問題嗎?

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
18subject: Promote 0 Bookmark 02016-08-03quote  

guest
所以現在ubuntu 16.04無法使用gcin就是了。
可以用,用本站的 Ubuntu 15.10 的版本,只是 qt5 無法使用。目前不知道如何解決 16.04 qt5 的問題。

edited: 2
guest
19subject: Promote 0 Bookmark 02016-08-03quote  

我是需要qt5的.....,我目前只有再等gcin的qt5 work我才可能轉到kde5去了

guest
20subject: Promote 0 Bookmark 02016-08-04quote  

我意外地修好qt5的plugin,我只是把他改名+用cmake編譯,還有一些跟fcitx qt5 module的對照,他就正常了...

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
21subject: Promote 0 Bookmark 02016-08-04quote  

guest
我意外地修好qt5的plugin,我只是把他改名+用cmake編譯,還有一些跟fcitx qt5 module的對照,他就正常了...

可以提供 patch (diff) 嗎?

edited: 1
guest
22subject: Promote 0 Bookmark 02016-08-04quote  

他又不能用了,殘念

guest
23subject: Promote 0 Bookmark 02016-08-04quote  

好像是測試錯誤,kdevelop在kde5還是使用qt4的函式庫

guest
24subject: Promote 0 Bookmark 02016-08-05quote  

我確定問題在哪裡了,

gcin除了那個IID版本要改成org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1外。
你的plugin安裝位置再16.04好像是錯的。
16.04的plugin必須放在/usr/lib/x86_64-linux-gnu/qt5/platforminputcontexts 

如果不能用的話講一下,我是使用ubuntu的gcin 下載下來的source

diff --git a/configure b/configure
index 7df0567..aa38370 100755
--- a/configure
+++ b/configure
@@ -244,7 +244,7 @@ fi


QT5_IM='N'
-QT5_IM_DIR=/usr/$LIB/qt5/plugins/platforminputcontexts
+QT5_IM_DIR=/usr/$LIB/x86_64-linux-gnu/qt5/plugins/platforminputcontexts
echo "testing if you have qt5 support"
pkg-config --libs Qt5Core Qt5Gui > /dev/null 2> /dev/null
if [ $? = 0 ]; then
diff --git a/qt5-im/Makefile b/qt5-im/Makefile
index 015a6c4..b3bc335 100644
--- a/qt5-im/Makefile
+++ b/qt5-im/Makefile
@@ -1,6 +1,6 @@
include ../config.mak
QT=qt5
-QTIM=$(QT)/plugins/platforminputcontexts
+QTIM=x86_64-linux-gnu/$(QT)/plugins/platforminputcontexts
IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM)

INCS=-I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags`
diff --git a/qt5-im/gcin-qt5.h b/qt5-im/gcin-qt5.h
index 63aacc0..0f958af 100644
--- a/qt5-im/gcin-qt5.h
+++ b/qt5-im/gcin-qt5.h
@@ -9,7 +9,7 @@ class QGcinPlatformInputContextPlugin : public QPlatformInputContextPlugin
{
Q_OBJECT
public:
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "gcin.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" FILE "gcin.json")
QStringList keys() const;
QGcinPlatformInputContext *create(const QString& system, const QStringList& paramList);
};

 

guest
25subject: Promote 0 Bookmark 02016-08-05quote  

修正patch,只是忽略qt5-im的makefile修改

剛剛嘗試原本的source,看起來可以用。

有一點忘了講的是,ubuntu 16.04的qt 5.5.1,讀取的環境變數是QT_IM_MODULE


diff --git a/configure b/configure
index 7df0567..aa38370 100755
--- a/configure
+++ b/configure
@@ -244,7 +244,7 @@ fi


QT5_IM='N'
-QT5_IM_DIR=/usr/$LIB/qt5/plugins/platforminputcontexts
+QT5_IM_DIR=/usr/$LIB/x86_64-linux-gnu/qt5/plugins/platforminputcontexts
echo "testing if you have qt5 support"
pkg-config --libs Qt5Core Qt5Gui > /dev/null 2> /dev/null
if [ $? = 0 ]; then
diff --git a/qt5-im/gcin-qt5.h b/qt5-im/gcin-qt5.h
index 63aacc0..0f958af 100644
--- a/qt5-im/gcin-qt5.h
+++ b/qt5-im/gcin-qt5.h
@@ -9,7 +9,7 @@ class QGcinPlatformInputContextPlugin : public QPlatformInputContextPlugin
{
Q_OBJECT
public:
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "gcin.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" FILE "gcin.json")
QStringList keys() const;
QGcinPlatformInputContext *create(const QString& system, const QStringList& paramList);
};

guest
26subject: Promote 0 Bookmark 02016-08-05quote  

修好之後遇到之前他們講的問題,修改QT_IM_MODULE造成KDE5無法登入。
之前那個文章的修正再我的code已經沒有了,還要再查一下原因 

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
27subject: Promote 0 Bookmark 02016-08-05quote  

試了你的 patch, 仍然無法使用。測試 kate, konsole 都不行。

QT 不需要 login KDE 就可以測試,直接在 terminal 執行 kate, konsole。

otakuxtom
joined: 2016-08-05
posted: 15
promoted:
bookmarked:
Taiwan
28subject: Promote 0 Bookmark 02016-08-06quote  

你還需要export QT_IM_MODULE=gcin,然後再konsole執行kate。
要確認你的libgcin的im module式放在對的地方,不是/usr/lib/qt5 

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
29subject: Promote 0 Bookmark 02016-08-06quote  

otakuxtom
你還需要export QT_IM_MODULE=gcin
有,可是還是不行

otakuxtom
joined: 2016-08-05
posted: 15
promoted:
bookmarked:
Taiwan
30subject: Promote 0 Bookmark 02016-08-06quote  

那就怪了,我記得我有測試過,確實生效勒....

1,2,next

cht電腦資訊gcin
adm Find login register
views:107403