From cc931b916c2da31fffc80e46d328520e3c5e26ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Louren=C3=A7o?= <16304376+samuelfmlourenco@users.noreply.github.com> Date: Sun, 21 Apr 2024 20:25:08 +0100 Subject: [PATCH] Add files via upload --- README.txt | 13 ++++++------- install.sh | 8 ++++++-- uninstall.sh | 7 +++++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.txt b/README.txt index 06ad208..a8d9c57 100644 --- a/README.txt +++ b/README.txt @@ -6,7 +6,7 @@ installation, you must certify that your system is Debian based (or at least uses apt-get) and that you have an active Internet connection. It is important to note that you should also have the control commands for the function generator already installed, but you can always install them later (please -refer to the packages "gf2-1.1.tar.gz" or "gf2-1.0.tar.gz" to do so). +refer to the package "gf2-2.0.tar.gz" to do so). A list of the included scripts follows: – install.sh; @@ -15,16 +15,15 @@ A list of the included scripts follows: In order to compile and install GF2 GUI for the first time, all you have to do is to run "install.sh" by invoking "sudo ./install.sh" on a terminal window, after changing your working directory to the current one. This script will -first obtain and install the required "build-essential" and "qt5-default" -packages (if they are not installed yet). Then it will compile the application -and move it to "/usr/local/bin/". +first obtain and install the required "build-essential" and +"qt5-default"/"qtbase5-dev" packages (if they are not installed yet). Then it +will compile the application and move it to "/usr/local/bin/". Conversely, to uninstall, you should run "uninstall.sh" by invoking "sudo ./uninstall.sh", again on a terminal window after making sure that your working directory is this one. This will delete the previously installed -application and source code. However it won't remove the "build-essential" and -"qt5-default" packages, since they could be already installed prior to the -first installation. +application and source code. However it won't remove the packages mentioned +above, since they could be already installed before the first installation. P.S.: Since the GUI was designed having KDE in mind, you should get the best diff --git a/install.sh b/install.sh index 4c2f852..443d9ef 100644 --- a/install.sh +++ b/install.sh @@ -4,20 +4,24 @@ echo Obtaining required packages... apt-get -qq update apt-get -qq install build-essential apt-get -qq install qt5-default +apt-get -qq install qtbase5-dev echo Copying source code files... mkdir -p /usr/local/src/gf2-gui/icons +mkdir -p /usr/local/src/gf2-gui/misc cp -f src/about.cpp /usr/local/src/gf2-gui/. cp -f src/about.h /usr/local/src/gf2-gui/. cp -f src/about.ui /usr/local/src/gf2-gui/. cp -f src/gf2-gui.pro /usr/local/src/gf2-gui/. cp -f src/GPL.txt /usr/local/src/gf2-gui/. cp -f src/icons/active64.png /usr/local/src/gf2-gui/icons/. +cp -f src/icons/gf2-gui.png /usr/local/src/gf2-gui/icons/. cp -f src/icons/greyed64.png /usr/local/src/gf2-gui/icons/. cp -f src/icons/selected64.png /usr/local/src/gf2-gui/icons/. cp -f src/main.cpp /usr/local/src/gf2-gui/. cp -f src/mainwindow.cpp /usr/local/src/gf2-gui/. cp -f src/mainwindow.h /usr/local/src/gf2-gui/. cp -f src/mainwindow.ui /usr/local/src/gf2-gui/. +cp -f src/misc/gf2-gui.desktop /usr/local/src/gf2-gui/misc/. cp -f src/resources.qrc /usr/local/src/gf2-gui/. cp -f src/README.txt /usr/local/src/gf2-gui/. cp -f src/serial.cpp /usr/local/src/gf2-gui/. @@ -26,6 +30,6 @@ cp -f src/serial.ui /usr/local/src/gf2-gui/. echo Building and installing application... cd /usr/local/src/gf2-gui qmake -make all clean -mv -f gf2-gui /usr/local/bin/. +make install clean +rm -f gf2-gui echo Done! diff --git a/uninstall.sh b/uninstall.sh index 37414cb..735ed0d 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,6 +1,13 @@ #!/bin/sh echo Removing application... +rm -f /usr/local/share/applications/gf2-gui.desktop +rmdir --ignore-fail-on-non-empty /usr/local/share/applications +rm -f /usr/local/share/icons/hicolor/128x128/apps/gf2-gui.png +rmdir --ignore-fail-on-non-empty /usr/local/share/icons/hicolor/128x128/apps +rmdir --ignore-fail-on-non-empty /usr/local/share/icons/hicolor/128x128 +rmdir --ignore-fail-on-non-empty /usr/local/share/icons/hicolor +rmdir --ignore-fail-on-non-empty /usr/local/share/icons rm -f /usr/local/bin/gf2-gui echo Removing source code files... rm -rf /usr/local/src/gf2-gui