Install PicoScope on Mageia 7

Discussion forum for the new Picoscope Linux software
Post Reply
MikeDeltaBravo
Newbie
Posts: 0
Joined: Sun Jan 03, 2021 4:22 pm

Install PicoScope on Mageia 7

Post by MikeDeltaBravo »

I have successfully installed PicoScope 6 on Mageia 7 using a similar method to that given for Fedora 31 in topic40224.html.

The script needed modifying slightly as shown below.

For legacy reasons, I use urpm for package management. If using dnf then you will need to uncomment the dnf lines and comment the urpm/rpm ones.

Code: Select all

#!/bin/env bash

# Install script for PicoScope 6 on Mageia

# This is taken from https://www.picotech.com/support/topic40224.html
# which is itself based on control.tar.gz in the Debian package

# Look in https://labs.picotech.com/debian/pool/main/p/picoscope/ to find the latest version
# of the .deb file and then update the line below accordingly
PICOSCOPE_DEB_NAME="picoscope_6.14.23-4r580_all.deb"

BUILD_DIR="build"
BUILD_TEMP_DIR="${BUILD_DIR}/temp"
BUILD_OUT_DIR="${BUILD_DIR}/out"
SOURCE_URL="https://labs.picotech.com/debian/pool/main/p/picoscope/${PICOSCOPE_DEB_NAME}"

set -e

# Install some dependencies
#dnf install mono-core gtk-sharp2
urpmi mono-core gtk-sharp2

# WARNING: picoscope fails silently if gtk-sharp2 is not installed!

curl -L "${SOURCE_URL}" > "${PICOSCOPE_DEB_NAME}"
rm -rf "${BUILD_TEMP_DIR}"
mkdir -p "${BUILD_OUT_DIR}" "${BUILD_TEMP_DIR}"
cp "./${PICOSCOPE_DEB_NAME}" "${BUILD_TEMP_DIR}"
cd "${BUILD_TEMP_DIR}"
ar x "${PICOSCOPE_DEB_NAME}"
rm "${PICOSCOPE_DEB_NAME}"
tar -Jxf data.tar.xz

cp -r opt/picoscope /opt
chown -R root:root /opt/picoscope

install usr/share/applications/picoscope.desktop /usr/share/applications

# Not used in Mageia
# install usr/share/menu/picoscope /usr/share/menu/picoscope

cp -r usr/share/doc/picoscope /usr/share/doc/picoscope
chown -R root:root  /usr/share/doc/picoscope


# Post Install script

if [ -x /opt/picoscope/bin/picoscope ];
then
    if [ -e /usr/bin/picoscope ];
    then
	    rm -rf /usr/bin/picoscope >/dev/null 2>&1 || true
    fi
    ln -s /opt/picoscope/bin/picoscope /usr/bin/picoscope >/dev/null 2>&1 || true
fi

UPDATE_MENUS=$(which update-menus 2>/dev/null) || true

if [ "x" != "x""$UPDATE_MENUS" ];
then
    ( test -x "$UPDATE_MENUS" && update-menus 2>&1 ) || true
fi


# loader configuration
PICO_LDCONF_D="/etc/ld.so.conf.d"
PICO_LDCONF_F="picoscope.conf"
PICO_LDCONF_P="/opt/picoscope/lib"

if [ -d "${PICO_LDCONF_D}" ];
then
    if [ -e "${PICO_LDCONF_D}/${PICO_LDCONF_F}" ];
    then
        PICO_LDCONF_N=$( grep -m1 "^""${PICO_LDCONF_P}""\$" "${PICO_LDCONF_D}/${PICO_LDCONF_F}" ) || true
	      if [ "x""${PICO_LDCONF_N}" != "x""${PICO_LDCONF_P}" ];
	      then
	          echo "${PICO_LDCONF_P}" >> "${PICO_LDCONF_D}/${PICO_LDCONF_F}"
	      fi
    else
	      echo "${PICO_LDCONF_P}" > "${PICO_LDCONF_D}/${PICO_LDCONF_F}"
    fi
fi

# to add libraries to the cache
ldconfig || true

# mono-mcs (>= 4.2.1),
# mcs is part of mono-core in Mageia

#dnf install \
rpm -i \
  https://labs.picotech.com/rpm/x86_64/libpicoipp-1.3.0-4r29.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps3000-4.0.40-3r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps3000a-2.1.40-6r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libusbdrdaq-2.0.40-1r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libpl1000-2.0.40-1r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps2000-3.0.40-3r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps2000a-2.1.40-5r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps4000-2.1.40-2r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps4000a-2.1.40-2r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps5000-2.1.40-3r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps5000a-2.1.40-5r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps6000-2.1.40-6r2131.x86_64.rpm \
  https://labs.picotech.com/rpm/x86_64/libps6000a-1.0.40-0r2131.x86_64.rpm

Post Reply