dev_img 1.3
ほとんどこちらを参考に。
- http://www.neuro.ie.u-ryukyu.ac.jp/~sira/index.php?%A4%AD%A4%DE%A4%B0%A4%EC%C6%FC%B5%AD%2F2004-11-19
- http://csx.jp/~zaurus/build2.htm
インストール
http://csx.jp/~zaurus/build2.htmより dev.tar.gz をダウンロードして/hdd2に移動。ほんとはhdd3の方がいいと思うけど、ext3とかにしてないのでhdd2に。hdd2が270MBくらい空いてるから多分大丈夫っしょ。
- ダウンロード後、以下を実行。
# tar xvzf /hdd2/dev.tar.gz # /hdd2/dev/bin/compilet_setup.sh -r /hdd2/dev # ln -s /hdd2/dev/include/qpe/* /opt/Qtopia/include/
- .bashrcに以下を追加。
export TMAKEPATH=/hdd2/dev/tmake/lib/qws/linux-sharp-g++ export TMP=/var/tmp export QTDIR=/opt/Qtopia export PATH=$PATH:/hdd2/dev/bin:/hdd2/dev/tmake/bin
Hello, world
- helloディレクトリを作成して、以下をhello.cとして作成。
#include<qpeapplication.h> #include<qlabel.h> int main(int argc, char* argv[]) { QApplication app(argc, argv); QLabel* label = new QLabel("Hello world", (QWidget*) 0); label->resize(80, 30); app.setMainWidget(label); label->show(); return app.exec(); }
- helloディレクトリのなかで以下を実行してビルド。
$ progen -o hello.pro $ tmake -o Makefile hello.pro $ make
- 実行してみる。
$ ./hello
パッケージの作成
- helloディレクトリ下で以下を実行。
$ mkdir ipkg/CONTROL -p $ mkdir ipkg/opt/QtPalmtop/apps/Applications -p $ mkdir ipkg/opt/QtPalmtop/bin $ cp hello ipkg/opt/QtPalmtop/bin/
- hello/ipkg/CONTROL/controlを作成。
Package: hello Version: 0.1-1 Priority: optional Section: Qtopia Maintainer: Your Name <your@email.com> Architecture: arm Description: test application
- hello/ipkg/opt/QtPalmtop/apps/Applications/を作成。
[Desktop Entry] Comment=A Test Program Exec=hello Icon= Type=Application Name=Hello World Display=640x480/144dpi,480x640/144dpi
- ipkファイルを作成。
$ mkipkg ipkg ~/Documents/Install_Files/
- 「ソフトウェアの追加と削除」でインストール。
- 以下でも可能。
# ipkg install hello_0.1-1.arm.ipk
アイコンの更新。
$ qcop QPE/System "linkChanged(QString)"