1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
|
From 37c768ce9997b32e7328eb48972a7fda0a1f8554 Mon Sep 17 00:00:00 2001
From: Benjamin Vernoux <bvernoux@gmail.com>
Date: Sun, 4 Sep 2022 16:08:56 +0200
Subject: [PATCH 13/29] Update build for Windows MSYS2/mingw64
---
README.md | 128 +++++++++++++++++++++++++-----------------------------
1 file changed, 59 insertions(+), 69 deletions(-)
diff --git a/README.md b/README.md
index 6c2887f..eb2aa72 100644
--- a/README.md
+++ b/README.md
@@ -10,17 +10,6 @@ AirSpy: http://www.airspy.com
## How to build host software on Windows:
-### Prerequisites for mingw:
-
-* cmake-2.8.12.1 or more see http://www.cmake.org/cmake/resources/software.html
-* libusb-1.0.20 or more see https://github.com/libusb/libusb/releases/download/v1.0.20/libusb-1.0.20.7z
-* For Windows OS less than Vista Install Windows driver for AirSpy hardware or use Zadig see http://sourceforge.net/projects/libwdi/files/zadig
- - If you want to use Zadig select AirSpy USB device and just install/replace it with WinUSB driver.
-
->**Note for Windows build:**
- You shall always execute airspy_tools from Windows command shell and not from Cygwin or Mingw shell because on Cygwin/Mingw
- Ctrl C is not managed correctly and especially for airspy_rx the Ctrl C(abort) will not stop correctly and will corrupt the file.
-
### For VisualStudio 2013 or later:
* `git clone https://github.com/airspy/airspyone_host.git host`
@@ -34,30 +23,43 @@ AirSpy: http://www.airspy.com
* Inside this directory there is lot of README files and some directories (dll, include, lib)
* Launch host\libairspy\vc\airspy_2013.sln with VisualStudio 2013, choose **Release** and **Build Solution**
-### For MinGW:
-
-`git clone https://github.com/airspy/airspyone_host.git host`
-
-`cd host`
-
-`mkdir build`
+### Windows MSYS2/mingw64
+- Install MSYS2/mingw64 from https://www.msys2.org
+- Start mingw64 console
+- `pacman -Syu`
+- `pacman -S git mingw-w64-x86_64-make mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gcc mingw-w64-x86_64-libusb`
-`cd build`
-
-Normal version:
-
-*
-`cmake ../ -G "MSYS Makefiles" -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/`
-
-Debug version:
-
-*
-`cmake ../ -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/`
-
-`make`
-
-`make install`
+- For Windows OS less than Vista Install Windows driver for AirSpy hardware or use Zadig see http://sourceforge.net/projects/libwdi/files/zadig
+ - If you want to use Zadig select AirSpy USB device and just install/replace it with WinUSB driver.
+
+>**Note for Windows build:**
+ You shall always execute airspy_tools from Windows command shell and not from Cygwin or Mingw shell because on Cygwin/Mingw
+ Ctrl C is not managed correctly and especially for airspy_rx the Ctrl C(abort) will not stop correctly and will corrupt the file.
+```
+git clone https://github.com/airspy/airspyone_host.git host
+cd host
+mkdir build
+cd build
+```
+
+#### Release version
+```
+cmake ../ -G "MinGW Makefiles"
+mingw32-make.exe clean all
+```
+- Optional copy libusb-1.0.dll & libwinpthread-1.dll to same directory as the executable(if it is not in your path)
+ - `cp /mingw64/bin/libusb-1.0.dll ./airspy-tools/src/`
+ - `cp /mingw64/bin/libwinpthread-1.dll ./airspy-tools/src/`
+
+#### Debug version
+```
+cmake ../ -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug
+mingw32-make.exe clean all
+```
+- Optional copy libusb-1.0.dll & libwinpthread-1.dll to same directory as the executable(if it is not in your path)
+ - `cp /mingw64/bin/libusb-1.0.dll ./airspy-tools/src/`
+ - `cp /mingw64/bin/libwinpthread-1.dll ./airspy-tools/src/`
## How to build the host software on Linux:
@@ -69,30 +71,23 @@ Debug version:
### Build host software on Linux:
-`wget https://github.com/airspy/airspyone_host/archive/master.zip`
-
-`unzip master.zip`
-
-`cd airspyone_host-master`
-
-`mkdir build`
-
-`cd build`
-
-`cmake ../ -DINSTALL_UDEV_RULES=ON`
-
-`make`
-
-`sudo make install`
-
-`sudo ldconfig`
+```
+wget https://github.com/airspy/airspyone_host/archive/master.zip
+unzip master.zip
+cd airspyone_host-master
+mkdir build
+cd build
+cmake ../ -DINSTALL_UDEV_RULES=ON
+make
+sudo make install
+sudo ldconfig
+```
## Clean CMake temporary files/dirs:
-
-`cd airspyone_host-master/build`
-
-`rm -rf *`
-
+```
+cd airspyone_host-master/build
+rm -rf *
+```
## How to build host software on FreeBSD.
### Get the prerequisites (from root)
@@ -100,19 +95,14 @@ Debug version:
`pkg install git cmake`
### Build
-
-`git clone https:\\github.com\airspy\airspyone_host.git`
-
-`cd airspyone_host`
-
-`mkdir build`
-
-`cd build`
-
-`cmake .. -DLIBUSB_LIBRARIES=/usr/lib/libusb.so`
-
-`make`
-
+```
+git clone https:\\github.com\airspy\airspyone_host.git
+cd airspyone_host
+mkdir build
+cd build
+cmake .. -DLIBUSB_LIBRARIES=/usr/lib/libusb.so
+make
+```
(from root)
`make install`
@@ -123,7 +113,7 @@ Debug version:
## Principal authors:
-Benjamin Vernoux <bvernoux@airspy.com> and Youssef Touil <youssef@airspy.com>
+Benjamin Vernoux <bvernoux@gmail.com> and Youssef Touil <youssef@airspy.com>
http://www.airspy.com
--
2.47.3
|