Appweb 4.1.0 的移植问题

Appweb当前的最新版本是4.1.0 。当时想移植appweb的时候是想移植这个版本的,但发现网上所有的移植经验都是基于3.x或者2.x的,自己对比过各个版本,发现4.0.0之后appweb确实改动非常大,代码的目录都不一样了,于是先把3.3.4的版本移植好了,现在回过头来移植4.1.0这个版本,据说4.X是appweb的一个新的里程碑版本,所以想体验一下。

源码下载: http://appwebserver.org/software/appweb-4.1.0-0-src.tgz

ejscript 源码下载: http://ejscript.org/downloads/ejs/download.ejs

至于为什么要下载ejscript源码,得先看下appweb官方提供的building说明: (因为4.0之后网上没有移植的例子,所以这个文档很重要,得好好看下)

http://appwebserver.org/products/appweb/doc/guide/appweb/source/building.html

还有这篇文章,详细介绍了bit这个工具:

http://ejscript.org/products/ejs/doc/guide/ejs/users/bit.html

上面的文档说明了appweb4的编译方法:

Appweb supports several methods of building from source:

1.Building via the Bit (Build It) tool 2.Building via make (or nmake on Windows) 3.Building via an IDE such as Visual Studio or Xcode Building with Bit is the most flexible and offers the most control. It requires installing the Ejscript Product which includes the bit tool.

看来,用bit配置编译是最好的方法,而且文中提到

The bit tool is used to configure and to build Appweb. Bit is part of the Ejscript JavaScript environment.

就是说,编译Appweb需要用到bit这个工具,而bit是Ejscript的一部分,是从Ejscript里编译出来的,所以第一步得先编译Ejscript得到bit。

编译Ejscript以及安装bit的步骤:

$ tar zxvf ejs-2.0.0-0-src.tgz

$ cd ejs-2.0.0-0

$ make

$ ./linux-x86-debug/bin/bit configure build

$ sudo bit install

说明:make后,在ejs-2.0.0-0目录下会生成一个linux-x86-debug的文件夹,里面包含了编译所得的执行文件,库文件,头文件和帮助文件等。在该目录下的bin目录里就已经生成了bit工具。最后sduo install后,在linux-x86-debug/pkg/bin/ejs-2.0.0-0/目录下有个install的脚本,用sudo执行它,然后就把bit装到系统目录下了。

下面来编译appweb,步骤如下

$ tar zxvf appweb-4.1.0-0-src.tgz

$ cd appweb-4.1.0

$ ./configure –platform linux-x86 –profile release

$ bit

$ sudo bit install

执行完上面的操作后,在 /appweb-4.1.0/linux-x86-release/pkg/bin/appweb-4.1.0-0 目录下有个install文件,用 sduo install 安装后,appweb就被装到PC上面了。

启动appweb:

$ sudo /etc/init.d/appweb start

执行上面命令后正常会提示appweb OK,说明已经启动,然后可以再浏览器上输入IP登陆到服务器上。

其实我最终的目的是想把appweb 4.1.0移植到S3C6410开发板上,所以还得通过交叉编译。

appweb3所有的配置都是通过configure来配置的,非常方便和简单。但appweb4就完全不一样了,appweb4目录下的configure其实就是bit,因为通过 ./configure –help 和 bit –help查看配置参数,两者是一样的。

先把CC,LD等修改为当前的交叉编译工具链,然后在配置的时候修改下平台为–platform linux-arm ,尝试编译,出错!最后尝试了修改其他配置参数都没成功。发现这个版本可配种站的参数很有限,不像appweb3 。

经过多种方法尝试都没成功,只有先放下了,毕竟已经在ARM板上移植好3.3.4这个版本了,接下来先好好学习下appweb,以及继续加人ssl,php的移植先,以后有时间在继续研究下appweb4或更高版本的了。

在这次移植appweb4的过程中发现这个版本可以支持matrixssl-3-3-1了,但是对于旧版的matrixssl-1-8-8却又不支持。这个跟appweb3相反,appweb3只能支持matrixssl-1-8-8(或者说低版本的matrixssl吧)。

鸟的翅膀在空气里振动,那是一种喧嚣而凛裂的,

Appweb 4.1.0 的移植问题

相关文章:

你感兴趣的文章:

标签云: