Page 1 of 1

.net Automation supply multiple conditionals

Posted: Wed Feb 07, 2018 2:01 pm
by Weatherlights
Hi

I just have a question about the automation interface. I am currently have a setup project with 3 compiler variables which are called
SOMEVAR1
SOMELONGVAR2
SOMELONGVAR3

In my setup project I try to utilize the variables as followed:

Code: Select all

            iaBuild.sProject = ProjectSrc;
            iaBuild.sOutput = Output;
            iaBuild.sLog = LogFile;
            iaBuild.sConditionals = "SOMEVAR1=" + "\"" + SomeVar1 + "\"" + ",SOMELONGVAR2=" + "\"" + SomeLongVar2+ "\"" + ",SOMELONGVAR3=" + "\"" + SomeLongVar2 + "\"" + ""; //example: "MYCOMPVAR=" + "\"" + "c:\\test" + "\"";
            iaBuild.sLanguage = "";
            iaBuild.sPassword = "";
            iaBuild.Mode = Mode;

The sample is what I got from the sample project. Somehow this utilization is getting messed up during execution. The log file ends with an error that reads as followed:
Compiler Variables: "SOMEVAR1=C:\Stuff\SomePath1,SOMELONGVAR2=C:\Stuff\SomeLongPath2,SOMELONGVAR3=C:\Stuff\SomeLongPath3",UAC=requireAdministrator,SOMEVAR1=Src\Folder1,SOMELONGVAR2=Src\Folder2,"SOMELONGVAR3=Src\Folder3",VERSION=2.0.2.0,BUILDMODE=CD,LANGUAGE=English,"TITLE=MyApp",TARGETDIR=$TARGETDIR$,IADIR=C:\PROGRA~2\INSTAL~2,PROJDIR=C:\Users\****\DOCUME~1\MySetups\MyApp,IAVER=24.00
...
Error during build: No files matching pattern "C:\Stuff\SomePath1,SOMELONGVAR2=C:\Stuff\SomeLongPath2,SOMELONGVAR3=C:\Stuff\SomeLongPath3\*.*"


It looks like he is parsing everything in SOMEVAR1. Someone has a guess what II am doing wrong here?

Re: .net Automation supply multiple conditionals

Posted: Fri Feb 16, 2018 7:28 am
by Weatherlights
Ok I sorted this out... it seems like the variables need to be provided in a list structure (and not just as a csv).