Author Archives: csslayer

My CMake Tutorial 2

其实我的感觉是大家都被我第一篇给蒙骗了……从第二篇开始我就要开始走非主流路线。 如何 make uninstall cmake是没有make uninstall支持的。 你可能觉得很无语。不过还是有方法的,这个方法也被应用于fcitx的每个项目当中。另外如果你使用KDE的话 – find_package(KDE4) – 那么KDE也会自动提供uninstall,不用你麻烦了。 那么现在来看看这是怎么实现的。 在make install的时候,cmake会生成一个文件 install_manifest.txt ,里面是要安装的文件。而uninstall的基本思想就是读他,然后把里面列出的文件删掉。 一般而言我会这么做,新建一个文件夹叫cmake,然后在里面放上以下内容的文件,命名为cmake_uninstall.cmake.in。 if (NOT EXISTS “@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt”)     message(FATAL_ERROR “Cannot find install manifest: \”@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\””) endif(NOT EXISTS “@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt”) file(READ “@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt” files) string(REGEX REPLACE “\n” “;” files “${files}”) … Continue reading

Posted in cmake | Tagged | 3 Comments

围观对岸的输入法小风波

围观而已。 GCIN & HIME http://moto.debian.tw/viewtopic.php?f=49&t=16373 http://moto.debian.tw/viewtopic.php?f=49&t=16384 估计他们想不到这边还有个坐在几千公里外的fcitx开发者在远处……

Posted in Linux | 8 Comments

fcitx-libpinyin & fcitx-table-extra

其实是前几天才看到有0.3发布了,于是这几天开始完成fcitx-libpinyin,没想到真的和在Twitter上说的一样是3天的事情。目前已经基本完成了,除非要增加额外libpinyin没提供的功能,现在拼音,双拼,以及注音都应该可以正常工作。 代码: https://github.com/fcitx/fcitx-libpinyin 需要 fcitx-git 的代码(4.2)。 想要使用cloudpinyin的话,也请使用 fcitx-cloudpinyin 的 git 代码(其实也就是增加几个输入法名称判断而已。)。注音不能用 fcitx-cloudpinyin(考虑到用词不同……意义不大)。 fcitx-table-extra 包含了额外码表,需要 fcitx 4.2 (git),因为需要码表新的支持。目前包含郑码(专利已过期),仓颉,和嘸蝦米(专利已过期)。 https://github.com/fcitx/fcitx-table-extra 顺带一提,fcitx-libpinyin实现代码量 1154 行。 嘛,算个fcitx的伪圣诞礼物?开始写的时候可没想这么多……

Posted in fcitx development | Tagged , , , , | 5 Comments

My CMake Tutorial 1

CMake 是一个跨平台的开源构建系统。 1、CMake的诞生 既然维基百科有我就不多说了。 http://zh.wikipedia.org/wiki/CMake 2、为什么要使用CMake http://lwn.net/Articles/188693/  Why the KDE project switched to CMake — and how 原因之一是跨平台,本来他们想采用 SCons 作为构建系统, 但在跨平台上遇见了许多问题。CMake的优势在于它只依赖于C++编译器,跨平台,可以生成各个平台特定的Makefile和工程文件,并且支持单元测试。 另外一点就是性能,但我一时间找不到具体的引用了。 3、使用CMake的基本方法 mkdir build cd build cmake .. make make install 针对一般用户来说就是以上内容,和当年的传统 configure make 很像吧? 4、第一个项目 cmake_minimum_required (VERSION 2.6) … Continue reading

Posted in cmake | Tagged | 4 Comments

Fcitx 4.2 Plan

Feature Plan: XKB Integration. (Done) DBus based input method interface, make it possible to write input method with other programming language and other high level library, like glib or qt. (WIP) (Not one will actually eat this dog food, and … Continue reading

Posted in fcitx development | 8 Comments