Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,4 @@ Testing/

*.bak
____*.*
CMakeFiles/
45 changes: 20 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
## How to Build

- Registered NuGet package was built using the following versions.
- [RDKit Release_2021_09_4](https://github.com/rdkit/rdkit/releases/tag/Release_2021_09_4)
- [RDKit Release_2023_09_6](https://github.com/rdkit/rdkit/releases/tag/Release_2023_09_6)
- [Eigen 3.3.8](https://gitlab.com/libeigen/eigen/-/releases/3.3.8)
- for Windows
- [Boost 1.74.0](https://sourceforge.net/projects/boost/files/boost-binaries/1.74.0/)
- [Cairo 1.16.0](https://www.cairographics.org/releases/cairo-1.16.0.tar.xz)
- [libpng 1.6.37](https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz)
- [pixman 0.40.0](https://www.cairographics.org/releases/pixman-0.40.0.tar.gz)
- [zlib 1.2.11](https://zlib.net/zlib1211.zip)
- [CMAKE 3.18.20081302-MSVC_2](https://cmake.org/)
- Visual Studio 2019
- [Python 3.9](https://www.python.org/)
- [zlib 1.3.1](https://zlib.net/zlib131.zip)
- [CMAKE 33.30.5-msvc23](https://cmake.org/)
- Visual Studio 2022
- [Python 3.12](https://www.python.org/)
- [SWIG 3.0.12](http://www.swig.org/)
- dotnet-sdk-5.0
- dotnet-sdk-8.0
- for Linux
- Ubuntu 18.04.6 LTS on WSL2
- Ubuntu 24.04.2 LTS on WSL2

### Build Instruction

Expand All @@ -37,8 +37,8 @@ Do the following procedure.
#### Build native binaries for Windows 10 (x64)

- On Windows 10 (x64)
- Install Visual Studio 2019 enabling C++, C# and CMAKE.
- Install Python version greater than 3.8.
- Install Visual Studio 2022 enabling C++, C# and CMAKE.
- Install Python version greater than 3.12.
- Install [SWIG](http://www.swig.org/).
- IMPORTANT: SWIG-3.0 is required. SWIG-4.0 does not work.
- Make sure Python and SWIG are executable.
Expand All @@ -51,31 +51,26 @@ Do the following procedure.
- [zlib](https://zlib.net/) to `zlib-#.#.##`.
- [libpng 1.6](http://www.libpng.org/pub/png/libpng.html) to `lpng16##`.
- [FreeType](https://www.freetype.org/) to `freetype-#.##.#`.
- Download binery archives of both 32-bit and 64-bit versions of Boost for Visual Studio 2019, ie, msvc-14.2.
- Download binery archives of both 32-bit and 64-bit versions of Boost for Visual Studio 2022, ie, msvc-14.2.
- [https://sourceforge.net/projects/boost/files/boost-binaries/](https://sourceforge.net/projects/boost/files/boost-binaries/).
- Execute EXE files to extract. Defaults to store to `C:\local`.
- Copy `boost_#_##_#` directory here.
- Only dll and lib, ie, the files in `lib64-msvc-14.#` and `lib32-msvc-14.#`, are used to build.
- After above, `lib64-msvc-14.#` and `lib32-msvc-14.#` should be created under `boost_#_##_#` directory.
- Customize `config.txt` file according to where above dependencies are installed.
- Open `Developer Command Prompt for VS 2019`.
- Open `Developer Command Prompt for VS 2022`.
- Execute `bash build_win.bat` to create native binaries in `${RDKIT_DIR}/Code/JavaWrappers/csharp_wrapper/win/`.

#### Build native binaries for Ubuntu 18.4

- Don't share with Windows build.
- Ubuntu 18.4 is recommended.
- Install python 3.8 or greater, swig 3.0, and eigen3.
- Install dotnet-sdk-5.0 and Mono.
- Ubuntu 24.04 is recommended.
- Install python 3.12 or greater, swig 3.0, and eigen3.
- Install dotnet-sdk-8.0 and Mono.
```bash
sudo wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
sudo dpkg -i packages-microsoft-prod.deb && \
sudo rm packages-microsoft-prod.deb && \
sudo apt-get update && \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-5.0 && \
sudo apt-get install -y mono-mcs
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0 && \
sudo apt-get install -y mono-mcs
```
- Clone this repository.
- Download the following source archives and extract them here.
Expand All @@ -86,18 +81,18 @@ sudo wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-
#### Build .NET wrapper

- On Windows 10 (x64)
- Open `Developer Command Prompt for VS 2019`.
- Open `Developer Command Prompt for VS 2022`.
- Execute `python ./build_rdkit_csharp.py --build_wrapper` to create assembry files named `RDKit2DotNet.dll` in `${RDKIT_DIR}\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet\bin\Release\`.

#### Build and create NuGet package

- Open `Developer Command Prompt for VS 2019`.
- Open `Developer Command Prompt for VS 2022`.
- Copy native binaries for Linux to `${RDKIT_DIR}/Code/JavaWrappers/csharp_wrapper/linux/`.
- Execute `python ./build_rdkit_csharp.py --build_nuget` to create NuGet package on `${RDKIT_DIR}\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet\bin\Release\`.

#### Copy created NuGet package to myApp

- Open `Developer Command Prompt for VS 2019`.
- Open `Developer Command Prompt for VS 2022`.
- Execute `nmake -f Makefile.win copy_to_myapp`.

### Install SWIG-3.0.12
Expand Down
4 changes: 2 additions & 2 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ if [ "$?" != "0" ] ; then
exit 1
fi

python --version | grep -E "Python 3\.(8|9|10)\." > /dev/null
python --version | grep -E "Python 3\.(8|9|10|11|12)\." > /dev/null
if [ "$?" != "0" ] ; then
echo Python version is 3.8, 3.9, or 3.10.
echo Python version is lower than 3.8.
exit 1
fi

Expand Down
Loading