Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
m (→‎libzip: libzip fixes.)
(More zlib stuff. PKG_CONFIG_PATH is required. Qt Creator invokation fixes. Random other fixes.)
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]]
TODO: This page is outdated and not correct. This will be fixed soon!


This page describes how to build sigrok on Windows.
This page describes how to build sigrok on Windows.
Line 20: Line 18:
* 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%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).
** Make sure you enable "MinGW base tools", "g++ compiler", and "MinGW Make" in the installer.
** Make sure you enable "MinGW base tools", "g++ compiler", and "MinGW Make" 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).
* 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.
** 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').
** The installer will ask (in a DOS box) whether you have MinGW installed (say '''y''') and where (say '''c:/MinGW''').


=== autotools ===
=== autotools ===
Line 48: Line 46:
=== libglib ===
=== 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''':
sigrok also needs [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ libglib >= 2.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:\MSYS\1.0''':


* [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.22/glib_2.22.5-1_win32.zip glib_2.22.5-1_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.22/glib_2.22.5-1_win32.zip glib_2.22.5-1_win32.zip]
Line 55: Line 53:
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip pkg-config-dev_0.23-3_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip pkg-config-dev_0.23-3_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/proxy-libintl-dev_20080918_win32.zip proxy-libintl-dev_20080918_win32.zip]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/proxy-libintl-dev_20080918_win32.zip proxy-libintl-dev_20080918_win32.zip]
=== Qt 4.6 ===
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.


=== libusb 1.0 ===
=== libusb 1.0 ===


  $ '''git clone git://git.libusb.org/libusb-pbatard.git'''
  $ '''git clone git://git.libusb.org/libusb-pbatard.git''' (or use TortoiseGit)
  $ '''cd libusb-pbatard'''
  $ '''cd libusb-pbatard'''
  $ '''./autogen.sh'''
  $ '''./autogen.sh'''
Line 72: Line 66:
Finally, we also need [http://nih.at/libzip/ libzip] and its dependency [http://sourceforge.net/projects/mingw/files/MinGW%20zlib/ MinGW/zlib].
Finally, we also need [http://nih.at/libzip/ libzip] and its dependency [http://sourceforge.net/projects/mingw/files/MinGW%20zlib/ MinGW/zlib].


Download the [http://sourceforge.net/projects/mingw/files/MinGW%20zlib/zlib-1.2.3-1-mingw32/libz-1.2.3-1-mingw32-dev.tar.gz/download latest version] of the [http://sourceforge.net/projects/mingw/files/MinGW%20zlib/ MinGW/zlib dev package] and place the downloaded .tar.gz file in '''c:\MinGW'''.
* Download the [http://sourceforge.net/projects/mingw/files/MinGW%20zlib/zlib-1.2.3-1-mingw32/libz-1.2.3-1-mingw32-dev.tar.gz/download latest version] of the [http://sourceforge.net/projects/mingw/files/MinGW%20zlib/ MinGW/zlib dev package] and place the downloaded .tar.gz file in '''c:\MinGW'''.
* Download the [http://sourceforge.net/projects/mingw/files/MSYS%20zlib/zlib-1.2.3-1/zlib-1.2.3-1-msys-1.0.11-dll.tar.gz/download latest version] of the [http://sourceforge.net/projects/mingw/files/MSYS%20zlib/ MSYS/zlib DLL package] and place the downloaded .tar.gz file in '''c:\MSYS\1.0'''.


In an MSYS shell do the following:
In an MSYS shell do the following:
Line 78: Line 73:
  $ '''cd /c/MinGW'''
  $ '''cd /c/MinGW'''
  $ '''tar xvzf libz-*.tar.gz'''
  $ '''tar xvzf libz-*.tar.gz'''
$ '''cd /c/MSYS/1.0'''
$ '''tar xvzf zlib-*.tar.gz'''


Then:
Then, download [http://nih.at/libzip/libzip-0.9.3.tar.gz libzip-0.9.3.tar.gz] and extract it somewhere.
 
Download [http://nih.at/libzip/libzip-0.9.3.tar.gz libzip-0.9.3.tar.gz] and extract it somewhere.


  $ '''tar xfvz libzip-0.9.3.tar.gz'''
  $ '''tar xfvz libzip-0.9.3.tar.gz'''
Line 89: Line 84:
  $ '''make'''
  $ '''make'''
  $ '''make install'''
  $ '''make install'''
=== Qt ===
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 ==
== Building sigrok ==
Line 99: Line 98:
Build the library and command line tool:
Build the library and command line tool:


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


Build the GUI:
Build the GUI:
Line 107: Line 107:


  $ '''cd frontends/gui'''
  $ '''cd frontends/gui'''
  $ '''/c/Qt/2010.01/qt/bin/qmake.exe'''
  $ '''PKG_CONFIG_PATH=/usr/local/lib/pkgconfig /c/Qt/2010.01/qt/bin/qmake'''
  $ '''cd debug'''
  $ '''cd debug'''
  $ '''cp /c/Qt/2010.01/qt/bin/libgcc_s_dw2-1.dll .'''
  $ '''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/QtCored4.dll .'''
  $ '''cp /c/Qt/2010.01/qt/bin/QtGui4.dll .'''
  $ '''cp /c/Qt/2010.01/qt/bin/QtGui4.dll .'''
  $ '''cp ../../lib/libsigrok.so .''' # TODO
  $ '''cd ../../..'''
 
* Then, open the project in Qt Creator from within an MSYS shell:
 
$ '''cd frontends/gui'''
$ '''PKG_CONFIG_PATH=/usr/local/lib/pkgconfig /c/Qt/2010.01/qt/bin/qtcreator sigrok-gui.pro'''


* In a file explorer, double-click the '''sigrok-gui.pro''' file in the '''frontends/gui/''' directory, which should open the project in Qt Creator.
* Build and run the project.
* Build and run the project.

Revision as of 17:24, 26 March 2010

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 (5.1.6 currently) of MinGW (double-click the installer *.exe, which will download and install all components).
    • Make sure you enable "MinGW base tools", "g++ compiler", and "MinGW Make" in the installer.
    • For simplicity it's recommended to leave the default install location of c:\MinGW unchanged.
  • Download and install the latest stable version which has an installer (1.0.11 currently) of the 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

In order to get a working autotools setup various further MSYS packages and their dependencies are required:

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

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

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:

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

Build the GUI:

  • First, you need to copy some files into the frontends/gui/debug folder:
$ cd frontends/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 frontends/gui
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig /c/Qt/2010.01/qt/bin/qtcreator sigrok-gui.pro
  • Build and run the project.