mirror of
https://github.com/jopohl/urh.git
synced 2026-02-20 01:31:18 +01:00
Update SDR drivers on macOS (#959)
This commit is contained in:
committed by
GitHub
parent
48c10b43de
commit
ebd5c21827
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
@@ -16,21 +16,25 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-2019, macos-10.15]
|
||||
python-version: ['3.7']
|
||||
python-version: ['3.7', '3.8', '3.9', '3.10']
|
||||
architecture: [x64]
|
||||
include:
|
||||
- os: windows-2019
|
||||
python-version: '3.7'
|
||||
architecture: x86
|
||||
- os: ubuntu-latest
|
||||
exclude:
|
||||
- os: windows-2019
|
||||
python-version: '3.8'
|
||||
architecture: x64
|
||||
- os: ubuntu-latest
|
||||
- os: windows-2019
|
||||
python-version: '3.9'
|
||||
architecture: x64
|
||||
- os: ubuntu-latest
|
||||
- os: windows-2019
|
||||
python-version: '3.10'
|
||||
- os: macOS-10.15
|
||||
python-version: '3.7'
|
||||
- os: macOS-10.15
|
||||
python-version: '3.8'
|
||||
- os: macOS-10.15
|
||||
python-version: '3.10'
|
||||
architecture: x64
|
||||
|
||||
fail-fast: false
|
||||
|
||||
@@ -54,17 +58,6 @@ jobs:
|
||||
env:
|
||||
ARCH: ${{ matrix.architecture }}
|
||||
|
||||
|
||||
- name: Setup SDR Drivers (macOS)
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
git clone --depth 1 https://gitlab.com/jopohl/sdr_drivers
|
||||
mkdir src/urh/dev/native/lib/shared
|
||||
tar xf sdr_drivers/osx-64.tar.bz2 -C src/urh/dev/native/lib/shared
|
||||
mkdir /tmp/osx-64
|
||||
tar xf sdr_drivers/osx-64.tar.bz2 -C /tmp/osx-64
|
||||
rm -rf sdr_drivers
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
pip install wheel
|
||||
@@ -80,7 +73,20 @@ jobs:
|
||||
pipwin install pyaudio
|
||||
elif [[ $OS == mac* ]]
|
||||
then
|
||||
HOMEBREW_NO_INSTALL_CLEANUP=TRUE brew install airspy hackrf librtlsdr portaudio uhd
|
||||
brew tap pothosware/homebrew-pothos
|
||||
brew install airspy hackrf librtlsdr libbladerf limesuite portaudio uhd
|
||||
|
||||
wget -nv https://github.com/analogdevicesinc/libiio/releases/download/v0.23/macOS-10.15.pkg
|
||||
sudo installer -pkg macOS-10.15.pkg -target /
|
||||
sudo cp /Library/Frameworks/iio.framework/iio /usr/local/lib/libiio.dylib
|
||||
sudo install_name_tool -id "/usr/local/lib/libiio.dylib" /usr/local/lib/libiio.dylib
|
||||
file /usr/local/lib/libiio.dylib
|
||||
otool -L /usr/local/lib/libiio.dylib
|
||||
sudo cp /Library/Frameworks/iio.framework/Versions/0.23/Headers/iio.h /usr/local/include
|
||||
|
||||
wget -nv https://www.sdrplay.com/software/SDRplay_RSP_API-MacOSX-2.13.2.pkg
|
||||
sudo installer -pkg SDRplay_RSP_API-MacOSX-2.13.2.pkg -target /
|
||||
|
||||
pip install pyaudio
|
||||
fi
|
||||
pip install twine setuptools pytest pytest-xvfb pytest-cov pytest-faulthandler six appdirs packaging pyinstaller
|
||||
@@ -93,7 +99,7 @@ jobs:
|
||||
run: python src/urh/cythonext/build.py
|
||||
|
||||
- name: Create sdist
|
||||
if: ${{ matrix.python-version == '3.9' }}
|
||||
if: ${{ matrix.python-version == '3.9' && startsWith(matrix.os, 'ubuntu') }}
|
||||
run: python setup.py sdist
|
||||
|
||||
- run: python setup.py bdist_wheel
|
||||
@@ -134,18 +140,19 @@ jobs:
|
||||
- name: Build DMG
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
python data/pyinstaller_helper.py
|
||||
cp data/pyinstaller_macos.spec urh.spec
|
||||
pyinstaller --clean --distpath ./pyinstaller --workpath ./urh_build urh.spec
|
||||
mkdir -p dist
|
||||
cat pyinstaller/urh.app/Contents/Info.plist
|
||||
cat pyinstaller/main.app/Contents/Info.plist
|
||||
hdiutil create -volname Universal.Radio.Hacker \
|
||||
-srcfolder pyinstaller/urh.app \
|
||||
-srcfolder pyinstaller/main.app \
|
||||
-ov -format UDZO \
|
||||
dist/Universal.Radio.Hacker-"$(python src/urh/version.py)".dmg
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dist
|
||||
name: dist-${{ matrix.os }}
|
||||
path: dist
|
||||
|
||||
- name: Run pytest with coverage
|
||||
|
||||
54
data/pyinstaller_macos.spec
Normal file
54
data/pyinstaller_macos.spec
Normal file
@@ -0,0 +1,54 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['src/urh/main.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('src/urh/plugins', 'urh/plugins')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=['matplotlib'],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='main',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None , icon='data/icons/appicon.icns')
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='main')
|
||||
app = BUNDLE(coll,
|
||||
name='main.app',
|
||||
icon='./data/icons/appicon.icns',
|
||||
bundle_identifier=None,
|
||||
info_plist={
|
||||
'NSRequiresAquaSystemAppearance': True,
|
||||
'NSMicrophoneUsageDescription': 'URH needs access to your microphone to capture signals via Soundcard.',
|
||||
'CFBundleDisplayName': 'URH',
|
||||
'CFBundleName': 'URH'
|
||||
},)
|
||||
Reference in New Issue
Block a user