Skip to content
Snippets Groups Projects
Commit 5243bafa authored by Aaron Brashears's avatar Aaron Brashears
Browse files

force dos drive letters to be uppercase. Patch from Alissa Sabre. vetted...

force dos drive letters to be uppercase. Patch from Alissa Sabre. vetted through release and cmake lists.
parent 9cc14df4
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,16 @@ def mkdir(path): ...@@ -53,6 +53,16 @@ def mkdir(path):
if err.errno != errno.EEXIST or not os.path.isdir(path): if err.errno != errno.EEXIST or not os.path.isdir(path):
raise raise
def getcwd():
cwd = os.getcwd()
if 'a' <= cwd[0] <= 'z' and cwd[1] == ':':
# CMake wants DOS drive letters to be in uppercase. The above
# condition never asserts on platforms whose full path names
# always begin with a slash, so we don't need to test whether
# we are running on Windows.
cwd = cwd[0].upper() + cwd[1:]
return cwd
def quote(opts): def quote(opts):
return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"' return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"'
...@@ -141,7 +151,7 @@ def run_cmake(self, args=[]): ...@@ -141,7 +151,7 @@ def run_cmake(self, args=[]):
# do a sanity check to make sure we have a generator # do a sanity check to make sure we have a generator
if not hasattr(self, 'generator'): if not hasattr(self, 'generator'):
raise "No generator available for '%s'" % (self.__name__,) raise "No generator available for '%s'" % (self.__name__,)
cwd = os.getcwd() cwd = getcwd()
created = [] created = []
try: try:
for d in self.build_dirs(): for d in self.build_dirs():
...@@ -405,7 +415,7 @@ def cmake_commandline(self, src_dir, build_dir, opts, simple): ...@@ -405,7 +415,7 @@ def cmake_commandline(self, src_dir, build_dir, opts, simple):
'%(opts)s %(dir)r' % args) '%(opts)s %(dir)r' % args)
def run_build(self, opts, targets): def run_build(self, opts, targets):
cwd = os.getcwd() cwd = getcwd()
if targets: if targets:
targets = ' '.join(['-target ' + repr(t) for t in targets]) targets = ' '.join(['-target ' + repr(t) for t in targets])
else: else:
...@@ -539,11 +549,11 @@ def run_cmake(self, args=[]): ...@@ -539,11 +549,11 @@ def run_cmake(self, args=[]):
+ os.path.join(build_dir,'SecondLife.sln') \ + os.path.join(build_dir,'SecondLife.sln') \
+ ' --config RelWithDebInfo' \ + ' --config RelWithDebInfo' \
+ ' --startup secondlife-bin' + ' --startup secondlife-bin'
print 'Running %r in %r' % (vstool_cmd, os.getcwd()) print 'Running %r in %r' % (vstool_cmd, getcwd())
self.run(vstool_cmd) self.run(vstool_cmd)
def run_build(self, opts, targets): def run_build(self, opts, targets):
cwd = os.getcwd() cwd = getcwd()
build_cmd = self.get_build_cmd() build_cmd = self.get_build_cmd()
for d in self.build_dirs(): for d in self.build_dirs():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment