Plug-In Dev Help: Error during build

Got a problem you cannot solve? Try here.
mbuckaway
Posts: 8
Joined: Fri Dec 29, 2006 11:49 am

Plug-In Dev Help: Error during build

Postby mbuckaway » Mon Jan 15, 2007 3:57 pm

(if this belongs in the Plug-In Dev forum, my appologies)

I am developing my own plug-in to kill off an application. The current TerminateProgram functionality does not work in my situation. I have used the sample Eval plug-in code to develop the plug-in. The DesignTime DLL works. I can use the about box, add/edit my script code, but I cannot build the project. The documentation is rather vague. I am using the AutoRun project to test it to keep things simple. A compile yields the following:

Built plug-in action Process Id
Created Windows Installer database
Built installation executable
Injected setup languages
Error during build: Unable to find support file , use the Project Manager window to update or remove the reference

I know it is my plugin because if I comment it out, the build works.

I have implemented a Copyfile routine to copy my runtime dll to the build directory - although, it does not appear to be necessary for Eval plug-in (and whether I commend my copy routine out or not, it still fails). There is something quite strange: any other plug-in copies itself to the project folder AND the build folder. My plug is only copied to the build folder. If I add the EXE dll to the project folder it still will not build.

I am missing something simple. Anyone that has Plug-in experience off any assistance?

Thanks,
Mark

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Jan 15, 2007 4:02 pm

Want to post your build code - I'll see what I can find out!
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Mon Jan 15, 2007 4:40 pm

You can check a few items in CompileTimeBuild and Registry

- Registry: Is "Execute"="your EXEPlug.dll"?
- Does CompileTimeBuild returns true?
- Do you modify any parameters?

I use Delphi and my CompileTimeBuild looks like this;

Code: Select all

function CompileTimeBuild(MSIHandle: THandle; State, BuildPath: PChar; Build: Boolean;
  var Fetch: Boolean): Boolean; stdcall; export;
begin
  Result := True; // compile time build successful
  if Build then
  begin
    // copy runtime DLL
    CopyFile(PChar(ModuleFolder + 'FirewallEXEPlugIn.dll'),
      PChar(BuildPath + 'FirewallEXEPlugIn.dll'), false);
  end;
end;


And finally you can run InstallAware as host application from your compiler to debug your DLL code.
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

mbuckaway
Posts: 8
Joined: Fri Dec 29, 2006 11:49 am

Postby mbuckaway » Tue Jan 16, 2007 11:26 am

Tinus wrote:You can check a few items in CompileTimeBuild and Registry

- Registry: Is "Execute"="your EXEPlug.dll"?


Hmm. Checked. I exported the reg file. The contents are below:

Code: Select all

[HKEY_LOCAL_MACHINE\\SOFTWARE\\MimarSinan\\InstallAware\\2.0\\Plug-Ins\\GetProcessID]
@="C:\\\\src\\\\lgplugins\\\\GetProcessId\\\\debug\\\\lgIDEProcessId.dll"
"Action"="Process Id"
"Execute"="lgEXEProcessId.dll"
"Script"="Get Process Id"


...hmmm.....

Found the problem.

Action in the registry entry and the NAME of the registry entry must be the same.

The registry entry above is not correct, but the registry entry below is:

Code: Select all

[HKEY_LOCAL_MACHINE\\SOFTWARE\\MimarSinan\\InstallAware\\2.0\\Plug-Ins\\Process Id]
@="C:\\\\src\\\\lgplugins\\\\GetProcessId\\\\debug\\\\lgIDEProcessId.dll"
"Action"="Process Id"
"Execute"="lgEXEProcessId.dll"
"Script"="Get Process Id"


I changed the registry to the above entry and it now compiles and builds correctly.

Thanks for the pointers. I knew is was something simple and stupid.

Mark


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 42 guests