Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
m (Use pkg-config for zlib.)
m (Various updates and simplifications.)
Line 64: Line 64:
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-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).
* Download the [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/ latest version] of the automated [http://mingw.org/ MinGW] installer named '''mingw-get-inst''' (double-click the installer EXE file, which will download and install all components).
** Make sure you enable "MinGW Compiler Suite", "C++ compiler", "MSYS Basic System", and "MinGW Developer Toolkit" in the installer.
** Make sure you enable "MinGW Compiler Suite", "C++ compiler", "MSYS Basic System", 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.
Line 81: Line 81:
=== libglib ===
=== libglib ===


sigrok also needs [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ libglib >= 2.22.0] (but not Gtk+), which in turn needs [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ pkg-config] and [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ libintl]. Download the latest versions of the respective Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':
sigrok also needs [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ libglib >= 2.22.0], which in turn needs [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ pkg-config] and [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ libintl]. Download the latest versions of the respective Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':
 
* [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ glib and glib-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ pkg-config and pkg-config-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ proxy-libintl and proxy-libintl-dev]


* [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib_2.26.1-1_win32.zip glib_2.26.1-1_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.26/glib-dev_2.26.1-1_win32.zip glib-dev_2.26.1-1_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.25-1_win32.zip pkg-config_0.25-1_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.25-1_win32.zip pkg-config-dev_0.25-1_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/proxy-libintl_20100902_win32.zip proxy-libintl_20100902_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/proxy-libintl-dev_20100902_win32.zip proxy-libintl-dev_20100902_win32.zip]
Then run:
Then run:


Line 106: Line 104:
* Download and execute [http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-devel-filter-1.2.5.0.exe/download libusb-win32-devel-filter-1.2.5.0.exe].
* Download and execute [http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-devel-filter-1.2.5.0.exe/download libusb-win32-devel-filter-1.2.5.0.exe].
* Download and extract [http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-bin-1.2.5.0.zip/download libusb-win32-bin-1.2.5.0.zip].
* Download and extract [http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-bin-1.2.5.0.zip/download libusb-win32-bin-1.2.5.0.zip].
** Copy '''usb.h''' to '''/usr/local/include'''.
** Rename '''lusb0_usb.h''' to '''usb.h''' and copy it to '''/usr/local/include'''.
* Install libftdi. The easiest method is probably to use the [https://picusb.googlecode.com/files/libftdi-0.19_mingw32.zip libftdi-0.19_mingw32.zip] binaries from [http://code.google.com/p/picusb/downloads/list here].
* Install libftdi. The easiest method is probably to use the [https://picusb.googlecode.com/files/libftdi-0.19_mingw32.zip libftdi-0.19_mingw32.zip] binaries from [http://code.google.com/p/picusb/downloads/list here].
** Extract the ZIP file into a temporary directory.
** Extract the ZIP file into a temporary directory.
Line 113: Line 111:
** Copy '''include/ftdi.h''' to '''/usr/local/include'''.
** Copy '''include/ftdi.h''' to '''/usr/local/include'''.


=== libzip ===
=== zlib ===


Finally, we also need [http://nih.at/libzip/ libzip]. First, install its dependency '''zlib''':
Download the latest versions of the respective Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':


$ '''mingw-get install zlib msys-zlib msys-zlib-dev'''
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ zlib and zlib-dev]


Then, download [http://nih.at/libzip/libzip-0.9.3.tar.gz libzip-0.9.3.tar.gz] and install it.
=== libzip ===


  $ '''wget http://nih.at/libzip/libzip-0.9.3.tar.gz'''
  $ '''wget http://nih.at/libzip/libzip-0.10.tar.gz'''
  $ '''tar xfvz libzip-0.9.3.tar.gz'''
  $ '''tar xfvz libzip-0.10.tar.gz'''
  $ '''cd libzip-0.9.3'''
  $ '''cd libzip-0.10'''
$ '''autoreconf -i'''
  $ '''./configure --with-zlib=/usr/local'''
  $ '''./configure --with-zlib=/c/MinGW/msys/1.0'''
  $ '''make'''
  $ '''make'''
  $ '''make install'''
  $ '''make install'''
Line 133: Line 130:
We also need Python >= 2.5 for running the sigrok [[protocol decoders]] which are written in Python. On Windows, sigrok currently assumes '''Python 2.6.x''' installed in '''c:\Python26'''.
We also need Python >= 2.5 for running the sigrok [[protocol decoders]] which are written in Python. On Windows, sigrok currently assumes '''Python 2.6.x''' installed in '''c:\Python26'''.


* Download and install the [http://python.org/ftp/python/2.6.5/python-2.6.5.msi latest version] (currently 2.6.5) of the [http://python.org/download/ Python Windows installer] (just double-click the *.msi installer file).
* Download and install the [http://python.org/ftp/python/2.6.6/python-2.6.6.msi latest version] (currently 2.6.6) of the [http://python.org/download/ 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.
** For simplicity it's recommended to leave the default install location of '''c:\Python26''' unchanged.


=== Qt ===
=== Qt GUI ===
 
In order to also build the Qt-based [[GUI|sigrok-gui]], download the [http://qt.nokia.com/downloads#lgpl 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.
 
== GTK+ GUI ==
 
Download the latest versions of the following Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':


In order to also build [[GUI|sigrok-gui]], download the [http://qt.nokia.com/downloads#lgpl 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.
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ ...]


=== sigrok ===
=== sigrok ===

Revision as of 15:45, 16 November 2011

sigrok-gui on Windows

Status

We intend to fully support all major operating systems in sigrok, including Windows. However, we're not quite there, yet, various portability issues need to be addressed still. The table below lists the current Windows status of the various hardware drivers.

Logic analyzer Windows status
Saleae Logic libusb-1.0 issues need to be sorted out.
EE Electronics XLA/ESLA100 libusb-1.0 issues need to be sorted out.
ASIX SIGMA Compiles fine using libftdi + libusb-0.1-win32 (not runtime-tested, though).
Openbench Logic Sniffer Serial port portability fixes required (partially implemented, but unfinished).
ZEROPLUS Logic Cube LAP-C Untested, but uses libusb-1.0, so there may be issues.
Link Instruments MSO-19‎ Doesn't compile due to libudev dependency. TODO: Make libudev optional.
ChronoVu LA8 Works fine using libftdi + libusb-0.1-win32.
Demo driver Works fine.

Self-extracting installer

Work in progress.

Currently only the command-line tool sigrok-cli is installed and supported.

Building from source

This page describes how to build sigrok on Windows.

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 of the automated MinGW installer named mingw-get-inst (double-click the installer EXE file, which will download and install all components).
    • Make sure you enable "MinGW Compiler Suite", "C++ compiler", "MSYS Basic System", and "MinGW Developer Toolkit" in the installer.
    • For simplicity it's recommended to leave the default install location of c:\MinGW unchanged.

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

$ mingw-get update
$ mingw-get install msys-wget msys-unzip

autotools

Installing the autotools (if not already done) is as simple as:

$ mingw-get install autoconf automake libtool

libglib

sigrok also needs libglib >= 2.22.0, which in turn needs pkg-config and libintl. Download the latest versions of the respective Windows binaries and extract them into c:\MinGW\msys\1.0\local:

Then run:

$ cd /c/MinGW/bin
$ cp libintl-8.dll intl.dll

libusb 1.0

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

libftdi + libusb-0.1-win32

  • Download and execute libusb-win32-devel-filter-1.2.5.0.exe.
  • Download and extract libusb-win32-bin-1.2.5.0.zip.
    • Rename lusb0_usb.h to usb.h and copy it to /usr/local/include.
  • Install libftdi. The easiest method is probably to use the libftdi-0.19_mingw32.zip binaries from here.
    • Extract the ZIP file into a temporary directory.
    • Copy dll/libftdi.dll to /usr/local/bin.
    • Copy lib/libftdi.a and lib/libftdi.dll.a to /usr/local/lib.
    • Copy include/ftdi.h to /usr/local/include.

zlib

Download the latest versions of the respective Windows binaries and extract them into c:\MinGW\msys\1.0\local:

libzip

$ wget http://nih.at/libzip/libzip-0.10.tar.gz
$ tar xfvz libzip-0.10.tar.gz
$ cd libzip-0.10
$ ./configure --with-zlib=/usr/local
$ make
$ make install

Python

We also need Python >= 2.5 for running the sigrok protocol decoders which are written in Python. On Windows, sigrok currently assumes Python 2.6.x installed in c:\Python26.

  • Download and install the latest version (currently 2.6.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 GUI

In order to also build the Qt-based 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.

GTK+ GUI

Download the latest versions of the following Windows binaries and extract them into c:\MinGW\msys\1.0\local:

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/lib/pkgconfig:/usr/local/lib/pkgconfig ./autogen.sh
$ PKG_CONFIG_PATH=/usr/lib/pkgconfig:/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.