Skip to content

Commit

Permalink
Merge pull request #1 from analogdevicesinc/v1.3.0-rc1
Browse files Browse the repository at this point in the history
V1.3.0 rc1
  • Loading branch information
tktf50 authored Apr 3, 2021
2 parents e02cebe + 441fd19 commit 17a7fc4
Show file tree
Hide file tree
Showing 290 changed files with 65,456 additions and 11,755 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Pull the Docker Image
run: docker pull alexandratr/scopy-flatpak-bionic:clean
run: docker pull adisuciu/scopy-flatpak-ubuntu20:latest
- name: Run Docker Image
run: |
docker run --privileged \
-v `pwd`:$GITHUB_WORKSPACE:rw \
-e "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" \
alexandratr/scopy-flatpak-bionic:clean /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/inside_flatpak_docker.sh
adisuciu/scopy-flatpak-ubuntu20:latest /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/inside_flatpak_docker.sh
- uses: actions/upload-artifact@v2
with:
name: Scopy.flatpak
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "iio-emu"]
path = iio-emu
url = https://github.com/analogdevicesinc/iio-emu.git
2 changes: 1 addition & 1 deletion CI/appveyor/build_appveyor_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -f /opt/qt59/bin/qt59-env.sh ] ; then
fi

if command -v brew ; then
QT_PATH="$(brew --prefix qt)/bin"
QT_PATH="$(brew --prefix ${QT_FORMULAE})/bin"
export PATH="${QT_PATH}:$PATH"
fi

Expand Down
56 changes: 48 additions & 8 deletions CI/appveyor/build_appveyor_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,52 @@ set -e

export PATH=/bin:/usr/bin:/${MINGW_VERSION}/bin:/c/Program\ Files/Git/cmd:/c/Windows/System32:/c/Program\ Files/7-Zip:/c/Program\ Files\ \(x86\)/Inno\ Setup\ \6:/c/Program\ Files/Appveyor/BuildAgent
echo $PATH

appveyor AddMessage "1. Starting build_appveyor_mingw.sw"
RC_COMPILER_OPT="-DCMAKE_RC_COMPILER=/c/msys64/${MINGW_VERSION}/bin/windres.exe"

WORKDIR=${PWD}
echo BUILD_NO $BUILD_NO
JOBS=$(nproc)

wget http://swdownloads.analog.com/cse/m1k/drivers/dpinst.zip
wget http://swdownloads.analog.com/cse/m1k/drivers/dfu-util.zip
7z x -y "dpinst.zip" -o"/c/dpinst"
7z x -y "dfu-util.zip" -o"/c/dfu-util"

CC=/${MINGW_VERSION}/bin/${ARCH}-w64-mingw32-gcc.exe
CXX=/${MINGW_VERSION}/bin/${ARCH}-w64-mingw32-g++.exe
CMAKE_OPTS="
CMAKE_OPTS="\
-DCMAKE_C_COMPILER:FILEPATH=${CC} \
-DCMAKE_CXX_COMPILER:FILEPATH=${CXX} \
-DPKG_CONFIG_EXECUTABLE=/$MINGW_VERSION/bin/pkg-config.exe \
-DCMAKE_PREFIX_PATH=/c/msys64/$MINGW_VERSION/lib/cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
"

SCOPY_CMAKE_OPTS="
SCOPY_CMAKE_OPTS="\
$RC_COMPILER_OPT \
-DBREAKPAD_HANDLER=ON \
-DGIT_EXECUTABLE=/c/Program\\ Files/Git/cmd/git.exe \
-DWITH_DOC=ON \
-DPYTHON_EXECUTABLE=/$MINGW_VERSION/bin/python3.exe \
"

DLL_DEPS="libmatio-*.dll libhdf5-*.dll libszip*.dll libpcre*.dll libdouble-conversion*.dll libwinpthread-*.dll libgcc_*.dll libstdc++-*.dll libboost_*.dll libglib-*.dll libintl-*.dll libiconv-*.dll libglibmm-2.*.dll libgmodule-2.*.dll libgobject-2.*.dll libffi-*.dll libsigc-2.*.dll libfftw3f-*.dll libicu*.dll zlib*.dll libharfbuzz-*.dll libfreetype-*.dll libbz2-*.dll libpng16-*.dll libgraphite2.dll libjpeg-*.dll libsqlite3-*.dll libwebp-*.dll libxml2-*.dll liblzma-*.dll libxslt-*.dll libzip*.dll libpython3.*.dll libgnutls*.dll libnettle*.dll libhogweed*.dll libgmp*.dll libidn*.dll libp11*.dll libtasn*.dll libunistring*.dll libusb-*.dll libzstd*.dll libgnuradio-*.dll /$MINGW_VERSION/lib/python3.* libiio*.dll libvolk*.dll liblog4cpp*.dll libad9361*.dll liborc*.dll libsigrok*.dll qwt*.dll libm2k*.dll libbrotli*.dll"
PYTHON_LOCATION=/$MINGW_VERSION/lib/python3.8
PYTHON_FILES="${PYTHON_LOCATION}/*.py ${PYTHON_LOCATION}/asyncio ${PYTHON_LOCATION}/collections ${PYTHON_LOCATION}/concurrent ${PYTHON_LOCATION}/config-3.* ${PYTHON_LOCATION}/ctypes ${PYTHON_LOCATION}/distutils ${PYTHON_LOCATION}/encodings ${PYTHON_LOCATION}/lib-dynload ${PYTHON_LOCATION}/site-packages"

DLL_DEPS=$(cat ${WORKDIR}/CI/appveyor/mingw_dll_deps)
DLL_DEPS="$DLL_DEPS $PYTHON_FILES"

echo $DLL_DEPS

OLD_PATH=$PATH
DEST_FOLDER=scopy_$ARCH_BIT
BUILD_FOLDER=build_$ARCH_BIT
DEBUG_FOLDER=debug_$ARCH_BIT

appveyor AddMessage "2. Installing msys deps.sw"
cd /c
source ${WORKDIR}/CI/appveyor/install_msys_deps.sh
appveyor AddMessage "3. Installed msys deps.sw"

# Download a 32-bit version of windres.exe
cd ${WORKDIR}
Expand All @@ -45,23 +58,35 @@ gunzip windres.exe.gz


echo "### Building Scopy ..."
appveyor AddMessage "4. Running CMake"
/$MINGW_VERSION/bin/python3.exe --version
mkdir /c/$BUILD_FOLDER
cd /c/$BUILD_FOLDER
cp /tmp/scopy-mingw-build-status /c/projects/scopy
cat /c/projects/scopy/scopy-mingw-build-status
cmake -G 'Unix Makefiles' $SCOPY_CMAKE_OPTS $CMAKE_OPTS /c/projects/scopy
appveyor AddMessage "5. Build configured"

cat /c/$BUILD_FOLDER/buildinfo.html
appveyor PushArtifact /c/$BUILD_FOLDER/buildinfo.html

appveyor AddMessage "6. Starting build"
cd /c/$BUILD_FOLDER/resources
sed -i 's/^\(FILEVERSION .*\)$/\1,'$BUILD_NO'/' properties.rc
cat properties.rc
cd /c/build_$ARCH_BIT && make -j $JOBS
appveyor AddMessage "7. Build finished"


echo "### Deploy the application (copy the dependencies) ..."
appveyor AddMessage "8. Deploying Scopy"
mkdir /c/$DEST_FOLDER
cp /c/$BUILD_FOLDER/Scopy.exe /c/$DEST_FOLDER/
cp /c/$BUILD_FOLDER/qt.conf /c/$DEST_FOLDER/
mkdir /c/$DEST_FOLDER/resources

cp /c/$BUILD_FOLDER/iio-emu/iio-emu.exe /c/$DEST_FOLDER/

# windeployqt was broken in qt version 5.14.2 - it should be fixed in Qt 5.15 - https://bugreports.qt.io/browse/QTBUG-80763
/c/msys64/$MINGW_VERSION/bin/windeployqt.exe --dir /c/$DEST_FOLDER --no-system-d3d-compiler --no-compiler-runtime --no-quick-import --opengl --printsupport /c/$BUILD_FOLDER/Scopy.exe
cp -r /$MINGW_VERSION/share/libsigrokdecode/decoders /c/$DEST_FOLDER/
Expand All @@ -76,15 +101,30 @@ mkdir /c/scopy_$ARCH_BIT/.debug
#/$MINGW_VERSION/bin/objcopy -v --only-keep-debug /c/$DEST_FOLDER/Scopy.exe /c/$DEST_FOLDER/.debug/Scopy.exe.debug
dump_syms -r /c/$DEST_FOLDER/Scopy.exe > /c/$DEST_FOLDER/Scopy.exe.sym
#/c/msys64/$MINGW_VERSION/bin/strip.exe --strip-debug --strip-unneeded /c/$DEST_FOLDER/Scopy.exe
#/c/msys64/$MINGW_VERSION/bin/strip.exe --strip-debug --strip-unneeded /c/$DEST_FOLDER/*.dll
#/c/msys64/$MINGW_VERSION/bin/objcopy.exe -v --add-gnu-debuglink=/c/$DEST_FOLDER/.debug/Scopy.exe.debug /c/$DEST_FOLDER/Scopy.exe
mkdir /c/$DEBUG_FOLDER
mv /c/$DEST_FOLDER/Scopy.exe.sym /c/$DEBUG_FOLDER
mv /c/$DEST_FOLDER/.debug /c/$DEBUG_FOLDER

cp -r /c/projects/scopy/drivers /c/$DEST_FOLDER
if [[ $ARCH_BIT == "64" ]]; then
cp /c/dfu-util/dfu-util-static-amd64.exe /c/$DEST_FOLDER/drivers/dfu-util.exe
cp /c/dpinst/dpinst_amd64.exe /c/$DEST_FOLDER/drivers/dpinst.exe
else
cp /c/dfu-util/dfu-util-static.exe /c/$DEST_FOLDER/drivers/dfu-util.exe
cp /c/dpinst/dpinst.exe /c/$DEST_FOLDER/drivers/dpinst.exe
fi

appveyor AddMessage "9. Scopy succesfully deployed"

echo "### Creating archives ... "
appveyor AddMessage "10. Creating archives"
7z a "/c/scopy-${ARCH_BIT}bit.zip" /c/$DEST_FOLDER
# appveyor PushArtifact /c/scopy-${ARCH_BIT}bit.zip
appveyor PushArtifact /c/scopy-${ARCH_BIT}bit.zip
7z a "/c/debug-${ARCH_BIT}bit.zip" /c/$DEBUG_FOLDER
# appveyor PushArtifact /c/debug-${ARCH_BIT}bit.zip
appveyor PushArtifact /c/debug-${ARCH_BIT}bit.zip
appveyor AddMessage "11. Creating installer"
iscc //Qp /c/$BUILD_FOLDER/scopy-$ARCH_BIT.iss
# appveyor PushArtifact /c/$BUILD_FOLDER/scopy-$ARCH_BIT.iss
appveyor PushArtifact $DEPLOY_FILE
appveyor AddMessage "12. Job complete"
12 changes: 8 additions & 4 deletions CI/appveyor/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ENV TZ=Europe/Bucharest
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update -y

# Install base dependencies
RUN apt-get install -y software-properties-common build-essential git sudo apt-utils
RUN apt-get install -y software-properties-common build-essential git sudo apt-utils subversion

# Install flatpak
RUN add-apt-repository ppa:alexlarsson/flatpak -y
Expand All @@ -12,17 +14,19 @@ RUN apt install flatpak flatpak-builder -y

# Install remote
RUN flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
RUN flatpak install flathub org.kde.Platform//5.12 -y
RUN flatpak install flathub org.kde.Sdk//5.12 -y
RUN flatpak install flathub org.kde.Platform//5.15 -y
RUN flatpak install flathub org.kde.Sdk//5.15 -y

# Clean
RUN apt-get clean -y && apt-get autoclean -y

RUN echo Cloning scopy-flatpak
ARG REPO_LINK=https://github.com/analogdevicesinc/scopy-flatpak
ARG REPO_LOCAL=/home/docker/scopy-flatpak
ARG REPO_BRANCH=master

RUN git clone --recurse-submodules "$REPO_LINK" -b "$REPO_BRANCH" "$REPO_LOCAL" 2> /dev/null || (cd "$REPO_LOCAL"; git pull)

#RUN cd /home/docker/scopy-flatpak && make -j4
CMD ["/bin/bash"]

4 changes: 3 additions & 1 deletion CI/appveyor/inside_flatpak_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ apt-get install -y jq

REPO_LOCAL=/home/docker/scopy-flatpak
cd "$REPO_LOCAL"
git pull && git checkout master
# this ensures that latest master is pulled from origin while keeping file cache
# the cache should be updated from time to time locally
git fetch && git reset origin/master --hard

# check the number of elements in the json file in order to get the last element, which is Scopy
cnt=$( echo `jq '.modules | length' org.adi.Scopy.json` )
Expand Down
63 changes: 50 additions & 13 deletions CI/appveyor/install_macos_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ LIBAD9361_BRANCH=master
LIBM2K_BRANCH=master
GRIIO_BRANCH=upgrade-3.8
GNURADIO_FORK=analogdevicesinc
GNURADIO_BRANCH=ming-3.8-clean
GNURADIO_BRANCH=scopy
GRSCOPY_BRANCH=master
GRM2K_BRANCH=master
QWT_BRANCH=qwt-6.1-multiaxes
QWTPOLAR_BRANCH=master # not used
LIBSIGROK_BRANCH=master
LIBSIGROKDECODE_BRANCH=master #not used
BOOST_VERSION_FILE=1_65_1
BOOST_VERSION=1.65.1
BOOST_VERSION_FILE=1_73_0
BOOST_VERSION=1.73.0
LIBTINYIIOD_BRANCH=master

PYTHON="python3"
PACKAGES=" qt pkg-config cmake fftw bison gettext autoconf automake libtool libzip glib libusb $PYTHON"
PACKAGES="$PACKAGES glibmm doxygen wget gnu-sed libmatio dylibbundler libxml2"
PACKAGES=" ${QT_FORMULAE} pkg-config cmake fftw bison gettext autoconf automake libtool libzip glib libusb glog $PYTHON"
PACKAGES="$PACKAGES doxygen wget gnu-sed libmatio dylibbundler libxml2"

set -e
cd ~
Expand Down Expand Up @@ -48,14 +49,15 @@ pip3 install mako six
pwd
source ./projects/scopy/CI/appveyor/before_install_lib.sh

QT_PATH="$(brew --prefix qt)/bin"
QT_PATH="$(brew --prefix ${QT_FORMULAE})/bin"

export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/opt/bison/bin:$PATH"
export PATH="${QT_PATH}:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libzip/lib/pkgconfig"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/glibmm/lib/pkgconfig"

echo $PKG_CONFIG_PATH
QMAKE="$(command -v qmake)"

CMAKE_OPTS="-DCMAKE_PREFIX_PATH=$STAGINGDIR -DCMAKE_INSTALL_PREFIX=$STAGINGDIR"
Expand Down Expand Up @@ -98,6 +100,7 @@ build_libm2k() {
-DBUILD_EXAMPLES=OFF \
-DENABLE_TOOLS=OFF \
-DINSTALL_UDEV_RULES=OFF \
-DENABLE_LOG=ON\
${WORKDIR}/libm2k

make $JOBS
Expand Down Expand Up @@ -200,7 +203,6 @@ build_grm2k() {

build_grscopy() {
echo "### Building gr-scopy - branch $GRSCOPY_BRANCH"

cd ~
git clone --depth 1 https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH ${WORKDIR}/gr-scopy
mkdir ${WORKDIR}/gr-scopy/build-${ARCH}
Expand All @@ -212,6 +214,27 @@ build_grscopy() {
make $JOBS
sudo make $JOBS install
}
build_glibmm() {
echo "### Building glibmm - 2.64.0"
cd ~
wget http://ftp.acc.umu.se/pub/gnome/sources/glibmm/2.64/glibmm-2.64.0.tar.xz
tar xzvf glibmm-2.64.0.tar.xz
cd glibmm-2.64.0
./configure
make $JOBS
sudo make $JOBS install
}

build_sigcpp() {
echo "### Building libsigc++ -2.10.0"
cd ~
wget http://ftp.acc.umu.se/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz
tar xvzf libsigc++-2.10.0.tar.xz
cd libsigc++-2.10.0
./configure
make $JOBS
sudo make $JOBS install
}

build_libsigrokdecode() {
echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH"
Expand Down Expand Up @@ -256,6 +279,24 @@ build_qwtpolar() {
qmake_build_wget "qwtpolar-1.1.1" "https://downloads.sourceforge.net/project/qwtpolar/qwtpolar/1.1.1/qwtpolar-1.1.1.tar.bz2" "qwtpolar.pro" "patch_qwtpolar_mac"
}

build_libtinyiiod() {
echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH"

cd ~
git clone --depth 1 https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH ${WORKDIR}/libtinyiiod
mkdir ${WORKDIR}/libtinyiiod/build-${ARCH}
cd ${WORKDIR}/libtinyiiod/build-${ARCH}

cmake ${CMAKE_OPTS} \
-DBUILD_EXAMPLES=OFF \
${WORKDIR}/libtinyiiod

make $JOBS
sudo make $JOBS install
}

build_sigcpp
build_glibmm
build_libiio
build_libad9361
build_libm2k
Expand All @@ -268,8 +309,4 @@ build_grm2k
build_qwt
build_qwtpolar
build_libsigrokdecode





build_libtinyiiod
9 changes: 6 additions & 3 deletions CI/appveyor/install_msys_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ SCOPY_MINGW_BUILD_DEPS_BRANCH=master
echo "Download and install pre-compiled libraries ... "
wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/scopy-$MINGW_VERSION-build-deps-pacman.txt?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/scopy-$MINGW_VERSION-build-deps-pacman.txt
wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/scopy-$MINGW_VERSION-build-deps.tar.xz?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/scopy-$MINGW_VERSION-build-deps.tar.xz
wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/scopy-mingw-build-status?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/scopy-mingw-build-status
cd /c
tar xJf /tmp/scopy-$MINGW_VERSION-build-deps.tar.xz

cat /tmp/scopy-mingw-build-status

SCOPY_MINGW_BUILD_DEPS_PACMAN=$(</tmp/scopy-$MINGW_VERSION-build-deps-pacman.txt)
PACMAN_SYNC_DEPS="
$SCOPY_MINGW_BUILD_DEPS_PACMAN\
mingw-w64-$ARCH-matio \
"

# /c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-boost-1.72.0-3-any.pkg.tar.zst \
# /c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-qt5-5.14.2-3-any.pkg.tar.zst \
PACMAN_REPO_DEPS="
/c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-breakpad-git-r1680.70914b2d-1-any.pkg.tar.xz \
/c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-libusb-1.0.21-2-any.pkg.tar.xz \
/c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-boost-1.72.0-3-any.pkg.tar.zst \
/c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-qt5-5.14.2-3-any.pkg.tar.zst \
/c/old_msys_deps_$MINGW_VERSION/mingw-w64-$ARCH-breakpad-git-r1680.70914b2d-1-any.pkg.tar.xz \
"

PATH=/c/msys64/$MINGW_VERSION/bin:$PATH
Expand Down
2 changes: 2 additions & 0 deletions CI/appveyor/install_qt_ubuntu_20.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
sudo apt-get -y install vim git cmake qt5-default qtcreator qtdeclarative5-dev qtdeclarative5-dev-tools libqt5svg5 libqt5svg5-devqttools5-dev qttools5-dev-tools
Loading

0 comments on commit 17a7fc4

Please sign in to comment.