Skip to content

Commit

Permalink
Update readme for new, simpler build process
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed May 13, 2024
1 parent 0dff7e5 commit 14e2a94
Showing 1 changed file with 24 additions and 34 deletions.
58 changes: 24 additions & 34 deletions src/native/windows/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Configuring and Building Apache Commons Daemon on Windows

Using Visual Studio, you can build Apache Commons Daemon.
The Makefile make file has a bunch of documentation about its
options, but a trivial build is simply;
options, but a trivial build is simply:

All builds

Set the JAVA_HOME environment variable to point to a Java 8 (or later) SDK.

Windows X64 Build

Expand All @@ -17,47 +21,33 @@ Windows X64 Build

Windows X86 Build

For MVS under "C:\Program Files (x86)":
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"

For MVS under "C:\Program Files":
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars.bat"

nmake CPU=X86
nmake CPU=X86 PREFIX=c:\desired\path\of\daemon install


Release Builds
==============

We jump through some additional hoops for release builds to avoid additional
dependencies over and above those DLLs that are known to be present on every
Windows install. If you build the binaries with a recent version of Visual
Studio then it is likely the resulting binaries will have additional
dependencies. You can check this with the Depends.exe tool provided with Visual
Studio.

Release builds are build with Mladen Turk's (mturk) Custom Microsoft Compiler
Toolkit Compilation. This can be obtained from:
https://github.com/mturk/cmsc
Version: 15.0.44
Additional configuration
========================

Later versions of CMSC should also work.
Specifying the installation location (defaults to .\..\..\..\..\..\target which
places the binary in the correct location for a release build):

A detailed description of the full environment used for recent release builds is
provided at:
https://cwiki.apache.org/confluence/display/TOMCAT/Common+Native+Build+Environment

The steps to produce the Windows binaries is then:

1. cd $GIT_CLONE_DIR\src\native\windows\apps\prunmgr

2. $CMSC_ROOT\setenv.bat x86

3. nmake -f Makefile

4. cd ..\prunsrv

5. nmake -f Makefile
nmake CPU=X86 PREFIX=c:\desired\path\of\daemon install

6. $CMCS_ROOT\setenv.bat x64
Use the 'Hybrid CRT' technique so the resulting binaries work on a clean Windows
installation with no additional dependencies:

7. nmake -f Makefile
nmake CPU=X86 STATIC_CRT=Hybrid


Release Builds
==============

Release builds must use STATIC_CRT=Hybrid.

It is not necessary to build a 64-bit version of prunmgr since the 32-bit
version works with both 32-bit and 64-bit services.

0 comments on commit 14e2a94

Please sign in to comment.