1.下载搜狗输入法for linux源码包:

平台:Kubuntu 12.10 32

桌面环境:KDE 4.10


操作过程:

1.下载搜狗输入法for linux源码包:

fcitx-sogoupinyin_0.0.0.orig.tar.gz


2.由于搜狗输入法for linux依赖fcitx 4.2.6及以上版本,而ubuntu 12.10默认的版本较低,所以我们必须先升级fcitx

打开终端,添加fcitxppa

sudo add-apt-repository ppa:fcitx-team/nightly

然后刷新软件源:

sudo apt-get update

升级fcitx

已经安装过fcitx的执行此步:

sudo apt-get upgrade


未安装过fcitx的执行此步:

sudo apt-get install fcitx

 

Ubuntu默认的输入法为ibus,卸载之:

sudo apt-get remove ibus

3.安装依赖包

搜狗输入法for linux的编译大致需要以下几个依赖包debhelper  cmake intltool pkg-config fcitx-libs-dev ,安装即可:

sudo apt-get install debhelper  cmake intltool pkg-config fcitx-libs-dev 


4.编译安装

①打开终端,切换到源码包所在位置,比如在~/downloads中:

cd /downloads

②新建sougou文件夹,解压源码包到sougou文件夹中:

mkdir sougou

tar xvf fcitx-sogoupinyin_0.0.0.orig.tar.gz -C sougou/

③编译:

cd sougou

cmake .

make

④安装:

编译好的文件都在sougou文件夹中,我们把它们放到该放的地方:

sudo mkdir /usr/share/fcitx/sogou

sudo cp -r  sougou/Bin/SogouInput/ /usr/share/fcitx/sogou/

sudo cp sougou/src/fcitx-sogoupinyin.so /usr/lib/i386-linux-gnu/fcitx/

***注意,64位的ubuntu此步应该为:

sudo cp sougou/src/fcitx-sogoupinyin.so /usr/lib/x86_64-linux-gnu/fcitx/

****

sudo cp sougou/data/sogoupinyin.png  /usr/share/icons/hicolor/48x48/apps/

sudo cp sougou/src/fcitx-sogoupinyin.conf /usr/share/fcitx/addon/

sudo cp sougou/data/sogoupinyin.png /usr/share/fcitx/imicon/sogoupinyin.png


⑤重启fcitx使之生效:

killall fcitx

fcitx -d


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
sogou_toolchain.tar.gz 全志R16平台的tinav2.1平台的编译工具链 UNICODE全志tinav2.1的编译工具链的设置.txt 我的编译方法: 1、复制内核工具链到家目录R:\sogou\toolchain rootroot@rootroot-E400:~$ rootroot@rootroot-E400:~$ cd wyb/r16_tinav2.1/ rootroot@rootroot-E400:~/wyb/r16_tinav2.1$ cd prebuilt/gcc/linux-x86/arm/toolchain-sunxi/ rootroot@rootroot-E400:~/wyb/r16_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi$ cp toolchain/ ~/sogou/ -r rootroot@rootroot-E400:~/wyb/r16_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi$ tar zcvf toolchain.tar.gz toolchain/ rootroot@rootroot-E400:~/wyb/r16_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi$ cp toolchain.tar.gz ~/sogou/ rootroot@rootroot-E400:~/wyb/r16_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi$ cd ~/sogou/ rootroot@rootroot-E400:~/sogou$ tar zxvf toolchain.tar.gz 2、添加环境变量,在/etc/profile最后一行添加如下一句(需要root权限): export PATH="$PATH:/home/rootroot/sogou/toolchain/bin" export STAGING_DIR="$PATH:/home/rootroot/sogou/toolchain" .bashrc的最后输入: export PATH="$PATH:/home/rootroot/sogou/toolchain/bin" export STAGING_DIR="$PATH:/home/rootroot/sogou/toolchain" 3、输入arm-openwrt-linux-gcc -v检查是否可用(确认环境变量是否配置正确) rootroot@rootroot-E400:~/sogou$ arm-openwrt-linux-gcc -v Reading specs from /home/rootroot/sogou/toolchain/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/5.2.0/specs COLLECT_GCC=arm-openwrt-linux-muslgnueabi-gcc.bin COLLECT_LTO_WRAPPER=/home/rootroot/sogou/toolchain/bin/../libexec/gcc/arm-openwrt-linux-muslgnueabi/5.2.0/lto-wrapper Target: arm-openwrt-linux-muslgnueabi Configured with: /home/caiyongheng/tina_test/out/azalea-perf3/compile_dir/toolchain/gcc-5.2.0/configure --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt GCC 5.2.0 70-1-1' --prefix=/home/caiyongheng/tina_test/out/azalea-perf3/staging_dir/toolchain --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-openwrt-linux-muslgnueabi --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --without-isl --without-cloog --with-host-libstdcxx=-lstdc++ --with-gmp=/home/caiyongheng/tina_test/out/host --with-mpfr=/home/caiyongheng/tina_test/out/host --with-mpc=/home/caiyongheng/tina_test/out/host --disable-decimal-float --with-diagnostics-color=auto-if-env --disable-libssp --enable-__cxa_atexit --with-arch=armv7-a --with-float=hard --with-headers=/home/caiyongheng/tina_test/out/azalea-perf3/staging_dir/toolchain/include --disable-libsanitizer --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/caiyongheng/tina_test/out/azalea-perf3/staging_dir/toolchain/lib --enable-lto --with-libelf=/home/caiyongheng/tina_test/out/host Thread model: posix gcc version 5.2.0 (OpenWrt GCC 5.2.0 70-1-1) rootroot@rootroot-E400:~/sogou$ 4、创建工程目录record,在其中创建include、obj、lib、doc目录 5、所需的alsa头文件在R:\wyb\r16_tinav2.1\package\allwinner\liballwinner\LIBRARY\EXTERNAL\include\alsa,将其复制到工程目录中的include中 rootroot@rootroot-E400:~$ cd wyb/r16_tinav2.1/ rootroot@rootroot-E400:~/wyb/r16_tinav2.1$ cd package/allwinner/liballwinner/LIBRARY/EXTERNAL/include/ rootroot@rootroot-E400:~/wyb/r16_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/include$ cp alsa/ ~/sogou/record/include/ -r rootroot@rootroot-E400:~/wyb/r16_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/include$ 6、所需的so文件是R:\wyb\r16_tinav2.1\out\astar-parrot\staging_dir\target\usr\lib\libasound.so.2.0.0,将其复制到lib中,并改名为libasound.so 7、编辑record.c和Makefile Makefile文件的内容: CC=arm-openwrt-linux-g++ #CC=g++ DIR_OBJ=./obj DIR_INCLUDE=./include OBJ=record.o record:$(OBJ) $(CC) $(DIR_OBJ)/* -L./lib -lasound -o $@ %.o:%.c $(CC) -c $< -I$(DIR_INCLUDE) -o $(DIR_OBJ)/$@ clean: rm -f record $(DIR_OBJ)/* 8、 make clean make rootroot@rootroot-E400:~/sogou/record$ make clean rm -f record ./obj/* rootroot@rootroot-E400:~/sogou/record$ make arm-openwrt-linux-g++ -c record.c -I./include -o ./obj/record.o In file included from ./include/alsa/asoundlib.h:32:0, from record.c:13: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ In file included from ./include/alsa/ctl_macros.h:13:0, from ./include/alsa/control.h:54, from ./include/alsa/asoundlib.h:47, from record.c:13: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ In file included from ./include/alsa/pcm_macros.h:13:0, from ./include/alsa/pcm.h:116, from ./include/alsa/asoundlib.h:48, from record.c:13: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ In file included from ./include/alsa/hctl_macros.h:13:0, from ./include/alsa/hcontrol.h:36, from ./include/alsa/mixer.h:25, from ./include/alsa/asoundlib.h:49, from record.c:13: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ In file included from ./include/alsa/mixer_macros.h:13:0, from ./include/alsa/mixer.h:72, from ./include/alsa/asoundlib.h:49, from record.c:13: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ In file included from record.c:17:0: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ arm-openwrt-linux-g++ ./obj/* -L./lib -lasound -o record rootroot@rootroot-E400:~/sogou/record$

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值