From 029bec1fef526327df088b15771a4a4d84af7b0b Mon Sep 17 00:00:00 2001 From: guigues Date: Mon, 17 Mar 2008 10:32:43 +0000 Subject: [PATCH] *** empty log message *** --- packages/std/src/bbstdConfiguration.cxx | 39 ++++++++++--------- packages/std/src/bbstdConfiguration.h | 14 ++++--- .../toolsbbtk/bbs/appli/CreateBlackBox.bbs | 38 +++++++++--------- .../toolsbbtk/bbs/appli/CreatePackage.bbs | 34 +++++++++------- 4 files changed, 67 insertions(+), 58 deletions(-) diff --git a/packages/std/src/bbstdConfiguration.cxx b/packages/std/src/bbstdConfiguration.cxx index e5d8844..8981782 100644 --- a/packages/std/src/bbstdConfiguration.cxx +++ b/packages/std/src/bbstdConfiguration.cxx @@ -4,28 +4,29 @@ #include "bbtkConfigurationFile.h" namespace bbstd { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,Configuration) - BBTK_USER_BLACK_BOX_IMPLEMENTATION(Configuration,bbtk::AtomicBlackBox); - - void Configuration::bbUserConstructor() - { - - } - - void Configuration::DoProcess() - { - bbSetOutputDataPath( bbtk::ConfigurationFile::GetInstance().Get_data_path() ); - bbSetOutputDocPath( bbtk::ConfigurationFile::GetInstance().Get_doc_path() ); - bbSetOutputFileSeparator( bbtk::ConfigurationFile::GetInstance().Get_file_separator() ); - + BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,Configuration) + BBTK_USER_BLACK_BOX_IMPLEMENTATION(Configuration,bbtk::AtomicBlackBox); + + void Configuration::bbUserConstructor() + { + + } + + void Configuration::DoProcess() + { + bbSetOutputBinPath( bbtk::ConfigurationFile::GetInstance().Get_bin_path() ); + bbSetOutputDataPath( bbtk::ConfigurationFile::GetInstance().Get_data_path() ); + bbSetOutputDocPath( bbtk::ConfigurationFile::GetInstance().Get_doc_path() ); + bbSetOutputFileSeparator( bbtk::ConfigurationFile::GetInstance().Get_file_separator() ); + #if defined(__GNUC__) - bbSetOutputSystemType( 0 ); + bbSetOutputSystemType( 0 ); #elif defined(_WIN32) - bbSetOutputSystemType( 1 ); + bbSetOutputSystemType( 1 ); #else - bbSetOutputSystemType( -1 ); + bbSetOutputSystemType( -1 ); #endif - - } + + } } // EO namespace bbstd diff --git a/packages/std/src/bbstdConfiguration.h b/packages/std/src/bbstdConfiguration.h index 71408b6..00c8996 100644 --- a/packages/std/src/bbstdConfiguration.h +++ b/packages/std/src/bbstdConfiguration.h @@ -10,10 +10,11 @@ namespace bbstd public bbtk::AtomicBlackBox { BBTK_USER_BLACK_BOX_INTERFACE(Configuration,bbtk::AtomicBlackBox); - BBTK_DECLARE_OUTPUT(DataPath,std::string); - BBTK_DECLARE_OUTPUT(DocPath,std::string); - BBTK_DECLARE_OUTPUT(FileSeparator,std::string); - BBTK_DECLARE_OUTPUT(SystemType,int); + BBTK_DECLARE_OUTPUT(BinPath,std::string); + BBTK_DECLARE_OUTPUT(DataPath,std::string); + BBTK_DECLARE_OUTPUT(DocPath,std::string); + BBTK_DECLARE_OUTPUT(FileSeparator,std::string); + BBTK_DECLARE_OUTPUT(SystemType,int); BBTK_PROCESS(DoProcess); void DoProcess(); @@ -27,8 +28,9 @@ namespace bbstd BBTK_AUTHOR("jpr@creatis.insa-lyon.fr"); BBTK_CATEGORY("misc"); BBTK_DESCRIPTION("Gets configuration informations"); - BBTK_OUTPUT(Configuration,DataPath,"Data Path",std::string); - BBTK_OUTPUT(Configuration,DocPath,"Documentation Path",std::string); + BBTK_OUTPUT(Configuration,BinPath,"Binaries path",std::string); + BBTK_OUTPUT(Configuration,DataPath,"Data path",std::string); + BBTK_OUTPUT(Configuration,DocPath,"Documentation path",std::string); BBTK_OUTPUT(Configuration,FileSeparator,"/ or \\",std::string); BBTK_OUTPUT(Configuration,SystemType,"0=Linux 1=Windows",int); BBTK_END_DESCRIBE_BLACK_BOX(Configuration); diff --git a/packages/toolsbbtk/bbs/appli/CreateBlackBox.bbs b/packages/toolsbbtk/bbs/appli/CreateBlackBox.bbs index 232ac05..b763093 100644 --- a/packages/toolsbbtk/bbs/appli/CreateBlackBox.bbs +++ b/packages/toolsbbtk/bbs/appli/CreateBlackBox.bbs @@ -6,10 +6,10 @@ load std load wx new OutputText windowTitle - set windowTitle.In "- - - - - - - - - - - - - - Create Blackbox - - - - - - - - - - - - - -" + set windowTitle.In "Black box informations" new DirectorySelector dir - set dir.Title "Select the location of your new package" + set dir.Message "Select the location of your new black box" new InputText nameBlackbox set nameBlackbox.Title "Blackbox name (1 word)" @@ -65,18 +65,22 @@ new LayoutLine layoutHor connect typeBlackbox.Widget layoutHor.Widget1 connect formatBlackbox.Widget layoutHor.Widget2 -new LayoutLine info - connect windowTitle.Widget info.Widget1 - connect nameBlackbox.Widget info.Widget2 - connect namePackage.Widget info.Widget3 - connect author.Widget info.Widget4 - connect description.Widget info.Widget5 - connect layoutHor.Widget info.Widget6 - set info.WinDialog true - set info.WinWidth 350 - set info.WinHeight 500 -exec info - +new CommandButton createButton + set createButton.In "exec command; quit" + set createButton.Label "Go" + +new LayoutLine main + connect windowTitle.Widget main.Widget1 + connect nameBlackbox.Widget main.Widget2 + connect namePackage.Widget main.Widget3 + connect author.Widget main.Widget4 + connect description.Widget main.Widget5 + connect layoutHor.Widget main.Widget6 + connect createButton.Widget main.Widget7 + set main.WinTitle "Create new black box" + set main.WinDialog true + set main.WinWidth 350 + set main.WinHeight 500 #--------------------------------------------------------------------- @@ -111,7 +115,7 @@ new ConcatStrings descriptionStr new Configuration conf new ConcatStrings commandStr - set commandStr.In1 "." + connect conf.BinPath commandStr.In1 connect conf.FileSeparator commandStr.In2 set commandStr.In3 "bbCreateBlackBox " @@ -130,7 +134,5 @@ new ExecSystemCommand command connect concatStr.Out command.In print $concatStr.Out$ -exec command +exec main -#seg fault : -#quit \ No newline at end of file diff --git a/packages/toolsbbtk/bbs/appli/CreatePackage.bbs b/packages/toolsbbtk/bbs/appli/CreatePackage.bbs index c057ae5..ecd1cd6 100644 --- a/packages/toolsbbtk/bbs/appli/CreatePackage.bbs +++ b/packages/toolsbbtk/bbs/appli/CreatePackage.bbs @@ -6,10 +6,10 @@ load wx load std new OutputText windowTitle - set windowTitle.In "- - - - - - - - - - - - - - Create Blackbox - - - - - - - - - - - - - -" + set windowTitle.In "Package informations" new DirectorySelector dir - set dir.Title "Select the location of your new package" + set dir.Message "Select the location of your new package" new InputText name set name.Title "Name (1 word)" @@ -23,20 +23,26 @@ new InputText description set description.Title "Description (caracters '<', '>' not accepted...)" set description.In "_description_" -new LayoutLine info - connect windowTitle.Widget info.Widget1 - connect name.Widget info.Widget2 - connect author.Widget info.Widget3 - connect description.Widget info.Widget4 - set info.WinDialog true - set info.WinWidth 400 - set info.WinHeight 250 -exec info +new CommandButton createButton + set createButton.In "exec command; quit" + set createButton.Label "Go" + +new LayoutLine main + connect windowTitle.Widget main.Widget1 + connect name.Widget main.Widget2 + connect author.Widget main.Widget3 + connect description.Widget main.Widget4 + connect createButton.Widget main.Widget5 + set main.WinTitle "Create new black box package" + set main.WinDialog true + set main.WinWidth 400 + set main.WinHeight 250 new Configuration conf new ConcatStrings concatStrCommand - set concatStrCommand.In1 "." +# set concatStrCommand.In1 "." + connect conf.BinPath concatStrCommand.In1 connect conf.FileSeparator concatStrCommand.In2 set concatStrCommand.In3 "bbCreatePackage " new ConcatStrings concatStr @@ -55,7 +61,5 @@ new ExecSystemCommand command connect concatStr.Out command.In print $concatStr.Out$ -exec command +exec main -#seg fault : -#quit -- 2.47.1