Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
c1d7951e
Commit
c1d7951e
authored
15 years ago
by
Nathan Wilcox
Browse files
Options
Downloads
Plain Diff
Automated merge with
ssh://inoshiro@hg.lindenlab.com/viewer/viewer-2-0/
parents
5ca943cd
ea7733a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/develop.py
+27
-20
27 additions, 20 deletions
indra/develop.py
with
27 additions
and
20 deletions
indra/develop.py
+
27
−
20
View file @
c1d7951e
...
...
@@ -41,6 +41,7 @@
import
socket
import
sys
import
commands
import
subprocess
class
CommandError
(
Exception
):
pass
...
...
@@ -504,7 +505,7 @@ def _get_generator(self):
break
else
:
print
>>
sys
.
stderr
,
'
Cannot find a Visual Studio installation!
'
e
ys
.
exit
(
1
)
s
ys
.
exit
(
1
)
return
self
.
_generator
def
_set_generator
(
self
,
gen
):
...
...
@@ -573,29 +574,32 @@ def get_build_cmd(self):
if
self
.
gens
[
self
.
generator
][
'
ver
'
]
in
[
r
'
8.0
'
,
r
'
9.0
'
]:
config
=
'
\"
%s|Win32
\"
'
%
config
return
"
buildconsole %(prj)s.sln /build /cfg=%(cfg)s
"
%
{
'
prj
'
:
self
.
project_name
,
'
cfg
'
:
config
}
executable
=
'
buildconsole
'
cmd
=
"
%(bin)s %(prj)s.sln /build /cfg=%(cfg)s
"
%
{
'
prj
'
:
self
.
project_name
,
'
cfg
'
:
config
,
'
bin
'
:
executable
}
return
(
executable
,
cmd
)
# devenv.com is CLI friendly, devenv.exe... not so much.
return
(
'"
%sdevenv.com
"
%
s.sln /build %s
'
%
(
self
.
find_visual_studio
(),
self
.
project_name
,
self
.
build_type
))
#return ('devenv.com %s.sln /build %s' %
# (self.project_name, self.build_type)
)
executable
=
'
%sdevenv.com
'
%
(
self
.
find_visual_studio
(),)
cmd
=
(
'"
%s
"
%s.sln /build %s
'
%
(
executable
,
self
.
project_name
,
self
.
build_type
))
return
(
executable
,
cmd
)
def
run
(
self
,
command
,
name
=
None
,
retry_on
=
None
,
retries
=
1
):
'''
Run a program. If the program fails, raise an exception.
'''
assert
name
is
not
None
,
'
On windows an executable path must be given in name. [DEV-44838]
'
if
os
.
path
.
isfile
(
name
):
path
=
name
else
:
path
=
self
.
find_in_path
(
name
)[
0
]
while
retries
:
retries
=
retries
-
1
print
"
develop.py tries to run:
"
,
command
ret
=
os
.
system
(
command
)
ret
=
subprocess
.
call
(
command
,
executable
=
path
)
print
"
got ret
"
,
ret
,
"
from
"
,
command
if
ret
:
if
name
is
None
:
name
=
command
.
split
(
None
,
1
)[
0
]
path
=
self
.
find_in_path
(
name
)
if
not
path
:
error
=
'
was not found
'
else
:
error
=
'
exited with status %d
'
%
ret
if
ret
==
0
:
break
else
:
error
=
'
exited with status %d
'
%
ret
if
retry_on
is
not
None
and
retry_on
==
ret
:
print
"
Retrying... the command %r %s
"
%
(
name
,
error
)
else
:
...
...
@@ -617,18 +621,21 @@ def run_vstool(self):
if
prev_build
==
self
.
build_type
:
# Only run vstool if the build type has changed.
continue
vstool_cmd
=
(
os
.
path
.
join
(
'
tools
'
,
'
vstool
'
,
'
VSTool.exe
'
)
+
executable
=
os
.
path
.
join
(
'
tools
'
,
'
vstool
'
,
'
VSTool.exe
'
)
vstool_cmd
=
(
executable
+
'
--solution
'
+
os
.
path
.
join
(
build_dir
,
'
SecondLife.sln
'
)
+
'
--config
'
+
self
.
build_type
+
'
--startup secondlife-bin
'
)
print
'
Running %r in %r
'
%
(
vstool_cmd
,
getcwd
())
self
.
run
(
vstool_cmd
)
self
.
run
(
vstool_cmd
,
name
=
executable
)
print
>>
open
(
stamp
,
'
w
'
),
self
.
build_type
def
run_build
(
self
,
opts
,
targets
):
for
t
in
targets
:
assert
t
.
strip
(),
'
Unexpected empty targets:
'
+
repr
(
targets
)
cwd
=
getcwd
()
build_cmd
=
self
.
get_build_cmd
()
executable
,
build_cmd
=
self
.
get_build_cmd
()
for
d
in
self
.
build_dirs
():
try
:
...
...
@@ -637,11 +644,11 @@ def run_build(self, opts, targets):
for
t
in
targets
:
cmd
=
'
%s /project %s %s
'
%
(
build_cmd
,
t
,
'
'
.
join
(
opts
))
print
'
Running %r in %r
'
%
(
cmd
,
d
)
self
.
run
(
cmd
,
retry_on
=
4
,
retries
=
3
)
self
.
run
(
cmd
,
name
=
executable
,
retry_on
=
4
,
retries
=
3
)
else
:
cmd
=
'
%s %s
'
%
(
build_cmd
,
'
'
.
join
(
opts
))
print
'
Running %r in %r
'
%
(
cmd
,
d
)
self
.
run
(
cmd
,
retry_on
=
4
,
retries
=
3
)
self
.
run
(
cmd
,
name
=
executable
,
retry_on
=
4
,
retries
=
3
)
finally
:
os
.
chdir
(
cwd
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment