Commit 6a7e5cc3 authored by Sylvain Thery's avatar Sylvain Thery

modification os script

parent 40211cc8
......@@ -5,17 +5,13 @@ if test $# -lt 1; then
exit 2
fi
APPS_ROOT=`basename $PWD`
if test $APPS_ROOT != CGoGN_Apps; then
echo "You are not in the CGoGN_Apps directory"
exit 2
fi
if test -d $PWD/$1; then
echo Repertory $1 already exist
exit 3
fi
echo "Warning do not forget to check the CGoGN_ROOT_DIR variable (ccmake)"
apps=$1
mkdir $apps
......@@ -132,12 +128,12 @@ echo \#include \"Utils/Qt/qtui.h\" >> ${apps}.h
echo "" >> ${apps}.h
echo "using namespace CGoGN;" >> ${apps}.h
echo "" >> ${apps}.h
echo "class Interface: public Utils::QT::SimpleQT" >> ${apps}.h
echo "class ${apps}: public Utils::QT::SimpleQT" >> ${apps}.h
echo "{" >> ${apps}.h
echo " Q_OBJECT" >> ${apps}.h
echo "public:" >> ${apps}.h
echo "" >> ${apps}.h
echo " Interface() {}" >> ${apps}.h
echo " ${apps}() {}" >> ${apps}.h
echo "" >> ${apps}.h
echo " void cb_redraw();" >> ${apps}.h
echo "" >> ${apps}.h
......@@ -201,7 +197,7 @@ echo "int main(int argc, char **argv)" >> ${apps}.cpp
echo "{" >> ${apps}.cpp
echo "" >> ${apps}.cpp
echo " QApplication app(argc, argv);" >> ${apps}.cpp
echo " Interface sqt;" >> ${apps}.cpp
echo " ${apps} sqt;" >> ${apps}.cpp
echo "" >> ${apps}.cpp
echo " Utils::QT::uiDockInterface dock;" >> ${apps}.cpp
echo " sqt.setDock(&dock);" >> ${apps}.cpp
......
......@@ -5,11 +5,7 @@ if test $# -lt 1; then
exit 2
fi
APPS_ROOT=`basename $PWD`
if test $APPS_ROOT != CGoGN_Apps; then
echo "You are not in the CGoGN_Apps directory"
exit 2
fi
echo "Warning do not forget to check the CGoGN_ROOT_DIR variable (ccmake)"
if test -d $PWD/$1; then
echo Repertory $1 already exist
......@@ -80,6 +76,3 @@ echo "{" >> ${apps}.cpp
echo " CGoGNout << \"Hello CGoGN\"<<CGoGNendl;" >> ${apps}.cpp
echo "}" >> ${apps}.cpp
echo Generation ok
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment