Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Inno setup 根据Inno设置中选择的语言创建命令行参数快捷方式_Inno Setup - Fatal编程技术网

Inno setup 根据Inno设置中选择的语言创建命令行参数快捷方式

Inno setup 根据Inno设置中选择的语言创建命令行参数快捷方式,inno-setup,Inno Setup,我正在尝试在命令行参数中使用条件-我使用了本教程,效果非常好: 我正在创建一个安装程序,我想知道如果用户选择西班牙语该怎么办,创建的快捷方式有参数:-Spanish #define MyAppName "The software" #define MyAppVersion "1.0" #define MyAppPublisher "Inc." [Languages] Name: "english"; Messag

我正在尝试在命令行参数中使用条件-我使用了本教程,效果非常好:

我正在创建一个安装程序,我想知道如果用户选择西班牙语该怎么办,创建的快捷方式有参数:
-Spanish

#define MyAppName "The software"
#define MyAppVersion "1.0"
#define MyAppPublisher "Inc."

[Languages]
Name: "english"; MessagesFile: "compiler:Languages\English.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

[Files]
Source: "C:\Program Files (x86)\The software\*"; DestDir: "{app}"; \
    Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Soft name"; Filename: "{app}\soft.exe"; \
    Parameters: "-english"; IconFilename: {app}\icon.ico;
请使用以下选项之一:


或者使用a和。如果您的和交换机名称始终匹配,则很容易:

[Icons]
Name: "{commondesktop}\Soft name"; Filename: "{app}\soft.exe"; \
    Parameters: "-{code:ActiveLanguage}"; IconFilename: {app}\icon.ico

如果它们不匹配,您必须实现一个代理函数,将
ActiveLanguage
值转换为等效的交换机名称。

非常感谢!你救了我的命,亲爱的!工作得很好!
[Icons]
Name: "{commondesktop}\Soft name"; Filename: "{app}\soft.exe"; \
    Parameters: "-{code:ActiveLanguage}"; IconFilename: {app}\icon.ico