From 1c51acb3f40a8bdfb1731245d046b4c41fe00341 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Wed, 22 Jul 2009 18:55:18 +0000 Subject: [PATCH] jumbo pullup for kfw-3.2.3-alpha1 This is a jumbo pullup of multiple KfW-related changes. The are primarily build system fixes, including changes to enable building on amd64. Included are some changes from branches/kpkoch-ccapi that have not yet been merged to the trunk. Relevant RT ticket numbers include: 5817 5819 6007 ticket: 6535 version_fixed: 1.6.4 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@22445 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/win-pre.in | 8 +- src/patchlevel.h | 4 +- src/windows/Makefile.in | 18 +- src/windows/build/BKWconfig.xml | 75 +- src/windows/build/bkw-automation.html | 665 +++++++++--------- src/windows/build/bkw.pl | 203 ++++-- src/windows/build/copyfiles.pl | 28 +- src/windows/build/copyfiles.xml | 419 ++++++----- src/windows/build/corebinaryfiles.xml | 152 ++-- src/windows/build/sdkfiles.xml | 18 +- src/windows/identity/Makefile | 14 +- src/windows/identity/nidmgrdll/Makefile | 2 +- src/windows/identity/nidmgrdll/Makefile.w2k | 2 +- src/windows/identity/plugins/krb5/Makefile | 6 +- src/windows/identity/ui/Makefile | 2 +- src/windows/identity/ui/Makefile.w2k | 2 +- src/windows/installer/nsis/kfw-fixed.nsi | 20 +- .../installer/nsis/nsi-includes-tagged.nsi | 2 +- .../installer/nsis/site-local-tagged.nsi | 8 +- src/windows/installer/wix/custom/custom.cpp | 2 +- src/windows/installer/wix/features.wxi | 12 +- src/windows/installer/wix/files.wxi | 109 ++- src/windows/installer/wix/platform.wxi | 197 +++--- .../installer/wix/site-local-tagged.wxi | 8 +- src/windows/winlevel.h | 2 +- 25 files changed, 1041 insertions(+), 937 deletions(-) diff --git a/src/config/win-pre.in b/src/config/win-pre.in index 7cadbe903..d732e954a 100644 --- a/src/config/win-pre.in +++ b/src/config/win-pre.in @@ -45,7 +45,7 @@ DIRNUL=\nul !endif # NOTE: ^ is an escape char for NMAKE. -!ifdef NODEBUG +!if defined(NODEBUG) && "$(NODEBUG)" == "1" OUTPRE_DBG=rel !else OUTPRE_DBG=dbg @@ -134,7 +134,7 @@ CPPFLAGS=-I$(SRCTOP)\include -I$(SRCTOP)\include\krb5 $(DNSFLAGS) -DKRB5_PRIVATE CCOPTS=-nologo /W3 $(PDB_OPTS) $(DLL_FILE_DEF) LOPTS=-nologo -incremental:no -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if (("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" )) && (!defined(NO_BUFFEROVERFLOWU) || "$(NO_BUFFEROVERFLOWU)" == "0") CCLINKOPTION=/link bufferoverflowu.lib SCLIB=bufferoverflowu.lib DEBUGOPT=/Zi @@ -162,8 +162,8 @@ _VC_MANIFEST_EMBED_DLL = if exist $*.dll.manifest mt.exe -manifest $*.dll.manife # CCOPTS was for DLL compiles # CCOPTS2 was for non-DLL compiles (EXEs, for example) # -!ifdef NODEBUG -!ifdef DEBUG_SYMBOL +!if defined(NODEBUG) && "$(NODEBUG)" == "1" +!if defined(DEBUG_SYMBOL) && "$(DEBUG_SYMBOL)" == "1" CCOPTS=$(DEBUGOPT) $(CCOPTS) LOPTS=$(LOPTS) -debug !endif diff --git a/src/patchlevel.h b/src/patchlevel.h index 0310c81e0..f8c65a27b 100644 --- a/src/patchlevel.h +++ b/src/patchlevel.h @@ -53,6 +53,6 @@ #define KRB5_MAJOR_RELEASE 1 #define KRB5_MINOR_RELEASE 6 #define KRB5_PATCHLEVEL 4 -#define KRB5_RELTAIL "beta1-postrelease" +#define KRB5_RELTAIL "beta1-kfw-3.2.3-alpha1" /* #undef KRB5_RELDATE */ -#define KRB5_RELTAG "branches/krb5-1-6" +#define KRB5_RELTAG "tags/kfw_3-2-3-alpha1" diff --git a/src/windows/Makefile.in b/src/windows/Makefile.in index 3ba9da6e4..3adde3c9e 100644 --- a/src/windows/Makefile.in +++ b/src/windows/Makefile.in @@ -4,7 +4,7 @@ NO_OUTPRE=1 # # Makefile that recurses into cns subdirectory. # -all-windows:: +all-windows:: ntsecapitest @echo Making in windows\lib cd lib $(MAKE) -$(MFLAGS) @@ -33,7 +33,7 @@ all-windows:: !endif cd .. -clean-windows:: +clean-windows:: clean-ntsecapitest @echo Making clean in windows\lib cd lib $(MAKE) -$(MFLAGS) clean @@ -61,3 +61,17 @@ clean-windows:: $(MAKE) -$(MFLAGS) clean !endif cd .. + +# If ntsecapi.h contains the string that indicates it came from the Vista SDK, +# then ntsecapitest.i will be left behind. If the string is not present, +# ntsecapitest.i will be deleted. +ntsecapitest:: clean-ntsecapitest ntsecapitest.i + copy ntsecapitest.i ntsecapitest.copy + ntsecapitest.pl + +clean-ntsecapitest:: + @echo "Cleaning ntsecapitest.i" + $(RM) ntsecapitest.i + +{}.c{}.i: + @$(C_RULE) -P diff --git a/src/windows/build/BKWconfig.xml b/src/windows/build/BKWconfig.xml index 92fdc6ecd..e361aeb74 100644 --- a/src/windows/build/BKWconfig.xml +++ b/src/windows/build/BKWconfig.xml @@ -29,21 +29,23 @@ - + - + + + - - + + - - - + + + @@ -61,9 +63,9 @@ - - - + + + @@ -87,7 +89,7 @@ @@ -96,13 +98,15 @@ Paths that include (or ) will only have the tag substituted and be copied when doing a debug (or release) build. Examples: Will always be copied, from a build-dependent directory: - + Will only be copied in debug build: - + Will always be copied, from a build-independent directory: --> + + @@ -127,7 +131,14 @@ - + + + + + + + + @@ -139,6 +150,8 @@ + + @@ -146,27 +159,45 @@ - + - + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - \ No newline at end of file + diff --git a/src/windows/build/bkw-automation.html b/src/windows/build/bkw-automation.html index 5e21ba570..114e88059 100644 --- a/src/windows/build/bkw-automation.html +++ b/src/windows/build/bkw-automation.html @@ -1,356 +1,353 @@ - - lore-bkw-automation - Confluence - - - - - - - -
-
The + + + + lore-bkw-automation - Confluence + + + + + + + + +
+
The Kerberos for Windows (KfW) build is automated.  A script will fetch the sources from a repository and then build, sign and package all the KfW distribution components. -
-
This +
+
This description consists of -
- -

Setting Up the Build Environment

-

KfW is built on a Windows PC, in the default Windows shell (cmd.exe). These - components must be installed:

-
+ +

Setting Up the Build Environment

+

KfW is built on a Windows PC, in the default Windows shell (cmd.exe). These + components must be installed:

+ -

Environment variables

-

+
+
+ The cygwin awk is a link and the MS shell doesn't deal well with that.  Copy c:\tools\cygwin\bin\gawk to c:\tools\cygwin\bin\awk. +

  • + Wix
  • +
  • + + NSIS
  • +

    Environment variables

    +

    All the components above must be in PATH. Installing ActivePerl puts perl in - the PATH. Doxygen, Cygwin, hhc, wix and nsis need to be added.

    -

    perl must be installed so that .pl files are automatically executed with perl. - The ActivePerl installation will do this for you.

    -

    In the INCLUDE path, the Microsoft Platform SDK must come before the Microsoft - Visual C++ include files. Using a Platform SDK Build Environment window will - set this up the right way. 

    -

    If you make your path modifications permanent via Control Panel / System / + the PATH. Doxygen, Cygwin, hhc, wix and nsis need to be added.

    +

    perl must be installed so that .pl files are automatically executed with perl. + The ActivePerl installation will do this for you.

    +

    In the INCLUDE path, the Microsoft Platform SDK must come before the Microsoft + Visual C++ include files. In the PATH path, the Platform SDK bin area must come before the Visual Studio VC\bin area. Using a Platform SDK Build Environment window will + set this up the right way.  Make sure to use a Platform SDK Windows XP Build Environment shell.

    +

    If you make your path modifications permanent via Control Panel / System / Advanced / Environment Variables:  If you use a Platform SDK Build Environment window, it appears that you need to put your PATH components in the - System PATH, not the User PATH.

    -

    Visual Studio installs hhc in C:\Program Files\HTML Help Workshop.

    -

    nmake must be in PATH. If you use a Platform SDK build environment window, it is - already done for you.

    -

    Running the Script

    -

    - The build is a perl script controlled by command line switches and an XML + System PATH, not the User PATH.

    +

    Visual Studio installs hhc in C:\Program Files\HTML Help Workshop.

    +

    nmake must be in PATH. If you use a Platform SDK build environment window, it is + already done for you.

    +

    Running the Script

    +

    The build is a perl script controlled by command line switches and an XML configuration file. The config file is required. Settings in the config file - can be overridden by optional command line switches. 

    -

    There are options for controlling most steps of the build process.  The - steps are

    -
      -
    • - Verifying the environment -
    • - Fetching the sources from repositories -
    • - Building the sources -
    • - Setting up the packaging environment -
    • - Building the installers -
    • - Building the rest of the components -
    • -
    -

    The usage message shows the switches that control these steps:

    -

    C:\Projects\KfW>perl bkw.pl /?
    - Usage: bkw.pl [options] NMAKE-options

    -

      Options are case insensitive. -

    -

      Options:  -
    -
      /help /?          - usage information (what you now see). -
    -   /config /f path   Path to config file. Default is - bkwconfig.xml. -
    -   /src /s dir       Source directory to use. - Should contain -
    -     -                 - pismere/athena. If cvstag or svntag is null, -
    -       -               - the directory should be prepopulated. -
    -   /out /o dir       Directory to be created - where build results will go -
    -
      /repository checkout | co \ What repository action to take. -
    -      /r       - update   | up \ Options are to checkout, update, export
    -               export   - | ex \ or take no action [skip]. 
    -               - skip
    -   /username /u name username used to access svn if checking out. -
    -   /cvstag /c tag    use -r <tag> - in cvs -command
      /svnbranch /b tag use -/branches/<tag> instead of /trunk.
      /svntag /t tag    use -/tags/<tag> instead of /trunk.
      /debug -/d         Do debug make instead of -release make.
      -/[no]make         -Control the make -step.
      -/clean            Build -clean target.
      -/[no]package      Control the packaging step.
      -/[no]sign         Control -signing -of executable files.
      /verbose -/v       Debug mode - verbose output.
      /logfile /l path  Where to write output. -Default is bkw.pl.log.
      - /nolog            Don't - save output.
    -

    -

      Other: -
    + can be overridden by optional command line switches.

    +

    There are options for controlling most steps of the build process.  The + steps are

    +
      +
    • Verifying the environment
    • +
    • Fetching the sources from repositories
    • +
    • Building the sources
    • +
    • Setting up the packaging environment
    • +
    • Building the installers
    • +
    • Building the rest of the components
    • +
    +

    The usage message shows the switches that control these steps:

    +

    C:\Projects\KfW>perl bkw.pl /?
    + Usage: bkw.pl [options] NMAKE-options

    +

      Options are case insensitive.

    +

      Options: 
    +   /help /?          + usage information (what you now see).
    +   /config /f path   Path to config file. Default is + bkwconfig.xml.
    +   /src /s dir       Source directory to use. + Should contain
    +     +                 + pismere/athena. If cvstag or svntag is null,
    +       +               + the directory should be prepopulated.
    +   /out /o dir       Directory to be created + where build results will go
    +   /cpu /p cputype   CPU type [i386 | AMD64]

    +
    +   /repository checkout | co \ What repository action to take.
    +      /r       + update   | up \ Options are to checkout, update, export
    +               export   + | ex \ or take no action [skip]. 
    +               + skip
    +   /username /u name username used to access svn if checking out. +
    +  /cvstag /c tag    use -r <tag> in cvs command
    +  /svnbranch /b tag use /branches/<tag> instead of /trunk.
    +  /svntag /t tag    use /tags/<tag> instead of /trunk.
    +  /debug /d         Do debug make instead of +release make.
    +  /[no]make         +Control the make step.
    +  /clean            Build +clean target.
    +  /[no]package      Control the packaging step.
    +  /[no]sign         Control signing +of executable files.
    +  /verbose /v       Debug mode - verbose output. 
    +   /vverbose         Debug mode - very verbose output. 
    +  /logfile /l path  Where to write output. Default is bkw.pl.log.
    +  /nolog            Don't save output. +
    +

    +

      Other: +
        NMAKE-options any options you want to pass to NMAKE, which can be: -
    +
                      - (note: /nologo is always used)
    -                   NODEBUG=1

    -

    NMAKE-options any options you want to pass to NMAKE, which can be:
    - (note: /nologo is always used)
    - [ nmake options follow ]

    -


    - Notes on the script steps:

    -

    Verifying the environment:  -
    + (note: /nologo is always used)
    +                   NODEBUG=1

    +

    NMAKE-options any options you want to pass to NMAKE, which can be:
    + (note: /nologo is always used)
    + [ nmake options follow ]

    +


    Notes on the script steps:

    +

    Verifying the environment:  +
    The script tests for each program that it needs and warns if the program isn't - found.

    -

    Fetching sources from repositories:  -
    - If building from a source distribution kit, this section does not apply.

    -

    CVSROOT and SVNURL must be specified in the configuration file.

    -

    A source zip file can only be produced if checking out fresh sources from a - repository. 

    -

    If checking out, the entire pismere directory will be deleted.  A warning - message requires that you confirm this action.

    -

    Building the sources:
    + found.

    +

    Fetching sources from repositories:  +
    + If building from a source distribution kit, this section does not apply.

    +

    CVSROOT and SVNURL must be specified in the configuration file.

    +

    A source zip file can only be produced if checking out fresh sources from a + repository. 

    +

    If checking out, the entire pismere directory will be deleted.  A warning + message requires that you confirm this action.

    +

    Building the sources:
    /DEBUG controls whether a debug or release build is done.  /CLEAN will - build the CLEAN target.

    -

    Setting up the packaging environment :
    -
    The pre-package steps gathers up build results and puts them in a - staging area.  -

    -

    If /SIGN is specified, .exes, .dlls - and .cpls are signed.  The signing command - template is in the configuration file.

    -

    Building the installers:
    - The staging area is copied into a fresh area for - each of the installers.  The installer results are copied back to the - staging area.

    -

    Building the rest of the components:
    - Zip files are built in temporary areas and copied to outdir.  - The installers and assorted files are copied from staging - to outdir.  If /SIGN is specified, the - installers will be signed.

    -

     

    -

    Script Internal Details

    -

    Copy Lists

    -

    CopyLists are used in many places.  For example, files to be put into + build the CLEAN target.

    +

    Setting up the packaging environment :
    +
    The pre-package steps gathers up build results and puts them in a + staging area.  +

    +

    If /SIGN is specified, .exes, .dlls + and .cpls are signed.  The signing command + template is in the configuration file.

    +

    Building the installers:
    + The staging area is copied into a fresh area for + each of the installers.  The installer results are copied back to the + staging area.

    +

    Building the rest of the components:
    + Zip files are built in temporary areas and copied to outdir.  + The installers and assorted files are copied from staging + to outdir.  If /SIGN is specified, the + installers will be signed.

    +

     

    +

    Script Internal Details

    +

    Copy Lists

    +

    CopyLists are used in many places.  For example, files to be put into a .zip are copied to a fresh directory which is then zipped up.  There is - an optional Configuration section and a required Files section. 

    -

    The configuration section defines the roots of the from and to paths and can + an optional Configuration section and a required Files section. 

    +

    The configuration section defines the roots of the from and to paths and can optionally define path substitutions.  -

    -

    The to and from paths are forced by the script rather than being set in the - config file.  Comments in the copyfile xml indicate this.

    -

    Lengthy copy lists can be kept in separate files and included with the Include - directive.  Example:

    -

    <Include path="sdkfiles.xml" />

    -

    Substitution tags

    -

    Filenames in copylists can contain variable 'tags' that are replaced before the +

    +

    The to and from paths are forced by the script rather than being set in the + config file.  Comments in the copyfile xml indicate this.

    +

    Lengthy copy lists can be kept in separate files and included with the Include + directive.  Example:

    +

    <Include path="sdkfiles.xml" />

    +

    Substitution tags

    +

    Filenames in copylists can contain variable 'tags' that are replaced before the file is copied.  Some configuration files contain substitution tags which - customize the configuration.  The supported tags are

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    %VERSION_MAJOR%KfW Version from pismere/athena/include/kerberos.ver.
    %VERSION_MINOR%KfW Version from pismere/athena/include/kerberos.ver.
    %VERSION_PATCH%KfW Version from pismere/athena/include/kerberos.ver.
    %filestem%Defined as kfw-%VERSION_MAJOR%-%VERSION_MINOR%-%VERSION_PATCH%.
    %debug%'dbg.'  Only substituted during a debug build. 
    %release%'rel.'  Only substituted during a release build.  -
    %bldtype%Always substituted, to 'dbg' or 'rel,' depending on the type of build.
    %-DEBUG%'-DEBUG' during a debug build; otherwise empty.
    %BUILDDIR%SRCDIR\pismere.  Used in site-local installer configuration files.
    %TARGETDIR%SRCDIR\pismere\staging.  Used in site-local installer configuration files.
    %CONFIGDIR-WIX%SRCDIR\pismere\staging\sample.  Used in site-local installer configuration - files.
    %CONFIGDIR-NSI%SRCDIR\pismere\staging.  Used in site-local installer configuration files.
    -

    -

    The overall build configuration specifies a debug or release build.  Debug + customize the configuration.  The supported tags are

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    %VERSION_MAJOR%KfW Version from pismere/athena/include/kerberos.ver.
    %VERSION_MINOR%KfW Version from pismere/athena/include/kerberos.ver.
    %VERSION_PATCH%KfW Version from pismere/athena/include/kerberos.ver.
    %filestem%Defined as kfw-%VERSION_MAJOR%-%VERSION_MINOR%-%VERSION_PATCH%.
    %debug%'dbg.'  Only substituted during a debug build. 
    %release%'rel.'  Only substituted during a release build.  +
    %bldtype%Always substituted, to 'dbg' or 'rel,' depending on the type of build.
    %cpu%Always substituted, to the value of the /cpu argument, or the value of the CPU environment variable, if /cpu isn't specified, or to 'i386' if the CPU environment variable isn't specified.
    + %WL% + Word length.  If CPU is i386, '32' will be substituted; otherwise '64' will + be substituted.
    %-DEBUG%'-DEBUG' during a debug build; otherwise empty.
    %BUILDDIR%SRCDIR\pismere.  Used in site-local installer configuration files.
    %TARGETDIR%SRCDIR\pismere\staging.  Used in site-local installer configuration files.
    %CONFIGDIR-WIX%SRCDIR\pismere\staging\sample.  Used in site-local installer configuration + files.
    %CONFIGDIR-NSI%SRCDIR\pismere\staging.  Used in site-local installer configuration files.
    +

    The overall build configuration specifies a debug or release build.  Debug and release results are put in different places.  Files whose location depend on the build type can use %bldtype% in their names.  The script will substitute %bldtype% with either dbg or rel, depending on the build - type. 

    -
    -
    -

    Example

    -
    -

    Here is a copylist entry.  Each segment of the file's path that comes - from a different place is in a different color.

    -

    Release build.  Config file: -

    -

    - - - - - - - - - - - - - -
    <BKW_Config>
    <Config>
    <src value ="C:\bkw" /> -
    -

    -

    Copylist comments:

    -

    <!-- File from paths are relative to - \pismere\athena -->
    <!-- File to paths are relative to \ - pismere\staging - -->
    -

    -

    When the script processes this copylist, it will force the from and to paths as - indicated.

    -

    This line -

    -

    <File name="comerr32.dll" from="..\target\bin\i386\%bldtype%\" - to="\bin\i386" />

    -

    will result in C:\bkw\pismere\athena\..\target\bin\i386\rel\comerr32.dll

    -

    being copied to C:\bkw\pismere\staging\bin\i386\comerr32.dll.

    -

    Other possible attributes in a copylist entry:

    -
      -
    • - notrequired -
    • - newname="filename" -
    • -
    -

    By default, copylist entries are required and the script will die if they aren't - present. To ignore missing files, add notrequired.

    -

    To rename the file, set the newname attribute.

    -

    Remaining Work / Bug List

    -

    Implement RETAIL, OFFICIAL, PRERELEASE, PRIVATE, SPECIAL.

    -

    Figure out what MIT_ONLY, BUILD_KFW, DEBUG_SYMBOL should be.

    -

    TARGET, APPVER.

    -

    NODEBUG=1.  Set if release build.

    -

    Troubleshooting -

    -

    Can't clean directory; can't delete file or directory
    - Make sure a file in the named directory isn't open in another application.

    -

    Can't find kerberos.ver
    - You skipped the repository step and are trying to build in an empty directory.

    -
    - - + type.

    +
    +
    +

    Example

    +

    Here is a copylist entry.  Each segment of the file's path that comes + from a different place is in a different color.

    +

    Release build.  Config file:

    + + + + + + + + + + + + + +
    <BKW_Config>
    <Config>
    <src value ="C:\bkw" /> +
    +

    Copylist comments:

    +

    <!-- File from paths are relative to + <src>\pismere\athena -->
    <!-- File to paths are relative to <src>\ + pismere\staging + -->

    +

    When the script processes this copylist, it will force the from and to paths as + indicated.

    +

    This line

    +

    <File name="comerr32.dll" from="..\target\bin\%cpu%\%bldtype%\" + to="\bin\%cpu%" />

    +

    will result in C:\bkw\pismere\athena\..\target\bin\i386\rel\comerr32.dll

    +

    being copied to C:\bkw\pismere\staging\bin\i386\comerr32.dll.

    +

    Other possible attributes in a copylist entry:

    +
      +
    • notrequired
    • +
    • newname="filename"
    • +
    +

    By default, copylist entries are required and the script will die if they aren't + present. To ignore missing files, add notrequired.

    +

    To rename the file, set the newname attribute.

    + +

    64 bit builds

    +

    + To build a 64 bit version, several things must be done:

    +
      +
    • Set the CPU environment variable to AMD64.
    • +
    • run Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat with the argument 'AMD64.' 
    • +
    • Run bkw.pl with /cpu AMD64 /components "base AMD64"
    • +
    +

    If you get errors in the CCAPI part of the build that symbols have been multiply declared, it means you changed the build target between i386 and AMD64 without doing + a bkw.pl clean in between.  +

    + +

    Remaining Work / Bug List

    +

    Implement RETAIL, OFFICIAL, PRERELEASE, PRIVATE, SPECIAL.

    +

    Figure out what MIT_ONLY, BUILD_KFW, DEBUG_SYMBOL should be.

    +

    TARGET, APPVER.

    +

    NODEBUG=1.  Set if release build.

    +

    Troubleshooting +

    +

    Can't clean directory; can't delete file or directory
    + Make sure a file in the named directory isn't open in another application.

    +

    Can't find kerberos.ver
    + You skipped the repository step and are trying to build in an empty directory.

    +

    Directories don't exist or can't be created
    +
    This can be a symptom of the Platform SDK bin area not being before the Visual Studio bin areas, such that the version of nmake running is version 8.x.
    + [This explanation courtesy of Jeff Altman]:
    + nmake V8 appears to favor executables over shell commands. As a result, using 'mkdir' instead of 'md' in Makefiles, as a command for creating directory trees, fails when the Cygwin mkdir.exe is present in the PATH. Changing the

    +

    MKDIR=mkdir
    + RMDIR=rmdir

    +

    macros in the Makefiles to

    +

    MKDIR=md
    + RMDIR=rd

    +

    should make the shell versions execute in all cases.

    +

    CCAPI test directory doesn't build after changing CPU type
    + Make clean might not be cleaning everything out.  Carefully remove any source + files that are copied from lib or server and cached in the test directory.

    +
    + + diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index ee93203bf..1f81c7d3b 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -22,6 +22,11 @@ my $OPT = {foo => 'bar'}; my $MAKE = 'NMAKE'; our $config; +# List of programs which must be in PATH: +my @required_list = ('sed', 'awk', 'which', 'cat', 'rm', 'doxygen', + 'hhc', 'candle', 'light', 'makensis', 'nmake', 'filever'); +my @required_for_repository_access = ('cvs', 'svn', 'plink'); + sub get_info { my $cmd = shift || die; my $which = $^X.' which.pl'; @@ -59,6 +64,8 @@ Usage: $0 [options] NMAKE-options /[no]package Control the packaging step. /[no]sign Control signing of executable files. /verbose /v Debug mode - verbose output. + /vverbose Debug mode - even more output. + /cpu cpu Type of cpu - i386 or amd64. /logfile /l path Where to write output. Default is bkw.pl.log. /nolog Don't save output. Other: @@ -112,7 +119,8 @@ sub main { while (($sw, $val) = each %$odr) { local $arg = $sw; if (exists $val->{abbr}) {$arg .= "|$val->{abbr}";} - if (exists $val->{value}) { ## Can't do both negations and string values. + if (exists $val->{value} || + exists $val->{options}) { ## Can't do both negations and string values. $arg .= ":s"; } else { @@ -130,32 +138,6 @@ sub main { delete $OPT->{foo}; -##++ Validate required conditions: - - # List of programs which must be in PATH: - my @required_list = ('sed', 'awk', 'which', 'cat', 'rm', 'cvs', 'svn', 'doxygen', - 'hhc', 'candle', 'light', 'makensis', 'nmake', 'plink', 'filever'); - my $requirements_met = 1; - my $first_missing = 0; - my $error_list = ""; - foreach my $required (@required_list) { - if (!get_info($required)) { - $requirements_met = 0; - if (!$first_missing) { - $first_missing = 1; - $error_list = "Fatal -- Environment problem! The following program(s) are not in PATH:\n"; - } - $error_list .= "$required\n"; - } - } - if (!$requirements_met) { - print $error_list; - print "Info -- Update PATH or install the programs and try again.\n"; - exit(0); - } - -##-- Validate required conditions. - use Time::gmtime; $ENV{DATE} = gmctime()." GMT"; our $originalDir = `cd`; @@ -164,9 +146,6 @@ sub main { ##++ Assemble configuration from config file and command line: my $bOutputCleaned = 0; - -#while ($v = each %$OPT) {print "$v: $OPT->{$v}\n";} - # Scan the configuration for switch definitions: while (($sw, $val) = each %$odr) { next if (! exists $val->{def}); ## ?? Should always exist. @@ -174,29 +153,38 @@ sub main { # Set/clear environment variables: if ($val->{env}) { if ($val->{def}) {$ENV{$sw} = (exists $val->{value}) ? $val->{value} : 1; } - else {delete $ENV{$sw}; } + else { + delete $ENV{$sw}; + undef $sw; + } } # If the switch is in the command line, override the stored value: if (exists $OPT->{$sw}) { if (exists $val->{value}) { - $val->{value} = $OPT->{$sw}; - $val->{def} = 1; + $val->{value} = $OPT->{$sw}; + $val->{def} = 1; } else { - $val->{def} = $OPT->{$sw}; ## If no, value will be zero. + $val->{def} = 0; } } # If the switch can be negated, test that, too: if ( ! ($val->{def} =~ /A/)) { local $nosw = "no".$sw; - if (exists $OPT->{$nosw}) { - $val->{def} = 0; + if (exists $OPT->{$nosw}) { ## -NO ? + if ($val->{env}) { + if (!$val->{def}) { + print "Deleting environment variable $sw\n"; + delete $ENV{$sw}; + undef $sw; + } + } } } # For any switch definition with fixed values ("options"), validate: - if (exists $val->{options}) { + if ( (exists $val->{options}) && ($val->{def})) { local $bValid = 0; # options can be like value1|syn1 value2|syn2|syn3 foreach $option (split(/ /, $val->{options})) { @@ -229,12 +217,19 @@ sub main { local $src = $odr->{src}->{value}; local $out = $odr->{out}->{value}; + # /CPU interacts with CPU environment variable. + if (!$odr->{cpu}->{def}) { ## If not defined locally, + $odr->{cpu}->{value} = $ENV{CPU}; ## use environment variable value. + } + # /COMPONENTS can have a %CPU% substitution tag in it: + $odr->{components}->{value} =~ s/%cpu%/$odr->{cpu}->{value}/g; + if ($clean && $odr->{package}->{def}) { print "Info -- /clean forces /nopackage.\n"; $odr->{package}->{def} = 0; } - if ($vverbose) {print "Debug -- Config: ".Dumper($config);} + if ($verbose) {print "Debug -- Config: ".Dumper($config);} # Test the unix find command: # List of directories where it might be: @@ -292,8 +287,35 @@ sub main { if ($len < 1) { die "Fatal -- you won't get far accessing the repository without specifying a username."; } + # If repository action is anything but SKIP, then additional programs must + # be installed to enable repository access: + @required_list = (@required_for_repository_access, @required_list); + + } + +##++ Validate required conditions: + + my $requirements_met = 1; + my $first_missing = 0; + my $error_list = ""; + foreach my $required (@required_list) { + if (!get_info($required)) { + $requirements_met = 0; + if (!$first_missing) { + $first_missing = 1; + $error_list = "Fatal -- Environment problem! The following program(s) are not in PATH:\n"; + } + $error_list .= "$required\n"; + } + } + if (!$requirements_met) { + print $error_list; + print "Info -- Update PATH or install the programs and try again.\n"; + exit(0); } +##-- Validate required conditions. + # (------------------------------------------------) if ( (-d $wd) && ( ($rverb =~ /export/) || ($rverb =~ /checkout/) ) ) { print "\n\nHEADS UP!!\n\n"; @@ -315,14 +337,10 @@ sub main { $l->no_die_handler; ## Needed so XML::Simple won't throw exceptions. } + print "Command line options:\n"; + while ($v = each %$OPT) {print "$v: $OPT->{$v}\n";} + print "Executing $cmdline\n"; - local $argvsize = @ARGV; - local $nmakeargs = ""; - if ($argvsize > 0) { - map {$nmakeargs .= " $_ "} @ARGV; - print "Arguments for NMAKE: $nmakeargs\n"; - } - print "Info -- Using unix find in $odr->{unixfind}->{value}\n" if ($verbose); ##++ Begin repository action: @@ -412,7 +430,7 @@ sub main { # ** Do this now (after repository update and before first zip) # because making zip files requires some configuration data be set up. local $version_path = $config->{Stages}->{Package}->{Config}->{Paths}->{Versions}->{path}; - open(DAT, "$src/$version_path") or die "Could not open $version_path."; + open(DAT, "$src/$version_path") or die "Could not open $src/$version_path."; @raw = ; close DAT; foreach $line (@raw) { @@ -497,7 +515,7 @@ sub main { $path = "athena\\wshelper\\wshelper\\Makefile.src"; if (!-e $path) {die "Fatal -- Expected file $wd\\$path not found.";} if (system("grep DEBUG_SYMBOL $path > NUL") != 0) { - !system ("echo DEBUG_SYMBOL=1 >> $wd\\$path") or die "Fatal -- Append line to file failed.\n"; + !system ("echo DEBUG_SYMBOL=0 >> $wd\\$path") or die "Fatal -- Append line to file failed.\n"; print "Info -- Added DEBUG_SYMBOL to $wd\\$path\n" if ($verbose); } @@ -518,8 +536,15 @@ sub main { chdir("$wd\\athena") or die "Fatal -- couldn't chdir to source directory $wd\\athena\n"; print "Info -- chdir to ".`cd`."\n" if ($verbose); - local $dbgswitch = ($odr->{debug}->{def}) ? " " : "NODEBUG=1"; - !system("perl ../scripts/build.pl --softdirs --nolog $buildtarget $dbgswitch BUILD_KFW=1 BUILD_OFFICIAL=1 DEBUG_SYMBOL=1 $nmakeargs") + local $nmakeargs = ""; + local $argvsize = @ARGV; + if (!($odr->{debug}->{def})) {$nmakeargs .= " NODEBUG=1";} + if ($argvsize > 0) { + map {$nmakeargs .= " $_ "} @ARGV; + print "Arguments for NMAKE: $nmakeargs\n"; + } + + !system("perl ../scripts/build.pl --softdirs --nolog $buildtarget BUILD_KFW=1 BUILD_OFFICIAL=1 DEBUG_SYMBOL=0 $nmakeargs") or die "Fatal -- build $buildtarget failed."; chdir("$wd") or die "Fatal -- couldn't chdir to $wd."; @@ -532,7 +557,7 @@ sub main { if ($verbose) {print "Info -- *** End build".$buildtext."\n";} } ## End make conditional. - else {print "Info -- *** Skipping build.\n" if ($verbose);} + else {print "Info -- *** Skipping build.\n" if ($verbose);} ##-- Make action. ##++ Package action: @@ -545,6 +570,8 @@ sub main { else { if ($verbose) {print "Info -- *** Begin prepackage.\n";} + local $dbgswitch = ($odr->{debug}->{def}) ? "DEBUG=1" : ""; + if (! $bOutputCleaned) { ## In case somebody cleaned $out before us. if (-d $out) {!system("rm -rf $out/*") or die "Fatal -- Couldn't clean $out."} ## Clean output directory. else {mkdir($out);} @@ -587,33 +614,47 @@ sub main { # Correct errors in files.wxi: !system("sed 's/WorkingDirectory=\"\\[dirbin\\]\"/WorkingDirectory=\"dirbin\"/g' files.wxi > a.tmp") or die "Fatal -- Couldn't modify files.wxi."; !system("mv a.tmp files.wxi") or die "Fatal -- Couldn't update files.wxi."; - - # Make sed script to run on the site-local configuration files: - local $tmpfile = "site-local.sed" ; + + ##++ ----------------------------------------------------------------------------- + ##++ Transform -tagged files: + + ## Make sed script to run on the site-local configuration files: + local $tmpfile = "site-local.sed" ; if (-e $tmpfile) {system("del $tmpfile");} + open SEDFILE, ">>$tmpfile"; + # Basic substitutions: local $dblback_wd = $wd; $dblback_wd =~ s/\\/\\\\/g; - !system("echo s/%BUILDDIR%/$dblback_wd/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/%BUILDDIR%/$dblback_wd/\n" or die "Fatal -- Couldn't modify $tmpfile."; local $dblback_staging = "$wd\\staging"; $dblback_staging =~ s/\\/\\\\/g; - !system("echo s/%TARGETDIR%/$dblback_staging/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/%TARGETDIR%/$dblback_staging/\n" or die "Fatal -- Couldn't modify $tmpfile."; local $dblback_sample = "$wd\\staging\\sample"; $dblback_sample =~ s/\\/\\\\/g; - !system("echo s/%CONFIGDIR-WIX%/$dblback_sample/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; - !system("echo s/%CONFIGDIR-NSI%/$dblback_staging/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; - !system("echo s/%VERSION_MAJOR%/$config->{Versions}->{'VER_PROD_MAJOR_STR'}/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; - !system("echo s/%VERSION_MINOR%/$config->{Versions}->{'VER_PROD_MINOR_STR'}/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; - !system("echo s/%VERSION_PATCH%/$config->{Versions}->{'VER_PROD_REV_STR'}/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; + + $ArchTag = $prepackage->{CopyList}->{Config}->{ArchTag}->{value}; + $ArchFragment = ($odr->{cpu}->{value} =~ /386/) ? "32" : "64"; + $CpuTag = $prepackage->{CopyList}->{Config}->{CpuTag}->{value}; + $CpuFragment = ($odr->{cpu}->{value} =~ /386/) ? "i386" : "AMD64"; + + print SEDFILE "s/%CONFIGDIR-WIX%/$dblback_sample/\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/%CONFIGDIR-NSI%/$dblback_staging/\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/%VERSION_MAJOR%/$config->{Versions}->{'VER_PROD_MAJOR_STR'}/\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/%VERSION_MINOR%/$config->{Versions}->{'VER_PROD_MINOR_STR'}/\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/%VERSION_PATCH%/$config->{Versions}->{'VER_PROD_REV_STR'}/\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/$ArchTag/$ArchFragment/\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "s/$CpuTag/$CpuFragment/\n" or die "Fatal -- Couldn't modify $tmpfile."; # Strip out some defines so they can be replaced: [used for site-local.nsi] - !system("echo /\^!define\.\*RELEASE\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; - !system("echo /\^!define\.\*DEBUG\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; - !system("echo /\^!define\.\*BETA\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "/\^!define\.\*RELEASE\.\*\$/d\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "/\^!define\.\*DEBUG\.\*\$/d\n" or die "Fatal -- Couldn't modify $tmpfile."; + print SEDFILE "/\^!define\.\*BETA\.\*\$/d\n" or die "Fatal -- Couldn't modify $tmpfile."; + close SEDFILE; # Run the script on site-local.wxi: !system("sed -f $tmpfile site-local-tagged.wxi > $wd\\buildwix\\site-local.wxi") or die "Fatal -- Couldn't modify site-local.wxi."; - # Now update site-local.nsi: + ## Now update site-local.nsi: chdir "..\\nsis"; print "Info -- chdir to ".`cd`."\n" if ($verbose); !system("sed -f ..\\wix\\$tmpfile site-local-tagged.nsi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi."; @@ -628,12 +669,20 @@ sub main { if (exists $config->{Versions}->{'BETA_STR'}) { !system("echo !define BETA $config->{Versions}->{'BETA_STR'} >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; } - !system("mv -f b.tmp $wd\\buildnsi\\site-local.nsi") or die "Fatal -- Couldn't replace site-local.nsi."; + !system("mv -f b.tmp $wd\\buildnsi\\site-local.nsi") or die "Fatal -- Couldn't replace site-local.nsi."; - # Run the script on nsi-includes-tagged.nsi: + ## Run the script on nsi-includes-tagged.nsi: !system("sed -f ..\\wix\\$tmpfile nsi-includes-tagged.nsi > $wd\\buildnsi\\nsi-includes.nsi") or die "Fatal -- Couldn't modify nsi-includes.nsi."; - !system("rm ..\\wix\\$tmpfile") or die "Fatal -- Couldn't remove $tmpfile."; + ## Run the script on kfw-fixed-tagged.nsi: + print "KPK -- work on kfw-fixed-tagged.nsi in ".`cd`."\n" if ($verbose); + !system("sed -f ..\\wix\\$tmpfile kfw-fixed-tagged.nsi > kfw-fixed.nsi") or die "Fatal -- Couldn't modify kfw_fixed.nsi."; + !system("sed -f ..\\wix\\$tmpfile kfw-fixed-tagged.nsi > $wd\\buildnsi\\kfw-fixed.nsi") or die "Fatal -- Couldn't modify kfw_fixed.nsi."; + + !system("rm ..\\wix\\$tmpfile") or die "Fatal -- Couldn't remove $tmpfile."; + ##-- Transform -tagged files: + ##-- ----------------------------------------------------------------------------- + if ($verbose) {print "Info -- *** End prepackage.\n";} if ($verbose) {print "Info -- *** Begin package.\n";} @@ -641,7 +690,7 @@ sub main { chdir("$wd\\buildwix") or die "Fatal -- Couldn't cd to $wd\\buildwix"; print "Info -- *** Make .msi:\n" if ($verbose); print "Info -- chdir to ".`cd`."\n" if ($verbose); - !system("$MAKE") or die "Error -- msi installer build failed."; + !system("$MAKE $dbgswitch") or die "Error -- msi installer build failed."; chdir("$wd\\buildnsi") or die "Fatal -- Couldn't cd to $wd\\buildnsi"; print "Info -- *** Make NSIS:\n" if ($verbose); @@ -678,6 +727,22 @@ sub main { system("rm -rf $out/a.tmp"); ## Clean up junk. system("rm -rf $out/ziptemp"); ## Clean up junk. + # Now check for ntsecapitest.i. If it is present, it means that the test in the Windows + # directory passed. + $dir = "$wd\\athena\\auth\\krb5\\src\\windows"; + chdir($dir) or die "Fatal -- Couldn't cd to $dir"; + print "Info -- chdir to ".`cd`."\n" if ($verbose); + + system("nmake ntsecapitest"); + if (!-e "ntsecapitest.i") { + print "Warning! This build does not use the Vista ntsecapi.h.\n"; + print " That means that the Windows Identity management code does not have MSLSA\n"; + print " access code enabled. To build with that support, copy ntsecapi.h from a\n"; + print " Vista build environment to somewhere in the compiler's include path, like\n"; + print " c:\\Program Files\\Platform SDK Server 2003 R2\\Include. Make sure that the \n"; + print " symbol TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS is defined in ntsecapi.h.\n"; + } + # End logging: if ($odr->{logfile}->{def}) {$l->stop;} @@ -687,4 +752,4 @@ sub main { $SIG{'INT'} = \&handler; $SIG{'QUIT'} = \&handler; -exit(main()); \ No newline at end of file +exit(main()); diff --git a/src/windows/build/copyfiles.pl b/src/windows/build/copyfiles.pl index 9f9ccdde6..e765f8e7c 100644 --- a/src/windows/build/copyfiles.pl +++ b/src/windows/build/copyfiles.pl @@ -49,9 +49,15 @@ sub copyFiles { $IgnoreTag = $xml->{Config}->{DebugTag}->{value}; } my $AlwaysTag = $xml->{Config}->{AlwaysTag}->{value}; + my $ArchTag = $xml->{Config}->{ArchTag}->{value}; + my $CpuTag = $xml->{Config}->{CpuTag}->{value}; + my $DebugFragment = ($odr->{debug}->{def}) ? "-DEBUG" : ""; + my $CpuFragment = $odr->{cpu}->{value}; + my $ArchFragment = ($CpuFragment =~ /386/) ? "32" : "64"; + $FileStemFragment = $xml->{Config}->{FileStem}->{name}; $fromRoot = $xml->{Config}->{From}->{root}; - $toRoot = $xml->{Config}->{To}->{root}; + $toRoot = $xml->{Config}->{To}->{root}; ##-- Set up path substitution variables for use inside the copy loop. # For each file in the file list: # Substitute any variable parts of the path name. @@ -61,6 +67,7 @@ sub copyFiles { local $i = 0; my $bOldDot = 1; my $bDot = 0; + my $first = 1; while ($files[0]->{File}[$i]) { my ($name, $newname, $from, $to, $file); @@ -71,24 +78,33 @@ sub copyFiles { if ($name && (! exists $file->{ignore})) { ## Ignore or process this entry? $from = "$fromRoot\\$file->{from}\\$name"; $to = "$toRoot\\$file->{to}\\$newname"; - # Copy this file? Check for ignore tag [debug-only in release mode or vice versa]. - if ( $bPathTags || $bFileStem || (index($from.$to, $IgnoreTag) <0) ) { - if ($bPathTags) { ## Apply PathTag substitutions: + + # Copy this file? + if ( (($odr->{components}->{value} =~ /$file->{component}/) && # file's component must be in component list. + (index($from.$to, $IgnoreTag) < 0) ) && # Check for ignore tag [debug-only in release mode or vice versa]. + ($bPathTags || $bFileStem) ) { + if ($bPathTags) { ## Apply PathTag substitutions: $from =~ s/$AlwaysTag/$PathFragment/g; $to =~ s/$AlwaysTag/$PathFragment/g; $from =~ s/$BuildDependentTag/$PathFragment/g; $to =~ s/$BuildDependentTag/$PathFragment/g; } - if ($bFileStem) { ## FileStem substitution? + if ($bFileStem) { ## FileStem substitution? $from =~ s/%filestem%/$FileStemFragment/g; $to =~ s/%filestem%/$FileStemFragment/g; } # %-DEBUG% substitution: - local $DebugFragment = ($odr->{debug}->{def}) ? "-DEBUG" : ""; $from =~ s/%\-DEBUG%/$DebugFragment/g; $to =~ s/%\-DEBUG%/$DebugFragment/g; $to =~ s/\*.*//; ## Truncate to path before any wildcard + # %cpu% substitution: + $from =~ s/$CpuTag/$CpuFragment/g; + $to =~ s/$CpuTag/$CpuFragment/g; + + # %WL% substitution: + $from =~ s/$ArchTag/$ArchFragment/g; + $to =~ s/$ArchTag/$ArchFragment/g; my $bCopyOK = 1; my $fromcheck = $from; my $bRequired = ! (exists $file->{notrequired}); diff --git a/src/windows/build/copyfiles.xml b/src/windows/build/copyfiles.xml index 11809ca74..ccdd857ce 100644 --- a/src/windows/build/copyfiles.xml +++ b/src/windows/build/copyfiles.xml @@ -6,216 +6,215 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /> + + + + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/windows/build/corebinaryfiles.xml b/src/windows/build/corebinaryfiles.xml index 9fcf8aa3a..1940085b0 100644 --- a/src/windows/build/corebinaryfiles.xml +++ b/src/windows/build/corebinaryfiles.xml @@ -5,81 +5,81 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - \ No newline at end of file + + + + + diff --git a/src/windows/build/sdkfiles.xml b/src/windows/build/sdkfiles.xml index c938107ca..83f7a99c1 100644 --- a/src/windows/build/sdkfiles.xml +++ b/src/windows/build/sdkfiles.xml @@ -2,22 +2,22 @@ - - + + + - - - + + - + - + - + - + \ No newline at end of file diff --git a/src/windows/identity/Makefile b/src/windows/identity/Makefile index a2fdcf449..551f9ae86 100644 --- a/src/windows/identity/Makefile +++ b/src/windows/identity/Makefile @@ -39,20 +39,20 @@ MODULE=all # default is to treat warnings as errors. #RMAKE=$(MAKECMD) /nologo all KH_NO_WX=1 -RMAKE=$(MAKECMD) /nologo all -RMAKE_W2K=$(MAKECMD) /nologo all KHBUILD_W2K=1 +RMAKE=$(MAKECMD) /nologo all KH_NO_WX=1 +RMAKE_W2K=$(MAKECMD) /nologo all KHBUILD_W2K=1 KH_NO_WX=1 !else -RMAKE=$(MAKECMD) /nologo etag +RMAKE=$(MAKECMD) /nologo etag KH_NO_WX=1 RMAKE_W2K=echo Skipping W2K target for ETAGS run. !endif !else -RMAKE=$(MAKECMD) /nologo test -RMAKE_W2K=$(MAKECMD) /nologo test KHBUILD_W2K=1 +RMAKE=$(MAKECMD) /nologo test KH_NO_WX=1 +RMAKE_W2K=$(MAKECMD) /nologo test KHBUILD_W2K=1 KH_NO_WX=1 !endif !else -RMAKE=$(MAKECMD) /nologo clean -RMAKE_W2K=$(MAKECMD) /nologo clean KHBUILD_W2K=1 +RMAKE=$(MAKECMD) /nologo clean KH_NO_WX=1 +RMAKE_W2K=$(MAKECMD) /nologo clean KHBUILD_W2K=1 KH_NO_WX=1 !endif !if "$(CPU)" != "i386" diff --git a/src/windows/identity/nidmgrdll/Makefile b/src/windows/identity/nidmgrdll/Makefile index 096a5ef2c..8c35ca2b3 100644 --- a/src/windows/identity/nidmgrdll/Makefile +++ b/src/windows/identity/nidmgrdll/Makefile @@ -107,7 +107,7 @@ SDKLIBFILES= \ shlwapi.lib \ version.lib -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if (("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" )) && (!defined(NO_BUFFEROVERFLOWU) || "$(NO_BUFFEROVERFLOWU)" == "0") SCLIB=bufferoverflowu.lib !else SCLIB= diff --git a/src/windows/identity/nidmgrdll/Makefile.w2k b/src/windows/identity/nidmgrdll/Makefile.w2k index 9dfe2dffb..b1c6cf6fa 100644 --- a/src/windows/identity/nidmgrdll/Makefile.w2k +++ b/src/windows/identity/nidmgrdll/Makefile.w2k @@ -105,7 +105,7 @@ SDKLIBFILES= \ shlwapi.lib \ version.lib -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if (("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" )) && (!defined(NO_BUFFEROVERFLOWU) || "$(NO_BUFFEROVERFLOWU)" == "0") SCLIB=bufferoverflowu.lib !else SCLIB= diff --git a/src/windows/identity/plugins/krb5/Makefile b/src/windows/identity/plugins/krb5/Makefile index f93fe6819..34e809b49 100644 --- a/src/windows/identity/plugins/krb5/Makefile +++ b/src/windows/identity/plugins/krb5/Makefile @@ -54,8 +54,12 @@ SDKLIBFILES= \ shlwapi.lib \ comctl32.lib -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64") || ("$(CPU)" == "ALPHA64" ) +!if !defined(NO_BUFFEROVERFLOWU) || "$(NO_BUFFEROVERFLOWU)" == "0" SCLIB=bufferoverflowu.lib +!else +SCLIB= +!endif LIBFILES= \ $(LIBDIR)\nidmgr64.lib \ $(KFWLIBDIR)\loadfuncs.lib diff --git a/src/windows/identity/ui/Makefile b/src/windows/identity/ui/Makefile index cf20127a3..c5e5ed5f6 100644 --- a/src/windows/identity/ui/Makefile +++ b/src/windows/identity/ui/Makefile @@ -95,7 +95,7 @@ $(MANIFESTFILE): netidmgr.manifest.$(CPU).$(KH_CLVER).debug !endif $(CP) $** $@ -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if (("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" )) && (!defined(NO_BUFFEROVERFLOWU) || "$(NO_BUFFEROVERFLOWU)" == "0") SCLIB=bufferoverflowu.lib !else SCLIB= diff --git a/src/windows/identity/ui/Makefile.w2k b/src/windows/identity/ui/Makefile.w2k index a64aea7c3..d9ea2aee6 100644 --- a/src/windows/identity/ui/Makefile.w2k +++ b/src/windows/identity/ui/Makefile.w2k @@ -79,7 +79,7 @@ $(OBJ)\khapp.res: lang\en_us\khapp.rc $(OBJ)\appver.res: appver.rc $(RC2RES) -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if (("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" )) && (!defined(NO_BUFFEROVERFLOWU) || "$(NO_BUFFEROVERFLOWU)" == "0") SCLIB=bufferoverflowu.lib !else SCLIB= diff --git a/src/windows/installer/nsis/kfw-fixed.nsi b/src/windows/installer/nsis/kfw-fixed.nsi index cef8b60dd..7d9ca9cbf 100644 --- a/src/windows/installer/nsis/kfw-fixed.nsi +++ b/src/windows/installer/nsis/kfw-fixed.nsi @@ -194,7 +194,7 @@ Section "KfW Client" secClient !insertmacro ReplaceDLL "${KFW_BIN_DIR}\gss-client.exe" "$INSTDIR\bin\gss-client.exe" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\gss-server.exe" "$INSTDIR\bin\gss-server.exe" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\gssapi32.dll" "$INSTDIR\bin\gssapi32.dll" "$INSTDIR" - !insertmacro ReplaceDLL "${KFW_BIN_DIR}\k524init.exe" "$INSTDIR\bin\k524init.exe" "$INSTDIR" + ;!insertmacro ReplaceDLL "${KFW_BIN_DIR}\k524init.exe" "$INSTDIR\bin\k524init.exe" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\kclnt32.dll" "$INSTDIR\bin\kclnt32.dll" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\kdestroy.exe" "$INSTDIR\bin\kdestroy.exe" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\kinit.exe" "$INSTDIR\bin\kinit.exe" "$INSTDIR" @@ -203,7 +203,7 @@ Section "KfW Client" secClient !insertmacro ReplaceDLL "${KFW_BIN_DIR}\kvno.exe" "$INSTDIR\bin\kvno.exe" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\krb5_32.dll" "$INSTDIR\bin\krb5_32.dll" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\k5sprt32.dll" "$INSTDIR\bin\k5sprt32.dll" "$INSTDIR" - !insertmacro ReplaceDLL "${KFW_BIN_DIR}\krb524.dll" "$INSTDIR\bin\krb524.dll" "$INSTDIR" + ;!insertmacro ReplaceDLL "${KFW_BIN_DIR}\krb524.dll" "$INSTDIR\bin\krb524.dll" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\krbcc32.dll" "$INSTDIR\bin\krbcc32.dll" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\krbcc32s.exe" "$INSTDIR\bin\krbcc32s.exe" "$INSTDIR" !insertmacro ReplaceDLL "${KFW_BIN_DIR}\krbv4w32.dll" "$INSTDIR\bin\krbv4w32.dll" "$INSTDIR" @@ -472,7 +472,7 @@ skipAllowTgtKey: WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\gss" "Flags" 0x408 WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\gss-client" "Flags" 0x408 WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\gss-server" "Flags" 0x408 - WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\k524init" "Flags" 0x408 + ;WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\k524init" "Flags" 0x408 WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\kpasswd" "Flags" 0x408 WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\kvno" "Flags" 0x408 WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\ms2mit" "Flags" 0x408 @@ -493,7 +493,7 @@ Section "Debug Symbols" secDebug File "${KFW_BIN_DIR}\gss-client.pdb" File "${KFW_BIN_DIR}\gss-server.pdb" File "${KFW_BIN_DIR}\gssapi32.pdb" - File "${KFW_BIN_DIR}\k524init.pdb" + ;File "${KFW_BIN_DIR}\k524init.pdb" File "${KFW_BIN_DIR}\kclnt32.pdb" File "${KFW_BIN_DIR}\kdestroy.pdb" File "${KFW_BIN_DIR}\kinit.pdb" @@ -502,7 +502,7 @@ Section "Debug Symbols" secDebug File "${KFW_BIN_DIR}\kvno.pdb" File "${KFW_BIN_DIR}\krb5_32.pdb" File "${KFW_BIN_DIR}\k5sprt32.pdb" - File "${KFW_BIN_DIR}\krb524.pdb" + ;File "${KFW_BIN_DIR}\krb524.pdb" File "${KFW_BIN_DIR}\krbcc32.pdb" File "${KFW_BIN_DIR}\krbcc32s.pdb" File "${KFW_BIN_DIR}\krbv4w32.pdb" @@ -1168,7 +1168,7 @@ StartRemove: Delete /REBOOTOK "$INSTDIR\bin\gss-client.exe" Delete /REBOOTOK "$INSTDIR\bin\gss-server.exe" Delete /REBOOTOK "$INSTDIR\bin\gssapi32.dll" - Delete /REBOOTOK "$INSTDIR\bin\k524init.exe" + ;Delete /REBOOTOK "$INSTDIR\bin\k524init.exe" Delete /REBOOTOK "$INSTDIR\bin\kclnt32.dll" Delete /REBOOTOK "$INSTDIR\bin\kdestroy.exe" Delete /REBOOTOK "$INSTDIR\bin\kinit.exe" @@ -1177,7 +1177,7 @@ StartRemove: Delete /REBOOTOK "$INSTDIR\bin\kvno.exe" Delete /REBOOTOK "$INSTDIR\bin\krb5_32.dll" Delete /REBOOTOK "$INSTDIR\bin\k5sprt32.dll" - Delete /REBOOTOK "$INSTDIR\bin\krb524.dll" + ;Delete /REBOOTOK "$INSTDIR\bin\krb524.dll" Delete /REBOOTOK "$INSTDIR\bin\krbcc32.dll" Delete /REBOOTOK "$INSTDIR\bin\krbcc32s.exe" Delete /REBOOTOK "$INSTDIR\bin\krbv4w32.dll" @@ -1203,7 +1203,7 @@ StartRemove: Delete /REBOOTOK "$INSTDIR\bin\gss-client.pdb" Delete /REBOOTOK "$INSTDIR\bin\gss-server.pdb" Delete /REBOOTOK "$INSTDIR\bin\gssapi32.pdb" - Delete /REBOOTOK "$INSTDIR\bin\k524init.pdb" + ;Delete /REBOOTOK "$INSTDIR\bin\k524init.pdb" Delete /REBOOTOK "$INSTDIR\bin\kclnt32.pdb" Delete /REBOOTOK "$INSTDIR\bin\kdestroy.pdb" Delete /REBOOTOK "$INSTDIR\bin\kinit.pdb" @@ -1212,7 +1212,7 @@ StartRemove: Delete /REBOOTOK "$INSTDIR\bin\kvno.pdb" Delete /REBOOTOK "$INSTDIR\bin\krb5_32.pdb" Delete /REBOOTOK "$INSTDIR\bin\k5sprt32.pdb" - Delete /REBOOTOK "$INSTDIR\bin\krb524.pdb" + ;Delete /REBOOTOK "$INSTDIR\bin\krb524.pdb" Delete /REBOOTOK "$INSTDIR\bin\krbcc32.pdb" Delete /REBOOTOK "$INSTDIR\bin\krbcc32s.pdb" Delete /REBOOTOK "$INSTDIR\bin\krbv4w32.pdb" @@ -1357,7 +1357,7 @@ StartRemove: DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\gss" DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\gss-client" DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\gss-server" - DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\k524init" + ;DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\k524init" DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\kpasswd" DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\kvno" DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\ms2mit" diff --git a/src/windows/installer/nsis/nsi-includes-tagged.nsi b/src/windows/installer/nsis/nsi-includes-tagged.nsi index 01bd29986..816f5392a 100644 --- a/src/windows/installer/nsis/nsi-includes-tagged.nsi +++ b/src/windows/installer/nsis/nsi-includes-tagged.nsi @@ -4,5 +4,5 @@ !define KFW_MAJORVERSION %VERSION_MAJOR% !define KFW_MINORVERSION %VERSION_MINOR% !define KFW_PATCHLEVEL %VERSION_PATCH% -!define CL_1310 +!define CL_1400 diff --git a/src/windows/installer/nsis/site-local-tagged.nsi b/src/windows/installer/nsis/site-local-tagged.nsi index 614a27af9..eef7a13eb 100644 --- a/src/windows/installer/nsis/site-local-tagged.nsi +++ b/src/windows/installer/nsis/site-local-tagged.nsi @@ -3,10 +3,12 @@ !define KFW_MAJORVERSION %VERSION_MAJOR% !define KFW_MINORVERSION %VERSION_MINOR% !define KFW_PATCHLEVEL %VERSION_PATCH% -!define CL_1310 +!define CL_1400 +!define X86 -!define RELEASE -!define NOT_DEBUG +;!define RELEASE +;!define NOT_DEBUG +!define DEBUG !define BETA 1 !define SAMPLE_CONFIG_REALM "ATHENA.MIT.EDU" !define HTTP_CONFIG_URL "[Obtain a URL from your Kerberos administrator]" diff --git a/src/windows/installer/wix/custom/custom.cpp b/src/windows/installer/wix/custom/custom.cpp index 98d669f3e..d1989cdbc 100644 --- a/src/windows/installer/wix/custom/custom.cpp +++ b/src/windows/installer/wix/custom/custom.cpp @@ -88,7 +88,7 @@ SOFTWARE. #pragma comment(lib, "msi") #pragma comment(lib, "advapi32") #if defined(_M_IA64) || defined(_M_AMD64) -#pragma comment(lib, "bufferoverflowu") +//#pragma comment(lib, "bufferoverflowu") #endif diff --git a/src/windows/installer/wix/features.wxi b/src/windows/installer/wix/features.wxi index a15cfcd86..e7b70b18a 100644 --- a/src/windows/installer/wix/features.wxi +++ b/src/windows/installer/wix/features.wxi @@ -87,7 +87,7 @@ - + @@ -95,12 +95,12 @@ + - - + @@ -182,9 +182,8 @@ - - - + + @@ -192,7 +191,6 @@ - diff --git a/src/windows/installer/wix/files.wxi b/src/windows/installer/wix/files.wxi index 5a391d03d..2bd331d6e 100644 --- a/src/windows/installer/wix/files.wxi +++ b/src/windows/installer/wix/files.wxi @@ -119,10 +119,10 @@ - - - - + + + + @@ -179,11 +179,11 @@ - - - + + + - + @@ -360,24 +360,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -410,21 +410,21 @@ - + - + - - + + - - + + @@ -656,29 +656,22 @@ - - - - - - - - + + - - - - - - - - - + + + + + + + + + - - - - + + + @@ -687,9 +680,6 @@ - - - @@ -706,11 +696,6 @@ - - - - - @@ -792,7 +777,7 @@ - + diff --git a/src/windows/installer/wix/platform.wxi b/src/windows/installer/wix/platform.wxi index 65de10543..270c52ce7 100644 --- a/src/windows/installer/wix/platform.wxi +++ b/src/windows/installer/wix/platform.wxi @@ -24,8 +24,6 @@ - - @@ -43,8 +41,6 @@ - - @@ -88,110 +84,107 @@ - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/windows/installer/wix/site-local-tagged.wxi b/src/windows/installer/wix/site-local-tagged.wxi index 26d6d7ede..e43dd3efb 100644 --- a/src/windows/installer/wix/site-local-tagged.wxi +++ b/src/windows/installer/wix/site-local-tagged.wxi @@ -46,13 +46,13 @@ - - + + - - + + diff --git a/src/windows/winlevel.h b/src/windows/winlevel.h index ad4ac8c5c..da9956a06 100644 --- a/src/windows/winlevel.h +++ b/src/windows/winlevel.h @@ -30,4 +30,4 @@ * updated for each alpha, beta, final release. This will ensure * that file identifiers are unique */ -#define KRB5_BUILDLEVEL 16 +#define KRB5_BUILDLEVEL 17 -- 2.26.2