Hi,
I use the SharePoint Visual Studio Project Templates on CodePlex http://www.codeplex.com/sptemplateland. You need to copy the zipped files to "My Documents\Visual Studio 2005\Templates\ProjectTemplates". This gives you a new project template for SharePoint Deployment. It contains the general structure for deploying images, features, site definitions and all files that need to be deployed to the 12 folder. It also supports writing SafeControl entries and GAC deployment.
You will see two VBScript files (.vbs extension). One for creating the manifest file and one for creating the DDF file. The manifest file informs SharePoint where to deploy the files / assemblies and any CAS policies etc. The DDF file is used by makecab.exe. The DDF lists the folders and files that need to be part of the CAB file. Once the CAB has been created you can rename and deploy using STSADM.
The reason why I like this process is you can do as much or as little as you want with the solution deployment. You could automate the manifest file, but hand code the DDF. I hand coded the DDF a few times to make sure I had the correct values and to learn the structure. Now I usually just vet the files.
I made some changes to the create ddf script. I use VSS (source safe) so I have some files in the root of the project that I dont want including in the package, I modified the script to ignore these file extensions. The second modifcation was to change the output file extension to .wsp ... saved me a renaming the file everytime I ran makecab.exe.
This process is the same as Andrew's post http://www.andrewconnell.com/blog/articles/UsingVisualStudioAndMsBuildToCreateWssSolutions.aspx but allows the automation of the manifest and ddf files. If you have a large deployment it can take ages to handcode these files.
I'm looking to post an article on my blog about this soon http://dhunter-thinkingoutaloud.blogspot.com/.
Hope this helps
Dave
My SharePoint Blog
http://www.davehunter.co.uk