Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
(Update instructions to latest MinGW setup method.)
Line 16: Line 16:
In order to build sigrok and various of its dependencies, we need a UNIX-like environment on Windows, which is provided by MinGW/MSYS.
In order to build sigrok and various of its dependencies, we need a UNIX-like environment on Windows, which is provided by MinGW/MSYS.


* Download the [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/ latest version] (5.1.6 currently) of [http://mingw.org/ MinGW] (double-click the installer *.exe, which will download and install all components).
* Download the [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/ latest version] (20101030 currently) of the automated [http://mingw.org/ MinGW] installer named '''mingw-get-inst''' (double-click the [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20101030/mingw-get-inst-20101030.exe/download installer *.exe], which will download and install all components).
** Make sure you enable "MinGW base tools", "g++ compiler", and "MinGW Make" in the installer.
** Make sure you enable "C++ compiler", and "MinGW Developer Toolkit" in the installer.
** For simplicity it's recommended to leave the default install location of '''c:\MinGW''' unchanged.
** For simplicity it's recommended to leave the default install location of '''c:\MinGW''' unchanged.
* Download and install the [http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/ latest stable version which has an installer] (1.0.11 currently) of the [http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/ MSYS base system] (double-click the installer *.exe file).
** For simplicity it's recommended to leave the default install location of '''c:\msys\1.0''' unchanged.
** The installer will ask (in a DOS box) whether you have MinGW installed (say '''y''') and where (say '''c:/MinGW''').


=== autotools ===
=== autotools ===


In order to get a working autotools setup various further MSYS packages and their dependencies are required:
Open a MinGW shell via '''Start/Programs/MinGW/MinGW Shell''' and do the following:


* '''autoconf:''' Download the [http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/ MSYS/autoconf binary package] and place the downloaded .tar.lzma file in '''c:\MSYS\1.0'''.
$ '''mingw-get update'''
** '''perl (required for autotools):''' Download the [http://sourceforge.net/projects/mingw/files/MSYS%20perl/perl-5.6.1_2-1/perl-5.6.1_2-1-msys-1.0.11-bin.tar.lzma/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20perl/ MSYS/perl binary package] and place the downloaded .tar.lzma file in '''c:\MSYS\1.0'''.
$ '''mingw-get install msys-wget autoconf automake libtool'''
*** '''libcrypt (required for perl):''' Download the [http://sourceforge.net/projects/mingw/files/MSYS%20crypt/crypt-1.1_1-2/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20crypt/ MSYS/libcrypt DLL package] and place the downloaded .tar.lzma file in '''c:\MSYS\1.0'''.
* '''automake:''' Download the [http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20automake/ MSYS/automake binary package] and place the downloaded .tar.lzma file in '''c:\MSYS\1.0'''.
** '''m4 (required for aclocal):''' Download the [http://sourceforge.net/projects/mingw/files/MSYS%20m4/m4-1.4.13-1/m4-1.4.13-1-msys-1.0.11-bin.tar.lzma/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20m4/ MSYS/m4 binary package] and place the downloaded .tar.lzma file in '''c:\MSYS\1.0'''.
* '''libtool:''' Download the [http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20libtool/ MSYS/libtool binary package] and place the downloaded .tar.lzma file in '''c:\MSYS\1.0'''.
 
In an MSYS shell do the following:
 
$ '''cd /c/MSYS/1.0'''
$ '''tar -xv --lzma -f autoconf-*.tar.lzma'''
$ '''tar -xv --lzma -f automake-*.tar.lzma'''
$ '''tar -xv --lzma -f libtool-*.tar.lzma'''
$ '''tar -xv --lzma -f perl-*.tar.lzma'''
$ '''tar -xv --lzma -f libcrypt-*.tar.lzma'''
$ '''tar -xv --lzma -f m4-*.tar.lzma'''


=== libglib ===
=== libglib ===

Revision as of 23:28, 6 January 2011

sigrok-gui on Windows

This page describes how to build sigrok on Windows.

Building and installing the requirements

TortoiseGit

For checking out the sigrok source code you can use TortoiseGit on Windows.

  • Download and install the latest version (for 32bit or 64bit Windows) of TortoiseGit (just double-click the *.msi installer).
  • Download and install the latest version of the "full installer" of MSysGit (double-click the *.exe installer).

Mingw/MSYS

In order to build sigrok and various of its dependencies, we need a UNIX-like environment on Windows, which is provided by MinGW/MSYS.

  • Download the latest version (20101030 currently) of the automated MinGW installer named mingw-get-inst (double-click the installer *.exe, which will download and install all components).
    • Make sure you enable "C++ compiler", and "MinGW Developer Toolkit" in the installer.
    • For simplicity it's recommended to leave the default install location of c:\MinGW unchanged.

autotools

Open a MinGW shell via Start/Programs/MinGW/MinGW Shell and do the following:

$ mingw-get update
$ mingw-get install msys-wget autoconf automake libtool

libglib

sigrok also needs libglib >= 2.0 (but not Gtk+), which in turn needs pkg-config and libintl. Download the latest versions of the respective Windows binaries and extract them into c:\MSYS\1.0:

libusb 1.0

$ git clone git://git.libusb.org/libusb-pbatard.git (or use TortoiseGit)
$ cd libusb-pbatard
$ ./autogen.sh
$ make
$ make install

libzip

Finally, we also need libzip and its dependency MinGW/zlib.

In an MSYS shell do the following:

$ cd /c/MinGW
$ tar xvzf libz-*.tar.gz
$ cd /c/MSYS/1.0
$ tar xvzf zlib-*.tar.gz

Then, download libzip-0.9.3.tar.gz and extract it somewhere.

$ tar xfvz libzip-0.9.3.tar.gz
$ cd libzip-0.9.3
$ autoreconf -i
$ ./configure
$ make
$ make install

Python

We also need Python >= 2.5 for running the sigrok protocol decoders which are written in Python.

  • Download and install the latest version (currently 2.6) of the Python Windows installer (just double-click the *.msi installer file).
    • For simplicity it's recommended to leave the default install location of c:\Python26 unchanged.

Qt

In order to also build sigrok-gui, download the latest version (>= 4.5) of the Qt SDK for Windows (LGPL version) and double-click the installer. The download includes the Qt libraries, Qt Creator, Qt Designer, and various other Qt development tools.

Building sigrok

Get the source code:

$ git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok (or use TortoiseGit)
$ cd sigrok

Build the library and command line tool:

$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure
$ make
$ make install

Build the GUI:

  • First, you need to copy some files into the gui/debug folder:
$ cd gui
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig /c/Qt/2010.01/qt/bin/qmake
$ cd debug
$ cp /c/Qt/2010.01/qt/bin/libgcc_s_dw2-1.dll .
$ cp /c/Qt/2010.01/qt/bin/QtCored4.dll .
$ cp /c/Qt/2010.01/qt/bin/QtGui4.dll .
$ cd ../..
  • Then, open the project in Qt Creator from within an MSYS shell:
$ cd gui
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig /c/Qt/2010.01/qt/bin/qtcreator sigrok-gui.pro
  • Build and run the project.