From: John L. <jla...@gm...> - 2005-12-14 20:14:04
|
What's the best way to add multiple samples to wxCode's bakefiles? I was thinking that we could add the ability for 4 samples using the bakefiles. We'll keep the current naming scheme the same, but just append 2,3,4,... for addition samples. We just need to add this code duplicate of existing code). build/bakefiles/templates.bkl <set var=3D"PCOMP_SAMPLE_HDR2">$(''.join([(COMP_SAMPLE_DIR2 + DIRSEP + '%s ') % (x) for x in COMP_SAMPLE_HDR2.split()]))</set> <set var=3D"PCOMP_SAMPLE_SRC2">$(''.join([(COMP_SAMPLE_DIR2 + DIRSEP + '%s ') % (x) for x in COMP_SAMPLE_SRC2.split()]))</set> <template id=3D"compsample2" template=3D"compsamplebasic"> <app-type>gui</app-type> <headers>$(PCOMP_SAMPLE_HDR2)</headers> <sources>$(PCOMP_SAMPLE_SRC2)</sources> <dirname>$(COMP_SAMPLE_DIR2)</dirname> <res-include>$(COMP_SAMPLE_DIR2)</res-include> <!-- this template needs to be completed by the "library" tag which cannot be placed here since we don't know the name of the lib target for this component --> </template> repeat for 3 and 4. --------------------------------------- build/bakefiles/defaults.bkl <set var=3D"COMP_SAMPLE_DIR2">$(COMP_BASEPATH)$(DIRSEP)samples</set> <set var=3D"COMP_SAMPLE_DIR3">$(COMP_BASEPATH)$(DIRSEP)samples</set> <set var=3D"COMP_SAMPLE_DIR4">$(COMP_BASEPATH)$(DIRSEP)samples</set> ------------------- If there's a better way, let me know, otherwise I'll commit this in the next day or so. Regards, John Labenski |
From: Francesco M. <f18...@ya...> - 2005-12-14 21:12:33
|
Hi, John Labenski wrote: > What's the best way to add multiple samples to wxCode's bakefiles? > > I was thinking that we could add the ability for 4 samples using the > bakefiles. We'll keep the current naming scheme the same, but just > append 2,3,4,... for addition samples. We just need to add this code > duplicate of existing code). > > build/bakefiles/templates.bkl > > <set var="PCOMP_SAMPLE_HDR2">$(''.join([(COMP_SAMPLE_DIR2 + DIRSEP > + '%s ') % (x) for x in COMP_SAMPLE_HDR2.split()]))</set> > > <set var="PCOMP_SAMPLE_SRC2">$(''.join([(COMP_SAMPLE_DIR2 + DIRSEP > + '%s ') % (x) for x in COMP_SAMPLE_SRC2.split()]))</set> > > > <template id="compsample2" template="compsamplebasic"> > <app-type>gui</app-type> > <headers>$(PCOMP_SAMPLE_HDR2)</headers> > <sources>$(PCOMP_SAMPLE_SRC2)</sources> > <dirname>$(COMP_SAMPLE_DIR2)</dirname> > <res-include>$(COMP_SAMPLE_DIR2)</res-include> > > <!-- this template needs to be completed by the "library" tag > which cannot be placed here since we don't know the name of > the lib target for this component --> > </template> > > repeat for 3 and 4. > > --------------------------------------- > build/bakefiles/defaults.bkl > > <set var="COMP_SAMPLE_DIR2">$(COMP_BASEPATH)$(DIRSEP)samples</set> > <set var="COMP_SAMPLE_DIR3">$(COMP_BASEPATH)$(DIRSEP)samples</set> > <set var="COMP_SAMPLE_DIR4">$(COMP_BASEPATH)$(DIRSEP)samples</set> > > ------------------- > Good idea ! This will make much easier to add additional samples to wxCode components. However I think that also another small addition will be required; something like: <set var="COMP_SAMPLE_HDR2" overwrite="0"/> <set var="COMP_SAMPLE_SRC2" overwrite="0"/> <set var="COMP_SAMPLE_HDR2" overwrite="0"/> <set var="COMP_SAMPLE_SRC2" overwrite="0"/> ... otherwise Bakefile will complain about the missing definitions of those vars... > If there's a better way, let me know, otherwise I'll commit this in > the next day or so. I think there is not real better way... also with version 0.2.0 of bakefile (which hopefully will happen soon and will have my patches into it) I'll be able to simplify a lot wxCode bakefiles and also improve a lot of things (like options names which will be made the sames of wxWidgets, uninstall support, etc). Thanks, Francesco |
From: John L. <jla...@gm...> - 2005-12-18 16:51:40
|
Ok, I've added this. Regards, John Labenski On 12/14/05, Francesco Montorsi <f18...@ya...> wrote: > Hi, > > John Labenski wrote: > > What's the best way to add multiple samples to wxCode's bakefiles? > > > > I was thinking that we could add the ability for 4 samples using the > > bakefiles. We'll keep the current naming scheme the same, but just > > append 2,3,4,... for addition samples. We just need to add this code > > duplicate of existing code). > > > > build/bakefiles/templates.bkl > > > > <set var=3D"PCOMP_SAMPLE_HDR2">$(''.join([(COMP_SAMPLE_DIR2 + DIRSE= P > > + '%s ') % (x) for x in COMP_SAMPLE_HDR2.split()]))</set> > > > > <set var=3D"PCOMP_SAMPLE_SRC2">$(''.join([(COMP_SAMPLE_DIR2 + DIRSE= P > > + '%s ') % (x) for x in COMP_SAMPLE_SRC2.split()]))</set> > > > > > > <template id=3D"compsample2" template=3D"compsamplebasic"> > > <app-type>gui</app-type> > > <headers>$(PCOMP_SAMPLE_HDR2)</headers> > > <sources>$(PCOMP_SAMPLE_SRC2)</sources> > > <dirname>$(COMP_SAMPLE_DIR2)</dirname> > > <res-include>$(COMP_SAMPLE_DIR2)</res-include> > > > > <!-- this template needs to be completed by the "library" tag > > which cannot be placed here since we don't know the name of > > the lib target for this component --> > > </template> > > > > repeat for 3 and 4. > > > > --------------------------------------- > > build/bakefiles/defaults.bkl > > > > <set var=3D"COMP_SAMPLE_DIR2">$(COMP_BASEPATH)$(DIRSEP)samples</set= > > > <set var=3D"COMP_SAMPLE_DIR3">$(COMP_BASEPATH)$(DIRSEP)samples</set= > > > <set var=3D"COMP_SAMPLE_DIR4">$(COMP_BASEPATH)$(DIRSEP)samples</set= > > > > > ------------------- > > > Good idea ! > This will make much easier to add additional samples to wxCode components= . > However I think that also another small addition will be required; someth= ing like: > > <set var=3D"COMP_SAMPLE_HDR2" overwrite=3D"0"/> > <set var=3D"COMP_SAMPLE_SRC2" overwrite=3D"0"/> > > <set var=3D"COMP_SAMPLE_HDR2" overwrite=3D"0"/> > <set var=3D"COMP_SAMPLE_SRC2" overwrite=3D"0"/> > > ... > > otherwise Bakefile will complain about the missing definitions of those v= ars... > > > > If there's a better way, let me know, otherwise I'll commit this in > > the next day or so. > I think there is not real better way... also with version 0.2.0 of bakefi= le (which > hopefully will happen soon and will have my patches into it) I'll be able= to simplify a > lot wxCode bakefiles and also improve a lot of things (like options names= which will be > made the sames of wxWidgets, uninstall support, etc). > > Thanks, > Francesco > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > wxCode-users mailing list > wxC...@li... > https://lists.sourceforge.net/lists/listinfo/wxcode-users > |