PDA

View Full Version : Log stream in command line.



ryannick
03-13-2008, 04:09 PM
Hi,

Can I get the log stream, live, in command line ?
I mean, when you compile with IS interface you got all logs live.
Can you get the same in console mode ?
I want to notify user what's happening right now.

Cheers,

Yannick.

RobertDickau
03-13-2008, 07:14 PM
What type of project? What kind of information do you want to display to the end user?

ryannick
03-20-2008, 12:17 PM
I'm trying to display the same thing as InstallShield shows in the console when compiling with InstallShield Interface.

I'm building a basic MSI project, from VBScript.

You compile a project with InstallShield IDE you'll see a bunch of text like :::

Created release folders
InstallShield Script Copiler
Version 14.0.0.162
Copyright 1997-2006 Macrovision Europe...

Compiling...
setup.rul
Linking...
Setup.inx - 0 error(s), 0 warning(s)

I want to get those and to display it live to a console (from which I'm compiling the project with a VBScript)

Thanks.

RobertDickau
03-20-2008, 04:26 PM
I'm not sure you can access it from VBScript, but there are StatusMessage events (from the ISWiProject object) you can catch in other languages; please search these forums and the help for "StatusMessage" for experiences others have had...

ryannick
03-24-2008, 07:31 PM
Thanks alot,
That's what I was looking for. But I've been working on that all day long and still doesn't work :s
I tried it in C#


class Program
{
ISWiAuto14.ISWiProject ISManip = new ISWiAuto14.ISWiProject();

public Program()
{
ISManip.StatusMessage += new ISWiAuto14.__ISWiProject_StatusMessageEventHandler(OnMessage);
}

void CompileProject()
{
if (ISManip.OpenProject("C:\\Program Files\\Macrovision\\IS2008\\InstallShield 2008 Projects\\MonTest\\MonTest.ism", false) != 0)
return;
ISWiAuto14.ISWiProductConfig cfg = ISManip.ISWiProductConfigs[1];
ISWiAuto14.ISWiRelease rls = cfg.ISWiReleases[1];
rls.Build();
}

void OnMessage(String message, ref bool bCancel)
{
Console.WriteLine(message);
}
}

It builds, but my CallBack function for the StatusMessage isn't called.

ryannick
03-25-2008, 10:28 AM
I got it worked...
If it can help anyone.

I was handling Project Events... But i needed to handle release event...
So by replacing :
ISManip.StatusMessage += new ISWiAuto14.__ISWiProject_StatusMessageEventHandler(OnMessage);
with
rls.StatusMessage += new ISWiAuto14.__ISWiRelease_StatusMessageEventHandler(OnMessage);

I got it worked.