mirror of
https://github.com/gqrx-sdr/gqrx.git
synced 2024-09-21 10:47:10 +00:00
Build AppImage based on conda packages
This commit is contained in:
parent
075ed3d255
commit
d04938648f
140
.github/workflows/build.yml
vendored
140
.github/workflows/build.yml
vendored
@ -6,122 +6,60 @@ jobs:
|
|||||||
appimage:
|
appimage:
|
||||||
name: AppImage
|
name: AppImage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: "ubuntu:18.04"
|
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
APPIMAGE_EXTRACT_AND_RUN: "1"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install base dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq
|
sudo apt-get update -qq
|
||||||
apt-get install -y --no-install-recommends software-properties-common
|
sudo apt-get install -y --no-install-recommends \
|
||||||
add-apt-repository -y ppa:gnuradio/gnuradio-releases
|
libopengl0 \
|
||||||
add-apt-repository -y ppa:git-core/ppa
|
libegl1
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
git \
|
|
||||||
build-essential \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
cmake \
|
|
||||||
libtool \
|
|
||||||
wget \
|
|
||||||
qt5-default \
|
|
||||||
qt5-gtk-platformtheme \
|
|
||||||
qttranslations5-l10n \
|
|
||||||
libqt5svg5-dev \
|
|
||||||
libboost-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
portaudio19-dev \
|
|
||||||
liblog4cpp5-dev \
|
|
||||||
gnuradio-dev \
|
|
||||||
libairspy-dev \
|
|
||||||
libairspyhf-dev \
|
|
||||||
libfreesrp-dev \
|
|
||||||
libhackrf-dev \
|
|
||||||
libusb-1.0-0-dev \
|
|
||||||
libsoapysdr-dev \
|
|
||||||
soapysdr-module-remote \
|
|
||||||
libuhd-dev \
|
|
||||||
liborc-0.4-dev \
|
|
||||||
libhidapi-dev
|
|
||||||
|
|
||||||
cd /tmp
|
- name: Install conda dependencies
|
||||||
git clone https://gitea.osmocom.org/sdr/rtl-sdr.git
|
id: setup-micromamba
|
||||||
cd rtl-sdr
|
uses: mamba-org/setup-micromamba@v1
|
||||||
git checkout v2.0.1
|
with:
|
||||||
mkdir build
|
environment-name: gqrx
|
||||||
cd build
|
create-args: >-
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DDETACH_KERNEL_DRIVER=ON ..
|
c-compiler
|
||||||
make -j4
|
cxx-compiler
|
||||||
make install
|
cmake
|
||||||
ldconfig
|
make
|
||||||
|
pkg-config
|
||||||
cd /tmp
|
gnuradio-core
|
||||||
git clone https://github.com/Nuand/bladeRF.git
|
gnuradio-osmosdr
|
||||||
cd bladeRF
|
libboost-headers
|
||||||
mkdir build
|
mesa-libgl-devel-cos6-x86_64
|
||||||
cd build
|
pybind11
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
|
pulseaudio
|
||||||
make -j4
|
qt6-gtk-platformtheme
|
||||||
make install
|
qt6-main
|
||||||
ldconfig
|
soapysdr-module-lms7
|
||||||
|
soapysdr-module-netsdr
|
||||||
cd /tmp
|
soapysdr-module-plutosdr
|
||||||
git clone https://github.com/dl1ksv/gr-fcdproplus.git
|
soapysdr-module-remote
|
||||||
cd gr-fcdproplus
|
volk
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
ldconfig
|
|
||||||
|
|
||||||
cd /tmp
|
|
||||||
git clone https://gitea.osmocom.org/sdr/libosmo-dsp.git
|
|
||||||
cd libosmo-dsp
|
|
||||||
autoreconf -i
|
|
||||||
./configure --prefix=/usr
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
ldconfig
|
|
||||||
|
|
||||||
cd /tmp
|
|
||||||
git clone https://gitea.osmocom.org/sdr/gr-iqbal.git
|
|
||||||
cd gr-iqbal
|
|
||||||
git checkout gr3.8
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULES_DIR=/usr/lib/x86_64-linux-gnu/cmake ..
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
ldconfig
|
|
||||||
|
|
||||||
cd /tmp
|
|
||||||
git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git
|
|
||||||
cd gr-osmosdr
|
|
||||||
git checkout origin/gr3.8
|
|
||||||
git cherry-pick -n 9c09c90d920dd4906fa8bb9d8443eef84d2565a3
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULES_DIR=/usr/lib/x86_64-linux-gnu/cmake -DENABLE_PYTHON=False ..
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
ldconfig
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Configure
|
- name: Configure
|
||||||
|
shell: bash -el {0}
|
||||||
run: |
|
run: |
|
||||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..
|
||||||
- name: Compile
|
- name: Compile
|
||||||
|
shell: bash -el {0}
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: make -j4
|
run: |
|
||||||
|
make -j4
|
||||||
|
make install
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
|
shell: bash -el {0}
|
||||||
|
env:
|
||||||
|
APPIMAGE_EXTRACT_AND_RUN: "1"
|
||||||
|
PREFIX: ${{ steps.setup-micromamba.outputs.environment-path }}
|
||||||
run: ./appimage.sh
|
run: ./appimage.sh
|
||||||
- name: Save artifact
|
- name: Save artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
43
appimage.sh
43
appimage.sh
@ -9,9 +9,8 @@
|
|||||||
# Requirements:
|
# Requirements:
|
||||||
# * VERSION as an ENV var, if not detected will use actual github
|
# * VERSION as an ENV var, if not detected will use actual github
|
||||||
# version + commit info
|
# version + commit info
|
||||||
# * This must be run after a successfully build, and need to set the
|
# * This must be run after a successfully build and installation into a
|
||||||
# APP var below to the path of the executable (default is the current
|
# prefix passed as the PREFIX variable
|
||||||
# travis build place: build/src/gqrx)
|
|
||||||
# * Must be run on a Linux version as old as the far distro you need to
|
# * Must be run on a Linux version as old as the far distro you need to
|
||||||
# support, tested successfully on Ubuntu 14.04 Trusty Tar
|
# support, tested successfully on Ubuntu 14.04 Trusty Tar
|
||||||
# * If you plan to use the "-u" option you need to configure some things
|
# * If you plan to use the "-u" option you need to configure some things
|
||||||
@ -19,9 +18,11 @@
|
|||||||
#
|
#
|
||||||
# On any troubles invoke stdevPavelmc in github
|
# On any troubles invoke stdevPavelmc in github
|
||||||
|
|
||||||
# Tweak this please: this is the path of the gqrx executable relative to
|
# PREFIX variable must be set before calling this script. It points to the
|
||||||
#the project root will reside after build
|
# prefix in which gqrx is installed and from which dependency libraries will be
|
||||||
APP="build/src/gqrx"
|
# gathered.
|
||||||
|
#PREFIX="micromamba/envs/gqrx"
|
||||||
|
APP="$PREFIX/bin/gqrx"
|
||||||
|
|
||||||
# No need to tweak below unless you move files on the actual project
|
# No need to tweak below unless you move files on the actual project
|
||||||
DESKTOP="dk.gqrx.gqrx.desktop"
|
DESKTOP="dk.gqrx.gqrx.desktop"
|
||||||
@ -41,12 +42,12 @@ echo ""
|
|||||||
|
|
||||||
# basic tests
|
# basic tests
|
||||||
if [ ! -f "$APP" ] ; then
|
if [ ! -f "$APP" ] ; then
|
||||||
echo "Error: the app file is no in the path we need it, update the APP var on this script"
|
echo "Error: the app file is no in the path we need it, set the PREFIX var before running this script"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$DESKTOP" ] ; then
|
if [ ! -f "$DESKTOP" ] ; then
|
||||||
echo "Error: can't find the desktop file, please update the DESKTOP var on the scriot"
|
echo "Error: can't find the desktop file, please update the DESKTOP var on the script"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -62,19 +63,35 @@ rm -rdf Gqrx-*.AppImage 2>/dev/null
|
|||||||
# download & set all needed tools
|
# download & set all needed tools
|
||||||
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
||||||
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
|
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
|
||||||
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
|
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||||
chmod a+x *.AppImage
|
chmod a+x *.AppImage
|
||||||
|
|
||||||
# abra-cadabra
|
# build library arguments so soapy module dependencies are included
|
||||||
mkdir -p ./AppDir/usr/lib
|
soapy_module_libs=("$PREFIX"/lib/SoapySDR/modules*/*)
|
||||||
cp -R /usr/lib/x86_64-linux-gnu/SoapySDR/modules* ./AppDir/usr/soapy-modules
|
linuxdeploy_lib_args=()
|
||||||
|
for lib in ${soapy_module_libs[@]}; do
|
||||||
|
linuxdeploy_lib_args+=( "-l" "$lib" )
|
||||||
|
done
|
||||||
|
|
||||||
mkdir -p ./AppDir/apprun-hooks
|
mkdir -p ./AppDir/apprun-hooks
|
||||||
|
echo 'export CONDA_PREFIX="$APPDIR/usr"' >./AppDir/apprun-hooks/soapy-hook.sh
|
||||||
echo 'export UHD_PKG_PATH="$APPDIR/usr"' >./AppDir/apprun-hooks/uhd-hook.sh
|
echo 'export UHD_PKG_PATH="$APPDIR/usr"' >./AppDir/apprun-hooks/uhd-hook.sh
|
||||||
|
|
||||||
./linuxdeploy-x86_64.AppImage -e "$APP" -d "$DESKTOP" -i "$ICON" -p qt --output appimage --appdir=./AppDir
|
# since libs come from prefix, little use in querying copyright files with dpkg-query
|
||||||
|
export DISABLE_COPYRIGHT_FILES_DEPLOYMENT=1
|
||||||
|
|
||||||
|
# need to set QMAKE variable for linuxdeploy-plugin-qt so it uses PREFIX's Qt
|
||||||
|
export QMAKE="$PREFIX/bin/qmake6"
|
||||||
|
|
||||||
|
./linuxdeploy-x86_64.AppImage -e "$APP" -d "$DESKTOP" -i "$ICON" "${linuxdeploy_lib_args[@]}" -p qt --appdir=./AppDir
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
|
# copy Soapy modules into their expected path in the AppDir
|
||||||
|
cp -R "$PREFIX"/lib/SoapySDR ./AppDir/usr/lib/SoapySDR
|
||||||
|
|
||||||
|
# finally make the AppImage
|
||||||
|
./appimagetool-x86_64.AppImage AppDir/
|
||||||
|
|
||||||
# check build success
|
# check build success
|
||||||
if [ $RESULT -ne 0 ] ; then
|
if [ $RESULT -ne 0 ] ; then
|
||||||
# warning something gone wrong
|
# warning something gone wrong
|
||||||
|
Loading…
Reference in New Issue
Block a user