Click here to Skip to main content
Click here to Skip to main content

ProjectZip Remoded 1.6 - A '3-in-1' tools package for zipping VC6 and .NET workspace and project files

, 31 Mar 2004 CC (ASA 2.5)
Rate this:
Please Sign up or sign in to vote.
Zip your VC6 and .NET workspace and project files using a Standalone Executable, an Explorer shell extension or an updated VC6 Addin

Downloads

<!-- Article image -->

Sample Image - pzoptions.jpg

<!-- Add the rest of your HTML here -->

Introduction

I should like to extend my sincere thanks to all those for mailing me reminders about the .NET port of ProjectZip which I had 'promised' to write following the initial interest in the VC6 addin.

I had hoped the issue would quietly go away as my early forays into .NET addin-writing did not fill me with enthusiasm. Additionally there was the problem of .NET 2002 addins not being compatible with .NET 2003 which left me feeling that a .NET port was a can of worms that I really did not want to open, let alone plunge my hands into!

Nevertheless, a promise is a promise, and I'm fairly honourable if nothing else, so I vigorously thought of alternatives that might satisfy the .NET community without requiring an actual .NET port.

There was also some unfinished work relating to being able to zip entire workspaces and not just the active project that prompted me to get on and finish the job, which I think I now have (more or less).

The result is a '3-in-1' solution - three tools with the same core functionality - providing a multiplicity of ways to zip a workspace or project file for Visual Studio 6 and all versions of Visual Studio .NET.

The way I've re-architected the core functionality should also allow it to be extended to support project files from other development environments such as Borland C++, Delphi and Visual Basic.

1. ProjectZip Executable (New)

This is one of two solutions for .NET users, although it can also be run directly from explorer, or more likely from the Quick-Start-Bar (or whatever it's called).

Apart from a filename on the commandline, the executable also accepts the following parameters:

  • /q - quick zip using the current options
  • /o - show the options dialog only
  • /u - unzip a workspace or project from a .zip file

The filename can have the one of following extensions when zipping:

  • .dsp
  • .dsw
  • .sln
  • .vcproj

and .zip when unzipping.

If you pass no parameters except a filename then the assumption is that you want to zip the file.

If an inappropriate file is passed on the commandline then you will just get the options dialog

And finally, if you run the executable with no commandline (i.e. from explorer) then you will be prompted to browse for the file you want to zip.

2. ProjectZip Shell Extension (New)

This is the second solution for .NET users, although it may also become the prefered option for VC6 users since it does not require VC6 to be run.

To install all you have to do is:

  1. Copy ProjectZipShExt.dll to your folder of choice
  2. Close all explorer windows
  3. Register it as follows: regsvr32 "<path>\ProjectZipShExt.dll"

Then whenever you right-click on a VC6/7 workspace or project file in explorer you will have the option to zip that file.

Note: at present you always get the options dialog because I wanted to limit the number of menu items that get added to the explorer context menu.

ProjectZip Addin for VC6 (Updated)

This has been substantially re-written to support the re-architected core functionality and now sports 5 buttons instead of the original 3. The two extra buttons allow the zipping of entire workspaces rather than just the active project.

The two forms - Workspace and Project - are denoted by 'W' and 'P' on the buttons.

I've also removed the restriction on having to have a workspace or project open to use the addin. Instead, if the current Workspace or Project cannot be determined, you will be prompted to browse to the file you want.

To install and use the addin:

  1. Close VC6 if its is open.
  2. Copy ProjectZip6Addin.dll to "..\Microsoft Visual Studio\Common\MSDev98\AddIns"
  3. Restart VC6
  4. Select the 'Add-ins and Macro Files' tab from the 'Tools|Customize' dialog box.
  5. Select the checkbox next to the the 'ProjectZip6Addin' entry.
  6. When you close the dialog the ProjectZip toolbar should appear which you can drag and drop onto the VC6 main window.

Note: Apologies to existing users for renaming the addin but with 3 projects all providing similar services I had to differentiate between them.

Restructuring the Code

The following diagram (drawn with CodePlotter © AbstractSpoon 2003) shows the architecture of the core functionality of the ProjectZip toolset.

{{DIAGRAM_START

: ProjectZip Core Functionality Architecture

                                                .------------------.
                                                |CProjectZip6      |
                                                |__________________|
                                                |                  |
                                                |overides virtual m|
                                                |ethods to provide |
                                                |parsing of the dsp|
                                                | and dsw files    |
                                        -------->------------------·
                                        |
  .-------------.    .------------------^.
  |IProjectZip  >---->CProjectZipBase    >------>------------------.
  |_____________|    |___________________|      |CProjectZip7      |
  |             |    |                   |      |__________________|
  |pure virtual |    |contains generic zi|      |                  |
  | interface   |    |p code with key met|      |overides virtual m|
  ·-------------·    |hods declared as pu|      |ethods to provide |
                     |re virtual to handl|      |parsing of the vcp|
                     |e different file fo|      |roj and sln files |
                     |rmats              |      ·------------------·
                     ·------------------v·
                                        |
                                        -------->------------------.
                                                |Other Formats...  |
                                                |                  |
                                                |                  |
                                                ·------------------·
}}DIAGRAM_END

This architecture affords me a number of benefits:

  • New workspace/project file formats can be added by simply deriving from CProjectZipBase and implementing 3 pure virtual functions, two of which are one-liners.
  • CProjectZipBase (accounting for 95% of the code) knows nothing about specific file formats which protects it from file format tinkering.
  • The tools described earlier need only interface with IProjectZip, further protecting them from internal changes to CProjectZipBase and its derived classes.

If you don't use Visual Studio and would like to develop parsers for the particular development system you do use then I would be happy to answer any questions you may have and provide guidance on what would need to be done.

Copyright

The code is supplied here for you to use and abuse without restriction, except that you may not modify it and pass it off as your own.

History

  • 1.6 (2 Apr 2004)
    • option added to allow zipping of 'non-essential' project files such as .clw, .ncb, .opt, .suo
    • various bugs fixed relating to using the correct user preferences
    • filter index is now saved after browsing for a file to zip (affects executable only)
  • 1.5.2 (9 Mar 2004)
    • code added to handle project file paths of the form ('\file.cpp') which are files in the root of the drive containing the proejct file (thanks to gjr)
    • registry code fixed where direct registry access was failing (thanks to Peter Boulton)
  • 1.5.1 (5 Mar 2004)
    • small adjustment to .NET project file parsing to make it more robust
  • 1.5 (4 Mar 2004)
    • restructured to allow for multiple project file extensions (important for .NET workspaces)
    • support added for .NET2003 project files (microsoft subtlely changed the format)
  • 1.4 (3 Mar 2004)
    • option added to set zip filename to lowercase
    • zip paths saved and restored to/from registry (keyed by workspace path)
  • 1.0
    • Initial Release

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License

Share

About the Author

.dan.g.
Software Developer Maptek
Australia Australia
.dan.g. is a naturalised Australian and has been developing commercial windows software since 1998.
 
For all his latest freeware visit AbstractSpoon.

Comments and Discussions

 
GeneralRe: ZipStudio Article on CodeProject Pinmemberalbionrulesok23-Nov-04 13:27 
GeneralRe: ZipStudio Article on CodeProject PinmemberWillem Fourie23-Nov-04 19:08 
GeneralRe: ZipStudio Article on CodeProject Pinmemberalbionrulesok23-Nov-04 20:05 
Generalcommand line PinmemberWolframEhnert19-Apr-04 1:06 
GeneralRe: command line Pinmember.dan.g.7-Sep-04 19:31 
GeneralLatest executable PinmemberGagnon Claude6-Apr-04 15:40 
GeneralRe: Latest executable Pinmember.dan.g.6-Apr-04 20:52 
GeneralTwo questions.. PinmemberDmitriy Yakovlev of Foss Software, Inc.8-Mar-04 22:19 
GeneralRe: Two questions.. Pinmember.dan.g.1-Apr-04 21:13 
GeneralRelative vs Absolute Pathnames Pinmembergjr7-Mar-04 12:30 
GeneralRe: Relative vs Absolute Pathnames Pinmember.dan.g.7-Mar-04 16:07 
GeneralRe: Relative vs Absolute Pathnames Pinmembergjr7-Mar-04 16:47 
GeneralRe: Relative vs Absolute Pathnames Pinmember.dan.g.8-Mar-04 11:30 
GeneralRe: Relative vs Absolute Pathnames Pinmembergjr8-Mar-04 12:08 
GeneralRe: Relative vs Absolute Pathnames Pinmember.dan.g.8-Mar-04 12:16 
GeneralRe: Relative vs Absolute Pathnames Pinmember.dan.g.8-Mar-04 12:31 
GeneralRe: Relative vs Absolute Pathnames Pinmembergjr8-Mar-04 15:01 
GeneralRe: Relative vs Absolute Pathnames PinsussAnonymous19-Mar-04 13:16 
QuestionPossible Bug? PinsussPeter Boulton5-Mar-04 7:15 
AnswerRe: Possible Bug? Pinmember.dan.g.7-Mar-04 16:02 
GeneralRe: Possible Bug? PinsussPeter Boulton7-Mar-04 22:32 
GeneralRe: Possible Bug? Pinmember.dan.g.8-Mar-04 11:37 
GeneralRe: Possible Bug? Pinmember.dan.g.8-Mar-04 12:32 
GeneralRe: Possible Bug? Pinmemberpeterboulton9-Mar-04 5:41 
GeneralGreat Tool.... PinmemberThomas Latuske5-Feb-04 9:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 1 Apr 2004
Article Copyright 2003 by .dan.g.
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid