1 rem # ---------------------------------------------------------------------
3 rem # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 rem # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 rem # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 rem # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 rem # This software is governed by the CeCILL-B license under French law and
10 rem # abiding by the rules of distribution of free software. You can use,
11 rem # modify and/ or redistribute the software under the terms of the CeCILL-B
12 rem # license as circulated by CEA, CNRS and INRIA at the following URL
13 rem # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 rem # or in the file LICENSE.txt.
16 rem # As a counterpart to the access to the source code and rights to copy,
17 rem # modify and redistribute granted by the license, users are provided only
18 rem # with a limited warranty and the software's author, the holder of the
19 rem # economic rights, and the successive licensors have only limited
22 rem # The fact that you are presently reading this means that you have had
23 rem # knowledge of the CeCILL-B license and that you accept its terms.
24 rem # ------------------------------------------------------------------------ */
29 echo creates the file architecture for a new blackbox
32 if %0%5==%0 goto ERROR01
35 rem bbCreatePackage path
38 set INPUT="%BINPATH%\@bbCreateBlackBox_DATA_REL_PATH_FROM_BIN@\xml-templates"
47 set FILENAME=bb%PACK%%BLACKBOX%
53 echo blackbox = %BLACKBOX%
55 echo format = %FORMAT%
56 echo author = %AUTHOR%
57 echo description = %DESCRIPTION%
58 echo filename = %FILENAME%
60 echo "** Creating new black box '%BLACKBOX%' xml/c++ in folder '%OUTPUT%'"
62 echo Creating XML file..
63 echo copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml
64 copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml_tmp
65 "%BINPATH%\bbSed" %OUTPUT%\%FILENAME%.xml_tmp __BLACKBOXNAME__ %BLACKBOX% > %OUTPUT%\%FILENAME%_1.xml
66 "%BINPATH%\bbSed" %OUTPUT%\%FILENAME%_1.xml __AUTHOR__ %AUTHOR% > %OUTPUT%\%FILENAME%_2.xml
67 "%BINPATH%\bbSed" %OUTPUT%\%FILENAME%_2.xml __DESCRIPTION__ %DESCRIPTION% > %OUTPUT%\%FILENAME%.xml_tmp
68 del %OUTPUT%\%FILENAME%_1.xml
69 del %OUTPUT%\%FILENAME%_2.xml
72 IF %FORMAT%==XML GOTO module_XML
73 IF %FORMAT%==C++ GOTO module_C++
78 IF EXIST %OUTPUT%\%FILENAME%.xml GOTO ERROR02
79 move %OUTPUT%\%FILENAME%.xml_tmp %OUTPUT%\%FILENAME%.xml
83 IF EXIST %OUTPUT%\%FILENAME%.cxx GOTO ERROR02
84 echo "%BINPATH%\bbfy" %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%
85 "%BINPATH%\bbfy" %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%\
86 del %OUTPUT%\%FILENAME%.xml_tmp
92 echo -----------------------------------------------------------------------------
93 echo bbCreateBlackBox.bat "<dir-path> <package-name> <blackbox-name> <type> <format> [author] [description] "
96 echo VTK_ImageAlgorithm
97 echo VTK_PolyDataAlgorithm
102 echo -----------------------------------------------------------------------------
106 echo "ERROR : File '%OUTPUT%\%FILENAME%' %FORMAT% already exists !"
107 del %OUTPUT%\%FILENAME%.xml_tmp
111 echo "ERROR : format not match '%FORMAT%' "
112 del %OUTPUT%\%FILENAME%.xml_tmp