Skip to content
Guilherme Brondani Torri edited this page Mar 18, 2020 · 24 revisions

Build Instructions

Note:

  • Currently Qucs is built under Windows using the MSYS2 environment and the MinGW compiler. (The old build instructions can be found below)
  • Check AppVeyor script to see how the develop branch is being build on every change.

Download MSYS2

  • Download the latest msys2-x86_64 from https://sourceforge.net/projects/msys2/files/Base/x86_64/ (currently msys2-x86_64-20170918.exe)

  • install it in C:\msys64, the default proposed installation directory, and run the shell, as proposed at the end of the installation. The shell can also be started manually, by running C:\msys64\mingw64.exe

    • MSYS2 NEEDS to be installed on a NTFS partition. If its installed at C:\msys64 it should not be a problem.

Install the needed packages

The following commands will be typed in the MSYS2 shell environment.

  • set the path using export PATH=/usr/local/bin:/usr/bin:/bin to be sure to use the MSYS2 tools in case you previously had installed MSYS1

  • update the package manager mirrors, pacman --noconfirm --sync pacman-mirrors

  • install the compiler, pacman --noconfirm -S base-devel mingw-w64-x86_64-toolchain

  • exit and relaunch the mingw64.exe

  • install these other packages

    • pacman --noconfirm -S git (takes some time)
    • pacman --noconfirm -S mingw-w64-x86_64-qt4 (takes even more time...)

Note

Apparently on Windows 10 setting --prefix=/usr/local is needed, otherwise the default installation directory is /mingw64. It can be omitted for other Windows versions.

Download and compile admsXml

wget.exe http://sourceforge.net/projects/mot-adms/files/adms-source/2.3/adms-2.3.4.tar.gz
tar -xf adms-2.3.4.tar.gz
cd adms-2.3.4
./configure --prefix=/usr/local && make install
cd ..

Get the Qucs source code

Clone the Git repository

git clone https://github.com/Qucs/qucs.git

Build the Qucs GUI application

Building the documentation will be disabled, as it requires a lot of dependencies. Ready-made PDF files for all the Qucs documentation for the current release can be found at https://sourceforge.net/projects/qucs/files/qucs-binary/0.0.19/

cd qucs 
./bootstrap
QTDIR=/c/msys64/mingw64/ ./configure --disable-doc --prefix=/usr/local
make install
cd ..

Qucs will be installed in /usr/local/bin

run qucs -v to check it's working correctly

Build Qucs-core

cd qucs-core 
./bootstrap
./configure --disable-dependency-tracking --with-mkadms=`which admsXml`
 make install
cd ..

the Qucs simulator will be installed in /usr/local/bin

run qucsator -v to check it's working correctly


OLD Build Instructions - Windows 8.1 - MinGW 4.8.2 - Qt 4.8.6

This page contains instructions on how to build and install with the Autotools and CMake build systems. The install path can be any of your choice, here we use C:\qucs-auto\ and C:\qucs-cmake to make a distinction.

Tested with Windows 8.1 Enterprise 90-day evaluation version, installed on a [Virtual box instance](instructions http://betanews.com/2013/10/21/install-windows-8-1-on-oracle-virtualbox/).

Dependencies

MinGW compiler

  • Use the same version used to compile the Qt libraries.

  • Compiler of choice (for Qt 4.8.6) i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z

  • Get a tool to extract the compressed file, 7-Zip for instance.

  • Extract it to C:\

  • Add C:\mingw32\bin to the Windows PATH environment variable

Qt

  • We will be using a snapshot release of Qt 4.8.6. This version is compiled against the above MinGW 4.8.2.

  • Download the latest snapshot/or stable release if available https://download.qt.io/archive/qt/4.8/4.8.6/ - 326MB

  • Execute the installer

  • When asked, point the Qt installer to the location of MinGW in C:\mingw32

  • Add it to path

  • Make sure C:\Qt\4.8.6\bin is on the PATH

Git

  • Git for Windows. Only in case you want to clone the repository.

  • Note that Git on Windows provides also flex, bison. In case you want to use these tools you to have add C:\Program Files (x86)\Git\bin to the Windows PATH.

Get pre-compiled gperf and admsXml


Get the Qucs source code

Either (1) clone the Git repository or (2) download a repository snapshot.

Clone repository

  cd \
  mkdir git; cd git
  git clone git://git.code.sf.net/p/qucs/git qucs

Repository snapshot


Build with Autotools / MSYS

Install MSYS terminal and further development tools

  • Download and run mingw-get installer

  • Select mingw-developer-tool, apply changes to install

  • When asked point to the installation to C:\mingw32

  • Make sure C:\mingw32\bin is on the Windows PATH

  • You might need to include C:\mingw32\msys\1.0\bin to path (for flex, bison)

  • Copy gperf.exe, admsXml.exe into C:\mingw\bin

  • Launch C:\mingw32\msys\1.0\msys.bat

  • run mount -r C:/mingw32 /mingw (you might need to use the long format options style mount --replace C:/mingw32 /mingw)

Build Qucs GUI (and tools)

  export QTDIR=/c/Qt/4.8.6/
  cd /c/git/qucs/qucs
  sh autogen.sh
  ./configure --enable-maintainer-mode --prefix=/c/qucs-auto/
  make
  make install

Build Qucs Core

  cd /c/git/qucs/qucs-core
  sh bootstrap.sh
  ./configure --enable-maintainer-mode --with-mkadms=/mingw/bin/admsXml.exe --prefix=/c/qucs-auto/
  make
  make install

After install, remember to copy amdsXml.exe also into C:\qucs-auto\bin so it can be used by Qucs.

Test

From the MSYS terminal

  export QUCSDIR=c:\qucs-auto
  /c/qucs-auto/bin/qucs
  • To launch from Windows Explorer it will be necessary to add a Windows environment variable QUCSDIR=c:\qucs-auto.

Build with Cmake / cmd terminal

Build Qucs GUI (and tools)

Open a cmd window

  cd C:\git\qucs\qucs
  mkdir build
  cd build
  cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\qucs-cmake
  make install

Build Qucs Core

  cd C:\git\qucs\qucs-core
  mkdir build
  cd build
  cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\qucs-cmake
  make install
  • In case admsXml.exe is not found, let CMake know about its location with -DADMSXML_DIR=C:\MinGW\bin

  • After install, remember to copy amdsXml.exe also into C:\qucs-cmake\bin so it can be used by Qucs.

Test

From the cmd terminal

  set QUCSDIR=c:\qucs-cmake
  c:\qucs-cmake\bin\qucs.exe
  • To lauch from Windows Explorer it will be necessary to add a Windows environemnt variable QUCSDIR=c:\qucs-cmake.

Debug

The debug messages on Windows are normally sent to the debugger, not the console. Qucs has a redirection routine to handle the situation (see qucs/main.cpp method qucsMessageOutput).

The user has to install the DebugView tool to intercept the debug messages from Qucs. Open DebugView before running Qucs. It should capture the debug messages that are normally printed to the console on Linux/OSX.

Final notes

  • Note that the CMakeLists.txt files can be used as projects on the QtCreator IDE. It makes it easier for new contributors.
Clone this wiki locally