简体   繁体   English

InnoSetup-如何在编译时不断显示此错误?

[英]InnoSetup - how to get ride of this error keep showing while compile?

I have to run the sc.exe for nginx.exe but its failing to compile if i have it as following. 我必须为nginx.exe运行sc.exe,但如果我有以下内容,则编译失败。 Can anyone tell me what am i doing wrong please? 谁能告诉我我做错了吗?

在此处输入图片说明

[Run]
Filename: {sys}\sc.exe; Parameters: "create nginx start=auto binPath={app\nginx.exe} " ; Flags: runhidden

or 要么

[Run]
Filename: {sys}\sc.exe; Parameters: "create nginx start=auto binPath=""{app\nginx.exe}"" " ; Flags: runhidden

or 要么

[Run]
Filename: {sys}\sc.exe; Parameters: "create nginx start=auto binPath=\"{app\nginx.exe}\" " ; Flags: runhidden

Compiler tells you what to do. 编译器会告诉您该怎么做。 Use two consecutive { chars: 使用两个连续的{字符:

Filename: {sys}\sc.exe; Parameters: "create nginx start=auto binPath={{app\nginx.exe}"; Flags: runhidden

The problem is that compiler treats everything enclosed by {} chars as constants in scripting sections. 问题在于,编译器将由{}字符括起来的所有内容都视为脚本节中的常量。 So when you wrote: 所以当你写:

Parameters: "create nginx start=auto binPath={app\nginx.exe}"

the compiler took that {app\\nginx.exe} as a constant (just like eg {app} is). 编译器将{app\\nginx.exe}作为常量(就像{app} )。 And since there is no such constant, you got this error. 而且由于没有这样的常数,您会收到此错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM