Skip to content

Getting Started: Windows

Eric Sessoms edited this page Dec 27, 2021 · 4 revisions

The Windows release can build either with Visual Studio or Mingw.

See also Getting Started.

Visual Studio

You will need

Visual Studio and Python 3 are both also available through the Microsoft Store.

First download and extract the distribution (either AMD64_NT or I386_NT), then launch the appropriate developer command prompt:

  • for 32-bit Windows (I386_NT), run x86 Native Tools Command Prompt, or
  • for 64-bit Windows (AMD64_NT), run x64 Native Tools Command Prompt.

If this is not clear, please refer to Microsoft's documentation on command-line use of Visual Studio https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line

Once you have the command-line, you will need to create a scratch directory to use in building the bootstrap compiler. Having setup everything, the install script can now run.

curl -LO https://github.com/modula3/cm3/releases/download/d5.11.4/cm3-dist-AMD64_NT-d5.11.4.7z
7z x cm3-dist-AMD64_NT-d5.11.4.7z
mkdir build
cd build
python3 ..\cm3\scripts\concierge.py install --prefix C:\cm3
set PATH=C:\cm3\bin;%PATH%

You can then delete the build directory.

The steps are the same for 32-bit or 64-bit, the only difference is the environment established by the Visual Studio command-line tools.

Mingw

To build Mingw, you will need MSYS2. The build should work under Cygwin, but we build and test using MSYS2, so the instructions here are for MSYS2.

First install the prerequisites.

pacman -S base-devel mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain

Then continue with the MSYS MinGW 64-bit command prompt. (MinGW 32-bit does not yet work.)

curl -LO https://github.com/modula3/cm3/releases/download/d5.11.4/cm3-dist-AMD64_NT-d5.11.4.7z
7z x cm3-dist-AMD64_NT-d5.11.4.7z
mkdir build
cd build
../cm3/scripts/concierge.py install --prefix /c/cm3
PATH=/c/cm3:$PATH

Again, the steps are essentially the same as for the Visual Studio builds, the only difference is the environment established by the MSYS2 command-line tools.

Clone this wiki locally