Skip to content

Instantly share code, notes, and snippets.

@loociano
Last active May 17, 2020 21:45
Show Gist options
  • Save loociano/c177d14a6aba27d399ed3e69143f4337 to your computer and use it in GitHub Desktop.
Save loociano/c177d14a6aba27d399ed3e69143f4337 to your computer and use it in GitHub Desktop.
Running Cura from Source on Windows

Luc's Workflow to build Cura on Windows

Part One

  1. Clone cura-build-environment

    git clone https://github.com/Ultimaker/cura-build-environment
    
  2. Run Developer Command Prompt for VS2015 as administrator and execute:

    cd cura-build-environment
    mkdir build
    mkdir install_dir
    cd build
    ..\env_win64.bat
    cmake -DCMAKE_BUILD_TYPE=Release ^
          -DCMAKE_INSTALL_PREFIX="C:\Users\loociano\workspace\cura-build-environment\install_dir" ^
          -DCMAKE_PREFIX_PATH="C:\Users\loociano\workspace\cura-build-environment\install_dir" ^
          -G "NMake Makefiles" ^
          ..
    nmake
    
  3. Update Windows PATH with the following entries:

    • C:\Users\loociano\workspace\cura-build-environment\install_dir\bin
    • C:\Users\loociano\workspace\cura-build-environment\install_dir\Scripts
  4. Install dependencies

    pip3 install trimesh

Part two

  1. Clone cura-build

    git clone https://github.com/Ultimaker/cura-build
    
  2. In a regular Windows Command Prompt, as administrator, run:

    mkdir build
    cd build
    ..\env_win64.bat
    cmake -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_INSTALL_PREFIX="C:/Users/loociano/workspace/cura-build/install_dir" ^
    -DCMAKE_PREFIX_PATH=C:/Users/loociano/workspace/cura-build-environment/install_dir ^
    -DSIGN_PACKAGE=OFF ^
    -G "MinGW Makefiles" ..
    

    Verify that the python interpreter built in Part One is detected:

    Found Python3: C:/Users/loociano/workspace/cura-build-environment/install_dir/bin/python.exe (found version "3.5.7")
    ...
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/loociano/workspace/cura-build/build
    
  3. Build and package:

    mingw32-make
    ...
    [100%] Packaging Projects...
    [100%] Built target packaging
    
  4. This will create a package directory containing Cura.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment