Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
m
Line 1: Line 1:
[[File:sigrok windows.png|right|thumb|320px|sigrok-gui on Windows]]
[[File:sigrok windows.png|right|thumb|320px|sigrok-gui on Windows]]
== Self-extracting installer ==
Work in progress.
== Building from source ==


This page describes how to build sigrok on Windows.
This page describes how to build sigrok on Windows.
== Building and installing the requirements ==


=== TortoiseGit ===
=== TortoiseGit ===
Line 12: Line 16:
* 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).
* 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 ===
=== 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.
In order to build sigrok and various of its dependencies, we need a UNIX-like environment on Windows, which is provided by MinGW/MSYS.
Line 72: Line 76:
=== Python ===
=== Python ===


We also need Python >= 2.5 for running the sigrok [[protocol decoders]] which are written in 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 [http://python.org/ftp/python/2.6.5/python-2.6.5.msi latest version] (currently 2.6) 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.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).
** 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.


Line 81: Line 85:
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.
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.


== Building sigrok ==
=== sigrok ===


Get the source code:
Get the source code:

Revision as of 20:56, 12 January 2011

sigrok-gui on Windows

Self-extracting installer

Work in progress.

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 (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 "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.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:\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

libzip

Finally, we also need libzip. First, install its dependency zlib:

$ mingw-get install zlib msys-zlib-dev

Then, download libzip-0.9.3.tar.gz and install it.

$ wget http://nih.at/libzip/libzip-0.9.3.tar.gz
$ tar xfvz libzip-0.9.3.tar.gz
$ cd libzip-0.9.3
$ autoreconf -i
$ ./configure --with-zlib=/c/MinGW/msys/1.0
$ 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.5) 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.

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.