[master] fix win32 installer

3754.	[cleanup]	win32: Installer now places files in the
			Program Files area rather than system services.
			[RT #35361]
This commit is contained in:
Evan Hunt 2014-02-20 10:11:06 -08:00
parent 80b37f909a
commit bce9696c7a
8 changed files with 88 additions and 44 deletions

View file

@ -1,3 +1,7 @@
3754. [cleanup] win32: Installer now places files in the
Program Files area rather than system services.
[RT #35361]
3753. [bug] allow-notify was ignoring keys. [RT #35425]
3752. [bug] Address potential REQUIRE failure if

View file

@ -139,8 +139,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,0
PRODUCTVERSION 2,0,0,0
FILEVERSION 3,0,0,0
PRODUCTVERSION 3,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -155,14 +155,14 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Internet Software Consortium"
VALUE "FileDescription", "ISC BIND Install Utility"
VALUE "FileVersion", "2.0.0"
VALUE "CompanyName", "Internet Systems Consortium"
VALUE "FileDescription", "ISC BIND 9 Install Utility"
VALUE "FileVersion", "3.0.0"
VALUE "InternalName", "BINDInstall"
VALUE "LegalCopyright", "Copyright © 2000"
VALUE "LegalCopyright", "Copyright © 2000,2014"
VALUE "OriginalFilename", "BINDInstall.EXE"
VALUE "ProductName", "ISC BIND"
VALUE "ProductVersion", "9.7.0"
VALUE "ProductName", "ISC BIND 9"
VALUE "ProductVersion", "9.10.0"
END
END
BLOCK "VarFileInfo"

View file

@ -41,9 +41,10 @@
// #define BINARIES_INSTALL
/*
* msvcrt.dll is the release c-runtime library for MSVC. msvcrtd.dll is the debug
* c-runtime library for MSVC. If you have debug binaries you want to have DEBUG_BINARIES
* defined. If you have release binaries you want to have RELEASE_BINARIES defined.
* msvcrt.dll is the release c-runtime library for MSVC. msvcrtd.dll
* is the debug c-runtime library for MSVC. If you have debug
* binaries you want to have DEBUG_BINARIES defined. If you have
* release binaries you want to have RELEASE_BINARIES defined.
* If you have both, then define them both.
* Of course, you need msvcrt[d].dll present to install it!
*/
@ -57,6 +58,7 @@
#include "BINDInstallDlg.h"
#include "DirBrowse.h"
#include <winsvc.h>
#include <shlobj.h>
#include <named/ntservice.h>
#include <isc/bind_registry.h>
#include <isc/ntgroups.h>
@ -200,7 +202,8 @@ const FileData installFiles[] =
CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/)
: CDialog(CBINDInstallDlg::IDD, pParent) {
char buf[MAX_PATH];
char winsys[MAX_PATH];
char progfiles[MAX_PATH];
//{{AFX_DATA_INIT(CBINDInstallDlg)
m_targetDir = _T("");
@ -214,13 +217,23 @@ CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/)
m_accountPassword = _T("");
m_accountName = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
// Note that LoadIcon does not require a subsequent
// DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
GetSystemDirectory(buf, MAX_PATH);
m_winSysDir = buf;
m_defaultDir = buf;
m_defaultDir += "\\dns";
GetSystemDirectory(winsys, MAX_PATH);
m_winSysDir = winsys;
#ifndef _WIN64
SHGetFolderPath(NULL, CSIDL_FLAG_CREATE|CSIDL_PROGRAM_FILESX86,
NULL, SHGFP_TYPE_CURRENT, progfiles);
#else
SHGetFolderPath(NULL, CSIDL_FLAG_CREATE|CSIDL_PROGRAM_FILES,
NULL, SHGFP_TYPE_CURRENT, progfiles);
#endif
m_defaultDir = progfiles;
m_defaultDir += "\\ISC BIND 9";
m_installed = FALSE;
m_accountExists = FALSE;
m_accountUsed = FALSE;
@ -523,7 +536,7 @@ void CBINDInstallDlg::OnInstall() {
if (!m_toolsOnly) {
if (m_accountExists == FALSE) {
success = CreateServiceAccount(m_accountName.GetBuffer(30),
m_accountPassword.GetBuffer(30));
m_accountPassword.GetBuffer(30));
if (success == FALSE) {
MsgBox(IDS_CREATEACCOUNT_FAILED);
return;
@ -676,9 +689,10 @@ void CBINDInstallDlg::CopyFiles() {
try {
/*
* Ignore Version checking. We need to make sure that all files get copied regardless
* of whether or not they are earlier or later versions since we cannot guarantee
* that we have either backward or forward compatibility between versions.
* Ignore Version checking. We need to make sure that all files get
* copied regardless of whether or not they are earlier or later
* versions since we cannot guarantee that we have either backward or
* forward compatibility between versions.
*/
bindFile.CopyFileNoVersion(origFile);
}
@ -972,7 +986,8 @@ void CBINDInstallDlg::UnregisterService(BOOL uninstall) {
DWORD err = GetLastError();
if (err != ERROR_SERVICE_MARKED_FOR_DELETE &&
err != ERROR_SERVICE_DOES_NOT_EXIST) {
MsgBox(IDS_ERR_REMOVE_SERVICE, GetErrMessage());
MsgBox(IDS_ERR_REMOVE_SERVICE,
GetErrMessage());
break;
}
}

View file

@ -2018,7 +2018,8 @@ if ($use_python ne "no") {
$configcond{"PYTHON"} = 1;
$configdefd{"USE_PYTHON"} = "USE_PYTHON";
$configvar{"PYTHON"} = "$python_command";
$configvar{"prefix"} = "C:\\Windows\\system32\\dns";
# Only a default!
$configvar{"prefix"} = "C:\\Program Files\Isc Bind 9";
}
# with-vcredist

View file

@ -186,11 +186,11 @@ Step 7: Building BIND
Step 8: Install
Installation is accomplished by running the BINDInstall program. All
DLL's are copied to the system32 area and all applications (including
BINDInstall which may be necessary for uninstalling BIND 9) to the
dns/bin directory. If BIND 8 has previously been installed on the system
it must be uninstalled first by running it's own BINDInstall program.
The BIND 9 installer does not yet do this.
DLL's are copied to the Program Files area and all applications
(including BINDInstall which may be necessary for uninstalling BIND
9) to the bin directory. If BIND 8 has previously been installed on
the system it must be uninstalled first by running it's own
BINDInstall program. The BIND 9 installer does not yet do this.
Note: BINDInstall.exe requires the MFC (Microsoft Foundation Class).
This is only distributed with non-free (i.e., not "Express") versions of

View file

@ -30,10 +30,10 @@
# Search String: ^(([_a-z0-9])*( ))*prefix_[_a-z0-9]+_[a-z0-9]+( )*\(
# List of directories
@prefixlist = ("isc", "isccfg","dns", "isccc", "libres");
@prefixlist = ("isccc");
@iscdirlist = ("isc/include/isc","isc/win32/include/isc");
@iscprefixlist = ("isc", "isc", "cfg");
@prefixlist = ("isc", "isccfg", "dns", "isccc", "bind9", "lwres", "irs");
@iscdirlist = ("isc/include/isc","isc/win32/include/isc","isc/include/pk11",
"isc/include/pkcs11","isc/win32/include/pkcs11");
@iscprefixlist = ("isc", "pk11", "pkcs");
@isccfgdirlist = ("isccfg/include/isccfg");
@isccfgprefixlist = ("cfg");
@ -41,12 +41,18 @@
@iscccdirlist = ("isccc/include/isccc");
@iscccprefixlist = ("isccc");
@dnsdirlist = ("dns/include/dns","dns/sec/dst/include/dst");
@dnsdirlist = ("dns/include/dns","dns/include/dst");
@dnsprefixlist = ("dns", "dst");
@lwresdirlist = ("lwres/include/lwres");
@lwresdirlist = ("lwres/include/lwres","lwres/win32/include/lwres");
@lwresprefixlist = ("lwres");
@bind9dirlist = ("bind9/include/bind9");
@bind9prefixlist = ("bind9");
@irsdirlist = ("irs/include/irs","irs/win32/include/irs");
@irsprefixlist = ("irs");
# Run the changes for each directory in the directory list
$ind = 0;
@ -89,6 +95,22 @@ foreach $dir (@lwresdirlist) {
}
close OUTDEFFILE;
$ind = 0;
createoutfile($bind9prefixlist[0]);
foreach $dir (@bind9dirlist) {
createdeffile($dir, $bind9prefixlist[$ind]);
$ind++;
}
close OUTDEFFILE;
$ind = 0;
createoutfile($irsprefixlist[0]);
foreach $dir (@irsdirlist) {
createdeffile($dir, $irsprefixlist[$ind]);
$ind++;
}
close OUTDEFFILE;
exit;
#

View file

@ -91,12 +91,12 @@ After the build has completed, run the BuildPost.bat file:
...which does post-build processing.
Installation is accomplished by running the BINDInstall program. All DLL's
are copied to the system32 area and all applications (including BINDInstall
which may be necessary for uninstalling BIND 9) to the dns/bin directory.
If BIND 8 has previously been installed on the system it must be uninstalled
first by running it's own BINDInstall program. The BIND 9 installer does
not yet do this.
Installation is accomplished by running the BINDInstall program. All
DLL's are copied to the Program Files area and all applications
(including BINDInstall which may be necessary for uninstalling BIND 9)
to the bin directory. If BIND 8 has previously been installed on the
system it must be uninstalled first by running it's own BINDInstall
program. The BIND 9 installer does not yet do this.
All bugs found, whether in the process of building the application or
running BIND or the tools should be reported to the bind9 bugs email

View file

@ -31,7 +31,8 @@ or for master zones supporting dynamic updates. The account will
also need read access to the named.conf and any other file that it
needs to read.
"NT AUTHORITY\LocalService" is also an acceptable account.
"NT AUTHORITY\LocalService" is also an acceptable account
(and the only acceptable on some recent versions of Windows).
This account is built into Windows and no password is required.
Appropriate file permissions will also need to be set for "NT
AUTHORITY\LocalService" similar to those that would have been
@ -39,13 +40,14 @@ required for the "named" account.
It is important that on Windows the directory directive is used in
the options section to tell BIND where to find the files used in
named.conf (default %WINDOWS%\system32\dns\etc\named.conf). For
named.conf (default %ProgramFiles%\ISC BIND 9\etc\named.conf). For
example:
options {
directory "C:\WINDOWS\system32\dns\etc";
directory "C:\Program Files (x86)\ISC BIND 9\etc";
};
for a 32 bit BIND on a 64 bit US Domestic indows system.
Messages are logged to the Application log in the EventViewer.
CONTROLLING BIND:
@ -132,7 +134,7 @@ information. However, if you do create a resolv.conf file as follows,
the tools will use it in preference to the registry name server
entries.
Place resolv.conf the System32\Drivers\etc directory. It must
Place resolv.conf the "ISC BIND 9"\etc directory. It must
contain a list of recursive server addresses. The format of this
file is: