tags:

views:

64

answers:

3

What tool do you use to only zip up the source code of an open souce project or choose which files you want to include for packaging? I'm using Visual Studio 2008.

A: 

You can use a version control system like Subversion to do this. All the source files relevant to your project are checked in, and you can create a second working copy in another directory, check if it compiles (i.e. if the source is complete), clean it again, and zip it up minus the .svn directories.

In Visual Studio, use an add-on like AnkhSvn to make sure all files that are in your project are added to Subversion.

You can automate the svn update and zip with any kind of scripting language (msbuild, powershell, perl, python, etc...)

But then, you could also publish the Subversion repository url and let others use that instead of a .zip file!

chris166
What you describe in the first paragraph is what I want to automate.
seanlinmt
A: 

Are you using a continuous integration process such as CruiseControl.NET? If so you can add a build step to zip up the entire working folder after a successful release build is done and any cleanup is performed, then even save it to an FTP somewhere if needed.

If not you could still do this in the build process from inside Visual Studio by editing the project file in the post build events. Both cases could be done using the MSBuild Community Tasks since there's a Zip task along with FTP and some others.

If you do an SVN Export instead of SVN Checkout, assuming you're using SVN, then the .svn folders won't be created so there shouldn't be any cleanup to perform before zipping up the folder since you'll have an exact copy of your trunk folder.

Brian Surowiec
A: 

Ok, I have found 2 ways you can do this

http://www.codinghorror.com/blog/archives/000368.html

or

http://code.google.com/p/treetrim/

seanlinmt