程序发布系列 inno setup制作安装程序
2008-01-02 13:04
387 查看
与install shiled相比,inno setup是一个简单而且实用的制作安装程序的工具,工具中提供了脚本编程,能方便而且快捷的制作出安装程序,在一次制作安装程序的过程中,遇到了一些问题,做了下整理
1,inno setup的一些资料
inno setup的官方网址 http://www.jrsoftware.org/
inno setup的语言包 http://www.jrsoftware.org/files/istrans/
inno setup的新闻组(在这里你能找到一些问题的答案) http://www.jrsoftware.org/newsgroups.php
2,inno setup 中调用dll容易出现的问题
inno setup中调用dll的方法,可以从inno setup的帮助文档中查到,在inno setup的安装目录/examples下有如何调用dll的例子。在使用的过程需要注意以下几点:
a,在调用的过程中需要注意调用约定
注意的地方包括2方面,一是在inno setup脚本中需要指定调用约定,二是在dll导出时也要显示的指定调用约定
b,在调用过程中注意dll的依赖性。
inno setup调用的dll时,如果这个dll所依赖的dll没有load到地址空间时,会出现cannot import dll的错误。对于这种情况可以分以下两种情况来考虑:
一,如果所依赖的程序本身打包在安装包内
对于这种情况,首先将dll加上delayload的选项,然后在function InitializeSetup(): Boolean; 中调用ExtractTemporaryFile将所依赖的dll释放出来(这个dll在[files]中要加上dontcopy),最后调用LoadDLL来加载所依赖的dll(注意,这里是加载所依赖的dll,而不是加载本身,本身的加载是由inno setup需要调用dll中的函数的时候进行加载的)
二,如果所依赖的程序不在安装包内,而在某个目录中
对于这种情况,主要是由于所依赖的程序不在dll搜寻的目录中,可以考虑以下两种方法,一,调用SetCurrentDir将那个目录设置为当前目录,二,用程序方式改变path变量
3,几个有用的事件
function InitializeSetup(): Boolean;
Called during Setup's initialization. Return False to abort Setup, True otherwise.
procedure CurStepChanged(CurStep: TSetupStep);
You can use this event function to perform your own pre-install and post-install tasks.
Called with CurStep=ssInstall just before the actual installation starts, with CurStep=ssPostInstall just after the actual installation finishes, and with CurStep=ssDone just before Setup terminates after a successful install.
function InitializeUninstall(): Boolean;
Return False to abort Uninstall, True otherwise.
1,inno setup的一些资料
inno setup的官方网址 http://www.jrsoftware.org/
inno setup的语言包 http://www.jrsoftware.org/files/istrans/
inno setup的新闻组(在这里你能找到一些问题的答案) http://www.jrsoftware.org/newsgroups.php
2,inno setup 中调用dll容易出现的问题
inno setup中调用dll的方法,可以从inno setup的帮助文档中查到,在inno setup的安装目录/examples下有如何调用dll的例子。在使用的过程需要注意以下几点:
a,在调用的过程中需要注意调用约定
注意的地方包括2方面,一是在inno setup脚本中需要指定调用约定,二是在dll导出时也要显示的指定调用约定
b,在调用过程中注意dll的依赖性。
inno setup调用的dll时,如果这个dll所依赖的dll没有load到地址空间时,会出现cannot import dll的错误。对于这种情况可以分以下两种情况来考虑:
一,如果所依赖的程序本身打包在安装包内
对于这种情况,首先将dll加上delayload的选项,然后在function InitializeSetup(): Boolean; 中调用ExtractTemporaryFile将所依赖的dll释放出来(这个dll在[files]中要加上dontcopy),最后调用LoadDLL来加载所依赖的dll(注意,这里是加载所依赖的dll,而不是加载本身,本身的加载是由inno setup需要调用dll中的函数的时候进行加载的)
二,如果所依赖的程序不在安装包内,而在某个目录中
对于这种情况,主要是由于所依赖的程序不在dll搜寻的目录中,可以考虑以下两种方法,一,调用SetCurrentDir将那个目录设置为当前目录,二,用程序方式改变path变量
3,几个有用的事件
function InitializeSetup(): Boolean;
Called during Setup's initialization. Return False to abort Setup, True otherwise.
procedure CurStepChanged(CurStep: TSetupStep);
You can use this event function to perform your own pre-install and post-install tasks.
Called with CurStep=ssInstall just before the actual installation starts, with CurStep=ssPostInstall just after the actual installation finishes, and with CurStep=ssDone just before Setup terminates after a successful install.
function InitializeUninstall(): Boolean;
Return False to abort Uninstall, True otherwise.
相关文章推荐
- 如何打包你的程序发布——安装制作软件Inno Setup的简单使用
- inno setup软件--教你如何制作一个漂亮的安装程序
- 用WinRAR将应用程序制作成安装程序用于发布的制作步聚
- 安装程序制作软件InstallBuilder发布v9啦
- inno setup制作网页ocx控件发布程序执行包
- 一分钟学会使用Inno Setup 制作安装程序
- 利用Inno Setup制作补丁安装程序
- Java桌面应用安装部署、安装程序制作(exe4j + Inno Setup) ——之二:使用MyEclipse将应用制作成可执行的JAR包
- java 打包(fatjar)发布,制作安装文件(inno setup)
- Inno Setup 制作安装程序[支持静默安装.NET环境]
- Inno Setup 制作的安装程序直接访问Access数据库
- Wix打包系列(一)如何使用wix制作安装程序
- 自动化发布-制作安装程序整理
- Java桌面应用安装部署、安装程序制作(exe4j + Inno Setup)——之三:使用exe4j生成EXE可执行文件
- Inno Setup (安装程序制作)
- 免费安装制作程序 Inno Setup
- 【PB】代码的发布及其安装程序的制作
- 安装程序制作软件Inno Setup
- Wix打包系列(一)如何使用wix制作安装程序
- Wix打包系列(一)如何使用wix制作安装程序