Commit c7c300d3 authored by Oliver Bock's avatar Oliver Bock
Browse files

More setup script updates

* Using bash explicitly (e.g. for "type" built-in)
* Implemented prerequisite check for executables (GL/GLU should also be checked!)
* Added first parts of error handling harness
* Also: removed KDevelop files of kscreensaver
parent f4519e97
#!/bin/sh
#!/bin/bash
###########################################################################
# Copyright (C) 2008 by Oliver Bock #
......@@ -29,17 +29,19 @@
check_prerequisites()
{
echo "Not yet implemented: check_prerequisites()"
# automake
# autoconf
# cmake
# wget
# C compiler
# libtool
# ar
# lex or flex
# yacc or bison or byacc
# m4
echo "Checking prerequisites..."
# required toolchain
TOOLS="automake autoconf m4 cmake wget gcc g++ ld libtool ar lex yacc"
for tool in $TOOLS; do
if ! ( type $tool >/dev/null 2>&1 ); then
echo "Error! Missing \"$tool\" which is a required tool! Stopping..."
return 1
fi
done
return 0
}
......@@ -105,6 +107,8 @@ prepare_generic()
echo "Retrieving BOINC (this may take a while)..." | tee -a $ROOT/setup.log
svn checkout http://boinc.berkeley.edu/svn/trunk/boinc . >> $ROOT/setup.log
fi
return 0
}
......@@ -130,6 +134,8 @@ prepare_win32()
# note: svn has no force/overwrite switch. the file might not be updated when patched
patch x86-mingw32-build.sh.conf < $ROOT/patches/x86-mingw32-build.sh.conf.patch >> $ROOT/setup.log
chmod +x x86-mingw32-build.sh >> $ROOT/setup.log
return 0
}
......@@ -176,13 +182,19 @@ build_generic()
make >> $ROOT/setup.log
make install >> $ROOT/setup.log
echo "Successfully built and installed BOINC!" | tee -a $ROOT/setup.log
return 0
}
build_mingw()
{
echo "Not yet implemented: build_mingw()"
return 0
}
build_starsphere()
{
echo "Building Starsphere [ORC] (this may take a while)..." | tee -a $ROOT/setup.log
......@@ -212,27 +224,40 @@ build_starsphere()
make >> $ROOT/setup.log
make install >> $ROOT/setup.log
echo "Successfully built and installed Starsphere [Application]!" | tee -a $ROOT/setup.log
return 0
}
build_linux()
{
build_generic
build_starsphere
return 0
}
build_mac()
{
build_generic
build_starsphere
echo "Not yet implemented: build_mac()"
# build_generic
# build_starsphere
return 0
}
build_win32()
{
build_mingw
build_generic
build_starsphere
echo "Not yet implemented: build_win32()"
# build_mingw
# build_generic
# build_starsphere
return 0
}
......@@ -246,8 +271,11 @@ check_last_build()
fi
echo "$1" > .lastbuild
return 0
}
print_usage()
{
cd $ROOT
......@@ -262,6 +290,8 @@ print_usage()
echo "*************************"
echo "Wrong usage. Stopping!" >> $ROOT/setup.log
return 0
}
......@@ -312,10 +342,39 @@ esac
# here we go...
check_prerequisites
if [ ! $? -eq 0 ]; then
exit 1
fi
prepare_generic
if [ ! $? -eq 0 ]; then
exit 1
fi
if [ TARGET=$TARGET_LINUX ]; then
case $TARGET in
$TARGET_LINUX)
build_linux
fi
if [ ! $? -eq 0 ]; then
exit 1
fi
;;
$TARGET_MAC)
build_mac
if [ ! $? -eq 0 ]; then
exit 1
fi
;;
$TARGET_WIN32)
build_win32
if [ ! $? -eq 0 ]; then
exit 1
fi
;;
*)
# should be unreachable
print_usage
exit 1
;;
esac
exit 0
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Oliver Bock</author>
<email>oliver.bock@aei.mpg.de</email>
<version>0.1</version>
<projectmanagement>KDevKDEAutoProject</projectmanagement>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>C++</keyword>
<keyword>Code</keyword>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
<keyword>kioslave</keyword>
</keywords>
<ignoreparts/>
<projectname>keinsteinsaver</projectname>
</general>
<kdevcppsupport>
<qt>
<version>3</version>
<used>true</used>
<includestyle>3</includestyle>
<designerintegration>EmbeddedKDevDesigner</designerintegration>
<root>/usr/share/qt3</root>
<qmake>/usr/bin/qmake-qt3</qmake>
<designer>/usr/bin/designer-qt3</designer>
<designerpluginpaths/>
</qt>
<references>
<pcs>Qt4</pcs>
</references>
<codecompletion>
<automaticCodeCompletion>false</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<headerCompletionDelay>250</headerCompletionDelay>
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
<completionBoxItemOrder>0</completionBoxItemOrder>
<howEvaluationContextMenu>true</howEvaluationContextMenu>
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
<statusBarTypeEvaluation>false</statusBarTypeEvaluation>
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
<processPrimaryTypes>true</processPrimaryTypes>
<processFunctionArguments>false</processFunctionArguments>
<preProcessAllHeaders>false</preProcessAllHeaders>
<parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
<alwaysParseInBackground>true</alwaysParseInBackground>
<usePermanentCaching>true</usePermanentCaching>
<alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
<includePaths>.;</includePaths>
</codecompletion>
</kdevcppsupport>
<kdevautoproject>
<general>
<activetarget>src/libkeinsteinsaver.la</activetarget>
<useconfiguration>debug</useconfiguration>
</general>
<configurations>
<optimized>
<builddir>optimized</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cxxflags>-O2 -g0</cxxflags>
</optimized>
<debug>
<configargs>--enable-debug=full</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cxxflags>-O0 -g3</cxxflags>
</debug>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
</make>
</kdevautoproject>
<kdevfileview>
<groups>
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
<group pattern="*.po;*.ts" name="Translations" />
<group pattern="*" name="Others" />
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidenonlocation>false</hidenonlocation>
</groups>
<tree>
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>ada</toc>
<toc>ada_bugs_gcc</toc>
<toc>bash</toc>
<toc>bash_bugs</toc>
<toc>clanlib</toc>
<toc>fortran_bugs_gcc</toc>
<toc>gnome1</toc>
<toc>gnustep</toc>
<toc>gtk</toc>
<toc>gtk_bugs</toc>
<toc>haskell</toc>
<toc>haskell_bugs_ghc</toc>
<toc>java_bugs_gcc</toc>
<toc>java_bugs_sun</toc>
<toc>opengl</toc>
<toc>pascal_bugs_fp</toc>
<toc>php</toc>
<toc>php_bugs</toc>
<toc>perl</toc>
<toc>perl_bugs</toc>
<toc>python</toc>
<toc>python_bugs</toc>
<toc>ruby</toc>
<toc>ruby_bugs</toc>
<toc>sdl</toc>
<toc>stl</toc>
<toc>sw</toc>
<toc>w3c-dom-level2-html</toc>
<toc>w3c-svg</toc>
<toc>w3c-uaag10</toc>
<toc>wxwidgets_bugs</toc>
</ignoretocs>
<ignoreqt_xml>
<toc>qmake User Guide</toc>
</ignoreqt_xml>
</kdevdoctreeview>
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
</general>
</kdevdebugger>
<kdevfilecreate>
<filetypes/>
<useglobaltypes>
<type ext="ui" />
<type ext="cpp" />
<type ext="h" />
</useglobaltypes>
</kdevfilecreate>
<kdevdocumentation>
<projectdoc>
<docsystem>Doxygen Documentation Collection</docsystem>
<docurl>keinsteinsaver.tag</docurl>
</projectdoc>
</kdevdocumentation>
<substmap>
<APPNAME>keinsteinsaver</APPNAME>
<APPNAMELC>keinsteinsaver</APPNAMELC>
<APPNAMESC>Keinsteinsaver</APPNAMESC>
<APPNAMEUC>KEINSTEINSAVER</APPNAMEUC>
<AUTHOR>Oliver Bock</AUTHOR>
<EMAIL>oliver.bock@aei.mpg.de</EMAIL>
<LICENSE>GPL</LICENSE>
<LICENSEFILE>COPYING</LICENSEFILE>
<VERSION>0.1</VERSION>
<YEAR>2008</YEAR>
<dest>/home/oliver/development/aei/lscsoft/src/einsteinathome/graphics/src/keinsteinsaver</dest>
</substmap>
</kdevelop>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KDevPrjSession>
<KDevPrjSession>
<DocsAndViews NumberOfDocuments="1" >
<Doc0 NumberOfViews="1" URL="file:///home/oliver/development/aei/lscsoft/src/einsteinathome/graphics/src/keinsteinsaver/src/keinsteinsaver.cpp" >
<View0 Encoding="" line="0" Type="Source" />
</Doc0>
</DocsAndViews>
<pluginList>
<kdevdebugger>
<breakpointList/>
<showInternalCommands value="0" />
</kdevdebugger>
<kdevastyle>
<Extensions ext="*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm" />
<AStyle IndentPreprocessors="0" FillCount="4" PadParenthesesOut="0" IndentNamespaces="0" IndentLabels="0" Fill="Tabs" MaxStatement="40" Brackets="Linux" MinConditional="-1" IndentBrackets="0" PadParenthesesUn="1" BlockBreak="1" KeepStatements="0" KeepBlocks="0" BlockIfElse="1" IndentSwitches="0" PadOperators="1" FStyle="UserDefined" IndentCases="0" FillEmptyLines="0" BracketsCloseHeaders="1" BlockBreakAll="0" PadParenthesesIn="0" IndentClasses="0" IndentBlocks="0" FillForce="1" />
</kdevastyle>
<kdevbookmarks>
<bookmarks/>
</kdevbookmarks>
<kdevvalgrind>
<executable path="" params="" />
<valgrind path="" params="" />
<calltree path="" params="" />
<kcachegrind path="" />
</kdevvalgrind>
</pluginList>
</KDevPrjSession>
Supports Markdown
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