-
Notifications
You must be signed in to change notification settings - Fork 213
Build Windows
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 the latest
msys2-x86_64
from https://sourceforge.net/projects/msys2/files/Base/x86_64/ (currentlymsys2-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 runningC:\msys64\mingw64.exe
- MSYS2 NEEDS to be installed on a NTFS partition. If its installed at
C:\msys64
it should not be a problem.
- MSYS2 NEEDS to be installed on a NTFS partition. If its installed at
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...)
-
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.
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 ..
Clone the Git repository
git clone https://github.com/Qucs/qucs.git
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
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
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/).
-
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 WindowsPATH
environment variable
-
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 thePATH
-
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 addC:\Program Files (x86)\Git\bin
to the WindowsPATH
.
-
From the GnuWin project, download gperf 3.0.1
-
From the NGspice adms how-to, download admsXml 2.3.0
-
Extract both packages.
-
Locate
gperf.exe
andadmsXml.exe
. -
Copy them into
C:\mingw32\bin
.
Either (1) clone the Git repository or (2) download a repository snapshot.
cd \
mkdir git; cd git
git clone git://git.code.sf.net/p/qucs/git qucs
-
Download a snapshot from the repository:
-
Extract to
C:\git\qucs\
-
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 WindowsPATH
-
You might need to include
C:\mingw32\msys\1.0\bin
to path (for flex, bison) -
Copy
gperf.exe
,admsXml.exe
intoC:\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 stylemount --replace C:/mingw32 /mingw
)
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
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.
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
.
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
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 copyamdsXml.exe
also intoC:\qucs-cmake\bin
so it can be used by Qucs.
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
.
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.
- Note that the
CMakeLists.txt
files can be used as projects on the QtCreator IDE. It makes it easier for new contributors.
[ Home | Development | Examples ]