| 
     
      
      
      From: Francesco M. <f18...@ya...> - 2007-03-02 21:06:11
       
   | 
Hi all,
     I've just committed to the wxCode CVS repo a new set of bakefiles
which should make the build systems of wxCode components more reliable
and much more easier to maintain (thanks to cleaner .bkl files).
Please see the "wxCode bakefile changes" thread for more info (I've
managed to workaround the problem about the msvs2005prj and msvc6prj
formats there mentioned).
In short these changes will:
  - make easier for your users to compile your project (better error 
messages) and to match them to a wxWidgets build
  - allow your project to be built in various build modes without 
conflicts (e.g. you'll be able to build a Unicode and ANSI version of 
your libraries as they will be named differently -- just as wxWidgets 
itself does). This means that libraries generated by your wxcode 
projects will be named e.g. libwxcode_gtk2d_keybinder-2.9.a and will go 
(on Windows) in a subfolder of "lib" created by the makefile: vc_lib, 
vc_dll, gcc_lib etc.
  - allow your project to have .SLN and .VCPROJ generated next to the 
.DSW and .DSP ones (for MSVC 2005)
  - allow your project to use "gnu" format instead of "autoconf" (which 
has the "trouble" of requiring additional config.sub, config.guess, 
configure.ac files, and require you to use aclocal & autoconf).
Now "gnu" format works just fine with wx and basically will be the 
equivalent of makefile.vc|bcc|gcc|wat for Unix.
The following mail describe the required changes to the
  - .bkl
  - configure.ac
  - Bakefiles.bkgen
files of your projects.
For an example see the following diffs:
=============== CHANGES TO THE .bkl FILE
Example diff for a typical wxCode bakefile:
http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/keybinder/build/keybinder.bkl?r1=346&r2=437
1) remove old <include> statements and add this at the beginning:
      <include file="presets/wxcode.bkl"/>
2) replace <set var="COMP_NAME">yourCompName</set> with:
      <set-comp-name>yourCompName</set-comp-name>
3) remove all other <set var="COMP_*"> statements: in particular you 
won't need anymore the _SRC and _HDR COMP variables as Bakefile will now 
detect all the .CPP and .H of your project automatically.
This is a big enhancement as you now won't need anymore to keep such 
ugly lists in your bakefile and update them whenever you add/remove a 
source/header file from your project.
4) substitute "complib" with "wxcode-lib" and "compdll" with 
"wxcode-dll" templates.
5) don't use <exe></exe> tag for your wxCode samples; instead replace 
them with <wxcode-sample>
6) replace the <win32-res> and <res-include> from your wxCode samples with
     <dir>directory_of_your_sample_project</dir>
     <has-win32-res/>
where the first tag needs the path to the directory containing the 
sample project relatively to the location of the bakefile and the second 
tag needs to be present only if you have a .rc file in that directory.
============ CHANGES TO THE Bakefiles.bkgen
Example diff:
http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/keybinder/build/Bakefiles.bkgen?r1=436&r2=HEAD
1) simply remove all contents inside <bakefile-gen> tag except for the 
<input> tag ;)
2) add a
<include file="../../../build/bakefiles/presets/wxcode.bkgen"/>
line before the <input> tag.
Typically your Bakefiles.bkgen will become as simple as:
<?xml version="1.0" ?>
<bakefile-gen>
     <include file="../../../build/bakefiles/presets/wxcode.bkgen"/>
     <input>keybinder.bkl</input>
</bakefile-gen>
============ CHANGES TO THE configure.ac
Example diff:
http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/keybinder/build/configure.ac?r1=346&r2=437
1) replace AM_WXCODE_INIT with WXCODE_INIT
2) replace AM_OPTIONS_WXCONFIG and AM_OPTIONS_WXPRESETS macros with a 
call to WXCODE_OPTIONS([debug,unicode,shared,toolkit,wxshared,wxversion])
if you don't want e.g. the --with-toolkit=gtk|mac|msw|etc option, you 
can remove the "toolkit" option from the call to WXCODE_OPTIONS.
Other options are very useful and should be left.
3) replace AM_WXCODE_CHECKS([2.8.0]) with
     WXCODE_CHECKS([2.8.0], [core,base])
where 2.8.0 is the minimal required wxWidgets version and core,base is 
the list of the wxWidgets libraries required by your project (base 
should always be present).
4) replace AM_WXCODE_END with WXCODE_END
Please mail on _this_ mailing list for any doubt/problem so that anyone 
can see the reply ;)
Francesco
 | 
| 
     
      
      
      From: John L. <jla...@gm...> - 2007-03-02 21:15:40
       
   | 
Great, is there a component (of yours) that is updated to compare to?
Thanks,
    John Labenski
On 3/2/07, Francesco Montorsi <f18...@ya...> wrote:
> Hi all,
>
>      I've just committed to the wxCode CVS repo a new set of bakefiles
> which should make the build systems of wxCode components more reliable
> and much more easier to maintain (thanks to cleaner .bkl files).
>
> Please see the "wxCode bakefile changes" thread for more info (I've
> managed to workaround the problem about the msvs2005prj and msvc6prj
> formats there mentioned).
>
> In short these changes will:
>   - make easier for your users to compile your project (better error
> messages) and to match them to a wxWidgets build
>
>   - allow your project to be built in various build modes without
> conflicts (e.g. you'll be able to build a Unicode and ANSI version of
> your libraries as they will be named differently -- just as wxWidgets
> itself does). This means that libraries generated by your wxcode
> projects will be named e.g. libwxcode_gtk2d_keybinder-2.9.a and will go
> (on Windows) in a subfolder of "lib" created by the makefile: vc_lib,
> vc_dll, gcc_lib etc.
>
>   - allow your project to have .SLN and .VCPROJ generated next to the
> .DSW and .DSP ones (for MSVC 2005)
>
>   - allow your project to use "gnu" format instead of "autoconf" (which
> has the "trouble" of requiring additional config.sub, config.guess,
> configure.ac files, and require you to use aclocal & autoconf).
> Now "gnu" format works just fine with wx and basically will be the
> equivalent of makefile.vc|bcc|gcc|wat for Unix.
>
> The following mail describe the required changes to the
>   - .bkl
>   - configure.ac
>   - Bakefiles.bkgen
> files of your projects.
>
> For an example see the following diffs:
>
>
>
> =============== CHANGES TO THE .bkl FILE
>
> Example diff for a typical wxCode bakefile:
> http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/keybinder/build/keybinder.bkl?r1=346&r2=437
>
> 1) remove old <include> statements and add this at the beginning:
>
>       <include file="presets/wxcode.bkl"/>
>
> 2) replace <set var="COMP_NAME">yourCompName</set> with:
>
>       <set-comp-name>yourCompName</set-comp-name>
>
> 3) remove all other <set var="COMP_*"> statements: in particular you
> won't need anymore the _SRC and _HDR COMP variables as Bakefile will now
> detect all the .CPP and .H of your project automatically.
> This is a big enhancement as you now won't need anymore to keep such
> ugly lists in your bakefile and update them whenever you add/remove a
> source/header file from your project.
>
> 4) substitute "complib" with "wxcode-lib" and "compdll" with
> "wxcode-dll" templates.
>
> 5) don't use <exe></exe> tag for your wxCode samples; instead replace
> them with <wxcode-sample>
>
> 6) replace the <win32-res> and <res-include> from your wxCode samples with
>
>      <dir>directory_of_your_sample_project</dir>
>      <has-win32-res/>
>
> where the first tag needs the path to the directory containing the
> sample project relatively to the location of the bakefile and the second
> tag needs to be present only if you have a .rc file in that directory.
>
>
> ============ CHANGES TO THE Bakefiles.bkgen
>
> Example diff:
> http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/keybinder/build/Bakefiles.bkgen?r1=436&r2=HEAD
>
> 1) simply remove all contents inside <bakefile-gen> tag except for the
> <input> tag ;)
>
> 2) add a
>
> <include file="../../../build/bakefiles/presets/wxcode.bkgen"/>
>
> line before the <input> tag.
>
> Typically your Bakefiles.bkgen will become as simple as:
>
> <?xml version="1.0" ?>
> <bakefile-gen>
>      <include file="../../../build/bakefiles/presets/wxcode.bkgen"/>
>      <input>keybinder.bkl</input>
> </bakefile-gen>
>
>
>
> ============ CHANGES TO THE configure.ac
>
> Example diff:
> http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/keybinder/build/configure.ac?r1=346&r2=437
>
> 1) replace AM_WXCODE_INIT with WXCODE_INIT
> 2) replace AM_OPTIONS_WXCONFIG and AM_OPTIONS_WXPRESETS macros with a
> call to WXCODE_OPTIONS([debug,unicode,shared,toolkit,wxshared,wxversion])
>
> if you don't want e.g. the --with-toolkit=gtk|mac|msw|etc option, you
> can remove the "toolkit" option from the call to WXCODE_OPTIONS.
> Other options are very useful and should be left.
>
> 3) replace AM_WXCODE_CHECKS([2.8.0]) with
>      WXCODE_CHECKS([2.8.0], [core,base])
>
> where 2.8.0 is the minimal required wxWidgets version and core,base is
> the list of the wxWidgets libraries required by your project (base
> should always be present).
>
> 4) replace AM_WXCODE_END with WXCODE_END
>
>
> Please mail on _this_ mailing list for any doubt/problem so that anyone
> can see the reply ;)
>
> Francesco
>
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> wxCode-users mailing list
> wxC...@li...
> https://lists.sourceforge.net/lists/listinfo/wxcode-users
>
 | 
| 
     
      
      
      From: Francesco M. <f18...@ya...> - 2007-03-03 12:48:25
       
   | 
Hi,
John Labenski ha scritto:
> Great, is there a component (of yours) that is updated to compare to?
yes: in the SVN repo of wxCode (where I keep all my components) there 
are the components:
    KEYBINDER => simple sample of a self-contained component with 1 
lib/dll and 1 sample
    WXXML2 => more complex bakefile which handles building two 
dependencies (libxml2 and libiconv) which are stored in wxxml2\thirdparty
    WXEXTMINIFRAME => example of a library with a sample which however 
requires different set of sources for different wx ports used
    WEBUPDATE => much more complex than previous ones - I don't suggest 
to look at it
All the above ones have been updated - I need to update yet WXSCRIPT 
however...
Francesco
 | 
| 
     
      
      
      From:  <msz...@ya...> - 2007-03-02 23:59:46
       
   | 
Francesco Montorsi escribió: > 4) substitute "complib" with "wxcode-lib" and "compdll" with > "wxcode-dll" templates. > > 5) don't use <exe></exe> tag for your wxCode samples; instead replace > them with <wxcode-sample> > > What about non-libs projects (programs like wxARG :) )? Should I keep using <exe>? Any new templates? Thanx for the commit, I will try it tonight if I can. Regards, Matías. __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas  | 
| 
     
      
      
      From: Francesco M. <f18...@ya...> - 2007-03-03 14:06:26
       
   | 
Matías Szeftel ha scritto:
> Francesco Montorsi escribió:
>> 4) substitute "complib" with "wxcode-lib" and "compdll" with 
>> "wxcode-dll" templates.
>>
>> 5) don't use <exe></exe> tag for your wxCode samples; instead replace 
>> them with <wxcode-sample>
>>
>>   
> What about non-libs projects (programs like wxARG :) )?
> Should I keep using <exe>? Any new templates?
Use "wxcode-exe" in this case.
It's a fusion of wx,wxlike,wxcode-basic templates which builds the 
COMP_SRC and COMP_HDR sources & headers, which are vars which  default to:
     <set var="COMP_SRC" overwrite="0">$(fileList('src/*.c*'))</set>
     <set var="COMP_HDR" overwrite="0">$(fileList('include/wx/*.h'))</set>
(looking at wxArg, you'll probably need to do):
<wxcode-exe ...>
    <!-- by default wxCode bakefiles looks for headers in include/wx,
         but we keep the headers directly in "include" instead:
    -->
    <headers>$(fileList('include/*.h'))</headers>
</wxcode-exe>
or alternatively do:
    <!-- by default wxCode bakefiles looks for headers in include/wx,
         but we keep the headers directly in "include" instead:
    -->
    <set var="COMP_HDR">$(fileList('include/*.h'))</set>
before declaring the wxcode-exe target.
HTH,
Francesco
 |