aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/copy_win_scripts/start-client.py
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/copy_win_scripts/start-client.py
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/copy_win_scripts/start-client.py')
-rw-r--r--linden/indra/copy_win_scripts/start-client.py68
1 files changed, 68 insertions, 0 deletions
diff --git a/linden/indra/copy_win_scripts/start-client.py b/linden/indra/copy_win_scripts/start-client.py
new file mode 100644
index 0000000..5f7ff2f
--- /dev/null
+++ b/linden/indra/copy_win_scripts/start-client.py
@@ -0,0 +1,68 @@
1#!/usr/bin/env python
2import sys, getopt
3import os
4import llstart
5
6def usage():
7 print """start-client.py
8
9 --grid <grid>
10 --farm <grid>
11 --region <starting region name>
12 """
13
14def start_client(grid, slurl, build_config, my_args):
15 login_url = "https://login.%s.lindenlab.com/cgi-bin/login.cgi" % (grid)
16
17 viewer_args = { "--grid" : grid,
18 "--loginuri" : login_url }
19 viewer_args.update(my_args)
20 # *sigh* We must put --url at the end of the argument list.
21 if viewer_args.has_key("--url"):
22 slurl = viewer_args["--url"]
23 del(viewer_args["--url"])
24 viewer_args = llstart.get_args_from_dict(viewer_args)
25 if slurl is not None:
26 viewer_args += " --url %s" % slurl
27
28 # Figure out path stuff.
29 # The client should run from indra/newview
30 # but the exe is at indra/build-<xxx>/newview/<target>
31 build_path = os.path.dirname(os.getcwd());
32 f = open("start-client.log", "w")
33 print >>f, "Viewer startup arguments:"
34 llstart.start("viewer", "../../newview",
35 "%s/newview/%s/secondlife-bin.exe" % (build_path, build_config),
36 viewer_args, f)
37 f.close()
38
39if __name__ == "__main__":
40 grid = llstart.get_config("grid")
41
42 if grid == None:
43 grid = "aditi"
44
45 build_config = llstart.get_config("build_config")
46 my_args = llstart.get_config("viewer_args", force_dict = True)
47 opts, args = getopt.getopt(sys.argv[1:], "u:r:f:g:i:h",
48 ["region=", "username=", "farm=", "grid=", "ip=", "help"])
49 region = None
50 for o, a in opts:
51 if o in ("-r", "--region", "-u", "--username"):
52 region = a
53 if o in ("-f", "--farm", "-g", "--grid"):
54 grid = a
55 if o in ("-h", "--help"):
56 usage()
57 sys.exit(0)
58
59 slurl = llstart.get_config("slurl")
60 if slurl == None:
61 if region is None:
62 region = llstart.get_user_name()
63 slurl = "//%s/128/128/" % (region)
64 # Ensure the slurl has quotes around it.
65 if slurl is not None:
66 slurl = '"%s"' % (slurl.strip('"\''))
67
68 start_client(grid, slurl, build_config, my_args)