[英]Inno command line compilation not working
I'm trying to compile .iss file with command line 我正在尝试使用命令行编译.iss文件
string INNOCLI = Application.StartupPath + @"\Inno\ISCC.exe";
string Argument = string.Format("iscc /q \"{0}\"", INNOSCRIPTFILE);
using (Process cli = new Process())
{
//cli.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
cli.StartInfo.FileName = INNOCLI;
cli.StartInfo.Arguments = Argument;
cli.StartInfo.UseShellExecute = false;
cli.StartInfo.RedirectStandardError = true;
cli.StartInfo.RedirectStandardOutput = true;
//cli.StartInfo.CreateNoWindow = true;
cli.OutputDataReceived += cli_OutputDataReceived;
cli.ErrorDataReceived += cli_ErrorDataReceived;
cli.Start();
cli.BeginErrorReadLine();
cli.BeginOutputReadLine();
cli.WaitForExit();
}
But i'm getting nothing out of it, i'm using c# 但是我什么也没得到,我正在使用C#
Edit: I disabled output redirect, now i see its saying "Script file name specified more than once" on console window. 编辑:我禁用了输出重定向,现在我在控制台窗口上看到其说法“多次指定脚本文件名”。
You've said that the output you get from the ISCC tool that you execute is: 您已经说过,您从执行的ISCC工具获得的输出是:
Script file name specified more than once 脚本文件名多次指定
which comes from this exception
which is raised if you pass more than one parameter longer than 1 char with no starting /
, or -
char. 它来源于this exception
,如果你超过10个字符没有开始传递多个参数不再被抬起/
或-
字符。 And that's what happens because you have mistakenly passed iscc
and a file name to your arguments. 发生这种情况是因为您错误地将iscc
和文件名传递给了参数。 Remove that mistyped iscc
from there. 从此处删除输入错误的iscc
。 Change this line: 更改此行:
string Argument = string.Format("iscc /q \"{0}\"", INNOSCRIPTFILE);
to this: 对此:
string Argument = string.Format("/q \"{0}\"", INNOSCRIPTFILE);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.