]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fix win32 installer
authorEvan Hunt <each@isc.org>
Thu, 20 Feb 2014 18:11:06 +0000 (10:11 -0800)
committerEvan Hunt <each@isc.org>
Thu, 20 Feb 2014 18:11:06 +0000 (10:11 -0800)
3754. [cleanup] win32: Installer now places files in the
Program Files area rather than system services.
[RT #35361]

CHANGES
bin/win32/BINDInstall/BINDInstall.rc
bin/win32/BINDInstall/BINDInstallDlg.cpp
win32utils/Configure
win32utils/build.txt
win32utils/legacy/makedefs.pl
win32utils/legacy/win32-build.txt
win32utils/readme1st.txt

diff --git a/CHANGES b/CHANGES
index f14e0cefc06c1f14e5104bb0a654c4c5ca863c42..d020f9b5a11d0cabc2a2b68c2c33df48be5a6aa4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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
index 8e947346890a4f23b6bb3fe9af21ebc226d363c4..be9550bbaaacc126556e849a8dd0149d23b13aa1 100644 (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 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"
index e783ddd501abe88fc3e4ff501bb5b785e4686e46..2736c5049bc7e2010841b065a8bfca286a751c6b 100644 (file)
 // #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;
                                }
                        }
index 5fda2a5d90ec76c2ba8de33b9957ba1da2ff2b83..d63609a14e4b835fd31525aa30139187bb00391c 100644 (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
index 15a17ee38075662f54b1259eebf7edbdb78d5e19..cf2b84d865db151baaf50bbc7f5d2929a51097df 100644 (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
index 9e3e9305fea1856838626ee5fdffc39dcc62d482..a0e314a3698271b21b750a51ec8a4efb7c63153a 100644 (file)
 # 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");
 @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;
 
 #
index e98fa6c2cd5c3c80c039818d9a7f813631d68132..8d4177b30aded5ed639726cc2914c1d845cda635 100644 (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
index e1051d34fb191c848c7c29587f8ae74dec444fff..2e3f1b058f4a77b7200a67d7bb20a49e27e2d1a2 100644 (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: