2004-02-26 19:22:35 +00:00
|
|
|
This software has been released under the terms of the IBM Public
|
|
|
|
License. For details, see the LICENSE file in the top-level source
|
|
|
|
directory or on-line at http://www.openafs.org/dl/license10.html
|
|
|
|
|
|
|
|
The document now provides a step by step procedure that takes the user
|
2004-03-18 04:03:21 +00:00
|
|
|
from a basic Windows 2000/XP workstation to an OpenAFS development
|
2004-02-26 19:22:35 +00:00
|
|
|
environment. Details are provided so that a 'beginning' windows
|
2004-03-18 04:03:21 +00:00
|
|
|
developer can build an OpenAFS installable package for Windows 2000/XP/2003.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
NOTE:
|
|
|
|
As of the OpenAFS 1.3 release series, Windows platforms released
|
|
|
|
prior to Windows 2000 are not being supported. The InstallShield
|
|
|
|
installer is still in the source tree but is no longer supported.
|
|
|
|
A new open source installer based on NSIS 2.0 replaces it.
|
|
|
|
|
|
|
|
*********** Windows 2000/XP/2003 Build Process ****************
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
Building OpenAFS for Windows requires configuring a Windows
|
|
|
|
development system by installing compilation tools and header files.
|
2004-03-18 04:03:21 +00:00
|
|
|
Open AFS Software development can be done on Windows 2000 or XP. The
|
2004-02-26 19:22:35 +00:00
|
|
|
target system, where OpenAFS will be installed, should be either
|
2004-03-18 04:03:21 +00:00
|
|
|
Windows 2000, Windows XP, or Windows 2003. The building process is
|
|
|
|
controlled by a nmake file that generates the necessary binaries and
|
|
|
|
binds them into an install package.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
The following steps describe how to configure Windows 2000/XP:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
A. Obtain a copy of the OpenAFS Source Tree
|
|
|
|
B. Install Compiler and Development tools.
|
2004-03-18 04:03:21 +00:00
|
|
|
C. Install SDK header files
|
|
|
|
D. Configure NTBUILD.BAT
|
|
|
|
E. Set program version Level
|
|
|
|
F. Build Win2000 binaries
|
|
|
|
G. Install NSIS 2.0
|
|
|
|
H. Build NSIS Install Package
|
2004-06-21 19:23:36 +01:00
|
|
|
I. Install Wix 2.0
|
|
|
|
J. Build Wix MSI Install Package
|
|
|
|
K. Final Results
|
|
|
|
L. Optional Items
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
The Microsoft development tools require anywhere from 660 MB to 1.8GB
|
|
|
|
of storage depending on which compilers are selected. The following
|
|
|
|
versions are supported:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-11-23 03:49:05 +00:00
|
|
|
Microsoft Visual Studio .NET
|
2004-11-01 11:45:29 +00:00
|
|
|
available via a MSDN subscription
|
|
|
|
|
2004-11-23 03:49:05 +00:00
|
|
|
Microsoft Visual Studio .NET 2003 (recommended)
|
2004-11-01 11:45:29 +00:00
|
|
|
available via a MSDN subscription
|
|
|
|
|
2004-11-23 03:49:05 +00:00
|
|
|
Microsoft Visual Studio .NET 2005 (do not use for production)
|
|
|
|
available via a MSDN subscription
|
2004-11-01 11:45:29 +00:00
|
|
|
|
|
|
|
The following Microsoft SDK is required:
|
|
|
|
|
|
|
|
Microsoft Platform SDK for Windows XP SP2 [Core, Data Access and Installer SDKs are required]
|
|
|
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/downlevel.htm [IE required]
|
|
|
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
|
|
|
|
|
|
|
|
The following Microsoft DDK is required:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
Microsoft Windows Server 2003 DDK
|
|
|
|
available via a MSDN subscription or via free CD
|
|
|
|
http://www.microsoft.com/whdc/devtools/ddk/orderddkcd.mspx
|
2004-03-18 04:03:21 +00:00
|
|
|
|
|
|
|
The NSIS installer requires about 14 MB of storage. The following
|
2004-11-01 11:45:29 +00:00
|
|
|
version is supported:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
Nullsoft Scriptable Installation System 2.0
|
2004-11-01 11:45:29 +00:00
|
|
|
http://nsis.sourceforge.net/home/
|
|
|
|
|
|
|
|
The WiX installer requires about 18 MB of storage. The following
|
|
|
|
version is supported:
|
|
|
|
|
|
|
|
Wix 2.0.2217.0
|
|
|
|
http://prdownloads.sourceforge.net/wix/sources-2.0.2217.0.zip
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
The InstallShield scripts (although not supported) require version 5.5
|
|
|
|
of InstallShiled. Version 6.0 or higher of InstallShield are not
|
|
|
|
compatible.
|
|
|
|
|
|
|
|
The OpenAFS Source directory requires about 360 MB storage. The Source
|
|
|
|
directory size includes additional space for files that will be
|
|
|
|
generated during the build process.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
STEP A. Obtain a copy of the Open AFS Source Tree.
|
|
|
|
|
|
|
|
Transfer OpenAFS source tree onto your hardrive. The source can be
|
|
|
|
downloaded from the OpenAFS web site:
|
|
|
|
http://www.OpenAFS.org/release/snapindex.html.
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
For this example, download source for version 1.3.74 using the
|
2004-02-26 19:22:35 +00:00
|
|
|
following URL:
|
2004-11-01 11:45:29 +00:00
|
|
|
http://www.openafs.org/dl/openafs/1.3.74/openafs-1.3.74-src.tar
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
HINT: DailySnapShots are pre-release source trees and much more
|
|
|
|
likely to have compilation errors. If this is your first attempt, do
|
2004-11-01 11:45:29 +00:00
|
|
|
your build based on a release version of the source, e.g. 1.3.74. Once
|
2004-02-26 19:22:35 +00:00
|
|
|
you have completed a build process successfully, you can experiment with
|
|
|
|
other source trees.
|
|
|
|
|
|
|
|
You will need an unzip utility that can expand compressed tar files.
|
|
|
|
For example "Pkzip for Windows" from Pkware will uncompress tar files.
|
|
|
|
(http://www.pkware.com/)
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
Expand the downloaded tar file (openafs-1.3.74-src.tar) into target
|
2004-02-26 19:22:35 +00:00
|
|
|
directory (c:\OpenAFS), the unzip routine will expand the source into a
|
|
|
|
subdirectory tree:
|
2004-11-01 11:45:29 +00:00
|
|
|
c:\OpenAFS\OpenAFS-1.3.74\src
|
2004-03-18 04:03:21 +00:00
|
|
|
|
|
|
|
Copy the files 'NTMakefile' and 'ntbuild.bat' from 'src' to the OpenAFS
|
2004-11-01 11:45:29 +00:00
|
|
|
base directory (aka %AFSROOT%):
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
From a DOS command prompt window, enter the following copy commands:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
cd c:\OpenAFS\OpenAFS-1.3.74
|
|
|
|
copy src\NTMakefile .
|
|
|
|
copy src\ntbuild.bat .
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
The AFS base directory should look something like the following:
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
c:\OpenAFS\OpenAFS-1.3.74\
|
2004-03-18 04:03:21 +00:00
|
|
|
NTMakefile
|
|
|
|
ntbuild.bat
|
|
|
|
src
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
|
2004-02-26 19:22:35 +00:00
|
|
|
STEP B. Install compiler and development tools.
|
|
|
|
|
2004-11-23 03:49:05 +00:00
|
|
|
Install a copy of Microsoft Visual Studio .NET, Visual Studio .NET 2003,
|
|
|
|
or Visual Studio .NET 2005. The "Typical" install setting is sufficient.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
(1) You can reduce the installation size by selecting "Custom" install
|
|
|
|
and remove all but the following Options:
|
|
|
|
|
|
|
|
Microsoft Visual C++
|
|
|
|
Data Access
|
|
|
|
|
|
|
|
(2) When asked, Select to Register Environment Variables.
|
|
|
|
|
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
STEP C. Install SDK header files.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
Files from Microsoft's Platform SDK for Windows XP SP2 is required to
|
|
|
|
complete a build on Windows 2000/XP/2003. You can install the "Core, Data
|
|
|
|
Access and Installer SDKs" from
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
by using Internet Explorer 5.x or higher. (Active X controls are required)
|
2004-11-01 11:45:29 +00:00
|
|
|
If you do not which to use IE a complete SDK package is available from
|
|
|
|
|
|
|
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
The header files that are required are found from a Microsoft SDK are:
|
|
|
|
|
2004-06-18 06:49:20 +01:00
|
|
|
npapi.h (Windows 2000,XP,2003 builds)
|
|
|
|
netcfgx.h (NSIS Loopback Adapter installer - Windows 2000,XP,2003 builds)
|
|
|
|
netcfgn.h (NSIS Loopback Adapter installer - Windows 2000,XP,2003 builds)
|
|
|
|
|
|
|
|
These files come from the following Microsoft DDKs/SDKs:
|
|
|
|
|
|
|
|
npapi.h:
|
2004-11-01 11:45:29 +00:00
|
|
|
Windows XP SP2 Platform SDK - include/
|
2004-06-18 06:49:20 +01:00
|
|
|
|
|
|
|
netcfgn.h, netcfgx.h:
|
|
|
|
Windows XP/2003 DDK - inc/wxp/
|
|
|
|
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
STEP D. Configure NTBUILD.BAT.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
The NTBUILD.BAT file copied to the OpenAFS base directory must be
|
|
|
|
customized for use on your development system. The following variables
|
|
|
|
must be defined to match your configuration:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
AFSVER_CL: Set to 1200 if using MS Visual C++ 6.0
|
2004-11-23 03:49:05 +00:00
|
|
|
Set to 1300 if using MS Visual Studio .NET
|
|
|
|
Set to 1310 if using MS Visual Studio .NET 2003
|
|
|
|
Set to 1400 if using MS Visual Studio .NET 2005
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
MSVCDIR: Set to the short name version of the directory into which
|
|
|
|
the visual C++ compiler was installed regardless of version
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
MSSDKDIR: Set to the short name of the directory into which
|
|
|
|
the Platform SDK was installed
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
NTDDKDIR: Set the short name of the directory containing the npapi.h file
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
AFSROOT: Set to the short name of the OpenAFS Base directory
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
STEP E. Set version and installation options (optional)
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
Add a CellServDB file to install area. CellServDB contains the entries
|
|
|
|
for the various cell names. You can download a general purpose one
|
|
|
|
from:
|
|
|
|
http://grand.central.org/dl/cellservdb/CellServDB
|
2004-03-18 04:03:21 +00:00
|
|
|
then copy it to %AFSROOT%\src\WINNT\install\NSIS and name it afsdcell.ini
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
Edit file %AFSROOT%\src\config\NTMakefile.i386_nt40
|
|
|
|
AFSPRODUCT_VER_MAJOR - Version Major Number
|
|
|
|
AFSPRODUCT_VER_MINOR - Version Minor Number
|
|
|
|
AFSPRODUCT_VER_PATCH - Version Patch Number
|
|
|
|
AFSPRODUCT_VER_BUILD - Version Build Number
|
2004-11-01 11:45:29 +00:00
|
|
|
CELLSERVDB_INSTALL - The default file name for the CellServDB
|
|
|
|
included in the install Package.
|
|
|
|
CELLNAME_DEFAULT - The default home cell name.
|
|
|
|
CELLSERVDB_WEB - The default web address to obtain CellServDB
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
For example: in the file %AFSROOT%\src\config\NTMakefile.i386_nt40 you would
|
2004-02-26 19:22:35 +00:00
|
|
|
see the following:
|
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
AFSPRODUCT_VER_MAJOR=1
|
|
|
|
AFSPRODUCT_VER_MINOR=3
|
2004-11-01 11:45:29 +00:00
|
|
|
AFSPRODUCT_VER_PATCH=7400
|
2004-03-18 04:03:21 +00:00
|
|
|
AFSPRODUCT_VER_BUILD=0
|
|
|
|
CELLNAME_DEFAULT=openafs.org
|
2004-02-26 19:22:35 +00:00
|
|
|
CELLSERVDB_INSTALL=CellServDB.GrandCentral
|
|
|
|
CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
|
|
|
|
|
|
|
|
During the Open AFS installation process the user will be presented
|
|
|
|
with two choices for the CellServDB: Local copy (CELLSERVDB_INSTALL) and
|
|
|
|
one that can be downloaded from the web (CELLSERVDB_WEB).
|
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
STEP F. Begin the build
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
(1) From Windows 2000/XP/2003 open up a DOS prompt window.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(2) Change to the %AFSROOT% directory
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(3) Configure the environment variables:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
For a release build:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(a) Execute the VCVARS32.BAT or VSVARS32.BAT file which part of the
|
|
|
|
Visual Studio environment you installed.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(b) Execute the SETENV.BAT file with the parameters "/2000 /RETAIL"
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(c) Execute the NTBUILD.BAT file with the parameter "free"
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
For a debug build:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(a) Execute the VCVARS32.BAT or VSVARS32.BAT file which part of the
|
|
|
|
Visual Studio environment you installed.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(b) Execute the SETENV.BAT file with the parameters "/2000 /DEBUG"
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(c) Execute the NTBUILD.BAT file with the parameter "checked"
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(4) Clean the work area:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
nmake /f NTMakefile clean
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
(5) Build the complete Windows NT/2000 development environment.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
nmake /f NTMakefile install
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
While the build is running you will see many compile warnings. This
|
|
|
|
behavior is normal; the build process is successful as long as the build
|
|
|
|
process doesn't terminate with an error ("nmake.exe return code 0x2")
|
|
|
|
and it displays 'Build Finished Successfully'.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
STEP G. Install NSIS 2.0 (optional).
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
Download the Nullsoft Scriptable Installation System (NSIS) 2.0 from
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
http://nsis.sourceforge.net/home/
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
Run the nsis20.exe installer.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
NOTE: The NSIS installer may be rebuilt from source files
|
|
|
|
|
|
|
|
C:\Program Files\NSIS\Source
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
to enable options not built into the default configuration. The
|
|
|
|
OpenAFS installers are built using a modified version of the NSIS
|
|
|
|
sources. The following changes were made to exehead\config.h.
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
NSIS_MAX_STRLEN set to 4096
|
|
|
|
NSIS_CONFIG_LOG defined
|
|
|
|
NSIS_CONFIG_LOG_ODS defined
|
|
|
|
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
STEP H. Build OpenAFS NSIS install package
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
From the %AFSROOT% directory execute:
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
nmake /f NTMakefile NSIS
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
|
2004-06-21 19:23:36 +01:00
|
|
|
STEP I. Install Wix MSI Installer
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
Download the Wix 2.0.2217.0 installer from
|
2004-06-21 19:23:36 +01:00
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
http://prdownloads.sourceforge.net/wix/sources-2.0.2217.0.zip
|
2004-06-21 19:23:36 +01:00
|
|
|
|
|
|
|
Apply the following patches to the source tree and execute
|
|
|
|
|
|
|
|
make ship
|
|
|
|
|
|
|
|
from the \src\wix directory.
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
Index: src/wix/Common.cs
|
|
|
|
===================================================================
|
|
|
|
RCS file: /cvsroot/wix/wix/src/wix/Common.cs,v
|
|
|
|
retrieving revision 1.7
|
|
|
|
diff -w -r1.7 Common.cs
|
|
|
|
140a141,146
|
|
|
|
> public static long GetFileTimeFromDateTime(string dateTime)
|
|
|
|
> {
|
|
|
|
> System.DateTime sdt = System.Xml.XmlConvert.ToDateTime(dateTime);
|
|
|
|
> return sdt.ToFileTime();
|
|
|
|
> }
|
|
|
|
>
|
2004-06-21 19:23:36 +01:00
|
|
|
Index: src/wix/Compiler.cs
|
|
|
|
===================================================================
|
|
|
|
RCS file: /cvsroot/wix/wix/src/wix/Compiler.cs,v
|
2004-11-01 11:45:29 +00:00
|
|
|
retrieving revision 1.14
|
|
|
|
diff -w -r1.14 Compiler.cs
|
|
|
|
847c847
|
|
|
|
< this.AddRegistryKey(sourceLineNumbers, null, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context[i]), String.Empty, String.Concat("\"[!", fileServer, "]", argument == null ? String.Empty : " ", argument, "\""), componentId); // ClassId context
|
|
|
|
---
|
|
|
|
> this.AddRegistryKey(sourceLineNumbers, null, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context[i]), String.Empty, String.Concat("\"[#", fileServer, "]", argument == null ? String.Empty : " ", argument, "\""), componentId); // ClassId context
|
|
|
|
2352a2353,2358
|
|
|
|
> // if a Value attribute was given by itself, make this a type 19 custom action
|
|
|
|
> if( sourceBits == 0 && targetBits == MsiInterop.MsidbCustomActionTypeTextData )
|
|
|
|
> {
|
|
|
|
> sourceBits = MsiInterop.MsidbCustomActionTypeSourceFile;
|
|
|
|
> }
|
|
|
|
>
|
|
|
|
3881c3887
|
|
|
|
< minDate = attrib.Value;
|
|
|
|
---
|
|
|
|
> minDate = Common.GetFileTimeFromDateTime( attrib.Value ).ToString();
|
|
|
|
3884c3890
|
|
|
|
< maxDate = attrib.Value;
|
|
|
|
---
|
|
|
|
> maxDate = Common.GetFileTimeFromDateTime( attrib.Value ).ToString();
|
|
|
|
8187a8194,8207
|
|
|
|
> case "Delete":
|
|
|
|
> switch (attrib.Value)
|
|
|
|
> {
|
|
|
|
> case "install":
|
|
|
|
> events |= MsiInterop.MsidbServiceControlEventDelete;
|
|
|
|
> break;
|
|
|
|
> case "uninstall":
|
|
|
|
> events |= MsiInterop.MsidbServiceControlEventUninstallDelete;
|
|
|
|
> break;
|
|
|
|
> case "both":
|
|
|
|
> events |= MsiInterop.MsidbServiceControlEventDelete | MsiInterop.MsidbServiceControlEventUninstallDelete;
|
|
|
|
> break;
|
|
|
|
> }
|
|
|
|
> break;
|
|
|
|
9685a9706
|
|
|
|
>
|
2004-06-21 19:23:36 +01:00
|
|
|
Index: src/wix/Preprocessor.cs
|
|
|
|
===================================================================
|
|
|
|
RCS file: /cvsroot/wix/wix/src/wix/Preprocessor.cs,v
|
2004-11-01 11:45:29 +00:00
|
|
|
retrieving revision 1.6
|
|
|
|
diff -w -r1.6 Preprocessor.cs
|
|
|
|
274c274
|
|
|
|
< context = new IfContext(context.IsTrue & context.Active, this.variables.ContainsKey(reader.Value.Trim()), IfState.If);
|
|
|
|
---
|
|
|
|
> context = new IfContext(context.IsTrue & context.Active, this.IsDefined(reader.Value.Trim()), IfState.If);
|
|
|
|
279c279
|
|
|
|
< context = new IfContext(context.IsTrue & context.Active, !this.variables.ContainsKey(reader.Value.Trim()), IfState.If);
|
|
|
|
---
|
|
|
|
> context = new IfContext(context.IsTrue & context.Active, !this.IsDefined(reader.Value.Trim()), IfState.If);
|
|
|
|
360a361,362
|
|
|
|
> case "error":
|
|
|
|
> throw new WixPreprocessorException(this.GetCurrentSourceLineNumbers(), this.PreprocessVariables(reader.Value));
|
|
|
|
419a422,437
|
|
|
|
> /// Returns true if the symbol exists.
|
|
|
|
> /// </summary>
|
|
|
|
> /// <param name="symbol">symbol name to check</param>
|
|
|
|
> /// <returns>true if symbol is defined</returns>
|
|
|
|
> private bool IsDefined(string symbol)
|
|
|
|
> {
|
|
|
|
> if( symbol.StartsWith("env.") )
|
|
|
|
> return Environment.GetEnvironmentVariable(symbol.Substring(4)) != null;
|
|
|
|
> if( symbol.StartsWith("var.") )
|
|
|
|
> return this.variables.ContainsKey(symbol.Substring(4));
|
|
|
|
> if( symbol.StartsWith("sys.") )
|
|
|
|
> return this.systemVariables.ContainsKey(symbol.Substring(4));
|
|
|
|
> return this.variables.ContainsKey(symbol);
|
|
|
|
> }
|
|
|
|
>
|
|
|
|
> /// <summary>
|
2004-08-05 18:23:25 +01:00
|
|
|
Index: src/wix/wix.csproj
|
|
|
|
===================================================================
|
|
|
|
RCS file: /cvsroot/wix/wix/src/wix/wix.csproj,v
|
|
|
|
retrieving revision 1.4
|
2004-11-01 11:45:29 +00:00
|
|
|
diff -w -r1.4 wix.csproj
|
|
|
|
661a662,666
|
|
|
|
> RelPath = "Xsd\wix.xsx"
|
|
|
|
> DependentUpon = "wix.xsd"
|
|
|
|
> BuildAction = "None"
|
|
|
|
> />
|
|
|
|
> <File
|
|
|
|
664a670,674
|
|
|
|
> <File
|
|
|
|
> RelPath = "Xsd\wixloc.xsx"
|
|
|
|
> DependentUpon = "wixloc.xsd"
|
|
|
|
> BuildAction = "None"
|
|
|
|
> />
|
2004-06-21 19:23:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
STEP J. Build Wix MSI install package
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
From the %AFSROOT% directory execute:
|
2004-06-21 19:23:36 +01:00
|
|
|
|
|
|
|
nmake /f NTMakefile wix
|
|
|
|
|
|
|
|
Make sure the binaries installed to \src\wix\release\ship are
|
|
|
|
available in the PATH environment variable
|
|
|
|
|
|
|
|
|
|
|
|
STEP K. Final Results
|
2004-02-26 19:22:35 +00:00
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
The build process generates its binaries in %AFSROOT%\DEST. The subdirectory
|
2004-02-26 19:22:35 +00:00
|
|
|
would look like the following:
|
|
|
|
|
2004-11-01 11:45:29 +00:00
|
|
|
%AFSROOT%\DEST\{checked,free}\
|
2004-02-26 19:22:35 +00:00
|
|
|
bin
|
|
|
|
etc
|
|
|
|
include
|
|
|
|
lib
|
|
|
|
root.client
|
|
|
|
root.server
|
|
|
|
WinInstall
|
|
|
|
|
2004-03-18 04:03:21 +00:00
|
|
|
Bin - contains build utilities.
|
|
|
|
root.client - contains Open AFS binaries
|
|
|
|
root.server - contain Open AFS Server binaries
|
2004-11-01 11:45:29 +00:00
|
|
|
WinInstall\OpenAFSforWindows.exe - is the NSIS install package
|
|
|
|
WinInstall\openafs-en_US.msi - is the WiX MSI install package
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
|
2004-06-21 19:23:36 +01:00
|
|
|
STEP L. Optional Items
|
2004-02-26 19:22:35 +00:00
|
|
|
|
|
|
|
The build process has an error table that is compiled for many OpenAFS
|
|
|
|
applications. This table is generated by Unix based tools. It is not
|
|
|
|
normally necessary to modify this table so pre-generated source files
|
|
|
|
are included in the OpenAFS source. If you need to make modifications
|
|
|
|
in these areas the Unix base tools that run on Windows can be found on
|
|
|
|
the web. For example:
|
|
|
|
|
|
|
|
http://cygwin.com/
|
|
|
|
|
|
|
|
Below is a short explanation how to update the error table.
|
|
|
|
|
|
|
|
(1) Install flex and bison from a Unix based tool provider.
|
|
|
|
|
|
|
|
(2) Make changes to the source files.
|
|
|
|
|
|
|
|
There are two files in the source tree that are processed with lex
|
|
|
|
and yacc on UNIX systems, src/comerr/et_lex.lex.l and
|
|
|
|
src/comerr/error_table.y, that when processed produce the files
|
|
|
|
et_lex.lex_nt.c, error_table_nt.c, and error_table_nt.h.
|
|
|
|
|
|
|
|
Since NT does not include lex and yacc or any equivalent tools, we
|
|
|
|
have provided the output files that lex and yacc produce (using Win32
|
|
|
|
ports of flex and bison). This will allow builds to work for anyone
|
|
|
|
who does not need to change the .l and .y files.
|
|
|
|
|
|
|
|
If you do need to change et_lex.lex.l, then you will need to install
|
|
|
|
Win32 port of flex on your system. Put flex.exe in a directory on the
|
|
|
|
path and rebuild.
|
|
|
|
|
|
|
|
If you do need to change error_table.y, then you will need to install
|
|
|
|
a Win32 port of bison on your system. Put bison.exe in a directory on
|
|
|
|
the path, configure bison as explained in step 5, and rebuild.
|
|
|
|
|
|
|
|
You can also attempt to use other replacements for lex and yacc. This
|
|
|
|
will require modifying the LEX and YACC settings in
|
|
|
|
/config/NTMakefile.i386_nt40. If the replacements require different
|
|
|
|
command line options than flex and bison, then you may also need to
|
|
|
|
change src/comerr/NTMakefile.
|
|
|
|
|
|
|
|
(3) Generate new OpenAFS binaries
|