Bridge plug-in runtime error.

Interested in developing new plug-ins? Got one to share? Post here!
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Wed Aug 29, 2012 2:45 am

Glen,

Thanks for basking in my reflected glory! I don't recall what it was I helped you with back then but I do recall not receiving the check in the post! :D

I've attached a zip file containing where I'm at at this moment. Unzip its contents into C:\Temp.

Look inside the BokkieRuntimes folder and you'll see a README.txt file describing what I did. Hopefully that'll get you on the same footing as me. Any questions to the usual place... :)
Attachments
Plugin projects.zip
(2.26 MiB) Downloaded 491 times
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 4862
Joined: Sun Aug 22, 2010 4:28 am

Re: Bridge plug-in runtime error.

Postby FrancescoT » Wed Aug 29, 2012 8:38 am

Dear Guys,

... I am waiting for an answer ... that's the reason why I haven't updated the question.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Wed Aug 29, 2012 9:15 am

Francesco, I'm not sure what it is you are waiting for an answer to. Could you elaborate? The last replies we had from you were that you were having something to eat and that you were investigating for us. I posted a zip file of the most recent code I generated this morning. I'm not sure what timezones christ23 and glenharvy are in but I've not heard from them since my last reply earlier today.

Did you manage to identify anything?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 4862
Joined: Sun Aug 22, 2010 4:28 am

Re: Bridge plug-in runtime error.

Postby FrancescoT » Wed Aug 29, 2012 9:31 am

Dear bokkie,

... yes I'm waiting for an answer to clarify what I found.
was my intention to give you the full story ... with the Hppy End .... but actually I'm still waiting for some info on how the NET bridge works at runtime.

So, following it is in short what I done and discovered untill now ... TO BE CONTINUED.

For what I seen plugin functionality is quite similar to C++.
The only differences stays in the fact that, Net runtimes are required to run the Net plug in (... obviously) and the plugin code execution, it is peformed through a bridge that effectively routes the IA functions Calls ( ... obviously due the limitation of directly Native code execution with NET).

InstallAware uses FILE BAG to store and keep tracks of plugins files. The process is finalized at build Time by the IDE plugin component with the function "CompileTimeBuild" (... exactly the same happens with NET Bridge plugin and C++). During this phase, the plugin is responsable to store all the required files to the destination FILE BAG folder passed by the function ( ... BuildPath function parameter). Using NET bridge, the files to be copied includes the NET Bridge runtime dll, the INI file used by the NET bridge to identify the used assemblies and the assemblies itself.

last night I have worked on it. I have released a test project that internally implementes the above requirements during build time.
This works correctly and all the files are placed under the FILE Bag position as expected.

The problem comes up when the Installation runs.
For what I see InstallAware engine handles correctly the file bag location but for some reason, when the NET runtime bridge is called, seems and I repeat seems, to not be able to handle this location correctly.

Probably it can be caused by an incorrect parameter ... and it what I am trying to discover actually.

TO be CONTINUED.
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

glenharvy
Posts: 164
Joined: Fri Sep 14, 2007 3:53 am

Re: Bridge plug-in runtime error.

Postby glenharvy » Wed Aug 29, 2012 11:25 am

Peter,

I can confirm I have the same problem as you do. When I ran the installer, I checked the contents of the $SUPPORTDIR$ and each of the required dll's as well as ini files do exist.

I have from the very beginning suspected something was missing as the test .net dll's indicate that they include several methods but there is no way you can select/call these methods from the IA GUI. The author of this beast uses IDE and Compile time dll's as meaning one and the same thing - at least I think he does. If he doesn't then I am more confused than ever. At the bottom of his notes he states:
Notes
During the build process, the NET IDE Plug-in have to copy the NET Runtime Plug-in as well the
Runtime Bridge and its ini File. This is done in my sample IDE Plug-in written in delphi for NET.


As far as I can decipher, there is no sample IDE Plug-in written in C# that includes the file copying function mentioned.

:?

PS: I've sent a short email to the author and hope he can spare some time to help us.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Wed Aug 29, 2012 2:25 pm

Glen & Francesco,

Thanks for the updates and progress. It looks like we'll have to let others come up with either a workaround or a better solution. I'd like to think that when the MaxLogic chap developed the bridge that he must have tested dotnet when he put it all together? Releasing it otherwise will prove to be a problem. In a way it's good we're all having issues as nobody can say "it works okay on my machine". :D

It'll be nice when it's all done and working. What I'm particularly interested in achieving is whether you can pass variables into it and get return values back like other plugins do. If I understand Francesco's explanation it seems that you should be able to. I'm looking forward to see if there is a solution.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

glenharvy
Posts: 164
Joined: Fri Sep 14, 2007 3:53 am

Re: Bridge plug-in runtime error.

Postby glenharvy » Wed Aug 29, 2012 4:41 pm

bokkie wrote:Glen & Francesco,
It'll be nice when it's all done and working. What I'm particularly interested in achieving is whether you can pass variables into it and get return values back like other plugins do. If I understand Francesco's explanation it seems that you should be able to. I'm looking forward to see if there is a solution.


I'm beginning to think that this will not be possible unless you write your own plug-in which you can now do using C# (and I guess VB). The .Net Bridge that we are all excited about and trying to get running is the component you need to use when you use C# to write your own plug-in. None of us have actually written our own plug-in and the author has only provided a working example which he made using Delphi.

There is another thread on IA Forum's where the author helped christ23 write their own plug-in based on .Net Bridge but the thread is incomplete. You might find some further information there.

I'm waiting for the author or IA to clear up the situation.

FrancescoT
Site Admin
Posts: 4862
Joined: Sun Aug 22, 2010 4:28 am

Re: Bridge plug-in runtime error.

Postby FrancescoT » Thu Aug 30, 2012 2:52 am

Dear Glen,

I'm waiting for the author or IA to clear up the situation.


It's exactly what I am trying to do.

I'm beginning to think that this will not be possible unless you write your own plug-in which you can now do using C# (and I guess VB). The .Net Bridge that we are all excited about and trying to get running is the component you need to use when you use C# to write your own plug-in. None of us have actually written our own plug-in and the author has only provided a working example which he made using Delphi.


The working example is available with C++ also and I have personally developed plugins using C++ ( ... I am a C++ developer ... some of mine plugins are available through this forum).
Of course the .Net Bridge is the component to be used when you use C# to develop your own plugin ( ... that's what I have already done ... see my previous post).

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

MaxLogic.eu
Posts: 25
Joined: Sat Oct 08, 2011 2:42 am
Contact:

Re: Bridge plug-in runtime error.

Postby MaxLogic.eu » Thu Aug 30, 2012 3:45 am

Hi all,

I will try to help you out.
Some time passed since I last worked on it, so please be patient with me :)

As already mentioned, the net bridge plug-in functionality is quite similar to win32 plug-ins written in C++ plug ins or delphi.
There is nothing really complex about, in general it acts as a bridge between the IA and the net plug-in. On his own the bridge do nothing, just forwarding the messages and the variables.

glenharvy wrote:...checked the contents of the $SUPPORTDIR$ and each of the required dll's as well as ini files do exist.


Do you copy the runtime net bridge dll as well?
Like I said, the net bridge do only the variable forwarding, all the actual work must be done by your plug-in.


glenharvy wrote:...The author of this beast uses IDE and Compile time dll's as meaning one and the same thing - at least I think he does. If he doesn't then I am more confused than ever. At the bottom of his notes he states:...



There are two net bridge dlls. Reflecting the two IA plug ins you can find in the IA samples.
One for the runtime plug-in, the one you can find in the IA samples as: mEXEPlug.dpr
And one dll for the compile time plug-in, the one you can find in the IA sample plug ins as mIDEPlug.dpr
I do not claim to be an IA expert, but the two above was sent me to be those that a net bridge is needed for.

And as for the statement from the doc, it just means that you need to copy all your files AND the runtime net bridge dll as well.
The documentation was not intended for end users, It was targeted at my customer at IA. That is why it may be a bit confusing

An important issue is, that IA must use the net bridge dlls, not your assemblies. IA can not use net assemblies, because of it, you need to use the net bridge dll instead when working from IA point of view. IA will load the bridge dll, and this will in turn read the ini and load your assembly, and then just forward all function calls.
So when configuring the IA, you have to forgot about your assembly, just use the bridge dll.

I hope that makes all of it a bit more clear?
About me:
Pawel Piotrowski is a software developer and a Delphi and C++/C# expert with 15 years of programming experience.
Learn more at http://www.maxlogic.eu

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Thu Aug 30, 2012 3:47 am

FrancescoT wrote:...when you use C# to develop your own plugin ( ... that's what I have already done ... see my previous post).Regards


Francesco,

I apologise if I'm not understanding what you have tried. Are you saying that you were able to create a c# plugin and that it worked in both design time and runtime? Or, like myself and others, your c# plugin also fails with the same plugin error message when you run the installation media. Looking at it another way, if yours has partly worked could you try the example I posted for download earlier?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Thu Aug 30, 2012 3:58 am

MaxLogic.eu wrote:Hi all,


Good morning, Pawel. Thank you for looking at this thread and the problems some of us are having. If you scroll up a few replies you'll see a zip file I attached. If you have VS available would you be able to download my example and see if there is anything obviously wrong with what I have tried?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 4862
Joined: Sun Aug 22, 2010 4:28 am

Re: Bridge plug-in runtime error.

Postby FrancescoT » Thu Aug 30, 2012 4:37 am

Dear bokkie,

I am preparing a working sample with all the required VS projects (... in reality I have already done it).

I believe to be just one step to the solution ... actually the only problem I have is during runtime execution. But seems that I have find out why this happens.

I hope to be able to post the projects soon.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Thu Aug 30, 2012 5:05 am

That's excellent news, Francesco. We're looking forward to reading about it! :)

We will then be a step closer to looking at what we'd really like to do (in addition to other things) and that's receive values from variables and send values back to them. One particular interest I have is to use the socket frameworks to send and receive messages with a Windows service on another machine. I suppose like all plugin babies I must learn to walk before I run, not so? :)
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

glenharvy
Posts: 164
Joined: Fri Sep 14, 2007 3:53 am

Re: Bridge plug-in runtime error.

Postby glenharvy » Thu Aug 30, 2012 6:18 am

MaxLogic.eu wrote:There are two net bridge dlls. Reflecting the two IA plug ins you can find in the IA samples.
One for the runtime plug-in, the one you can find in the IA samples as: mEXEPlug.dpr
And one dll for the compile time plug-in, the one you can find in the IA sample plug ins as mIDEPlug.dpr
I do not claim to be an IA expert, but the two above was sent me to be those that a net bridge is needed for.


Thanks for joining in - much appreciated.

After examining your ini files I presumed that for C#, the two files you mention above were NOT appropriate.

EXEPlug_NetBridge.ini reads:

Code: Select all

[CFG]
;; The Net Assembly need to be plased in the same directory as the NET Bridge DLL.
;; Please provide only the Filename here without the path, but including the extension (usially .dll)

;; Delphi for net
FILE=mEXEPlug.dll

;; C#
;;FILE=DemoLib.dll


;; Please provide the full Classname including the full namespace here

;; Delphi for net
NAMESPACE=EXEPlugClass.TClass1

;; C#
;;NAMESPACE=DemoLib.Class1


bokkie and I are using the C# references.

I think I will wait for Francseco to complete his project before experimenting further.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Thu Aug 30, 2012 6:35 am

glenharvy wrote:bokkie and I are using the C# references.

I think I will wait for Francseco to complete his project before experimenting further.


I concur. I too will wait until there's a heads-up to try something.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP


Return to “Plug-In Development”

Who is online

Users browsing this forum: No registered users and 4 guests