matelich
Posts: 9
Joined: Fri Dec 05, 2008 6:38 pm

issue with /execute in build script

We switched to Azure signing with the helpful instructions on the site, works great on our mainline build script, looks like this:

Code: Select all

	echo ;aic > aic.txt
	echo SetProperty ProductName="Zetec Software (Prototype)" >> aic.txt
	echo SetAzureKeyVaultSecret %AZURE_KEYVAULT_SECRET% >> aic.txt
	echo Build -buildslist EddynetVelocity  >> aic.txt
	%ADVANCEDINSTALLER% /execute %EDDYNETVELOCITYPROJECTFILE% aic.txt -nofail >> %ADVANCEDINSTALLEROUT%
However, the same signing settings in my .aip and same script section is failing on my release candidate branch. The output is
Parse error in file: "e:\dev\eddynet-EVR_V1_19_0_0\projects\aic.txt" at line: [1] column: [0] (code: not well-formed (invalid token)).
I can manually run the /execute command in a prompt with no problem. Any suggestions?
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: issue with /execute in build script

Hello,

I think this might have to do with the following line:

Code: Select all

echo ;aic > aic.txt
what does that exactly do? If I'm not mistaken, it's used to write to the aic.txt file?

I'm asking this because the aic.txt file should already contain that, so adding it again might trigger this parsing error.
I can manually run the /execute command in a prompt with no problem
Do you run only the execute command, or the entire script? If you encapsulate that into a batch file and run it whole, does it still work?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matelich
Posts: 9
Joined: Fri Dec 05, 2008 6:38 pm

Re: issue with /execute in build script

Yes, I was using that to dynamically generate 3 different flavors of aic.txt. I since realized you could use %ENV% vars in the aic.txt.

Unfortunately, it doesn't seem to have helped. I reworked the script to use:

Code: Select all

;aic 
SetProperty ProductName="%EVRBuildProductName%" 
SetAzureKeyVaultSecret %AZURE_KEYVAULT_SECRET%
Build -buildslist %EVRBuildList%  
But I'm still getting the same parse error message.

I can still use this scheme successfully in a powershell prompt and the old scheme is still working fine on my mainline build. I'm guessing that one batch file is doing something odd that throws off AI, but I can't think what it might be.
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: issue with /execute in build script

Hello,

Thank you for your followup on this.

To be quite honest with you, I ran out of ideeas on why this might be happening, because this seems really strange.

This is strange because you can execute it manually and works + the fact that it works in your main pipeline.

In your main pipeline, you are using the same AIC file, correct?

I am thinking that something on the second/test pipeline is triggering this behavior, perhaps a misconfiguration, but I can't say what exactly that is.

You mentioned that this works from PowerShell just fine - would that be a valid workaround?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matelich
Posts: 9
Joined: Fri Dec 05, 2008 6:38 pm

Re: issue with /execute in build script

Well, time for our next patch release, and the problem still exists.

I've updated to AI v23.5.

I've tried calling powershell within my .bat file - no help.

Code: Select all

powershell -NoProfile -ExecutionPolicy Bypass -Command "&  'C:\Program Files (x86)\Caphyon\Advanced Installer 23.5\bin\x86\AdvancedInstaller.com' /execute %EDDYNETVELOCITYPROJECTFILE% aic.txt -nofail" >> %ADVANCEDINSTALLEROUT%
I opened my aic.txt in a hex editor to see if it had some weird BOM, just straight ascii.

Still works on my mainline script. Still works manually on the command line.

I tried switching back to generating the aic.txt instead of using env vars.

Is there a secret debug output flag I can activate to generate a log that might help? Any other thoughts? I guess my next step is to have an LLM port my build script to powershell
matelich
Posts: 9
Joined: Fri Dec 05, 2008 6:38 pm

Re: issue with /execute in build script

Oh. My. Goodness.

The EDDYNETVELOCITYPROJECTFILE variable that was supposed to point to the .aip was empty. Sorry to have wasted your time.

Guess you could enter a minor bug that covers this dumb case.
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: issue with /execute in build script

Oh, wow, that is indeed interesting.

Thank you for your followup on this - I am really glad everything is working as expected now. :D

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”