From 3436961bb5c01d659d09be134368f4f69460cef9 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 26 May 2007 13:40:19 +0000 Subject: Start of rewrite 5279! --- releng/CAUTION | 4 +++ releng/README | 3 ++ releng/createreldir.sh | 9 +++++ releng/dist/INSTALL | 33 +++++++++++++++++ releng/dist/README | 70 ++++++++++++++++++++++++++++++++++++ releng/dist/bin/OpenSim | 3 ++ releng/dobuild.sh | 20 +++++++++++ releng/makerel.sh | 30 ++++++++++++++++ releng/parsetmpl.sh | 5 +++ releng/templates/VersionInfo.cs.tmpl | 37 +++++++++++++++++++ 10 files changed, 214 insertions(+) create mode 100644 releng/CAUTION create mode 100644 releng/README create mode 100644 releng/createreldir.sh create mode 100644 releng/dist/INSTALL create mode 100644 releng/dist/README create mode 100644 releng/dist/bin/OpenSim create mode 100644 releng/dobuild.sh create mode 100644 releng/makerel.sh create mode 100644 releng/parsetmpl.sh create mode 100644 releng/templates/VersionInfo.cs.tmpl (limited to 'releng') diff --git a/releng/CAUTION b/releng/CAUTION new file mode 100644 index 0000000..6418046 --- /dev/null +++ b/releng/CAUTION @@ -0,0 +1,4 @@ +!!!!!!!!!!!!! DANGER DANGER !!!!!!!!!!!!!!!!!!!!!!!!!!! +DO NOT RUN ANY OF THE SCRIPTS IN THIS DIRECTORY WITHOUT +READING THEM!!!!!!!!!!!!! +!!!!!!!!!!!!! DANGER DANGER !!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/releng/README b/releng/README new file mode 100644 index 0000000..e73f395 --- /dev/null +++ b/releng/README @@ -0,0 +1,3 @@ +This directory contains scripts etc for creating a tarball/package out of the SVN tree. +Use makerel.sh to generate a tarball, do not use other scripts +It is designed to be run before releases or by developers/users before a local install from source. diff --git a/releng/createreldir.sh b/releng/createreldir.sh new file mode 100644 index 0000000..eb470b0 --- /dev/null +++ b/releng/createreldir.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# this script creates a new opensim-major.minor directory and copies all the relevant files into it +# not designed for direct invocation from the command line + +mkdir opensim-$OPENSIMMAJOR.$OPENSIMMINOR + +cp -R dist/* opensim-$OPENSIMMAJOR.$OPENSIMMINOR +cp -R build/bin/* opensim-$OPENSIMMAJOR.$OPENSIMMINOR/bin diff --git a/releng/dist/INSTALL b/releng/dist/INSTALL new file mode 100644 index 0000000..f67fe43 --- /dev/null +++ b/releng/dist/INSTALL @@ -0,0 +1,33 @@ +INSTALLING FROM SOURCE WITH WINDOWS + +1 - Ensure you have visual studio express (the C# edition) + +2 - Check you have a clean source tree with the latest VS2005 solution, if unsure run prebuild (See README file) + +3 - Open the solution in visual studio and build it + +4 - Look in bin/ for the output + +5 - ??? + +6 - Profit + +INSTALLING FROM SOURCE WITH LINUX/BSD/*NIX + +1 - Ensure you have a clean source tree with latest nant build files, if not, get one or run prebuild (See README file) + +2 - Go to a shell prompt and change to the correct directory + +3 - Type the following: + +nant + +4 - Look in bin/ for the output + +5 - ??? + +6 - Profit + +INSTALLING BINARY RELEASE + +Simply extract the tarball into a good location and run straight out of bin/. You may also wish to put all the binaries into /opt/opensim on *nix systems and adjust your path accordingly. At time of writing there is no official way yet to do this. Watch this space. diff --git a/releng/dist/README b/releng/dist/README new file mode 100644 index 0000000..125d5da --- /dev/null +++ b/releng/dist/README @@ -0,0 +1,70 @@ +For installation notes, please read INSTALL + +RUNNING SANDBOX MODE (the standard way) + +To get up and running in sandbox mode, please start up opensim like this from the command line: + +(first ensure you are in the right directory) + +OpenSim.exe -sandbox (windows) + +mono OpenSim.exe -sandbox (linux/BSD/MacOS X) + +Then startup your second life viewer with the following parameters: + +-loginuri http://yourserver:9000/ + +The method to do this is dependent upon your OS. "yourserver" will be 127.0.0.1 if you accept the defaults when starting opensim. + + +RUNNING SANDBOX WITH USER ACCOUNTS + +* open cmd window, go to /bin and launch +OpenSim.exe -sandbox -loginserver -useraccounts + +* launch web browser, go to +http://localhost:9000/Admin +enter password 'Admin' + +* Select 'Accounts', enter credentials, press 'Create' + +* Now, log on thru your viewer (see above) with your newly created credentials. + +* Have Fun! + + +PREBUILD + +We use Prebuild to generate vs2005 solutions and nant build scripts. + +=== Building Prebuild === + +At the moment, the Prebuild exe is shipped as /bin/Prebuild.exe so you shouldn't really have to build it. + +But here's the instructions anyway : + +The Prebuild master project is /prebuild.xml + +To build it with vs2005 : + +* build the solution /Prebuild/Prebuild.sln + +To build it with nant : + +* cd to /Prebuild/ +* type 'nant' + +After you've built it, it will land in the root /bin/ directory, + +=== Modyfying the OpenSim solution === + +When adding or changing projects, modify the prebuild.xml and then execute + +bin/Prebuild.exe /target {target} + +where target is either +vs2005 - to generate new vs2005 solutions and projects +nant - to generate new nant build scripts + +Remember to run prebuild whenever you've added or removed files as well. + diff --git a/releng/dist/bin/OpenSim b/releng/dist/bin/OpenSim new file mode 100644 index 0000000..9b46075 --- /dev/null +++ b/releng/dist/bin/OpenSim @@ -0,0 +1,3 @@ +#!/bin/sh + +mono OpenSim.exe $* diff --git a/releng/dobuild.sh b/releng/dobuild.sh new file mode 100644 index 0000000..0fbb979 --- /dev/null +++ b/releng/dobuild.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# this script does a guaranteed clean build from SVN using a URL specified on the command line + +rm -rf build/ +mkdir build + +printf "Getting fresh source tree from SVN..." +svn checkout $1 build + +printf "Updating templates..." +./parsetmpl.sh templates/VersionInfo.cs.tmpl >build/OpenSim.RegionServer/VersionInfo.cs + +printf "Running prebuild..." +cd build +mono bin/Prebuild.exe /target nant + +printf "Doing the build..." +nant + diff --git a/releng/makerel.sh b/releng/makerel.sh new file mode 100644 index 0000000..b7bc568 --- /dev/null +++ b/releng/makerel.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# This is the one! + +export OPENSIMMAJOR=0 +export OPENSIMMINOR=2 +export BUILD=`date +%s` +export BRANCH=DEVEL +export SVNURL=svn://openmetaverse.org/opensim/trunk + + + + + +# shouldn't have to change anything below here + +script dobuild.log -c "./dobuild.sh $SVNURL" +if [ ! $? -eq 0 ] +then + echo "Build failed!" +else + script createrel.log -c ./createreldir.sh + rm -rf build + tar cvf opensim-$OPENSIMMAJOR.$OPENSIMMINOR-$BUILD-$BRANCH.tar opensim-$OPENSIMMAJOR.$OPENSIMMINOR/* + gzip opensim-$OPENSIMMAJOR.$OPENSIMMINOR-$BUILD-$BRANCH.tar +fi + +rm -rf opensim-$OPENSIMMAJOR.$OPENSIMMINOR +echo "Produced binary tarball ready for distribution." + diff --git a/releng/parsetmpl.sh b/releng/parsetmpl.sh new file mode 100644 index 0000000..0ce6d24 --- /dev/null +++ b/releng/parsetmpl.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# this script parses a template to replace @@ tokens + +cat $1 | sed s/@@VERSION/$OPENSIMMAJOR.$OPENSIMMINOR/g | sed s/@@BUILD/$BUILD/g | sed s/@@SVNREV/`svnversion`/g diff --git a/releng/templates/VersionInfo.cs.tmpl b/releng/templates/VersionInfo.cs.tmpl new file mode 100644 index 0000000..29159e2 --- /dev/null +++ b/releng/templates/VersionInfo.cs.tmpl @@ -0,0 +1,37 @@ +/* +Copyright (c) OpenSim project, http://osgrid.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +using System; + +namespace OpenSim +{ + /// + /// + public class VersionInfo + { + public static string Version = "@@VERSION, Build @@BUILD, Revision @@SVNREV"; + } +} -- cgit v1.1