OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 import sys |
| 7 import os |
| 8 |
| 9 def main(): |
| 10 if sys.platform != 'win32': |
| 11 sys.stdout.write('0') |
| 12 return 0 |
| 13 |
| 14 import _winreg |
| 15 |
| 16 try: |
| 17 val = _winreg.QueryValue(_winreg.HKEY_CURRENT_USER, |
| 18 'Software\\Chromium\\supalink_installed') |
| 19 if os.path.exists(val): |
| 20 # Apparently gyp thinks this means there was an error? |
| 21 #sys.stderr.write('Supalink enabled.\n') |
| 22 sys.stdout.write('1') |
| 23 return 0 |
| 24 except WindowsError: |
| 25 pass |
| 26 |
| 27 sys.stdout.write('0') |
| 28 return 0 |
| 29 |
| 30 |
| 31 if __name__ == '__main__': |
| 32 sys.exit(main()) |
OLD | NEW |