Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/bash
########################################################################### ###########################################################################
# Copyright (C) 2008 by Oliver Bock # # Copyright (C) 2008 by Oliver Bock #
...@@ -29,17 +29,19 @@ ...@@ -29,17 +29,19 @@
check_prerequisites() check_prerequisites()
{ {
echo "Not yet implemented: check_prerequisites()" echo "Checking prerequisites..."
# automake
# autoconf # required toolchain
# cmake TOOLS="automake autoconf m4 cmake wget gcc g++ ld libtool ar lex yacc"
# wget
# C compiler for tool in $TOOLS; do
# libtool if ! ( type $tool >/dev/null 2>&1 ); then
# ar echo "Error! Missing \"$tool\" which is a required tool! Stopping..."
# lex or flex return 1
# yacc or bison or byacc fi
# m4 done
return 0
} }
...@@ -105,6 +107,8 @@ prepare_generic() ...@@ -105,6 +107,8 @@ prepare_generic()
echo "Retrieving BOINC (this may take a while)..." | tee -a $ROOT/setup.log 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 svn checkout http://boinc.berkeley.edu/svn/trunk/boinc . >> $ROOT/setup.log
fi fi
return 0
} }
...@@ -130,6 +134,8 @@ prepare_win32() ...@@ -130,6 +134,8 @@ prepare_win32()
# note: svn has no force/overwrite switch. the file might not be updated when patched # 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 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 chmod +x x86-mingw32-build.sh >> $ROOT/setup.log
return 0
} }
...@@ -176,13 +182,19 @@ build_generic() ...@@ -176,13 +182,19 @@ build_generic()
make >> $ROOT/setup.log make >> $ROOT/setup.log
make install >> $ROOT/setup.log make install >> $ROOT/setup.log
echo "Successfully built and installed BOINC!" | tee -a $ROOT/setup.log echo "Successfully built and installed BOINC!" | tee -a $ROOT/setup.log
return 0
} }
build_mingw() build_mingw()
{ {
echo "Not yet implemented: build_mingw()" echo "Not yet implemented: build_mingw()"
return 0
} }
build_starsphere() build_starsphere()
{ {
echo "Building Starsphere [ORC] (this may take a while)..." | tee -a $ROOT/setup.log echo "Building Starsphere [ORC] (this may take a while)..." | tee -a $ROOT/setup.log
...@@ -212,27 +224,40 @@ build_starsphere() ...@@ -212,27 +224,40 @@ build_starsphere()
make >> $ROOT/setup.log make >> $ROOT/setup.log
make install >> $ROOT/setup.log make install >> $ROOT/setup.log
echo "Successfully built and installed Starsphere [Application]!" | tee -a $ROOT/setup.log echo "Successfully built and installed Starsphere [Application]!" | tee -a $ROOT/setup.log
return 0
} }
build_linux() build_linux()
{ {
build_generic build_generic
build_starsphere build_starsphere
return 0
} }
build_mac() build_mac()
{ {
build_generic echo "Not yet implemented: build_mac()"
build_starsphere
# build_generic
# build_starsphere
return 0
} }
build_win32() build_win32()
{ {
build_mingw echo "Not yet implemented: build_win32()"
build_generic
build_starsphere # build_mingw
# build_generic
# build_starsphere
return 0
} }
...@@ -246,8 +271,11 @@ check_last_build() ...@@ -246,8 +271,11 @@ check_last_build()
fi fi
echo "$1" > .lastbuild echo "$1" > .lastbuild
return 0
} }
print_usage() print_usage()
{ {
cd $ROOT cd $ROOT
...@@ -262,6 +290,8 @@ print_usage() ...@@ -262,6 +290,8 @@ print_usage()
echo "*************************" echo "*************************"
echo "Wrong usage. Stopping!" >> $ROOT/setup.log echo "Wrong usage. Stopping!" >> $ROOT/setup.log
return 0
} }
...@@ -312,10 +342,39 @@ esac ...@@ -312,10 +342,39 @@ esac
# here we go... # here we go...
check_prerequisites check_prerequisites
if [ ! $? -eq 0 ]; then
exit 1
fi
prepare_generic prepare_generic
if [ ! $? -eq 0 ]; then
exit 1
fi
if [ TARGET=$TARGET_LINUX ]; then case $TARGET in
$TARGET_LINUX)
build_linux build_linux
if [ ! $? -eq 0 ]; then
exit 1
fi 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 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>
File deleted
<?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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment