maphew

Compiling Fossil

February 28, 2023

Set up build environment

Install VS compilation environment as per Stork Search routine.

winget install "strawberry perl"

 

Build OpenSSL

pushd compat
wget https://www.openssl.org/source/openssl-3.0.8.tar.gz
md openssl
tar -zx -C openssl --strip-components=1 -f openssl-3.0.8.tar.gz
cd openssl
perl Configure VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers no-shared
nmake /f makefile
popd
win\buildmsvc.bat FOSSIL_ENABLE_SSL=1 FOSSIL_ENABLE_JSON=1 clean fossil.exe

Verify dependencies (e.g. make sure openssl is listed):

dumpbin /dependents fossil.exe
zip fossil-w64-$VERSION.zip fossil.exe
fossil uv add fossil-w64-$VERSION.zip
fossil uv sync

From <https://fossil-scm.org/forum/forumpost/e41c005b36>
From <https://fossil-scm.org/home/wiki?name=Release+Build+How-To>

 

Notes on tar extraction

The -C flag assumes a directory is already in place so the contents of the tar file can be expanded into it. hence the mkdir FOLDER.

The --strip-components flag is used when a tar file would naturally expand itself into a folder, let say, like github where it examples to repo-name-master folder. Of course you wouldn’t need the first level folder generated here so --strip-components set to 1 would automatically remove that first folder for you. The larger the number is set the deeper nested folders are removed.

From <https://superuser.com/questions/146814/unpack-tar-but-change-directory-name-to-extract-to>