TortoiseCVS RC4 patches

"Arthur Barrett" <arthur.barrett-qn/[email protected]>
Newsgroups gmane.comp.version-control.cvs.tortoisecvs.user
Message-ID <[email protected]>
Torsten et al,

Here are some notes and patches for TortoiseCVS 1.12 RC4 build from source - at least one of these (#8) probably needs fixing before release.

1.
If you want to build 32 bit releases using VS.NET 2003 (VC7) you need a few missing items.

The tree contains only wx 2.6 (but it needs 2.8) for vc7 compiles and also no runcmake-vc7.bat, and no macro in build/CMakeLists.txt for vc7 - these can all be downloaded from:

here for wxw libraries and headers:
http://march-hare.com/cvspro/?pdf=m

and build (runcmake-vc7.bat and CMakeLists.txt):
http://march-hare.com/cvspro/?pdf=n

2.
Bison/Flex have been removed from tools/gnuwin32 but there is no clear replacement, however:

2a:
The macros add_bison_files and add_flex_files in build/CMakeLists.txt refers specifically to the working directory /GnuWin32/bin

The way I got it to build was by downloading flex and bison from:
http://gnuwin32.sourceforge.net

2b:
If you want developers to use cygwin bison (as suggested by your commit comment) are you going to commit the binaries to tools/cygwin or just make it a dependency?

2c:
Any chance you can explain this change - specifically whether it is a functional requirement (ie: gnuwin32 bison will create unstable TortoiseCVS binaries) or if it's just standardising on a toolset or something else?  The commit comment was a bit terse ;)

3.
You've committed / added wxw/include with -kkv but I think it probably should be -ko to preserve the keyword expansion in the original headers.  ie: if I diff the wx 2.8 headers with the tortoisecvs copies I get this on every file:

Index: wxw/include/wx/cppunit.h
===================================================================
RCS file: /cvsroot/tortoisecvs/TortoiseCVS/wxw/include/wx/cppunit.h,v
retrieving revision 1.9
diff -c -r1.9 cppunit.h
*** wxw/include/wx/cppunit.h	20 Feb 2009 14:33:57 -0000	1.9
--- wxw/include/wx/cppunit.h	14 Dec 2009 23:56:33 -0000
***************
*** 3,9 ****
  // Purpose:     wrapper header for CppUnit headers
  // Author:      Vadim Zeitlin
  // Created:     15.02.04
! // RCS-ID:      $Id: cppunit.h,v 1.9 2009/02/20 14:33:57 bullestock Exp $
  // Copyright:   (c) 2004 Vadim Zeitlin
  // Licence:     wxWindows Licence
  /////////////////////////////////////////////////////////////////////////////
--- 3,9 ----
  // Purpose:     wrapper header for CppUnit headers
  // Author:      Vadim Zeitlin
  // Created:     15.02.04
! // RCS-ID:      $Id: cppunit.h 53917 2008-06-01 20:32:26Z VZ $
  // Copyright:   (c) 2004 Vadim Zeitlin
  // Licence:     wxWindows Licence
  /////////////////////////////////////////////////////////////////////////////


to fix:
cvs up -ko
*** copy across *.h again using ./wxw/update shell script ***
cvs ci -f -m "honest copy of wx headers"


4.
RuntimeInstaller/RuntimeInstaller.c should include 
#include "CvsNt/cvsnt-version.h"

Or fix cmake...

5.
RuntimeInstaller/RuntimeInstaller.c refers to non-existent header:
#include "overlays-version.h"

But there is a file tortoisecvs/src/SharedDlls/TortoiseOverlaysVersion

Is overlays-version.h supposed to be generated somehow?  Any hints appreciated...

6.
src/TortoiseShell/ShellExt.cpp refers to <wx/msgcatalog.h> which is not a part of wxWidgets 2.8 and I cannot find any reference to wxMsgCatalog in the wxWidgets documentation but it is forward defined in the wxLocale class <wx/intl.h> for a return value of private functions -- the comments say 'This is a "low-level" class and is used only by wxLocale'.

Is this intentional?  If so I think there should be a note in:
http://www.tortoisecvs.org/development.shtml


If not intentional then I think you are 'supposed' to replace:

wxMsgCatalog*   g_msgCatalog = 0;
              g_msgCatalog = new wxMsgCatalog;
              if (!g_msgCatalog->Load(info->CanonicalName, wxT("TortoiseCVS"), 0, true))
              const wxChar* result = g_msgCatalog->GetString(str);
              if (g_msgCatalog)
              delete g_msgCatalog;

with something a bit like:

             wxLocale locale;
             locale.AddCatalogLookupPathPrefix(wxTextCStr(localedir + "\\Locale"));
             const wxLanguageInfo* info = wxLocale::GetLanguageInfo(language);
             locale.Init(info->Description, info-> CanonicalName, info->CanonicalName, true, true);
             locale.AddCatalog(wxT("TortoiseCVS"), info ,0);
             locale.GetString(str,NULL);


Please advise on how you want to proceed on this - should this be 'fixed' or just stick with the 'workaround' of a manufactured msgcatalog.h ?


7.

In HasMenu.cpp you define the variable 'i' twice and it causes lots of warnings about non standard use - I suspect VC7 may be a little confused which 'i' you mean...:

void HasMenus(std::vector<int> menuFlags, const std::vector<std::string>& files, std::vector<bool>& hasMenus)
.
.
.
   size_t i = 0;
   for (std::vector<std::string>::const_iterator it = files.begin(); 
        it != files.end(); 
        ++it, i++)
.
.
.
   // Build file infos
   for (size_t i = 0; i < files.size(); i++)
   {


I renamed the first one from 'i' to 'izz' to avoid the warnings and make it clearer which 'i' was which.


8.
I get lots of these errors:
------ Build started: Project: TortoiseAct, Configuration: Release Win32 ------

Compiling...
ModuleBasicsPage.cpp
\cvsbin\release builder\tcvs-1-12-RC2\src\DialogsWxw\ModuleBasicsPage.cpp(1149) : error C2664: 'WideToMultibyte' : cannot convert parameter 1 from 'wxString' to 'const std::wstring &'
        Reason: cannot convert from 'wxString' to 'const std::wstring'
        No constructor could take the source type, or constructor overload resolution was ambiguous


I notice that none of the DialogsWxw/*.h files are a part of the project - it makes it very difficult to search for the definition of something... so I added them manually since I'm not really sure how to magically add them via TortoiseAct/CMakeLists.txt

I believe all these are errors - they should be changed from:
    return myUseBugCheckBox->GetValue() ? wxAscii(myBugNumber->GetValue()) : "";
to
    return myUseBugCheckBox->GetValue() ? wxAscii(myBugNumber->GetValue().c_str()) : "";


Needs changing in about half a dozen places (not just myBugNumber  - some others too).

9.
Should wxwidgets still be compiled by settting lib/vc_lib/msw*/wx/setup.h wxUSE_STL to 1 as described here:
http://www.tortoisecvs.org/development.shtml

The last time you committed setup.h was 21 months ago, and I think it's wxwidgets 2.6 so I wasn't really sure if you'd changed it:
http://tortoisecvs.cvs.sourceforge.net/viewvc/tortoisecvs/TortoiseCVS/wxw/lib/vc_lib/mswu/wx/setup.h?revision=1.1&view=markup


For now I've compiled with wxUSE_STL=0 (so those libraries etc are all against recommendations) and it compiles ok.  Please advise if wxUSE_STL should still be 1 and I'll replace them... 

> How do you feel about a couple of last minute feature patches?  
> * switch verb
> * apply patch verb (also require including patch.exe -
> unxutils.sourceforge.net)

Should have these to you soon - been stuck on the above most of today so thought you should see those in case anything actually needs fixing...

Regards,


Arthur




























------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.