diff options
-rwxr-xr-x | linden/indra/develop.py | 80 |
1 files changed, 35 insertions, 45 deletions
diff --git a/linden/indra/develop.py b/linden/indra/develop.py index ba22202..b2c600e 100755 --- a/linden/indra/develop.py +++ b/linden/indra/develop.py | |||
@@ -504,6 +504,41 @@ class WindowsSetup(PlatformSetup): | |||
504 | self._generator = None | 504 | self._generator = None |
505 | self.incredibuild = False | 505 | self.incredibuild = False |
506 | 506 | ||
507 | def find_visual_studio(self, gen=None): | ||
508 | if gen is None: | ||
509 | gen = self._generator | ||
510 | gen = gen.lower() | ||
511 | try: | ||
512 | import _winreg | ||
513 | key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VS' % | ||
514 | self.gens[gen]['ver']) | ||
515 | value_str = (r'EnvironmentDirectory') | ||
516 | reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE) | ||
517 | key = _winreg.OpenKey(reg, key_str) | ||
518 | value = _winreg.QueryValueEx(key, value_str)[0] | ||
519 | print 'Found: %s' % value | ||
520 | return value | ||
521 | except WindowsError, err: | ||
522 | return '' | ||
523 | |||
524 | def find_visual_studio_express(self, gen=None): | ||
525 | if gen is None: | ||
526 | gen = self._generator | ||
527 | gen = gen.lower() | ||
528 | try: | ||
529 | import _winreg | ||
530 | key_str = (r'SOFTWARE\Microsoft\VCExpress\%s\Setup\VC' % | ||
531 | self.gens[gen]['ver']) | ||
532 | value_str = (r'ProductDir') | ||
533 | reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE) | ||
534 | key = _winreg.OpenKey(reg, key_str) | ||
535 | value = _winreg.QueryValueEx(key, value_str)[0]+"IDE" | ||
536 | print 'Found: %s' % value | ||
537 | self.using_express = True | ||
538 | return value | ||
539 | except WindowsError, err: | ||
540 | return '' | ||
541 | |||
507 | def _get_generator(self): | 542 | def _get_generator(self): |
508 | if self._generator is None: | 543 | if self._generator is None: |
509 | for version in 'vc80 vc90 vc100 vc71'.split(): | 544 | for version in 'vc80 vc90 vc100 vc71'.split(): |
@@ -568,51 +603,6 @@ class WindowsSetup(PlatformSetup): | |||
568 | #'-DPACKAGE:BOOL=ON ' | 603 | #'-DPACKAGE:BOOL=ON ' |
569 | '%(opts)s "%(dir)s"' % args) | 604 | '%(opts)s "%(dir)s"' % args) |
570 | 605 | ||
571 | def find_visual_studio(self, gen=None): | ||
572 | if gen is None: | ||
573 | gen = self._generator | ||
574 | gen = gen.lower() | ||
575 | try: | ||
576 | import _winreg | ||
577 | key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VS' % | ||
578 | self.gens[gen]['ver']) | ||
579 | value_str = (r'EnvironmentDirectory') | ||
580 | print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' % | ||
581 | (key_str, value_str)) | ||
582 | print key_str | ||
583 | |||
584 | reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE) | ||
585 | key = _winreg.OpenKey(reg, key_str) | ||
586 | value = _winreg.QueryValueEx(key, value_str)[0] | ||
587 | print 'Found: %s' % value | ||
588 | return value | ||
589 | except WindowsError, err: | ||
590 | print >> sys.stderr, "Didn't find ", self.gens[gen]['gen'] | ||
591 | return '' | ||
592 | |||
593 | def find_visual_studio_express(self, gen=None): | ||
594 | if gen is None: | ||
595 | gen = self._generator | ||
596 | gen = gen.lower() | ||
597 | try: | ||
598 | import _winreg | ||
599 | key_str = (r'SOFTWARE\Microsoft\VCExpress\%s\Setup\VC' % | ||
600 | self.gens[gen]['ver']) | ||
601 | value_str = (r'ProductDir') | ||
602 | print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' % | ||
603 | (key_str, value_str)) | ||
604 | print key_str | ||
605 | |||
606 | reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE) | ||
607 | key = _winreg.OpenKey(reg, key_str) | ||
608 | value = _winreg.QueryValueEx(key, value_str)[0]+"IDE" | ||
609 | print 'Found: %s' % value | ||
610 | self.using_express = True | ||
611 | return value | ||
612 | except WindowsError, err: | ||
613 | print >> sys.stderr, "Didn't find ", self.gens[gen]['gen'] | ||
614 | return '' | ||
615 | |||
616 | def get_build_cmd(self): | 606 | def get_build_cmd(self): |
617 | if self.incredibuild: | 607 | if self.incredibuild: |
618 | config = self.build_type | 608 | config = self.build_type |