Page 1 of 1

Multiple Install commands

Posted: Thu Oct 25, 2012 3:51 am
by steven evans
I am thinking of auto generating scripts as a way to enusre all dependant dlls are included correctly. This will result in having nested scripts i assume this is not a issue. I will also mean i will get the same file being set for install in multiple places for diffenent features (as below) is this and issue?

Code: Select all

~InstallAware Clipboard Data~
~End~
~{E5B2C5FC-43B1-4E3B-8F2F-1081B3154781}~
~Install Assembly~
~{F9AA1521-C017-4AEE-9247-6762A6EFFC76}~
~C:\Source\Main\J2 Libraries\J2 Framework\J2.Framework.Base\bin\Release\J2.Framework.Base.dll~
~TRUE~
~~
~If~
~{612F5AB0-8224-4D2E-AAEE-E7C887ABDDB5}~
~SELECTED~
~0~
~TRUE~
~FALSE~
~Get Component State~
~{F0F76CC7-8C9E-45BD-8BEF-1D577B98A1B9}~
~Plugin\J2 Freedom~
~SELECTED~
~Web Media Block~
~{F0300777-AA12-469F-968A-4409002B8720}~
~J2 Freedom~
~http://www.mywebsite.com/J2 Freedom.7zip~
~FALSE~
~End~
~{0D39E463-58FB-4F02-AD14-BE3E557B15A1}~
~Install Assembly~
~{3F17C129-2C2E-425A-9A26-4666B5BC85D5}~
~C:\Source\Main\J2 Libraries\J2 Framework\J2.Framework.Base\bin\Release\J2.Framework.Base.dll~
~TRUE~
~~
~If~
~{4893E431-491B-4DC5-B384-1473E6EF3272}~
~SELECTED~
~0~
~TRUE~
~FALSE~
~Get Component State~
~{A9A5B81C-C28B-4096-AD05-101D4F64A884}~
~Plugin\J2 Builder~
~SELECTED~
~Web Media Block~
~{83765EB3-4783-400A-A947-81D54AEF79B6}~
~J2 Builder~
~http://www.mywebsite.com/J2 Builder.7zip~
~FALSE~

Re: Multiple Install commands

Posted: Thu Oct 25, 2012 11:48 am
by FrancescoT
Dear Steven,

I my suggest you to not include the same file with different WEB MEDIA BLOKS ... it can cause failure during installation.

Each Block should have a different set of files.

Regards

Re: Multiple Install commands

Posted: Fri Oct 26, 2012 4:30 am
by steven evans
can you clarify what you mean by
different WEB MEDIA BLOKS
. The answer to me is not that clear. In my scheme each dll we have will have a script file with an install command (with web block) each depent dll will have its script file included in this file. So as you see I will only have one script defining the web block but this script will be used multiple times.

Re: Multiple Install commands

Posted: Fri Oct 26, 2012 8:50 am
by FrancescoT
Dear Steven,

switching your code to human redable format:

Code: Select all

[DEFINE WEB MEDIA J2 Builder]
Get Component Plugin\J2 Builder Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
  Install Assembly C:\Source\Main\J2 Libraries\J2 Framework\J2.Framework.Base\bin\Release\J2.Framework.Base.dll to Global Assembly Cache
end
[DEFINE WEB MEDIA J2 Freedom]
Get Component Plugin\J2 Freedom Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
  Install Assembly C:\Source\Main\J2 Libraries\J2 Framework\J2.Framework.Base\bin\Release\J2.Framework.Base.dll to Global Assembly Cache
end
I see that you have two different media bloks, "J2 Builder" & "J2 Freedom".
If you build the project that uses this code as WEB BASED EXE, it will produce respectively two media bloks.

If I am not wrong, those bloks contains the same " C:\Source\Main\J2 Libraries\J2 Framework\J2.Framework.Base\bin\Release\J2.Framework.Base.dl" file.

am I mising something?

Regards

Re: Multiple Install commands

Posted: Fri Oct 26, 2012 9:31 am
by steven evans
you have it right, but what i expect to have is as follows

Code: Select all

[DEFINE WEB MEDIA J2 Builder]
Get Component Plugin\J2 Builder Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
  Include Script:  J2 Builder Script
[DEFINE WEB MEDIA J2 Freedom]
Get Component Plugin\J2 Freedom Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
  Include Script:  J2 Freedom Script
end
J2 Builder Script and J2 Freedom Script will contain

Code: Select all

...
Include Script:  J2.Framework.Base Script
...



J2.Framework.Base Script

Code: Select all

...
[DEFINE WEB MEDIA J2.Framework.Base]
Install Assembly C:\Source\Main\J2 Libraries\J2 Framework\J2.Framework.Base\bin\Release\J2.Framework.Base.dll to Global Assembly Cache
...

Re: Multiple Install commands

Posted: Fri Oct 26, 2012 9:57 am
by FrancescoT
Dear Steven,

when the Web Media blocks will be created, these will contain the file only ...

... and as you doing, you will have two block with an identical file ( that it is not correct at all!).

By the way, I am still confused about your real target ... I'm ver sorry probably I am missing something.

Regards

Re: Multiple Install commands

Posted: Sat Oct 27, 2012 4:45 am
by steven evans
Francesco,
My original question came from a half formed idea on how to create an automated process for ensuring that an assembly has all its dependants present in the install. The idea is to use a Visual studio add-in walk thought the dependences of a project and create a script. Remember each dependant will also have dependences; so this lead me to the idea of a script containing a install command and then including dependant scripts. As some assemblies are used in several places this approach means that a scrip maybe included several times, hence my question.

The issue you brought up with web blocks is more to do with our architecture that with this process and may mean AI is unusable for us. Our architecture is plug-in based i.e. the main application searches a known folder for specially marked dll’s an then loads them dynamically. So in the installer we have the main app as a feature and each plug-in as a feature to allow our users to pick and mix. Each of our plug-in dll’s has a set of dependant assemblies, many of the dependant assemblies are shared across multiple plugins. So the question is how do we define web blocks to allow them to be used in multiple features?

Re: Multiple Install commands

Posted: Mon Oct 29, 2012 12:43 pm
by FrancescoT
Dear Steven,

thanks for pointing this out, I hope to have a more clear view of your needs.

Generally WEB MEDIA BLOCKS are used with project features or runtimes.
The most common use is with application runtimes, for example; giving the opportunity to share a common runtime with different setup package that may require it. The same approach can be used with any file or group of files, you could also use a single WEB MEDIA BLOCK to handle a single file only.

The only limitation that you have to follow, it is to keep each WEB MEDIA BLOCK unique with its content, if these BLOCKS are used with a same setup package. This is due to the fact, that this mix could cause access errors with file informations access during setup execution.

My question is, when you say;
"Each of our plug-in dll’s has a set of dependant assemblies, many of the dependant assemblies are shared across multiple plugins"

Are these dependant assemblies installed with the same folder that contains the plugin?
Supposing that you have Plugin A and Plugin B and both have to use the same dependant assembly, a copy of this assembly is installed in each plugin folder?

If true, why do you not consider to create for each single PlugIn a completely different setup package, that could be download and installed only if required by feature selection?


Regards

Re: Multiple Install commands

Posted: Mon Oct 29, 2012 2:48 pm
by steven evans
The answer to your quetions is yes. To be more accurate the shared files are installed to the GAC, does this make a differance?
create for each single PlugIn a completely different setup package, that could be download and installed only if required by feature selection
This sounds complicated. I dont want the user to have to download a 10+ installers. The other solution is to have a selection installer that calls the selected plugins; which i not sure how to do.

Re: Multiple Install commands

Posted: Tue Oct 30, 2012 12:22 pm
by FrancescoT
Dear Steven,

Honestly I suppose that it is easier in this case.

Create a core WEB MEDIA BLOCK component that contains only all common assemblies dlls that have to be installed to the GAC.

Create a WEB MEDIA BLOCK for each possible plugin that you may need and eventually include with it, also any additional assemblies dlls (That it unique with a particular plugin).

Then with your setup package you will install by default the core WEB MEDIA BLOCK and by user selection, the selected plugins.

Doing this you will have each WEB MEDIA BLOCK unique with its content.

What do you think about?

Regards

Re: Multiple Install commands

Posted: Wed Oct 31, 2012 3:03 am
by steven evans
Unfortunately this approach misses dll's that are shared by some plugin but not all. Using the offline block may be the way to go for us as our app is relatively small in size and it's a feature that we are not that concurred with. This still however leaves us with understanding if we can have multiple Install commands that install the same file to the same place but for diffent features.

Re: Multiple Install commands

Posted: Thu Nov 01, 2012 8:21 am
by FrancescoT
Dear Steven,

The limitation I am refering is only related with WEB MEDIA BLOCKS contents.
Of course you can have multiple Install commands that install the same file for diffent features, with OFFLINE Block. No limitation doing this.

Regards