Author: cfinck
Date: Fri Jul 20 00:50:15 2007
New Revision: 27740
URL:
http://svn.reactos.org/svn/reactos?rev=27740&view=rev
Log:
- Change version number to "0.3.7-SVN"
- Compile "cpucount" before all the other tools, so we can also use it to speed
up the building process of the build tools
- Make sure that some important variables are clean, when opening the build environment
(thx to aart3k from IRC)
- Turn off the foreground color, when creating the shortcut, it looks bad on black
backgrounds
- Change the headers of some files
Modified:
trunk/tools/RosBE-Unix/RosBE-Builder.sh
trunk/tools/RosBE-Unix/scripts/RosBE.sh
trunk/tools/RosBE-Unix/scripts/build-multi.sh
trunk/tools/RosBE-Unix/scripts/build.sh
trunk/tools/RosBE-Unix/scripts/createshortcut.sh
Modified: trunk/tools/RosBE-Unix/RosBE-Builder.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Unix/RosBE-Builder.sh?…
==============================================================================
--- trunk/tools/RosBE-Unix/RosBE-Builder.sh (original)
+++ trunk/tools/RosBE-Unix/RosBE-Builder.sh Fri Jul 20 00:50:15 2007
@@ -7,7 +7,7 @@
# Released under GNU GPL v2 or any later version.
# Constants
-ROSBE_VERSION="0.3.6"
+ROSBE_VERSION="0.3.7-SVN"
DEFAULT_INSTALL_DIR="/usr/RosBE"
NEEDED_TOOLS="bison flex gcc g++ grep makeinfo" # GNU Make has a special
check
@@ -87,6 +87,17 @@
redmsg "The script directory \"$SCRIPTDIR\" is not writeable,
aborted!"
exit 1
fi
+
+# Test if the script directory contains spaces
+case "$SCRIPTDIR" in
+*" "*)
+ redmsg "The script directory \"$SCRIPTDIR\" contains spaces!"
+ redmsg "Therefore some build tools cannot be compiled properly."
+ echo
+ redmsg "Please move \"$SCRIPTDIR\" to a directory, which does not contain
spaces."
+
+ exit 1;;
+esac
# Check if all necessary tools exist
boldmsg "Checking for the needed tools..."
@@ -199,11 +210,18 @@
#
boldmsg "Building..."
PATH="$installdir/bin:$PATH"
+mkdir -p "$installdir/bin" >& /dev/null
mkdir -p "$installdir/mingw32" >& /dev/null
-cd "$installdir/mingw32"
+
+# cpucount
+echo -n "Compiling cpucount... "
+gcc -o "$installdir/bin/cpucount" "$SCRIPTDIR/tools/cpucount.c"
+checkrun
+CPUCOUNT=`$installdir/bin/cpucount`
# mingw-runtime
echo -n "Extracting mingw-runtime... "
+cd "$installdir/mingw32"
tar -xjf "$SOURCEDIR/mingw-runtime.tar.bz2" >&
"$SCRIPTDIR/tar.log"
checkrun "tar"
@@ -229,7 +247,7 @@
checkrun "configure"
echo -n "Building binutils... "
-$makecmd CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" >&
"$SCRIPTDIR/make.log"
+$makecmd -j $CPUCOUNT CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s"
>& "$SCRIPTDIR/make.log"
checkrun "make"
echo -n "Installing binutils... "
@@ -261,7 +279,7 @@
checkrun "configure"
echo -n "Building gcc... "
-$makecmd CFLAGS="-O2" CXXFLAGS="-O2" LDFLAGS="-s" >&
"$SCRIPTDIR/make.log"
+$makecmd -j $CPUCOUNT CFLAGS="-O2" CXXFLAGS="-O2"
LDFLAGS="-s" >& "$SCRIPTDIR/make.log"
checkrun "make"
echo -n "Installing gcc... "
@@ -292,7 +310,7 @@
checkrun "configure"
echo -n "Building make... "
-$makecmd CFLAGS="-s -O2 -mms-bitfields" >&
"$SCRIPTDIR/make.log"
+$makecmd -j $CPUCOUNT CFLAGS="-s -O2 -mms-bitfields" >&
"$SCRIPTDIR/make.log"
checkrun "make"
echo -n "Installing make... "
@@ -320,7 +338,7 @@
checkrun "configure"
echo -n "Building nasm... "
-$makecmd >& "$SCRIPTDIR/make.log"
+$makecmd -j $CPUCOUNT >& "$SCRIPTDIR/make.log"
checkrun "make"
echo -n "Installing nasm... "
@@ -339,10 +357,6 @@
echo -n "Compiling buildtime... "
gcc -o "$installdir/bin/buildtime" "$SCRIPTDIR/tools/buildtime.c"
-checkrun
-
-echo -n "Compiling cpucount... "
-gcc -o "$installdir/bin/cpucount" "$SCRIPTDIR/tools/cpucount.c"
checkrun
echo -n "Removing unneeded files... "
@@ -379,7 +393,7 @@
echo "If you just want to start the Build Environment without using a shortcut,
execute the"
echo "following command:"
echo
-echo " $installdir/RosBE.sh <path/to/your/ReactOS/source/directory>
[<optional color code>]"
+echo " $installdir/RosBE.sh <path/to/your/ReactOS/source/directory> [optional
color code]"
echo
exit 0
Modified: trunk/tools/RosBE-Unix/scripts/RosBE.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Unix/scripts/RosBE.sh?…
==============================================================================
--- trunk/tools/RosBE-Unix/scripts/RosBE.sh (original)
+++ trunk/tools/RosBE-Unix/scripts/RosBE.sh Fri Jul 20 00:50:15 2007
@@ -14,6 +14,12 @@
# Save the ReactOS source directory
_ROSSOURCEDIR="$1"
export _ROSSOURCEDIR
+
+# Make sure that some important variables are clean
+export HOST=
+export CFLAGS=
+export CXXFLAGS=
+export LDFLAGS=
# Read the RosBE version
# The file "RosBE-Version" has been created by the RosBE-Builder.sh script
Modified: trunk/tools/RosBE-Unix/scripts/build-multi.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Unix/scripts/build-mul…
==============================================================================
--- trunk/tools/RosBE-Unix/scripts/build-multi.sh (original)
+++ trunk/tools/RosBE-Unix/scripts/build-multi.sh Fri Jul 20 00:50:15 2007
@@ -1,7 +1,7 @@
#!/bin/bash
#
-# Build with
-# Part of Generic RosBE
+# Detects the CPU cores in your system and builds ReactOS with this number of threads
+# Part of RosBE for Unix-based Operating Systems
# Copyright 2007 Colin Finck <mail(a)colinfinck.de>
#
# Released under GNU GPL v2 or any later version.
Modified: trunk/tools/RosBE-Unix/scripts/build.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Unix/scripts/build.sh?…
==============================================================================
--- trunk/tools/RosBE-Unix/scripts/build.sh (original)
+++ trunk/tools/RosBE-Unix/scripts/build.sh Fri Jul 20 00:50:15 2007
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Build with
+# Builds ReactOS with one thread
# Part of RosBE for Unix-based Operating Systems
# Copyright 2007 Colin Finck <mail(a)colinfinck.de>
#
Modified: trunk/tools/RosBE-Unix/scripts/createshortcut.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Unix/scripts/createsho…
==============================================================================
--- trunk/tools/RosBE-Unix/scripts/createshortcut.sh (original)
+++ trunk/tools/RosBE-Unix/scripts/createshortcut.sh Fri Jul 20 00:50:15 2007
@@ -77,7 +77,7 @@
echo "Version=$ROSBE_VERSION" >> "$shortcut"
echo "Name=ReactOS Build Environment" >> "$shortcut"
echo "Icon=$SCRIPTDIR/RosBE.png" >> "$shortcut"
-echo "Exec=bash \"$SCRIPTDIR/RosBE.sh\" \"$sourcedir\" 34"
>> "$shortcut" # 34 = Blue color
+echo "Exec=bash \"$SCRIPTDIR/RosBE.sh\" \"$sourcedir\""
>> "$shortcut"
echo "Terminal=true" >> "$shortcut"
greenmsg "OK"