Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Problems building installer from command line

Hello,

I have an aip enterprise project file that build fine when build inside AdvanceInstaller. If I try to build it from the command line, it works fine as well, using the ANT target shown in the user guide:

Code: Select all

<target name="buildmsi">
  <exec executable="[path]\AdvancedInstaller.com">
    <arg line="/build [project].aip"/>
  </exec>
</target>
However, when I try to run some commands against it to change the version number previous to building, it fails. The target I am using for that is:

Code: Select all

<target name="buildmsi">
  <exec executable="[path]\AdvancedInstaller.com">
    <arg line="/execute [project].aip BuildMSICommands.txt"/>
  </exec>
</target>
The contents of BuildMSICommands.txt are:

Code: Select all

;aic
SetVersion x.x.x.x
SetPackageName Installer_x.x.x.x.msi
save
build -force
If I run that set of commands, I get an error saying:

"The package type you entered in the command line doesn't correspond with the package type you selected when you created the project"

After fiddling around with the commands in the file, I have determined that it is the SetPackageName that makes it fail.

Does anyone have any idea on how to solve this problem? I have no clue whatsoever about why it comes up, can't see how setting the name may affect anything so greatly.

Thanks in advance to all,

Stella
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

If you build an .msi then in the BuildMSICommands.txt file put Installer_x.x.x.x.msi as parameter for the SetPackageName command. If you build an .exe then put Installer_x.x.x.x.exe as parameter for the SetPackageName command.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Doh! Didn't notice that one :oops: Thanks very much for the reply!

Another question... if I have a synchronized folder and rebuild the project from command line, it should refresh the folder before building, same as it does from the graphics interface, shouldn't it? Just checking...

Thanks!

Stella
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Yes all synchronized folder are refreshed on build. If you experiencing any problem regarding this please let me know.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

It appears to be working ok, I think the times we thought it was not refreshing properly may have had more to do with our build process not clearing up properly before a new build than with anything else.

Thanks for the quick reply!

Return to “Common Problems”