Difference between revisions of "Create your first Fcitx addon"

From Fcitx
Jump to navigation Jump to search
(Created page with "<languages/> <translate> == Tool to use == IDE: [http://www.kdevelop.org/ kdevelop] newer than 4.5. Build system: [http://www.cmake.org CMake] newer than 2.8. Fcitx librar...")
 
m (Text replacement - "<translate1>" to "<translate>")
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
<translate>
 
<translate>
 
+
== Tool to use == <!--T:1-->
== Tool to use ==
 
 
IDE: [http://www.kdevelop.org/ kdevelop] newer than 4.5.
 
IDE: [http://www.kdevelop.org/ kdevelop] newer than 4.5.
  
 +
<!--T:2-->
 
Build system: [http://www.cmake.org CMake] newer than 2.8.
 
Build system: [http://www.cmake.org CMake] newer than 2.8.
  
 +
<!--T:3-->
 
Fcitx library and headers: newer than 4.2.7.
 
Fcitx library and headers: newer than 4.2.7.
  
 +
<!--T:4-->
 
The reason why I choose kdevelop here is it supports cmake, and has great template system you can easily use.
 
The reason why I choose kdevelop here is it supports cmake, and has great template system you can easily use.
  
== Step by step ==
+
== Step by step == <!--T:5-->
 
* Create new project
 
* Create new project
  
 +
<!--T:6-->
 
[[File:Kdev-fcitx1.png|600px]]
 
[[File:Kdev-fcitx1.png|600px]]
  
 +
<!--T:7-->
 
* Download fcitx template with KDevelop
 
* Download fcitx template with KDevelop
  
 +
<!--T:8-->
 
[[File:Kdev-fcitx2.png|600px]]
 
[[File:Kdev-fcitx2.png|600px]]
  
 +
<!--T:9-->
 
[[File:Kdev-fcitx3.png|600px]]
 
[[File:Kdev-fcitx3.png|600px]]
  
 +
<!--T:10-->
 
* Select fcitx as type, type your project name, as for project name, you'd better make first character in upper case, due to some kdevelop template limitation.
 
* Select fcitx as type, type your project name, as for project name, you'd better make first character in upper case, due to some kdevelop template limitation.
  
 +
<!--T:11-->
 
[[File:Kdev-fcitx4.png|600px]]
 
[[File:Kdev-fcitx4.png|600px]]
  
 +
<!--T:12-->
 
* If you want to use this with your system, change the prefix to "/usr" (or any other custom prefix you're using)
 
* If you want to use this with your system, change the prefix to "/usr" (or any other custom prefix you're using)
  
 +
<!--T:13-->
 
[[File:Kdev-fcitx5.png|600px]]
 
[[File:Kdev-fcitx5.png|600px]]
  
 +
<!--T:14-->
 
* Let's build it!
 
* Let's build it!
  
 +
<!--T:15-->
 
[[File:Kdev-fcitx6.png|600px]]
 
[[File:Kdev-fcitx6.png|600px]]
  
 +
<!--T:16-->
 
* Should be successfully built (check cmake output at the bottom)
 
* Should be successfully built (check cmake output at the bottom)
  
 +
<!--T:17-->
 
[[File:Kdev-fcitx7.png|600px]]
 
[[File:Kdev-fcitx7.png|600px]]
  
== What to do next? ==
+
== What to do next? == <!--T:18-->
  
 +
<!--T:19-->
 
Read the comments to make sure you understand the project structure, and you may need some basic knowledge about cmake.
 
Read the comments to make sure you understand the project structure, and you may need some basic knowledge about cmake.
  
 +
<!--T:20-->
 
Read some other simple project to understand what can be done with Fcitx.
 
Read some other simple project to understand what can be done with Fcitx.
  
 +
<!--T:21-->
 
Some easy place to start with:
 
Some easy place to start with:
  
 +
<!--T:22-->
 
* [https://github.com/fcitx/fcitx/tree/master/src/im/qw QuWei Input method], typing number in gb2312, and output the coressponding character
 
* [https://github.com/fcitx/fcitx/tree/master/src/im/qw QuWei Input method], typing number in gb2312, and output the coressponding character
  
 +
<!--T:23-->
 
* [https://github.com/felixonmars/fcitx-tsundere Tsundere Module], add a special character after every string you typed in.
 
* [https://github.com/felixonmars/fcitx-tsundere Tsundere Module], add a special character after every string you typed in.
  
== See also ==
+
== See also == <!--T:24-->
  
 +
<!--T:25-->
 
[http://www.cmake.org/cmake/help/cmake_tutorial.html CMake Tutorial]
 
[http://www.cmake.org/cmake/help/cmake_tutorial.html CMake Tutorial]
  
  
 
</translate>
 
</translate>

Latest revision as of 22:54, 2 February 2016


Tool to use

IDE: kdevelop newer than 4.5.

Build system: CMake newer than 2.8.

Fcitx library and headers: newer than 4.2.7.

The reason why I choose kdevelop here is it supports cmake, and has great template system you can easily use.

Step by step

  • Create new project

Kdev-fcitx1.png

  • Download fcitx template with KDevelop

Kdev-fcitx2.png

Kdev-fcitx3.png

  • Select fcitx as type, type your project name, as for project name, you'd better make first character in upper case, due to some kdevelop template limitation.

Kdev-fcitx4.png

  • If you want to use this with your system, change the prefix to "/usr" (or any other custom prefix you're using)

Kdev-fcitx5.png

  • Let's build it!

Kdev-fcitx6.png

  • Should be successfully built (check cmake output at the bottom)

Kdev-fcitx7.png

What to do next?

Read the comments to make sure you understand the project structure, and you may need some basic knowledge about cmake.

Read some other simple project to understand what can be done with Fcitx.

Some easy place to start with:

See also

CMake Tutorial