Compiling on Windows with MinGW w64 - Unarelith/OpenMiner GitHub Wiki

Step 1: Installation of required tools

Git

  • Install Git using the official installer
    • During Git installation, make sure to select "commit Unix-style line endings" when prompted

CMake

MSYS2

  • Download and install MSYS2: https://msys2.org/
  • Run MSYS2 and install Make and GCC using pacman -S mingw-w64-i686-make mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-i686-gcc
  • Add MinGW-w64 to the PATH environment variable
    • Press Windows key and type "env", you should see something like "Edit environment variables", click on that
    • On the popup, select "Environment variables..."
    • Select "Path" and click "Edit..."
    • Add the path to the variable, for example C:\msys64\mingw32\bin
    • Make sure this line is the first one

Step 2: OpenMiner compilation

  • Open a PowerShell or cmd.exe
  • Clone the repository using git clone https://github.com/Unarelith/OpenMiner
  • Go inside OpenMiner folder using cd OpenMiner
  • Run these commands:
    • cmake -B build -G "MinGW Makefiles" .
    • cmake --build build -j8

Step 3: Running OpenMiner

Using File Explorer

  • Copy all the .dll files from build folder to the root of the project
  • Copy build\openminer.exe to the root of the project and run it

Using cmd.exe

  • Open a cmd.exe in OpenMiner folder
  • Run build\openminer.exe

Using PowerShell

  • Open a PowerShell in OpenMiner folder
  • Run .\build\openminer.exe

Troubleshooting

  • If you have issues with missing DLLs, they may be in build folder, try to move them next to openminer.exe