Maybe possibility for C# plugins

Interested in developing new plug-ins? Got one to share? Post here!
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Maybe possibility for C# plugins

Postby giaviv » Tue Sep 20, 2011 3:10 pm

christ23,

As an alternative, you can create a win32 dll in C# and invoke it with the Run Program command.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

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

Re: Maybe possibility for C# plugins

Postby bokkie » Tue Sep 27, 2011 8:10 am

christ23,

Did you manage to get something developed and tested using C#? I'm interested in hearing how it went and if it worked as you expected. If you did and you get to read this post, I'd appreciate a sample solution and code. :) :wink:
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Re: Maybe possibility for C# plugins

Postby sinan » Fri Oct 07, 2011 9:43 am

I have just the thing for you, please download the attachments!!!

InstallAware has outsourced a .NET Plug-In Bridge and this is the first delivery we've had for it, arrived just today.

Try it out and let us know what you think?

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Re: Maybe possibility for C# plugins

Postby sinan » Fri Oct 07, 2011 9:44 am

Here's the documentation file.
Attachments
NETBridge - Development Notes.pdf
Documentation
(66.61 KiB) Downloaded 10212 times

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Re: Maybe possibility for C# plugins

Postby sinan » Fri Oct 07, 2011 9:45 am

Here's the actual materials.
Attachments
NETBridgeProject.7z
.Net Plug-In Bridge
(1.35 MiB) Downloaded 6346 times

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Sat Oct 08, 2011 3:32 am

I'm the author of the NET Bridge, please do not hesitate to contact me if you need any help or if you find any bugs or problems using the NET Bridge.
I prepared a sample of a Runtime Plugin written in C# for you, you can download it here:
http://www.maxlogic.eu/downloads/install_aware/net_exeplug_c.zip
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

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Tue Dec 13, 2011 5:27 am

Hi all,

if you wish to contact me, You can of course always use the contact form on my web page: www.maxlogic.eu
Or you can contact me directly by: info@maxlogic.eu

Or just post in this thread
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

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Fri Jan 06, 2012 4:39 am

ModuleFolder is a string property of the called class.

in C# it should look like this:

private string module_folder;
public string ModuleFolder
{
get
{
return this.module_folder;
}
set
{
this.module_folder = value;
}
}
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

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Wed Jan 11, 2012 3:23 am

Hi, if you plug in works in my test program and works in the IA. Then you are on the right way.
The problem seems to be in the debugger, right?
Unfortunately, I'm not able to help you here... I have little knowledge of the IA debugger.
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

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Sun Jan 15, 2012 7:23 am

If the function is called and executed in my test tool, then that means that the plug-in itself is fine.
So let us focus on the configuration of your plug-in.
First, you have to create an entry in the windows registry, as described in the IA help.
But, the path have to point to the net bridge dll, not to your net assembly.

The next step is to configure the net bridge, so it can call your net assembly, to do this properly you have to edit
EXEPlug_NetBridge.ini
IDEPlug.dproj_NetBridge.ini

As soon as all this is done properly, IA should call the net bridge dll and it should call your net assembly.
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

christ23
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: Maybe possibility for C# plugins

Postby christ23 » Mon Jan 16, 2012 7:53 am

Hey together,

hmm - my account has been deleted (and all my posts in the past) :(, don't know why. But i could re-register ...

OK, i am with your opinion : I think the plugin itself is fine.
Now ...
- the windows registry. I tried to do exactly what the IA help describes, but i will post my .reg here, maybe you could have a look at it ?

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\MimarSinan\InstallAware\2.0\Plug-Ins\ORASQL2]
@="C:\\\\Documents and Settings\\\\***\\\\My Documents\\\\Doku\\\\Installer\\\\_InstallAware\\\\Plugins_dotNet\\\\NETBridgeProject\\\\_Bin\\\\data\\\\IDEPlug.dproj_NetBridge.dll"
"Action"="ORASQL2"
"Execute"="EXE_sql.dll"
"Script"="ORASQL-RUN"

Note : i had to mask (***) some user data, due to our safety guidelines


I think, the .reg is okay : Action=Key (ORASQL2), path=...\\IDEPlug.dproj_NetBridge.dll

- the EXEPlug_NetBridge.ini :

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)
FILE=EXE_sql.dll

;; Please provide the full Classname including the full namespace here
NAMESPACE=EXE_sql.EXE_sql


- the IDEPlug.dproj_NetBridge.ini

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)
FILE=IDE_sql.dll

;; Please provide the full Classname including the full namespace here
NAMESPACE=IDE_sql.IDE_sql


But, not working, ummm. The plug-in seems to be recognized by IA, it is available like a "MSI"-Command, and the CompileTimeBuild(...) is popping up, too.

But the RuntimeExecute not :( - why ?
Last edited by christ23 on Tue Jan 17, 2012 1:46 pm, edited 1 time in total.

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Mon Jan 16, 2012 8:32 am

this one is wrong:
"Execute"="EXE_sql.dll"

it have to point to the net bridge, not your assembly,
so it must look like this:
"Execute"EXEPlug_NetBridge.dll"

The IA must always be pointed to the net bridge dlls not to the net assemblies.
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

christ23
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: Maybe possibility for C# plugins

Postby christ23 » Tue Jan 17, 2012 1:51 am

Hey,

great fine, it's almost like a powder (like Armstrong said on the moon). :)

Yesterday evening i realized the wrong "Execute=", but thanks for your help anyway !

Now ready for getting into the plug-ins ...

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

Re: Maybe possibility for C# plugins

Postby MaxLogic.eu » Tue Jan 17, 2012 3:54 am

I'm happy I was of some aid :)
If you need any further support, just let me know.
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

christ23
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: Maybe possibility for C# plugins

Postby christ23 » Tue Jan 17, 2012 11:08 am

Yepp, here is the further support call ;)

In the docs, it is said that the RunTimeExecute will be called twice, right ?

I only get it called once, but why ?

In the RunTimeExecute make a case decision like

Code: Select all

 if (null == NewVariables)
            {
                 // First call to the function
                 MessageBox.Show("first call");
            }
            else
            {
                // Second call to the function
                MessageBox.Show("second call");
                nRetVal = 0;
            }


That should be the right thing, isn't it ? But, the NewVariables always is "null". What am i doing wrong ?


Return to “Plug-In Development”

Who is online

Users browsing this forum: No registered users and 36 guests