diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0a2ea248e2..c717a6bbb2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,33 +16,36 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-11]
- python-version: ['3.7', '3.8', '3.9', '3.10']
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
architecture: [x64]
include:
- os: windows-2019
- python-version: '3.7'
+ python-version: '3.8'
architecture: x86
exclude:
- - os: windows-2019
- python-version: '3.8'
- os: windows-2019
python-version: '3.9'
- os: windows-2019
python-version: '3.10'
- - os: macOS-11
- python-version: '3.7'
+ - os: windows-2019
+ python-version: '3.11'
+ - os: windows-2019
+ python-version: '3.12'
- os: macOS-11
python-version: '3.8'
+ - os: macOS-11
+ python-version: '3.9'
- os: macOS-11
python-version: '3.10'
-
+ - os: macOS-11
+ python-version: '3.12'
fail-fast: false
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
@@ -99,18 +102,18 @@ jobs:
run: python src/urh/cythonext/build.py
- name: Create sdist
- if: ${{ matrix.python-version == '3.9' && startsWith(matrix.os, 'ubuntu') }}
+ if: ${{ matrix.python-version == '3.11' && startsWith(matrix.os, 'ubuntu') }}
run: python setup.py sdist
- run: python setup.py bdist_wheel
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
- - name: Build manylinux2014
+ - name: Build manylinux wheels
if: startsWith(matrix.os, 'ubuntu')
run: |
docker run --rm \
-e PYVER=$(python -c "import sys; print('%s%s' % (sys.version_info.major, sys.version_info.minor))") \
- -v `pwd`:/io jopohl/urh_manylinux2014 /io/data/make_manylinux2014_wheels.sh
+ -v `pwd`:/io jopohl/urh_manylinux2_28 /io/data/make_manylinux_wheels.sh
- name: Check wheel
if: startsWith(matrix.os, 'ubuntu')
@@ -150,13 +153,13 @@ jobs:
dist/Universal.Radio.Hacker-"$(python src/urh/version.py)".dmg
- name: Upload artifacts
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: dist-${{ matrix.os }}
path: dist
- name: Run pytest with coverage
- if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' }}
+ if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.11' }}
run: |
touch tests/show_gui
cp tests/.coveragerc .
@@ -165,7 +168,7 @@ jobs:
coverage html
- name: Run pytest without coverage
- if: ${{ !startsWith(matrix.os, 'ubuntu') || matrix.python-version != '3.9' }}
+ if: ${{ !startsWith(matrix.os, 'ubuntu') || matrix.python-version != '3.11' }}
run: pytest -s -v --junitxml=junit/test-results.xml tests
- uses: ncipollo/release-action@v1
diff --git a/README.md b/README.md
index 44393b94b8..a7a5389a7c 100644
--- a/README.md
+++ b/README.md
@@ -44,99 +44,47 @@ publisher = {{USENIX} Association},
## Installation
-URH runs on Windows, Linux and macOS. Click on your operating system below to view installation instructions.
-
-
- Windows
+URH runs on Windows, Linux and macOS. See below for OS specific installation instructions.
+### Windows
On Windows, URH can be installed with its [Installer](https://github.com/jopohl/urh/releases). No further dependencies are required.
If you get an error about missing ```api-ms-win-crt-runtime-l1-1-0.dll```, run Windows Update or directly install [KB2999226](https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows).
-
-
-
-Linux
-
-
-
-Generic Installation with pip (recommended)
-
-URH is available on [PyPi](https://pypi.org/project/urh/) so you can install it with
+### Linux
+#### Installation with pipx
+URH is available on [PyPi](https://pypi.org/project/urh/) so you can install it, for example, with [pipx](https://pypa.github.io/pipx/):
```bash
-# IMPORTANT: Make sure your pip is up to date
-sudo python3 -m pip install --upgrade pip # Update your pip installation
-sudo python3 -m pip install urh # Install URH
+pipx install urh
```
This is the recommended way to install URH on Linux because it comes with __all native extensions__ precompiled.
In order to access your SDR as non-root user, install the according __udev rules__. You can find them [in the wiki](https://github.com/jopohl/urh/wiki/SDR-udev-rules).
-
-
-
-Install via Package Manager
-
+#### Install via Package Manager
URH is included in the repositories of many linux distributions such as __Arch Linux__, __Gentoo__, __Fedora__, __openSUSE__ or __NixOS__. There is also a package for __FreeBSD__. If available, simply use your package manager to install URH.
__Note__: For native support, you must install the according ```-dev``` package(s) of your SDR(s) such as ```hackrf-dev``` __before__ installing URH.
-
-
-
-Snap
-
-URH is available as a snap: https://snapcraft.io/urh
-
-
-
-
-Docker Image
-
-The official URH docker image is available [here](https://hub.docker.com/r/jopohl/urh/). It has all native backends included and ready to operate.
-
-
-
+#### Docker Images
+The official URH docker image is available [here](https://hub.docker.com/r/jopohl/urh/). It has all native backends included and ready to operate.
-
-macOS
-
-
-Using DMG
+### macOS
+#### Using DMG
It is recommended to use __at least macOS 10.14__ when using the DMG available [here](https://github.com/jopohl/urh/releases).
-
-
-
-With pip
-
-1. Install [Python 3 for Mac OS X](https://www.python.org/downloads/mac-osx/).
- _If you experience issues with preinstalled Python, make sure you update to a recent version using the given link._
-2. (Optional) Install desired native libs e.g. ```brew install librtlsdr``` for
-corresponding native device support.
-3. In a terminal, type: ```pip3 install urh```.
-4. Type ```urh``` in a terminal to get it started.
-
-
-
-
-
-
-Update your installation
-
-If you installed URH via pip you can keep it up to date with ``` python3 -m pip install --upgrade urh ```.
-
-
-
-
-Running from source
+#### With brew
+URH is available as a [homebrew formula](https://formulae.brew.sh/formula/urh) so you can install it with
+```commandline
+brew install urh
+```
-
-Without installation
+### Running from source (OS-agnostic)
+#### Without installation
To execute the Universal Radio Hacker without installation, just run:
-```bash
+```commandline
git clone https://github.com/jopohl/urh/
cd urh/src/urh
./main.py
@@ -144,15 +92,11 @@ cd urh/src/urh
Note, before first usage the C++ extensions will be built.
-
-
-
-
-Installing from source
+#### Installing from source
To install URH from source you need to have ```python-setuptools``` installed. You can get them with ```python3 -m pip install setuptools```.
Once the setuptools are installed execute:
-```bash
+```commandline
git clone https://github.com/jopohl/urh/
cd urh
python setup.py install
@@ -160,9 +104,6 @@ python setup.py install
And start the application by typing ```urh``` in a terminal.
-
-
-
## Articles
### Hacking stuff with URH
diff --git a/data/make_manylinux2014_wheels_full.sh b/data/make_manylinux2014_wheels_full.sh
deleted file mode 100755
index af0543595a..0000000000
--- a/data/make_manylinux2014_wheels_full.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-
-# for plain quay.io/pypa/manylinux2014_x86_64
-
-AIRSPY_VERSION="1.0.9"
-BLADERF_VERSION="2018.08"
-LIMESUITE_VERSION="20.01.0"
-SDRPLAY_VERSION="2.13"
-RTLSDR_VERSION="0.6.0"
-
-echo -e '\033[92mInstalling dependencies...\033[0m'
-yum -y -q install wget cmake3 hackrf-devel uhd-devel\
- https://github.com/analogdevicesinc/libiio/releases/download/v0.19/libiio-0.19.g5f5af2e-centos-7-x86_64.rpm
-
-build_airspy() {
- &> /dev/null
- tar xf /tmp/airspy.tar.gz -C /tmp
- cmake3 -Wno-dev -S /tmp/airspyone_host-$AIRSPY_VERSION -B /tmp/build_airspy > /dev/null
- make --silent -C /tmp/build_airspy > /dev/null
- make --silent -C /tmp/build_airspy install > /dev/null
-}
-
-build_bladerf() {
- wget https://github.com/Nuand/bladeRF/archive/$BLADERF_VERSION.tar.gz -O /tmp/bladeRF.tar.gz &> /dev/null
- tar xf /tmp/bladeRF.tar.gz -C /tmp
- cmake3 -Wno-dev -S /tmp/bladeRF-$BLADERF_VERSION/host -B /tmp/build_blade > /dev/null
- make --silent -C /tmp/build_blade > /dev/null
- make --silent -C /tmp/build_blade install > /dev/null
-}
-
-build_limesdr() {
- wget https://github.com/myriadrf/LimeSuite/archive/v$LIMESUITE_VERSION.tar.gz -O /tmp/lime.tar.gz &> /dev/null
- tar xf /tmp/lime.tar.gz -C /tmp
- cmake3 -Wno-dev -S /tmp/LimeSuite-$LIMESUITE_VERSION -B /tmp/build_lime > /dev/null
- make --silent -C /tmp/build_lime > /dev/null
- make --silent -C /tmp/build_lime install > /dev/null
-}
-
-build_rtlsdr() {
- wget https://github.com/osmocom/rtl-sdr/archive/$RTLSDR_VERSION.tar.gz -O /tmp/rtlsdr.tar.gz &> /dev/null
- tar xf /tmp/rtlsdr.tar.gz -C /tmp
- cmake3 -Wno-dev -DDETACH_KERNEL_DRIVER=ON -S /tmp/rtl-sdr-$RTLSDR_VERSION -B /tmp/build_rtlsdr > /dev/null
- make --silent -C /tmp/build_rtlsdr > /dev/null
- make --silent -C /tmp/build_rtlsdr install > /dev/null
-}
-
-build_sdrplay() {
- wget http://www.sdrplay.com/software/SDRplay_RSP_API-Linux-$SDRPLAY_VERSION.1.run -O /tmp/sdrplay.run &> /dev/null
- bash /tmp/sdrplay.run --tar xf -C /tmp
- mv /tmp/mirsdrapi-rsp.h /usr/include
- mv /tmp/x86_64/* /usr/lib64
- ln -s /usr/lib64/libmirsdrapi-rsp.so.$SDRPLAY_VERSION /usr/lib64/libmirsdrapi-rsp.so
-}
-
-echo -e '\033[92mCompiling SDR libs...\033[0m'
-build_airspy &
-build_bladerf &
-build_limesdr &
-build_rtlsdr &
-build_sdrplay &
-wait
-
-touch /tmp/urh_releasing
-for PYBIN in /opt/python/*/bin; do
- echo -e "\033[1mInstalling requirements for $PYBIN\033[0m"
- "${PYBIN}/pip" install -r /io/data/requirements.txt > /dev/null
-
- cd /io || return
- echo -e "\033[1mBuilding extentions for $PYBIN\033[0m"
- "${PYBIN}/python3" setup.py build_ext "-j$(nproc)" | grep --color=always "Skipping"
-
- echo -e "\033[1mBuilding wheel for $PYBIN\033[0m"
- "${PYBIN}/pip" wheel --no-deps /io/ -w /wheelhouse/ > /dev/null
-done
-
-# Bundle external libs into wheels
-echo -e '\033[92mRepairing wheels...\033[0m'
-for whl in /wheelhouse/*.whl; do
- auditwheel repair "$whl" -w /io/dist/
-done
diff --git a/data/make_manylinux2014_wheels.sh b/data/make_manylinux_wheels.sh
similarity index 88%
rename from data/make_manylinux2014_wheels.sh
rename to data/make_manylinux_wheels.sh
index d8b8df09fd..f1ed22bc5a 100755
--- a/data/make_manylinux2014_wheels.sh
+++ b/data/make_manylinux_wheels.sh
@@ -1,6 +1,8 @@
#!/bin/bash
# for adapted jopohl/urh_manylinux
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/:/usr/local/lib/:/usr/lib64/
+
touch /tmp/urh_releasing
for PYBIN in /opt/python/*$PYVER*/bin; do # for all if PYVER not set
diff --git a/data/manylinux2014.Dockerfile b/data/manylinux.Dockerfile
similarity index 56%
rename from data/manylinux2014.Dockerfile
rename to data/manylinux.Dockerfile
index 98fb140585..c514044646 100644
--- a/data/manylinux2014.Dockerfile
+++ b/data/manylinux.Dockerfile
@@ -1,17 +1,23 @@
-FROM quay.io/pypa/manylinux2014_x86_64
+FROM quay.io/pypa/manylinux_2_28_x86_64
+RUN yum -y install wget blas libusb-devel fftw-devel cmake3 boost-devel https://github.com/analogdevicesinc/libiio/releases/download/v0.19/libiio-0.19.g5f5af2e-centos-7-x86_64.rpm
RUN export AIRSPY_VERSION="1.0.9" \
- && export BLADERF_VERSION="2018.08" \
+ && export BLADERF_VERSION="2022.11" \
&& export LIMESUITE_VERSION="20.01.0" \
+ && export HACKRF_VERSION="v2023.01.1" \
&& export SDRPLAY_VERSION="2.13" \
&& export RTLSDR_VERSION="0.6.0" \
- && export UHD_VERSION="3.15.0.0" \
- && yum -y install wget cmake3 hackrf-devel boost169-devel https://github.com/analogdevicesinc/libiio/releases/download/v0.19/libiio-0.19.g5f5af2e-centos-7-x86_64.rpm \
+ && export UHD_VERSION="4.5.0.0" \
+ # HackRF
+ && git clone --branch $HACKRF_VERSION --depth 1 https://github.com/greatscottgadgets/hackrf /tmp/hackrf-$HACKRF_VERSION \
+ && cmake3 -Wno-dev -S /tmp/hackrf-$HACKRF_VERSION/host -B /tmp/build_hackrf \
+ && make -j$(nproc) -C /tmp/build_hackrf \
+ && make -C /tmp/build_hackrf install \
# UHD
&& wget https://github.com/EttusResearch/uhd/archive/v$UHD_VERSION.tar.gz -O /tmp/uhd.tar.gz \
&& tar xf /tmp/uhd.tar.gz -C /tmp \
- && python3.9 -m pip install mako \
- && cmake3 -DBOOST_INCLUDEDIR=/usr/include/boost169/ -DBOOST_LIBRARYDIR=/usr/lib64/boost169/ -DENABLE_EXAMPLES=OFF -DENABLE_UTILS=OFF -DENABLE_C_API=ON -DENABLE_TESTS=OFF -DENABLE_MAN_PAGES=OFF -S /tmp/uhd-$UHD_VERSION/host -B /tmp/build_uhd \
+ && python3.10 -m pip install mako \
+ && cmake3 -DBOOST_INCLUDEDIR=/usr/include/boost/ -DBOOST_LIBRARYDIR=/usr/lib64/boost/ -DENABLE_EXAMPLES=OFF -DENABLE_UTILS=OFF -DENABLE_C_API=ON -DENABLE_TESTS=OFF -DENABLE_MAN_PAGES=OFF -S /tmp/uhd-$UHD_VERSION/host -B /tmp/build_uhd \
&& make -j$(nproc) -C /tmp/build_uhd \
&& make -C /tmp/build_uhd install \
# AirSpy
@@ -21,21 +27,20 @@ RUN export AIRSPY_VERSION="1.0.9" \
&& make -j$(nproc) -C /tmp/build_airspy \
&& make -C /tmp/build_airspy install \
# BladeRF
- && wget https://github.com/Nuand/bladeRF/archive/$BLADERF_VERSION.tar.gz -O /tmp/bladeRF.tar.gz \
- && tar xf /tmp/bladeRF.tar.gz -C /tmp \
- && cmake3 -Wno-dev -S /tmp/bladeRF-$BLADERF_VERSION/host -B /tmp/build_blade \
+ && git clone --branch $BLADERF_VERSION --recursive https://github.com/Nuand/bladeRF /tmp/bladeRF-$BLADERF_VERSION \
+ && cmake -S /tmp/bladeRF-$BLADERF_VERSION/host -B /tmp/build_blade \
&& make -j$(nproc) -C /tmp/build_blade \
&& make -C /tmp/build_blade install \
- && wget https://github.com/myriadrf/LimeSuite/archive/v$LIMESUITE_VERSION.tar.gz -O /tmp/lime.tar.gz \
# Lime
+ && wget https://github.com/myriadrf/LimeSuite/archive/v$LIMESUITE_VERSION.tar.gz -O /tmp/lime.tar.gz \
&& tar xf /tmp/lime.tar.gz -C /tmp \
- && cmake3 -S /tmp/LimeSuite-$LIMESUITE_VERSION -B /tmp/build_lime \
+ && cmake -S /tmp/LimeSuite-$LIMESUITE_VERSION -B /tmp/build_lime \
&& make -j$(nproc) -C /tmp/build_lime \
&& make -C /tmp/build_lime install \
# RTLSDR
&& wget https://github.com/osmocom/rtl-sdr/archive/$RTLSDR_VERSION.tar.gz -O /tmp/rtlsdr.tar.gz \
&& tar xf /tmp/rtlsdr.tar.gz -C /tmp \
- && cmake3 -DDETACH_KERNEL_DRIVER=ON -S /tmp/rtl-sdr-$RTLSDR_VERSION -B /tmp/build_rtlsdr \
+ && cmake -DDETACH_KERNEL_DRIVER=ON -S /tmp/rtl-sdr-$RTLSDR_VERSION -B /tmp/build_rtlsdr \
&& make -j$(nproc) -C /tmp/build_rtlsdr \
&& make -C /tmp/build_rtlsdr install \
# SDRPLAY
diff --git a/src/urh/util/util.py b/src/urh/util/util.py
index 7d76d59b24..97aa578cff 100644
--- a/src/urh/util/util.py
+++ b/src/urh/util/util.py
@@ -65,6 +65,7 @@ def set_shared_library_path():
current_path = os.environ.get("PATH", '')
if not current_path.startswith(shared_lib_dir):
os.environ["PATH"] = shared_lib_dir + os.pathsep + current_path
+ os.add_dll_directory(shared_lib_dir)
else:
# LD_LIBRARY_PATH will not be considered at runtime so we explicitly load the .so's we need
exts = [".so"] if sys.platform == "linux" else [".so", ".dylib"]