【发布时间】:2016-02-06 04:37:02
【问题描述】:
我想为我的安装程序提供几种执行不同操作的不同安装类型:如果选择“ApplicationServer”类型,则只执行部分代码。如果选择了客户端类型,则只执行这部分过程。
我试图在一个名为
的函数中包含两个“代码块”[Types]
Name: "application"; Description: "{cm:ApplicationServer}"
Name: "client"; Description: "{cm:Client}"
[CustomMessages]
ApplicationServer=Application Server:
Client=Client:
如果选择第一个,我想执行由几个过程、常量、变量组成的特定代码来运行一系列 SQL 脚本,而如果选择第二个,我需要在代码区域执行一些其他的东西,像这样:
[Code]
function ApplicationServer(blabla)
begin:
{ <!This part only to run for ApplicationServer type!> }
{ following constants and variables for the ADO Connection + SQL script run }
const
myconstant1=blabla;
var
myvar1=blabla;
{ here all the procedure to define and manage an ADO Connection to run a sql script }
{ procedure 1 }
{ procedure 2 }
end
function Client(blabla)
begin:
{ <!This part only to run for Client type!> }
{ following constants and variables only for performing some stuffs on top of client }
const
myconstant2=blabla;
var
myvar2=blabla;
{ procedure 3 }
{ procedure 4 }
end
有没有办法根据安装运行的类型来管理要运行的代码的特定部分?
谢谢。
【问题讨论】: