直接用bat命令对Inno Setup的脚本文件.iss进行编译
2010-06-17 15:17 qjn0059 | 浏览 2163 次
分享到:
2010-06-29 11:16
提问者采纳
Command Line Compiler Execution
Scripts can also be compiled by the Setup Compiler from the command line. Command line usage is as follows: compil32 /cc <script name> Example:
compil32 /cc "c:\isetup\samples\my script.iss"
As shown in the example above, filenames that include spaces must be enclosed in quotes. Running the Setup Compiler from the command line does not suppress the normal progress display or any error messages. The Setup Compiler will return an exit code of 0 if the compile was successful, 1 if the command line parameters were invalid, or 2 if the compile failed. Alternatively, you can compile scripts using the console-mode compiler, ISCC.exe. Command line usage is as follows: iscc [options] <script name> Or to read from standard input: iscc [options] - Example:
iscc "c:\isetup\samples\my script.iss"
As shown in the example above, filenames that include spaces must be enclosed in quotes. Valid options are: "/O" to specify an output path (overriding any OutputDir setting in the script), "/F" to specify an output filename (overriding any OutputBaseFilename setting in the script), "/S" to specify a Sign Tool, "/Q" for quiet compile (print only error messages), and "/?" to show a help screen. Example:
iscc /Q /O"My Output" /F"MyProgram-1.0" /Sbyparam=$p "c:\isetup\samples\my script.iss"
ISCC will return an exit code of 0 if the compile was successful, 1 if the command line parameters were invalid or an internal error occurred, or 2 if the compile failed. The Setup Script Wizard can be started from the command line. Command line usage is as follows: compil32 /wizard <wizard name> <script name> Example:
compil32 /wizard "MyProg Script Wizard" "c:\temp.iss"
As shown in the example above, wizard names and filenames that include spaces must be enclosed in quotes. Running the wizard from the command line does not suppress any error messages. The Setup Script Wizard will return an exit code of 0 if there was no error and additionally it will save the generated script file to the specified filename, 1 if the command line parameters were invalid, or 2 if the generated script file could not be saved. If the user cancelled the Setup Script Wizard, an exit code of 0 is returned and no script file is saved. 命令行编译器执行 脚本也可以由命令行的安装编译器编译。命令行使用如下: compil32 /cc <script name> 例子 compil32 /cc "c:\isetup\samples\my script.iss" 如上面的例子所示,包括空间的文件名必须用引号括起来。 在命令行中运行安装编译器不会抑制正常进度显示或任何错误消息。如果编译成功,设置编译器将返回一个0的退出代码,如果命令行参数无效,或2如果编译失败,则返回1。 或者,您可以编写脚本使用控制台模式编译,iscc.exe。命令行使用如下: iscc [options] <script name> 或从标准输入读取: iscc [options] - 例子 iscc "c:\isetup\samples\my script.iss" 如上面的例子所示,包括空间的文件名必须用引号括起来。 可用的选项是:“/o”指定输出路径(重写任何脚本中设置outputdir),“/F”指定输出文件名(重写任何脚本中设置outputbasefilename),“/s”指定一个签名工具,“/Q”安静的编译(只打印错误信息),和“/?”显示帮助屏幕。 例子 iscc /Q /O"My Output" /F"MyProgram-1.0" /Sbyparam=$p "c:\isetup\samples\my script.iss" 如果编译ISCC成功返回的退出代码为0,1如果命令行参数无效或发生内部错误,或2如果编译失败。 可以从命令行启动安装脚本向导。命令行使用如下: compil32 /向导<向导名称> <脚本名称>
compil32 /wizard <wizard name> <script name> 例子 compil32 /wizard "MyProg Script Wizard" "c:\temp.iss" 如上面的例子所示,向导的名称和文件名中包含空格必须用引号括起来。 在命令行中运行该向导不抑制任何错误消息。
设置脚本向导将返回一个0的退出代码,如果没有错误,
另外它将保存生成的脚本文件到指定的文件名,1如果命令行参数无效,或2,如果生成的脚本文件不能保存。
如果用户取消了设置脚本向导,则返回0的退出代码,并没有保存脚本文件。