From 92b5a3b979c8c2feed32a5104bc5ff76a72ae404 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 13:33:03 +1100 Subject: [PATCH 01/10] Add version number as .ini file --- lumberjack.pro | 1 + resource/version.ini | 2 ++ resources.qrc | 1 + src/lumberjack_version.cpp | 22 ++++++++++++++++++++++ src/lumberjack_version.hpp | 3 +-- src/main.cpp | 6 +++--- src/mainwindow.cpp | 2 +- src/widgets/about_dialog.cpp | 4 ++-- 8 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 resource/version.ini create mode 100644 src/lumberjack_version.cpp diff --git a/lumberjack.pro b/lumberjack.pro index 8027def..cf1ea95 100644 --- a/lumberjack.pro +++ b/lumberjack.pro @@ -40,6 +40,7 @@ SOURCES += \ src/data_source.cpp \ src/lumberjack_debug.cpp \ src/lumberjack_settings.cpp \ + src/lumberjack_version.cpp \ src/plot_curve.cpp \ src/plot_legend.cpp \ src/plot_widget.cpp \ diff --git a/resource/version.ini b/resource/version.ini new file mode 100644 index 0000000..80557ad --- /dev/null +++ b/resource/version.ini @@ -0,0 +1,2 @@ +[General] +version="0.16.0" diff --git a/resources.qrc b/resources.qrc index b746b4c..9cbda95 100644 --- a/resources.qrc +++ b/resources.qrc @@ -1,5 +1,6 @@ logo/lumberjack.svg + resource/version.ini diff --git a/src/lumberjack_version.cpp b/src/lumberjack_version.cpp new file mode 100644 index 0000000..66037cb --- /dev/null +++ b/src/lumberjack_version.cpp @@ -0,0 +1,22 @@ +#include + + +#include "lumberjack_version.hpp" + +static QString _version; + + +QString getLumberjackVersion(void) +{ + if (_version.isEmpty()) + { + QSettings settings(":/resource/version.ini", QSettings::IniFormat); + _version = settings.value("version", "_").toString(); + } + + if (_version == "_") { + return QString(); + } + + return _version; +} diff --git a/src/lumberjack_version.hpp b/src/lumberjack_version.hpp index fe892f1..bde1952 100644 --- a/src/lumberjack_version.hpp +++ b/src/lumberjack_version.hpp @@ -3,7 +3,6 @@ #include -// TODO: Move this into external .ini file -const QString LUMBERJACK_VERSION_STRING = "0.5.0"; +QString getLumberjackVersion(void); #endif // LUMBERJACK_VERSION_HPP diff --git a/src/main.cpp b/src/main.cpp index 0c46f28..93c0c63 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,10 +28,10 @@ int main(int argc, char *argv[]) // Configure application properties a.setApplicationName("lumberjack"); a.setApplicationDisplayName("lumberjack"); - a.setApplicationVersion(LUMBERJACK_VERSION_STRING); + a.setApplicationVersion(getLumberjackVersion()); QCoreApplication::setApplicationName("Lumberjack"); - QCoreApplication::setApplicationVersion(LUMBERJACK_VERSION_STRING); + QCoreApplication::setApplicationVersion(getLumberjackVersion()); // Command line parser QCommandLineParser parser; @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) // registerLumberjackDebugHandler(); } - qDebug() << "Lumberjack:" << LUMBERJACK_VERSION_STRING; + qDebug() << "Lumberjack:" << getLumberjackVersion(); MainWindow w; w.show(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 937e50c..9e9513b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -36,7 +36,7 @@ MainWindow::MainWindow(QWidget *parent) { ui->setupUi(this); - setWindowTitle("Lumberjack v" + LUMBERJACK_VERSION_STRING); + setWindowTitle("Lumberjack v" + getLumberjackVersion()); initMenus(); initDocks(); diff --git a/src/widgets/about_dialog.cpp b/src/widgets/about_dialog.cpp index 49f8933..b9bfc32 100644 --- a/src/widgets/about_dialog.cpp +++ b/src/widgets/about_dialog.cpp @@ -10,9 +10,9 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) setWindowModality(Qt::ApplicationModal); - setWindowTitle("Lumberjack v" + LUMBERJACK_VERSION_STRING); + setWindowTitle("Lumberjack v" + getLumberjackVersion()); - ui.softwareVersion->setText(LUMBERJACK_VERSION_STRING); + ui.softwareVersion->setText(getLumberjackVersion()); ui.buildDate->setText(__DATE__); QString compileInfo = QString(COMPILER); From df342482ff73706710752523f655a5cfd3c4ccc1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 13:33:13 +1100 Subject: [PATCH 02/10] innosetup installer --- .gitignore | 4 +- lumberjack.iss | 144 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 lumberjack.iss diff --git a/.gitignore b/.gitignore index 36883c3..9dabcef 100644 --- a/.gitignore +++ b/.gitignore @@ -23,8 +23,8 @@ ui_tmp build/ debug/ release/ -unit_test/debug -unit_test/release +install/ +Output/ # Custom plugins directory - ignore custom/ diff --git a/lumberjack.iss b/lumberjack.iss new file mode 100644 index 0000000..0f64b42 --- /dev/null +++ b/lumberjack.iss @@ -0,0 +1,144 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyBaseAppId "{82CE89F2-8250-4898-96CC-975523AF5FEB}" + +#define MyAppName "Lumberjack" +#define MyAppPublisher "Lumberjack" +#define MyAppURL "https://github.com/SchrodingersGat/lumberjack/" +#define MyAppExeName "Lumberjack.exe" +#define MyAppVersion ReadIni("resource/version.ini", "General", "version", "0.0.0"); + +#define BuildDir "build/release" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={code:GetAppId} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DisableProgramGroupPage=yes +LicenseFile=README.md + +; Remove the following line to run in administrative install mode (install for all users.) +PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=dialog +UsePreviousPrivileges=no +UsePreviousLanguage=no +OutputBaseFilename=lumberjack_{#MyAppVersion} +SetupIconFile=logo\lumberjack.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern +ArchitecturesInstallIn64BitMode=x64 +ArchitecturesAllowed=x64 + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +; Application executable +Source: "{#BuildDir}\lumberjack.exe"; DestDir: "{app}"; Flags: ignoreversion + +; DLL files +Source: "{#BuildDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion + +; Qt directories +Source: "{#BuildDir}\generic\*"; DestDir: "{app}\generic"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\iconengines\*"; DestDir: "{app}\iconengines"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\imageformats\*"; DestDir: "{app}\imageformats"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\networkinformation\*"; DestDir: "{app}\networkinformation"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\platforms\*"; DestDir: "{app}\platforms"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\styles\*"; DestDir: "{app}\styles"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\tls\*"; DestDir: "{app}\tls"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#BuildDir}\translations\*"; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +; Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + +[Code] +// The following code is to optionally allow multiple versions to be +// installed on the one computer. If a previous installation is +// detected, a dialogue box asks the user whether they want to overwrite the +// existing installation, or install a new one. +var + AppId: string; + DefaultDirName: string; + +// Getter for AppId +function GetAppId(Param: string): string; +begin + Result := AppId; + Log('AppId = ' + Result); +end; + +// Getter for DefaultDirName +function GetDefaultDirName(Param: string): string; +begin + Result := DefaultDirName; + Log('DefaultDirName = ' + Result); +end; + +// Impletement the event function InitializeSetup. This is called by Inno +// Setup "during Setup's initialisation". +function InitializeSetup(): Boolean; +var + PrevVersion: string; + CurVersion: string; + Message: string; + R: Integer; + +begin + CurVersion := '{#MyAppVersion}'; + Log(Format('Installing "%s"', [CurVersion])); + + // Returning True means that installation will proceed + Result := True; + + AppId := '{#MyBaseAppId}'; + DefaultDirName := ExpandConstant('{autopf}\Currawong\{#MyAppName}'); + + // Look in the registry to see if CEquip is already installed + if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) or + RegQueryStringValue(HKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) or + RegQueryStringValue(HKLM, 'Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) or + RegQueryStringValue(HKCU, 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) then + begin + Message := + Format( + 'Version is %s already installed. Do you want to upgrade to %s?'#13#10#13#10+ + 'Press Yes, to replace %0:s with %1:s.'#13#10+ + 'Press No, to keep %0:s and add separate installation of %1:s.'#13#10, [ + PrevVersion, CurVersion]); + R := MsgBox(Message, mbConfirmation, MB_YESNOCANCEL); + if R = IDYES then + begin + Log('User chose to replace previous installation'); + end + else if R = IDNO then + begin + AppId := AppId + CurVersion; + DefaultDirName := DefaultDirName + ' ' + CurVersion; + Log('User chose to install new copy - using ID ' + AppId); + end + else + begin + Log('User chose to cancel installation'); + + // Returning False will cancel the installation + Result := False; + end; + end; +end; \ No newline at end of file From 41e07e42a701ecb580bec4a3ba187fe927ecb55d Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 13:39:34 +1100 Subject: [PATCH 03/10] Include compiled plugins --- lumberjack.iss | 5 ++++- plugins/csv_exporter/csv_exporter.pro | 2 +- plugins/csv_importer/csv_importer.pro | 2 +- plugins/offset_filter/offset_filter.pro | 2 +- plugins/scaler_filter/scaler_filter.pro | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lumberjack.iss b/lumberjack.iss index 0f64b42..7bf541d 100644 --- a/lumberjack.iss +++ b/lumberjack.iss @@ -51,6 +51,9 @@ Source: "{#BuildDir}\lumberjack.exe"; DestDir: "{app}"; Flags: ignoreversion ; DLL files Source: "{#BuildDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion +; Plugins +Source: "plugins\build\release\*.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion + ; Qt directories Source: "{#BuildDir}\generic\*"; DestDir: "{app}\generic"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "{#BuildDir}\iconengines\*"; DestDir: "{app}\iconengines"; Flags: ignoreversion recursesubdirs createallsubdirs @@ -66,7 +69,7 @@ Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] -; Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent [Code] // The following code is to optionally allow multiple versions to be diff --git a/plugins/csv_exporter/csv_exporter.pro b/plugins/csv_exporter/csv_exporter.pro index 74dd6c5..18af1c8 100644 --- a/plugins/csv_exporter/csv_exporter.pro +++ b/plugins/csv_exporter/csv_exporter.pro @@ -36,7 +36,7 @@ CONFIG(debug, debug|release) { } else { CONFIG += release - DESTDIR = build/release + DESTDIR = ../build/release } RCC_DIR = $$DESDIR diff --git a/plugins/csv_importer/csv_importer.pro b/plugins/csv_importer/csv_importer.pro index 5519d8c..e36743c 100644 --- a/plugins/csv_importer/csv_importer.pro +++ b/plugins/csv_importer/csv_importer.pro @@ -39,7 +39,7 @@ CONFIG(debug, debug|release) { } else { CONFIG += release - DESTDIR = build/release + DESTDIR = ../build/release } RCC_DIR = $$DESDIR diff --git a/plugins/offset_filter/offset_filter.pro b/plugins/offset_filter/offset_filter.pro index e47957e..638422a 100644 --- a/plugins/offset_filter/offset_filter.pro +++ b/plugins/offset_filter/offset_filter.pro @@ -33,7 +33,7 @@ CONFIG(debug, debug|release) { } else { CONFIG += release - DESTDIR = build/release + DESTDIR = ../build/release } RCC_DIR = $$DESDIR diff --git a/plugins/scaler_filter/scaler_filter.pro b/plugins/scaler_filter/scaler_filter.pro index 0456202..47b156d 100644 --- a/plugins/scaler_filter/scaler_filter.pro +++ b/plugins/scaler_filter/scaler_filter.pro @@ -33,7 +33,7 @@ CONFIG(debug, debug|release) { } else { CONFIG += release - DESTDIR = build/release + DESTDIR = ../build/release } RCC_DIR = $$DESDIR From 6a4f1288d8e1e15fd257af9a69d1a052568dd79b Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 13:44:06 +1100 Subject: [PATCH 04/10] Add build script --- .github/windows_installer.yaml | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/windows_installer.yaml diff --git a/.github/windows_installer.yaml b/.github/windows_installer.yaml new file mode 100644 index 0000000..bd7d71b --- /dev/null +++ b/.github/windows_installer.yaml @@ -0,0 +1,53 @@ +# Compile windows installer + +name: Windows Installer + +on: + push: + branches: + - master + pull_request: + branches: + - master + release: + types: + - created +jobs: + installer: + runs-on: windows-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + aqtversion: '==3.1.*' + version: '6.8.1' + host: 'windows' + target: 'desktop' + arch: 'win64_mingw' + tools: 'tools_mingw1310' + cache: true + - name: Build Qwt + run: | + cd qwt + qmake qwt.pro + mingw32-make clean + mingw32-make + mingw32-make install + - name: Build Lumberjack + run: | + qmake lumberjack.pro CONFIG+=release + mingw32-make + - name: Build Plugins + run: | + cd plugins + qmake plugins.pro CONFIG+=release + mingw32-make + - name: Build Installer + uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 + with: + path: lumberjack.iss \ No newline at end of file From f5db963fc5bac1d865f567f31da33de98a5219a6 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 13:47:51 +1100 Subject: [PATCH 05/10] Fix path --- .github/{ => workflows}/windows_installer.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/windows_installer.yaml (100%) diff --git a/.github/windows_installer.yaml b/.github/workflows/windows_installer.yaml similarity index 100% rename from .github/windows_installer.yaml rename to .github/workflows/windows_installer.yaml From 53c83fb0c137cd29a92375351638b7c54e850e41 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 14:25:01 +1100 Subject: [PATCH 06/10] Tweak insaller file --- lumberjack.iss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lumberjack.iss b/lumberjack.iss index 7bf541d..0e2ca2c 100644 --- a/lumberjack.iss +++ b/lumberjack.iss @@ -111,9 +111,9 @@ begin Result := True; AppId := '{#MyBaseAppId}'; - DefaultDirName := ExpandConstant('{autopf}\Currawong\{#MyAppName}'); + DefaultDirName := ExpandConstant('{autopf}\Lumberjack\{#MyAppName}'); - // Look in the registry to see if CEquip is already installed + // Look in the registry to see if program is already installed if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) or RegQueryStringValue(HKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) or RegQueryStringValue(HKLM, 'Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{#MyBaseAppId}_is1', 'DisplayVersion', PrevVersion) or From 65bce78ae2a76c23d1e0aef79b184096a12a818d Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 14:28:59 +1100 Subject: [PATCH 07/10] Regenerate GUID --- lumberjack.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lumberjack.iss b/lumberjack.iss index 0e2ca2c..c86d461 100644 --- a/lumberjack.iss +++ b/lumberjack.iss @@ -1,7 +1,7 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! -#define MyBaseAppId "{82CE89F2-8250-4898-96CC-975523AF5FEB}" +#define MyBaseAppId "{BA395D89-E5A9-441A-8869-E9151B8EACE6}" #define MyAppName "Lumberjack" #define MyAppPublisher "Lumberjack" From 66eafeec894a757f323f9630611b68f211219311 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 15:46:21 +1100 Subject: [PATCH 08/10] Fix windeployqt flags --- lumberjack.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lumberjack.pro b/lumberjack.pro index cf1ea95..a7b4a59 100644 --- a/lumberjack.pro +++ b/lumberjack.pro @@ -170,12 +170,12 @@ COPIES += dllFiles CONFIG(debug, debug | release) { win32 { # Copy required .DLL files - QMAKE_POST_LINK += $$[QT_INSTALL_BINS]\windeployqt --debug --compiler-runtime $$shell_path($$quote($$DESTDIR))\lumberjack.exe $$escape_expand(\n\t) + QMAKE_POST_LINK += $$[QT_INSTALL_BINS]\windeployqt --debug --opengl --openglwidgets --widgets --compiler-runtime $$shell_path($$quote($$DESTDIR))\lumberjack.exe $$escape_expand(\n\t) } } else { win32 { # Copy required .DLL files - QMAKE_POST_LINK += $$[QT_INSTALL_BINS]\windeployqt --release --compiler-runtime $$shell_path($$quote($$DESTDIR))\lumberjack.exe $$escape_expand(\n\t) + QMAKE_POST_LINK += $$[QT_INSTALL_BINS]\windeployqt --release --opengl --openglwidgets --widgets --compiler-runtime $$shell_path($$quote($$DESTDIR))\lumberjack.exe $$escape_expand(\n\t) } } From 82f6f8503320153f9d1a8026e6185af7570a41f8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 15:46:39 +1100 Subject: [PATCH 09/10] FIx custom debug handler --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 93c0c63..3e344dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) if (!parser.isSet(debugCmdOption)) { // Install custom debug handler - // registerLumberjackDebugHandler(); + registerLumberjackDebugHandler(); } qDebug() << "Lumberjack:" << getLumberjackVersion(); From b763ecdef61606c0499e479eb990d987b9c26871 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2024 15:48:40 +1100 Subject: [PATCH 10/10] Update workflow files --- .github/workflows/build.yaml | 76 ------------------- .github/workflows/linux.yaml | 41 ++++++++++ .github/workflows/linux.yaml.todo | 50 ------------ .../{windows_installer.yaml => windows.yaml} | 3 - 4 files changed, 41 insertions(+), 129 deletions(-) delete mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/linux.yaml delete mode 100644 .github/workflows/linux.yaml.todo rename .github/workflows/{windows_installer.yaml => windows.yaml} (95%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index ee95b1d..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Build lumberjack application and plugins - -name: Build - -on: - push: - branches: - - master - release: - types: - - created - -jobs: - linux: - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: '6.8.1' - cache: true - - name: Build Qwt - run: | - cd qwt - qmake qwt.pro - make - sudo make install - - name: Build Lumberjack - run: | - qmake lumberjack.pro - make - - name: Build Plugins - run: | - cd plugins - qmake plugins.pro - make - - windows: - runs-on: windows-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - aqtversion: '==3.1.*' - version: '6.8.1' - host: 'windows' - target: 'desktop' - arch: 'win64_mingw' - tools: 'tools_mingw1310' - cache: true - - name: Build Qwt - run: | - cd qwt - qmake qwt.pro - mingw32-make clean - mingw32-make - mingw32-make install - - name: Build Lumberjack - run: | - qmake lumberjack.pro - mingw32-make - - name: Build Plugins - run: | - cd plugins - qmake plugins.pro - mingw32-make diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml new file mode 100644 index 0000000..8682e3c --- /dev/null +++ b/.github/workflows/linux.yaml @@ -0,0 +1,41 @@ +# Build lumberjack application and plugins + +name: Build + +on: + push: + branches: + - master + release: + types: + - created + +jobs: + linux: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '6.8.1' + cache: true + - name: Build Qwt + run: | + cd qwt + qmake qwt.pro + make + sudo make install + - name: Build Lumberjack + run: | + qmake lumberjack.pro + make + - name: Build Plugins + run: | + cd plugins + qmake plugins.pro + make diff --git a/.github/workflows/linux.yaml.todo b/.github/workflows/linux.yaml.todo deleted file mode 100644 index 9499c41..0000000 --- a/.github/workflows/linux.yaml.todo +++ /dev/null @@ -1,50 +0,0 @@ -# Run unit tests - -name: Linux - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - test: - - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Install Qt - uses: jurplel/install-qt-action@v2 - with: - version: 5.13.2 - - name: Build qwt - run: | - cd qwt - qmake qwt.pro - make - - name: Run Unit Tests - run: | - ls qwt/lib - cd unit_test - qmake unit_test.pro CONFIG+=release - make - cp ../qwt/src/lib/* . - ls - ./unit_test - - name: Generate Code Coverage Data - run: | - sudo apt-get install lcov - lcov --coverage --directory unit_test --output-file coverage.info - lcov -r coverage.info "moc_*" - - name: Upload Code Coverage Data - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: "coverage.info" diff --git a/.github/workflows/windows_installer.yaml b/.github/workflows/windows.yaml similarity index 95% rename from .github/workflows/windows_installer.yaml rename to .github/workflows/windows.yaml index bd7d71b..fca0938 100644 --- a/.github/workflows/windows_installer.yaml +++ b/.github/workflows/windows.yaml @@ -6,9 +6,6 @@ on: push: branches: - master - pull_request: - branches: - - master release: types: - created