Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


25. August 2011

 

In putting together content for this site, I find myself working in Visual C++ which presented an unintended consequence, the project folder’s files are big, huge in fact!  Most of the problem boils down to the intermediate files that Visual C++ generates for intellisense and pre-compiled headers.

 

Therefore each time I wanted to post a code example to this site, I had to go through and delete all of these temporary files or my archives would be huge.  Worse still, every time I open up the solution, they would be regenerated.  ( Yes, you can move these files outside of your folder as a possible work around ).  I figured with the whole me being a programmer thing, I could throw together a program that did this work for me.

 

Therefore I present to you ProjectCleaner.  Aim it at a folder containing your project or sln file click “Clean Project” and it will go through and delete all the temporary cruft ready for you to zip up and share.  For the record, it deletes log, tlog, pch, pdb and obj files as well as the ipch folder.

 

image

 

 

Here are the results after applying to a relatively simple project folder:

image

 

As you can see, it results in a 37MB reduction in size, which saves more than just a small bit of bandwidth.

 

So, if you are finding yourself needing to shrink your Visual C++ projects down to share them, this tool may prove useful.  The source is exceedingly primitive.  It’s written in C#, requires .NET 4.

 

 

Files:

 

CleanProject.zip  -- program executable

CleanProjectSource.zip -- source code

Programming

blog comments powered by Disqus

Month List

Popular Comments