From 78d49f51549a7f23b36e61ac09e6c9dfccfeb395 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 11 Apr 2013 07:11:58 +1000 Subject: Add release number to version strings. --- linden/scripts/viewer_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linden/scripts') diff --git a/linden/scripts/viewer_info.py b/linden/scripts/viewer_info.py index 53ea432..bd0f436 100755 --- a/linden/scripts/viewer_info.py +++ b/linden/scripts/viewer_info.py @@ -54,10 +54,11 @@ class ViewerInfo: self.major = re.search('MAJOR\s*=\s*(\d+)', data).group(1) self.minor = re.search('MINOR\s*=\s*(\d+)', data).group(1) self.patch = re.search('PATCH\s*=\s*(\d+)', data).group(1) + self.release = re.search('RLEAS\s*=\s*(\d+)', data).group(1) self.extra = re.search('EXTRA\s*=\s*"([^"]*)"', data).group(1) self.bundle_id = re.search('BUNDLE_ID\s*=\s*"([^"]*)"', data).group(1) - self.version = "%s.%s.%s"%(self.major, self.minor, self.patch) + self.version = "%s.%s.%s.%s"%(self.major, self.minor, self.patch, self.release) if len(self.extra) > 0: # Replace spaces and some puncuation with '-' in extra extra = re.sub('[- \t:;,!+/\\"\'`]+', '-', self.extra) -- cgit v1.1 From 7d87f4eb8737215323bfb9f7991e4d6519a310b0 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 17 Apr 2013 18:53:49 +1000 Subject: Better cache directory code for pre built libraries. --- linden/scripts/install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linden/scripts') diff --git a/linden/scripts/install.py b/linden/scripts/install.py index a7c0a48..99e8b73 100755 --- a/linden/scripts/install.py +++ b/linden/scripts/install.py @@ -830,10 +830,10 @@ def _default_installable_cache(): """In general, the installable files do not change much, so find a host/user specific location to cache files.""" user = _getuser() - cache_dir = "/var/tmp/%s/install.cache" % user - if _get_platform() == 'windows': - cache_dir = os.path.join(tempfile.gettempdir(), \ - 'install.cache.%s' % user) + if sys.platform != 'cygwin' and _get_platform() == 'windows': + cache_dir = os.path.join(tempfile.gettempdir(), 'install.cache.%s' % user) + else: + cache_dir = "/var/tmp/%s/install.cache" % user return cache_dir def parse_args(): -- cgit v1.1 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 From 37301a51d2d2f3731ada3ad2170cb9ec91945b62 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 19 Apr 2013 17:12:36 +1000 Subject: Allow the build scripts to build a configurable type, and make that type RelWithDebInfo. --- linden/scripts/linux/1-get-libraries-from-SL | 2 +- linden/scripts/linux/3-compile-SL-source | 2 +- linden/scripts/linux/config-SL-source | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'linden/scripts') diff --git a/linden/scripts/linux/1-get-libraries-from-SL b/linden/scripts/linux/1-get-libraries-from-SL index 87ad39c..99a4367 100755 --- a/linden/scripts/linux/1-get-libraries-from-SL +++ b/linden/scripts/linux/1-get-libraries-from-SL @@ -65,7 +65,7 @@ else FATAL_WARNINGS="" fi # Configure the sources and download the LL provided libraries: -./develop.py $os_extra --type=Release configure "$FATAL_WARNINGS" \ +./develop.py $os_extra --type=$TYPE 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" \ diff --git a/linden/scripts/linux/3-compile-SL-source b/linden/scripts/linux/3-compile-SL-source index c932340..4ac80a7 100755 --- a/linden/scripts/linux/3-compile-SL-source +++ b/linden/scripts/linux/3-compile-SL-source @@ -54,7 +54,7 @@ source config-SL-source function compile() { cd $PATH_TO_SOURCES/indra echo "Compiling the client into $TEMP_DIR..." - nice -n 19 $ionice ./develop.py $os_extra --type=Release build + nice -n 19 $ionice ./develop.py $os_extra --type=$TYPE build } ########### end of functions ########### diff --git a/linden/scripts/linux/config-SL-source b/linden/scripts/linux/config-SL-source index 200f957..80ae27a 100644 --- a/linden/scripts/linux/config-SL-source +++ b/linden/scripts/linux/config-SL-source @@ -21,6 +21,8 @@ PATH_TO_PATCHES="$PWD/../../patches" TEMP_DIR="/tmp/SL-$USER" mkdir -p $TEMP_DIR +TYPE="RelWithDebInfo" + USE_SYSTEM_GTK="no" USE_SYSTEM_SDL="no" USE_SYSTEM_SSL="no" -- cgit v1.1 From 976874914ea9f8cda148c02bfed1cdc4f3c47442 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 20 Apr 2013 22:53:07 +1000 Subject: Make python output stuff in the proper order. --- linden/scripts/linux/config-SL-source | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linden/scripts') diff --git a/linden/scripts/linux/config-SL-source b/linden/scripts/linux/config-SL-source index 80ae27a..f60fd92 100644 --- a/linden/scripts/linux/config-SL-source +++ b/linden/scripts/linux/config-SL-source @@ -77,3 +77,7 @@ if [ "$OSTYPE" == "cygwin" ] ; then FORCE_VECTORIZE="no" ALLOW_WARNINGS="no" fi + + +# Work around python problems. +export PYTHONUNBUFFERED='True' -- cgit v1.1 From 85444c4aff8cc51da35468df62aa70ed87339622 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 24 Apr 2013 13:04:14 +1000 Subject: Add compatibility with autobuild pre built libraries. Now Imprudence can share them with Kokua. --- linden/scripts/install.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'linden/scripts') diff --git a/linden/scripts/install.py b/linden/scripts/install.py index 99e8b73..b39dd5a 100755 --- a/linden/scripts/install.py +++ b/linden/scripts/install.py @@ -565,6 +565,7 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" tar.extractall(path=install_dir) except AttributeError: _extractall(tar, path=install_dir) + symlinks = [] if _get_platform() == 'linux' or _get_platform() == 'linux64': first = 1 @@ -591,6 +592,43 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" os.symlink(target, link_name) symlinks += [LINK] print " %s --> %s" % (LINK, target) + + # Reroute autobuilds + auto_name = install_dir + "/include" + if os.path.exists(auto_name): + print "Moving autobuilt include files to legacy locations." + for entry in os.listdir(auto_name): + os.rename(auto_name + "/" + entry, install_dir + "/libraries/include/" + entry) + os.rmdir(auto_name) + + auto_name = install_dir + "/lib" + dest_name = '' + if _get_platform() == 'darwin': + dest_name = 'universal-darwin/' + if _get_platform() == 'linux64': + dest_name = 'x86_64-linux/' + if _get_platform() == 'linux': + dest_name = 'i686-linux/' + if _get_platform() == 'windows': + dest_name = 'i686-win32/' + if os.path.exists(auto_name): + print "Moving autobuilt lib files to legacy locations." + for entry in os.listdir(auto_name): + if os.path.isdir(auto_name + "/" + entry): + path = install_dir + "/libraries/" + dest_name + "lib_" + entry + if entry == 'release': + # Linux is special, coz it's got server code. + if _get_platform() == 'linux' or _get_platform() == 'linux64': + path = install_dir + "/libraries/" + dest_name + "lib_" + entry + "_client" + if not os.path.exists(path): + os.makedirs(path) + for filename in os.listdir(auto_name + "/" + entry): + os.rename(auto_name + "/" + entry + "/" + filename, path + "/" + filename) + os.rmdir(auto_name + "/" + entry) + else: + os.rename(auto_name + "/" + entry, install_dir + "/libraries/" + dest_name + "lib/" + entry) + os.rmdir(auto_name) + if ifile.pkgname in self._installed: self._installed[ifile.pkgname].add_files( ifile.url, -- cgit v1.1 From 044d7575eab98ff26ed7d48a461b613db52bed04 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 26 Apr 2013 13:09:45 +1000 Subject: Make nmake builds more like VS builds. Still some tweaking to go, therefore, still some rough bits in this. --- linden/scripts/linux/4-package-viewer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/scripts') diff --git a/linden/scripts/linux/4-package-viewer b/linden/scripts/linux/4-package-viewer index 19d2456..d954f02 100755 --- a/linden/scripts/linux/4-package-viewer +++ b/linden/scripts/linux/4-package-viewer @@ -3,7 +3,7 @@ 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 + iscc newview/$TYPE/package/${version}-Windows-x86.iss else cd ../../indra/viewer-linux-* make package -- cgit v1.1 From a4dd5745326f4477b49e2331c45e549e821ffbee Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 26 Apr 2013 17:26:38 +1000 Subject: Make sure the TYPE variable is actually defined for nmake builds. --- linden/scripts/linux/4-package-viewer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linden/scripts') diff --git a/linden/scripts/linux/4-package-viewer b/linden/scripts/linux/4-package-viewer index d954f02..a1a74f2 100755 --- a/linden/scripts/linux/4-package-viewer +++ b/linden/scripts/linux/4-package-viewer @@ -1,9 +1,11 @@ #!/bin/bash +source config-SL-source + 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/$TYPE/package/${version}-Windows-x86.iss + iscc newview/${TYPE}/package/${version}-Windows-x86.iss else cd ../../indra/viewer-linux-* make package -- cgit v1.1 From 3932afd085f2bc480f7ba5c664972a616d1b6939 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 27 Apr 2013 09:41:06 +1000 Subject: Fix Windows autobuild support, coz it's different from the others. sigh --- linden/scripts/install.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linden/scripts') diff --git a/linden/scripts/install.py b/linden/scripts/install.py index b39dd5a..1e2bccb 100755 --- a/linden/scripts/install.py +++ b/linden/scripts/install.py @@ -620,6 +620,9 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" # Linux is special, coz it's got server code. if _get_platform() == 'linux' or _get_platform() == 'linux64': path = install_dir + "/libraries/" + dest_name + "lib_" + entry + "_client" + # Windows is also special. + if _get_platform() == 'windows': + path = install_dir + "/libraries/" + dest_name + "lib/" + entry if not os.path.exists(path): os.makedirs(path) for filename in os.listdir(auto_name + "/" + entry): -- cgit v1.1