It eigo 20101029
-
Upload
kazuhiro-watanabe -
Category
Technology
-
view
487 -
download
0
Transcript of It eigo 20101029
Full Text Search on iPhoneUse OSS libraries on iPhone!
わたなべかずひろ@kaz_29
2010年11月8日月曜日
Who am I
Name: Kazuhiro WatanabeWork: E2 Inc. => Here!twitter: @kaz_29blog: http://d.hatena.ne.jp/kaz_29I like #iphonedev #cakephp #lithium #php and #golf #cat and #beer!
2010年11月8日月曜日
Advertisement!
2010年11月8日月曜日
NIFTY Cloud Manager
2010/10/20 out! http://iphone.e-2.co.jp/
2010年11月8日月曜日
How to use ‘Hyper Estraier’ in your Apps.
http://fallabs.com/hyperestraier/
2010年11月8日月曜日
I like source install!
2010年11月8日月曜日
configure option
$ ./configure --prefix=/usr/local/iphone \
CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 \
CFLAGS=-arch i386
-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk
-I/usr/local/iphone/include -L/usr/local/iphone/lib
CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 \
AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar
インストール先を指定2010年11月8日月曜日
configure option
$ ./configure --prefix=/usr/local/iphone \
CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 \
CFLAGS=-arch i386
-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk
-I/usr/local/iphone/include -L/usr/local/iphone/lib
CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 \
AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar
Cコンパイラを指定2010年11月8日月曜日
configure option
$ ./configure --prefix=/usr/local/iphone \
CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 \
CFLAGS=-arch i386
-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk
-I/usr/local/iphone/include -L/usr/local/iphone/lib
CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 \
AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar
Cコンパイル設定を指定2010年11月8日月曜日
configure option
$ ./configure --prefix=/usr/local/iphone \
CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 \
CFLAGS=-arch i386
-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk
-I/usr/local/iphone/include -L/usr/local/iphone/lib
CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 \
AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar
C++コンパイラを指定2010年11月8日月曜日
configure option
$ ./configure --prefix=/usr/local/iphone \
CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 \
CFLAGS=-arch i386
-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk
-I/usr/local/iphone/include -L/usr/local/iphone/lib
CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 \
AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar
アーカイブツールを指定2010年11月8日月曜日
Customize Makefile
# for Simurator
CC = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
AR = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar
CFLAGS = -arch i386 -Wall -fPIC -fsigned-char -O3 -fomit-frame-pointer \
-fforce-addr
# for Device
CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
AR = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
CFLAGS = -isysroot /Developer-SDK402/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk \
-arch armv6 -Wall -fPIC -fsigned-char -O3 -fomit-frame-pointer -fforce-addr
2010年11月8日月曜日
Add your project
for device
for simulator
2010年11月8日月曜日
Summary
CC,CPP,AR => Change to iOS SDK Tools
CFLAGS
-arch i386(or armv6) => set target architecture
-isysroot => set root path
2010年11月8日月曜日
Test code - Preparation for search
/* dbをオープン */
if (!(db = est_db_open((const char*)cdataPath, ESTDBREADER, &ecode))){ return ;
}/* 検索条件オブジェクトを生成する */
cond = est_cond_new();
NSInteger length = sizeof(searchkey);/* 検索条件オブジェクトに検索式を設定する */
[searchBar.text getCString:(char*)searchkey maxLength:length encoding:NSUTF8StringEncoding];est_cond_set_phrase(cond, searchkey);
CBMAP *hints;hints = cbmapopenex(MINIBNUM);/* 実際に取得する数を設定 */
est_cond_set_max(cond, 30) ;
2010年11月8日月曜日
Test code - search and get results
/* データベースから検索結果を得る */
result = est_db_search(db, cond, &resnum, hints);/* ヒット数を取得 */
numHits = (rp = cbmapget(hints, "", 0, NULL)) ? atoi(rp) : resnum;
/* 各該当文書を取得して表示する */
for(i = 0; i < resnum; i++){/* 文書オブジェクトを取得する */
if(!(doc = est_db_get_doc(db, result[i], 0))) continue;if((tmptitle = est_doc_attr(doc, "@title")) != NULL) {
NSLog(@"Title: %s\n", tmptitle);}
}
2010年11月8日月曜日
Demo
2010年11月8日月曜日
Demo Data
10,796 html filestotal size 75M
PHP Manual
2010年11月8日月曜日
License is important!
2010年11月8日月曜日
Thank you(><)
2010年11月8日月曜日