rem # --------------------------------------------------------------------- rem # rem # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image rem # pour la SantÈ) rem # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton rem # Previous Authors : Laurent Guigues, Jean-Pierre Roux rem # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil rem # rem # This software is governed by the CeCILL-B license under French law and rem # abiding by the rules of distribution of free software. You can use, rem # modify and/ or redistribute the software under the terms of the CeCILL-B rem # license as circulated by CEA, CNRS and INRIA at the following URL rem # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html rem # or in the file LICENSE.txt. rem # rem # As a counterpart to the access to the source code and rights to copy, rem # modify and redistribute granted by the license, users are provided only rem # with a limited warranty and the software's author, the holder of the rem # economic rights, and the successive licensors have only limited rem # liability. rem # rem # The fact that you are presently reading this means that you have had rem # knowledge of the CeCILL-B license and that you accept its terms. rem # ------------------------------------------------------------------------ */ rem @echo off echo creates the file architecture for a new user package if %0%1==%0 goto ERROR01 rem bbCreatePackage path set BINPATH=%~dp0 rem Input data path set INPUT="%BINPATH%\@bbCreatePackage_DATA_REL_PATH_FROM_BIN@\void-Package" set OUTPUT=%1 set PACK=%2 set AUTHOR=%3 set DESCRIPTION=%4 set PACK_DIRECTORY=bbtk_%PACK%_PKG echo output= %OUTPUT% echo bin = %BINPATH% echo input = %INPUT% echo pack = %PACK% echo author = %AUTHOR% echo description = %DESCRIPTION% echo pack_directory = %PACK_DIRECTORY% IF EXIST %OUTPUT%\%PACK_DIRECTORY% GOTO ERROR02 echo "** Creating new black box package '%PACK%' in folder '%OUTPUT%'" mkdir %OUTPUT%\%PACK_DIRECTORY% xcopy %INPUT% %OUTPUT%\%PACK_DIRECTORY% /S "%BINPATH%\bbSed" %OUTPUT%\%PACK_DIRECTORY%\CMakeLists.txt WITHOUT_NAME "%PACK%" > %OUTPUT%\%PACK_DIRECTORY%\CMakeLists2.txt "%BINPATH%\bbSed" %OUTPUT%\%PACK_DIRECTORY%\CMakeLists2.txt WITHOUT_AUTHOR %AUTHOR% > %OUTPUT%\%PACK_DIRECTORY%\CMakeLists3.txt "%BINPATH%\bbSed" %OUTPUT%\%PACK_DIRECTORY%\CMakeLists3.txt WITHOUT_DESCRIPTION %DESCRIPTION% > %OUTPUT%\%PACK_DIRECTORY%\CMakeLists.txt del "%OUTPUT%\%PACK_DIRECTORY%\CMakeLists2.txt" del "%OUTPUT%\%PACK_DIRECTORY%\CMakeLists3.txt" echo echo "Package created !" echo echo ==> echo "==> Edit the file '%OUTPUT%\%PACK_DIRECTORY%\CMakeLists.txt' to customize your package" echo ==> echo echo goto END :ERROR01 echo bbCreatePackage.bat " [author] [description] " goto END :ERROR02 echo "ERROR : Directory '%OUTPUT%/%PACK_DIRECTORY%' already exists !" goto end :END