aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'linden/scripts')
-rwxr-xr-xlinden/scripts/install.py49
-rwxr-xr-xlinden/scripts/linux/0-patch-SL-source2
-rwxr-xr-xlinden/scripts/linux/1-get-libraries-from-SL11
-rwxr-xr-xlinden/scripts/linux/3-compile-SL-source27
-rwxr-xr-xlinden/scripts/linux/4-package-viewer11
-rw-r--r--linden/scripts/linux/config-SL-source22
-rwxr-xr-xlinden/scripts/viewer_info.py3
7 files changed, 85 insertions, 40 deletions
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index a7c0a48..1e2bccb 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"""
565 tar.extractall(path=install_dir) 565 tar.extractall(path=install_dir)
566 except AttributeError: 566 except AttributeError:
567 _extractall(tar, path=install_dir) 567 _extractall(tar, path=install_dir)
568
568 symlinks = [] 569 symlinks = []
569 if _get_platform() == 'linux' or _get_platform() == 'linux64': 570 if _get_platform() == 'linux' or _get_platform() == 'linux64':
570 first = 1 571 first = 1
@@ -591,6 +592,46 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
591 os.symlink(target, link_name) 592 os.symlink(target, link_name)
592 symlinks += [LINK] 593 symlinks += [LINK]
593 print " %s --> %s" % (LINK, target) 594 print " %s --> %s" % (LINK, target)
595
596 # Reroute autobuilds
597 auto_name = install_dir + "/include"
598 if os.path.exists(auto_name):
599 print "Moving autobuilt include files to legacy locations."
600 for entry in os.listdir(auto_name):
601 os.rename(auto_name + "/" + entry, install_dir + "/libraries/include/" + entry)
602 os.rmdir(auto_name)
603
604 auto_name = install_dir + "/lib"
605 dest_name = ''
606 if _get_platform() == 'darwin':
607 dest_name = 'universal-darwin/'
608 if _get_platform() == 'linux64':
609 dest_name = 'x86_64-linux/'
610 if _get_platform() == 'linux':
611 dest_name = 'i686-linux/'
612 if _get_platform() == 'windows':
613 dest_name = 'i686-win32/'
614 if os.path.exists(auto_name):
615 print "Moving autobuilt lib files to legacy locations."
616 for entry in os.listdir(auto_name):
617 if os.path.isdir(auto_name + "/" + entry):
618 path = install_dir + "/libraries/" + dest_name + "lib_" + entry
619 if entry == 'release':
620 # Linux is special, coz it's got server code.
621 if _get_platform() == 'linux' or _get_platform() == 'linux64':
622 path = install_dir + "/libraries/" + dest_name + "lib_" + entry + "_client"
623 # Windows is also special.
624 if _get_platform() == 'windows':
625 path = install_dir + "/libraries/" + dest_name + "lib/" + entry
626 if not os.path.exists(path):
627 os.makedirs(path)
628 for filename in os.listdir(auto_name + "/" + entry):
629 os.rename(auto_name + "/" + entry + "/" + filename, path + "/" + filename)
630 os.rmdir(auto_name + "/" + entry)
631 else:
632 os.rename(auto_name + "/" + entry, install_dir + "/libraries/" + dest_name + "lib/" + entry)
633 os.rmdir(auto_name)
634
594 if ifile.pkgname in self._installed: 635 if ifile.pkgname in self._installed:
595 self._installed[ifile.pkgname].add_files( 636 self._installed[ifile.pkgname].add_files(
596 ifile.url, 637 ifile.url,
@@ -830,10 +871,10 @@ def _default_installable_cache():
830 """In general, the installable files do not change much, so find a 871 """In general, the installable files do not change much, so find a
831 host/user specific location to cache files.""" 872 host/user specific location to cache files."""
832 user = _getuser() 873 user = _getuser()
833 cache_dir = "/var/tmp/%s/install.cache" % user 874 if sys.platform != 'cygwin' and _get_platform() == 'windows':
834 if _get_platform() == 'windows': 875 cache_dir = os.path.join(tempfile.gettempdir(), 'install.cache.%s' % user)
835 cache_dir = os.path.join(tempfile.gettempdir(), \ 876 else:
836 'install.cache.%s' % user) 877 cache_dir = "/var/tmp/%s/install.cache" % user
837 return cache_dir 878 return cache_dir
838 879
839def parse_args(): 880def parse_args():
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
22 elif echo $i | grep ".bz2" &>/dev/null ; then 22 elif echo $i | grep ".bz2" &>/dev/null ; then
23 bzcat $i | patch -p1 -s 23 bzcat $i | patch -p1 -s
24 elif echo $i | grep ".zip" &>/dev/null ; then 24 elif echo $i | grep ".zip" &>/dev/null ; then
25 unzip -o $i >/dev/null 25 unzip -o $i >/dev/null
26 else 26 else
27 patch -p1 -s <$i 27 patch -p1 -s <$i
28 fi 28 fi
diff --git a/linden/scripts/linux/1-get-libraries-from-SL b/linden/scripts/linux/1-get-libraries-from-SL
index 9ba61f4..99a4367 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
53cd $PATH_TO_SOURCES/indra 53cd $PATH_TO_SOURCES/indra
54 54
55# Do a clean build 55# Do a clean build
56./develop.py clean 56#./develop.py $os_extra clean
57 57
58# Force the vectorization use if we chose so. 58# Force the vectorization use if we chose so.
59if [ "$FORCE_VECTORIZE" == "yes" ] ; then 59if [ "$FORCE_VECTORIZE" == "yes" ] ; then
@@ -65,7 +65,8 @@ else
65 FATAL_WARNINGS="" 65 FATAL_WARNINGS=""
66fi 66fi
67# Configure the sources and download the LL provided libraries: 67# Configure the sources and download the LL provided libraries:
68./develop.py --type=Release configure "$FATAL_WARNINGS" \ 68./develop.py $os_extra --type=$TYPE configure "$FATAL_WARNINGS" \
69 -DCMAKE_C_FLAGS:STRING="-O2 $TUNE_FLAGS" -DCMAKE_CXX_FLAGS:STRING="-O2 $TUNE_FLAGS" \ 69 -DCMAKE_C_FLAGS:STRING="$TUNE_FLAGS" -DCMAKE_CXX_FLAGS:STRING="$TUNE_FLAGS" \
70 -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 $TUNE_FLAGS" \ 70 -DCMAKE_C_FLAGS_DEBUG:STRING="-g $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_DEBUG:STRING="-g $TUNE_FLAGS" \
71 -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-g -O2 $TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-g -O2 $TUNE_FLAGS" 71 -DCMAKE_C_FLAGS_RELEASE:STRING="$TUNE_FLAGS" -DCMAKE_CXX_FLAGS_RELEASE:STRING="$TUNE_FLAGS" \
72 -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..4ac80a7 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
54function compile() { 54function compile() {
55 cd $PATH_TO_SOURCES/indra 55 cd $PATH_TO_SOURCES/indra
56 echo "Compiling the client into $TEMP_DIR..." 56 echo "Compiling the client into $TEMP_DIR..."
57 nice -n 19 ionice -c 3 ./develop.py --type=Release build 57 nice -n 19 $ionice ./develop.py $os_extra --type=$TYPE build
58# if (($? == 0)) ; then
59# mv -f $PATH_TO_SOURCES/indra/viewer-linux-i686*/newview/SecondLife*.tar.bz2 $HOME/
60# fi
61} 58}
62 59
63########### end of functions ########### 60########### end of functions ###########
@@ -66,14 +63,7 @@ if [ "$TEMP_DIR" == "" ] ; then
66 export TEMP_DIR="/usr/tmp/$USER" 63 export TEMP_DIR="/usr/tmp/$USER"
67fi 64fi
68 65
69# Check to see if we simply want to retry a compilation:
70if [ "$1" == "--retry" ] ; then
71 compile
72 exit $?
73fi
74
75# Use the parameter (if any) as the path to the archives: 66# Use the parameter (if any) as the path to the archives:
76
77PATH_TO_ARCHIVES=`pwd` 67PATH_TO_ARCHIVES=`pwd`
78if [ "$1" != "" ] && [ "$1" != "--prep" ] ; then 68if [ "$1" != "" ] && [ "$1" != "--prep" ] ; then
79 if [ -d $1 ] ; then 69 if [ -d $1 ] ; then
@@ -83,19 +73,4 @@ if [ "$1" != "" ] && [ "$1" != "--prep" ] ; then
83fi 73fi
84 74
85cd $PATH_TO_SOURCES/indra 75cd $PATH_TO_SOURCES/indra
86
87# Do a clean build
88#./develop.py clean
89
90# Force the vectorization use if we chose so.
91if [ "$FORCE_VECTORIZE" == "yes" ] ; then
92 TUNE_FLAGS="$TUNE_FLAGS -DLL_VECTORIZE=1"
93fi
94if [ "$ALLOW_WARNINGS" == "yes" ] ; then
95 FATAL_WARNINGS="-DGCC_DISABLE_FATAL_WARNINGS:BOOL=TRUE"
96else
97 FATAL_WARNINGS=""
98fi
99
100time compile 76time compile
101
diff --git a/linden/scripts/linux/4-package-viewer b/linden/scripts/linux/4-package-viewer
index b2bff7f..a1a74f2 100755
--- a/linden/scripts/linux/4-package-viewer
+++ b/linden/scripts/linux/4-package-viewer
@@ -1,5 +1,12 @@
1#!/bin/bash 1#!/bin/bash
2 2
3cd ../../indra/viewer-linux-* 3source config-SL-source
4make package
5 4
5if [ "$OSTYPE" == "cygwin" ] ; then
6 # Assumes version has been passed in from outside, coz Windows insists on adding crap to python output.
7 cd ../../indra/build-nmake/
8 iscc newview/${TYPE}/package/${version}-Windows-x86.iss
9else
10 cd ../../indra/viewer-linux-*
11 make package
12fi
diff --git a/linden/scripts/linux/config-SL-source b/linden/scripts/linux/config-SL-source
index 174d7d4..f60fd92 100644
--- a/linden/scripts/linux/config-SL-source
+++ b/linden/scripts/linux/config-SL-source
@@ -9,6 +9,9 @@
9# accordingly, so that you (should) end up with a properly packaged client. 9# accordingly, so that you (should) end up with a properly packaged client.
10 10
11PWD=`pwd` 11PWD=`pwd`
12os_extra=''
13ionice='ionice -c 3'
14
12 15
13# Where the sources of the client will be held (defaults to "./linden"): 16# Where the sources of the client will be held (defaults to "./linden"):
14PATH_TO_SOURCES="$PWD/../.." 17PATH_TO_SOURCES="$PWD/../.."
@@ -18,6 +21,8 @@ PATH_TO_PATCHES="$PWD/../../patches"
18TEMP_DIR="/tmp/SL-$USER" 21TEMP_DIR="/tmp/SL-$USER"
19mkdir -p $TEMP_DIR 22mkdir -p $TEMP_DIR
20 23
24TYPE="RelWithDebInfo"
25
21USE_SYSTEM_GTK="no" 26USE_SYSTEM_GTK="no"
22USE_SYSTEM_SDL="no" 27USE_SYSTEM_SDL="no"
23USE_SYSTEM_SSL="no" 28USE_SYSTEM_SSL="no"
@@ -53,7 +58,7 @@ USE_SYSTEM_BOOST="no"
53# You may add tune flags here, to optimize the code for your processor. 58# You may add tune flags here, to optimize the code for your processor.
54# Example, for an Athlon XP: 59# Example, for an Athlon XP:
55# TUNE_FLAGS="-march=athlon-xp" 60# TUNE_FLAGS="-march=athlon-xp"
56TUNE_FLAGS="-fomit-frame-pointer -frename-registers -ftree-vectorize -fweb -fexpensive-optimizations -msse -mfpmath=sse" 61TUNE_FLAGS="-O2 -fomit-frame-pointer -frename-registers -ftree-vectorize -fweb -fexpensive-optimizations -msse -mfpmath=sse"
57# Set this to "yes" to force vectorization use in the viewer code (only for 62# Set this to "yes" to force vectorization use in the viewer code (only for
58# processors with SSE or Altivec units, and only if you did enable them via 63# processors with SSE or Altivec units, and only if you did enable them via
59# the TUNE_FLAGS. 64# the TUNE_FLAGS.
@@ -61,3 +66,18 @@ FORCE_VECTORIZE="yes"
61 66
62# When using gcc v4.3 or later, you might have to set this to yes... 67# When using gcc v4.3 or later, you might have to set this to yes...
63ALLOW_WARNINGS="yes" 68ALLOW_WARNINGS="yes"
69
70
71# Change it all for cygwin.
72if [ "$OSTYPE" == "cygwin" ] ; then
73 os_extra='-G nmake'
74 ionice=''
75 USE_SYSTEM_LIBSTDC="no"
76 TUNE_FLAGS="/EHsc /GR /Zm1000 /DWIN32 /D_WINDOWS "
77 FORCE_VECTORIZE="no"
78 ALLOW_WARNINGS="no"
79fi
80
81
82# Work around python problems.
83export PYTHONUNBUFFERED='True'
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:
54 self.major = re.search('MAJOR\s*=\s*(\d+)', data).group(1) 54 self.major = re.search('MAJOR\s*=\s*(\d+)', data).group(1)
55 self.minor = re.search('MINOR\s*=\s*(\d+)', data).group(1) 55 self.minor = re.search('MINOR\s*=\s*(\d+)', data).group(1)
56 self.patch = re.search('PATCH\s*=\s*(\d+)', data).group(1) 56 self.patch = re.search('PATCH\s*=\s*(\d+)', data).group(1)
57 self.release = re.search('RLEAS\s*=\s*(\d+)', data).group(1)
57 self.extra = re.search('EXTRA\s*=\s*"([^"]*)"', data).group(1) 58 self.extra = re.search('EXTRA\s*=\s*"([^"]*)"', data).group(1)
58 self.bundle_id = re.search('BUNDLE_ID\s*=\s*"([^"]*)"', data).group(1) 59 self.bundle_id = re.search('BUNDLE_ID\s*=\s*"([^"]*)"', data).group(1)
59 60
60 self.version = "%s.%s.%s"%(self.major, self.minor, self.patch) 61 self.version = "%s.%s.%s.%s"%(self.major, self.minor, self.patch, self.release)
61 if len(self.extra) > 0: 62 if len(self.extra) > 0:
62 # Replace spaces and some puncuation with '-' in extra 63 # Replace spaces and some puncuation with '-' in extra
63 extra = re.sub('[- \t:;,!+/\\"\'`]+', '-', self.extra) 64 extra = re.sub('[- \t:;,!+/\\"\'`]+', '-', self.extra)