diff --git a/setup.sh b/setup.sh index 80e1df9cf8065daeedbabfa43eeb4c80075fe1a8..2a516332d11c8fde62caa0adb5631842eb7c35a4 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,4 @@ -#!/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 } @@ -299,23 +329,52 @@ case "$1" in echo "Building mac version:" | tee -a $ROOT/setup.log ;; "--win32") - TARGET=$TARGET_WIN32 - check_last_build "$1" - echo "Building win32 version:" | tee -a $ROOT/setup.log - ;; + TARGET=$TARGET_WIN32 + check_last_build "$1" + echo "Building win32 version:" | tee -a $ROOT/setup.log + ;; *) - print_usage - exit 1 - ;; + print_usage + exit 1 + ;; esac # here we go... check_prerequisites -prepare_generic +if [ ! $? -eq 0 ]; then + exit 1 +fi -if [ TARGET=$TARGET_LINUX ]; then - build_linux +prepare_generic +if [ ! $? -eq 0 ]; then + exit 1 fi +case $TARGET in + $TARGET_LINUX) + build_linux + 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 diff --git a/src/keinsteinsaver/keinsteinsaver.kdevelop b/src/keinsteinsaver/keinsteinsaver.kdevelop deleted file mode 100644 index dbbc19b75548c3cb5518f02d87ae60beffc694e0..0000000000000000000000000000000000000000 --- a/src/keinsteinsaver/keinsteinsaver.kdevelop +++ /dev/null @@ -1,169 +0,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> diff --git a/src/keinsteinsaver/keinsteinsaver.kdevelop.pcs b/src/keinsteinsaver/keinsteinsaver.kdevelop.pcs deleted file mode 100644 index 6c29e7e2e2065803f490f6af2788a8fa6ffbac4a..0000000000000000000000000000000000000000 Binary files a/src/keinsteinsaver/keinsteinsaver.kdevelop.pcs and /dev/null differ diff --git a/src/keinsteinsaver/keinsteinsaver.kdevses b/src/keinsteinsaver/keinsteinsaver.kdevses deleted file mode 100644 index b24f55d63cf50f6b6d9e73ef5568abe95ad94428..0000000000000000000000000000000000000000 --- a/src/keinsteinsaver/keinsteinsaver.kdevses +++ /dev/null @@ -1,28 +0,0 @@ -<?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>