Friday, September 11, 2009

rsync -C or --cvs-exclude

rsync -C option excludes .exe files by default so if you want to rsync .exe files add in

Which filetypes does cvs ignore? Then.. which filetypes does rsync ignore ontop of the cvs ignores. From man pages (man rsync):

-C, --cvs-exclude
This is a useful shorthand for excluding a broad range of files that you often don’t want to transfer between systems. It uses a similar algorithm to CVS to determine if a file should be ignored.

The exclude list is initialized to exclude the following items (these initial items are marked as perishable — see the FILTER RULES section):

RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .bzr

then, files listed in a $HOME/.cvsignore are added to the list and any files listed in the CVSIGNORE environment variable (all cvsignore names are delimited by whitespace).

Finally, any file is ignored if it is in the same directory as a .cvsignore file and matches one of the patterns listed therein. Unlike rsync’s filter/exclude files, these patterns are split on whitespace. See the cvs(1) manual for more information.

If you’re combining -C with your own --filter rules, you should note that these CVS excludes are appended at the end of your own rules, regardless of where the -C was placed on the command-line. This makes them a lower priority than any rules you specified explicitly. If you want to control where these CVS excludes get inserted into your filter rules, you should omit the -C as a command-line option and use a combination of --filter=:C and --filter=-C (either on your command-line or by putting the “:C” and “-C” rules into a filter file with your other rules). The first option turns on the per-directory scanning for the .cvsignore file. The second option does a one-time import of the CVS excludes mentioned above.

Thursday, September 03, 2009

modification to zetcode tutorial

wxwidgets tutorial at

has the line
wxBitmap exit(wxT("exit.png"));

I get the error in a windows compiler
"failed in wxToolbar::Realize(): invalid tool button bitmap"

the fix:
replace that line with
wxImage exitimage(wxT("exit.png"), wxBITMAP_TYPE_PNG);
wxBitmap exit(exitimage);

don't forget to include #include
and call wxInitAllImageHandlers(); in your app init

wx widgets icon for your app

in windows build a file call main.rc with the following contents:

aaaaaaaaaaaaaaaa ICON "application_icon.ico"
application_icon ICON "application_icon.ico"
#define wxUSE_NO_MANIFEST 1
// set this to 1 if you don't want to
// use manifest resource (manifest resource
// is needed to enable visual styles on
// Windows XP - see docs/msw/winxp.txt
// for more information)
#include <wx/msw/wx.rc>

the windows compiler sets the first icon to be the .exe icon... and the 2nd is referenced in the code:

Then in your Frame constructor

#if !defined(__WXMSW__) && !defined(__WXPM__)
#include "application_icon.xpm"
SimpleMenu::SimpleMenu(const wxString& title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(280, 180))

SetIcon( wxICON( application_icon ) );

you can use gimp to build your xpm and and ico files. If you rename your xpm file at all... edit it with a text editor and make sure the c string in it reads:
application_icon_xpm if the filename is application_icon.xpm

wxWidgets - rc file "wx/msw/wx.rc" not found

using visual studio express 2008
with an .rc file that has:
#include "wx/msw/wx.rc"

Error: "wx/msw/wx.rc" not found

the fix:
Even though you have already set the include path for your whole project to include wxwidgets... you need to set the include path again for the .rc file. Select main.rc... go up to project properties and you will see a smaller menu, and a place to put the Include path again.

wxWidgets - No Image Handler Defined


Error: No Image Handler Defined

the fix: