--------------------- PatchSet 4375 Date: 2002/06/23 16:08:08 Author: serassio Branch: nt-2_5 Tag: (none) Log: Added build versioning Members: port/win32/squid/buildcount.dsm:1.1->1.1.2.1 port/win32/squid/buildver.h:1.1->1.1.2.1 port/win32/squid/resource.h:1.1->1.1.2.1 port/win32/squid/squid.dsp:1.1.2.6->1.1.2.7 port/win32/squid/squid.rc:1.1->1.1.2.1 port/win32/squid/squid.rc2:1.1->1.1.2.1 --- /dev/null Wed Feb 14 00:59:20 2007 +++ squid/port/win32/squid/buildcount.dsm Wed Feb 14 00:59:26 2007 @@ -0,0 +1,81 @@ +'------------------------------------------------------------------------------ +'FILE DESCRIPTION: Automatically increment the version resource information of the project after each build +'------------------------------------------------------------------------------ +Function GetProjectDir(FullName) + +'VC++ doesn't provide any method for getting the path of the active project +'See the VB Script reference for more information on the VB Script functions +'used in this function + +Dim proj_path +proj_path = Split(StrReverse(FullName),"\",-1,1) + +Dim count +count = UBound(proj_path) + +Dim full_path +full_path = "" +Dim i + +for i = 1 to count + full_path = full_path & "\" & proj_path(i) +next + +GetProjectDir = StrReverse(full_path) + +End Function + + +Sub ReplaceText(selection, count, incrementby) + +'selection represents the TextSelection object +'count represents the position of the version number to be incremented +'incrementby represents a number that will be added to the existing version number + +selection.WordRight dsMove, count +selection.WordRight dsExtend, 1 +Dim str +str = selection.Text +str = str + incrementby + +selection.Text = str + +End Sub + + +Sub Application_BuildFinish(numError, numWarning) + +'This event will be triggered after every build of a project +'You can check numError and/or numWarning to determine if you want to continue +'If numError <> 0 Then + 'exit sub +'Obtain the full path of the active project +Dim full_path +full_path = GetProjectDir(ActiveProject.FullName) + +full_path = full_path & "buildver.h" + +'Open the VersionNo.h file +Documents.Open full_path + +'Obtain the TextSelection object +Dim selection +set selection = ActiveDocument.Selection +selection.StartOfDocument + +'Increment the version information +ReplaceText selection, 9, 1 +selection.LineDown +selection.StartOfLine +ReplaceText selection, 9, 1 +selection.LineDown +selection.StartOfLine +ReplaceText selection, 10, 1 +selection.LineDown +selection.StartOfLine +ReplaceText selection, 10, 1 + +ActiveDocument.Save +ActiveDocument.Close + +End Sub --- /dev/null Wed Feb 14 00:59:20 2007 +++ squid/port/win32/squid/buildver.h Wed Feb 14 00:59:26 2007 @@ -0,0 +1,4 @@ +#define FILEVER 2,5,7,1 +#define PRODUCTVER 2,5,7,1 +#define STRFILEVER "2, 5, 7, 1\0" +#define STRPRODUCTVER "2, 5, 7, 1\0" --- /dev/null Wed Feb 14 00:59:20 2007 +++ squid/port/win32/squid/resource.h Wed Feb 14 00:59:26 2007 @@ -0,0 +1,15 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by squid.rc +// + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif Index: squid/port/win32/squid/squid.dsp =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/squid/Attic/squid.dsp,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid/port/win32/squid/squid.dsp 3 May 2002 18:39:57 -0000 1.1.2.6 +++ squid/port/win32/squid/squid.dsp 23 Jun 2002 16:08:08 -0000 1.1.2.7 @@ -44,7 +44,7 @@ # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../" /I "../include" /I "../../../include" /I "../../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /YX /FD /c # ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -68,7 +68,7 @@ # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../../include" /I "../../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c # ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -505,6 +505,22 @@ # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\buildver.h +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# Begin Source File + +SOURCE=.\squid.rc +# End Source File # End Group +# Begin Source File + +SOURCE=.\buildcount.dsm +# End Source File # End Target # End Project --- /dev/null Wed Feb 14 00:59:20 2007 +++ squid/port/win32/squid/squid.rc Wed Feb 14 00:59:26 2007 @@ -0,0 +1,126 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Italian (Italy) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA) +#ifdef _WIN32 +LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "squid.rc2\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,5,7,100 + PRODUCTVERSION 2,5,7,100 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x21L +#else + FILEFLAGS 0x20L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "SQUID Web Proxy Cache - http://www.squid-cache.org/\0" + VALUE "FileDescription", "squid\0" + VALUE "FileVersion", "2, 5, 7, 100\0" + VALUE "InternalName", "SquidNT\0" + VALUE "LegalCopyright", "Copyright © 2002\0" + VALUE "LegalTrademarks", "GNU General Public License\0" + VALUE "OriginalFilename", "squid.exe\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "SQUID Web Proxy Cache for Windows NT/2000\0" + VALUE "ProductVersion", "2, 5, 7, 100\0" + VALUE "SpecialBuild", "PRE\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + +#endif // Italian (Italy) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + --- /dev/null Wed Feb 14 00:59:20 2007 +++ squid/port/win32/squid/squid.rc2 Wed Feb 14 00:59:26 2007 @@ -0,0 +1,113 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" +#include "buildver.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Italian (Italy) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA) +#ifdef _WIN32 +LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION FILEVER + PRODUCTVERSION PRODUCTVER + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "Serassio Guido\0" + VALUE "FileDescription", "squid\0" + VALUE "FileVersion", STRFILEVER + VALUE "InternalName", "squid\0" + VALUE "LegalCopyright", "Copyright © 2002\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "squid.exe\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Serassio Guido squid\0" + VALUE "ProductVersion", STRPRODUCTVER + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + + + +#endif // Italian (Italy) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED +