UltiMaker uses functional, analytical and tracking cookies. Tracking cookies enhance your experience on our website and may also collect your personal data outside of Ultimaker websites. If you agree with the use of tracking cookies, click “I agree, continue browsing”. You can withdraw your consent at any time. If you do not consent with the use of tracking cookies, click “Refuse”. You can find more information about cookies on our Privacy and Cookie Policy page.
Activating Conan run environment and running CuraEngine from command line
Posted
· Activating Conan run environment and running CuraEngine from command line
Assuming you are working on Windows and you have the following external build dependencies installed: Visual Studio 2022 C++, Python 3.6 or higher, sip 6.6.x or higher, CMake 3.23.x or higher, Ninja 1.10 or higher, Conan 1.52 or higher.
Getting to build and use CuraEngine should work with the following commands which are all run from Powershell as a normal user:
First we're gonna make sure that you start from a fresh situation, by updating Conan and making sure that you have SIP installed 6.6.2 (6.7.x seems to have a bug)
Then we're gonna clone CuraEngine and install the dependencies with the help of Conan. Notice the: -c tools.env.virtualenv:powershell=True argument, Since it is rather difficult to to determine in which shell the commands are run and which environment Conan needs to generate we need to explicitly set that to the Powershell environment. Normally we would have set this globally by default but the Conan recipes, for OpenSSL and CPython don't play nice with this yet.
This should download and build all dependencies, both release and debug and also create a build directory with a folder named generators in there, these contain the CMake modules with the information needed to link and build CuraEngine with the dependencies.
We can now generate the Ninja build files with CMake for each build type:
cmake --preset release
cmake --preset debug
and build CuraEngine for the build_type you want (note I'm not sure about the order of the --build and --preset release flag, if it fails try switching those)
cmake --build --preset release
The above command should build CuraEngine.exe in the directory: build/Release folder.
We can now activate the environment containing the Environmental paths for Windows, defined in the conanrun.ps1 which can be found in build/generator folder. This should add the location of the shared dependencies to the PATH.
This will copy all shared dll to the user space. If you then copy these dll's over to the Build folder next to CuraEngine.exe Windows will find these and use them.
Link to post
Share on other sites
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
Recommended Posts
JelleSpijker 1
Assuming you are working on Windows and you have the following external build dependencies installed: Visual Studio 2022 C++, Python 3.6 or higher, sip 6.6.x or higher, CMake 3.23.x or higher, Ninja 1.10 or higher, Conan 1.52 or higher.
Getting to build and use CuraEngine should work with the following commands which are all run from Powershell as a normal user:
First we're gonna make sure that you start from a fresh situation, by updating Conan and making sure that you have SIP installed 6.6.2 (6.7.x seems to have a bug)
Then we're gonna clone CuraEngine and install the dependencies with the help of Conan. Notice the: -c tools.env.virtualenv:powershell=True argument, Since it is rather difficult to to determine in which shell the commands are run and which environment Conan needs to generate we need to explicitly set that to the Powershell environment. Normally we would have set this globally by default but the Conan recipes, for OpenSSL and CPython don't play nice with this yet.
git clone https://github.com/Ultimaker/CuraEngine cd CuraEngine conan install . --build=missing --update -c tools.env.virtualenv:powershell=True conan install . --build=missing --update -s build_type=Debug -c tools.env.virtualenv:powershell=True
This should download and build all dependencies, both release and debug and also create a build directory with a folder named generators in there, these contain the CMake modules with the information needed to link and build CuraEngine with the dependencies.
We can now generate the Ninja build files with CMake for each build type:
cmake --preset release cmake --preset debug
and build CuraEngine for the build_type you want (note I'm not sure about the order of the --build and --preset release flag, if it fails try switching those)
cmake --build --preset release
The above command should build CuraEngine.exe in the directory: build/Release folder.
We can now activate the environment containing the Environmental paths for Windows, defined in the conanrun.ps1 which can be found in build/generator folder. This should add the location of the shared dependencies to the PATH.
Alternatively you can also try to add the Conan deploy generator https://docs.conan.io/en/latest/reference/generators/deploy.html#deploy-generator to the install command: -g deploy
This will copy all shared dll to the user space. If you then copy these dll's over to the Build folder next to CuraEngine.exe Windows will find these and use them.
Link to post
Share on other sites