From 8fa60cf0f49c872402aa72d486e1f900a166d951 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 18 Apr 2013 14:03:24 +1000 Subject: New branch for building with nmake. This is a branch, coz it's still crap. --- linden/scripts/linux/0-patch-SL-source | 2 +- linden/scripts/linux/1-get-libraries-from-SL | 11 ++++++----- linden/scripts/linux/3-compile-SL-source | 27 +-------------------------- linden/scripts/linux/4-package-viewer | 11 ++++++++--- linden/scripts/linux/config-SL-source | 16 +++++++++++++++- 5 files changed, 31 insertions(+), 36 deletions(-) (limited to 'linden/scripts') diff --git a/linden/scripts/linux/0-patch-SL-source b/linden/scripts/linux/0-patch-SL-source index 4885d5d..ce0dabe 100755 --- a/linden/scripts/linux/0-patch-SL-source +++ b/linden/scripts/linux/0-patch-SL-source @@ -22,7 +22,7 @@ if [ "$PATCHES" != "" ] ; then elif echo $i | grep ".bz2" &>/dev/null ; then bzcat $i | patch -p1 -s elif echo $i | grep ".zip" &>/dev/null ; then - unzip -o $i >/dev/null + unzip -o $i >/dev/null else patch -p1 -s <$i fi diff --git a/linden/scripts/linux/1-get-libraries-from-SL b/linden/scripts/linux/1-get-libraries-from-SL index 9ba61f4..87ad39c 100755 --- a/linden/scripts/linux/1-get-libraries-from-SL +++ b/linden/scripts/linux/1-get-libraries-from-SL @@ -53,7 +53,7 @@ source config-SL-source cd $PATH_TO_SOURCES/indra # Do a clean build -./develop.py clean +#./develop.py $os_extra clean # Force the vectorization use if we chose so. if [ "$FORCE_VECTORIZE" == "yes" ] ; then @@ -65,7 +65,8 @@ else FATAL_WARNINGS="" fi # Configure the sources and download the LL provided libraries: -./develop.py --type=Release configure "$FATAL_WARNINGS" \ - -DCMAKE_C_FLAGS:STRING="-O2 $TUNE_FLAGS" -DCMAKE_CXX_FLAGS:STRING="-O2 $TUNE_FLAGS" \ - -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 $TUNE_FLAGS" \ - -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-g -O2 $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-g -O2 $TUNE_FLAGS" +./develop.py $os_extra --type=Release configure "$FATAL_WARNINGS" \ + -DCMAKE_C_FLAGS:STRING="$TUNE_FLAGS" -DCMAKE_CXX_FLAGS:STRING="$TUNE_FLAGS" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-g $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_DEBUG:STRING="-g $TUNE_FLAGS" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="$TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELEASE:STRING="$TUNE_FLAGS" \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-g $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-g $TUNE_FLAGS" -DPACKAGE:BOOL=ON diff --git a/linden/scripts/linux/3-compile-SL-source b/linden/scripts/linux/3-compile-SL-source index 34395bb..c932340 100755 --- a/linden/scripts/linux/3-compile-SL-source +++ b/linden/scripts/linux/3-compile-SL-source @@ -54,10 +54,7 @@ source config-SL-source function compile() { cd $PATH_TO_SOURCES/indra echo "Compiling the client into $TEMP_DIR..." - nice -n 19 ionice -c 3 ./develop.py --type=Release build -# if (($? == 0)) ; then -# mv -f $PATH_TO_SOURCES/indra/viewer-linux-i686*/newview/SecondLife*.tar.bz2 $HOME/ -# fi + nice -n 19 $ionice ./develop.py $os_extra --type=Release build } ########### end of functions ########### @@ -66,14 +63,7 @@ if [ "$TEMP_DIR" == "" ] ; then export TEMP_DIR="/usr/tmp/$USER" fi -# Check to see if we simply want to retry a compilation: -if [ "$1" == "--retry" ] ; then - compile - exit $? -fi - # Use the parameter (if any) as the path to the archives: - PATH_TO_ARCHIVES=`pwd` if [ "$1" != "" ] && [ "$1" != "--prep" ] ; then if [ -d $1 ] ; then @@ -83,19 +73,4 @@ if [ "$1" != "" ] && [ "$1" != "--prep" ] ; then fi cd $PATH_TO_SOURCES/indra - -# Do a clean build -#./develop.py clean - -# Force the vectorization use if we chose so. -if [ "$FORCE_VECTORIZE" == "yes" ] ; then - TUNE_FLAGS="$TUNE_FLAGS -DLL_VECTORIZE=1" -fi -if [ "$ALLOW_WARNINGS" == "yes" ] ; then - FATAL_WARNINGS="-DGCC_DISABLE_FATAL_WARNINGS:BOOL=TRUE" -else - FATAL_WARNINGS="" -fi - time compile - diff --git a/linden/scripts/linux/4-package-viewer b/linden/scripts/linux/4-package-viewer index b2bff7f..19d2456 100755 --- a/linden/scripts/linux/4-package-viewer +++ b/linden/scripts/linux/4-package-viewer @@ -1,5 +1,10 @@ #!/bin/bash -cd ../../indra/viewer-linux-* -make package - +if [ "$OSTYPE" == "cygwin" ] ; then + # Assumes version has been passed in from outside, coz Windows insists on adding crap to python output. + cd ../../indra/build-nmake/ + iscc newview/package/${version}-Windows-x86.iss +else + cd ../../indra/viewer-linux-* + make package +fi diff --git a/linden/scripts/linux/config-SL-source b/linden/scripts/linux/config-SL-source index 174d7d4..200f957 100644 --- a/linden/scripts/linux/config-SL-source +++ b/linden/scripts/linux/config-SL-source @@ -9,6 +9,9 @@ # accordingly, so that you (should) end up with a properly packaged client. PWD=`pwd` +os_extra='' +ionice='ionice -c 3' + # Where the sources of the client will be held (defaults to "./linden"): PATH_TO_SOURCES="$PWD/../.." @@ -53,7 +56,7 @@ USE_SYSTEM_BOOST="no" # You may add tune flags here, to optimize the code for your processor. # Example, for an Athlon XP: # TUNE_FLAGS="-march=athlon-xp" -TUNE_FLAGS="-fomit-frame-pointer -frename-registers -ftree-vectorize -fweb -fexpensive-optimizations -msse -mfpmath=sse" +TUNE_FLAGS="-O2 -fomit-frame-pointer -frename-registers -ftree-vectorize -fweb -fexpensive-optimizations -msse -mfpmath=sse" # Set this to "yes" to force vectorization use in the viewer code (only for # processors with SSE or Altivec units, and only if you did enable them via # the TUNE_FLAGS. @@ -61,3 +64,14 @@ FORCE_VECTORIZE="yes" # When using gcc v4.3 or later, you might have to set this to yes... ALLOW_WARNINGS="yes" + + +# Change it all for cygwin. +if [ "$OSTYPE" == "cygwin" ] ; then + os_extra='-G nmake' + ionice='' + USE_SYSTEM_LIBSTDC="no" + TUNE_FLAGS="/EHsc /GR /Zm1000 /DWIN32 /D_WINDOWS " + FORCE_VECTORIZE="no" + ALLOW_WARNINGS="no" +fi -- cgit v1.1