-To add a new sample "foo" under directory "samples/foo" you need to
-do the following:
-
-1. Create the directory samples/foo locally and "cvs add" it
-
-2. Put the sources, headers and foo.rc file in it and "cvs add" them too
- (don't forget to use "-kb" switch for binary files)
-
-3. Create the makefiles for Windows compilers. There are several ways to do
- it:
- a) copy the makefiles from samples/minimal, replace all occurences of
- minimal with foo
- b) use makegen (sources are under utils/makegen)
- c) use projgen
-
-4. Modify configure.in and samples/configure.in for Unix compilation:
+To add a new sample "foo" under directory "samples/foo" you need to do
+the following: (note that all this applies also to demos: just replace
+samples/ with demos/ where needed).
+
+1. Create the directory samples/foo locally and "svn add" it.
+
+2. "svn add" the sample sources (usually based on minimal.cpp) as well.
+
+ Note that unless your sample requires something special you shouldn't
+ add foo.rc, foo.ico, ... any more, please just reuse the generic sample.*
+ files in the samples subdirectory.
+
+3. Create the makefiles:
+ a) modify samples/samples.bkl (just copy an existing line)
+ b) create foo.bkl (sed 's/minimal/foo/g' minimal.bkl > foo.bkl is usually
+ enough, but you may need to add more <wx-lib> lines if your sample uses
+ anything not in the core lib)
+ c) generate the makefiles for your sample using bakefile. For this you
+ need to:
+ (i) install bakefile (see http://bakefile.sf.net/)
+ (ii) run bakefile_gen in build/bakefiles which will regenerate all
+ makefiles which are not up to date
+
+ You may also use "bakefile_gen -b ../../samples/foo/foo.bkl" to
+ regenerate only the makefiles for this sample (path must be relative!)
+ or even add a "-f<compiler>" to generate just the makefiles for the given
+ compiler (run 'bakefile --help' to get the list of possible values).
+ See Technote #16 for more information.
+ d) currently samples/samples.dsw needs to be updated manually as it's not
+ generated by bakefile.
+
+4. Modify configure.in Unix compilation: