blob: c10608ee3a1d39761a277bce2d86788be461874f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
import sys, os
try:
import demoscript
except ImportError:
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
if os.path.exists(os.path.join(toplevel, "demoscript")):
break
else:
raise "can't find toplevel directory!"
sys.path.append(os.path.join(toplevel))
import demoscript
import demoscript.Util
demoscript.Util.defaultLanguage = "C++"
import demoscript.IceGrid.icebox
desc = 'application.xml'
if demoscript.Util.mode == 'debug':
fi = open(desc, "r")
desc = 'tmp_application.xml'
fo = open(desc, "w")
for l in fi:
if l.find('exe="icebox"') != -1:
l = l.replace('exe="icebox"', 'exe="iceboxd.exe"')
fo.write(l)
fi.close()
fo.close()
directory = os.path.dirname(os.path.abspath(__file__))
demoscript.Util.addLdPath(directory)
demoscript.IceGrid.icebox.run('./client', desc[0:len(desc)-4])
|