Skip to content

Windows Setup note

Kentaro "zigen" Teramoto edited this page Oct 18, 2021 · 5 revisions

step to set up a Windows development environment for QuISP

If you're using OMNeT++5.7, you don't need to do these steps. you already have the new version of toolchain.

TL;DR setup script

IF NOT EXIST "omnet5.zip" (curl -o omnet5.zip -LJ --url "https://github.com/omnetpp/omnetpp/releases/download/omnetpp-5.6.2/omnetpp-5.6.2-src-windows.zip")
IF NOT EXIST "omnet6.zip" (curl -o omnet6.zip -LJ --url "https://github.com/omnetpp/omnetpp/releases/download/omnetpp-6.0pre11/omnetpp-6.0pre11-src-windows.zip")
IF NOT EXIST "omnetpp-5.6.2" (
  IF NOT EXIST "omnet5" (call powershell -Command "Expand-Archive -Force omnet5.zip")
  move omnet5\omnetpp-5.6.2 .
  rmdir omnet5
)
IF NOT EXIST "omnetpp-6.0pre11" (
  IF NOT EXIST "omnet6" (call powershell -Command "Expand-Archive -Force omnet6.zip")
  move omnet6\omnetpp-6.0pre11 .
  rmdir omnet6
)
IF EXIST "omnetpp-6.0pre11" (
  del omnetpp-5.6.2\mingwenv.cmd
  rmdir /s /q omnetpp-5.6.2\tools
  move omnetpp-6.0pre11\mingwenv.cmd omnetpp-5.6.2\mingwenv.cmd
  move omnetpp-6.0pre11\tools omnetpp-5.6.2\
  rmdir /s /q omnetpp-6.0pre11
)
 
pause
call "omnetpp-5.6.2\mingwenv.cmd"

detail

download OMNeT++5 and OMNeT++6 preview

choose windows and download it and unzip it

I tried with OMNeT++ 6.0 preview11 and OMNeT++ 5.6.2

move OMNeT++6's tools into OMNeT++5

tools directory contains msys2 and the toolchain.

  1. remove the OMNeT++5's tools directory and mingwenv.cmd
  2. move OMNeT++6's tools directory and mingwenv.cmd to OMNeT++5's directory.

set up msys2

  1. just click mingwenv.cmd in the OMNeT++5 directory and follow the prompt says.
  2. when finish setting up, you can see the msys2 terminal.
  3. you can see clang-format --version shows that you have a newer version of clang: 11.0.0

build OMNeT++5

  1. run ./configure. you may need to disable OSG by editing the configure.user file.
  2. run make -j. it will take a long time.
  3. now you built OMNeT++5 with a new msys2 environment!

build QuISP

install eigen and set PKG_CONFIG_PATH and tweak eigen3.pc

build google test

you need to run cmake .. -G "Unix Makefiles" in the googletest/build` dir. later I'll send PR to fix this

note

for development QuISP with windows, we need clang 11 or later and its toolchain (clang-format and clang-tidy), but OMNeT++5 contains an old version of msys2 and the toolchain. msys2 provides pacman the package manager, but we cannot update the toolchain (includes clang) because of the pacman's drastic change.

I tried to upgrade the pacman and msys2-runtime but it's pretty difficult to do it. so I gave up and found another way to update msys2 and the toolchain.