From 27a1a15ddf9e8cae42d6b54f5057518c7e6395e5 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 17:13:10 +0100
Subject: [PATCH 01/12] Add files via upload
---
src/about.cpp | 4 ++--
src/about.h | 4 ++--
src/about.ui | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/about.cpp b/src/about.cpp
index f1a44b6..5d74e23 100644
--- a/src/about.cpp
+++ b/src/about.cpp
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018-2019 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
diff --git a/src/about.h b/src/about.h
index 8b4da0d..7bad4ba 100644
--- a/src/about.h
+++ b/src/about.h
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018-2019 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
diff --git a/src/about.ui b/src/about.ui
index fb00eea..880ab5e 100644
--- a/src/about.ui
+++ b/src/about.ui
@@ -49,7 +49,7 @@
- <html><head/><body><p>GF2 Graphical User Interface - Version 2.0<br/>Copyright © 2018-2019 Samuel Lourenço</p><p>This program is distributed under the terms of the <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html"><span style=" text-decoration: underline; color:#2980b9;">GNU GPL v3</span></a>.</p></body></html>
+ <html><head/><body><p>GF2 Graphical User Interface - Version 2.1<br/>Copyright © 2018-2024 Samuel Lourenço</p><p>This program is distributed under the terms of the <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html"><span style=" text-decoration: underline; color:#2980b9;">GNU GPL v3</span></a>.</p></body></html>
Qt::AlignJustify|Qt::AlignTop
From f3fb1e75fba3d656d98236db4b7c44356ba53e7e 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 17:42:54 +0100
Subject: [PATCH 02/12] Add files via upload
---
src/main.cpp | 4 ++--
src/mainwindow.cpp | 4 ++--
src/mainwindow.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
index dc2606b..4da1885 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018-2019 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 3d4f440..fa4ab35 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018-2019 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
diff --git a/src/mainwindow.h b/src/mainwindow.h
index c078ba5..6ddb17f 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018-2019 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
From 5789cb76f94b4ddf4e471c266fedd68911140e01 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 17:48:56 +0100
Subject: [PATCH 03/12] Add files via upload
---
src/serial.cpp | 4 ++--
src/serial.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/serial.cpp b/src/serial.cpp
index e1513d7..8bf2c15 100644
--- a/src/serial.cpp
+++ b/src/serial.cpp
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
diff --git a/src/serial.h b/src/serial.h
index 26974a6..8eca19c 100644
--- a/src/serial.h
+++ b/src/serial.h
@@ -1,5 +1,5 @@
-/* GF2 GUI - Version 2.0 for Debian Linux
- Copyright (c) 2018-2019 Samuel Lourenço
+/* GF2 GUI - Version 2.1 for Debian Linux
+ Copyright (c) 2018-2024 Samuel Lourenço
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
From 5e41952d25b4c2e175f9af911a1f694ca80e2767 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 17:57:38 +0100
Subject: [PATCH 04/12] Add files via upload
---
src/serial.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/serial.cpp b/src/serial.cpp
index 8bf2c15..b1f557a 100644
--- a/src/serial.cpp
+++ b/src/serial.cpp
@@ -20,6 +20,8 @@
// Includes
#include
+#include
+#include
#include "serial.h"
#include "ui_serial.h"
From 1e653c12b0c0b2865cce739efa281c6a64ce9d91 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 18:13:20 +0100
Subject: [PATCH 05/12] Add files via upload
---
src/mainwindow.cpp | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index fa4ab35..5511f99 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -55,8 +55,7 @@ void MainWindow::on_actionLoad_triggered()
QFile file(filename);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
- QMessageBox errorRead;
- errorRead.critical(this, tr("Error"), tr("Could not read from %1.\n\nPlease verify that you have read access to this file.").arg(QDir::toNativeSeparators(filename)));
+ QMessageBox::critical(this, tr("Error"), tr("Could not read from %1.\n\nPlease verify that you have read access to this file.").arg(QDir::toNativeSeparators(filename)));
}
else
{
@@ -65,24 +64,21 @@ void MainWindow::on_actionLoad_triggered()
file.close();
if (error)
{
- QMessageBox errorInvalid;
- errorInvalid.critical(this, tr("Error"), tr("Invalid XML. The file might be corrupted or incomplete."));
+ QMessageBox::critical(this, tr("Error"), tr("Invalid XML. The file might be corrupted or incomplete."));
}
else
{
QDomElement root = document.firstChildElement();
if (root.tagName() != "settings" || root.attribute("target") != "GF2")
{
- QMessageBox errorNoSettings;
- errorNoSettings.critical(this, tr("Error"), tr("The selected file is not a GF2 settings file."));
+ QMessageBox::critical(this, tr("Error"), tr("The selected file is not a GF2 settings file."));
}
else
{
int errorcount = implementSettings(root);
if (errorcount > 0)
{
- QMessageBox warningDebug;
- warningDebug.warning(this, tr("Warning"), tr("Found %1 setting(s) with invalid attribute values.\n\nPlease check your settings file for out-of-bounds or unsupported attribute values.").arg(errorcount));
+ QMessageBox::warning(this, tr("Warning"), tr("Found %1 setting(s) with invalid attribute values.\n\nPlease check your settings file for out-of-bounds or unsupported attribute values.").arg(errorcount));
}
filepath_ = filename;
}
@@ -134,8 +130,7 @@ void MainWindow::on_actionSave_triggered()
QFile file(filename);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
{
- QMessageBox errorWrite;
- errorWrite.critical(this, tr("Error"), tr("Could not write to %1.\n\nPlease verify that you have write access to this file.").arg(QDir::toNativeSeparators(filename)));
+ QMessageBox::critical(this, tr("Error"), tr("Could not write to %1.\n\nPlease verify that you have write access to this file.").arg(QDir::toNativeSeparators(filename)));
}
else
{
@@ -152,13 +147,13 @@ void MainWindow::on_actionSerial_triggered()
{
Serial serial;
serial.setSerialLineEditText(serialstr_);
- if (serial.exec() == QDialog::Accepted)
- {
+ if (serial.exec() == QDialog::Accepted) {
+ QString title = tr("GF2 Function Generator");
serialstr_ = serial.serialLineEditText();
- if (serialstr_.isEmpty())
- this->setWindowTitle("GF2 Function Generator");
- else
- this->setWindowTitle("GF2 Function Generator (S/N: " + serialstr_ + ")");
+ if (!serialstr_.isEmpty()) {
+ title.append(tr(" (S/N: %1)").arg(serialstr_));
+ }
+ this->setWindowTitle(title);
}
}
From 8a82fc92e852f443b07432b4cbde463a744842aa 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 18:33:41 +0100
Subject: [PATCH 06/12] Add files via upload
---
src/icons/gf2-gui.png | Bin 0 -> 3043 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/icons/gf2-gui.png
diff --git a/src/icons/gf2-gui.png b/src/icons/gf2-gui.png
new file mode 100644
index 0000000000000000000000000000000000000000..e7d87e0a9c350065069102638ea28e7e142fcb08
GIT binary patch
literal 3043
zcmZ`*c{mi@7oHgtGsZp<*|R1J6P4vNhG=9<(a4&yXCKSh2Qia=R7bsHRNPJ%?{
ztFi5NApijM@zB#V_rPKS0QrodjQ(@_Hw52CyOIP=Q0UK!$%+Oh*@{9*6UIX&9O@x;
znh4Kz>a=E-tc?q{RPoK*vF_+Ds|gFEj7-I+k>2G$wCnQG^HcQ5XzgV!-(@YfhzD&x
z8e2D%VOKSU(&CpaewV&=Tm4?1V&9#=j+wuC6M7^n-un4T7@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HcmV?d00001
From 99e71d42b2f02a4d4361bebb956e2d46610bc25d 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 18:45:42 +0100
Subject: [PATCH 07/12] Create newfile
---
src/misc/newfile | 1 +
1 file changed, 1 insertion(+)
create mode 100644 src/misc/newfile
diff --git a/src/misc/newfile b/src/misc/newfile
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/misc/newfile
@@ -0,0 +1 @@
+
From e5e2fda7208a6a2c716537a2380c4ff894283d32 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 18:45:56 +0100
Subject: [PATCH 08/12] Add files via upload
---
src/misc/gf2-gui.desktop | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 src/misc/gf2-gui.desktop
diff --git a/src/misc/gf2-gui.desktop b/src/misc/gf2-gui.desktop
new file mode 100644
index 0000000..cb588bd
--- /dev/null
+++ b/src/misc/gf2-gui.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=GF2 GUI
+Icon=gf2-gui
+Exec=gf2-gui
+Terminal=false
+Categories=Development;Electronics;
From 5f89da5c916b74ccf090bcbe17eab8df07be846c 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 18:46:13 +0100
Subject: [PATCH 09/12] Delete src/misc/newfile
---
src/misc/newfile | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 src/misc/newfile
diff --git a/src/misc/newfile b/src/misc/newfile
deleted file mode 100644
index 8b13789..0000000
--- a/src/misc/newfile
+++ /dev/null
@@ -1 +0,0 @@
-
From 2e8888064dd1d3da621370cb03f9ce295ace24b2 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 18:50:45 +0100
Subject: [PATCH 10/12] Add files via upload
---
src/gf2-gui.pro | 48 ++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/src/gf2-gui.pro b/src/gf2-gui.pro
index 0ca0782..988b3dc 100644
--- a/src/gf2-gui.pro
+++ b/src/gf2-gui.pro
@@ -8,22 +8,62 @@ QT += core gui xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+# Added to provide backwards compatibility (C++11 support)
+greaterThan(QT_MAJOR_VERSION, 4) {
+ CONFIG += c++11
+} else {
+ QMAKE_CXXFLAGS += -std=c++11
+}
+
TARGET = gf2-gui
TEMPLATE = app
+# The following define makes your compiler emit warnings if you use
+# any Qt feature that has been marked deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if it uses deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-SOURCES += main.cpp\
- mainwindow.cpp \
+SOURCES += \
+ main.cpp\
+ mainwindow.cpp \
serial.cpp \
about.cpp
-HEADERS += mainwindow.h \
+HEADERS += \
+ mainwindow.h \
serial.h \
about.h
-FORMS += mainwindow.ui \
+FORMS += \
+ mainwindow.ui \
about.ui \
serial.ui
RESOURCES += \
resources.qrc
+
+# Added installation option
+unix {
+ isEmpty(PREFIX) {
+ PREFIX = /usr/local
+ }
+ target.path = $$PREFIX/bin
+ icon.files += icons/gf2-gui.png
+ icon.path = $$PREFIX/share/icons/hicolor/128x128/apps
+ shortcut.files = misc/gf2-gui.desktop
+ shortcut.path = $$PREFIX/share/applications
+ INSTALLS += icon
+ INSTALLS += shortcut
+}
+
+!isEmpty(target.path): INSTALLS += target
+
+DISTFILES += \
+ icons/gf2-gui.png \
+ misc/gf2-gui.desktop
From 49efd64977900a49de12c7f8d2e5fb7e253b802f 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 19:09:04 +0100
Subject: [PATCH 11/12] Add files via upload
---
src/README.txt | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/README.txt b/src/README.txt
index a0e2d08..0531d28 100644
--- a/src/README.txt
+++ b/src/README.txt
@@ -5,24 +5,37 @@ of relevant files follows:
– about.ui;
– gf2-gui.pro;
– icons/active64.png
+– icons/gf2-gui.png
– icons/greyed64.png
– icons/selected64.png
– main.cpp;
– mainwindow.cpp;
– mainwindow.h;
– mainwindow.ui;
+– misc/gf2-gui.desktop;
– resources.qrc;
– serial.cpp;
– serial.h;
– serial.ui.
In order to compile successfully, you must have the packages "build-essential"
-and "qt5-default" already installed. Given that, if you wish to simply
-compile, change your working directory to the current one on a terminal
-window, and invoke "qmake", followed by "make" or "make all". Notice that
-invoking "qmake" is necessary to generate the Makefile, but only needs to be
-done once.
+and "qt5-default" (or "qtbase5-dev") already installed. Given that, if you
+wish to simply compile, change your working directory to the current one on a
+terminal window, and invoke "qmake", followed by "make" or "make all". Notice
+that invoking "qmake" is necessary to generate the Makefile, but only needs to
+be done once.
+
+You can also install using make. To do so, after invoking "qmake", you should
+simply run "sudo make install". If you wish to force a rebuild before the
+installation, then you must invoke "sudo make clean install" instead.
It may be necessary to undo any previous operations. Invoking "make clean"
will delete all object code generated during earlier compilations. However,
-the previously generated binary is preserved.
+the previously generated binary is preserved. It is important to note that it
+is possible to undo previous installation operations as well, by invoking
+"sudo make uninstall". Such approach is not recommended, though.
+
+P.S.:
+Notice that any make operation containing the actions "install" or "uninstall"
+(e.g. "make install" or "make uninstall") requires root permissions, or in
+other words, must be run with sudo.
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 12/12] 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