diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/copy_win_scripts | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-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')
-rw-r--r-- | linden/indra/copy_win_scripts/CMakeLists.txt | 35 | ||||
-rw-r--r-- | linden/indra/copy_win_scripts/start-client.py | 68 |
2 files changed, 103 insertions, 0 deletions
diff --git a/linden/indra/copy_win_scripts/CMakeLists.txt b/linden/indra/copy_win_scripts/CMakeLists.txt new file mode 100644 index 0000000..93a8c1d --- /dev/null +++ b/linden/indra/copy_win_scripts/CMakeLists.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | # The copy_win_scripts folder contains scripts handy for launching the | ||
4 | # from the windows command line on windows. | ||
5 | # The cmake target created copies the scripts to the | ||
6 | # build directory being used, which where the scripts | ||
7 | # need to be executed from. | ||
8 | |||
9 | include(CMakeCopyIfDifferent) | ||
10 | |||
11 | set(win_scripts-src ${CMAKE_SOURCE_DIR}/copy_win_scripts) | ||
12 | set(win_scripts-dst ${CMAKE_BINARY_DIR}/batch) | ||
13 | |||
14 | set(file-list | ||
15 | llstart.py | ||
16 | start-client.py | ||
17 | start-servers.py | ||
18 | stop-servers.py | ||
19 | user_config.py | ||
20 | ) | ||
21 | |||
22 | foreach(file ${file-list}) | ||
23 | if(EXISTS ${win_scripts-src}/${file}) | ||
24 | set(win_scripts-files ${win_scripts-files} ${file}) | ||
25 | endif(EXISTS ${win_scripts-src}/${file}) | ||
26 | endforeach(file ${file-list}) | ||
27 | |||
28 | copy_if_different( | ||
29 | ${win_scripts-src} | ||
30 | ${win_scripts-dst} | ||
31 | win_scripts-targets | ||
32 | ${win_scripts-files} | ||
33 | ) | ||
34 | |||
35 | add_custom_target(copy_win_scripts ALL DEPENDS ${win_scripts-targets}) | ||
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 | ||
2 | import sys, getopt | ||
3 | import os | ||
4 | import llstart | ||
5 | |||
6 | def usage(): | ||
7 | print """start-client.py | ||
8 | |||
9 | --grid <grid> | ||
10 | --farm <grid> | ||
11 | --region <starting region name> | ||
12 | """ | ||
13 | |||
14 | def 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 | |||
39 | if __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) | ||