From e49bf4a325c254d01bbef5afac697789ac547a4c Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Fri, 9 Jun 2023 19:49:38 +1000 Subject: [PATCH] Update build scripts --- CMakeLists.txt | 2 ++ README.md | 18 ++++++++---------- terminal/CMakeLists.txt | 6 +++--- terminal/terminalpart.cpp | 6 +++--- untitled/untitled.cpp | 6 ------ untitled/untitled.h | 13 ------------- untitled/untitled.pro | 35 ----------------------------------- untitled/untitled_global.h | 12 ------------ 8 files changed, 16 insertions(+), 82 deletions(-) delete mode 100644 untitled/untitled.cpp delete mode 100644 untitled/untitled.h delete mode 100644 untitled/untitled.pro delete mode 100644 untitled/untitled_global.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fa4a437..04067b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,4 +2,6 @@ cmake_minimum_required(VERSION 3.1.0) project(theterminal VERSION 1.0.0 LANGUAGES CXX) +find_package(QT REQUIRED NAMES Qt6) + add_subdirectory(terminal) diff --git a/README.md b/README.md index 2c0fe94..92ace00 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ ---

-Travis CI Build Status - +

theTerminal is a terminal emulator designed to integrate well with theShell and come with many features. @@ -11,13 +10,13 @@ theTerminal is a terminal emulator designed to integrate well with theShell and --- # Dependencies -- Qt 5 +- Qt 6 - Qt Core - Qt GUI - Qt Widgets - Qt WebEngine - Qt SVG -- [the-libs](https://github.com/vicr123/the-libs) +- [libcontemporary](https://github.com/vicr123/libcontemporary) - [tttermwidget](https://github.com/vicr123/tttermwidget) # Get @@ -27,19 +26,18 @@ If you're using a supported operating system, we may have binaries available: |-------------------|---------------------------------------------------------------------------------------------------------| | macOS | ~~[Application Bundle on GitHub Releases](https://github.com/vicr123/theTerminal/releases)~~ Coming soon! | | Arch Linux | `theterminal` on the AUR | -| Other Linux | [AppImage on GitHub Releases](https://github.com/vicr123/theTerminal/releases) | ## Build Run the following commands in your terminal. ``` -qmake -make +cmake -B build -S . +cmake --build build ``` ## Install On Linux, run the following command in your terminal (with superuser permissions) ``` -make install +cmake --install build ``` On macOS, drag the resulting application bundle (`theTerminal.app` or `theTerminal Blueprint.app`, depending on which branch you're building) into your Applications folder @@ -49,6 +47,6 @@ Thanks for your interest in theTerminal! Check out the [CONTRIBUTING.md](CONTRIB --- -> © Victor Tran, 2019. This project is licensed under the GNU General Public License, version 3, or at your option, any later version. +> © Victor Tran, 2023. This project is licensed under the GNU General Public License, version 3, or at your option, any later version. > -> Check the [LICENSE](LICENSE) file for more information. \ No newline at end of file +> Check the [LICENSE](LICENSE) file for more information. diff --git a/terminal/CMakeLists.txt b/terminal/CMakeLists.txt index d5f4ebf..9ac81e8 100644 --- a/terminal/CMakeLists.txt +++ b/terminal/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21.0) project(theterminal VERSION 1.0.0 LANGUAGES CXX) -find_package(Qt6 REQUIRED COMPONENTS Widgets DBus) +find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets DBus) find_package(libcontemporary REQUIRED) find_package(tttermwidget REQUIRED) @@ -74,7 +74,7 @@ set_target_properties(theterminal PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER com.vicr123.theterminal CNTP_DATA_SUBDIR theterminal) -cntp_init(theterminal 17) +cntp_init(theterminal 20) cntp_translate(theterminal) cntp_target_name(theterminal "theTerminal") cntp_app_icon(theterminal @@ -86,7 +86,7 @@ cntp_target_desktop_file(theterminal cntp_defaults_file(theterminal DEFAULTS_FILE theterminal.conf) -target_link_libraries(theterminal Qt6::Widgets Qt6::DBus libcontemporary tttermwidget) +target_link_libraries(theterminal Qt::Widgets Qt::DBus libcontemporary tttermwidget) install(TARGETS theterminal RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/terminal/terminalpart.cpp b/terminal/terminalpart.cpp index a178d2c..2497e77 100644 --- a/terminal/terminalpart.cpp +++ b/terminal/terminalpart.cpp @@ -118,11 +118,11 @@ void TerminalPart::setup() { reloadThemeSettings(); - connect(this, &TerminalPart::copyAvailable, [=](bool copyAvailable) { + connect(this, &TerminalPart::copyAvailable, this, [this](bool copyAvailable) { d->copyOk = copyAvailable; }); - connect(this, &TerminalPart::bell, [=] { + connect(this, &TerminalPart::bell, this, [this] { if (this->hasFocus()) { // Active terminal if (d->settings.value("bell/bellActiveSound", true).toBool()) { @@ -148,7 +148,7 @@ void TerminalPart::setup() { } } }); - connect(this, &TerminalPart::shellProgramFinished, this, [=](int exitCode) { + connect(this, &TerminalPart::shellProgramFinished, this, [this](int exitCode) { if (d->quitType == TerminalPartPrivate::UseSettings) { d->quitType = static_cast(d->settings.value("term/quitType", 0).toInt()); } diff --git a/untitled/untitled.cpp b/untitled/untitled.cpp deleted file mode 100644 index 469394f..0000000 --- a/untitled/untitled.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "untitled.h" - - -Untitled::Untitled() -{ -} diff --git a/untitled/untitled.h b/untitled/untitled.h deleted file mode 100644 index 29c888e..0000000 --- a/untitled/untitled.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef UNTITLED_H -#define UNTITLED_H - -#include "untitled_global.h" - -class UNTITLEDSHARED_EXPORT Untitled -{ - - public: - Untitled(); -}; - -#endif // UNTITLED_H diff --git a/untitled/untitled.pro b/untitled/untitled.pro deleted file mode 100644 index c74e862..0000000 --- a/untitled/untitled.pro +++ /dev/null @@ -1,35 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2018-06-11T19:57:25 -# -#------------------------------------------------- - -QT -= gui - -TARGET = untitled -TEMPLATE = lib - -DEFINES += UNTITLED_LIBRARY - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as 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 you use 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 += \ - untitled.cpp - -HEADERS += \ - untitled.h \ - untitled_global.h - -unix { - target.path = /usr/lib - INSTALLS += target -} diff --git a/untitled/untitled_global.h b/untitled/untitled_global.h deleted file mode 100644 index dbbc741..0000000 --- a/untitled/untitled_global.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef UNTITLED_GLOBAL_H -#define UNTITLED_GLOBAL_H - -#include - -#if defined(UNTITLED_LIBRARY) -# define UNTITLEDSHARED_EXPORT Q_DECL_EXPORT -#else -# define UNTITLEDSHARED_EXPORT Q_DECL_IMPORT -#endif - -#endif // UNTITLED_GLOBAL_H