/[ascend]/trunk/scons/nsis.py
ViewVC logotype

Diff of /trunk/scons/nsis.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2555 by jpye, Wed Sep 5 00:36:01 2007 UTC revision 2556 by jpye, Fri Feb 3 00:17:16 2012 UTC
# Line 2  Line 2 
2  # Written by Mike Elkins, January 2004  # Written by Mike Elkins, January 2004
3  # Provided 'as-is', it works for me!  # Provided 'as-is', it works for me!
4    
   
5  """  """
6  This tool provides SCons support for the Nullsoft Scriptable Install System  This tool provides SCons support for the Nullsoft Scriptable Install System
7  a windows installer builder available at http://nsis.sourceforge.net/home  a windows installer builder available at http://nsis.sourceforge.net/home
# Line 19  In addition, if you set NSISDEFINES to a Line 18  In addition, if you set NSISDEFINES to a
18  to NSIS.  to NSIS.
19  """  """
20    
   
   
21  import SCons.Builder  import SCons.Builder
22  import SCons.Util  import SCons.Util
23  import SCons.Scanner  import SCons.Scanner
24  import os.path  import os.path, glob, platform
 import glob  
   
25    
26  def nsis_parse( sources, keyword, multiple ):  def nsis_parse( sources, keyword, multiple ):
27    """    """
# Line 179  def find_nsis(env): Line 174  def find_nsis(env):
174    Try and figure out if NSIS is installed on this machine, and if so,    Try and figure out if NSIS is installed on this machine, and if so,
175    where.    where.
176    """    """
177      if platform.architecture()[0] == "64bit":
178        regpath = 'SOFTWARE\\Wow6432Node\\NSIS'
179      else:
180        regpath = 'SOFTWARE\\NSIS'
181    if SCons.Util.can_read_reg:    if SCons.Util.can_read_reg:
182      # If we can read the registry, get the NSIS command from it      # If we can read the registry, get the NSIS command from it
183      try:      try:
184        k = SCons.Util.RegOpenKeyEx(SCons.Util.hkey_mod.HKEY_LOCAL_MACHINE,        k = SCons.Util.RegOpenKeyEx(
185                                    'SOFTWARE\\NSIS')          SCons.Util.hkey_mod.HKEY_LOCAL_MACHINE,regpath
186          )
187        val, tok = SCons.Util.RegQueryValueEx(k,None)        val, tok = SCons.Util.RegQueryValueEx(k,None)
188        ret = val + os.path.sep + 'makensis.exe'        ret = val + os.path.sep + 'makensis.exe'
189        if os.path.exists(ret):        if os.path.exists(ret):

Legend:
Removed from v.2555  
changed lines
  Added in v.2556

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22