A new Windows AFS build script

If you’re new to building the OpenAFS Windows client from source, getting your build machine properly configured can be a daunting task. The current process involves editing lines in a file named ntbuild.bat with things like the type of client to be built (32-bit, 64-bit, debug, etc) and the ‘8.3′ names of the paths to various installed products. If you have multiple build machines, you have multiple versions of this file.

Winafsbld is a set of batch files that replaces ntbuild.bat. Once all is said and done, it uses the same build mechanism as ntbuild.bat does but wraps it in a much more user-friendly environment. It does away with the need for the ‘8.3′ names and does a lot of parameter checking before it starts the build.

Winafsbld with instructions is available here as a zip file.

  • Winafsbld

Here is a sample from the instructions:

Winafsbld.bat is executed from the same location as ntbuild.bat. It sets various configuration environment variables and calls batch files in the
winafsbld directory.

No changes should be required in any of the files in the winafsbld directory.

Use Notepad (etc) to review winafsbld.bat. Options should be clear. (Note that a signing certificate is required for this release despite the options given.)

Open a console window and type ‘winafsbld’. If on Vista, open a console window with ‘Run as Administrator’ and navigate from the system directory to your build directory.

As currently implemented, the console window will turn blue to indicate a configuration error, red to indicate an error or green to indicate success.

Failures will spawn Notepad with the log file.

It is not a good idea to re-run Winafsbld.bat from the same console window as various environment variables will be modified each time the batch file is run. Close the console window and open a new one.

Topics: 
Special Type: