直接用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的退出代碼,並沒有保存腳本文件。
