Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SL Alpha Installer

Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
03-11-2006 02:48
Hi!

Being a lazy guy I sometimes am, I hacked together a (command line) little Perl script, which easily installs SL. It's mostly for hackers now, but anyone can try it out!

What it currently does:
- it checks the web to see if a newer (different) version is available
- if there is, it downloads the appropriate .tar.bz2 file (to /tmp)
- unpacks the .tar.bz2
- moves it to the 'targetdir'
- sets a symling so 'targetdir'/current always points to the newest version
- copies the old user_settings/* over to the new place (provided the previous version was installed by SLInstaller)

'targetdir' is currently /home/yourusername/SecondLife, in theory, you can change that :-)

What's missing or on my wishlist:
- lot of error handling
- maybe it could also help you do the libalphafy patch, though that fix should be integrated in the official version, so probably not worth it
- maybe hardware diagnostics/checking (to see if you have binary NVidia drivers set up, etc)
- maybe help you fix up/change the user settings file, like graphics memory settings, etc.

I don't want to make it too too complex, because Linden Labs will probably have a Linux installer out sometime in the next 100 years, but as long as this is alpha (or beta), this thing will probably be good.

To download:
SLInstaller.pl 0.1 (save this perl code to your disk named SLInstaller.pl)

To use:
Just make the SLInstaller.pl executable, make sure you have perl, tar, bzip2 and wget installed, and run it!
_____________________
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
03-21-2006 11:03
Not to brag, but my script seems to work fine without modifications with 1.9.0.17 :-)

From: someone

Checking SL version...
Local version: 1.8.4.7
SL website version: 1.9.0.17
SL website has newer version, downloading it...
FileURL: http://www.secondlife.com/downloads/viewer/SecondLife_1_9_0_17.tar.bz2
...


And if I had an icon on my Gnome desktop, it could still point to /home/myusername/SecondLife/current/secondlife :-)
_____________________
Vinci Calamari
Free Software Promoter
Join date: 27 Feb 2006
Posts: 192
03-21-2006 15:25
nice work!!
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
03-22-2006 03:59
From: Vinci Calamari
nice work!!


Thanks.

Sometime soon I plan to add a simple graphics card/driver detection script (using glxinfo, etc), that would warn anyone that his/her system is not set up well (NVidia/ATI 3D drivers not installed or set up).
_____________________
Spoony Spork
Registered User
Join date: 24 Feb 2006
Posts: 99
03-22-2006 17:14
Hmm... your installer doesn't seem to want to download on my end... is the site down or somesuch?

Thanks :)
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
03-25-2006 04:42
From: Spoony Spork
Hmm... your installer doesn't seem to want to download on my end... is the site down or somesuch?


Yes, it is :-( It seems the Joker.com registrar DNS service is having problems.

For now, the installer script is also available here:
http://stux.wikiinfo.org/moin.py/LinuxClient?action=AttachFile&do=get&target=SLinstaller.pl
_____________________
ninjafoo Ng
Just me :)
Join date: 11 Feb 2006
Posts: 713
03-30-2006 00:24
Works perfectly upgrading to 1.9.0(18)

:)
_____________________
FooRoo : clothes,bdsm,cages,houses & scripts

QAvimator (Linux, MacOS X & Windows) : http://qavimator.org/
Ayumi Sapeur
I wonder as I wander...
Join date: 1 Oct 2005
Posts: 16
03-30-2006 05:03
Yay scripts. Maybe NOW I can get this darn thing installed. (Keep getting some random error when I try to install manually; don't remember what it was now though because I gave up on it a few weeks ago.)

I'll give it a try this weekend. :)
_____________________
http://www.onerock.com
http://www.scripturecatholic.com
http://www.omegarock.com
Drake Bacon
Linux is Furry
Join date: 13 Jul 2005
Posts: 443
03-30-2006 08:39
From: Zonax Delorean
Yes, it is :-( It seems the Joker.com registrar DNS service is having problems.


Joker's DNS servers were under a DOS attack a few days back. It made Slashdot.
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
03-31-2006 00:16
From: Drake Bacon
Joker's DNS servers were under a DOS attack a few days back. It made Slashdot.


Yes, I read that, too, a few days AFTER I found out what the problem was :-)

BTW, everyone (capable) is welcome to send me patches to the SL Alpha installer script! I have a small list of TODO's, but dunno when I'll get around to do them...

Of course, no point in making the installer script too too complex, as it will be outdated when an official system (installer or packaging) will come out, but I think that's still a few months away.
_____________________
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
New version 0.2
04-01-2006 03:51
A new version is available at the usual location:
http://www.idojarasrendeles.com/sl-alpha-installer/SLInstaller.pl

I added a check for tar/bzip2/wget in the startup, and there's now a simple menu that aids you to change SL settings (graphics card memory settings only, for now).
_____________________
Angel Sunset
Linutic
Join date: 7 Apr 2005
Posts: 636
04-01-2006 06:35
ANOTHER Developer Award required! :)
_____________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kubuntu Intrepid 8.10, KDE, linux 2.6.27-11, X.Org 11.0, server glx vendor: NVIDIA Corporation, server glx version: 1.5.2, OpenGL vendor: NVIDIA Corporation, OpenGL renderer: GeForce 9800 GTX+/PCI/SSE2, OpenGL version: 3.0.0 NVIDIA 180.29, glu version: 1.3, NVidia GEForce 9800 GTX+ 512 MB, Intel Core 2 Duo, Mem: 3371368k , Swap: 2570360k
Vinci Calamari
Free Software Promoter
Join date: 27 Feb 2006
Posts: 192
04-05-2006 10:08
From: Zonax Delorean
A new version is available at the usual location:
http://www.idojarasrendeles.com/sl-alpha-installer/SLInstaller.pl

I added a check for tar/bzip2/wget in the startup, and there's now a simple menu that aids you to change SL settings (graphics card memory settings only, for now).


Hi, again nice work.

I have made an archive of it, because LGPL requires to provide copy of license. I also added some text at the beginning of the script. You can download it at http://stux.wikiinfo.org/moin.py/LinuxClient - just called that version 0.3

I also included a README.txt and a CHANGES file.

Ok, I know its "just" a script but I think it is nice to have that bundled. I love CHANGES files. Also I think the README.txt could be more explanatory. I have given some indications in the Wiki. We should not forget that many ppl do not know how to make a script executable! :-)

So I hope you like that. Maybe it would be a good idea to have an own wiki pages just for the installer to work on the single files.

I would like your script being included into the package of Linden Labs. And they could tweak some things like if the URL changes.

My future wishes:

* Here the script stops with "Checking for bzip2...". Don't know why. But if it dows not find the binary it should put out some error message. After CTRL-C I get "Cannot find a required helper program! (I use Zshell)

CODE

# whereis bzip2
bzip2: /usr/bin/bzip2 /usr/share/man/man1/bzip2.1.gz


So it is installed





Vinci
_____________________
The SecondTux Linux User Wiki:
http://stux.wikiinfo.org
ninjafoo Ng
Just me :)
Join date: 11 Feb 2006
Posts: 713
04-05-2006 11:09
From: Vinci Calamari
I have made an archive of it...................

Well, I hope you had the common decency to talk to Zonax before you snatched his little project out from under him.
_____________________
FooRoo : clothes,bdsm,cages,houses & scripts

QAvimator (Linux, MacOS X & Windows) : http://qavimator.org/
Sirex Cookie
Registered User
Join date: 29 Jan 2006
Posts: 103
04-05-2006 11:17
for what its worth, your version is bugged too btw.

my $version = "0.2";
Vinci Calamari
Free Software Promoter
Join date: 27 Feb 2006
Posts: 192
04-06-2006 08:21
From: ninjafoo Ng
Well, I hope you had the common decency to talk to Zonax before you snatched his little project out from under him.


Well thats LGPL, tahts open source. I did not snatch... but thats too much for your mind, I think? Open license mean that YOU DO NOT HAVE TO ASK FOR PERMITION. He can ignore this contribution if he wants.

What is essential is to recognize all former contributors. I think I have not pretended at all that i have written this script (see README.txt). And now get off my backl!

Vinci
_____________________
The SecondTux Linux User Wiki:
http://stux.wikiinfo.org
Vinci Calamari
Free Software Promoter
Join date: 27 Feb 2006
Posts: 192
04-06-2006 08:22
From: Sirex Cookie
for what its worth, your version is bugged too btw.

my $version = "0.2";


oha ty, fixed.
_____________________
The SecondTux Linux User Wiki:
http://stux.wikiinfo.org
ninjafoo Ng
Just me :)
Join date: 11 Feb 2006
Posts: 713
04-06-2006 08:28
From: Vinci Calamari
Well thats LGPL, tahts open source. I did not snatch... but thats too much for your mind, I think? Open license mean that YOU DO NOT HAVE TO ASK FOR PERMITION. He can ignore this contribution if he wants.

What is essential is to recognize all former contributors. I think I have not pretended at all that i have written this script (see README.txt). And now get off my backl!


No, but its good manners to speak to the current developer before you fork his project. Best practice is to submit your changes back for revision.
_____________________
FooRoo : clothes,bdsm,cages,houses & scripts

QAvimator (Linux, MacOS X & Windows) : http://qavimator.org/
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
04-06-2006 14:13
Hey, hey, what a flame for nothing!
ninjafoo is kinda right, but there's not that much wrong with what Vinci did, though I'd like to point out some things.

I like the webpage and I like the .tar.bz2 package idea, though the package is also some overhead. I'm wondering what's easier: to download a .tar.bz2 and 'just' unzip it and run, or to save a .pl file, make it executable, then run it.. hmm.. tough choice.

I'd like if versions and naming didn't get confused though. Even though 'SL Alpha Installer' might not be THAT an unique name, I'd like if the 'unofficial' versions be named a bit different, at least the installer (and the startup text) could say 'SL Installer 0.2 - Vinci patch 1' or something.

If there are any improvements, I'll of course incorporate them, but yes, I'd like to increment version numbers, or else we could happen to have a 0.3 (from me) vs. a 0.3 (from Vinci). Not good. It's better to have: 0.3 vs. 0.3-Vinci1.

And yes, keep any good patches, fixes coming! :-)
_____________________
Vinci Calamari
Free Software Promoter
Join date: 27 Feb 2006
Posts: 192
04-06-2006 15:10
From: Zonax Delorean
Hey, hey, what a flame for nothing!
ninjafoo is kinda right, but there's not that much wrong with what Vinci did, though I'd like to point out some things.

I like the webpage and I like the .tar.bz2 package idea, though the package is also some overhead. I'm wondering what's easier: to download a .tar.bz2 and 'just' unzip it and run, or to save a .pl file, make it executable, then run it.. hmm.. tough choice.


Well just releasing the perl script is NOT an option as LGPL REQUIRES to have a license file distributed with the application. So for practical use, yes just a script is easier.

With the naming problems I could also use the name "AlphaInstallerPackage" - I will not do much of coding. Right now I just want to find out why this script is not working at my computer. Maybe running perl in debug mode would give mes some more details? Have to check that out (haven't coded in perl for many years).
_____________________
The SecondTux Linux User Wiki:
http://stux.wikiinfo.org
Sirex Cookie
Registered User
Join date: 29 Jan 2006
Posts: 103
04-06-2006 16:13
cant you just roll these up as .deb & .ebuilds etc and have the native package management(s) download the secondlife client ? would be alot neater in the long run.

apt-get install secondlife

emerge secondlife.


...has a nice ring to it...
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
04-07-2006 00:57
From: Vinci Calamari
Well just releasing the perl script is NOT an option as LGPL REQUIRES to have a license file distributed with the application. So for practical use, yes just a script is easier.


Then I will have to paste the LGPL license text to the start or end of the Perl file (in a comment), I guess. Though I think there are big big messes with licenses all over the internet, but that's no reason not to fix mine, that's true.

From: someone
With the naming problems I could also use the name "AlphaInstallerPackage" - I will not do much of coding. Right now I just want to find out why this script is not working at my computer. Maybe running perl in debug mode would give mes some more details? Have to check that out (haven't coded in perl for many years).


I haven't coded in Perl for a year or two, but this script was easy to put together :-)
Look for the line which checks for bzip2:
From: someone
if (system($config{'bzip2'} . " --version &> /dev/null";) == 0) { print " OK\n"; }


It uses the shell to run a command, 'bzip2 --version &> /dev/null', then check the result. I guess that probably it doesn't work with the Z shell (different syntax needed). Using the command 'which' might be a good idea, too, though how do I check if 'which' is available on the system? :-)
_____________________
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
04-07-2006 01:00
From: Sirex Cookie
cant you just roll these up as .deb & .ebuilds etc and have the native package management(s) download the secondlife client ? would be alot neater in the long run.


Yep, that's a good idea. But first, that might be a bit more of the Linden's TODO thing, than mine. If/when they bring their client into 'stable' status, a solution like that would be nice to have.
And I'm not good at making .deb and other packages, but maybe I'll try someday :-)

For now, I'd like to keep my installer script simple and not too complex.
_____________________
Sirex Cookie
Registered User
Join date: 29 Jan 2006
Posts: 103
04-07-2006 04:16
yea, when it goes table it'll be nice to do. i wouldnt mind doing the ubuntu package myself.

never done one before, but it'd good to learn.
Vinci Calamari
Free Software Promoter
Join date: 27 Feb 2006
Posts: 192
Bzip2
04-07-2006 15:10
From: Zonax Delorean

It uses the shell to run a command, 'bzip2 --version &> /dev/null', then check the result. I guess that probably it doesn't work with the Z shell (different syntax needed). Using the command 'which' might be a good idea, too, though how do I check if 'which' is available on the system? :-)


It is the same with bash and zsh here. bzip2 hangs if I enter this. This does not happen with the other programs.

I am not a coder, but I found something in vmware-config.pl that might help:

CODE

# Contrary to a popular belief, 'which' is not always a shell builtin command.
# So we cannot trust it to determine the location of other binaries.
# Moreover, SuSE 6.1's 'which' is unable to handle program names beginning with
# a '/'...
#
# Return value is the complete path if found, or '' if not found

sub internal_which {
my $bin = shift;

if (substr($bin, 0, 1) eq '/') {
# Absolute name
if ((-f $bin) && (-x $bin)) {
return $bin;
}
} else {
# Relative name
my @paths;
my $path;

if (index($bin, '/') == -1) {
# There is no other '/' in the name
@paths = split(':', $ENV{'PATH'});
foreach $path (@paths) {
my $fullbin;

$fullbin = $path . '/' . $bin;
if ((-f $fullbin) && (-x $fullbin)) {
return $fullbin;
}
}
}
}

return '';
}


So this looks like a lot of code for a simple query to me?

Vinci
_____________________
The SecondTux Linux User Wiki:
http://stux.wikiinfo.org
1 2