diff --git a/DSView/CMakeLists.txt b/DSView/CMakeLists.txt index 5df84709..fad159d8 100644 --- a/DSView/CMakeLists.txt +++ b/DSView/CMakeLists.txt @@ -396,6 +396,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "/usr/local/lib") install(TARGETS ${PROJECT_NAME} DESTINATION bin/) install(DIRECTORY res DESTINATION share/${PROJECT_NAME}) install(DIRECTORY ../libsigrokdecode4DSL/decoders DESTINATION share/${PROJECT_NAME}) +install(FILES icons/logo.png DESTINATION share/${PROJECT_NAME} RENAME logo.png) +install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/) +install(FILES DSView.desktop DESTINATION /usr/share/applications/) #=============================================================================== #= Packaging (handled by CPack) diff --git a/DSView/DSView.desktop b/DSView/DSView.desktop new file mode 100755 index 00000000..fba3202a --- /dev/null +++ b/DSView/DSView.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=0.96 +Exec=/usr/local/bin/DSView +Name=DSView +Comment=GUI Program for DreamSourceLab USB-based Instruments +Icon=/usr/local/share/DSView/logo.png +Type=Application +Terminal=false +Categories=Development diff --git a/DSView/DreamSourceLab.rules b/DSView/DreamSourceLab.rules new file mode 100644 index 00000000..05f68bad --- /dev/null +++ b/DSView/DreamSourceLab.rules @@ -0,0 +1 @@ +SUBSYSTEM=="usb", ATTRS{idVendor}=="2a0e", MODE="0666" diff --git a/DSView/main.cpp b/DSView/main.cpp index bb426cea..d63b2e7f 100644 --- a/DSView/main.cpp +++ b/DSView/main.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "dsapplication.h" #include "pv/devicemanager.h" diff --git a/DSView/pv/mainframe.cpp b/DSView/pv/mainframe.cpp index 435f583e..777119eb 100644 --- a/DSView/pv/mainframe.cpp +++ b/DSView/pv/mainframe.cpp @@ -51,6 +51,12 @@ MainFrame::MainFrame(DeviceManager &device_manager, setMinimumWidth(800); //resize(1024, 768); + // Set the window icon + QIcon icon; + icon.addFile(QString::fromUtf8(":/icons/logo.png"), + QSize(), QIcon::Normal, QIcon::Off); + setWindowIcon(icon); + _moving = false; _startPos = None; _freezing = false; diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index af8166e4..4d4ba569 100644 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -117,12 +117,6 @@ void MainWindow::setup_ui() layout()->setMargin(0); layout()->setSpacing(0); - // Set the window icon - QIcon icon; - icon.addFile(QString::fromUtf8(":/icons/logo.png"), - QSize(), QIcon::Normal, QIcon::Off); - setWindowIcon(icon); - // Setup the central widget _central_widget = new QWidget(this); _vertical_layout = new QVBoxLayout(_central_widget); diff --git a/INSTALL b/INSTALL index 7044b78d..82b83232 100644 --- a/INSTALL +++ b/INSTALL @@ -1,78 +1,89 @@ -------------------------------------------------------------------------------- -INSTALL -------------------------------------------------------------------------------- - -Requirements ------------- - - git - - gcc (>= 4.0) - - g++ - - make - - libtool - - autoconf >= 2.63 - - automake >= 1.11 - - cmake >= 2.6 - - Qt >= 5.0 - - libtool - - libglib >= 2.32.0 - - libzip >= 0.10 - - libusb-1.0 >= 1.0.16 - On FreeBSD, this is an integral part of the FreeBSD libc, not an extra package/library. - This is part of the standard OpenBSD install (not an extra package), apparently. - - libboost >= 1.42 (including the following libs): - - libboost-system - - libboost-thread - - pkg-config >= 0.22 - This is part of the standard OpenBSD install (not an extra package), apparently. - - check >= 0.9.4 (optional, only needed to run unit tests) - - libfftw3 >= 3.3 - -Building and installing ------------------------ - -Step1: Installing the requirements: - -please check your respective distro's package manager tool if you use other distros -Debian/Ubuntu: - $ sudo apt-get install git-core gcc g++ make cmake autoconf automake libtool pkg-config \ - libglib2.0-dev libzip-dev libudev-dev libusb-1.0-0-dev \ - python3-dev qt5-default libboost-dev libboost-test-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev check libfftw3-dev - -Fedora (18, 19): - $ sudo yum install git gcc g++ make cmake autoconf automake libtool pkgconfig glib2-devel \ - libzip-devel libudev-devel libusb1-devel \ - python3-devel qt-devel boost-devel check libfftw3-devel - -Arch: - $ pacman -S git gcc make cmake autoconf autoconf-archive automake libtool \ - pkg-config glib2 glibmm libzip libusb check - python boost qt5 qt5-base qt5-svg libfftw3 - -Step2: Get the DSView source code - - $ git clone git://github.com/DreamSourceLab/DSView - -Step3: Building - - $ cd libsigrok4DSL - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install - $ cd .. - - $ cd libsigrokdecode4DSL - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install - $ cd .. - - $ cd DSView - $ cmake . - $ make - $ sudo make install - -See the following wiki page for more (OS-specific) instructions: - - http://sigrok.org/wiki/Building +------------------------------------------------------------------------------- +INSTALL +------------------------------------------------------------------------------- + +Requirements +------------ + - git + - gcc (>= 4.0) + - g++ + - make + - libtool + - autoconf >= 2.63 + - automake >= 1.11 + - cmake >= 2.6 + - Qt >= 5.0 + - libtool + - libglib >= 2.32.0 + - libzip >= 0.10 + - libusb-1.0 >= 1.0.16 + On FreeBSD, this is an integral part of the FreeBSD libc, not an extra package/library. + This is part of the standard OpenBSD install (not an extra package), apparently. + - libboost >= 1.42 (including the following libs): + - libboost-system + - libboost-thread + - pkg-config >= 0.22 + This is part of the standard OpenBSD install (not an extra package), apparently. + - check >= 0.9.4 (optional, only needed to run unit tests) + - libfftw3 >= 3.3 + +Building and installing +----------------------- +Step1: Get the DSView source code + + $ git clone git://github.com/DreamSourceLab/DSView + + +Step2: Installing the requirements: + +please check your respective distro's package manager tool if you use other distros +Debian/Ubuntu: + $ sudo apt-get install git-core gcc gcc-c++ make cmake autoconf automake libtool pkg-config \ + libglib2.0-dev libzip-dev libudev-dev libusb-1.0-0-dev \ + python3-dev qt5-default qt5-qtbase-devel libboost-dev libboost-test-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev check libfftw3-dev + +Fedora (18, 19): + $ sudo yum install git gcc g++ make cmake autoconf automake libtool pkgconfig glib2-devel \ + libzip-devel libudev-devel libusb1-devel \ + python3-devel qt-devel boost-devel check libfftw3-devel + +Arch: + $ pacman -S git gcc make cmake autoconf autoconf-archive automake libtool \ + pkg-config glib2 glibmm libzip libusb check + python boost qt5 qt5-base qt5-svg libfftw3 + + +Step3: Building + + $ cd libsigrok4DSL + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + $ cd .. + + $ cd libsigrokdecode4DSL + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + $ cd .. + + $ cd DSView + $ cmake . + +/* + * If this step fails, + * make sure that your pkg-config is properly configured + * to find the libsigrok and libsigrokdecode libraries + * (It's not by default in Fedora 23). + * To do this add "export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + * to your ~/.bashrc and reload it `. ~/.bashrc`. + */ + + $ make + $ sudo make install + +See the following wiki page for more (OS-specific) instructions: + + http://sigrok.org/wiki/Building