teknohippy
Posts: 7
Joined: Mon Jan 23, 2006 5:35 pm

Automating creation of updates text file.

Now I've been struggling with this.

At the moment I'm automatically building a new installer whenever I build using the "release" configuration in Visual Studio.

The VS project build file gets the current SVN version from the root working folder and changes the file version on the executable.

It also edits the main .aip file and changes the version.

It then builds the msi.

Like this: (if anyone was wondering how to do that bit)

Code: Select all

 <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
  <Target Name="BeforeBuild" Condition="'$(Configuration)'=='Release'">
    <SvnVersion LocalPath="..">
      <Output TaskParameter="Revision" PropertyName="Revision" />
    </SvnVersion>
    <Message Text="Version: 5.0.$(Revision).0" />
    <AssemblyInfo CodeLanguage="CS" OutputFile="Properties/AssemblyInfo.cs" AssemblyTitle="Gigajam Xtractor" AssemblyDescription="Gigajam Xtractor" AssemblyCompany="http://www.gigajam.com/" AssemblyProduct="Gigajam Xtractor" AssemblyCopyright="Copyright © Gigajam 2008" ComVisible="false" CLSCompliant="true" Guid="D2301C51-C4F5-48dd-9D07-A3C0988AE9B1" AssemblyVersion="5.0.$(Revision).0" AssemblyFileVersion="5.0.$(Revision).0" Condition="$(Revision) != '0' " />
  </Target>
  <Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'">
    <Message Text="Revision: $(Revision)" />
    <Exec Command=""C:\Program Files\Caphyon\Advanced Installer 6.6\AdvancedInstaller.com" /edit C:\Users\iain.norman.GDEV\Desktop\Xtractor5\XtractorX5Installer\XtractorDaily.aip /SetVersion 5.0.$(Revision).0" />
    <Exec Command=""C:\Program Files\Caphyon\Advanced Installer 6.6\AdvancedInstaller.com" /build C:\Users\iain.norman.GDEV\Desktop\Xtractor5\XtractorX5Installer\XtractorDaily.aip" />
    <Exec Command=""C:\Program Files\Caphyon\Advanced Installer 6.6\AdvancedInstaller.com" /build C:\Users\iain.norman.GDEV\Desktop\Xtractor5\XtractorX5Installer\XtractorUpdate.aip" />
  </Target>
(placed at the bottom of your project file before the final </Project>)

Now I've just decided to also impliment the Auto Updater.

I can build the updates configuration aip file from the command line fine.

The problem is when building it doesn't pick up the new version number, and I can't find anyway to edit it from the command line, as the aip has no properties section. So the resulting text file has the wrong version number to check for.

So any easy way to automate the build of the updates.txt file? Should I just forget about using AI to build it and just build it myself? I'd rather not.

*grins*

Cheers
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Automating creation of updates text file.

Hi,

Currently Advanced Installer does not support a command line parameter which can extract property values from the AIP. However, I have added this improvement on our TODO list and it will be available in a future version. Thank you for your suggestion.

Until then you can create the Updates Configuration project manually. Another approach would be to parse the AIP file and get the Product Version (it's an XML, so you can parse it easily).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
palelocust
Posts: 7
Joined: Sun Nov 23, 2008 7:51 pm

Re: Automating creation of updates text file.

I'd like to second this feature request.

For the time being I will be parsing the aip file.

Return to “Common Problems”