2009年4月26日日曜日

Webkitにv8を組み込もうと頑張ってみる

 ビルドはできたんだけどさあどうしようってなったとき、これといって計画はない。そこで何となく組み込みにチャレンジすることにした。

Chromiumにv8の組み込みについて何か情報ないかと探すとこんな文章が

We use the WebKit open-source project to lay out web pages. This code is pulled from Apple and stored in the /third_party/WebKit directory. WebKit consists primarily of "WebCore" which represents the core layout functionality, and "JavaScriptCore" which runs JavaScript. We only run JavaScriptCore for testing purposes, normally we replace it with our high performance V8 engine. We do not actually use the layer that Apple calls "WebKit," which is the embedding API between WebCore and OS X applications such as Safari. We normally refer to the code from Apple generically as "WebKit" for convenience.

まあ、要はWebkit使ってHTMLのレンダリングはしてますよ。元々Webkitに入ってるWebCoreってのを使って。でもJavascriptは我がV8を使ってますよ。元々Webkitに入ってるJavaScriptCoreはテストぐらいにしか使いませんね。
 厳密にいえば、我々は「Webkit」ってものは使ってはいないんですよ。Webkitっていうのはさっき言ったWebCoreっていうレンダリングエンジンとsafariのようなアプリケーションのAPIを組み込んだものなんで。便宜上、Webkitって読んでいるだけなんですよ。

・・・へぇ。

ubuntu 9.04をクリーンインストール

 クリーンインストールしたらflash playerまた入れなきゃならないんだけど。なんせ半年に一回のことなんで忘れちゃって微妙に面倒

1.Adobeのサイトからflash playerのtar.gzファイルをダウンロード
2.ファイルを解凍

tar xvzf ファイル名.tar.gz

3.解凍してできたディレクトリ install_flash_player_*_linuxに入る

cd install_flash_player_*_linux

4.インストール

./flashplayer-installer
//******************
Enterキーを押す
//******************

5.Webブラウザをシャットダウン
6. ホームディレクトリの./mozillaにインストールしますよ。いいですか?と聞かれるので
y を選択。
7.(ここら辺は何書いてあったかあんまり読んでないけど) 他アプリケーションにイントー ルする?って聞かれるのでお好きなように。今回は n を選んだ。

2009年4月21日火曜日

WebKitのビルドに成功

最新版のソースでは無理だったがWebKit-r39474ではすんなり成功した。

所要時間は40分ぐらい。


./autogen
make

これだけで簡単にビルドはできる。

2009年4月20日月曜日

Googleのコネ?

なぜかこのブログが検索にかかってしまっている。誰も見てないだろうに。Googleのサービス利用してるだけにひいきしてもらってるのだろうか。

何にしても検索かかるのに適当な内容だと申し訳ないので今後はもう少し頑張ってブログ作ることにします。

v8 和訳

『v8 和訳』でググるとこのサイトがトップに表示されて見苦しい。

素晴らしい和訳が
V8ドキュメント日本語訳(ゆとり)
で読むことができます。

トップに検索されてごめんなさい。

悪気はなかったんです。

2009年4月19日日曜日

WebKitビルド少し前進

constructor@constructor-laptop:~$ cd WebKit-r42583/
constructor@constructor-laptop:~/WebKit-r42583$ ./autogen.sh
/usr/share/aclocal/gtk--.m4:10: warning: underquoted definition of AM_PATH_GTKMM
/usr/share/aclocal/gtk--.m4:10: run info '(automake)Extending aclocal'
/usr/share/aclocal/gtk--.m4:10: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:14: installing `autotools/config.guess'
configure.ac:14: installing `autotools/config.sub'
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for native Win32... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking if supports -fvisibility=hidden -fvisibility-inlines-hidden... yes
checking for pkg-config... /usr/bin/pkg-config
checking for perl... /usr/bin/perl
checking for bison... /usr/bin/bison
checking for mv... /bin/mv
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for ANSI C header files... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for bash... /bin/bash
checking if dolt supports this host... yes, replacing libtool
checking for flex... /usr/bin/flex
checking for gawk... (cached) mawk
checking for gperf... /usr/bin/gperf
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib... yes
checking for libpng12... yes
checking the target windowing system... x11
checking for Hildon UI extensions... no
checking for GLIB... yes
checking for glib-genmarshal... /usr/bin/glib-genmarshal
checking for glib-mkenums... /usr/bin/glib-mkenums
checking which Unicode backend to use... icu
checking for icu-config... /usr/bin/icu-config
checking for LIBXML... yes
checking for PANGO... yes
checking for CAIRO... yes
checking for GTK... yes
checking for XT... yes
checking whether to do a debug build... no
checking whether to enable optimized builds... yes
checking whether to enable Dashboard support... yes
checking whether to enable support for 3D Transforms... no
checking whether to enable HTML5 Channel Messaging support... no
checking whether to enable HTML5 offline web applications support... yes
checking whether to enable HTML5 client-side session and persistent storage support... yes
checking whether to enable HTML5 client-side database storage support... yes
checking whether to enable icon database support... yes
checking whether to enable HTML5 video support... yes
checking whether to enable XPath support... yes
checking whether to enable XSLT support... yes
checking whether to enable geolocation support... no
checking whether to enable gnomekeyring support... no
checking whether to enable SVG support... yes
checking whether to enable WML support... no
checking whether to enable Web Workers support... yes
checking whether to enable support for SVG animation... yes
checking whether to enable support for SVG filters... no
checking whether to enable support for SVG fonts... yes
checking whether to enable support for SVG foreign objects... yes
checking whether to enable SVG as Image support... yes
checking whether to enable support for SVG use element... yes
checking whether to enable code coverage support... no
checking whether to enable optimized memory allocator... yes
checking whether to enable JIT compilation... yes
checking the font backend to use... freetype
checking for LIBSOUP... configure: error: Package requirements (libsoup-2.4 >= 2.25.91) were not met:

Requested 'libsoup-2.4 >= 2.25.91' but version of libsoup is 2.24.1

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSOUP_CFLAGS
and LIBSOUP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.








constructor@constructor-laptop:~$ cd WebKit-r42583/
constructor@constructor-laptop:~/WebKit-r42583$ ./autogen.sh
/usr/share/aclocal/gtk--.m4:10: warning: underquoted definition of AM_PATH_GTKMM
/usr/share/aclocal/gtk--.m4:10: run info '(automake)Extending aclocal'
/usr/share/aclocal/gtk--.m4:10: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:14: installing `autotools/config.guess'
configure.ac:14: installing `autotools/config.sub'
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for native Win32... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking if supports -fvisibility=hidden -fvisibility-inlines-hidden... yes
checking for pkg-config... /usr/bin/pkg-config
checking for perl... /usr/bin/perl
checking for bison... /usr/bin/bison
checking for mv... /bin/mv
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for ANSI C header files... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for bash... /bin/bash
checking if dolt supports this host... yes, replacing libtool
checking for flex... /usr/bin/flex
checking for gawk... (cached) mawk
checking for gperf... /usr/bin/gperf
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib... yes
checking for libpng12... yes
checking the target windowing system... x11
checking for Hildon UI extensions... no
checking for GLIB... yes
checking for glib-genmarshal... /usr/bin/glib-genmarshal
checking for glib-mkenums... /usr/bin/glib-mkenums
checking which Unicode backend to use... icu
checking for icu-config... /usr/bin/icu-config
checking for LIBXML... yes
checking for PANGO... yes
checking for CAIRO... yes
checking for GTK... yes
checking for XT... yes
checking whether to do a debug build... no
checking whether to enable optimized builds... yes
checking whether to enable Dashboard support... yes
checking whether to enable support for 3D Transforms... no
checking whether to enable HTML5 Channel Messaging support... no
checking whether to enable HTML5 offline web applications support... yes
checking whether to enable HTML5 client-side session and persistent storage support... yes
checking whether to enable HTML5 client-side database storage support... yes
checking whether to enable icon database support... yes
checking whether to enable HTML5 video support... yes
checking whether to enable XPath support... yes
checking whether to enable XSLT support... yes
checking whether to enable geolocation support... no
checking whether to enable gnomekeyring support... no
checking whether to enable SVG support... yes
checking whether to enable WML support... no
checking whether to enable Web Workers support... yes
checking whether to enable support for SVG animation... yes
checking whether to enable support for SVG filters... no
checking whether to enable support for SVG fonts... yes
checking whether to enable support for SVG foreign objects... yes
checking whether to enable SVG as Image support... yes
checking whether to enable support for SVG use element... yes
checking whether to enable code coverage support... no
checking whether to enable optimized memory allocator... yes
checking whether to enable JIT compilation... yes
checking the font backend to use... freetype
checking for LIBSOUP... configure: error: Package requirements (libsoup >= 2.25.91) were not met:

No package 'libsoup' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSOUP_CFLAGS
and LIBSOUP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

constructor@constructor-laptop:~/WebKit-r42583$ ./autogen.sh
/usr/share/aclocal/gtk--.m4:10: warning: underquoted definition of AM_PATH_GTKMM
/usr/share/aclocal/gtk--.m4:10: run info '(automake)Extending aclocal'
/usr/share/aclocal/gtk--.m4:10: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:14: installing `autotools/config.guess'
configure.ac:14: installing `autotools/config.sub'
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for native Win32... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking if supports -fvisibility=hidden -fvisibility-inlines-hidden... yes
checking for pkg-config... /usr/bin/pkg-config
checking for perl... /usr/bin/perl
checking for bison... /usr/bin/bison
checking for mv... /bin/mv
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for ANSI C header files... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for bash... /bin/bash
checking if dolt supports this host... yes, replacing libtool
checking for flex... /usr/bin/flex
checking for gawk... (cached) mawk
checking for gperf... /usr/bin/gperf
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib... yes
checking for libpng12... yes
checking the target windowing system... x11
checking for Hildon UI extensions... no
checking for GLIB... yes
checking for glib-genmarshal... /usr/bin/glib-genmarshal
checking for glib-mkenums... /usr/bin/glib-mkenums
checking which Unicode backend to use... icu
checking for icu-config... /usr/bin/icu-config
checking for LIBXML... yes
checking for PANGO... yes
checking for CAIRO... yes
checking for GTK... yes
checking for XT... yes
checking whether to do a debug build... no
checking whether to enable optimized builds... yes
checking whether to enable Dashboard support... yes
checking whether to enable support for 3D Transforms... no
checking whether to enable HTML5 Channel Messaging support... no
checking whether to enable HTML5 offline web applications support... yes
checking whether to enable HTML5 client-side session and persistent storage support... yes
checking whether to enable HTML5 client-side database storage support... yes
checking whether to enable icon database support... yes
checking whether to enable HTML5 video support... yes
checking whether to enable XPath support... yes
checking whether to enable XSLT support... yes
checking whether to enable geolocation support... no
checking whether to enable gnomekeyring support... no
checking whether to enable SVG support... yes
checking whether to enable WML support... no
checking whether to enable Web Workers support... yes
checking whether to enable support for SVG animation... yes
checking whether to enable support for SVG filters... no
checking whether to enable support for SVG fonts... yes
checking whether to enable support for SVG foreign objects... yes
checking whether to enable SVG as Image support... yes
checking whether to enable support for SVG use element... yes
checking whether to enable code coverage support... no
checking whether to enable optimized memory allocator... yes
checking whether to enable JIT compilation... yes
checking the font backend to use... freetype
checking for FREETYPE... yes
checking for SQLITE3... yes
checking for LIBXSLT... yes
checking for GSTREAMER... configure: error: Package requirements (gstreamer-0.10 >= 0.10
gstreamer-base-0.10,
gstreamer-plugins-base-0.10) were not met:

No package 'gstreamer-0.10' found
No package 'gstreamer-base-0.10' found
No package 'gstreamer-plugins-base-0.10' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GSTREAMER_CFLAGS
and GSTREAMER_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

2009年4月18日土曜日

Webkitのビルド


Requested 'libsoup-2.4 >= 2.25.91' but version of libsoup is 2.24.1

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSOUP_CFLAGS
and LIBSOUP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


色々インストールをしていかなきゃいけないけどここでつまずく。

2009年4月13日月曜日

今までで最も長かったHello World! ~Google v8~

clock_gettime関数が no reference ですとg++に怒れつづけて2週間が過ぎた。今日やっとコンパイルに成功した。

g++ -Iinclude hello_world.cpp -o hello_world libv8.a -lpthread -lrt

-lrtがないとlibrtがどうたらこうたら大変らしい。知らないけど。

2009年4月11日土曜日

V8の学習が進展しない

組み込みがなんとも上手くいかない。

何とかならないかな

Google Protocol Buffersについて

いつのまにやら、問題が解決していた。

なんで動くようになったんだろう?謎だ。

2009年4月4日土曜日

Google app engineとGoogle data apiの連携について

取り組み始めて4日目にしてやっとスタートラインに立てた。

ポイントはGAEのローカルテスト環境。

一度しか使用できないトークンを何度でも使用できるトークンに
アップグレードしたい場合、ローカルではそれでエラーを出してしまう。_それ自体がなぜ起きるのかはまだ分からない。_そのためファイルをアップロードする必要があるらしい。

# coding=UTF-8
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

import gdata.service
import gdata.alt.appengine
import settings
import atom.url
import cgi

class Test(webapp.RequestHandler):
def get(self):
next_url = atom.url.Url("http", settings.HOST_NAME, path="/")

client = gdata.service.GDataService()
gdata.alt.appengine.run_on_appengine(client)

self.response.out.write("""
<html><body>
<a href="%s">Request token</a>
""" % client.GenerateAuthSubURL(next_url,
("http://docs.google.com/feeds/",),
secure=False,
session=True))

doc_entry = "http://docs.google.com/feeds/documents/private/full"
auth_token = gdata.auth.extract_auth_sub_token_from_url(self.request.uri)
session_token = None
if auth_token:
session_token = client.upgrade_to_session_token(auth_token)
else:
self.response.out.write("No")

client.current_token = session_token


self.response.out.write("""
<a href="%s"> TEST </a><br><br>
""" %client.GenerateAuthSubURL(next_url,
(doc_entry,),
secure=False,
session=True))
if session_token:
self.Ges(client, doc_entry)

self.response.out.write("</body></html>")

def Ges(self,client,feed_url):
res = client.Get(feed_url, converter=str)
self.response.out.write(res)

application = webapp.WSGIApplication([("/.*", Test)],
debug=True)

def main():
run_wsgi_app(application)

if __name__ == "__main__":
main()

python if文の扱いについて


a = ""
if a:
print "abc"
else:
print "empty"
>>>empty


a = 1
if a:
print "abc"
else:
print "empty"
abc
>>> a = -1
if a:
print "abc"
else:
print "empty"
abc
>>> a = 0
if a:
print "abc"
else:
print "empty"
empty


文字が入っている場合はTrue。文字が入っていない場合はFalseと判断される。
数字は0はFalse。それ以外はTrueとなる。
最近触ってないから忘れたけどC言語ってこんな感じだった気がする。

GET POST DELETE PUTリクエストをターミナルから送信する

環境:ubuntu 8.10
デフォルトの状態でコマンドを使用できたが環境によっては分からない。
$GET http://gdata.youtube.com/feeds/api/videos?vq=football
#
#footballという単語をyoutubeで検索をかける
#
すごい量のxmlがターミナルに表示される。多分成功したんだと思う。
Google Data Apiを勉強し始めて3日目で初めてすんなり事が運んだ。
スローペースで嫌になる

2009年4月2日木曜日

BloggerでjQueryを使ってみる

レイアウトからwidgetの編集してしまえばさほど難しくない、Google data apiとの連携ができないだろうか

<script src='http://www.google.com/jsapi' type='text/javascript'/>
<script type='text/javascript'>//<![CDATA[
google.load("jquery", "1");

google.setOnLoadCallback(function(){
$("#btn").click(function(){
alert("TEST Click");
});
});
//]]>
</script>

2009年4月1日水曜日

Google App Engine BlobPropertyについて


ファイルをアップロードし、それをgoogle app engine上のデータストアに保存する



#encoding=UTF-8
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import images
from google.appengine.ext import db
import cgi
import os
import shutil

class MyModel(db.Model):
blob = db.BlobProperty()

class testimc(webapp.RequestHandler):
def get(self):
self.response.out.write(
'''
<html><body>
<form action="/filec" method="post" name="fc" enctype="multipart/form-data">
<input type="text" name="txt" /><br>
<input type="file" name="f_name"><br>
<input type="submit" value="Send">
</form>
</body></html>
'''
)
class testfile(webapp.RequestHandler):
def post(self):
avatar = self.request.get('f_name')
model = MyModel()
model.blob = db.Blob(avatar)
model.put()

self.redirect('/inner')
"""
form = cgi.FieldStorage()
if form.has_key('f_name'):
item = form['f_name']
if item.file:
UPLOAD_DIR = 'kabudir'
fout = file(os.path.join(UPLOAD_DIR,item.filename), 'wb')

self.response.out.write('<html><body>')
self.response.out.write('Success file upload<br>')
con = 0
while 1:
line = item.file.readline()
fout.write(line)
self.response.out.write(line)
if not line:
break
con = con + 1
#self.response.out.write(os.getcwd())
self.response.out.write('</body></html>')

else:
self.response.out.write('Not File')
"""
class innerfile(webapp.RequestHandler):
def get(self):
models = db.GqlQuery("SELECT * FROM MyModel")

for model in models:
if model.blob:
#img = images.Image(model.blob)
#img.resize(width=100,height=100)
#thumb = img.execute_transforms()

#self.response.headers['Content-Type'] = 'image/png'
# To download Wordfile
#self.response.headers['Content-Type'] = 'application/msword'
self.response.out.write(model.get("agprYWJ1LWFwcDAwcg0LEgdNeU1vZGVsGAEM ").blob)
return

application = webapp.WSGIApplication(
[('/',testimc),
('/filec',testfile),
('/inner',innerfile)],
debug=True)

def main():
run_wsgi_app(application)

if __name__ == "__main__":
main()
追記:app.yamlファイルのapplicationの部分は全部小文字の記号とかも限定したものしか使えない。

Color Chart

これまでまったく重要視してこなかったけど何か必要になりそうなので、
#c0e028

#c3d988

#e8eefa

#ec9f53

#5d9353

#ffcbd3

#82c78e

#275d35

#ff8e35

#e54748

#5083e3

#ece8e3

#efebe7

#3e677c

#c3915c

#5a4642

#56678e

#909e6b

#f0c47e

#52504c

#bf081f

#f2dbc2

#f5f5f5

#fca320

#f8941d

#72dcff

#a3d0a1

#77a578

TEST

参考リンク:Google Data API
Google App Engineとの連携についての日本語訳