各位好:
现在有一个制作安装包的问题,请教各位。
这是一个web工程,运行这个工程的前提是,要安装所需要的软件环境(如,服务器,编译器等)。这个安装环境的过程,通过一个shell脚本来时实现。
那么,整个工程目前是一个tar.gz包,安装的时候,需要解压该包,然后再执行那个shell脚本。这样才能部署完成。
我想让这个过程,用一个双击动作就全部搞定。不需要用户区自己执行一些命令。目前想到如下方式:
1、用deb包来安装,我不知道如何才能既达到解压的效果,又达到安装环境软件的效果。(最好是解压完之后,能自动运行一个shell脚本,最ok了。)
2、用bin文件的安装包,可惜我没实现双击安装的效果。
我只想到这么多,但是都存在难点,如果各位有其他的好方法欢迎推荐。或者解决以上两种方式的难题。
如果有办法,最好过程详细些。谢谢各位了先!
请高手帮我,关于制作安装包的问题。
-
- 帖子: 6
- 注册时间: 2010-07-08 22:15
-
- 帖子: 1453
- 注册时间: 2008-05-24 8:30
Re: 请高手帮我,关于制作安装包的问题。
制作 .deb 的方法可以通过写 postinst 和 prerm 脚本来解决这个问题。
第二种方法可以参考:
第二种方法可以参考:
软件包:makeself 写了:
描述:utility to generate self-extractable archives
makeself is a small shell script that generates a self-extractable archive from
a directory. The resulting file appears as a shell script (many of those have a
.run suffix), and can be launched as is. The archive will then uncompress
itself to a temporary directory and an optional arbitrary command will be
executed (for example an installation script). This is pretty similar to
archives generated with WinZip Self-Extractor in the Windows world. Makeself
archives also include checksums for integrity self-validation (CRC and/or MD5
checksums).
The makeself script itself is used only to create the archives from a directory
of files. The resultant archive is actually a compressed (using gzip, bzip2, or
compress) TAR archive, with a small shell script stub at the beginning. This
small stub performs all the steps of extracting the files, running the embedded
command, and removing the temporary files when it's all over. All what the user
has to do to install the software contained in such an archive is to "run" the
archive, i.e. sh nice-software.run. I recommend using the "run" (which was
introduced by some Makeself archives released by Loki Software) or "sh" suffix
for such archives not to confuse the users, since they actually are shell
scripts (with quite a lot of binary data attached to it though!).
主页:http://www.megastep.org/makeself/
- Jarson
- 帖子: 2371
- 注册时间: 2008-07-21 9:44
- 来自: 深圳
- 联系:
Re: 请高手帮我,关于制作安装包的问题。
mark,学习。aerofox 写了:制作 .deb 的方法可以通过写 postinst 和 prerm 脚本来解决这个问题。
第二种方法可以参考:软件包:makeself 写了:
描述:utility to generate self-extractable archives
makeself is a small shell script that generates a self-extractable archive from
a directory. The resulting file appears as a shell script (many of those have a
.run suffix), and can be launched as is. The archive will then uncompress
itself to a temporary directory and an optional arbitrary command will be
executed (for example an installation script). This is pretty similar to
archives generated with WinZip Self-Extractor in the Windows world. Makeself
archives also include checksums for integrity self-validation (CRC and/or MD5
checksums).
The makeself script itself is used only to create the archives from a directory
of files. The resultant archive is actually a compressed (using gzip, bzip2, or
compress) TAR archive, with a small shell script stub at the beginning. This
small stub performs all the steps of extracting the files, running the embedded
command, and removing the temporary files when it's all over. All what the user
has to do to install the software contained in such an archive is to "run" the
archive, i.e. sh nice-software.run. I recommend using the "run" (which was
introduced by some Makeself archives released by Loki Software) or "sh" suffix
for such archives not to confuse the users, since they actually are shell
scripts (with quite a lot of binary data attached to it though!).
主页:http://www.megastep.org/makeself/