Page 1 of 1
miabuild and patching and tfs2010
Posted: Mon May 07, 2012 2:59 am
by redbyron
Hello,
i have created a custom workflow activity that invokes the miabuild for a project list, and works ok for build types 0,1,2
When i try to build a patch, in the patch output directory it creates an "Upgraded Package" folder, but it does not create patch .exe file.
If i run the command line from a cmd window, it works fine, the problem seems to be the external call that miabuild does to makecab.
I run the tfs build server as a windows service, and we cannot change that.
Please provide a fix or a work around...
Below is the command line that is executed in .mpr project directory from Custom Workflow activity...
miabuild "Project.mpr" /o="C:\Data\BA\1\TFSProject\Project\Setup\Project" /b=3 /r BINARIES="C:\Data\BA\1\TFSProject\Project\Binaries" VERSION="1.0.1"
Please keep in mind that miabuild does not return an error.
Re: miabuild and patching and tfs2010
Posted: Mon May 07, 2012 8:41 am
by FrancescoT
Dear Micheal,
honestly I never tried to run miabuild under TFS but if you say that works doing a full build, it should work with patch build too.
But I never tried and therefore I believe in what you say.
Let me check if am able to find something.
Regards
Re: miabuild and patching and tfs2010
Posted: Tue May 08, 2012 2:48 am
by redbyron
Hi Francesco,
thank you for investigating this issue,
please keep in mind that i patch Compressed Setups which have the CACHESOURCES variable to true.
I am waiting to hearing from you,
Re: miabuild and patching and tfs2010
Posted: Wed May 23, 2012 7:56 am
by redbyron
Hi,
do we have any news regarding this issue????
I can't create automated patches from TFS.....
Re: miabuild and patching and tfs2010
Posted: Wed May 23, 2012 10:01 am
by FrancescoT
Dear Micheal,
Please excuse

me but I did not found enough time to setup a machine to do that.
I can assure you that I'll do it very shortly. Please be patient ... has been a very busy period.
Regards
Re: miabuild and patching and tfs2010
Posted: Mon May 28, 2012 7:51 am
by FrancescoT
Dear Micheal,
I have executed a test with TFS to perform a build and works fine with a Patch build too (and compiler variables).
Personally I do not think your issue is caused by MiaBuild itself, even if InstallAware doesn't not provide officially any integration with TFS.
I used a call to miabuild via InvokeProcess within a TSF workflow.
I can only suggest to you to verify your process logic with the available MSDN documentation or consulting dedicated forum.
I'm very sorry but on my side I can't do much more.
Regards
Re: miabuild and patching and tfs2010
Posted: Wed May 30, 2012 1:33 am
by redbyron
Thank you Francesco,
below is the sequence on the TFS
Build Setup
miabuild "XXXXXXXXXXXXXXX.mpr" /o="C:\Data\BA\1\XXXXXXXXXXXX XXXXXXX\Setup\XXXXXXXXXXXXXXX" /b=1 /r BINARIES="C:\Data\BA\1\XXXXX\XXXXXX XXXXXX\Binaries" VERSION="2012.10530.291"
Create Patch
Patching
miabuild "XXXXXXXXXXXXXXX.mpr" /o="C:\Data\BA\1\XXXXX\XXXXXX XXXXXXX\Setup\XXXXXXXXXXXXXXX" /b=3 /r BINARIES="C:\Data\BA\1\XXXXX\XXXXXX XXXXXXX\Binaries" VERSION="2012.10530.291"
i invoke miabuild.exe two times one for the main setup and one for the patch from the same sequential workflow.
The reference to the original setup is a UNC path, is there any issue with that?
also i execute miabuild from the mpr's directory and miabuild's directory is in PATH env variable
Could you please tell me how you called miabuild and worked?
Re: miabuild and patching and tfs2010
Posted: Wed May 30, 2012 8:03 am
by FrancescoT
Dear Micheal,
- I have created a C++ project
- Added it to a TFS team project
- Added an InvokeProcess just after the "Run MSBuild for project" in my build workflow for the project.
- For InvokeProcess Argument I used: "full path to IA project" /b=3 CACHESOURCES=TRUE
- For InvokeProcess Filename I used: C:\Program Files (x86)\InstallAware\InstallAware 2012\miabuild.exe
That's it.
Re: miabuild and patching and tfs2010
Posted: Thu May 31, 2012 7:00 am
by redbyron
Hi Francesco,
for your information and any other user that encountered the same problem....
The account that runs the Build Service must have Full Access to the directories the setup files to be patched resides...
I asked the IT to give full access to the TFS Build Service account and the patch is now created...
PS
The reason that it was working from the command prompt was that i run it from my account on the build server machine, and i have full access on that directory...
Re: miabuild and patching and tfs2010
Posted: Thu May 31, 2012 7:58 am
by FrancescoT
Dear Micheal,
thank you for sharing this information.
Anyway because you told me that was failing with patch build only, I have not considered any account access problem.
Regards
Re: miabuild and patching and tfs2010
Posted: Thu May 31, 2012 8:09 am
by redbyron
Hi Francesco,
indeed the problem was only with the patch (/b:3),
the setup build (/b:0,1,2) was ok...
It seems that when it tries to extract the msi from the exe file, the process uses the directory the setup program resides....
this is where the TFS Build Account did not have access ....
Anyway, everything is fine now, and IA2012 works perfectly with TFS2010

Re: miabuild and patching and tfs2010
Posted: Thu May 31, 2012 8:21 am
by FrancescoT
Dear Micheal,
Ok that it is clear now and I think that probably you are right.
Anyway I am happy that you solved

.
Regards