david perry
Posts: 6
Joined: Wed Feb 24, 2016 3:04 pm

How to identify the output file from a build via command line

Wed Feb 24, 2016 3:21 pm

Hi,

I'm currently evaluating AI and have come across a problem i can't seem to solve.

I'm using an external build tool to run my AI project from the command line which works fine. I have two "Builds" configured in AI (one test and one production) and each writes to a different output EXE Name (on build configuration tab). The field is populated with a parameter i setup [OUTPUTEXENAME] that returns a different value depending on which build is being used. This parameter contains things like the version so that it dynamically changes every time i build.

The problem is i need to know the name of the file that was created when a build is performed by the command line

AdvancedInstaller.com /edit ""my.aip" /GetProperty OUTPUTEXENAME -buildname TestingBuild

but it doesn't resolve the internal parameters in the field and i get back the following string

[|ProductName] [|TESTING_TEXT] Install - [|ProductVersion]

Can you tell me if this is possible or if I'm on the wrong track - ultimately i suppose i could scan the folder and take the newest file by date but i was hoping AI could tell me.

Many Thanks,

David Perry

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to identify the output file from a build via command line

Thu Feb 25, 2016 11:22 am

Hi David and welcome to Advanced Installer forums,

This happens because those are pseudo-formatted property references which get resolved only after the build is performed.

Unfortunately I cannot think of a predefined way for you to get an non-hardcoded value before the actual build. You could also look into pre-build events but I'm not sure this can help your current scenario.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

david perry
Posts: 6
Joined: Wed Feb 24, 2016 3:04 pm

Re: How to identify the output file from a build via command line

Thu Feb 25, 2016 12:01 pm

Hi mihai,

Thanks for the update. In the meantime I have worked around the problem by doing a folder scan in my build process - it's not pretty but it seems to work.

Perhaps I could get AI to write the resolved value (to a text file maybe or ideally a persistent property - does such a thing exist?) after the build has completed.

Thanks,

David

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to identify the output file from a build via command line

Fri Feb 26, 2016 5:00 pm

Hi David,

Unfortunately we don't have anything predefined that can help you with writing the value post build. There's the TXT Update feature that can do it at install time.
You can try to define your own command, BAT or other method and schedule it as a post-build event. There are some samples in the article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”

 

 

cron