In DotNetNuke v 4.6 a new installer system was introduced to handle the new Authentication Systems.  In DotNetNuke 5.0 we have extended the use of the Installer to all extensions, including Modules, Language Packs and Skins. 

In previous blogs in this series I introduced the new Extension Installer Manifest, and the 3 components that most developers would be fairly familiar with – Module, Assembly, File, as they are similar to the legacy module manifest, and I began to detail the individual component manifests by describing the Cleanup Component and the Assembly Component and File Component.

In this article I will dive deeper into the Script Component (see Listing 1).

Listing 1 - The Script Component manifest fragment from the BroadcastPollingCachingProvider
   1:  <component type="Script">
   2:    <scripts>
   3:      <basePath>Providers/CachingProviders/BroadcastPollingCachingProvider</basePath>
   4:      <script type="Install">
   5:        <path>Install</path>
   6:        <name>Install.SqlDataProvider</name>
   7:        <version>05.00.00</version>
   8:      </script>
   9:      <script type="UnInstall">
  10:        <path>UnInstall</path>
  11:        <name>UnInstall.SqlDataProvider</name>
  12:        <version>05.00.00</version>
  13:      </script>
  14:    </scripts>
  15:  </component>

The Script component is another Installer that inherits from the base File Component.  The <basePath> element identifies the root location for the Script.  It uses the <scripts> and <script> elements in place of the base class <files> and <file> element.

Note that there a few enhancements (compared with the legacy Module Installer) in how scripts are handled.

  1. Each script has a “type” attribute, which identifies whether the Script should be used in Install/Upgrade mode or is used 'in “UnInstall” mode
  2. Each script has a required version element which identifies which version the script corresponds to.  This means that you no longer have to use the convention of naming the script with the version “xx.xx.xx.SqlDataProvider”.  ou can of course still use the legacy naming convention, but you are not required to.
  3. The installer does support the “Install.SqlDataProvider” special script which is run first when installing an Extension.

Posted in: DotNetNuke  Tags: , ,

Comments


March 2. 2009 00:55
Jaydeep Bhatt
If I dont use “xx.xx.xx.SqlDataProvider”, how would I include more than one Script files ? i.e. how do i add
“01.00.00.SqlDataProvider” and also “01.00.01.SqlDataProvider” ?


March 2. 2009 02:34
Gone Theatre
Cool stuff.

that's useful for me...


March 2. 2009 11:28
cnurse
Jaydeep

You just need to make sure you specify the version element - this is what the installer uses to identify the version of the script.  So you can have aa.SqlDataProvider with a version no of 01.00.00 and bb.SqlDataProvider that has a version element of 01.00.01


March 11. 2009 01:43
Kampanye Damai Pemilu Indonesia 2009
i want try this script, thank your share.


March 16. 2009 11:15
phreakaholic
what a great info. this is what i'm looking for. thanks.


March 17. 2009 13:21
phreakaholic
thanks for this nice code.


April 6. 2010 15:48
trackback
Versioning your DotNetNuke modules - a quick guide

Versioning your DotNetNuke modules - a quick guide

Comments are closed

 Search Blog

 Adsense

 Calendar

«  September 2010  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
View posts in large calendar

 Tags

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Thoughts from the Wet Coast