Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
(Moved native MinGW-based build instructions to Windows/Building.)
Line 53: Line 53:
<sup>1</sup> There are various problems with the current sigrok and libusb-1.0 code on Windows that need to be fixed. Among other things, running poll()/select() on FDs is not possible on Windows, neither does libusb_get_pollfds() work.
<sup>1</sup> There are various problems with the current sigrok and libusb-1.0 code on Windows that need to be fixed. Among other things, running poll()/select() on FDs is not possible on Windows, neither does libusb_get_pollfds() work.


== Self-extracting installer ==
== Self-extracting installers ==


Work in progress. We don't provide pre-built installers right now, but will do so in the near future, when a few issues have been sorted out.
Work in progress. We don't provide pre-built installers for [[sigrok-cli]] and [[PulseView]] right now, but will do so in the near future, when a few issues have been sorted out.
 
Currently only the command-line tool [[sigrok-cli]] is fully supported, but (for testing purposes) the [[PulseView]], [[sigrok-qt]], or [[sigrok-gtk]] can be installed, too.
 
See [[Developers/Release_process#Windows_installers|Developers/Release process]] for details on creating your own installer files.


<gallery widths="120px" heights="70px" perrow="5">
<gallery widths="120px" heights="70px" perrow="5">
Line 69: Line 65:
</gallery>
</gallery>


== Building/installing the requirements ==
== Building from source ==
 
This page describes how to build sigrok on Windows.
 
=== TortoiseGit ===
 
For checking out the sigrok source code you can use [http://code.google.com/p/tortoisegit/ TortoiseGit] on Windows.
 
* Download and install the [http://code.google.com/p/tortoisegit/downloads/list latest version] (for 32bit or 64bit Windows) of TortoiseGit (just double-click the *.msi installer).
* Download and install the [http://code.google.com/p/msysgit/downloads/list latest version] of the "full installer" of [http://code.google.com/p/msysgit/ 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 [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.
** 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'''
 
=== Additional files for sigrok ===
 
Unfortunately, not all binary packages needed for a sigrok build come with a pkg-config .pc file, thus we provide our own files for simplicity. Extract the following into '''c:\MinGW\msys\1.0\local''':
 
* [http://sigrok.org/w/images/5/53/Sigrok_mingw_stuff.zip Sigrok_mingw_stuff.zip]
 
=== libglib and pkg-config ===
 
sigrok also needs [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ libglib >= 2.28.0], which in turn needs [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ pkg-config] (>= 0.22). 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]
 
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'''
$ '''touch configure'''
$ '''make'''
$ '''make install'''
 
=== libftdi + libusb-0.1-win32 ===
 
* 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].
** Rename '''bin/x86/libusb0_x86.dll''' to '''libusb0.dll''' and copy it to '''/usr/local/bin'''.
** Rename '''include/lusb0_usb.h''' to '''usb.h''' and copy it to '''/usr/local/include'''.
** Copy '''lib/gcc/libusb.a''' to '''/usr/local/lib'''.
* 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.
** 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''':
 
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ zlib and zlib-dev]
 
=== 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 >= 3.0 for running the sigrok [[protocol decoders]] which are written in Python. On Windows, sigrok currently assumes '''Python 3.2.x''' installed in '''c:\Python32'''.
 
* Download and install the [http://python.org/ftp/python/3.2.2/python-3.2.2.msi latest version] (currently 3.2.2) 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:\Python32''' unchanged.
 
'''Note:''' For now, please use the 32bit Python installer, as everything else is also 32bit based. Otherwise you'll have issues.
 
=== Qt ===
 
In order to also build the Qt-based [[GUI|sigrok-qt]], 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+ ===
 
Download the latest versions of the following Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':
 
* [http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/ gtk+ and gtk+-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ fontconfig and fontconfig-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/gdk-pixbuf/ gdk-pixbuf and gdk-pixbuf-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ cairo and cairo-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/pango/ pango and pango-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/atk/ atk and atk-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ freetype and freetype-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ libpng and libpng-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ expat and expat-dev]
 
== Building/installing sigrok components ==
 
Building [[libsigrok]]:
 
$ '''git clone git://sigrok.org/libsigrok'''
$ '''cd libsigrok'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''
 
Building [[libsigrokdecode]]:
 
$ '''git clone git://sigrok.org/libsigrokdecode'''
$ '''cd libsigrokdecode'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''
 
For building [[sigrok-cli]] (the command-line interface for sigrok):
 
$ '''git clone git://sigrok.org/sigrok-cli'''
$ '''cd sigrok-cli'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''
 
For building [[PulseView]] (Qt GUI for sigrok):
 
$ '''git clone git://sigrok.org/pulseview'''
$ '''cd pulseview'''
$ '''cmake -G "MSYS Makefiles" -D BOOST_ROOT:string=/usr/local .'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''
 
For building [[sigrok-gtk]] ('''Note:''' sigrok-gtk is not yet usable!):
 
$ '''git clone git://sigrok.org/sigrok-gtk'''
$ '''cd sigrok-gtk'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''
 
For building [[sigrok-qt]] ('''Note:''' sigrok-qt is not yet usable!):
 
$ '''git clone git://sigrok.org/sigrok-qt'''
$ '''cd sigrok-qt'''
$ '''/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/qmake'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


If you get warnings claiming potential symbol conflicts when running qmake, you are likely not invoking '''qmake-qt4'''. Try running '''qmake-qt4''' to force the correct version.
See [[Windows/Building]].

Revision as of 14:57, 15 August 2013

sigrok-qt 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 Various issues need to be sorted out1.
EE Electronics ESLA100 Various issues need to be sorted out1.
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(16032) Uses libusb-1.0, but seems to work fine.
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.
Robomotic MiniLogic Various issues need to be sorted out1.
Logic Shrimp Serial port portability fixes required (partially implemented, but unfinished).
Lcsoft Mini Board Various issues need to be sorted out1.
Demo driver Works fine.
Digital Multimeter Windows status
serial-dmm based DMMs Untested.

1 There are various problems with the current sigrok and libusb-1.0 code on Windows that need to be fixed. Among other things, running poll()/select() on FDs is not possible on Windows, neither does libusb_get_pollfds() work.

Self-extracting installers

Work in progress. We don't provide pre-built installers for sigrok-cli and PulseView right now, but will do so in the near future, when a few issues have been sorted out.

Building from source

See Windows/Building.