Skip to content

Commit 8e64c02

Browse files
Merge pull request #113 from oursland/pixi
Replace documentation for building with conda for building with pixi.
2 parents d4ce758 + d9d1ffa commit 8e64c02

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

gettingstarted/index.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ To work on FreeCAD you will need CMake, git, a code editor, a C++ compiler, and
1717
- On MacOS you will need to install the XCode command line tools, and can use XCode, Visual Studio Code, or CLion as your editor.
1818

1919
Other combinations may work as well, these are just the ones that you will be able to get help with most readily on the [FreeCAD Forum](https://forum.freecad.org).
20+
2021
## Dependencies
2122

2223
See also [Dependencies](dependencies.md)
@@ -27,18 +28,48 @@ FreeCAD depends on many other open source projects to provide the basic foundati
2728
- Windows: [https://wiki.freecad.org/Compile_on_Windows](https://wiki.freecad.org/Compile_on_Windows)
2829
- Mac: [https://wiki.freecad.org/Compile_on_MacOS](https://wiki.freecad.org/Compile_on_MacOS)
2930

30-
### Conda
31+
### Pixi
3132

3233
One of the easiest ways of creating a standalone FreeCAD build environment with its dependencies in a way that does not affect the rest of your system is to use
33-
Conda. Install Miniconda on your system, then use one of the setup scripts included with the FreeCAD source code to create the appropriate
34-
environment, e.g. `conda/setup-environment.sh`. Once complete, activate the environment with `conda activate freecad`. This creates an environment
35-
that you can run your build system in. For example, on MacOS from the top of a FreeCAD source code clone:
34+
[Pixi](https://pixi.sh/latest/).
35+
36+
1. Install `pixi` using the following command:
37+
38+
- Windows (PowerShell): `iwr -useb https://pixi.sh/install.ps1 | iex`
39+
- Linux/macOS: `curl -fsSL https://pixi.sh/install.sh | bash`
40+
41+
2. Configure FreeCAD for your platform. There are additional steps necessary on Windows outlined in the next subsection.
42+
43+
`pixi run configure`
44+
45+
3. Build FreeCAD
46+
47+
`pixi run build`
48+
49+
If your computer has less ram than is necessary to run a compiler per processor core, then you can reduce the number of parallel compiler jobs. For example, if you wish to limit to 4 parallel compiler processes use the following command:
50+
51+
`pixi run build -j 4`
52+
53+
4. Run FreeCAD
54+
55+
`pixi run freecad`
56+
57+
In general, there will be no need to re-run the configure command as it will be automatically run by `pixi run build` if needed. However, there may be times in which a git submodule is added or updated. To integrate these changes, the command `pixi run initialize` will run the commands necessary.
58+
59+
### Pixi on Windows
60+
61+
Pixi uses the `conda-forge` packages, including the `compilers` metapackage to bring in the platform-specific compiler support. On Windows, it is expected that Microsoft Visual C++ has been installed and matches the version used by the `conda-forge` team, which is [Visual Studio Community 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products).
62+
63+
The Visual Studio Installer may be used to install Visual Studio Community 2019 alongside newer versions of Visual Studio. Ensure all of the necessary components are installed:
64+
65+
1. Open the Visual Studio Installer
66+
2. Click `modify` for Visual Studio 2019.
67+
68+
![Visual Studio 2019](resources/vs2019-modify.png)
3669

37-
- `conda/setup-environment.sh`
38-
- `conda activate freecad`
39-
- `cmake -B build/debug --preset conda-macos-debug .`
40-
- `cmake --build . --parallel`
70+
3. Make sure to select `Desktop development with C++` under the `Desktop & Mobile` section. Ensure that the necessary optional items are selected on the right.
4171

72+
![vs2019-dev-C++](resources/vs2019-cpp.png)
4273

4374
## Setting up for Development
4475

217 KB
Loading
173 KB
Loading

0 commit comments

Comments
 (0)