Today, we'll wrapup our walkthrough of Sharepoint customization and deployment. We're going to cover automated installation of packaged SharePoint WSP files. We've already covered the topics below on master pages, features, and packaging:
· [Part I] Master page customization to add centralized navigation support to the master page (as well as some other changes to enable Ajax for a related project). The navigation was based on Marian Dumitrascu’s article at http://www.codeproject.com/KB/sharepoint/SharedNavigationProvider.aspx
· [Part II] Centralized publishing of common master pages, using Heather Solomon’s techniques outlined at http://heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx
· [Part III] Packaging of the feature as a WSP file, using the WSPBuilder application from Codeplex (http://www.codeplex.com/wspbuilder)
· [Part IV] Automated installation of the solution package, using the SharePoint Installer from Codeplex (again!) at http://www.codeplex.com/sharepointinstaller
Deployment
If you don’t want to use command line tools to deploy your file, you can use the handy Sharepoint deployment utility (also from Codeplex!) at http://www.codeplex.com/sharepointinstaller/ to create a setup ZIP file with your wsp file. The installer is relatively straightforward. Extract the contents to a new folder, and then revise those contents as needed. Here are the changes you need to make inside the sample file:
· Remove the sample wsp
· Adjust the text of the EULA as appropriate.
· Edit setup.exe.xml to change the following values:
o FeatureID – use the GUID generated above for the feature. It needs to match the value in feature.xml.
o SolutionID – this is the GUID in the solutionid.txt file from the WSPBuilder project
o SolutionFile – the full name of your WSP
o Solution Title – As appropriate
o Solution Version – Incrementing this number is a good practice on successive deployments. It will help your server decide how to handle a reinstallation for a higher version – should it be an upgrade or a repair.
o Logo Image – Optional. You’ll need to add the file and adjust the size to get it to fit. 60X35 has been a good size for me.
o FeatureScope = Site
That’s it! Zip up those files into a new Zip file and you’re done. Users can then take that zip file and install the solution on the farm just be extracting the contents and clicking setup.exe.
One last note – how do you test the deploy if you’ve been working on a server that already has the solution installed? You’ll need to clean out the old files:
· Make a backup copy of the current feature folder I the 12 hive
· Deactivate the feature from any site collections where it was tested
· Use stsadm –o uninstallfeatuure –name CustomMasterPages to uninstall the feature
· IISReset
· You may still have orphaned copies of the master page in the site collection gallery. It’s usually impossible to delete them directly, but, there’s a trick that usually works/
o Using SharePoint Designer, navigate to the _catalogs\MasterPage gallery.
o Create a temporary folder
o Move the custom master pages to the folder
o Delete the folder
· Remove the custom feature folder
Now you can use the installer to deploy your new master page feature to the Sharepoint farm.
Once the feature is installed, any changes you make to the deployed master pages in the 12 hive will be immediately reflected in all sites where the feature is activated and the pages are used. You could also repackage and redeploy the new files.
Hope this was a good exercise for you. Remember the steps:
· Customize the master pages to support centralized navigation
· Use a feature to publish a central set of master pages
· Package the feature as a WSP file
· Automate the installer to use setup.exe
Good luck, and please let me know if you have any questions!
Hi,
This artical is very useful for me. I am a Share Point developer and always looking to learn something new. I would like to introduce another good SharePoint blog, Have a look.
http://SharePointBank.com
Harry
Posted by: harry | 01/06/2010 at 01:24 PM