2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 23:25:38 +00:00

3681. [port] Update the Windows build system to support feature

selection and WIN64 builds.  This is a work in
                        progress. [RT #34160]
This commit is contained in:
Mark Andrews
2013-12-04 12:47:23 +11:00
parent 2c2be89824
commit c3c8823fed
448 changed files with 28872 additions and 4749 deletions

View File

@@ -22,6 +22,8 @@ import pprint
import os
def shellquote(s):
if os.name == 'nt':
return s
return "'" + s.replace("'", "'\\''") + "'"
############################################################################
@@ -255,6 +257,11 @@ def checkdlv(zone, lookaside, masterfile = None):
############################################################################
def parse_args():
global args
bindir = 'bin'
if os.name != 'nt':
sbindir = 'sbin'
else:
sbindir = 'bin'
parser = argparse.ArgumentParser(description='checkds: checks DS coverage')
parser.add_argument('zone', type=str, help='zone to check')
@@ -263,11 +270,12 @@ def parse_args():
parser.add_argument('-l', '--lookaside', dest='lookaside', type=str,
help='DLV lookaside zone')
parser.add_argument('-d', '--dig', dest='dig',
default='@prefix@/bin/dig', type=str,
help='path to \'dig\'')
default=os.path.join('@prefix@', bindir, 'dig'),
type=str, help='path to \'dig\'')
parser.add_argument('-D', '--dsfromkey', dest='dsfromkey',
default='@prefix@/sbin/dnssec-dsfromkey', type=str,
help='path to \'dig\'')
default=os.path.join('@prefix@', sbindir,
'dnssec-dsfromkey'),
type=str, help='path to \'dig\'')
parser.add_argument('-v', '--version', action='version', version='9.9.1')
args = parser.parse_args()

View File

@@ -620,9 +620,11 @@ def set_path(command, default=None):
def parse_args():
"""Read command line arguments, set global 'args' structure"""
global args
bindir = 'bin';
compilezone = set_path('named-compilezone',
'@prefix@/sbin/named-compilezone')
os.path.join('@prefix@', bindir,
'named-compilezone'))
parser = argparse.ArgumentParser(description=prog + ': checks future ' +
'DNSKEY coverage for a zone')

42
bin/python/win32.py Normal file
View File

@@ -0,0 +1,42 @@
#!@PYTHON@
############################################################################
# Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
############################################################################
# $Id$
# ntpath rewrote in Python
import win32con
import win32api
BIND_SUBKEY = "Software\\ISC\\BIND"
def base():
hKey = None
keyFound = True
try:
hKey = win32api.RegOpenKeyEx(win32con.HKEY_LOCAL_MACHINE, BIND_SUBKEY)
except:
keyFound = False
if keyFound:
try:
(namedBase, _) = win32api.RegQueryValueEx(hKey, "InstallDir")
except:
keyFound = False
win32api.RegCloseKey(hKey)
if keyFound:
return namedBase
return win32api.GetSystemDirectory()