View Full Version : ISWiReleases[1].Build() - doesn't do anything

06-13-2005, 10:25 AM
The build in release configuration in Automation is not building anything.

int iOpen = m_ISWiProject.OpenProject(_stsettings.sProjectFile, false);
if (iOpen == 0)
m_ISWi_productconfigs = m_ISWiProject.ISWiProductConfigs;

When i open the ism file in Developer, i could build it there nicely. Since the build function does not return anything (void), i do not have a clue what is wrong with the function.

Many thanks in advance,

06-13-2005, 10:59 AM
What is the value of ISWIRelease.BuildErrorCount? Perhpas there is a folder locked or something that is not allowing the build to complete (start for that matter).

06-13-2005, 10:59 AM
Does it work if you use numeric indices instead of strings?

m_ISWi_productconfigs["HFRC"].ISWiReleases["HFRC"].Build( );

Perhaps see also the end of this tip: http://www.installshield.com/news/newsletter/0209-articles/cppautomation.asp.

06-13-2005, 11:11 AM
Hi Martin,
You are right. It does show that i have an errorcount of 1. I do not know what that error is? How do i find that out?

Robert, It does not help if i change the string to number. I already have tried that.

Thanks guys. You are quite good in giving a reply & quickly.

06-13-2005, 02:27 PM
There should be a log file that gets created in the output folder (<OutputLocation>\Version 1\NewRelease1\LogFiles in your case). That should contain more information about the nature of the problem.

06-13-2005, 02:30 PM
The path to the log in my last post should be <OutputLocation>\<YourProductConfiguraiotnName>\<YourReleaseName>\LogFiles (<OutputLocation>\HFRC\HFRC\LogFiles in your case).

The path I mentioned in the previous post is for my sample test. Sorry for the confusion.

06-14-2005, 03:40 AM
I do not have any log files or any directories for that matter created in my <ProjectFolder>.

The path of BuildLocation in ism file is <ProjectFolder>.
When i set my m_ISWiRelease.BuildLocation to c:\Temp there i got the Release built succesfully. I now get a HFRC directory. Great, atleast i have something.

When i change the project Release configuration to <ShallowFolderStructure> then it fails again. This time i do get an error log file, but of 0 KB. I will keep the <shallowFolderStructure> to NO for now. No big deal.

What i am going to do:
Create a directory myself with the same name as that of my ISM file without extension and set the BuildLocation to that folder. Now i have everything that an IDE does.

Thanks Martin. You put me on the right direction.

Another question:
When i open a Project i get a return value of 1. I do not know who is locking the process. I open the project twice actually. I do some operation close it the first time and i open it gain. Is it by anychance the GC in C# doing it?

06-14-2005, 10:53 AM
The other thing you can do is implement the event interface to get status messages. That is basically the same stuff that gets written to the log file. So, if an invalid path is specified or a locked folder\file is encountered such that the log file cannot be created, you should still get the status message event containing the error text. There is information in the help file on such events.