]> Creatis software - bbtk.git/commitdiff
BUGs CPACK + BUGs CreatePackage CreateBlackBox windows
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 19 Mar 2008 12:26:06 +0000 (12:26 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 19 Mar 2008 12:26:06 +0000 (12:26 +0000)
15 files changed:
CMakeLists.txt
kernel/appli/bbCreateBlackBox/CMakeLists.txt
kernel/appli/bbCreateBlackBox/bbCreateBlackBox.bat.in
kernel/appli/bbCreateBlackBox/xml-templates/std-template.xml
kernel/cmake/BBTKConfigurePackage_data.cmake
kernel/install/CMakeLists.txt
kernel/src/bbtkRTTI.cxx
kernel/src/bbtkWxConsole.cxx
packages/std/bbs/appli/exampleAscii.bbs [new file with mode: 0644]
packages/std/src/bbstdASCII.cxx [new file with mode: 0644]
packages/std/src/bbstdASCII.h [new file with mode: 0644]
packages/std/src/bbstdExecSystemCommand.cxx
packages/toolsbbtk/bbs/appli/CreateBlackBox.bbs
packages/toolsbbtk/bbs/appli/CreatePackage.bbs
packages/wx/src/bbwxCommandButton.cxx

index bcf35b4bef73aabbf2d45a13aeb0f3de703ce224..a20712bb70526fc4a7d12042e361f393b9276ec6 100644 (file)
@@ -18,6 +18,10 @@ SUBDIRS(packages)
 #-----------------------------------------------------------------------------
 
 
+#---Documentation-------------
+#http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
+#http://www.cmake.org/Wiki/CMake:CPackConfiguration
+#http://www.cmake.org/Wiki/CMake:Install_Commands
 
 
 
@@ -45,5 +49,7 @@ ELSE(WIN32 AND NOT UNIX)
   SET(CPACK_STRIP_FILES "bin/bbi")
   SET(CPACK_SOURCE_STRIP_FILES "")
 ENDIF(WIN32 AND NOT UNIX)
-SET(CPACK_PACKAGE_EXECUTABLES "bbi" "bbs interpreter")
+SET(CPACK_PACKAGE_EXECUTABLES "bbi" "bbs interpreter" )
+  
+
 INCLUDE(CPack)
index 7bcf18d397eed28d8c03e70195f7583655bfcc67..f18afa0528bf0aeeb5bdcbda48d3a2075e30426c 100644 (file)
@@ -6,6 +6,7 @@ SET(bbCreateBlackBox_DATA_REL_PATH_FROM_DATA kernel/bbCreateBlackBox)
 
 # Configure / Install the template xml files used by bbCreateBlackBox
 # Copy it into build tree
+
 FILE(GLOB_RECURSE LST_FILE_VOID_CREATE_PACKAGE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/xml-templates *.xml )
 FOREACH( iLST  ${LST_FILE_VOID_CREATE_PACKAGE})
      STRING(SUBSTRING ${iLST} 0 3 subStrTmp )
index b30c85fe7f36471120ce10e2cefc9476ea5a1f47..8214efc2bbe6b09857470efffeebe4f03a272bb1 100644 (file)
@@ -36,11 +36,11 @@ echo "** Creating new black box  '%BLACKBOX%'  xml/c++ in folder '%OUTPUT%'"
 echo Creating XML file..
 echo copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml
 copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml_tmp
-%BINPATH%\bbSed %OUTPUT%\%FILENAME%.xml_tmp  __BLACKBOXNAME__ %BLACKBOX% > %OUTPUT%\%FILENAME%_1.xml
-%BINPATH%\bbSed %OUTPUT%\%FILENAME%_1.xml  __AUTHOR__ %AUTHOR% > %OUTPUT%\%FILENAME%_2.xml
-%BINPATH%\bbSed %OUTPUT%\%FILENAME%_2.xml  __DESCRIPTION__ %DESCRIPTION% > %OUTPUT%\%FILENAME%.xml_tmp
+"%BINPATH%\bbSed" %OUTPUT%\%FILENAME%.xml_tmp  __BLACKBOXNAME__ %BLACKBOX% > %OUTPUT%\%FILENAME%_1.xml
+"%BINPATH%\bbSed" %OUTPUT%\%FILENAME%_1.xml  __AUTHOR__ %AUTHOR% > %OUTPUT%\%FILENAME%_2.xml
+"%BINPATH%\bbSed" %OUTPUT%\%FILENAME%_2.xml  __DESCRIPTION__ %DESCRIPTION% > %OUTPUT%\%FILENAME%.xml_tmp
 del %OUTPUT%\%FILENAME%_1.xml 
-del %OUTPUT%\%FILENAME%_2.xml 
+del %OUTPUT%\%FILENAME%_2.xml
 
 
 IF %FORMAT%==XML GOTO module_XML
@@ -55,8 +55,8 @@ goto END
 
 :module_C++
   IF EXIST %OUTPUT%\%FILENAME%.cxx GOTO ERROR02
-  echo %BINPATH%\bbfy %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT% 
-  %BINPATH%\bbfy %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%\
+  echo "%BINPATH%\bbfy" %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT% 
+  "%BINPATH%\bbfy" %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%\
   del %OUTPUT%\%FILENAME%.xml_tmp 
 goto END
 
index 54aa42743d158a6415622e856c7da190bee7fe86..b02c5509b8e11693f28cc14436b900bcca3bee88 100644 (file)
@@ -14,9 +14,7 @@
     #include directives to be put in the .h generated
     There must be one tag per file to include
     Here we include the standard header iostream.h -->
-  <include><PRE>
-    iostream.h
-  </PRE></include>
+  <include><PRE>iostream</PRE></include>
   <!--=====================================================================-->
 
   <!--========================================================================
index 0c9c21a1c10952ee7bf5cca03fa17709e40a1760..a0fcab65b9d29bbddfda6af6799034a98edd8831 100644 (file)
@@ -1,19 +1,29 @@
-FILE(GLOB ALL "*.*")
+
+FILE(GLOB_RECURSE ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.*")
 
 # TO DO : REMOVE CMakeLists.txt FROM LIST !!!
 
 FOREACH(file ${ALL})
-  CONFIGURE_FILE(
-    ${file}
-    ${BBTK_DATA_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${filename}
-    COPYONLY IMMEDIATE
-    )
+       set(ok "true")
+
+       IF( ${file} STREQUAL "CMakeLists.txt")
+               set(ok "false")
+       ENDIF( ${file} STREQUAL "CMakeLists.txt")
+
+       IF(${ok} STREQUAL "true" )
+               CONFIGURE_FILE(
+                       ${CMAKE_CURRENT_SOURCE_DIR}/${file}
+                       ${BBTK_DATA_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${file}
+                       COPYONLY IMMEDIATE
+               )
+               ###### This mecanism is maded at the end of th system..#####
+               #INSTALL(  
+               #  FILES ${file}
+               #  DESTINATION ${BBTK_DATA_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${file}
+               #) 
+       ENDIF(${ok} STREQUAL "true" )
 ENDFOREACH(file ${ALL})
   
-INSTALL( 
-  FILES ${ALL}
-  DESTINATION ${BBTK_DATA_INSTALL_PATH}/${BBTK_PACKAGE_NAME}
-  )  
   
 
 
index a7c01c4709fa64fd54996ca91560143d8057cae5..f9ebc074cf253d9871559820f60e4874d9793b14 100644 (file)
@@ -4,6 +4,64 @@ IF(UNIX)
 ENDIF(UNIX)
 
 
+# Aditional INSTALL for CPACK mecanism.
+
+
+
+IF(WIN32)
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkCommon.dll                DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkDICOMParser.dll                   DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkexoIIc.dll                DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkexpat.dll                 DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkFiltering.dll             DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkfreetype.dll              DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkftgl.dll                  DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkGenericFiltering.dll      DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkGraphics.dll              DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkHybrid.dll                DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkImaging.dll               DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkIO.dll                    DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkjpeg.dll                  DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkNetCDF.dll                DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkpng.dll                           DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkRendering.dll             DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtksys.dll                           DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtktiff.dll                  DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkVolumeRendering.dll       DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkWidgets.dll               DESTINATION bin/ )
+  INSTALL(   FILES ${VTK_DIR}/bin/Release/vtkzlib.dll                  DESTINATION bin/ )
+
+  INSTALL(   FILES ${ITK_DIR}/bin/Release/ITKCommon.dll                DESTINATION bin/ )
+
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll                 DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll    DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll          DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll       DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll        DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll          DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll        DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll                 DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll                 DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll                DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll                    DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll       DESTINATION bin/ )
+  INSTALL(   FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll                DESTINATION bin/ )
+ENDIF(WIN32)
+
+
+
+# ????????? Why this line doesn't works ...?????
+FILE(GLOB_RECURSE LST_FILE_VTKDLL RELATIVE ${VTK_DIR} *.dll )
+
+FOREACH( iLST  ${LST_FILE_VTKDLL} )
+message("eed3 " ${iLST} )
+  INSTALL( 
+    FILES ${iLST}
+    DESTINATION bin/
+  )
+ENDFOREACH(iLST)
+
+
 INSTALL(
   DIRECTORY  ${BBTK_BINARY_DIR}/${BBTK_DOC_REL_PATH}
   DESTINATION  ${BBTK_SHARE_REL_PATH}
index 81791f646478e72345b6b1d3435ee862a3c572d8..5afceaac3f19275f92b57f723f8781d47f79dbf7 100644 (file)
@@ -2,7 +2,7 @@
 #include "bbtkMessageManager.h"
 
 
-
 namespace bbtk
 {
   // Adapted from https://savannah.cern.ch/support/download.php?file_id=1972
index b425facebed4882d0859c7842b63e8b3b01ba706..943cfc19ec40f01eb87c4986c55a9c2458d22f87 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxConsole.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/18 12:51:26 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2008/03/19 12:26:07 $
+  Version:   $Revision: 1.17 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -356,11 +356,18 @@ namespace bbtk
   //================================================================
   void WxConsole::OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event))
   {
+printf("EED WxConsole::OnMenuCreatePackage 01 \n");
     std::string command("toolsbbtk/appli/CreatePackage");
+printf("EED WxConsole::OnMenuCreatePackage 02 \n");
+
     bbtkMessage("Debug",1,"Executing : '"<<command<<"'"<<std::endl);
+printf("EED WxConsole::OnMenuCreatePackage 03 \n");
     Interpreter* I = new Interpreter;    
+printf("EED WxConsole::OnMenuCreatePackage 04 \n");
     I->InterpretFile(command);
+printf("EED WxConsole::OnMenuCreatePackage 05 \n");
     delete I;
+printf("EED WxConsole::OnMenuCreatePackage 06 \n");
   }
   //================================================================
 
diff --git a/packages/std/bbs/appli/exampleAscii.bbs b/packages/std/bbs/appli/exampleAscii.bbs
new file mode 100644 (file)
index 0000000..4049bdd
--- /dev/null
@@ -0,0 +1,12 @@
+load std
+load wx
+
+new ASCII asciiA
+  set asciiA.In "72 105 33"
+
+new ASCII asciiB
+  set asciiB.In "SOS"
+  set asciiB.type 1
+
+print $asciiA.Out$
+print $asciiB.Out$
diff --git a/packages/std/src/bbstdASCII.cxx b/packages/std/src/bbstdASCII.cxx
new file mode 100644 (file)
index 0000000..316d473
--- /dev/null
@@ -0,0 +1,71 @@
+#include "bbstdASCII.h"
+#include "bbstdPackage.h"
+namespace bbstd
+{
+
+       BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ASCII)
+       BBTK_USER_BLACK_BOX_IMPLEMENTATION(ASCII,bbtk::AtomicBlackBox);
+       void ASCII::Process()
+       {
+               int asciiValue;
+               char strTmp[10];
+               std::string result("");
+               if (bbGetInputIn()!=""){
+
+                       if (bbGetInputtype()==0){
+                               std::string commandstr(bbGetInputIn());
+                               bool ok=true;
+                               int pos1=0,pos2;
+                               pos2 = commandstr.find(" ",pos1);
+                               std::string ccommand;
+                               while (ok==true)
+                               {
+                                       if (pos2==-1)   
+                                       {
+                                               ok=false;
+                                               ccommand=commandstr.substr(pos1,commandstr.length()-pos1 );
+                                       }       else  {
+                                               ccommand=commandstr.substr(pos1,pos2-pos1);
+                                       }
+                                       asciiValue = atoi( ccommand.c_str() );
+                                       sprintf(strTmp,"%c",asciiValue);
+                                       result += strTmp;
+
+                                       pos1=pos2+1;
+                                       pos2 = commandstr.find(" ",pos2+1);
+                               } // while
+                       } // if type 0
+
+                       if (bbGetInputtype()==1){
+                               int i,size=bbGetInputIn().size();
+                               for (i=0;i<size;i++){
+                                       asciiValue = (int)bbGetInputIn()[i];
+                                       sprintf(strTmp,"%d",asciiValue);
+                                       result +=strTmp;
+                                       if (i!=size-1) {
+                                               result +=" ";
+                                       } // i!=size-1
+                               } // for
+                       } // type 1
+               }
+               bbSetOutputOut( result );  
+       }
+
+       void ASCII::bbUserConstructor()
+       {
+       bbSetInputIn("");
+       bbSetInputtype(0);
+       }
+
+       void ASCII::bbUserCopyConstructor()
+       {
+
+       }
+
+       void ASCII::bbUserDestructor()
+       {
+       }
+}
+// EO namespace bbstd
+
+
diff --git a/packages/std/src/bbstdASCII.h b/packages/std/src/bbstdASCII.h
new file mode 100644 (file)
index 0000000..1144e71
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __bbstdASCII_h_INCLUDED__
+#define __bbstdASCII_h_INCLUDED__
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbstd
+{
+
+class /*BBTK_EXPORT*/ ASCII
+ : 
+   public bbtk::AtomicBlackBox
+{
+  BBTK_USER_BLACK_BOX_INTERFACE(ASCII,bbtk::AtomicBlackBox);
+//==================================================================
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor();
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+//==================================================================
+  BBTK_DECLARE_INPUT(In,std::string);
+  BBTK_DECLARE_INPUT(type,int);
+  BBTK_DECLARE_OUTPUT(Out,std::string);
+  BBTK_PROCESS(Process);
+  void Process();
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(ASCII,bbtk::AtomicBlackBox);
+  BBTK_NAME("ASCII");  
+  BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
+  BBTK_DESCRIPTION("ascii to string - string to ascii");
+  BBTK_CATEGORY("__CATEGORY__");
+  BBTK_INPUT(ASCII,In,"Input Ascii number or Ascii",std::string);
+  BBTK_INPUT(ASCII,type,"type (default 0) 0=AsciiNum_To_String, 1=String_To_AsciiNum",int);
+  BBTK_OUTPUT(ASCII,Out,"Ascii number or Ascii",std::string);
+BBTK_END_DESCRIBE_BLACK_BOX(ASCII);
+}
+// EO namespace bbstd
+
+#endif // __bbstdASCII_h_INCLUDED__
+
index 29ad5e251eed6065b54cd56ecb8e726705e5c978..0447b2b2015699a6049788369e0f4eae7c41ac37 100755 (executable)
@@ -38,7 +38,6 @@ namespace bbstd
                ccommand[i]=34;
              }
          }                     
-       
        system ( ccommand.c_str() );
        pos1=pos2+1;
        pos2 = bbGetInputIn().find(";",pos2+1);
index 25d6c1553e1c663157468d948c5aba6e037d409b..12547923efd52ca4830b70e22fd14b3739db02c8 100644 (file)
@@ -65,17 +65,17 @@ new LayoutLine layoutHor
   connect typeBlackbox.Widget layoutHor.Widget1
   connect formatBlackbox.Widget layoutHor.Widget2
 
-new CommandButton cancelButton
-    set cancelButton.In "quit"
-    set cancelButton.Label "Cancel"
+#new CommandButton cancelButton
+#    set cancelButton.In "quit"
+#    set cancelButton.Label "Cancel"
 
 new CommandButton createButton
-    set createButton.In "exec command; quit"
-    set createButton.Label "Go"
+    set createButton.In "print $concatStr.Out$; exec command; "
+    set createButton.Label "Run"
 
 new LayoutLine buttons
     set buttons.Orientation Horizontal
-    connect cancelButton.Widget buttons.Widget1
+#    connect cancelButton.Widget buttons.Widget1
     connect createButton.Widget buttons.Widget2
 
 new LayoutLine main
@@ -93,9 +93,15 @@ new LayoutLine main
 
 #---------------------------------------------------------------------
 
+new ASCII ascii
+  set ascii.In 34
+
 new ConcatStrings dirStr
- connect dir.Out dirStr.In1
- set dirStr.In2 " "
+ set dirStr.In1 " "
+ connect ascii.Out dirStr.In2
+ connect dir.Out dirStr.In3
+ connect ascii.Out dirStr.In4
+ set dirStr.In5 " "
 
 new ConcatStrings packageNameStr
  connect namePackage.Out packageNameStr.In1
@@ -114,19 +120,26 @@ new ConcatStrings formatStr
  set formatStr.In2 " "
 
 new ConcatStrings authorStr
- connect author.Out authorStr.In1
- set authorStr.In2 " "
+ set authorStr.In1 " '"
+ connect author.Out authorStr.In2
+ set authorStr.In3 "' "
 
 new ConcatStrings descriptionStr
- connect description.Out descriptionStr.In1
- set descriptionStr.In2 " "
+ set descriptionStr.In1 " '"
+ connect description.Out descriptionStr.In2
+ set descriptionStr.In3 "' "
 
 new Configuration conf
 
 new ConcatStrings commandStr
-    connect conf.BinPath commandStr.In1        
-    connect conf.FileSeparator commandStr.In2 
-    set commandStr.In3 "bbCreateBlackBox "
+    set                                                commandStr.In1 " "
+    connect ascii.Out                  commandStr.In2
+    connect conf.BinPath               commandStr.In3
+    connect conf.FileSeparator commandStr.In4
+    set                                                commandStr.In5 "bbCreateBlackBox"
+    connect ascii.Out                  commandStr.In6
+    set                                                commandStr.In7 " "
+
 
 new ConcatStrings concatStr
     connect  commandStr.Out            concatStr.In1 
@@ -138,10 +151,14 @@ new ConcatStrings concatStr
     connect authorStr.Out                      concatStr.In7
     connect descriptionStr.Out         concatStr.In8
 
+new ConcatStrings concatStr2
+    connect  ascii.Out                         concatStr2.In1 
+    connect concatStr.Out                      concatStr2.In2 
+    connect ascii.Out                          concatStr2.In3
 
 new ExecSystemCommand command
-    connect concatStr.Out command.In
-    print $concatStr.Out$
+    connect concatStr2.Out command.In
 
+exec dir
 exec main
 
index d1e26086664aac6bd6e5e2ed441651d96d541595..54fecd0e0b2e106a15ce08658a2906321384fbad 100644 (file)
@@ -23,17 +23,17 @@ new InputText description
     set description.Title "Description            (caracters   '<',  '>' not accepted...)"
     set description.In "_description_"
 
-new CommandButton cancelButton
-    set cancelButton.In "quit"
-    set cancelButton.Label "Cancel"
+#new CommandButton cancelButton
+#    set cancelButton.In "quit"
+#    set cancelButton.Label "Cancel"
 
 new CommandButton createButton
-    set createButton.In "exec command; quit"
-    set createButton.Label "Go"
+    set createButton.In "print $concatStr.Out$; exec command; "
+    set createButton.Label "Run"
 
 new LayoutLine buttons
     set buttons.Orientation Horizontal
-    connect cancelButton.Widget buttons.Widget1
#   connect cancelButton.Widget buttons.Widget1
     connect createButton.Widget buttons.Widget2
 
 new LayoutLine main
@@ -48,27 +48,56 @@ new LayoutLine main
     set main.WinHeight 250 
 
 
+new ASCII ascii
+  set ascii.In 34
+
+new ConcatStrings dirStr
+ set dirStr.In1 " "
+ connect ascii.Out dirStr.In2
+ connect dir.Out dirStr.In3
+ connect ascii.Out dirStr.In4
+ set dirStr.In5 " "
+
+new ConcatStrings nameStr
+ set nameStr.In1 "  "
+ connect name.Out nameStr.In2
+ set nameStr.In3 " "
+
+new ConcatStrings authorStr
+ set authorStr.In1 " '"
+ connect author.Out authorStr.In2
+ set authorStr.In3 "' "
+
+new ConcatStrings descriptionStr
+ set descriptionStr.In1 " '"
+ connect description.Out descriptionStr.In2
+ set descriptionStr.In3 "' "
+
+
+
 new Configuration conf
 new ConcatStrings concatStrCommand
-#    set concatStrCommand.In1 "."
-    connect conf.BinPath concatStrCommand.In1
-    connect conf.FileSeparator concatStrCommand.In2 
-    set concatStrCommand.In3 "bbCreatePackage "
+    set concatStrCommand.In1 " "
+    connect ascii.Out                  concatStrCommand.In2
+    connect conf.BinPath               concatStrCommand.In3
+    connect conf.FileSeparator concatStrCommand.In4
+    set                                                concatStrCommand.In5  "bbCreatePackage"
+    connect ascii.Out                  concatStrCommand.In6
+    set                                                concatStrCommand.In7  " "
+
 new ConcatStrings concatStr
-    connect  concatStrCommand.Out concatStr.In1 
-    connect dir.Out concatStr.In2 
-    set concatStr.In3 " "
-    connect name.Out concatStr.In4 
-    set concatStr.In5 " '"
-    connect author.Out concatStr.In6 
-    set concatStr.In7 "' '"
-    connect description.Out concatStr.In8 
-    set concatStr.In9 "'"
+    connect ascii.Out                          concatStr.In1
+    connect  concatStrCommand.Out concatStr.In2
+    connect dirStr.Out                         concatStr.In3
+    connect nameStr.Out                        concatStr.In4 
+    connect authorStr.Out                      concatStr.In5 
+    connect descriptionStr.Out         concatStr.In6
+    connect ascii.Out                          concatStr.In7
 
 
 new ExecSystemCommand command
     connect concatStr.Out command.In
-    print $concatStr.Out$
 
+exec dir
 exec main
 
index a52fd202adca0fa41b7f8c1842f24d75c0a16113..9b39118b2bf63fc395bd1af88bc53673f7c8f08f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxCommandButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/10 06:24:13 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/03/19 12:26:09 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 
   l'Image). All rights reserved. See Doc/License.txt or
@@ -106,9 +106,9 @@ namespace bbwx
          }
        for ( i=0 ; i < ccommand.length() ; i++)
          {
-           if (ccommand[i]==39)
+           if (ccommand[i]==39) // '
              {
-               ccommand[i]=34;
+               ccommand[i]=34;  // "
              }
          }             
        bool insideComment = false; // for multiline comment