13. Compiling from source¶
13.1. Installing Kopano Core from Source¶
KC is not officially supported by Kopano when build from source, yet in some situations - i.e. using KC on unsupported environments, or when preparing patches for KC - it is very useful to install from source. Since KC is distributed under an open source license (AGPLv3), it is in one’s right to build KC from source.
How to exactly install KC from source is a procedure that is slightly different for each distribution and subject to change.
13.1.1. Requirements¶
The latest build and run time requirements can be obtained from https://stash.kopano.io/projects/KC/repos/kopanocore/browse/doc/install.txt.
Assuming the dependencies correctly installed, the basic build process is started with:
./configure --enable-epoll \
--enable-unicode \
--enable-python \
--disable-static \
--with-userscript-prefix=/etc/kopano/userscripts \
--with-quotatemplate-prefix=/etc/kopano/quotamail
make
make install
Important
Please note that builds from source are not covered by the support subscription. For support, please use the released builds which are quality tested by Kopano.
13.2. Installing Kopano MMC Snap-in from Source¶
To compile and install the Kopano AD Snap-in from source the following required tools need to be installed. Afterwards we are going to build the source and register the binaries to get the Kopano MMC Snap-in extension. Once the binaries (DLLs) are built, these can be used on every other Windows box. gacutil is not included on a default Windows system, but it is possible to just copy gacutil and use it to register the binaries.
13.2.1. Requirements¶
- Windows system
- Remote Server Administration Tools for Windows
- 7-Zip (or any program to unzip the tar archive)
- MSBuild.exe (Microsoft Build Tools 2015)
- NuGet.exe
- RegAsm.exe (.NET Framework 4)
- gacutil.exe (.NET Framework 4.6 Software Development Kit)
13.2.2. Download the source code¶
The source code can be checked out from the Kopano Git. The code for the extension can be found in the mmc-plugin subfolder.
13.2.3. Download and install Microsoft Build Tools 2015¶
Download and install Microsoft Build Tools 2015 for building the binaries:
PowerShell -Command "& {Invoke-WebRequest -Uri https://download.microsoft.com/download/E/E/D/EEDF18A8-4AED-4CE0-BEBE-70A83094FC5A/BuildTools_Full.exe -OutFile $env:TMP\BuildTools_Full.exe}
"%TMP%\BuildTools_Full.exe" /Quiet /NoRestart
13.2.4. Download NuGet¶
Download NuGet for downloading the dependencies:
PowerShell -Command "& {Start-BitsTransfer -Source https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -Destination $env:TMP}"
13.2.5. Download and install .NET Framework 4.6 Software Development Kit¶
Download and install NET Framework 4.6 Software Development Kit for registering the binaries:
PowerShell -Command "& {Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/p/?LinkID=822845 -OutFile $env:TMP\SDKSETUP.EXE}
"%TMP%\SDKSETUP.EXE" /features OptionId.NetFxSoftwareDevelopmentKit /quiet /norestart
13.2.6. Build the binaries¶
Get the dependencies with NuGet and build the binaries with MSBuild:
nuget.exe restore "%TMP%\kopano_ad_extension_VERSION\mmc-plugin\KopanoADS\KopanoADS.sln"
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" "%TMP%\kopano_ad_extension_Version\mmc-plugin\KopanoADS\KopanoADS.sln"
13.2.7. Register the binaries¶
Register the binaries with RegAsm and gacutil, to do this a command line with administrator privileges is needed:
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil.exe" -u Tulpep.ActiveDirectoryObjectPicker
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil.exe" -u KopanoADS
"%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" "%TMP%\kopano_ad_extension_VERSION\mmc-plugin\KopanoADS\Build\Debug\KopanoADS.dll"
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil.exe" -i "%TMP%\kopano_ad_extension_VERSION\mmc-plugin\KopanoADS\Build\Debug\Tulpep.ActiveDirectoryObjectPicker.dll"
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil.exe" -i "%TMP%\kopano_ad_extension_VERSION\mmc-plugin\KopanoADS\Build\Debug\KopanoADS.dll"
13.2.8. Verify installation¶
Verify if the MMC Snap-in extension installed correctly, there should be Kopano tabs available: