From 7fed43e19b367f885e1df8d7e780f6fd9293d581 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Tue, 2 Jun 2009 15:32:46 +0000 Subject: [PATCH] *** empty log message *** --- .../cmake/UserBuildHtmlDocFromLatex.cmake | 29 +++++++++ .../NewProject/cmake/UserBuildLatexDoc.cmake | 63 +++++++++++++++++++ .../NewProject/doc/CMakeLists.txt | 24 +++++++ .../doc/UserDocumentation/CMakeLists.txt | 7 +++ .../UserDocumentation/UserDocumentation.tex | 49 +++++++++++++++ .../NewProject/doc/index.html.in | 4 +- .../NewProject/doc/template_WebSite/home.html | 6 +- .../NewProject/doc/template_WebSite/menu.html | 17 ++--- 8 files changed, 180 insertions(+), 19 deletions(-) create mode 100644 appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake create mode 100644 appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake create mode 100644 appli/creaNewProject/NewProject/doc/UserDocumentation/CMakeLists.txt create mode 100644 appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex diff --git a/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake b/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake new file mode 100644 index 0000000..5e79304 --- /dev/null +++ b/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake @@ -0,0 +1,29 @@ + + +MACRO(USER_BUILD_HTML_DOC_FROM_LATEX TEX_FILE OUTPUT_REL_PATH) + # Need tth + SET(USE_TTH ON CACHE BOOL "" FORCE) + # Construct absolute build path + SET(BUILD_PATH ${${PROJECT_NAME}_DOC_BUILD_PATH}/${OUTPUT_REL_PATH}) + #------------------------------------------------------------------------- + + ADD_CUSTOM_COMMAND( + OUTPUT ${BUILD_PATH}/${TEX_FILE}.html + COMMAND + # tth + ${TTH_EXECUTABLE} + ARGS + -e2 ${BUILD_PATH}/${TEX_FILE}.tex 2>tth.log + # DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf + ) + ADD_CUSTOM_TARGET(${TEX_FILE}.html ALL + DEPENDS ${BUILD_PATH}/${TEX_FILE}.html + ) + # Install + INSTALL( + FILES ${BUILD_PATH}/${TEX_FILE}.html + DESTINATION ${BBTK_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH} + ) + #------------------------------------------------------------------------- + +ENDMACRO(USER_BUILD_HTML_DOC_FROM_LATEX) diff --git a/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake b/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake new file mode 100644 index 0000000..b70ac84 --- /dev/null +++ b/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake @@ -0,0 +1,63 @@ + + +MACRO(USER_BUILD_LATEX_DOC TEX_FILE OUTPUT_REL_PATH) + # Need LaTeX + SET(USE_LATEX ON CACHE BOOL "" FORCE) + # Construct absolute build path + SET(BUILD_PATH ${${PROJECT_NAME}_DOC_BUILD_PATH}/${OUTPUT_REL_PATH}) + #MESSAGE(STATUS "Tex file : ${TEX_FILE}") + #--------------------------------------------------------------------------- + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/${TEX_FILE}.tex + ${BUILD_PATH}/${TEX_FILE}.tex + COPYONLY + ) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/../config.tex + ${BUILD_PATH}/config.tex + @ONLY + ) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/../config.tex + ${CMAKE_CURRENT_BINARY_DIR}/config.tex + @ONLY + ) + #--------------------------------------------------------------------------- + FILE(TO_NATIVE_PATH ${BUILD_PATH} THE_BUILD_PATH) + + # Have to run latex twice to get references, toc, etc. + ADD_CUSTOM_COMMAND( + OUTPUT ${BUILD_PATH}/${TEX_FILE}.aux + COMMAND + # latex + cd ${THE_BUILD_PATH} && ${LATEX_COMPILER} + ARGS + -interaction=batchmode ${BUILD_PATH}/${TEX_FILE} -output-directory=${BUILD_PATH}/ + + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/${TEX_FILE}.tex + ${CMAKE_CURRENT_SOURCE_DIR}/../config.tex + ) + ADD_CUSTOM_COMMAND( + OUTPUT ${BUILD_PATH}/${TEX_FILE}.pdf + COMMAND + # latex + cd ${THE_BUILD_PATH} && ${LATEX_COMPILER} + ARGS + -interaction=batchmode ${BUILD_PATH}/${TEX_FILE} -output-directory=${BUILD_PATH}/ + + DEPENDS ${BUILD_PATH}/${TEX_FILE}.aux + ) + + # pdf target + ADD_CUSTOM_TARGET(${TEX_FILE}.pdf ALL + DEPENDS ${BUILD_PATH}/${TEX_FILE}.pdf) + + # Install + INSTALL( + FILES ${BUILD_PATH}/${TEX_FILE}.pdf + DESTINATION ${${PROJECT_NAME}_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH} + ) + + +ENDMACRO(USER_BUILD_LATEX_DOC) diff --git a/appli/creaNewProject/NewProject/doc/CMakeLists.txt b/appli/creaNewProject/NewProject/doc/CMakeLists.txt index db4f378..9e8416e 100644 --- a/appli/creaNewProject/NewProject/doc/CMakeLists.txt +++ b/appli/creaNewProject/NewProject/doc/CMakeLists.txt @@ -7,6 +7,30 @@ IF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_DOXYGEN) ENDIF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_DOXYGEN) #----------------------------------------------------------------------------- +#----------------------------------------------------------------------------- +IF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_PDF) + INCLUDE(../cmake/UserBuildLatexDoc.cmake) +ELSE(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_HTML) + MACRO(USER_BUILD_LATEX_DOC TEX_FILE) + ENDMACRO(USER_BUILD_LATEX_DOC) +ENDIF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_PDF) +#----------------------------------------------------------------------------- + + +#----------------------------------------------------------------------------- +IF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_HTML) + INCLUDE(../cmake/UserBuildHtmlDocFromLatex.cmake) +ELSE(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_HTML) + MACRO(USER_BUILD_HTML_DOC_FROM_LATEX SOURCE) + ENDMACRO(USER_BUILD_HTML_DOC_FROM_LATEX) +ENDIF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_HTML) +#----------------------------------------------------------------------------- + + +#----------------------------------------------------------------------------- +IF(BUILD_${PROJECT_NAME}_DOC AND BUILD_${PROJECT_NAME}_DOC_GUIDES_PDF OR BUILD_${PROJECT_NAME}_DOC_GUIDES_HTML) + SUBDIRS(UserDocumentation) +ENDIF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_PDF OR BUILD_BBTK_DOC_GUIDES_HTML) #----------------------------------------------------------------------------- # Web site IF(BUILD_${PROJECT_NAME}_DOC) diff --git a/appli/creaNewProject/NewProject/doc/UserDocumentation/CMakeLists.txt b/appli/creaNewProject/NewProject/doc/UserDocumentation/CMakeLists.txt new file mode 100644 index 0000000..f12e4d1 --- /dev/null +++ b/appli/creaNewProject/NewProject/doc/UserDocumentation/CMakeLists.txt @@ -0,0 +1,7 @@ +MESSAGE(STATUS "") +MESSAGE(STATUS "=======================================") +MESSAGE(STATUS "Configuring bbtk Package Developers' Guide build ") +USER_DOC_INSTALL_IMAGES(UserDocumentation) +USER_BUILD_LATEX_DOC(UserDocumentation UserDocumentation) +USER_BUILD_HTML_DOC_FROM_LATEX(UserDocumentation UserDocumentation) +MESSAGE(STATUS "=======================================") diff --git a/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex b/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex new file mode 100644 index 0000000..9510553 --- /dev/null +++ b/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex @@ -0,0 +1,49 @@ + +% ========================================== +\documentclass[11pt,final,a4paper]{article} +\input{config.tex} +\begin{document} +\bbtkGuide[Package Developers' Guide] +\newpage +% ========================================== + + + + +% ========================================== +\section{Introduction} +% ========================================== + +Introduction + +\begin{enumerate} +\item \textbf{Subject 1 } +This is described in section \ref{Section1}. + +\item \textbf{Describe your new box.} +You can do it either : +\begin{itemize} +\item In \CPP code. You will have to write the class for +your box, mostly using \bbtk macros. +\item In \xml code. +When configuring your project with \cmake, +the utility \bbfy will then generate the corresponding \CPP code. +\end{itemize} + +This is described in section \ref{CreateBlackBox}. + +\end{enumerate} + +% ========================================== +\section{Subject 1} +\label{Section1} +% ========================================== + +% ========================================== +\subsection{SubSection 1} +% ========================================== +Description of the SubSection + + +\end{document} + diff --git a/appli/creaNewProject/NewProject/doc/index.html.in b/appli/creaNewProject/NewProject/doc/index.html.in index a92e524..f6341df 100644 --- a/appli/creaNewProject/NewProject/doc/index.html.in +++ b/appli/creaNewProject/NewProject/doc/index.html.in @@ -5,8 +5,8 @@ - - + + <body bgcolor="#FFFFFF" text="#000000"> diff --git a/appli/creaNewProject/NewProject/doc/template_WebSite/home.html b/appli/creaNewProject/NewProject/doc/template_WebSite/home.html index 15b1f54..ba190b9 100644 --- a/appli/creaNewProject/NewProject/doc/template_WebSite/home.html +++ b/appli/creaNewProject/NewProject/doc/template_WebSite/home.html @@ -8,13 +8,11 @@ <body> <div style="text-align: center;"> <big><span style="font-weight: bold;"> -The Black Box Toolkit Documentation<br> -bbtk @BBTK_VERSION@ (@BBTK_VERSION_DATE@)<br> +User Project documentation<br> </big></span><br> <div style="text-align: left;">Follow <a - href="./install.html">this link</a> if you need to build bbtk from -sources.<br> + href="./install.html">this link</a> User Install Instructions<br> <br> Read the <a href="../bbtkUsersGuide/bbtkUsersGuide.html">users' guide</a> if you want to learn how to use bbtk development environnement (bbStudio) and diff --git a/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html b/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html index fca9b7c..cc2028e 100644 --- a/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html +++ b/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> - <title>The Black Box Toolkit @BBTK_VERSION@</title> + <title>USER DOCUMENTATION</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> @@ -17,19 +17,10 @@ Guide</a> (<font size="2"><small><small><a href="../bbtkUsersGuide/bbtkUsersGuide.pdf" target="information">pdf</a></small></small></font>) </small></font></small><br> <small><font size="3"><small> <a - href="../bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.html" - target="information">Package Developer's Guide</a> (<font size="2"><small><small><a - href="../bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.pdf" - target="information">pdf</a></small></small></font>) + href="http://www.creatis.insa-lyon.fr/creatools/documentation" + target="information">Package Developer's Guide</a> </small></font></small><br> -<small><font size="3"><small> <small><font size="3"><small><a - href="../bbtkDevelopersGuide/bbtkDevelopersGuide.html" - target="information">Developer's Guide</a> (<font size="2"><small><small><a - href="../bbtkDevelopersGuide/bbtkDevelopersGuide.pdf" - target="information">pdf</a></small></small></font>)</small></font></small><br> -</small></font></small><small><font size="3"><small> <a - href="../doxygen/bbtk/main.html" target="information">bbtk library -doxygen documentation</a></small></font></small> + <ul> </ul> <hr style="width: 100%; height: 2px;">Boxes<big><br> -- 2.47.0