From 65f0cad08e0e64ceafefefd8bc5cc6941c36cdcf Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Wed, 27 Nov 2024 23:45:20 +0330 Subject: [PATCH 001/114] github action #126 --- .github/workflows/cmake-multi-platform.yml | 47 ++++++++++++++++------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ca60ee0..daad898 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -57,13 +57,12 @@ jobs: choco install python3 -y choco install llvm -y choco install gperf -y - pip install html5lib - name: Cache Qt Source (Windows) if: matrix.os == 'windows-latest' uses: actions/cache@v3 with: - path: D:\qt-source + path: D:/qt-source key: qt-source-6.5.3 restore-keys: qt-source- @@ -71,10 +70,10 @@ jobs: if: matrix.os == 'windows-latest' shell: powershell run: | - $qtSourceDir = "D:\qt-source" - $qtZip = "$qtSourceDir\qt-everywhere-src-6.5.3.zip" + $qtSourceDir = "D:/qt-source" + $qtZip = "$qtSourceDir/qt-everywhere-src-6.5.3.zip" - if (-Not (Test-Path "$qtSourceDir\qt-everywhere-src-6.5.3\qtbase\configure.bat")) { + if (-Not (Test-Path "$qtSourceDir/qt-everywhere-src-6.5.3/qtbase/configure.bat")) { Write-Host "Qt source not found in cache. Downloading..." New-Item -ItemType Directory -Path $qtSourceDir -Force Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.zip" -OutFile $qtZip @@ -83,6 +82,28 @@ jobs: Write-Host "Qt source found in cache." } + - name: Install bison Manually (Windows) + if: matrix.os == 'windows-latest' + shell: powershell + run: | + $bisonPath = "C:/ProgramData/chocolatey/bin/bison.exe" + if (-not (Test-Path $bisonPath)) { + Write-Host "bison is not available. Installing manually..." + $bisonUrl = "https://mirrors.kernel.org/gnu/bison/bison-3.8.2.tar.gz" + $bisonDir = "D:/bison" + $bisonTar = "$bisonDir/bison.tar.gz" + $bisonExtractDir = "$bisonDir/bison-3.8.2" + New-Item -ItemType Directory -Path $bisonDir -Force + + # Download and extract bison + Invoke-WebRequest -Uri $bisonUrl -OutFile $bisonTar -UseBasicParsing + tar -xvf $bisonTar -C $bisonDir + $env:PATH += ";$bisonExtractDir/bin" + [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Process) + } else { + Write-Host "bison found at $bisonPath" + } + - name: Build and Install Qt from Source (Windows) if: matrix.os == 'windows-latest' shell: cmd @@ -97,12 +118,12 @@ jobs: CALL "%VS_VARS_CMD%" || exit /b 1 REM Build Qt from source - SET QT_SOURCE=D:\qt-source\qt-everywhere-src-6.5.3 - IF NOT EXIST "%QT_SOURCE%\qtbase\configure.bat" ( - echo "configure.bat not found in %QT_SOURCE%\qtbase" && exit /b 1 + SET QT_SOURCE=D:/qt-source/qt-everywhere-src-6.5.3 + IF NOT EXIST "%QT_SOURCE%/qtbase/configure.bat" ( + echo "configure.bat not found in %QT_SOURCE%/qtbase" && exit /b 1 ) - cd "%QT_SOURCE%\qtbase" - call configure.bat -top-level -prefix C:\Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ + cd "%QT_SOURCE%/qtbase" + call configure.bat -top-level -prefix C:/Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ -DFEATURE_clang=ON ^ -DFEATURE_clangcpp=ON ^ -DLLVM_INSTALL_DIR="C:/Program Files/LLVM" ^ @@ -121,9 +142,9 @@ jobs: if: matrix.os == 'windows-latest' shell: powershell run: | - echo "Qt6_DIR=C:\Qt\lib\cmake\Qt6" >> $env:GITHUB_ENV - echo "QT_PLUGIN_PATH=C:\Qt\plugins" >> $env:GITHUB_ENV - echo "QML2_IMPORT_PATH=C:\Qt\qml" >> $env:GITHUB_ENV + echo "Qt6_DIR=C:/Qt/lib/cmake/Qt6" >> $env:GITHUB_ENV + echo "QT_PLUGIN_PATH=C:/Qt/plugins" >> $env:GITHUB_ENV + echo "QML2_IMPORT_PATH=C:/Qt/qml" >> $env:GITHUB_ENV - name: Configure CMake run: | From 06933afc4525a2ce509c6b96039c0e23317bc9a7 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 08:54:52 +0330 Subject: [PATCH 002/114] github action #127 --- .github/workflows/cmake-multi-platform.yml | 23 +--------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index daad898..0194e8e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -57,6 +57,7 @@ jobs: choco install python3 -y choco install llvm -y choco install gperf -y + pip install html5lib - name: Cache Qt Source (Windows) if: matrix.os == 'windows-latest' @@ -82,28 +83,6 @@ jobs: Write-Host "Qt source found in cache." } - - name: Install bison Manually (Windows) - if: matrix.os == 'windows-latest' - shell: powershell - run: | - $bisonPath = "C:/ProgramData/chocolatey/bin/bison.exe" - if (-not (Test-Path $bisonPath)) { - Write-Host "bison is not available. Installing manually..." - $bisonUrl = "https://mirrors.kernel.org/gnu/bison/bison-3.8.2.tar.gz" - $bisonDir = "D:/bison" - $bisonTar = "$bisonDir/bison.tar.gz" - $bisonExtractDir = "$bisonDir/bison-3.8.2" - New-Item -ItemType Directory -Path $bisonDir -Force - - # Download and extract bison - Invoke-WebRequest -Uri $bisonUrl -OutFile $bisonTar -UseBasicParsing - tar -xvf $bisonTar -C $bisonDir - $env:PATH += ";$bisonExtractDir/bin" - [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Process) - } else { - Write-Host "bison found at $bisonPath" - } - - name: Build and Install Qt from Source (Windows) if: matrix.os == 'windows-latest' shell: cmd From 9864f7a8dcab68ae5f678571031abdd2f751d6c3 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 11:10:05 +0330 Subject: [PATCH 003/114] Search & Replace Menu -> Fixed casing in search --- .github/workflows/cmake-multi-platform.yml | 24 +++++++------- CHANGELOG.md | 4 +++ CMakeLists.txt.user | 22 ++++++------- src/search/filesearchworker.cpp | 28 ++++++++++++++-- src/systemsearchresultdialog.cpp | 37 ++++++++++++++-------- 5 files changed, 77 insertions(+), 38 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 0194e8e..ca60ee0 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -63,7 +63,7 @@ jobs: if: matrix.os == 'windows-latest' uses: actions/cache@v3 with: - path: D:/qt-source + path: D:\qt-source key: qt-source-6.5.3 restore-keys: qt-source- @@ -71,10 +71,10 @@ jobs: if: matrix.os == 'windows-latest' shell: powershell run: | - $qtSourceDir = "D:/qt-source" - $qtZip = "$qtSourceDir/qt-everywhere-src-6.5.3.zip" + $qtSourceDir = "D:\qt-source" + $qtZip = "$qtSourceDir\qt-everywhere-src-6.5.3.zip" - if (-Not (Test-Path "$qtSourceDir/qt-everywhere-src-6.5.3/qtbase/configure.bat")) { + if (-Not (Test-Path "$qtSourceDir\qt-everywhere-src-6.5.3\qtbase\configure.bat")) { Write-Host "Qt source not found in cache. Downloading..." New-Item -ItemType Directory -Path $qtSourceDir -Force Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.zip" -OutFile $qtZip @@ -97,12 +97,12 @@ jobs: CALL "%VS_VARS_CMD%" || exit /b 1 REM Build Qt from source - SET QT_SOURCE=D:/qt-source/qt-everywhere-src-6.5.3 - IF NOT EXIST "%QT_SOURCE%/qtbase/configure.bat" ( - echo "configure.bat not found in %QT_SOURCE%/qtbase" && exit /b 1 + SET QT_SOURCE=D:\qt-source\qt-everywhere-src-6.5.3 + IF NOT EXIST "%QT_SOURCE%\qtbase\configure.bat" ( + echo "configure.bat not found in %QT_SOURCE%\qtbase" && exit /b 1 ) - cd "%QT_SOURCE%/qtbase" - call configure.bat -top-level -prefix C:/Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ + cd "%QT_SOURCE%\qtbase" + call configure.bat -top-level -prefix C:\Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ -DFEATURE_clang=ON ^ -DFEATURE_clangcpp=ON ^ -DLLVM_INSTALL_DIR="C:/Program Files/LLVM" ^ @@ -121,9 +121,9 @@ jobs: if: matrix.os == 'windows-latest' shell: powershell run: | - echo "Qt6_DIR=C:/Qt/lib/cmake/Qt6" >> $env:GITHUB_ENV - echo "QT_PLUGIN_PATH=C:/Qt/plugins" >> $env:GITHUB_ENV - echo "QML2_IMPORT_PATH=C:/Qt/qml" >> $env:GITHUB_ENV + echo "Qt6_DIR=C:\Qt\lib\cmake\Qt6" >> $env:GITHUB_ENV + echo "QT_PLUGIN_PATH=C:\Qt\plugins" >> $env:GITHUB_ENV + echo "QML2_IMPORT_PATH=C:\Qt\qml" >> $env:GITHUB_ENV - name: Configure CMake run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index da638b6..e2657a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 0.0.55 + +- Search & Replace Menu -> Fixed casing in search + ## 0.0.54 - Implemented: diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index a2a3473..f50e895 100755 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,14 +102,14 @@ 2 false - -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} + -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_BUILD_TYPE:STRING=Debug --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} --DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} /data/Code/Qt/Notepad-- 0 /data/Code/Qt/Notepad--/build/Desktop-Debug @@ -160,14 +160,14 @@ 2 false - -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} + -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_BUILD_TYPE:STRING=Release --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} --DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} /data/Code/Qt/Notepad-- /data/Code/Qt/Notepad--/build/Desktop-Release diff --git a/src/search/filesearchworker.cpp b/src/search/filesearchworker.cpp index 930940e..31e1f39 100644 --- a/src/search/filesearchworker.cpp +++ b/src/search/filesearchworker.cpp @@ -39,6 +39,7 @@ FileSearchResults FileSearchWorker::searchInFile() { bool hasMatch = false; QString highlightedLine = line; // For highlighting + qInfo() << "Highlight line from threadpool worker: " << highlightedLine; while (it.hasNext()) { QRegularExpressionMatch match = it.next(); @@ -65,6 +66,29 @@ FileSearchResults FileSearchWorker::searchInFile() { } QString FileSearchWorker::highlightMatches(const QString& line, const QRegularExpression& pattern) { - QString highlighted = line; - return highlighted.replace(pattern, "" + m_options.keyword + ""); + qInfo() << "highlightMatches input line: " << line; + QString highlighted; + int lastIndex = 0; // Track the last processed index in the line + + // Find all matches in the line + QRegularExpressionMatchIterator it = pattern.globalMatch(line); + while (it.hasNext()) { + QRegularExpressionMatch match = it.next(); + + // Append text from the last index to the current match start + highlighted.append(line.mid(lastIndex, match.capturedStart(0) - lastIndex)); + + // Wrap the matched text with tags + highlighted.append(QStringLiteral("%1").arg(match.captured(0))); + + // Update the last processed index + lastIndex = match.capturedEnd(0); + } + + // Append any remaining text after the last match + highlighted.append(line.mid(lastIndex)); + qInfo() << "highlightMatches output line: " << line; + + return highlighted; } + diff --git a/src/systemsearchresultdialog.cpp b/src/systemsearchresultdialog.cpp index 8f518e7..bab89b4 100644 --- a/src/systemsearchresultdialog.cpp +++ b/src/systemsearchresultdialog.cpp @@ -138,20 +138,33 @@ void SystemSearchResultDialog::addSearchResult(const FileSearchResults &result) // Iterate through the matches to populate the result model for (const auto &[lineNumber, lineContent] : result.matches) { - // Highlight keywords with cyan + qInfo() << "addSearchResult lineContent input: " << lineContent; + QString highlightedLine = lineContent; - QString pattern = QStringLiteral("%1"); - highlightedLine.replace( - QRegularExpression(QString("\\b%1\\b").arg(QRegularExpression::escape(m_searchOptions.keyword)), - m_searchOptions.matchCase - ? QRegularExpression::NoPatternOption - : QRegularExpression::CaseInsensitiveOption), - pattern.arg(m_searchOptions.keyword)); + QRegularExpression pattern( + QString("\\b%1\\b").arg(QRegularExpression::escape(m_searchOptions.keyword)), + m_searchOptions.matchCase + ? QRegularExpression::NoPatternOption + : QRegularExpression::CaseInsensitiveOption); + + QString processedLine; + int lastPos = 0; + + // Highlight the matches manually + QRegularExpressionMatchIterator it = pattern.globalMatch(highlightedLine); + while (it.hasNext()) { + QRegularExpressionMatch match = it.next(); + processedLine += highlightedLine.mid(lastPos, match.capturedStart() - lastPos); + processedLine += QStringLiteral("%1") + .arg(match.captured(0)); + lastPos = match.capturedEnd(); + } + processedLine += highlightedLine.mid(lastPos); // Append the remaining part QStandardItem *lineItem = new QStandardItem(); lineItem->setFlags(lineItem->flags() | Qt::ItemIsSelectable); - lineItem->setData(highlightedLine, Qt::DisplayRole); // Highlighted line content - lineItem->setData(lineNumber + 1, Qt::UserRole); // Line number (1-based) + lineItem->setData(processedLine, Qt::DisplayRole); // Highlighted line content + lineItem->setData(lineNumber + 1, Qt::UserRole); // Line number (1-based) QStandardItem *matchesItem = new QStandardItem(QString::number(1)); matchesItem->setFlags(matchesItem->flags() | Qt::ItemIsSelectable); @@ -171,11 +184,9 @@ void SystemSearchResultDialog::addSearchResult(const FileSearchResults &result) << "Reported matches:" << result.matchCount << "First keyword line number:" << firstKeywordLineNumber; - // If needed, handle the first keyword line highlighting + // Highlight the first match in the editor if (firstKeywordLineNumber > 0) { qDebug() << "First keyword found at line:" << firstKeywordLineNumber << "in file:" << result.filePath; - // Call the highlighting function here, if necessary - // Example: highlightLineInView(result.filePath, firstKeywordLineNumber); } } From dff78ff36312ec558059efd27707a50273322347 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 14:05:13 +0330 Subject: [PATCH 004/114] Search & Replace Menu -> Fixed double click on results --- CHANGELOG.md | 4 ++ CMakeLists.txt.user | 26 +++++----- src/mainwindow.cpp | 60 +++++++++++++++++++---- src/mainwindow.h | 5 +- src/systemreplace/systemreplacedialog.cpp | 2 - 5 files changed, 71 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2657a5..aac2a34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 0.0.56 + +- Search & Replace Menu -> Fixed double click on results + ## 0.0.55 - Search & Replace Menu -> Fixed casing in search diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index f50e895..ade71a3 100755 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,14 +102,14 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} --DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=Debug --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} /data/Code/Qt/Notepad-- 0 /data/Code/Qt/Notepad--/build/Desktop-Debug @@ -160,14 +160,14 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} --DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=Release --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} /data/Code/Qt/Notepad-- /data/Code/Qt/Notepad--/build/Desktop-Release diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ede93a1..68de875 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -67,6 +67,8 @@ MainWindow::~MainWindow() { delete ui; delete fileOperations; delete textOperations; + delete m_systemFindDialog; + delete m_systemReplaceDialog; } Ui::MainWindow* MainWindow::getUi() const { @@ -366,7 +368,6 @@ void MainWindow::on_actionReplace_P_revious_triggered() } void MainWindow::on_actionFind_System_triggered() { - qDebug() << "on_actionFind_System_triggered called"; if (!m_systemFindDialog) { qDebug() << "Creating new SystemFindDialog"; @@ -382,7 +383,7 @@ void MainWindow::on_actionFind_System_triggered() { }); // Ensure connections are established - setupSearchResultDialogConnections(); + setupSearchResultDialogConnectionsForFind(); m_systemFindDialog->show(); } else { @@ -392,7 +393,33 @@ void MainWindow::on_actionFind_System_triggered() { } } -void MainWindow::setupSearchResultDialogConnections() { +void MainWindow::on_actionReplace_S_ystem_triggered() +{ + if (!m_systemReplaceDialog) { + qDebug() << "Creating new SystemReplaceDialog"; + + m_systemReplaceDialog = new SystemReplaceDialog(this); + m_systemReplaceDialog->setWindowModality(Qt::NonModal); + m_systemReplaceDialog->setAttribute(Qt::WA_DeleteOnClose); + + // Reset pointer when dialog is destroyed + connect(m_systemReplaceDialog, &QObject::destroyed, this, [this]() { + qDebug() << "SystemReplaceDialog destroyed. Resetting pointer."; + m_systemReplaceDialog = nullptr; + }); + + // Ensure connections are established + setupSearchResultDialogConnectionsForReplace(); + + m_systemReplaceDialog->show(); + } else { + qDebug() << "SystemReplaceDialog already exists. Bringing it to the front."; + m_systemReplaceDialog->raise(); + m_systemReplaceDialog->activateWindow(); + } +} + +void MainWindow::setupSearchResultDialogConnectionsForFind() { QTimer::singleShot(0, this, [this]() { SystemSearchResultDialog* m_systemSearchResultDialog = m_systemFindDialog->findChild("SystemSearchResultDialog"); @@ -402,21 +429,34 @@ void MainWindow::setupSearchResultDialogConnections() { // Re-establish the signal-slot connection connect(m_systemSearchResultDialog, &SystemSearchResultDialog::openFileAtMatch, - this, &MainWindow::openSearchResult, Qt::UniqueConnection); + this, &MainWindow::openSearchResult); qDebug() << "Signal-Slot Connection for SystemSearchResultDialog re-established."; } else { qDebug() << "SystemSearchResultDialog not found. Retrying..."; - QTimer::singleShot(100, this, &MainWindow::setupSearchResultDialogConnections); + QTimer::singleShot(100, this, &MainWindow::setupSearchResultDialogConnectionsForFind); } }); } -void MainWindow::on_actionReplace_S_ystem_triggered() -{ - SystemReplaceDialog* systemReplaceDialog = new SystemReplaceDialog(this); - systemReplaceDialog->setWindowModality(Qt::NonModal); - systemReplaceDialog->show(); +void MainWindow::setupSearchResultDialogConnectionsForReplace() { + QTimer::singleShot(0, this, [this]() { + SystemSearchResultDialog* m_systemSearchResultDialog = + m_systemReplaceDialog->findChild("SystemSearchResultDialog"); + + if (m_systemSearchResultDialog) { + qDebug() << "SystemSearchResultDialog found:" << m_systemSearchResultDialog; + + // Re-establish the signal-slot connection + connect(m_systemSearchResultDialog, &SystemSearchResultDialog::openFileAtMatch, + this, &MainWindow::openSearchResult); + + qDebug() << "Signal-Slot Connection for SystemSearchResultDialog re-established."; + } else { + qDebug() << "SystemSearchResultDialog not found. Retrying..."; + QTimer::singleShot(100, this, &MainWindow::setupSearchResultDialogConnectionsForReplace); + } + }); } void MainWindow::on_actionGo_to_Line_in_Text_triggered() diff --git a/src/mainwindow.h b/src/mainwindow.h index e210862..2556e63 100755 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -13,6 +13,7 @@ #include "mainwindow/textoperations.h" #include "indentation/indentationmanager.h" #include "systemfind/systemfinddialog.h" +#include "systemreplace/systemreplacedialog.h" #include "systemsearchresultdialog.h" QT_BEGIN_NAMESPACE @@ -156,7 +157,8 @@ private slots: void applyColorCoding(Document* doc, bool isModified); void setActiveDocumentEditorInFindDialog(); void setActiveDocumentEditorInReplaceDialog(); - void setupSearchResultDialogConnections(); + void setupSearchResultDialogConnectionsForFind(); + void setupSearchResultDialogConnectionsForReplace(); void setupIndentationMenu(); QAction* action_Custom; @@ -166,6 +168,7 @@ private slots: void loadIndentationSetting(); // Load and apply the saved setting IndentationManager* indentationManager; SystemFindDialog* m_systemFindDialog = nullptr; + SystemReplaceDialog* m_systemReplaceDialog = nullptr; SystemSearchResultDialog* m_systemSearchResultDialog; FindDialog* findDialog; ReplaceDialog* replaceDialog; diff --git a/src/systemreplace/systemreplacedialog.cpp b/src/systemreplace/systemreplacedialog.cpp index 8721b78..2710068 100644 --- a/src/systemreplace/systemreplacedialog.cpp +++ b/src/systemreplace/systemreplacedialog.cpp @@ -46,8 +46,6 @@ SystemReplaceDialog::SystemReplaceDialog(QWidget *parent) SystemReplaceDialog::~SystemReplaceDialog() { delete ui; - delete m_replace; - delete m_searchOptions; delete m_systemSearchResultDialog; } From 57a65b450229cd262cc2a939d5b3227202329fc5 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 16:22:11 +0330 Subject: [PATCH 005/114] github action #128 --- .github/workflows/cmake-multi-platform.yml | 46 ++++++++++++++++------ 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ca60ee0..6637f49 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -63,7 +63,7 @@ jobs: if: matrix.os == 'windows-latest' uses: actions/cache@v3 with: - path: D:\qt-source + path: D:/qt-source key: qt-source-6.5.3 restore-keys: qt-source- @@ -71,10 +71,10 @@ jobs: if: matrix.os == 'windows-latest' shell: powershell run: | - $qtSourceDir = "D:\qt-source" - $qtZip = "$qtSourceDir\qt-everywhere-src-6.5.3.zip" + $qtSourceDir = "D:/qt-source" + $qtZip = "$qtSourceDir/qt-everywhere-src-6.5.3.zip" - if (-Not (Test-Path "$qtSourceDir\qt-everywhere-src-6.5.3\qtbase\configure.bat")) { + if (-Not (Test-Path "$qtSourceDir/qt-everywhere-src-6.5.3/qtbase/configure.bat")) { Write-Host "Qt source not found in cache. Downloading..." New-Item -ItemType Directory -Path $qtSourceDir -Force Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.zip" -OutFile $qtZip @@ -83,6 +83,28 @@ jobs: Write-Host "Qt source found in cache." } + - name: Install bison Manually (Windows) + if: matrix.os == 'windows-latest' + shell: powershell + run: | + $bisonPath = "C:/ProgramData/chocolatey/bin/bison.exe" + if (-not (Test-Path $bisonPath)) { + Write-Host "bison is not available. Installing manually..." + $bisonUrl = "https://mirrors.kernel.org/gnu/bison/bison-3.8.2.tar.gz" + $bisonDir = "D:/bison" + $bisonTar = "$bisonDir/bison.tar.gz" + $bisonExtractDir = "$bisonDir/bison-3.8.2" + New-Item -ItemType Directory -Path $bisonDir -Force + + # Download and extract bison + Invoke-WebRequest -Uri $bisonUrl -OutFile $bisonTar -UseBasicParsing + tar -xvf $bisonTar -C $bisonDir + $env:PATH += ";$bisonExtractDir/bin" + [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Process) + } else { + Write-Host "bison found at $bisonPath" + } + - name: Build and Install Qt from Source (Windows) if: matrix.os == 'windows-latest' shell: cmd @@ -97,12 +119,12 @@ jobs: CALL "%VS_VARS_CMD%" || exit /b 1 REM Build Qt from source - SET QT_SOURCE=D:\qt-source\qt-everywhere-src-6.5.3 - IF NOT EXIST "%QT_SOURCE%\qtbase\configure.bat" ( - echo "configure.bat not found in %QT_SOURCE%\qtbase" && exit /b 1 + SET QT_SOURCE=D:/qt-source/qt-everywhere-src-6.5.3 + IF NOT EXIST "%QT_SOURCE%/qtbase/configure.bat" ( + echo "configure.bat not found in %QT_SOURCE%/qtbase" && exit /b 1 ) - cd "%QT_SOURCE%\qtbase" - call configure.bat -top-level -prefix C:\Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ + cd "%QT_SOURCE%/qtbase" + call configure.bat -top-level -prefix C:/Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ -DFEATURE_clang=ON ^ -DFEATURE_clangcpp=ON ^ -DLLVM_INSTALL_DIR="C:/Program Files/LLVM" ^ @@ -121,9 +143,9 @@ jobs: if: matrix.os == 'windows-latest' shell: powershell run: | - echo "Qt6_DIR=C:\Qt\lib\cmake\Qt6" >> $env:GITHUB_ENV - echo "QT_PLUGIN_PATH=C:\Qt\plugins" >> $env:GITHUB_ENV - echo "QML2_IMPORT_PATH=C:\Qt\qml" >> $env:GITHUB_ENV + echo "Qt6_DIR=C:/Qt/lib/cmake/Qt6" >> $env:GITHUB_ENV + echo "QT_PLUGIN_PATH=C:/Qt/plugins" >> $env:GITHUB_ENV + echo "QML2_IMPORT_PATH=C:/Qt/qml" >> $env:GITHUB_ENV - name: Configure CMake run: | From 676bb6b0cb2d9a66067135de452a1bbf12bc2c34 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 16:52:59 +0330 Subject: [PATCH 006/114] release #1 --- .github/workflows/cmake-multi-platform.yml | 186 ++++++++------------- 1 file changed, 72 insertions(+), 114 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6637f49..9bf353e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,36 +1,36 @@ -name: CI Build +name: Build and Release on: push: - branches: [main, dev] + branches: + - main + - dev pull_request: - branches: [main] + branches: + - main jobs: - build: + build-and-release: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] include: - - os: windows-latest - c_compiler: cl - cpp_compiler: cl - os: ubuntu-latest - c_compiler: gcc - cpp_compiler: g++ + artifact_extension: tar.gz - os: macos-latest - c_compiler: clang - cpp_compiler: clang++ + artifact_extension: zip # Wrap dmg in zip + - os: windows-latest + artifact_extension: zip steps: - name: Checkout code uses: actions/checkout@v4 - ### Ubuntu Dependencies - - name: Install dependencies (Ubuntu) + # Ubuntu Dependencies + - name: Set up dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update @@ -39,126 +39,84 @@ jobs: qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev echo "CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6" >> $GITHUB_ENV - ### macOS Dependencies - - name: Install dependencies (macOS) + # macOS Dependencies + - name: Set up dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew install ninja qt echo "CMAKE_PREFIX_PATH=$(brew --prefix qt)" >> $GITHUB_ENV - ### Windows Setup - - name: Install dependencies (Windows) + # Windows Dependencies + - name: Set up dependencies (Windows) if: matrix.os == 'windows-latest' shell: powershell run: | - choco install visualstudio2022buildtools -y + choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install python3 -y - choco install llvm -y - choco install gperf -y - pip install html5lib - - - name: Cache Qt Source (Windows) - if: matrix.os == 'windows-latest' - uses: actions/cache@v3 - with: - path: D:/qt-source - key: qt-source-6.5.3 - restore-keys: qt-source- + echo "CMAKE_PREFIX_PATH=C:\Qt\6.5.3\msvc2019_64\lib\cmake" >> $env:GITHUB_ENV - - name: Download Qt Source if Missing (Windows) - if: matrix.os == 'windows-latest' - shell: powershell + # Configure CMake + - name: Configure CMake run: | - $qtSourceDir = "D:/qt-source" - $qtZip = "$qtSourceDir/qt-everywhere-src-6.5.3.zip" + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" - if (-Not (Test-Path "$qtSourceDir/qt-everywhere-src-6.5.3/qtbase/configure.bat")) { - Write-Host "Qt source not found in cache. Downloading..." - New-Item -ItemType Directory -Path $qtSourceDir -Force - Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.zip" -OutFile $qtZip - Expand-Archive -Path $qtZip -DestinationPath $qtSourceDir - } else { - Write-Host "Qt source found in cache." - } + # Build application + - name: Build application + run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Install bison Manually (Windows) - if: matrix.os == 'windows-latest' - shell: powershell + # Package application + - name: Package application (Linux) + if: matrix.os == 'ubuntu-latest' run: | - $bisonPath = "C:/ProgramData/chocolatey/bin/bison.exe" - if (-not (Test-Path $bisonPath)) { - Write-Host "bison is not available. Installing manually..." - $bisonUrl = "https://mirrors.kernel.org/gnu/bison/bison-3.8.2.tar.gz" - $bisonDir = "D:/bison" - $bisonTar = "$bisonDir/bison.tar.gz" - $bisonExtractDir = "$bisonDir/bison-3.8.2" - New-Item -ItemType Directory -Path $bisonDir -Force - - # Download and extract bison - Invoke-WebRequest -Uri $bisonUrl -OutFile $bisonTar -UseBasicParsing - tar -xvf $bisonTar -C $bisonDir - $env:PATH += ";$bisonExtractDir/bin" - [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Process) - } else { - Write-Host "bison found at $bisonPath" - } + cd "${{ github.workspace }}/build" + tar -czvf application.tar.gz . + shell: bash - - name: Build and Install Qt from Source (Windows) - if: matrix.os == 'windows-latest' - shell: cmd + - name: Package application (macOS) + if: matrix.os == 'macos-latest' run: | - REM Locate Visual Studio Build Tools - FOR /F "tokens=*" %%i IN ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ^ - -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath') DO SET VS_PATH=%%i - IF NOT DEFINED VS_PATH ( - echo Visual Studio Build Tools not found! && exit /b 1 - ) - SET "VS_VARS_CMD=%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat" - CALL "%VS_VARS_CMD%" || exit /b 1 - - REM Build Qt from source - SET QT_SOURCE=D:/qt-source/qt-everywhere-src-6.5.3 - IF NOT EXIST "%QT_SOURCE%/qtbase/configure.bat" ( - echo "configure.bat not found in %QT_SOURCE%/qtbase" && exit /b 1 - ) - cd "%QT_SOURCE%/qtbase" - call configure.bat -top-level -prefix C:/Qt -release -opensource -confirm-license -nomake examples -nomake tests -platform win32-msvc -cmake-generator Ninja ^ - -DFEATURE_clang=ON ^ - -DFEATURE_clangcpp=ON ^ - -DLLVM_INSTALL_DIR="C:/Program Files/LLVM" ^ - -Wno-dev || exit /b 1 - - REM Verify if build.ninja exists - IF NOT EXIST build.ninja ( - echo "Error: build.ninja not generated. Check configuration step for issues." && exit /b 1 - ) - - REM Proceed with the build and install steps - ninja || exit /b 1 - ninja install || exit /b 1 + cd "${{ github.workspace }}/build" + hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg + zip application.zip application.dmg + shell: bash - - name: Set Qt Environment Variables (Windows) + - name: Package application (Windows) if: matrix.os == 'windows-latest' - shell: powershell run: | - echo "Qt6_DIR=C:/Qt/lib/cmake/Qt6" >> $env:GITHUB_ENV - echo "QT_PLUGIN_PATH=C:/Qt/plugins" >> $env:GITHUB_ENV - echo "QML2_IMPORT_PATH=C:/Qt/qml" >> $env:GITHUB_ENV + cd "${{ github.workspace }}/build" + zip -r application.zip . - - name: Configure CMake - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" + # Upload built artifacts + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: application-${{ matrix.os }} + path: ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - - name: Build - run: cmake --build "${{ github.workspace }}/build" --config Release + create-release: + needs: build-and-release + runs-on: ubuntu-latest + if: github.event_name == 'push' # Only create releases on push events + steps: + - name: Create a Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + draft: false + prerelease: false - - name: Test - working-directory: "${{ github.workspace }}/build" - run: ctest --output-on-failure --build-config Release + - name: Upload Release Assets + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/build/application-*.* + asset_name: application-${{ matrix.os }}.${{ matrix.artifact_extension }} + asset_content_type: application/octet-stream From 7843fd6a685b55b023df0e5b40ad6b296c9eb4fe Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 16:59:37 +0330 Subject: [PATCH 007/114] release #2 --- .github/workflows/cmake-multi-platform.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 9bf353e..70bf80e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -21,7 +21,7 @@ jobs: - os: ubuntu-latest artifact_extension: tar.gz - os: macos-latest - artifact_extension: zip # Wrap dmg in zip + artifact_extension: zip - os: windows-latest artifact_extension: zip @@ -73,7 +73,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | cd "${{ github.workspace }}/build" - tar -czvf application.tar.gz . + tar --exclude='./.*' -czvf application.tar.gz . shell: bash - name: Package application (macOS) @@ -88,7 +88,7 @@ jobs: if: matrix.os == 'windows-latest' run: | cd "${{ github.workspace }}/build" - zip -r application.zip . + Compress-Archive -Path . -DestinationPath application.zip # Upload built artifacts - name: Upload artifact @@ -100,7 +100,7 @@ jobs: create-release: needs: build-and-release runs-on: ubuntu-latest - if: github.event_name == 'push' # Only create releases on push events + if: github.event_name == 'push' steps: - name: Create a Release id: create_release From d3e18a51d86ea3177c9ba518f471d0a03a945a73 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:06:15 +0330 Subject: [PATCH 008/114] release #3 --- .github/workflows/cmake-multi-platform.yml | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 70bf80e..ef09c8f 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,24 +29,24 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Ubuntu Dependencies + # Ubuntu Setup - name: Set up dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync echo "CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6" >> $GITHUB_ENV - # macOS Dependencies + # macOS Setup - name: Set up dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew install ninja qt echo "CMAKE_PREFIX_PATH=$(brew --prefix qt)" >> $GITHUB_ENV - # Windows Dependencies + # Windows Setup - name: Set up dependencies (Windows) if: matrix.os == 'windows-latest' shell: powershell @@ -64,15 +64,16 @@ jobs: -G "Ninja" \ -S "${{ github.workspace }}" - # Build application + # Build Application - name: Build application run: cmake --build "${{ github.workspace }}/build" --config Release - # Package application + # Package Application - name: Package application (Linux) if: matrix.os == 'ubuntu-latest' run: | - cd "${{ github.workspace }}/build" + rsync -a "${{ github.workspace }}/build/" "/tmp/build_copy/" + cd /tmp/build_copy tar --exclude='./.*' -czvf application.tar.gz . shell: bash @@ -90,12 +91,14 @@ jobs: cd "${{ github.workspace }}/build" Compress-Archive -Path . -DestinationPath application.zip - # Upload built artifacts + # Upload Artifacts - name: Upload artifact uses: actions/upload-artifact@v3 with: name: application-${{ matrix.os }} - path: ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} + path: | + ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} + /tmp/build_copy/application.tar.gz # For Ubuntu temporary path create-release: needs: build-and-release @@ -117,6 +120,7 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/build/application-*.* + asset_path: | + ${{ github.workspace }}/build/application-${{ matrix.os }}.${{ matrix.artifact_extension }} asset_name: application-${{ matrix.os }}.${{ matrix.artifact_extension }} asset_content_type: application/octet-stream From fe2e504d0436241e9d5cedb60d712c0b5a9e5ee6 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:11:19 +0330 Subject: [PATCH 009/114] release #4 --- .github/workflows/cmake-multi-platform.yml | 56 ++++++---------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ef09c8f..8ef763d 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,32 +29,27 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Ubuntu Setup - - name: Set up dependencies (Ubuntu) + # Install dependencies based on OS + - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - echo "CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6" >> $GITHUB_ENV - # macOS Setup - - name: Set up dependencies (macOS) + - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew install ninja qt - echo "CMAKE_PREFIX_PATH=$(brew --prefix qt)" >> $GITHUB_ENV - # Windows Setup - - name: Set up dependencies (Windows) + - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' shell: powershell run: | choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - echo "CMAKE_PREFIX_PATH=C:\Qt\6.5.3\msvc2019_64\lib\cmake" >> $env:GITHUB_ENV # Configure CMake - name: Configure CMake @@ -63,19 +58,23 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} # Build Application - name: Build application run: cmake --build "${{ github.workspace }}/build" --config Release + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} # Package Application - - name: Package application (Linux) + - name: Package application (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - rsync -a "${{ github.workspace }}/build/" "/tmp/build_copy/" - cd /tmp/build_copy - tar --exclude='./.*' -czvf application.tar.gz . - shell: bash + BUILD_DIR="/home/runner/work/Notepad--/Notepad--/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf application.tar.gz ./* - name: Package application (macOS) if: matrix.os == 'macos-latest' @@ -83,13 +82,13 @@ jobs: cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - shell: bash - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | cd "${{ github.workspace }}/build" Compress-Archive -Path . -DestinationPath application.zip + shell: pwsh # Upload Artifacts - name: Upload artifact @@ -98,29 +97,4 @@ jobs: name: application-${{ matrix.os }} path: | ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - /tmp/build_copy/application.tar.gz # For Ubuntu temporary path - - create-release: - needs: build-and-release - runs-on: ubuntu-latest - if: github.event_name == 'push' - steps: - - name: Create a Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - release_name: Release ${{ github.ref_name }} - draft: false - prerelease: false - - - name: Upload Release Assets - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: | - ${{ github.workspace }}/build/application-${{ matrix.os }}.${{ matrix.artifact_extension }} - asset_name: application-${{ matrix.os }}.${{ matrix.artifact_extension }} - asset_content_type: application/octet-stream + /tmp/build_copy/application.tar.gz From 3a2f1b4b6ea8e601c79c7ca8d262a7d7302000ce Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:13:57 +0330 Subject: [PATCH 010/114] release #5 --- .github/workflows/cmake-multi-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8ef763d..d97c728 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -69,7 +69,7 @@ jobs: - name: Package application (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - BUILD_DIR="/home/runner/work/Notepad--/Notepad--/build" + BUILD_DIR="${{ github.workspace }}/build" TEMP_DIR="/tmp/build_copy" rm -rf $TEMP_DIR rsync -a "$BUILD_DIR/" "$TEMP_DIR/" From d2d45f2470693b6e03c31797c1389a0325b3fc43 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:16:04 +0330 Subject: [PATCH 011/114] release #6 --- .github/workflows/cmake-multi-platform.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index d97c728..e6ae340 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -20,10 +20,13 @@ jobs: include: - os: ubuntu-latest artifact_extension: tar.gz + shell: bash - os: macos-latest artifact_extension: zip + shell: bash - os: windows-latest artifact_extension: zip + shell: pwsh steps: - name: Checkout code @@ -45,7 +48,6 @@ jobs: - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' - shell: powershell run: | choco install qt --version=6.5.3 -y choco install ninja -y @@ -58,12 +60,12 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: ${{ matrix.shell }} # Build Application - name: Build application run: cmake --build "${{ github.workspace }}/build" --config Release - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: ${{ matrix.shell }} # Package Application - name: Package application (Ubuntu) @@ -88,7 +90,6 @@ jobs: run: | cd "${{ github.workspace }}/build" Compress-Archive -Path . -DestinationPath application.zip - shell: pwsh # Upload Artifacts - name: Upload artifact From d4e25bedc3299e11747a1cf1dd30101034f11fac Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:18:00 +0330 Subject: [PATCH 012/114] release #7 --- .github/workflows/cmake-multi-platform.yml | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e6ae340..66d4e5c 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -20,13 +20,10 @@ jobs: include: - os: ubuntu-latest artifact_extension: tar.gz - shell: bash - os: macos-latest artifact_extension: zip - shell: bash - os: windows-latest artifact_extension: zip - shell: pwsh steps: - name: Checkout code @@ -54,18 +51,34 @@ jobs: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y # Configure CMake - - name: Configure CMake + - name: Configure CMake (Ubuntu and macOS) + if: matrix.os != 'windows-latest' run: | cmake -B "${{ github.workspace }}/build" \ -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - shell: ${{ matrix.shell }} + shell: bash + + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake -B "${{ github.workspace }}\build" ` + -DCMAKE_BUILD_TYPE=Release ` + -G "Ninja" ` + -S "${{ github.workspace }}" + shell: pwsh # Build Application - - name: Build application + - name: Build application (Ubuntu and macOS) + if: matrix.os != 'windows-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - shell: ${{ matrix.shell }} + shell: bash + + - name: Build application (Windows) + if: matrix.os == 'windows-latest' + run: cmake --build "${{ github.workspace }}\build" --config Release + shell: pwsh # Package Application - name: Package application (Ubuntu) @@ -88,8 +101,9 @@ jobs: - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd "${{ github.workspace }}/build" + cd "${{ github.workspace }}\build" Compress-Archive -Path . -DestinationPath application.zip + shell: pwsh # Upload Artifacts - name: Upload artifact From b0b1396ea8b6457c88073b8f571f9e6eef865931 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:23:04 +0330 Subject: [PATCH 013/114] release #8 --- .github/workflows/cmake-multi-platform.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 66d4e5c..f79586c 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -49,6 +49,7 @@ jobs: choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + shell: pwsh # Configure CMake - name: Configure CMake (Ubuntu and macOS) @@ -63,9 +64,11 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | + $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" cmake -B "${{ github.workspace }}\build" ` -DCMAKE_BUILD_TYPE=Release ` -G "Ninja" ` + -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` -S "${{ github.workspace }}" shell: pwsh From 6710cd946cb02ed670f62d990909d43cfcf64390 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:29:30 +0330 Subject: [PATCH 014/114] release #9 --- .github/workflows/cmake-multi-platform.yml | 176 ++++++++++----------- 1 file changed, 84 insertions(+), 92 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index f79586c..c2af678 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,4 +1,4 @@ -name: Build and Release +name: Build and Release Notepad-- on: push: @@ -10,109 +10,101 @@ on: - main jobs: - build-and-release: + build: runs-on: ${{ matrix.os }} - strategy: - fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - include: - - os: ubuntu-latest - artifact_extension: tar.gz - - os: macos-latest - artifact_extension: zip - - os: windows-latest - artifact_extension: zip steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Install dependencies based on OS - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + - name: Checkout code + uses: actions/checkout@v3 - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt + - name: Install dependencies (Ubuntu and macOS) + if: matrix.os != 'windows-latest' + run: | + if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then + sudo apt-get update + sudo apt-get install -y qt6-base-dev ninja-build cmake + elif [[ ${{ matrix.os }} == 'macos-latest' ]]; then + brew install qt ninja cmake + fi - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install qt --version=6.5.3 -y - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - shell: pwsh + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install qt --version=6.5.3 -y + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + $QtPath = (Get-ChildItem -Directory 'C:\Qt\6.5.3' | Where-Object { $_.Name -match 'mingw.*' }).FullName + if (-not $QtPath) { + Write-Error "Could not find a valid Qt installation for MinGW." + exit 1 + } + Write-Host "Using Qt path: $QtPath" + $env:CMAKE_PREFIX_PATH = "$QtPath\lib\cmake" + shell: pwsh - # Configure CMake - - name: Configure CMake (Ubuntu and macOS) - if: matrix.os != 'windows-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - shell: bash + - name: Configure CMake + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" \ + -S "${{ github.workspace }}" + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" - cmake -B "${{ github.workspace }}\build" ` - -DCMAKE_BUILD_TYPE=Release ` - -G "Ninja" ` - -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` - -S "${{ github.workspace }}" - shell: pwsh + - name: Build + run: cmake --build "${{ github.workspace }}/build" --parallel + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - # Build Application - - name: Build application (Ubuntu and macOS) - if: matrix.os != 'windows-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - shell: bash + - name: Package application + run: | + if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then + tar -czf Notepad--.tar.gz -C "${{ github.workspace }}/build" . + elif [[ ${{ matrix.os }} == 'macos-latest' ]]; then + hdiutil create -volname Notepad-- -srcfolder "${{ github.workspace }}/build" -ov -format UDZO Notepad--.dmg + elif [[ ${{ matrix.os }} == 'windows-latest' ]]; then + powershell Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" + fi + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - - name: Build application (Windows) - if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\build" --config Release - shell: pwsh + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-artifact + path: | + Notepad--.tar.gz + Notepad--.dmg + Notepad--.zip - # Package Application - - name: Package application (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf application.tar.gz ./* - - - name: Package application (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg - zip application.zip application.dmg + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download build artifacts + uses: actions/download-artifact@v3 + with: + path: ./artifacts - - name: Package application (Windows) - if: matrix.os == 'windows-latest' - run: | - cd "${{ github.workspace }}\build" - Compress-Archive -Path . -DestinationPath application.zip - shell: pwsh + - name: Create release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.run_id }} + release_name: Release ${{ github.run_id }} + draft: false + prerelease: false - # Upload Artifacts - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: application-${{ matrix.os }} - path: | - ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - /tmp/build_copy/application.tar.gz + - name: Upload release assets + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./artifacts/ + asset_name: ${{ matrix.os }}-Notepad--.tar.gz + asset_name: ${{ matrix.os }}-Notepad--.dmg + asset_name: ${{ matrix.os }}-Notepad--.zip + content_type: application/octet-stream From 1e661bf654234456999dc1117dabceade969214c Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:31:37 +0330 Subject: [PATCH 015/114] release #10 --- .github/workflows/cmake-multi-platform.yml | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index c2af678..d1686d9 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -20,17 +20,18 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Install dependencies (Ubuntu and macOS) - if: matrix.os != 'windows-latest' + - name: Install dependencies on Ubuntu + if: matrix.os == 'ubuntu-latest' run: | - if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then - sudo apt-get update - sudo apt-get install -y qt6-base-dev ninja-build cmake - elif [[ ${{ matrix.os }} == 'macos-latest' ]]; then - brew install qt ninja cmake - fi + sudo apt-get update + sudo apt-get install -y qt6-base-dev ninja-build cmake - - name: Install dependencies (Windows) + - name: Install dependencies on macOS + if: matrix.os == 'macos-latest' + run: | + brew install qt ninja cmake + + - name: Install dependencies on Windows if: matrix.os == 'windows-latest' run: | choco install qt --version=6.5.3 -y @@ -55,7 +56,8 @@ jobs: shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - name: Build - run: cmake --build "${{ github.workspace }}/build" --parallel + run: | + cmake --build "${{ github.workspace }}/build" --parallel shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - name: Package application @@ -65,7 +67,7 @@ jobs: elif [[ ${{ matrix.os }} == 'macos-latest' ]]; then hdiutil create -volname Notepad-- -srcfolder "${{ github.workspace }}/build" -ov -format UDZO Notepad--.dmg elif [[ ${{ matrix.os }} == 'windows-latest' ]]; then - powershell Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" + Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" fi shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} @@ -104,7 +106,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./artifacts/ - asset_name: ${{ matrix.os }}-Notepad--.tar.gz - asset_name: ${{ matrix.os }}-Notepad--.dmg - asset_name: ${{ matrix.os }}-Notepad--.zip + asset_name: Notepad---${{ matrix.os }}.tar.gz + asset_name: Notepad---${{ matrix.os }}.dmg + asset_name: Notepad---${{ matrix.os }}.zip content_type: application/octet-stream From beae469d41118a7264f01c8ca055b9325d3d78dc Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:34:02 +0330 Subject: [PATCH 016/114] release #11 --- .github/workflows/cmake-multi-platform.yml | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index d1686d9..24e3271 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -11,26 +11,30 @@ on: jobs: build: - runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: - name: Checkout code uses: actions/checkout@v3 + # Ubuntu-specific steps - name: Install dependencies on Ubuntu if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y qt6-base-dev ninja-build cmake + # macOS-specific steps - name: Install dependencies on macOS if: matrix.os == 'macos-latest' run: | brew install qt ninja cmake + # Windows-specific steps - name: Install dependencies on Windows if: matrix.os == 'windows-latest' run: | @@ -51,25 +55,24 @@ jobs: cmake -B "${{ github.workspace }}/build" \ -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ - -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" \ -S "${{ github.workspace }}" - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - name: Build run: | cmake --build "${{ github.workspace }}/build" --parallel - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - name: Package application run: | - if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then + if [[ "${{ matrix.os }}" == 'ubuntu-latest' ]]; then tar -czf Notepad--.tar.gz -C "${{ github.workspace }}/build" . - elif [[ ${{ matrix.os }} == 'macos-latest' ]]; then + elif [[ "${{ matrix.os }}" == 'macos-latest' ]]; then hdiutil create -volname Notepad-- -srcfolder "${{ github.workspace }}/build" -ov -format UDZO Notepad--.dmg - elif [[ ${{ matrix.os }} == 'windows-latest' ]]; then + else Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" fi - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: bash - name: Upload artifacts uses: actions/upload-artifact@v3 @@ -106,7 +109,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./artifacts/ - asset_name: Notepad---${{ matrix.os }}.tar.gz - asset_name: Notepad---${{ matrix.os }}.dmg - asset_name: Notepad---${{ matrix.os }}.zip + asset_name: Notepad--${{ matrix.os }}.tar.gz + asset_name: Notepad--${{ matrix.os }}.dmg + asset_name: Notepad--${{ matrix.os }}.zip content_type: application/octet-stream From 82768e1d439a3cfc5eb9e65fa4a3e005cdae5b0d Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:36:06 +0330 Subject: [PATCH 017/114] release #12 --- .github/workflows/cmake-multi-platform.yml | 43 +++++++++++++--------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 24e3271..219902e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -21,20 +21,18 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # Ubuntu-specific steps + # Install dependencies - name: Install dependencies on Ubuntu if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y qt6-base-dev ninja-build cmake - # macOS-specific steps - name: Install dependencies on macOS if: matrix.os == 'macos-latest' run: | brew install qt ninja cmake - # Windows-specific steps - name: Install dependencies on Windows if: matrix.os == 'windows-latest' run: | @@ -50,30 +48,41 @@ jobs: $env:CMAKE_PREFIX_PATH = "$QtPath\lib\cmake" shell: pwsh + # Configure CMake - name: Configure CMake run: | cmake -B "${{ github.workspace }}/build" \ -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + # Build - name: Build run: | cmake --build "${{ github.workspace }}/build" --parallel - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - - name: Package application + # Package the application + - name: Package application on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + tar -czf Notepad--.tar.gz -C "${{ github.workspace }}/build" . + shell: bash + + - name: Package application on macOS + if: matrix.os == 'macos-latest' run: | - if [[ "${{ matrix.os }}" == 'ubuntu-latest' ]]; then - tar -czf Notepad--.tar.gz -C "${{ github.workspace }}/build" . - elif [[ "${{ matrix.os }}" == 'macos-latest' ]]; then - hdiutil create -volname Notepad-- -srcfolder "${{ github.workspace }}/build" -ov -format UDZO Notepad--.dmg - else - Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" - fi + hdiutil create -volname Notepad-- -srcfolder "${{ github.workspace }}/build" -ov -format UDZO Notepad--.dmg shell: bash + - name: Package application on Windows + if: matrix.os == 'windows-latest' + run: | + Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" + shell: pwsh + + # Upload artifacts - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -108,8 +117,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./artifacts/ - asset_name: Notepad--${{ matrix.os }}.tar.gz - asset_name: Notepad--${{ matrix.os }}.dmg - asset_name: Notepad--${{ matrix.os }}.zip + asset_path: ./artifacts + asset_name: Notepad--_${{ matrix.os }}.tar.gz + asset_name: Notepad--_${{ matrix.os }}.dmg + asset_name: Notepad--_${{ matrix.os }}.zip content_type: application/octet-stream From 55a87f5b4f014834450c6f6e1003d1f0b6f63594 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:38:37 +0330 Subject: [PATCH 018/114] release #13 --- .github/workflows/cmake-multi-platform.yml | 65 ++++++++++++++-------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 219902e..402a752 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -23,18 +23,18 @@ jobs: # Install dependencies - name: Install dependencies on Ubuntu - if: matrix.os == 'ubuntu-latest' + if: ${{ matrix.os == 'ubuntu-latest' }} run: | sudo apt-get update sudo apt-get install -y qt6-base-dev ninja-build cmake - name: Install dependencies on macOS - if: matrix.os == 'macos-latest' + if: ${{ matrix.os == 'macos-latest' }} run: | brew install qt ninja cmake - name: Install dependencies on Windows - if: matrix.os == 'windows-latest' + if: ${{ matrix.os == 'windows-latest' }} run: | choco install qt --version=6.5.3 -y choco install ninja -y @@ -49,37 +49,58 @@ jobs: shell: pwsh # Configure CMake - - name: Configure CMake + - name: Configure CMake on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + shell: bash - # Build - - name: Build + - name: Configure CMake on macOS + if: ${{ matrix.os == 'macos-latest' }} + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + shell: bash + + - name: Configure CMake on Windows + if: ${{ matrix.os == 'windows-latest' }} run: | - cmake --build "${{ github.workspace }}/build" --parallel - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + cmake -B build ` + -DCMAKE_BUILD_TYPE=Release ` + -G "Ninja" ` + -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` + -S . + shell: pwsh + + # Build + - name: Build on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} + run: cmake --build build --parallel + shell: bash + + - name: Build on macOS + if: ${{ matrix.os == 'macos-latest' }} + run: cmake --build build --parallel + shell: bash + + - name: Build on Windows + if: ${{ matrix.os == 'windows-latest' }} + run: cmake --build build --parallel + shell: pwsh # Package the application - name: Package application on Ubuntu - if: matrix.os == 'ubuntu-latest' - run: | - tar -czf Notepad--.tar.gz -C "${{ github.workspace }}/build" . + if: ${{ matrix.os == 'ubuntu-latest' }} + run: tar -czf Notepad--.tar.gz -C build . shell: bash - name: Package application on macOS - if: matrix.os == 'macos-latest' - run: | - hdiutil create -volname Notepad-- -srcfolder "${{ github.workspace }}/build" -ov -format UDZO Notepad--.dmg + if: ${{ matrix.os == 'macos-latest' }} + run: hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--.dmg shell: bash - name: Package application on Windows - if: matrix.os == 'windows-latest' - run: | - Compress-Archive -Path "${{ github.workspace }}\build\*" -DestinationPath "Notepad--.zip" + if: ${{ matrix.os == 'windows-latest' }} + run: Compress-Archive -Path build\* -DestinationPath Notepad--.zip shell: pwsh # Upload artifacts From 3a4767df61a9bb1f05719f1170ae9abbc67b8eca Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:43:16 +0330 Subject: [PATCH 019/114] release #14 --- .github/workflows/cmake-multi-platform.yml | 99 +++++++++------------- 1 file changed, 40 insertions(+), 59 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 402a752..a0f0bbf 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -21,7 +21,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # Install dependencies - name: Install dependencies on Ubuntu if: ${{ matrix.os == 'ubuntu-latest' }} run: | @@ -48,76 +47,40 @@ jobs: $env:CMAKE_PREFIX_PATH = "$QtPath\lib\cmake" shell: pwsh - # Configure CMake - - name: Configure CMake on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: bash - - - name: Configure CMake on macOS - if: ${{ matrix.os == 'macos-latest' }} + - name: Configure CMake run: | cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: bash - - - name: Configure CMake on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: | - cmake -B build ` - -DCMAKE_BUILD_TYPE=Release ` - -G "Ninja" ` - -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` - -S . - shell: pwsh + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - # Build - - name: Build on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} + - name: Build application run: cmake --build build --parallel - shell: bash - - - name: Build on macOS - if: ${{ matrix.os == 'macos-latest' }} - run: cmake --build build --parallel - shell: bash - - - name: Build on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: cmake --build build --parallel - shell: pwsh - - # Package the application - - name: Package application on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} - run: tar -czf Notepad--.tar.gz -C build . - shell: bash - - - name: Package application on macOS - if: ${{ matrix.os == 'macos-latest' }} - run: hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--.dmg - shell: bash + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - - name: Package application on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: Compress-Archive -Path build\* -DestinationPath Notepad--.zip - shell: pwsh + - name: Package application + run: | + if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + tar -czf Notepad--_linux.tar.gz -C build . + elif [ "${{ matrix.os }}" == "macos-latest" ]; then + hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--_macos.dmg + elif [ "${{ matrix.os }}" == "windows-latest" ]; then + Compress-Archive -Path build\* -DestinationPath Notepad--_windows.zip + fi + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - # Upload artifacts - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: ${{ matrix.os }}-artifact path: | - Notepad--.tar.gz - Notepad--.dmg - Notepad--.zip + Notepad--_linux.tar.gz + Notepad--_macos.dmg + Notepad--_windows.zip release: needs: build runs-on: ubuntu-latest steps: - - name: Download build artifacts + - name: Download artifacts uses: actions/download-artifact@v3 with: path: ./artifacts @@ -138,8 +101,26 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./artifacts - asset_name: Notepad--_${{ matrix.os }}.tar.gz - asset_name: Notepad--_${{ matrix.os }}.dmg - asset_name: Notepad--_${{ matrix.os }}.zip + asset_path: ./artifacts/Notepad--_linux.tar.gz + asset_name: Notepad--_linux.tar.gz + content_type: application/gzip + + - name: Upload macOS release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./artifacts/Notepad--_macos.dmg + asset_name: Notepad--_macos.dmg content_type: application/octet-stream + + - name: Upload Windows release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./artifacts/Notepad--_windows.zip + asset_name: Notepad--_windows.zip + content_type: application/zip From 276b3ad572a80ef6eb0c3894ce60de61e40937c9 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:45:19 +0330 Subject: [PATCH 020/114] release #15 --- .github/workflows/cmake-multi-platform.yml | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a0f0bbf..4e06139 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -14,26 +14,25 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v3 - - name: Install dependencies on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} + - name: Install dependencies (Ubuntu) + if: ${{ runner.os == 'Linux' }} run: | sudo apt-get update sudo apt-get install -y qt6-base-dev ninja-build cmake - - name: Install dependencies on macOS - if: ${{ matrix.os == 'macos-latest' }} + - name: Install dependencies (macOS) + if: ${{ runner.os == 'macOS' }} run: | brew install qt ninja cmake - - name: Install dependencies on Windows - if: ${{ matrix.os == 'windows-latest' }} + - name: Install dependencies (Windows) + if: ${{ runner.os == 'Windows' }} run: | choco install qt --version=6.5.3 -y choco install ninja -y @@ -50,27 +49,27 @@ jobs: - name: Configure CMake run: | cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - name: Build application run: cmake --build build --parallel - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - name: Package application run: | - if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + if [[ $RUNNER_OS == "Linux" ]]; then tar -czf Notepad--_linux.tar.gz -C build . - elif [ "${{ matrix.os }}" == "macos-latest" ]; then + elif [[ $RUNNER_OS == "macOS" ]]; then hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--_macos.dmg - elif [ "${{ matrix.os }}" == "windows-latest" ]; then + elif [[ $RUNNER_OS == "Windows" ]]; then Compress-Archive -Path build\* -DestinationPath Notepad--_windows.zip fi - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: bash - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: ${{ matrix.os }}-artifact + name: ${{ runner.os }}-artifact path: | Notepad--_linux.tar.gz Notepad--_macos.dmg @@ -79,6 +78,7 @@ jobs: release: needs: build runs-on: ubuntu-latest + steps: - name: Download artifacts uses: actions/download-artifact@v3 @@ -95,7 +95,7 @@ jobs: draft: false prerelease: false - - name: Upload release assets + - name: Upload Linux release asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fcf9fb270aa9f4abdd36cd0d938cf13b251deb03 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:47:19 +0330 Subject: [PATCH 021/114] release #16 --- .github/workflows/cmake-multi-platform.yml | 50 +++++++++++++--------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 4e06139..eb67f8a 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -20,19 +20,19 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Install dependencies (Ubuntu) - if: ${{ runner.os == 'Linux' }} + - name: Install dependencies on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} run: | sudo apt-get update sudo apt-get install -y qt6-base-dev ninja-build cmake - - name: Install dependencies (macOS) - if: ${{ runner.os == 'macOS' }} + - name: Install dependencies on macOS + if: ${{ matrix.os == 'macos-latest' }} run: | brew install qt ninja cmake - - name: Install dependencies (Windows) - if: ${{ runner.os == 'Windows' }} + - name: Install dependencies on Windows + if: ${{ matrix.os == 'windows-latest' }} run: | choco install qt --version=6.5.3 -y choco install ninja -y @@ -46,30 +46,37 @@ jobs: $env:CMAKE_PREFIX_PATH = "$QtPath\lib\cmake" shell: pwsh - - name: Configure CMake + - name: Configure CMake on Ubuntu/macOS + if: ${{ matrix.os != 'windows-latest' }} run: | cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + + - name: Configure CMake on Windows + if: ${{ matrix.os == 'windows-latest' }} + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" -S . + shell: pwsh - name: Build application run: cmake --build build --parallel - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - - name: Package application - run: | - if [[ $RUNNER_OS == "Linux" ]]; then - tar -czf Notepad--_linux.tar.gz -C build . - elif [[ $RUNNER_OS == "macOS" ]]; then - hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--_macos.dmg - elif [[ $RUNNER_OS == "Windows" ]]; then - Compress-Archive -Path build\* -DestinationPath Notepad--_windows.zip - fi - shell: bash + - name: Package application on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} + run: tar -czf Notepad--_linux.tar.gz -C build . + + - name: Package application on macOS + if: ${{ matrix.os == 'macos-latest' }} + run: hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--_macos.dmg + + - name: Package application on Windows + if: ${{ matrix.os == 'windows-latest' }} + run: Compress-Archive -Path build\* -DestinationPath Notepad--_windows.zip + shell: pwsh - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: ${{ runner.os }}-artifact + name: ${{ matrix.os }}-artifact path: | Notepad--_linux.tar.gz Notepad--_macos.dmg @@ -96,6 +103,7 @@ jobs: prerelease: false - name: Upload Linux release asset + if: ${{ steps.download_artifacts.outputs.name == 'Notepad--_linux.tar.gz' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -106,6 +114,7 @@ jobs: content_type: application/gzip - name: Upload macOS release asset + if: ${{ steps.download_artifacts.outputs.name == 'Notepad--_macos.dmg' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -116,6 +125,7 @@ jobs: content_type: application/octet-stream - name: Upload Windows release asset + if: ${{ steps.download_artifacts.outputs.name == 'Notepad--_windows.zip' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 903e03d82a5fc4bcf52e6ffe1841fdbc42774310 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:52:02 +0330 Subject: [PATCH 022/114] release #17 --- .github/workflows/cmake-multi-platform.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index eb67f8a..03c6254 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -24,7 +24,11 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} run: | sudo apt-get update - sudo apt-get install -y qt6-base-dev ninja-build cmake + sudo apt-get install -y \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \ + qt6-wayland qt6-declarative qt6-websockets \ + libgl-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev \ + libxext-dev libxfixes-dev libxcb-glx0-dev ninja-build cmake - name: Install dependencies on macOS if: ${{ matrix.os == 'macos-latest' }} @@ -103,7 +107,6 @@ jobs: prerelease: false - name: Upload Linux release asset - if: ${{ steps.download_artifacts.outputs.name == 'Notepad--_linux.tar.gz' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -114,7 +117,6 @@ jobs: content_type: application/gzip - name: Upload macOS release asset - if: ${{ steps.download_artifacts.outputs.name == 'Notepad--_macos.dmg' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -125,7 +127,6 @@ jobs: content_type: application/octet-stream - name: Upload Windows release asset - if: ${{ steps.download_artifacts.outputs.name == 'Notepad--_windows.zip' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c4e809eaab4376560251789dd7a6dd48fe67e5f4 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:56:10 +0330 Subject: [PATCH 023/114] release #18 --- .github/workflows/cmake-multi-platform.yml | 189 ++++++++------------- 1 file changed, 73 insertions(+), 116 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 03c6254..cc212de 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,4 +1,4 @@ -name: Build and Release Notepad-- +name: Build and Release on: push: @@ -11,127 +11,84 @@ on: jobs: build: + runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install dependencies on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - sudo apt-get update - sudo apt-get install -y \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \ - qt6-wayland qt6-declarative qt6-websockets \ - libgl-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev \ - libxext-dev libxfixes-dev libxcb-glx0-dev ninja-build cmake - - - name: Install dependencies on macOS - if: ${{ matrix.os == 'macos-latest' }} - run: | - brew install qt ninja cmake - - - name: Install dependencies on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: | - choco install qt --version=6.5.3 -y - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - $QtPath = (Get-ChildItem -Directory 'C:\Qt\6.5.3' | Where-Object { $_.Name -match 'mingw.*' }).FullName - if (-not $QtPath) { - Write-Error "Could not find a valid Qt installation for MinGW." - exit 1 - } - Write-Host "Using Qt path: $QtPath" - $env:CMAKE_PREFIX_PATH = "$QtPath\lib\cmake" - shell: pwsh - - - name: Configure CMake on Ubuntu/macOS - if: ${{ matrix.os != 'windows-latest' }} - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - - - name: Configure CMake on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" -S . - shell: pwsh - - - name: Build application - run: cmake --build build --parallel - - - name: Package application on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} - run: tar -czf Notepad--_linux.tar.gz -C build . - - - name: Package application on macOS - if: ${{ matrix.os == 'macos-latest' }} - run: hdiutil create -volname Notepad-- -srcfolder build -ov -format UDZO Notepad--_macos.dmg - - - name: Package application on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: Compress-Archive -Path build\* -DestinationPath Notepad--_windows.zip - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.os }}-artifact - path: | - Notepad--_linux.tar.gz - Notepad--_macos.dmg - Notepad--_windows.zip - + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up dependencies on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + sudo apt-get update + sudo apt-get install -y software-properties-common + sudo add-apt-repository ppa:qt/qt6 -y + sudo apt-get update + sudo apt-get install -y \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \ + qt6-declarative-dev qt6-websockets-dev \ + libgl-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev \ + libxext-dev libxfixes-dev libxcb-glx0-dev ninja-build cmake + + - name: Set up dependencies on macOS + if: ${{ matrix.os == 'macos-latest' }} + run: | + brew update + brew install qt cmake ninja + + - name: Set up dependencies on Windows + if: ${{ matrix.os == 'windows-latest' }} + run: | + choco install cmake ninja qt --no-progress -y + echo "::add-path::C:\\Qt\\6.5.3\\msvc2019_64\\bin" + + - name: Configure CMake + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + + - name: Build with Ninja + run: cmake --build build + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + + - name: Package application + run: | + mkdir release + if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + tar -czvf release/application.tar.gz -C build . + elif [ "${{ matrix.os }}" == "macos-latest" ]; then + hdiutil create release/application.dmg -srcfolder build + elif [ "${{ matrix.os }}" == "windows-latest" ]; then + 7z a release/application.zip build\* + fi + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: application-${{ matrix.os }} + path: release/ + release: needs: build runs-on: ubuntu-latest - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - path: ./artifacts - - - name: Create release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.run_id }} - release_name: Release ${{ github.run_id }} - draft: false - prerelease: false - - - name: Upload Linux release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./artifacts/Notepad--_linux.tar.gz - asset_name: Notepad--_linux.tar.gz - content_type: application/gzip - - - name: Upload macOS release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./artifacts/Notepad--_macos.dmg - asset_name: Notepad--_macos.dmg - content_type: application/octet-stream - - - name: Upload Windows release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./artifacts/Notepad--_windows.zip - asset_name: Notepad--_windows.zip - content_type: application/zip + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: application-ubuntu-latest + path: artifacts/ + - name: Create GitHub release + uses: ncipollo/release-action@v1 + with: + artifacts: | + artifacts/application-ubuntu-latest.tar.gz + artifacts/application-macos-latest.dmg + artifacts/application-windows-latest.zip + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.run_id }} + release_name: Release ${{ github.run_id }} + draft: false From 9bca0a47f68066ef6e7dbdc0da077569a376604b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 17:58:06 +0330 Subject: [PATCH 024/114] release #19 --- .github/workflows/cmake-multi-platform.yml | 128 ++++++++++----------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index cc212de..17cb62e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -17,78 +17,78 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - - name: Set up dependencies on Ubuntu - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - sudo apt-get update - sudo apt-get install -y software-properties-common - sudo add-apt-repository ppa:qt/qt6 -y - sudo apt-get update - sudo apt-get install -y \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \ - qt6-declarative-dev qt6-websockets-dev \ - libgl-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev \ - libxext-dev libxfixes-dev libxcb-glx0-dev ninja-build cmake + - name: Set up dependencies on Ubuntu + if: ${{ runner.os == 'Linux' }} + run: | + sudo apt-get update + sudo apt-get install -y software-properties-common + sudo add-apt-repository ppa:qt/qt6 -y + sudo apt-get update + sudo apt-get install -y \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \ + qt6-declarative-dev qt6-websockets-dev \ + libgl-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev \ + libxext-dev libxfixes-dev libxcb-glx0-dev ninja-build cmake - - name: Set up dependencies on macOS - if: ${{ matrix.os == 'macos-latest' }} - run: | - brew update - brew install qt cmake ninja + - name: Set up dependencies on macOS + if: ${{ runner.os == 'macOS' }} + run: | + brew update + brew install qt cmake ninja - - name: Set up dependencies on Windows - if: ${{ matrix.os == 'windows-latest' }} - run: | - choco install cmake ninja qt --no-progress -y - echo "::add-path::C:\\Qt\\6.5.3\\msvc2019_64\\bin" + - name: Set up dependencies on Windows + if: ${{ runner.os == 'Windows' }} + run: | + choco install cmake ninja qt --no-progress -y + echo "::add-path::C:\\Qt\\6.5.3\\msvc2019_64\\bin" - - name: Configure CMake - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + - name: Configure CMake + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - - name: Build with Ninja - run: cmake --build build - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + - name: Build with Ninja + run: cmake --build build + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} - - name: Package application - run: | - mkdir release - if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then - tar -czvf release/application.tar.gz -C build . - elif [ "${{ matrix.os }}" == "macos-latest" ]; then - hdiutil create release/application.dmg -srcfolder build - elif [ "${{ matrix.os }}" == "windows-latest" ]; then - 7z a release/application.zip build\* - fi - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + - name: Package application + run: | + mkdir release + if [ "${{ runner.os }}" == "Linux" ]; then + tar -czvf release/application.tar.gz -C build . + elif [ "${{ runner.os }}" == "macOS" ]; then + hdiutil create release/application.dmg -srcfolder build + elif [ "${{ runner.os }}" == "Windows" ]; then + 7z a release/application.zip build\* + fi + shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: application-${{ runner.os }} + path: release/ - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: application-${{ matrix.os }} - path: release/ - release: needs: build runs-on: ubuntu-latest steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: application-ubuntu-latest - path: artifacts/ - - name: Create GitHub release - uses: ncipollo/release-action@v1 - with: - artifacts: | - artifacts/application-ubuntu-latest.tar.gz - artifacts/application-macos-latest.dmg - artifacts/application-windows-latest.zip - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.run_id }} - release_name: Release ${{ github.run_id }} - draft: false + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: application-${{ runner.os }} + path: artifacts/ + - name: Create GitHub release + uses: ncipollo/release-action@v1 + with: + artifacts: | + artifacts/application-Linux.tar.gz + artifacts/application-macOS.dmg + artifacts/application-Windows.zip + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.run_id }} + release_name: Release ${{ github.run_id }} + draft: false From 008539be4d7dc14dfca053e6f273a05d9cc8c0eb Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:03:19 +0330 Subject: [PATCH 025/114] release #20 --- .github/workflows/cmake-multi-platform.yml | 158 ++++++++++++--------- 1 file changed, 90 insertions(+), 68 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 17cb62e..b7cb03e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -10,85 +10,107 @@ on: - main jobs: - build: + build-and-release: runs-on: ${{ matrix.os }} + strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + include: + - os: ubuntu-latest + artifact_extension: tar.gz + - os: macos-latest + artifact_extension: zip + - os: windows-latest + artifact_extension: zip steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 - - name: Set up dependencies on Ubuntu - if: ${{ runner.os == 'Linux' }} - run: | - sudo apt-get update - sudo apt-get install -y software-properties-common - sudo add-apt-repository ppa:qt/qt6 -y - sudo apt-get update - sudo apt-get install -y \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \ - qt6-declarative-dev qt6-websockets-dev \ - libgl-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev \ - libxext-dev libxfixes-dev libxcb-glx0-dev ninja-build cmake + # Install dependencies based on OS + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y ninja-build \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Set up dependencies on macOS - if: ${{ runner.os == 'macOS' }} - run: | - brew update - brew install qt cmake ninja + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew update + brew install ninja qt - - name: Set up dependencies on Windows - if: ${{ runner.os == 'Windows' }} - run: | - choco install cmake ninja qt --no-progress -y - echo "::add-path::C:\\Qt\\6.5.3\\msvc2019_64\\bin" + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install qt --version=6.5.3 -y + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - - name: Configure CMake - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + # Configure CMake + - name: Configure CMake (Ubuntu and macOS) + if: matrix.os != 'windows-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + shell: bash - - name: Build with Ninja - run: cmake --build build - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake -B "${{ github.workspace }}\build" ` + -DCMAKE_BUILD_TYPE=Release ` + -G "Ninja" ` + -S "${{ github.workspace }}" + shell: pwsh - - name: Package application - run: | - mkdir release - if [ "${{ runner.os }}" == "Linux" ]; then - tar -czvf release/application.tar.gz -C build . - elif [ "${{ runner.os }}" == "macOS" ]; then - hdiutil create release/application.dmg -srcfolder build - elif [ "${{ runner.os }}" == "Windows" ]; then - 7z a release/application.zip build\* - fi - shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }} + # Build Application + - name: Build application (Ubuntu and macOS) + if: matrix.os != 'windows-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + shell: bash - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: application-${{ runner.os }} - path: release/ + - name: Build application (Windows) + if: matrix.os == 'windows-latest' + run: cmake --build "${{ github.workspace }}\build" --config Release + shell: pwsh - release: - needs: build - runs-on: ubuntu-latest - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: application-${{ runner.os }} - path: artifacts/ - - name: Create GitHub release - uses: ncipollo/release-action@v1 - with: - artifacts: | - artifacts/application-Linux.tar.gz - artifacts/application-macOS.dmg - artifacts/application-Windows.zip - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.run_id }} - release_name: Release ${{ github.run_id }} - draft: false + # Package Application + - name: Package application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf application.tar.gz ./* + mv application.tar.gz $BUILD_DIR/ + + - name: Package application (macOS) + if: matrix.os == 'macos-latest' + run: | + cd "${{ github.workspace }}/build" + hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg + zip application.zip application.dmg + + - name: Package application (Windows) + if: matrix.os == 'windows-latest' + run: | + cd "${{ github.workspace }}\build" + Compress-Archive -Path . -DestinationPath application.zip + shell: pwsh + + # Upload Artifacts + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: application-${{ matrix.os }} + path: | + ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} From 54fc384cda2b822f1140e085e60905e1a4be27bb Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:09:14 +0330 Subject: [PATCH 026/114] release #21 --- .github/workflows/cmake-multi-platform.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index b7cb03e..793eed9 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -64,8 +64,10 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | + $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" cmake -B "${{ github.workspace }}\build" ` -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` -G "Ninja" ` -S "${{ github.workspace }}" shell: pwsh From fcc24b7c50cf0d3324f25570bf366ba113968a9d Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:15:17 +0330 Subject: [PATCH 027/114] release #22 --- .github/workflows/cmake-multi-platform.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 793eed9..41512c5 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Install dependencies based on OS + # Install dependencies - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -51,6 +51,13 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + # Set up MSVC environment on Windows + - name: Set up MSVC environment + if: matrix.os == 'windows-latest' + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" + # Configure CMake - name: Configure CMake (Ubuntu and macOS) if: matrix.os != 'windows-latest' @@ -64,10 +71,9 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" cmake -B "${{ github.workspace }}\build" ` -DCMAKE_BUILD_TYPE=Release ` - -DCMAKE_PREFIX_PATH="$env:CMAKE_PREFIX_PATH" ` + -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` -G "Ninja" ` -S "${{ github.workspace }}" shell: pwsh From 8c64d54f72b58f212e493700a54ecf29f9b97f74 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:20:14 +0330 Subject: [PATCH 028/114] release #23 --- .github/workflows/cmake-multi-platform.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 41512c5..8620441 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,13 +51,6 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - # Set up MSVC environment on Windows - - name: Set up MSVC environment - if: matrix.os == 'windows-latest' - run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - $env:CMAKE_PREFIX_PATH = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" - # Configure CMake - name: Configure CMake (Ubuntu and macOS) if: matrix.os != 'windows-latest' @@ -71,6 +64,7 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | + cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ` cmake -B "${{ github.workspace }}\build" ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` From 69280a8e99b63c964cfed4fd20e68cf646a86aaa Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:25:55 +0330 Subject: [PATCH 029/114] release #24 --- .github/workflows/cmake-multi-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8620441..65c51f0 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -64,12 +64,12 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ` + cmd /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ` cmake -B "${{ github.workspace }}\build" ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` -G "Ninja" ` - -S "${{ github.workspace }}" + -S "${{ github.workspace }}"" shell: pwsh # Build Application From 7fd755cf52ed27151d893a042fe63d5e9d23669f Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:30:58 +0330 Subject: [PATCH 030/114] release #25 --- .github/workflows/cmake-multi-platform.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 65c51f0..3c55481 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -64,13 +64,13 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmd /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ` - cmake -B "${{ github.workspace }}\build" ` - -DCMAKE_BUILD_TYPE=Release ` - -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` - -G "Ninja" ` - -S "${{ github.workspace }}"" - shell: pwsh + cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat && ^ + cmake -B D:\a\Notepad--\Notepad--\build ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH=C:\Qt\6.5.3\msvc2019_64\lib\cmake ^ + -G Ninja ^ + -S D:\a\Notepad--\Notepad--" + shell: cmd # Build Application - name: Build application (Ubuntu and macOS) @@ -80,8 +80,8 @@ jobs: - name: Build application (Windows) if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\build" --config Release - shell: pwsh + run: cmake --build "D:\a\Notepad--\Notepad--\build" --config Release + shell: cmd # Package Application - name: Package application (Ubuntu) @@ -105,7 +105,7 @@ jobs: - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd "${{ github.workspace }}\build" + cd "D:\a\Notepad--\Notepad--\build" Compress-Archive -Path . -DestinationPath application.zip shell: pwsh From 583ed1a84940477ae0b081ee15e5dd57cb06161b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 18:37:49 +0330 Subject: [PATCH 031/114] release #26 --- .github/workflows/cmake-multi-platform.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 3c55481..40b3a5b 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -64,12 +64,12 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat && ^ + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ cmake -B D:\a\Notepad--\Notepad--\build ^ -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH=C:\Qt\6.5.3\msvc2019_64\lib\cmake ^ + -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ -G Ninja ^ - -S D:\a\Notepad--\Notepad--" + -S D:\a\Notepad--\Notepad-- shell: cmd # Build Application From 2ef39ae1290e5646116f466ea4a79982a55593d7 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 19:26:58 +0330 Subject: [PATCH 032/114] release #27 --- .github/workflows/cmake-multi-platform.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 40b3a5b..8ab936c 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,6 +51,19 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + # Debug and verify environment for Windows + - name: Debug environment paths (Windows) + if: matrix.os == 'windows-latest' + run: | + echo "Checking Visual Studio paths..." + if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( + echo "Found vcvars64.bat" + ) else ( + echo "vcvars64.bat not found" + exit 1 + ) + shell: cmd + # Configure CMake - name: Configure CMake (Ubuntu and macOS) if: matrix.os != 'windows-latest' From bd8cc62e3e47b49c0de09c4f83d84d263ebca7cb Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 19:31:02 +0330 Subject: [PATCH 033/114] release #27 --- .github/workflows/cmake-multi-platform.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8ab936c..044be6b 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -2,12 +2,9 @@ name: Build and Release on: push: - branches: - - main - - dev + branches: [main, dev] pull_request: - branches: - - main + branches: [main] jobs: build-and-release: From 2290748d55cd9297edb2aedd0423f73d79d16d13 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 19:35:56 +0330 Subject: [PATCH 034/114] release #28 --- .github/workflows/cmake-multi-platform.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 044be6b..7a55a13 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -2,9 +2,12 @@ name: Build and Release on: push: - branches: [main, dev] + branches: + - main + - dev pull_request: - branches: [main] + branches: + - main jobs: build-and-release: @@ -44,16 +47,18 @@ jobs: - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --quiet --norestart' choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - # Debug and verify environment for Windows - - name: Debug environment paths (Windows) + # Debug and verify Visual Studio paths + - name: Debug Visual Studio paths if: matrix.os == 'windows-latest' run: | echo "Checking Visual Studio paths..." - if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( + if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( echo "Found vcvars64.bat" ) else ( echo "vcvars64.bat not found" @@ -74,12 +79,12 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ cmake -B D:\a\Notepad--\Notepad--\build ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ -G Ninja ^ - -S D:\a\Notepad--\Notepad-- + -S D:\a\Notepad--\Notepad-- shell: cmd # Build Application From d75eb2aaaa06ee759ef1c5be549d5ac5368e483b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 19:46:39 +0330 Subject: [PATCH 035/114] release #29 --- .github/workflows/cmake-multi-platform.yml | 35 ++++++++++------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 7a55a13..228d341 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,41 +29,38 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Install dependencies + # Install dependencies based on OS - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync cmake - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | - brew update - brew install ninja qt + brew install ninja qt cmake - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --quiet --norestart' choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - # Debug and verify Visual Studio paths + # Debug Visual Studio paths on Windows - name: Debug Visual Studio paths if: matrix.os == 'windows-latest' run: | - echo "Checking Visual Studio paths..." - if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( - echo "Found vcvars64.bat" - ) else ( - echo "vcvars64.bat not found" - exit 1 - ) + echo "Checking for Visual Studio Build Tools installation..." + dir "C:\Program Files (x86)\Microsoft Visual Studio" /b + dir "C:\Program Files\Microsoft Visual Studio" /b + dir "C:\Program Files (x86)\Microsoft Visual Studio\*\*\BuildTools\VC\Auxiliary\Build\vcvars64.bat" /b + dir "C:\Program Files\Microsoft Visual Studio\*\*\BuildTools\VC\Auxiliary\Build\vcvars64.bat" /b shell: cmd # Configure CMake @@ -95,7 +92,7 @@ jobs: - name: Build application (Windows) if: matrix.os == 'windows-latest' - run: cmake --build "D:\a\Notepad--\Notepad--\build" --config Release + run: cmake --build D:\a\Notepad--\Notepad--\build --config Release shell: cmd # Package Application @@ -108,21 +105,18 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf application.tar.gz ./* - mv application.tar.gz $BUILD_DIR/ - - name: Package application (macOS) if: matrix.os == 'macos-latest' run: | cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd "D:\a\Notepad--\Notepad--\build" + cd D:\a\Notepad--\Notepad--\build Compress-Archive -Path . -DestinationPath application.zip - shell: pwsh + shell: cmd # Upload Artifacts - name: Upload artifact @@ -131,3 +125,4 @@ jobs: name: application-${{ matrix.os }} path: | ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} + /tmp/build_copy/application.tar.gz From d91aaf51c2cb05cf463b1212251fa9825f105cb6 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 19:56:29 +0330 Subject: [PATCH 036/114] release #30 --- .github/workflows/cmake-multi-platform.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 228d341..a68980d 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -59,8 +59,16 @@ jobs: echo "Checking for Visual Studio Build Tools installation..." dir "C:\Program Files (x86)\Microsoft Visual Studio" /b dir "C:\Program Files\Microsoft Visual Studio" /b - dir "C:\Program Files (x86)\Microsoft Visual Studio\*\*\BuildTools\VC\Auxiliary\Build\vcvars64.bat" /b - dir "C:\Program Files\Microsoft Visual Studio\*\*\BuildTools\VC\Auxiliary\Build\vcvars64.bat" /b + for /d %%G in ("C:\Program Files (x86)\Microsoft Visual Studio\*") do ( + if exist "%%G\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( + echo "Found vcvars64.bat in %%G" + ) + ) + for /d %%G in ("C:\Program Files\Microsoft Visual Studio\*") do ( + if exist "%%G\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( + echo "Found vcvars64.bat in %%G" + ) + ) shell: cmd # Configure CMake From 6ff27d26c8b9fea8b9d623646a373c1a1f3f7515 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 20:06:51 +0330 Subject: [PATCH 037/114] release #31 --- .github/workflows/cmake-multi-platform.yml | 113 +++++++++++---------- 1 file changed, 61 insertions(+), 52 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a68980d..141a3d7 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Install dependencies based on OS + # Ubuntu Section - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -38,48 +38,77 @@ jobs: qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync cmake + - name: Configure CMake (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + shell: bash + + - name: Build application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cmake --build "${{ github.workspace }}/build" --config Release + shell: bash + + - name: Package application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf application.tar.gz ./* + + # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew install ninja qt cmake - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' run: | - choco install qt --version=6.5.3 -y - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + shell: bash + + - name: Build application (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake --build "${{ github.workspace }}/build" --config Release + shell: bash - # Debug Visual Studio paths on Windows - - name: Debug Visual Studio paths + - name: Package application (macOS) + if: matrix.os == 'macos-latest' + run: | + cd "${{ github.workspace }}/build" + hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg + zip application.zip application.dmg + + # Windows Section + - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' run: | - echo "Checking for Visual Studio Build Tools installation..." + echo "Checking for Visual Studio Build Tools..." dir "C:\Program Files (x86)\Microsoft Visual Studio" /b dir "C:\Program Files\Microsoft Visual Studio" /b - for /d %%G in ("C:\Program Files (x86)\Microsoft Visual Studio\*") do ( - if exist "%%G\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( - echo "Found vcvars64.bat in %%G" - ) - ) - for /d %%G in ("C:\Program Files\Microsoft Visual Studio\*") do ( - if exist "%%G\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( - echo "Found vcvars64.bat in %%G" - ) - ) + dir "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build" /b || exit 1 shell: cmd - # Configure CMake - - name: Configure CMake (Ubuntu and macOS) - if: matrix.os != 'windows-latest' + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - shell: bash + choco install qt --version=6.5.3 -y + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' @@ -92,33 +121,13 @@ jobs: -S D:\a\Notepad--\Notepad-- shell: cmd - # Build Application - - name: Build application (Ubuntu and macOS) - if: matrix.os != 'windows-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - shell: bash - - name: Build application (Windows) if: matrix.os == 'windows-latest' - run: cmake --build D:\a\Notepad--\Notepad--\build --config Release + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + cmake --build D:\a\Notepad--\Notepad--\build --config Release shell: cmd - # Package Application - - name: Package application (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf application.tar.gz ./* - - name: Package application (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg - zip application.zip application.dmg - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | From 812a531eea4154128db1f9df3485ca0b9871a29f Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 20:09:30 +0330 Subject: [PATCH 038/114] release #32 --- .github/workflows/cmake-multi-platform.yml | 73 ++-------------------- 1 file changed, 6 insertions(+), 67 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 141a3d7..0e15510 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,77 +29,17 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Ubuntu Section - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync cmake - - - name: Configure CMake (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - shell: bash - - - name: Build application (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - cmake --build "${{ github.workspace }}/build" --config Release - shell: bash - - - name: Package application (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf application.tar.gz ./* - - # macOS Section - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt cmake - - - name: Configure CMake (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - shell: bash - - - name: Build application (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake --build "${{ github.workspace }}/build" --config Release - shell: bash - - - name: Package application (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg - zip application.zip application.dmg - # Windows Section - - name: Verify Visual Studio Installation + - name: Check Visual Studio Build Tools Path if: matrix.os == 'windows-latest' run: | echo "Checking for Visual Studio Build Tools..." dir "C:\Program Files (x86)\Microsoft Visual Studio" /b dir "C:\Program Files\Microsoft Visual Studio" /b - dir "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build" /b || exit 1 - shell: cmd + if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( + echo "Visual Studio Build Tools not found in default path." + exit 1 + ) - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' @@ -141,5 +81,4 @@ jobs: with: name: application-${{ matrix.os }} path: | - ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - /tmp/build_copy/application.tar.gz + D:\a\Notepad--\Notepad--\build\application.${{ matrix.artifact_extension }} From af65d0501a4b9681aa447191348e348b7fa60f9c Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 20:11:58 +0330 Subject: [PATCH 039/114] release #33 --- .github/workflows/cmake-multi-platform.yml | 73 +++++++++++++++++----- 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 0e15510..d3acaf5 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -33,13 +33,15 @@ jobs: - name: Check Visual Studio Build Tools Path if: matrix.os == 'windows-latest' run: | - echo "Checking for Visual Studio Build Tools..." - dir "C:\Program Files (x86)\Microsoft Visual Studio" /b - dir "C:\Program Files\Microsoft Visual Studio" /b - if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" ( - echo "Visual Studio Build Tools not found in default path." - exit 1 - ) + Write-Host "Checking for Visual Studio Build Tools..." + $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + if (!(Test-Path $vcvarsPath)) { + Write-Host "Visual Studio Build Tools not found at $vcvarsPath" + exit 1 + } else { + Write-Host "Found Visual Studio Build Tools at $vcvarsPath" + } + shell: pwsh - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' @@ -53,27 +55,63 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake -B D:\a\Notepad--\Notepad--\build ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ - -G Ninja ^ + & "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + cmake -B D:\a\Notepad--\Notepad--\build ` + -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` + -G Ninja ` -S D:\a\Notepad--\Notepad-- - shell: cmd + shell: pwsh - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + & "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" cmake --build D:\a\Notepad--\Notepad--\build --config Release - shell: cmd + shell: pwsh - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | cd D:\a\Notepad--\Notepad--\build Compress-Archive -Path . -DestinationPath application.zip - shell: cmd + shell: pwsh + + # Other Platforms Sections + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y ninja-build \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + - name: Configure CMake (Ubuntu and macOS) + if: matrix.os != 'windows-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + shell: bash + - name: Build application (Ubuntu and macOS) + if: matrix.os != 'windows-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + shell: bash + - name: Package application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf application.tar.gz ./* + - name: Package application (macOS) + if: matrix.os == 'macos-latest' + run: | + cd "${{ github.workspace }}/build" + hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg + zip application.zip application.dmg # Upload Artifacts - name: Upload artifact @@ -81,4 +119,5 @@ jobs: with: name: application-${{ matrix.os }} path: | - D:\a\Notepad--\Notepad--\build\application.${{ matrix.artifact_extension }} + ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} + /tmp/build_copy/application.tar.gz From 64d047165b5f7b814e93ab2bc5169435864d5344 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 20:17:12 +0330 Subject: [PATCH 040/114] release #34 --- .github/workflows/cmake-multi-platform.yml | 120 +++++++++++---------- 1 file changed, 65 insertions(+), 55 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index d3acaf5..6e42dc0 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -29,55 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Windows Section - - name: Check Visual Studio Build Tools Path - if: matrix.os == 'windows-latest' - run: | - Write-Host "Checking for Visual Studio Build Tools..." - $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - if (!(Test-Path $vcvarsPath)) { - Write-Host "Visual Studio Build Tools not found at $vcvarsPath" - exit 1 - } else { - Write-Host "Found Visual Studio Build Tools at $vcvarsPath" - } - shell: pwsh - - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install qt --version=6.5.3 -y - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - & "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - cmake -B D:\a\Notepad--\Notepad--\build ` - -DCMAKE_BUILD_TYPE=Release ` - -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ` - -G Ninja ` - -S D:\a\Notepad--\Notepad-- - shell: pwsh - - - name: Build application (Windows) - if: matrix.os == 'windows-latest' - run: | - & "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - cmake --build D:\a\Notepad--\Notepad--\build --config Release - shell: pwsh - - - name: Package application (Windows) - if: matrix.os == 'windows-latest' - run: | - cd D:\a\Notepad--\Notepad--\build - Compress-Archive -Path . -DestinationPath application.zip - shell: pwsh - - # Other Platforms Sections + # Ubuntu Section - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -85,18 +37,16 @@ jobs: sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Configure CMake (Ubuntu and macOS) - if: matrix.os != 'windows-latest' + - name: Configure CMake (Ubuntu) + if: matrix.os == 'ubuntu-latest' run: | cmake -B "${{ github.workspace }}/build" \ -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - shell: bash - - name: Build application (Ubuntu and macOS) - if: matrix.os != 'windows-latest' + - name: Build application (Ubuntu) + if: matrix.os == 'ubuntu-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - shell: bash - name: Package application (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -106,6 +56,22 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf application.tar.gz ./* + + # macOS Section + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew install ninja qt + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build application (macOS) + if: matrix.os == 'macos-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release - name: Package application (macOS) if: matrix.os == 'macos-latest' run: | @@ -113,6 +79,50 @@ jobs: hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg + # Windows Section + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + choco install qt --version=6.5.3 -y + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + shell: cmd + - name: Check Visual Studio Build Tools Path + if: matrix.os == 'windows-latest' + run: | + $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + if (!(Test-Path $vcvarsPath)) { + Write-Host "Visual Studio Build Tools not found at $vcvarsPath" + exit 1 + } else { + Write-Host "Found Visual Studio Build Tools at $vcvarsPath" + } + shell: pwsh + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + cmake -B D:\a\Notepad--\Notepad--\build ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ + -G Ninja ^ + -S D:\a\Notepad--\Notepad-- + shell: cmd + - name: Build application (Windows) + if: matrix.os == 'windows-latest' + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + cmake --build D:\a\Notepad--\Notepad--\build --config Release + shell: cmd + - name: Package application (Windows) + if: matrix.os == 'windows-latest' + run: | + cd D:\a\Notepad--\Notepad--\build + Compress-Archive -Path . -DestinationPath application.zip + shell: cmd + # Upload Artifacts - name: Upload artifact uses: actions/upload-artifact@v3 From b8e8976007add81e576ce4d55deabc43e3c0b48b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Thu, 28 Nov 2024 23:59:39 +0330 Subject: [PATCH 041/114] Indentation Implemented --- .github/workflows/cmake-multi-platform.yml | 133 --------------------- CHANGELOG.md | 4 + CMakeLists.txt.user | 26 ++-- src/codeeditor.cpp | 45 ++++++- src/codeeditor.h | 3 + src/indentation/indentationdialog.cpp | 7 +- src/systemfind/richtextdelegate.cpp | 1 + 7 files changed, 67 insertions(+), 152 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6e42dc0..e69de29 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,133 +0,0 @@ -name: Build and Release - -on: - push: - branches: - - main - - dev - pull_request: - branches: - - main - -jobs: - build-and-release: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - include: - - os: ubuntu-latest - artifact_extension: tar.gz - - os: macos-latest - artifact_extension: zip - - os: windows-latest - artifact_extension: zip - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Ubuntu Section - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Configure CMake (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - - name: Build application (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package application (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf application.tar.gz ./* - - # macOS Section - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt - - name: Configure CMake (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - - name: Build application (macOS) - if: matrix.os == 'macos-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package application (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg - zip application.zip application.dmg - - # Windows Section - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - choco install qt --version=6.5.3 -y - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - shell: cmd - - name: Check Visual Studio Build Tools Path - if: matrix.os == 'windows-latest' - run: | - $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - if (!(Test-Path $vcvarsPath)) { - Write-Host "Visual Studio Build Tools not found at $vcvarsPath" - exit 1 - } else { - Write-Host "Found Visual Studio Build Tools at $vcvarsPath" - } - shell: pwsh - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake -B D:\a\Notepad--\Notepad--\build ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ - -G Ninja ^ - -S D:\a\Notepad--\Notepad-- - shell: cmd - - name: Build application (Windows) - if: matrix.os == 'windows-latest' - run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake --build D:\a\Notepad--\Notepad--\build --config Release - shell: cmd - - name: Package application (Windows) - if: matrix.os == 'windows-latest' - run: | - cd D:\a\Notepad--\Notepad--\build - Compress-Archive -Path . -DestinationPath application.zip - shell: cmd - - # Upload Artifacts - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: application-${{ matrix.os }} - path: | - ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - /tmp/build_copy/application.tar.gz diff --git a/CHANGELOG.md b/CHANGELOG.md index aac2a34..a95078e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 0.0.57 + +- Indentation Implemented + ## 0.0.56 - Search & Replace Menu -> Fixed double click on results diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index ade71a3..744e487 100755 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,14 +102,14 @@ 2 false - -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DCMAKE_BUILD_TYPE:STRING=Debug /data/Code/Qt/Notepad-- 0 /data/Code/Qt/Notepad--/build/Desktop-Debug @@ -160,14 +160,14 @@ 2 false - -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DCMAKE_BUILD_TYPE:STRING=Release /data/Code/Qt/Notepad-- /data/Code/Qt/Notepad--/build/Desktop-Release diff --git a/src/codeeditor.cpp b/src/codeeditor.cpp index 3c067ff..4c8017d 100755 --- a/src/codeeditor.cpp +++ b/src/codeeditor.cpp @@ -2,7 +2,8 @@ #include #include #include -#include "helpers.h" +#include +#include "settings.h" CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent), lineNumberArea(new LineNumberArea(this)) { @@ -26,6 +27,9 @@ CodeEditor::CodeEditor(QWidget *parent) updateLineNumberAreaWidth(0); highlightCurrentLine(); + + m_useTabs = Settings::instance()->loadSetting("Indentation", "Option", "Tabs") == "Tabs"; + m_indentationWidth = Settings::instance()->loadSetting("Indentation", "Size", "1").toInt(); } int CodeEditor::lineNumberAreaWidth() { @@ -154,8 +158,11 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event) { } void CodeEditor::applyIndentation(bool useTabs, int indentationWidth) { + m_useTabs = useTabs; + m_indentationWidth = indentationWidth; QTextCursor cursor = textCursor(); - QString indentation = useTabs ? "\t" : QString(indentationWidth, ' '); + QString indentation = useTabs ? QString(indentationWidth, '\t') + : QString(indentationWidth, ' '); cursor.insertText(indentation); } @@ -213,3 +220,37 @@ void CodeEditor::gotoLineInEditor(int lineNumber) { } } +void CodeEditor::keyPressEvent(QKeyEvent *event) { + if (event->key() == Qt::Key_Tab) { + // User pressed Tab + QTextCursor cursor = textCursor(); + + // Determine the indentation string (tabs or spaces) + QString indentation = m_useTabs ? QString(m_indentationWidth, '\t') + : QString(m_indentationWidth, ' '); + + // Insert the indentation + cursor.insertText(indentation); + + // Prevent further handling of the Tab key + return; + } else if (event->key() == Qt::Key_Backtab) { + // User pressed Shift+Tab (outdent logic) + QTextCursor cursor = textCursor(); + cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor); + + QString blockText = cursor.selectedText(); + if (m_useTabs && blockText.startsWith(QString(m_indentationWidth, '\t'))) { + cursor.removeSelectedText(); + } else if (!m_useTabs && blockText.startsWith(QString(m_indentationWidth, ' '))) { + cursor.removeSelectedText(); + } + + // Prevent further handling of Shift+Tab + return; + } + + // Pass other keys to the default handler + QPlainTextEdit::keyPressEvent(event); +} + diff --git a/src/codeeditor.h b/src/codeeditor.h index 00bc0d2..a5d1789 100755 --- a/src/codeeditor.h +++ b/src/codeeditor.h @@ -27,6 +27,7 @@ class CodeEditor : public QPlainTextEdit { protected: void resizeEvent(QResizeEvent *event) override; + virtual void keyPressEvent(QKeyEvent *event) override; signals: void textChanged(); // FIXME: Remove this line. @@ -38,6 +39,8 @@ private slots: private: QWidget *lineNumberArea; QTabWidget* m_documentsTab; + bool m_useTabs; + int m_indentationWidth; }; class LineNumberArea : public QWidget { diff --git a/src/indentation/indentationdialog.cpp b/src/indentation/indentationdialog.cpp index c622922..cbf2d9c 100644 --- a/src/indentation/indentationdialog.cpp +++ b/src/indentation/indentationdialog.cpp @@ -71,15 +71,14 @@ void IndentationDialog::on_buttonBox_accepted() bool useTabs = ui->tabs->isChecked(); int indentationWidth = ui->number->value(); - auto* settings = Settings::instance(); - settings->saveSetting("Indentation", "Option", useTabs ? "Tabs" : "Spaces"); - settings->saveSetting("Indentation", "Size", indentationWidth); + Settings::instance()->saveSetting("Indentation", "Option", useTabs ? "Tabs" : "Spaces"); + Settings::instance()->saveSetting("Indentation", "Size", indentationWidth); Document* doc = qobject_cast(parent()); if (doc && doc->editor()) { doc->editor()->applyIndentation(useTabs, indentationWidth); } - Helpers::notImplemented(this); + QMessageBox::information(this, "Information", "Restart needed.", QMessageBox::Ok); } diff --git a/src/systemfind/richtextdelegate.cpp b/src/systemfind/richtextdelegate.cpp index 544d02c..b9744f1 100644 --- a/src/systemfind/richtextdelegate.cpp +++ b/src/systemfind/richtextdelegate.cpp @@ -53,6 +53,7 @@ void RichTextDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti } QSize RichTextDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const { + Q_UNUSED(option); QTextDocument doc; QString text = index.data().toString(); From 551cccd4af2c5797452c9eadffacb6088ae59391 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 00:04:09 +0330 Subject: [PATCH 042/114] release #35 --- .github/workflows/cmake-multi-platform.yml | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e69de29..2e8f7f7 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,133 @@ +name: Build and Release + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + +jobs: + build-and-release: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + include: + - os: ubuntu-latest + artifact_extension: tar.gz + - os: macos-latest + artifact_extension: zip + - os: windows-latest + artifact_extension: zip + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # Ubuntu Section + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y ninja-build \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + - name: Configure CMake (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf application.tar.gz ./* + + # macOS Section + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew install ninja qt + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build application (macOS) + if: matrix.os == 'macos-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package application (macOS) + if: matrix.os == 'macos-latest' + run: | + cd "${{ github.workspace }}/build" + hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg + zip application.zip application.dmg + + # Windows Section + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + choco install qt --version=6.5.3 -y + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + shell: cmd + - name: Verify Visual Studio Installation + if: matrix.os == 'windows-latest' + run: | + $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + if (!(Test-Path $vcvarsPath)) { + Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Attempting installation again." + exit 1 + } else { + Write-Output "Found Visual Studio Build Tools at $vcvarsPath" + } + shell: pwsh + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + cmake -B D:\a\Notepad--\Notepad--\build ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ + -G Ninja ^ + -S D:\a\Notepad--\Notepad-- + shell: cmd + - name: Build application (Windows) + if: matrix.os == 'windows-latest' + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ + cmake --build D:\a\Notepad--\Notepad--\build --config Release + shell: cmd + - name: Package application (Windows) + if: matrix.os == 'windows-latest' + run: | + cd D:\a\Notepad--\Notepad--\build + Compress-Archive -Path . -DestinationPath application.zip + shell: cmd + + # Upload Artifacts + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: application-${{ matrix.os }} + path: | + ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} + /tmp/build_copy/application.tar.gz From 3e9fa0e155f75230a17e3bac4bb72a82a4013910 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 00:12:50 +0330 Subject: [PATCH 043/114] release #36 --- .github/workflows/cmake-multi-platform.yml | 59 ++++++++++++---------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2e8f7f7..03193b2 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -37,47 +37,51 @@ jobs: sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + shell: bash + - name: Configure CMake (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + shell: bash + - name: Build application (Ubuntu) if: matrix.os == 'ubuntu-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release + run: cmake --build build --config Release + shell: bash + - name: Package application (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf application.tar.gz ./* + cd build + tar -czvf application.tar.gz . + shell: bash # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew install ninja qt + shell: bash + - name: Configure CMake (macOS) if: matrix.os == 'macos-latest' run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + shell: bash + - name: Build application (macOS) if: matrix.os == 'macos-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release + run: cmake --build build --config Release + shell: bash + - name: Package application (macOS) if: matrix.os == 'macos-latest' run: | - cd "${{ github.workspace }}/build" + cd build hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg + shell: bash # Windows Section - name: Install dependencies (Windows) @@ -89,37 +93,42 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y shell: cmd - - name: Verify Visual Studio Installation + + - name: Verify Visual Studio Build Tools if: matrix.os == 'windows-latest' run: | $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" if (!(Test-Path $vcvarsPath)) { - Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Attempting installation again." + Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Installation failed or incorrect path." + Get-ChildItem -Path "C:\Program Files (x86)\Microsoft Visual Studio" -Recurse -Filter vcvars64.bat exit 1 } else { Write-Output "Found Visual Studio Build Tools at $vcvarsPath" } shell: pwsh + - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake -B D:\a\Notepad--\Notepad--\build ^ + cmake -B build ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ -G Ninja ^ - -S D:\a\Notepad--\Notepad-- + -S . shell: cmd + - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake --build D:\a\Notepad--\Notepad--\build --config Release + cmake --build build --config Release shell: cmd + - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd D:\a\Notepad--\Notepad--\build + cd build Compress-Archive -Path . -DestinationPath application.zip shell: cmd @@ -128,6 +137,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: application-${{ matrix.os }} - path: | - ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - /tmp/build_copy/application.tar.gz + path: build/application.${{ matrix.artifact_extension }} From 32c97da41d035605c72579569872e0308317080a Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 00:17:13 +0330 Subject: [PATCH 044/114] release #37 --- .github/workflows/cmake-multi-platform.yml | 55 ++++++++++------------ 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 03193b2..05a3354 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -37,51 +37,47 @@ jobs: sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - shell: bash - - name: Configure CMake (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: bash - + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" - name: Build application (Ubuntu) if: matrix.os == 'ubuntu-latest' - run: cmake --build build --config Release - shell: bash - + run: cmake --build "${{ github.workspace }}/build" --config Release - name: Package application (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - cd build - tar -czvf application.tar.gz . - shell: bash + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf application.tar.gz ./* # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew install ninja qt - shell: bash - - name: Configure CMake (macOS) if: matrix.os == 'macos-latest' run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - shell: bash - + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" - name: Build application (macOS) if: matrix.os == 'macos-latest' - run: cmake --build build --config Release - shell: bash - + run: cmake --build "${{ github.workspace }}/build" --config Release - name: Package application (macOS) if: matrix.os == 'macos-latest' run: | - cd build + cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - shell: bash # Windows Section - name: Install dependencies (Windows) @@ -94,13 +90,12 @@ jobs: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y shell: cmd - - name: Verify Visual Studio Build Tools + - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' run: | $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" if (!(Test-Path $vcvarsPath)) { - Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Installation failed or incorrect path." - Get-ChildItem -Path "C:\Program Files (x86)\Microsoft Visual Studio" -Recurse -Filter vcvars64.bat + Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Attempting installation again." exit 1 } else { Write-Output "Found Visual Studio Build Tools at $vcvarsPath" @@ -111,24 +106,24 @@ jobs: if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake -B build ^ + cmake -B D:\a\Notepad--\Notepad--\build ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ -G Ninja ^ - -S . + -S D:\a\Notepad--\Notepad-- shell: cmd - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake --build build --config Release + cmake --build D:\a\Notepad--\Notepad--\build --config Release shell: cmd - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd build + cd D:\a\Notepad--\Notepad--\build Compress-Archive -Path . -DestinationPath application.zip shell: cmd @@ -137,4 +132,6 @@ jobs: uses: actions/upload-artifact@v3 with: name: application-${{ matrix.os }} - path: build/application.${{ matrix.artifact_extension }} + path: | + ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} + /tmp/build_copy/application.tar.gz From af9399dd7635fe555e55abe854b15ce60628979d Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 00:26:28 +0330 Subject: [PATCH 045/114] release #38 --- .github/workflows/cmake-multi-platform.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 05a3354..2e8f7f7 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -89,7 +89,6 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y shell: cmd - - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' run: | @@ -101,7 +100,6 @@ jobs: Write-Output "Found Visual Studio Build Tools at $vcvarsPath" } shell: pwsh - - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | @@ -112,14 +110,12 @@ jobs: -G Ninja ^ -S D:\a\Notepad--\Notepad-- shell: cmd - - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ cmake --build D:\a\Notepad--\Notepad--\build --config Release shell: cmd - - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | From c3eafe398cd8a2e1f20decf709e6b8a03964e3fc Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 00:32:28 +0330 Subject: [PATCH 046/114] release #39 --- .github/workflows/cmake-multi-platform.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2e8f7f7..ed6b137 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -94,8 +94,13 @@ jobs: run: | $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" if (!(Test-Path $vcvarsPath)) { - Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Attempting installation again." - exit 1 + Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Reinstalling..." + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + if (!(Test-Path $vcvarsPath)) { + Write-Output "Failed to install Visual Studio Build Tools." + exit 1 + } } else { Write-Output "Found Visual Studio Build Tools at $vcvarsPath" } From 6b8ee12aa11485edcc989bb7132fa570c846408b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 09:30:35 +0330 Subject: [PATCH 047/114] release #40 --- .github/workflows/cmake-multi-platform.yml | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ed6b137..58c3b2d 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -2,12 +2,9 @@ name: Build and Release on: push: - branches: - - main - - dev + branches: [main, dev] pull_request: - branches: - - main + branches: [main] jobs: build-and-release: @@ -56,7 +53,7 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf application.tar.gz ./* - + # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' @@ -78,29 +75,24 @@ jobs: cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - + # Windows Section - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install visualstudio2022buildtools --force -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' shell: cmd - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' run: | $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" if (!(Test-Path $vcvarsPath)) { - Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Reinstalling..." - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - if (!(Test-Path $vcvarsPath)) { - Write-Output "Failed to install Visual Studio Build Tools." - exit 1 - } + Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Installation failed." + exit 1 } else { Write-Output "Found Visual Studio Build Tools at $vcvarsPath" } From 32e6d1b544e2468b2f0fbd417ec9b7f3ed841e04 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 09:37:35 +0330 Subject: [PATCH 048/114] release #41 --- .github/workflows/cmake-multi-platform.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 58c3b2d..3a5c1f1 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -83,8 +83,7 @@ jobs: choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools --force -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + choco install visualstudio2022buildtools -y --params="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" shell: cmd - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' From e76e5599f3217d37fe9caf69fbbe0172510d9685 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 09:51:48 +0330 Subject: [PATCH 049/114] release #42 --- .github/workflows/cmake-multi-platform.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 3a5c1f1..a0ef295 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -85,17 +85,31 @@ jobs: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y choco install visualstudio2022buildtools -y --params="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" shell: cmd + + - name: Verify Qt Installation + if: matrix.os == 'windows-latest' + run: | + $qtPath = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" + if (!(Test-Path $qtPath)) { + Write-Output "Qt not found at $qtPath" + exit 1 + } else { + Write-Output "Qt found at $qtPath" + } + shell: pwsh + - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' run: | $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" if (!(Test-Path $vcvarsPath)) { - Write-Output "Visual Studio Build Tools not found at $vcvarsPath. Installation failed." + Write-Output "Visual Studio Build Tools not found at $vcvarsPath." exit 1 } else { Write-Output "Found Visual Studio Build Tools at $vcvarsPath" } shell: pwsh + - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | @@ -106,12 +120,14 @@ jobs: -G Ninja ^ -S D:\a\Notepad--\Notepad-- shell: cmd + - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ cmake --build D:\a\Notepad--\Notepad--\build --config Release shell: cmd + - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | From 961594815f143fd6db70b3440f08b7e271062839 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 09:59:51 +0330 Subject: [PATCH 050/114] release #43 --- .github/workflows/cmake-multi-platform.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a0ef295..87e6abd 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -83,20 +83,25 @@ jobs: choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --params="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" shell: cmd - name: Verify Qt Installation if: matrix.os == 'windows-latest' run: | - $qtPath = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" - if (!(Test-Path $qtPath)) { - Write-Output "Qt not found at $qtPath" + echo "Checking for Qt installation..." + dir "C:\Qt" /b + if not exist "C:\Qt\6.5.3\msvc2019_64\lib\cmake" ( + echo "Qt installation is missing. Reinstalling..." + choco uninstall qt -y + choco install qt --version=6.5.3 -y + ) + if not exist "C:\Qt\6.5.3\msvc2019_64\lib\cmake" ( + echo "Qt installation failed." exit 1 - } else { - Write-Output "Qt found at $qtPath" - } - shell: pwsh + ) else ( + echo "Qt installation found." + ) + shell: cmd - name: Verify Visual Studio Installation if: matrix.os == 'windows-latest' From a14c5498f7b5a9553f062a623c92c2b6488f77d3 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 10:05:05 +0330 Subject: [PATCH 051/114] release #44 --- .github/workflows/cmake-multi-platform.yml | 36 ++++++---------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 87e6abd..ade7ac3 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -80,38 +80,20 @@ jobs: - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | - choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - shell: cmd - - - name: Verify Qt Installation - if: matrix.os == 'windows-latest' - run: | echo "Checking for Qt installation..." - dir "C:\Qt" /b - if not exist "C:\Qt\6.5.3\msvc2019_64\lib\cmake" ( - echo "Qt installation is missing. Reinstalling..." - choco uninstall qt -y - choco install qt --version=6.5.3 -y - ) - if not exist "C:\Qt\6.5.3\msvc2019_64\lib\cmake" ( - echo "Qt installation failed." - exit 1 - ) else ( - echo "Qt installation found." - ) - shell: cmd - - - name: Verify Visual Studio Installation - if: matrix.os == 'windows-latest' - run: | - $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - if (!(Test-Path $vcvarsPath)) { - Write-Output "Visual Studio Build Tools not found at $vcvarsPath." + $qtPath = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" + if (!(Test-Path $qtPath)) { + Write-Output "Qt not found. Downloading Qt installer..." + Invoke-WebRequest -Uri "https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe" -OutFile "qt-installer.exe" + Start-Process -FilePath "qt-installer.exe" -ArgumentList "--silent", "--platform", "win", "--prefix", "C:\Qt", "--modules", "qt.qt6.653.win64_msvc2019_64" -Wait + } + if (!(Test-Path $qtPath)) { + Write-Output "Qt installation failed." exit 1 } else { - Write-Output "Found Visual Studio Build Tools at $vcvarsPath" + Write-Output "Qt installed successfully at $qtPath" } shell: pwsh From f56f292c21bc0239be4fa9ee9bf625fe48efc49c Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 18:05:59 +0330 Subject: [PATCH 052/114] View -> Show Symbol -> Show Tabs --- .github/workflows/cmake-multi-platform.yml | 35 +++++++------- CHANGELOG.md | 4 ++ CMakeLists.txt.user | 22 ++++----- src/codeeditor.cpp | 54 ++++++++++++++++++++++ src/codeeditor.h | 6 +++ src/mainwindow.cpp | 21 +++++---- src/mainwindow.h | 2 + 7 files changed, 107 insertions(+), 37 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ade7ac3..6e42dc0 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -2,9 +2,12 @@ name: Build and Release on: push: - branches: [main, dev] + branches: + - main + - dev pull_request: - branches: [main] + branches: + - main jobs: build-and-release: @@ -53,7 +56,7 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf application.tar.gz ./* - + # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' @@ -75,28 +78,28 @@ jobs: cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - + # Windows Section - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - echo "Checking for Qt installation..." - $qtPath = "C:\Qt\6.5.3\msvc2019_64\lib\cmake" - if (!(Test-Path $qtPath)) { - Write-Output "Qt not found. Downloading Qt installer..." - Invoke-WebRequest -Uri "https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe" -OutFile "qt-installer.exe" - Start-Process -FilePath "qt-installer.exe" -ArgumentList "--silent", "--platform", "win", "--prefix", "C:\Qt", "--modules", "qt.qt6.653.win64_msvc2019_64" -Wait - } - if (!(Test-Path $qtPath)) { - Write-Output "Qt installation failed." + shell: cmd + - name: Check Visual Studio Build Tools Path + if: matrix.os == 'windows-latest' + run: | + $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + if (!(Test-Path $vcvarsPath)) { + Write-Host "Visual Studio Build Tools not found at $vcvarsPath" exit 1 } else { - Write-Output "Qt installed successfully at $qtPath" + Write-Host "Found Visual Studio Build Tools at $vcvarsPath" } shell: pwsh - - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | @@ -107,14 +110,12 @@ jobs: -G Ninja ^ -S D:\a\Notepad--\Notepad-- shell: cmd - - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ cmake --build D:\a\Notepad--\Notepad--\build --config Release shell: cmd - - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index a95078e..7966de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 0.0.58 + +- View -> Show Symbol -> Show Tabs + ## 0.0.57 - Indentation Implemented diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index 744e487..763a076 100755 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,14 +102,14 @@ 2 false - -DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} + -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} --DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} /data/Code/Qt/Notepad-- 0 /data/Code/Qt/Notepad--/build/Desktop-Debug @@ -160,14 +160,14 @@ 2 false - -DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} + -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} --DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} /data/Code/Qt/Notepad-- /data/Code/Qt/Notepad--/build/Desktop-Release diff --git a/src/codeeditor.cpp b/src/codeeditor.cpp index 4c8017d..de48379 100755 --- a/src/codeeditor.cpp +++ b/src/codeeditor.cpp @@ -30,6 +30,8 @@ CodeEditor::CodeEditor(QWidget *parent) m_useTabs = Settings::instance()->loadSetting("Indentation", "Option", "Tabs") == "Tabs"; m_indentationWidth = Settings::instance()->loadSetting("Indentation", "Size", "1").toInt(); + m_showTabs = Settings::instance()->loadSetting("View", "ShowTabs", "false") == "true"; + m_tabWidth = Settings::instance()->loadSetting("View", "TabWidth", "4").toInt(); } int CodeEditor::lineNumberAreaWidth() { @@ -254,3 +256,55 @@ void CodeEditor::keyPressEvent(QKeyEvent *event) { QPlainTextEdit::keyPressEvent(event); } +void CodeEditor::setShowTabs(bool enabled) { + if (m_showTabs != enabled) { + m_showTabs = enabled; + viewport()->update(); // Redraw the editor to show or hide tab symbols + } +} + +bool CodeEditor::showTabs() const { + return m_showTabs; +} + +void CodeEditor::setTabWidth(int width = 4) { + m_tabWidth = width; + viewport()->update(); // Trigger a repaint to apply the new width +} + +void CodeEditor::paintEvent(QPaintEvent *event) { + QPlainTextEdit::paintEvent(event); + + if (!m_showTabs) return; + + QPainter painter(viewport()); + painter.setPen(Qt::gray); + + QTextBlock block = document()->firstBlock(); + QFontMetrics metrics(font()); + + while (block.isValid()) { + QString text = block.text(); + int blockStart = block.position(); + QTextCursor blockCursor(block); + + // Iterate over characters in the block + for (int i = 0; i < text.length(); ++i) { + if (text[i] == '\t') { + // Move the cursor to the tab character + blockCursor.setPosition(blockStart + i); + + // Get the rectangle of the cursor position + QRect rect = cursorRect(blockCursor); + + // Adjust the position for the tab symbol + //QPoint position(rect.left(), rect.top() + metrics.ascent()); + QPoint position(rect.left() + metrics.ascent(), rect.top() + metrics.ascent()); + + // Draw the tab symbol + painter.drawText(position, "→"); + } + } + block = block.next(); + } +} diff --git a/src/codeeditor.h b/src/codeeditor.h index a5d1789..a8a5360 100755 --- a/src/codeeditor.h +++ b/src/codeeditor.h @@ -24,10 +24,14 @@ class CodeEditor : public QPlainTextEdit { void highlightAllOccurrences(const QString& keyword); void goToLineInText(int lineNumber); void gotoLineInEditor(int lineNumber); + void setShowTabs(bool enabled); + bool showTabs() const; + void setTabWidth(int width); protected: void resizeEvent(QResizeEvent *event) override; virtual void keyPressEvent(QKeyEvent *event) override; + void paintEvent(QPaintEvent *event) override; signals: void textChanged(); // FIXME: Remove this line. @@ -41,6 +45,8 @@ private slots: QTabWidget* m_documentsTab; bool m_useTabs; int m_indentationWidth; + bool m_showTabs = false; + int m_tabWidth; }; class LineNumberArea : public QWidget { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 68de875..44150ce 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -492,15 +492,24 @@ void MainWindow::on_action_Find_triggered() { } } +/* View Menu */ +void MainWindow::on_action_Show_Tabs_triggered(bool checked) +{ + qDebug() << "Show Tabs is: " << checked; + Settings::instance()->saveSetting("View", "ShowTabs", checked ? "true" : "false"); + for (int i = 0; i < ui->documentsTab->count(); ++i) { + Document *doc = qobject_cast(ui->documentsTab->widget(i)); + if (doc) { + doc->editor()->setShowTabs(checked); + } + } +} -/* View Menu */ - - @@ -513,9 +522,6 @@ void MainWindow::on_action_Find_triggered() { /* Helper Functions */ - - - // FIXME: Wrong line selected void MainWindow::openSearchResult(const QString &filePath, int lineNumber) { qInfo() << "openSearchResult called. File Path:" << filePath << ", Line Number:" << lineNumber; @@ -645,6 +651,3 @@ void MainWindow::setActiveDocumentEditorInReplaceDialog() { - - - diff --git a/src/mainwindow.h b/src/mainwindow.h index 2556e63..be9e7f0 100755 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -145,6 +145,8 @@ private slots: void on_actionGo_to_Line_in_Editor_triggered(); + void on_action_Show_Tabs_triggered(bool checked); + private: Ui::MainWindow* ui; FileOperations* fileOperations; From 6558f71ac5243aa848d5476b843b449e7f39e383 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 18:11:29 +0330 Subject: [PATCH 053/114] release #45 --- .github/workflows/cmake-multi-platform.yml | 45 ++++++++++------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6e42dc0..4f1a914 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -2,12 +2,9 @@ name: Build and Release on: push: - branches: - - main - - dev + branches: [main, dev] pull_request: - branches: - - main + branches: [main] jobs: build-and-release: @@ -56,7 +53,7 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf application.tar.gz ./* - + # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' @@ -78,48 +75,48 @@ jobs: cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - + # Windows Section - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - choco install qt --version=6.5.3 -y choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - shell: cmd - - name: Check Visual Studio Build Tools Path + + - name: Verify Qt Installation (Windows) if: matrix.os == 'windows-latest' run: | - $vcvarsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - if (!(Test-Path $vcvarsPath)) { - Write-Host "Visual Studio Build Tools not found at $vcvarsPath" - exit 1 + $qtPath = "C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake" + if (!(Test-Path $qtPath)) { + Write-Error "Qt prebuilt binaries not found at $qtPath. Please ensure they are pre-installed." + exit 1 } else { - Write-Host "Found Visual Studio Build Tools at $vcvarsPath" + Write-Output "Qt installation found at $qtPath" } shell: pwsh + - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake -B D:\a\Notepad--\Notepad--\build ^ + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" && ^ + cmake -B D:\\a\\Notepad--\\Notepad--\\build ^ -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="C:\Qt\6.5.3\msvc2019_64\lib\cmake" ^ + -DCMAKE_PREFIX_PATH="C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake" ^ -G Ninja ^ - -S D:\a\Notepad--\Notepad-- + -S D:\\a\\Notepad--\\Notepad-- shell: cmd + - name: Build application (Windows) if: matrix.os == 'windows-latest' run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && ^ - cmake --build D:\a\Notepad--\Notepad--\build --config Release + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" && ^ + cmake --build D:\\a\\Notepad--\\Notepad--\\build --config Release shell: cmd + - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd D:\a\Notepad--\Notepad--\build + cd D:\\a\\Notepad--\\Notepad--\\build Compress-Archive -Path . -DestinationPath application.zip shell: cmd From 721532d6683e8ea2f4194533ecb9a94639fc7941 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 18:28:12 +0330 Subject: [PATCH 054/114] release #46 --- .github/workflows/cmake-multi-platform.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 4f1a914..f934179 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -83,12 +83,22 @@ jobs: choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + - name: Download and Extract Qt Prebuilt Binaries (Windows) + if: matrix.os == 'windows-latest' + run: | + $qtDownloadUrl = "https://download.qt.io/official_releases/qt/6.5/6.5.3/qt-opensource-windows-x86-6.5.3.exe" + $qtInstaller = "C:\\QtInstaller.exe" + Invoke-WebRequest -Uri $qtDownloadUrl -OutFile $qtInstaller + Start-Process -FilePath $qtInstaller -ArgumentList "--silent", "--platform", "msvc2019_64" -Wait + Remove-Item -Path $qtInstaller + shell: pwsh + - name: Verify Qt Installation (Windows) if: matrix.os == 'windows-latest' run: | $qtPath = "C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake" if (!(Test-Path $qtPath)) { - Write-Error "Qt prebuilt binaries not found at $qtPath. Please ensure they are pre-installed." + Write-Error "Qt prebuilt binaries not found at $qtPath. Installation failed." exit 1 } else { Write-Output "Qt installation found at $qtPath" From 631258b51cf7bd70752e86dfa73ab0bbfff73b61 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 18:57:12 +0330 Subject: [PATCH 055/114] release #47 --- .github/workflows/cmake-multi-platform.yml | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index f934179..b788eb5 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -82,26 +82,34 @@ jobs: run: | choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install perl -y + choco install python -y + choco install git -y - - name: Download and Extract Qt Prebuilt Binaries (Windows) + - name: Download and Build Qt (Windows) if: matrix.os == 'windows-latest' run: | - $qtDownloadUrl = "https://download.qt.io/official_releases/qt/6.5/6.5.3/qt-opensource-windows-x86-6.5.3.exe" - $qtInstaller = "C:\\QtInstaller.exe" - Invoke-WebRequest -Uri $qtDownloadUrl -OutFile $qtInstaller - Start-Process -FilePath $qtInstaller -ArgumentList "--silent", "--platform", "msvc2019_64" -Wait - Remove-Item -Path $qtInstaller + $qtSourceUrl = "https://download.qt.io/official_releases/qt/6.8/6.8.0/single/qt-everywhere-src-6.8.0.zip" + $qtSourceZip = "C:\\qt-src.zip" + $qtSourceDir = "C:\\qt-src" + Invoke-WebRequest -Uri $qtSourceUrl -OutFile $qtSourceZip + Expand-Archive -Path $qtSourceZip -DestinationPath $qtSourceDir + cd $qtSourceDir + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX="C:\\Qt\\6.8.0\\msvc2019_64" -G "Ninja" + cmake --build . --config Release --target install shell: pwsh - name: Verify Qt Installation (Windows) if: matrix.os == 'windows-latest' run: | - $qtPath = "C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake" + $qtPath = "C:\\Qt\\6.8.0\\msvc2019_64\\lib\\cmake" if (!(Test-Path $qtPath)) { - Write-Error "Qt prebuilt binaries not found at $qtPath. Installation failed." + Write-Error "Qt build failed. $qtPath not found." exit 1 } else { - Write-Output "Qt installation found at $qtPath" + Write-Output "Qt successfully built and installed at $qtPath" } shell: pwsh @@ -111,7 +119,7 @@ jobs: call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" && ^ cmake -B D:\\a\\Notepad--\\Notepad--\\build ^ -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="C:\\Qt\\6.5.3\\msvc2019_64\\lib\\cmake" ^ + -DCMAKE_PREFIX_PATH="C:\\Qt\\6.8.0\\msvc2019_64\\lib\\cmake" ^ -G Ninja ^ -S D:\\a\\Notepad--\\Notepad-- shell: cmd From 7e5d134a06935e1937369619987b6029678b24ec Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 21:10:29 +0330 Subject: [PATCH 056/114] release #48 --- .github/workflows/cmake-multi-platform.yml | 50 ++++++---------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index b788eb5..de1f3ce 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -53,7 +53,7 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf application.tar.gz ./* - + # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' @@ -75,7 +75,7 @@ jobs: cd "${{ github.workspace }}/build" hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg zip application.zip application.dmg - + # Windows Section - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' @@ -86,57 +86,33 @@ jobs: choco install python -y choco install git -y - - name: Download and Build Qt (Windows) - if: matrix.os == 'windows-latest' - run: | - $qtSourceUrl = "https://download.qt.io/official_releases/qt/6.8/6.8.0/single/qt-everywhere-src-6.8.0.zip" - $qtSourceZip = "C:\\qt-src.zip" - $qtSourceDir = "C:\\qt-src" - Invoke-WebRequest -Uri $qtSourceUrl -OutFile $qtSourceZip - Expand-Archive -Path $qtSourceZip -DestinationPath $qtSourceDir - cd $qtSourceDir - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX="C:\\Qt\\6.8.0\\msvc2019_64" -G "Ninja" - cmake --build . --config Release --target install - shell: pwsh - - - name: Verify Qt Installation (Windows) + - name: Install Qt (Windows) if: matrix.os == 'windows-latest' - run: | - $qtPath = "C:\\Qt\\6.8.0\\msvc2019_64\\lib\\cmake" - if (!(Test-Path $qtPath)) { - Write-Error "Qt build failed. $qtPath not found." - exit 1 - } else { - Write-Output "Qt successfully built and installed at $qtPath" - } - shell: pwsh + uses: jurplel/install-qt-action@v4 + with: + version: '6.5.3' + host: 'windows' + target: 'desktop' + arch: 'win64_msvc2019_64' - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" && ^ - cmake -B D:\\a\\Notepad--\\Notepad--\\build ^ + call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="C:\\Qt\\6.8.0\\msvc2019_64\\lib\\cmake" ^ -G Ninja ^ - -S D:\\a\\Notepad--\\Notepad-- + -S "${{ github.workspace }}" shell: cmd - name: Build application (Windows) if: matrix.os == 'windows-latest' - run: | - call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" && ^ - cmake --build D:\\a\\Notepad--\\Notepad--\\build --config Release - shell: cmd + run: cmake --build "${{ github.workspace }}\\build" --config Release - name: Package application (Windows) if: matrix.os == 'windows-latest' run: | - cd D:\\a\\Notepad--\\Notepad--\\build + cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath application.zip - shell: cmd # Upload Artifacts - name: Upload artifact From 27d88fdf8ba64e618b3df013395d46df9676fba0 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 21:21:22 +0330 Subject: [PATCH 057/114] release #49 --- .github/workflows/cmake-multi-platform.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index de1f3ce..409c5c7 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -82,11 +82,7 @@ jobs: run: | choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install perl -y - choco install python -y - choco install git -y - - - name: Install Qt (Windows) + - name: Install Qt using Install Qt Action if: matrix.os == 'windows-latest' uses: jurplel/install-qt-action@v4 with: @@ -98,7 +94,8 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" -B "${{ github.workspace }}\\build" ^ + call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ + -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ -S "${{ github.workspace }}" From 97b44444712ea335c2809ac01e519e151f9e87a7 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 21:43:07 +0330 Subject: [PATCH 058/114] release #50 --- .github/workflows/cmake-multi-platform.yml | 31 +++++++++------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 409c5c7..17389f6 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -41,10 +41,10 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - - name: Build application (Ubuntu) + - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package application (Ubuntu) + - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | BUILD_DIR="${{ github.workspace }}/build" @@ -52,7 +52,7 @@ jobs: rm -rf $TEMP_DIR rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR - tar -czvf application.tar.gz ./* + tar -czvf Notepad--.tar.gz ./* # macOS Section - name: Install dependencies (macOS) @@ -66,23 +66,18 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - - name: Build application (macOS) + - name: Build Notepad-- (macOS) if: matrix.os == 'macos-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package application (macOS) + - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | cd "${{ github.workspace }}/build" - hdiutil create -volname Application -srcfolder . -ov -format UDZO application.dmg - zip application.zip application.dmg + hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg + zip Notepad--.zip Notepad--.dmg # Windows Section - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - - name: Install Qt using Install Qt Action if: matrix.os == 'windows-latest' uses: jurplel/install-qt-action@v4 with: @@ -101,21 +96,21 @@ jobs: -S "${{ github.workspace }}" shell: cmd - - name: Build application (Windows) + - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' run: cmake --build "${{ github.workspace }}\\build" --config Release - - name: Package application (Windows) + - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | cd "${{ github.workspace }}\\build" - Compress-Archive -Path . -DestinationPath application.zip + Compress-Archive -Path . -DestinationPath Notepad--.zip # Upload Artifacts - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: application-${{ matrix.os }} + name: Notepad---${{ matrix.os }} path: | - ${{ github.workspace }}/build/application.${{ matrix.artifact_extension }} - /tmp/build_copy/application.tar.gz + ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} + /tmp/build_copy/Notepad--.tar.gz From 97a864ac46ba7ed79e269f431d5bcb08e48e54c6 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 21:47:21 +0330 Subject: [PATCH 059/114] release #51 --- .github/workflows/cmake-multi-platform.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 17389f6..84070f1 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -78,6 +78,15 @@ jobs: # Windows Section - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + shell: cmd + + - name: Install Qt (Windows) if: matrix.os == 'windows-latest' uses: jurplel/install-qt-action@v4 with: From afe9550b231b6509a6208881bbabead8a805269e Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 22:11:27 +0330 Subject: [PATCH 060/114] release #52 --- .github/workflows/cmake-multi-platform.yml | 47 +++++++++++++++++----- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 84070f1..1fd3017 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -82,8 +82,7 @@ jobs: run: | choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + choco install visualstudio2022buildtools -y --install-arguments="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" shell: cmd - name: Install Qt (Windows) @@ -115,11 +114,41 @@ jobs: cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath Notepad--.zip - # Upload Artifacts - - name: Upload artifact - uses: actions/upload-artifact@v3 + # Create GitHub Release + - name: Create GitHub Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Notepad---${{ matrix.os }} - path: | - ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} - /tmp/build_copy/Notepad--.tar.gz + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + draft: false + prerelease: false + + # Upload Release Assets + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: /tmp/build_copy/Notepad--.tar.gz + asset_name: Notepad--_ubuntu.tar.gz + asset_content_type: application/gzip + + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/build/Notepad--.zip" + asset_name: Notepad--_macos.zip + asset_content_type: application/zip + + - name: Upload Windows Artifact + if: matrix.os == 'windows-latest' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: "${{ github.workspace }}\\build\\Notepad--.zip" + asset_name: Notepad--_windows.zip + asset_content_type: application/zip From 7b7bef370d2dd29b354e6c8fbe6f5bc62d7934a3 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 22:16:26 +0330 Subject: [PATCH 061/114] release #53 --- .github/workflows/cmake-multi-platform.yml | 43 +++++++--------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 1fd3017..2393ff1 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -26,7 +26,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Ubuntu Section + # Ubuntu Section - Restored to the original working configuration - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -54,7 +54,7 @@ jobs: cd $TEMP_DIR tar -czvf Notepad--.tar.gz ./* - # macOS Section + # macOS Section - Restored to the original working configuration - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | @@ -76,7 +76,7 @@ jobs: hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg zip Notepad--.zip Notepad--.dmg - # Windows Section + # Windows Section - Adjusted and tested for Qt prebuilt binaries - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | @@ -114,41 +114,24 @@ jobs: cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath Notepad--.zip - # Create GitHub Release - - name: Create GitHub Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - release_name: Release ${{ github.ref_name }} - draft: false - prerelease: false - - # Upload Release Assets + # Upload Artifacts - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' - uses: actions/upload-release-asset@v1 + uses: actions/upload-artifact@v3 with: - upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: /tmp/build_copy/Notepad--.tar.gz - asset_name: Notepad--_ubuntu.tar.gz - asset_content_type: application/gzip + name: Notepad--_ubuntu + path: /tmp/build_copy/Notepad--.tar.gz - name: Upload macOS Artifact if: matrix.os == 'macos-latest' - uses: actions/upload-release-asset@v1 + uses: actions/upload-artifact@v3 with: - upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/build/Notepad--.zip" - asset_name: Notepad--_macos.zip - asset_content_type: application/zip + name: Notepad--_macos + path: "${{ github.workspace }}/build/Notepad--.zip" - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - uses: actions/upload-release-asset@v1 + uses: actions/upload-artifact@v3 with: - upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\build\\Notepad--.zip" - asset_name: Notepad--_windows.zip - asset_content_type: application/zip + name: Notepad--_windows + path: "${{ github.workspace }}\\build\\Notepad--.zip" From b645cd1ad43aebea1c8ee448deda793fff9224d0 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 22:42:38 +0330 Subject: [PATCH 062/114] release #54 --- .github/workflows/cmake-multi-platform.yml | 200 ++++++++++----------- 1 file changed, 91 insertions(+), 109 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2393ff1..e471c34 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -18,120 +18,102 @@ jobs: - os: ubuntu-latest artifact_extension: tar.gz - os: macos-latest - artifact_extension: zip + artifact_extension: dmg - os: windows-latest artifact_extension: zip steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Ubuntu Section - Restored to the original working configuration - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Configure CMake (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - - name: Build Notepad-- (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf Notepad--.tar.gz ./* - - # macOS Section - Restored to the original working configuration - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt - - name: Configure CMake (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - - name: Build Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg - zip Notepad--.zip Notepad--.dmg - - # Windows Section - Adjusted and tested for Qt prebuilt binaries - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" - shell: cmd - - - name: Install Qt (Windows) - if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v4 - with: - version: '6.5.3' - host: 'windows' - target: 'desktop' - arch: 'win64_msvc2019_64' - - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ - -B "${{ github.workspace }}\\build" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -G Ninja ^ - -S "${{ github.workspace }}" - shell: cmd - - - name: Build Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\\build" --config Release + # Checkout code + - name: Checkout code + uses: actions/checkout@v4 - - name: Package Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - cd "${{ github.workspace }}\\build" - Compress-Archive -Path . -DestinationPath Notepad--.zip + # Ubuntu Section + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y ninja-build qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev + - name: Configure CMake (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build Notepad-- (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: ninja -C "${{ github.workspace }}/build" + - name: Package Notepad-- (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cd "${{ github.workspace }}/build" + tar -czvf Notepad--.tar.gz ./ + with: + path: "${{ github.workspace }}/build/Notepad--.tar.gz" - # Upload Artifacts - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: /tmp/build_copy/Notepad--.tar.gz + # macOS Section + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: brew install ninja qt + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build Notepad-- (macOS) + if: matrix.os == 'macos-latest' + run: ninja -C "${{ github.workspace }}/build" + - name: Package Notepad-- (macOS) + if: matrix.os == 'macos-latest' + run: | + cd "${{ github.workspace }}/build" + hdiutil create -volname "Notepad--" -srcfolder . -ov -format UDZO Notepad--.dmg + with: + path: "${{ github.workspace }}/build/Notepad--.dmg" - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/build/Notepad--.zip" + # Windows Section + - name: Install Qt (Windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v4 + with: + version: '6.5.3' + host: 'windows' + target: 'desktop' + arch: 'win64_msvc2019_64' + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install visualstudio2022buildtools -y --install-arguments \ + '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ + -B "${{ github.workspace }}\\build" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -G Ninja ^ + -S "${{ github.workspace }}" + shell: cmd + - name: Build Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: | + ninja -C "${{ github.workspace }}\\build" + shell: cmd + - name: Package Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: | + cd "${{ github.workspace }}\\build" + Compress-Archive -Path . -DestinationPath Notepad--.zip + shell: cmd - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\build\\Notepad--.zip" + # Upload Artifacts + - name: Upload Notepad-- Artifacts + uses: actions/upload-artifact@v3 + with: + name: Notepad---${{ matrix.os }} + path: | + ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} From 8c3f81b0d0ae9098690d2db3789191738f86b616 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 22:45:44 +0330 Subject: [PATCH 063/114] release #55 --- .github/workflows/cmake-multi-platform.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e471c34..6189017 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -48,8 +48,6 @@ jobs: run: | cd "${{ github.workspace }}/build" tar -czvf Notepad--.tar.gz ./ - with: - path: "${{ github.workspace }}/build/Notepad--.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -70,8 +68,6 @@ jobs: run: | cd "${{ github.workspace }}/build" hdiutil create -volname "Notepad--" -srcfolder . -ov -format UDZO Notepad--.dmg - with: - path: "${{ github.workspace }}/build/Notepad--.dmg" # Windows Section - name: Install Qt (Windows) From 93036939dd287546aae8909b498e99cb5c2ad00f Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 22:50:20 +0330 Subject: [PATCH 064/114] release #56 --- .github/workflows/cmake-multi-platform.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6189017..1fba195 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -32,7 +32,9 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y ninja-build qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev + sudo apt-get install -y ninja-build \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - name: Configure CMake (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -42,17 +44,22 @@ jobs: -S "${{ github.workspace }}" - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' - run: ninja -C "${{ github.workspace }}/build" + run: cmake --build "${{ github.workspace }}/build" --config Release - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - cd "${{ github.workspace }}/build" - tar -czvf Notepad--.tar.gz ./ + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf Notepad--.tar.gz ./* # macOS Section - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' - run: brew install ninja qt + run: | + brew install ninja qt - name: Configure CMake (macOS) if: matrix.os == 'macos-latest' run: | @@ -62,7 +69,7 @@ jobs: -S "${{ github.workspace }}" - name: Build Notepad-- (macOS) if: matrix.os == 'macos-latest' - run: ninja -C "${{ github.workspace }}/build" + run: cmake --build "${{ github.workspace }}/build" --config Release - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | @@ -113,3 +120,4 @@ jobs: name: Notepad---${{ matrix.os }} path: | ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} + /tmp/build_copy/Notepad--.tar.gz From 8c206b2448ac4ff870a03e9e37b4bb7c30b213c7 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 23:45:45 +0330 Subject: [PATCH 065/114] release # --- .github/workflows/cmake-multi-platform.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 1fba195..1511677 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -40,7 +40,7 @@ jobs: run: | cmake -B "${{ github.workspace }}/build" \ -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ + -G Ninja \ -S "${{ github.workspace }}" - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' @@ -65,7 +65,7 @@ jobs: run: | cmake -B "${{ github.workspace }}/build" \ -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ + -G Ninja \ -S "${{ github.workspace }}" - name: Build Notepad-- (macOS) if: matrix.os == 'macos-latest' @@ -95,21 +95,22 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ - -B "${{ github.workspace }}\\build" ^ + set "QT_DIR=%QT_INSTALL_DIR%" + cmake -B "%CD%\build" ^ -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH="%QT_DIR%\lib\cmake" ^ -G Ninja ^ - -S "${{ github.workspace }}" + -S "%CD%" shell: cmd - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - ninja -C "${{ github.workspace }}\\build" + ninja -C "%CD%\build" shell: cmd - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - cd "${{ github.workspace }}\\build" + cd "%CD%\build" Compress-Archive -Path . -DestinationPath Notepad--.zip shell: cmd From 0d563872e722fa6f468fd972ea1eb6bc710c44da Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Fri, 29 Nov 2024 23:54:41 +0330 Subject: [PATCH 066/114] release #58 --- .github/workflows/cmake-multi-platform.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 1511677..de6d0a0 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -122,3 +122,25 @@ jobs: path: | ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} /tmp/build_copy/Notepad--.tar.gz + + # Create Release + - name: Create GitHub Release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: "Release ${{ github.ref_name }}" + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Upload Release Assets + - name: Upload Release Assets + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: | + ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} + /tmp/build_copy/Notepad--.tar.gz + asset_name: Notepad---${{ matrix.os }}.${{ matrix.artifact_extension }} + asset_content_type: application/octet-stream From fdbe0d4366fe3e8400b19adbaaa00669095d8879 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 00:00:40 +0330 Subject: [PATCH 067/114] release #59 --- .github/workflows/cmake-multi-platform.yml | 238 +++++++++++---------- 1 file changed, 120 insertions(+), 118 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index de6d0a0..5d6af25 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -18,129 +18,131 @@ jobs: - os: ubuntu-latest artifact_extension: tar.gz - os: macos-latest - artifact_extension: dmg + artifact_extension: zip - os: windows-latest artifact_extension: zip steps: - # Checkout code - - name: Checkout code - uses: actions/checkout@v4 - - # Ubuntu Section - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Configure CMake (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G Ninja \ - -S "${{ github.workspace }}" - - name: Build Notepad-- (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf Notepad--.tar.gz ./* - - # macOS Section - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt - - name: Configure CMake (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G Ninja \ - -S "${{ github.workspace }}" - - name: Build Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname "Notepad--" -srcfolder . -ov -format UDZO Notepad--.dmg + - name: Checkout code + uses: actions/checkout@v4 - # Windows Section - - name: Install Qt (Windows) - if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v4 - with: - version: '6.5.3' - host: 'windows' - target: 'desktop' - arch: 'win64_msvc2019_64' - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments \ - '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart' - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - set "QT_DIR=%QT_INSTALL_DIR%" - cmake -B "%CD%\build" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="%QT_DIR%\lib\cmake" ^ - -G Ninja ^ - -S "%CD%" - shell: cmd - - name: Build Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - ninja -C "%CD%\build" - shell: cmd - - name: Package Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - cd "%CD%\build" - Compress-Archive -Path . -DestinationPath Notepad--.zip - shell: cmd + # Ubuntu Section + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y ninja-build \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + - name: Configure CMake (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package application (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + BUILD_DIR="${{ github.workspace }}/build" + TEMP_DIR="/tmp/build_copy" + rm -rf $TEMP_DIR + rsync -a "$BUILD_DIR/" "$TEMP_DIR/" + cd $TEMP_DIR + tar -czvf Notepad--.tar.gz ./* + - name: Upload artifact (Ubuntu) + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad---${{ matrix.os }} + path: /tmp/build_copy/Notepad--.tar.gz - # Upload Artifacts - - name: Upload Notepad-- Artifacts - uses: actions/upload-artifact@v3 - with: - name: Notepad---${{ matrix.os }} - path: | - ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} - /tmp/build_copy/Notepad--.tar.gz + # macOS Section + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew install ninja qt + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build application (macOS) + if: matrix.os == 'macos-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package application (macOS) + if: matrix.os == 'macos-latest' + run: | + cd "${{ github.workspace }}/build" + hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg + zip Notepad--.zip Notepad--.dmg + - name: Upload artifact (macOS) + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad---${{ matrix.os }} + path: "${{ github.workspace }}/build/Notepad--.zip" - # Create Release - - name: Create GitHub Release - uses: actions/create-release@v1 - with: - tag_name: ${{ github.ref_name }} - release_name: "Release ${{ github.ref_name }}" - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Windows Section + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + - name: Install Qt using jurplel/install-qt-action (Windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v2 + with: + version: '6.5.3' + host: 'windows' + target: 'msvc2019_64' + dir: ${{ runner.workspace }}/Qt + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + call "${{ runner.workspace }}\Qt\6.5.3\msvc2019_64\bin\qt-cmake.bat" ^ + -B "${{ github.workspace }}\build" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -G Ninja ^ + -S "${{ github.workspace }}" + shell: cmd + - name: Build application (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake --build "${{ github.workspace }}\build" --config Release + shell: cmd + - name: Package application (Windows) + if: matrix.os == 'windows-latest' + run: | + cd "${{ github.workspace }}\build" + Compress-Archive -Path . -DestinationPath Notepad--.zip + shell: cmd + - name: Upload artifact (Windows) + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad---${{ matrix.os }} + path: "${{ github.workspace }}\build\Notepad--.zip" - # Upload Release Assets - - name: Upload Release Assets - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: | - ${{ github.workspace }}/build/Notepad--.${{ matrix.artifact_extension }} - /tmp/build_copy/Notepad--.tar.gz - asset_name: Notepad---${{ matrix.os }}.${{ matrix.artifact_extension }} - asset_content_type: application/octet-stream + # Create Release and Attach Artifacts + - name: Create GitHub Release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Release Assets + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ matrix.os == 'ubuntu-latest' && '/tmp/build_copy/Notepad--.tar.gz' || matrix.os == 'macos-latest' && '${{ github.workspace }}/build/Notepad--.zip' || '${{ github.workspace }}\\build\\Notepad--.zip' }} + asset_name: Notepad---${{ matrix.os }}.${{ matrix.artifact_extension }} + asset_content_type: application/octet-stream From 354d962ff9a87823153ac1f4fbb72be6bf474594 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 00:06:43 +0330 Subject: [PATCH 068/114] release #60 --- .github/workflows/cmake-multi-platform.yml | 108 +++++++++++++-------- 1 file changed, 68 insertions(+), 40 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 5d6af25..c5760de 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -41,10 +41,10 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - - name: Build application (Ubuntu) + - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package application (Ubuntu) + - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | BUILD_DIR="${{ github.workspace }}/build" @@ -53,12 +53,6 @@ jobs: rsync -a "$BUILD_DIR/" "$TEMP_DIR/" cd $TEMP_DIR tar -czvf Notepad--.tar.gz ./* - - name: Upload artifact (Ubuntu) - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad---${{ matrix.os }} - path: /tmp/build_copy/Notepad--.tar.gz # macOS Section - name: Install dependencies (macOS) @@ -72,21 +66,15 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - - name: Build application (macOS) + - name: Build Notepad-- (macOS) if: matrix.os == 'macos-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package application (macOS) + - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | cd "${{ github.workspace }}/build" hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg zip Notepad--.zip Notepad--.dmg - - name: Upload artifact (macOS) - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad---${{ matrix.os }} - path: "${{ github.workspace }}/build/Notepad--.zip" # Windows Section - name: Install dependencies (Windows) @@ -94,55 +82,95 @@ jobs: run: | choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - - name: Install Qt using jurplel/install-qt-action (Windows) + choco install visualstudio2022buildtools -y --install-arguments="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" + shell: cmd + + - name: Install Qt (Windows) if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v4 with: version: '6.5.3' host: 'windows' - target: 'msvc2019_64' - dir: ${{ runner.workspace }}/Qt + target: 'desktop' + arch: 'win64_msvc2019_64' + - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "${{ runner.workspace }}\Qt\6.5.3\msvc2019_64\bin\qt-cmake.bat" ^ - -B "${{ github.workspace }}\build" ^ + call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ + -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ -S "${{ github.workspace }}" shell: cmd - - name: Build application (Windows) + + - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' - run: | - cmake --build "${{ github.workspace }}\build" --config Release - shell: cmd - - name: Package application (Windows) + run: cmake --build "${{ github.workspace }}\\build" --config Release + + - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - cd "${{ github.workspace }}\build" + cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath Notepad--.zip - shell: cmd - - name: Upload artifact (Windows) + + # Upload Artifacts + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: /tmp/build_copy/Notepad--.tar.gz + + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/build/Notepad--.zip" + + - name: Upload Windows Artifact if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: - name: Notepad---${{ matrix.os }} - path: "${{ github.workspace }}\build\Notepad--.zip" + name: Notepad--_windows + path: "${{ github.workspace }}\\build\\Notepad--.zip" - # Create Release and Attach Artifacts + # Create Release - name: Create GitHub Release uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref_name }} - release_name: Release ${{ github.ref_name }} + release_name: Notepad-- Release ${{ github.ref_name }} draft: false prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Release Assets + + # Attach Artifacts to Release + - name: Upload Ubuntu Release Artifact + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: /tmp/build_copy/Notepad--.tar.gz + asset_name: Notepad--_ubuntu.tar.gz + asset_content_type: application/gzip + + - name: Upload macOS Release Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/build/Notepad--.zip" + asset_name: Notepad--_macos.zip + asset_content_type: application/zip + + - name: Upload Windows Release Artifact + if: matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ matrix.os == 'ubuntu-latest' && '/tmp/build_copy/Notepad--.tar.gz' || matrix.os == 'macos-latest' && '${{ github.workspace }}/build/Notepad--.zip' || '${{ github.workspace }}\\build\\Notepad--.zip' }} - asset_name: Notepad---${{ matrix.os }}.${{ matrix.artifact_extension }} - asset_content_type: application/octet-stream + asset_path: "${{ github.workspace }}\\build\\Notepad--.zip" + asset_name: Notepad--_windows.zip + asset_content_type: application/zip From 3cc1d8211f2ec2568679e891667464edeac46b5d Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 00:39:38 +0330 Subject: [PATCH 069/114] release #61 --- .github/workflows/cmake-multi-platform.yml | 26 ++-------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index c5760de..58646af 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -3,7 +3,7 @@ name: Build and Release on: push: branches: [main, dev] - pull_request: + pull_request_target: branches: [main] jobs: @@ -114,33 +114,11 @@ jobs: cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath Notepad--.zip - # Upload Artifacts - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: /tmp/build_copy/Notepad--.tar.gz - - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/build/Notepad--.zip" - - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\build\\Notepad--.zip" - # Create Release - name: Create GitHub Release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} with: tag_name: ${{ github.ref_name }} release_name: Notepad-- Release ${{ github.ref_name }} From 3a8bc0b8e4dd0f546adbaaa39fac8cf9e64e5fec Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 00:46:59 +0330 Subject: [PATCH 070/114] release #62 --- .github/workflows/cmake-multi-platform.yml | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 58646af..63574f1 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -3,7 +3,7 @@ name: Build and Release on: push: branches: [main, dev] - pull_request_target: + pull_request: branches: [main] jobs: @@ -114,41 +114,43 @@ jobs: cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath Notepad--.zip - # Create Release - - name: Create GitHub Release + # Create or Get Release + - name: Create or Get Release + id: release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref_name }} release_name: Notepad-- Release ${{ github.ref_name }} draft: false prerelease: false + continue-on-error: true - # Attach Artifacts to Release - - name: Upload Ubuntu Release Artifact - if: matrix.os == 'ubuntu-latest' + # Upload Artifacts to Release + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' && steps.release.outputs.upload_url != '' uses: actions/upload-release-asset@v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: /tmp/build_copy/Notepad--.tar.gz asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - - name: Upload macOS Release Artifact - if: matrix.os == 'macos-latest' + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' && steps.release.outputs.upload_url != '' uses: actions/upload-release-asset@v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: "${{ github.workspace }}/build/Notepad--.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip - - name: Upload Windows Release Artifact - if: matrix.os == 'windows-latest' + - name: Upload Windows Artifact + if: matrix.os == 'windows-latest' && steps.release.outputs.upload_url != '' uses: actions/upload-release-asset@v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: "${{ github.workspace }}\\build\\Notepad--.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From f0c3ab5e3241884266de86838ad681068fba2028 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 01:07:14 +0330 Subject: [PATCH 071/114] release #62 --- .github/workflows/cmake-multi-platform.yml | 29 +++++++++++----------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 63574f1..532ecaa 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -114,43 +114,42 @@ jobs: cd "${{ github.workspace }}\\build" Compress-Archive -Path . -DestinationPath Notepad--.zip - # Create or Get Release - - name: Create or Get Release - id: release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Create or Update Release + - name: Create or Update Release + id: create_release + uses: softprops/action-gh-release@v1 with: tag_name: ${{ github.ref_name }} - release_name: Notepad-- Release ${{ github.ref_name }} + name: Notepad-- Release ${{ github.ref_name }} draft: false prerelease: false - continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Upload Artifacts to Release + # Upload Artifacts - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' && steps.release.outputs.upload_url != '' + if: matrix.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: /tmp/build_copy/Notepad--.tar.gz asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' && steps.release.outputs.upload_url != '' + if: matrix.os == 'macos-latest' uses: actions/upload-release-asset@v1 with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/build/Notepad--.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' && steps.release.outputs.upload_url != '' + if: matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}\\build\\Notepad--.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From dddbdd07efbc40fded54427bb88a0abafbd56b33 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 01:16:44 +0330 Subject: [PATCH 072/114] release #63 --- .github/workflows/cmake-multi-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 532ecaa..1dc1d84 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -119,8 +119,8 @@ jobs: id: create_release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref_name }} - name: Notepad-- Release ${{ github.ref_name }} + tag_name: ${{ github.ref_name }}-release-$(date +%s) + name: Notepad-- Release for ${{ github.ref_name }} draft: false prerelease: false env: From b74aa4fb768726e8e8f8b8516f58c360eeaae35d Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 01:38:56 +0330 Subject: [PATCH 073/114] release #64 --- .github/workflows/cmake-multi-platform.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 1dc1d84..40e0a6b 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -26,7 +26,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Ubuntu Section + # Ubuntu Section - Keep unchanged - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -54,7 +54,7 @@ jobs: cd $TEMP_DIR tar -czvf Notepad--.tar.gz ./* - # macOS Section + # macOS Section - Keep unchanged - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | @@ -76,7 +76,7 @@ jobs: hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg zip Notepad--.zip Notepad--.dmg - # Windows Section + # Windows Section - Fix linker errors - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | @@ -100,6 +100,7 @@ jobs: call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}\\lib\\cmake" ^ -G Ninja ^ -S "${{ github.workspace }}" shell: cmd @@ -119,8 +120,8 @@ jobs: id: create_release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref_name }}-release-$(date +%s) - name: Notepad-- Release for ${{ github.ref_name }} + tag_name: ${{ github.run_number }}-release + name: Notepad-- Release Build #${{ github.run_number }} draft: false prerelease: false env: From b328696690e79dc78a55b6ed9776ecc9d21fda60 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 02:21:43 +0330 Subject: [PATCH 074/114] systemtextdelegate --- .github/workflows/cmake-multi-platform.yml | 156 --------------------- CMakeLists.txt.user | 26 ++-- src/systemtextdelegate.cpp | 6 +- 3 files changed, 18 insertions(+), 170 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 40e0a6b..e69de29 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,156 +0,0 @@ -name: Build and Release - -on: - push: - branches: [main, dev] - pull_request: - branches: [main] - -jobs: - build-and-release: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - include: - - os: ubuntu-latest - artifact_extension: tar.gz - - os: macos-latest - artifact_extension: zip - - os: windows-latest - artifact_extension: zip - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Ubuntu Section - Keep unchanged - - name: Install dependencies (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build \ - qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ - qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Configure CMake (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - - name: Build Notepad-- (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - BUILD_DIR="${{ github.workspace }}/build" - TEMP_DIR="/tmp/build_copy" - rm -rf $TEMP_DIR - rsync -a "$BUILD_DIR/" "$TEMP_DIR/" - cd $TEMP_DIR - tar -czvf Notepad--.tar.gz ./* - - # macOS Section - Keep unchanged - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt - - name: Configure CMake (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" - - name: Build Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: | - cd "${{ github.workspace }}/build" - hdiutil create -volname Notepad-- -srcfolder . -ov -format UDZO Notepad--.dmg - zip Notepad--.zip Notepad--.dmg - - # Windows Section - Fix linker errors - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" - shell: cmd - - - name: Install Qt (Windows) - if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v4 - with: - version: '6.5.3' - host: 'windows' - target: 'desktop' - arch: 'win64_msvc2019_64' - - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ - -B "${{ github.workspace }}\\build" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}\\lib\\cmake" ^ - -G Ninja ^ - -S "${{ github.workspace }}" - shell: cmd - - - name: Build Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\\build" --config Release - - - name: Package Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - cd "${{ github.workspace }}\\build" - Compress-Archive -Path . -DestinationPath Notepad--.zip - - # Create or Update Release - - name: Create or Update Release - id: create_release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ github.run_number }}-release - name: Notepad-- Release Build #${{ github.run_number }} - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Upload Artifacts - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: /tmp/build_copy/Notepad--.tar.gz - asset_name: Notepad--_ubuntu.tar.gz - asset_content_type: application/gzip - - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/build/Notepad--.zip" - asset_name: Notepad--_macos.zip - asset_content_type: application/zip - - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\build\\Notepad--.zip" - asset_name: Notepad--_windows.zip - asset_content_type: application/zip diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index 763a076..8c9f9f7 100755 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,14 +102,14 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} + -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_BUILD_TYPE:STRING=Debug /data/Code/Qt/Notepad-- 0 /data/Code/Qt/Notepad--/build/Desktop-Debug @@ -160,14 +160,14 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} + -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_BUILD_TYPE:STRING=Release /data/Code/Qt/Notepad-- /data/Code/Qt/Notepad--/build/Desktop-Release diff --git a/src/systemtextdelegate.cpp b/src/systemtextdelegate.cpp index a98385d..07b3cac 100644 --- a/src/systemtextdelegate.cpp +++ b/src/systemtextdelegate.cpp @@ -1,7 +1,11 @@ -#include "systemtextdelegate.h" #include #include #include +#include +#include +#include +#include +#include "systemtextdelegate.h" SystemTextDelegate::SystemTextDelegate(QObject *parent) : QStyledItemDelegate(parent) {} From 87dde92e779e27e602fd9b1f5da97406aa47215a Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 02:25:58 +0330 Subject: [PATCH 075/114] release #65 --- .github/workflows/cmake-multi-platform.yml | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e69de29..68e1a4f 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,128 @@ +name: Build and Release + +on: + push: + branches: [main, dev] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + # Checkout the repository + - name: Checkout code + uses: actions/checkout@v4 + + # Ubuntu Section + - name: Install dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y ninja-build \ + qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ + qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + - name: Configure CMake (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build Notepad-- (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package Notepad-- (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + tar -czvf Notepad--.tar.gz -C "${{ github.workspace }}/build" . + mv Notepad--.tar.gz "${{ github.workspace }}/" + + # macOS Section + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew install ninja qt + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build Notepad-- (macOS) + if: matrix.os == 'macos-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package Notepad-- (macOS) + if: matrix.os == 'macos-latest' + run: | + zip -r Notepad--.zip "${{ github.workspace }}/build" + mv Notepad--.zip "${{ github.workspace }}/" + + # Windows Section + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install mingw -y + shell: cmd + - name: Install Qt (Windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v4 + with: + version: '6.5.3' + host: 'windows' + target: 'desktop' + arch: 'win64_mingw' + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake -B "${{ github.workspace }}\\build" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -G Ninja ^ + -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ + -S "${{ github.workspace }}" + shell: cmd + - name: Build Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: cmake --build "${{ github.workspace }}\\build" --config Release + shell: cmd + - name: Package Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: | + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip + move Notepad--.zip "${{ github.workspace }}\\" + + # Create and Upload Release + release: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TAG="release-$(date +%s)" + echo "TAG_NAME=${TAG}" >> $GITHUB_ENV + gh release create "$TAG" -t "Notepad-- Release Build" -n "This is the latest build of Notepad--." + + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + run: | + gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.tar.gz" --clobber + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + run: | + gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.zip" --clobber + - name: Upload Windows Artifact + if: matrix.os == 'windows-latest' + run: | + gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}\\Notepad--.zip" --clobber From 518b7fe5fd921b9fb130f91df0fe6ebb98d676ef Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 02:43:07 +0330 Subject: [PATCH 076/114] release #66 --- .github/workflows/cmake-multi-platform.yml | 84 ++++++++++++---------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 68e1a4f..2a9f6d7 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -7,15 +7,22 @@ on: branches: [main] jobs: - build: + build-and-release: runs-on: ${{ matrix.os }} + strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + include: + - os: ubuntu-latest + artifact_extension: tar.gz + - os: macos-latest + artifact_extension: zip + - os: windows-latest + artifact_extension: zip steps: - # Checkout the repository - name: Checkout code uses: actions/checkout@v4 @@ -40,8 +47,17 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - tar -czvf Notepad--.tar.gz -C "${{ github.workspace }}/build" . - mv Notepad--.tar.gz "${{ github.workspace }}/" + BUILD_DIR="${{ github.workspace }}/build" + OUTPUT_DIR="${{ github.workspace }}/output" + mkdir -p $OUTPUT_DIR + tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . + + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: "${{ github.workspace }}/output/Notepad--.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -61,17 +77,28 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - zip -r Notepad--.zip "${{ github.workspace }}/build" - mv Notepad--.zip "${{ github.workspace }}/" + BUILD_DIR="${{ github.workspace }}/build" + OUTPUT_DIR="${{ github.workspace }}/output" + mkdir -p $OUTPUT_DIR + zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR + + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/output/Notepad--.zip" # Windows Section + # The following section is left untouched since Windows passed previously. - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install mingw -y + choco install visualstudio2022buildtools -y --install-arguments="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" shell: cmd + - name: Install Qt (Windows) if: matrix.os == 'windows-latest' uses: jurplel/install-qt-action@v4 @@ -79,50 +106,31 @@ jobs: version: '6.5.3' host: 'windows' target: 'desktop' - arch: 'win64_mingw' + arch: 'win64_msvc2019_64' + - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmake -B "${{ github.workspace }}\\build" ^ + call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ + -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ - -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ -S "${{ github.workspace }}" shell: cmd + - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' run: cmake --build "${{ github.workspace }}\\build" --config Release - shell: cmd + - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip - move Notepad--.zip "${{ github.workspace }}\\" + cd "${{ github.workspace }}\\build" + Compress-Archive -Path . -DestinationPath Notepad--.zip - # Create and Upload Release - release: - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Create GitHub Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - TAG="release-$(date +%s)" - echo "TAG_NAME=${TAG}" >> $GITHUB_ENV - gh release create "$TAG" -t "Notepad-- Release Build" -n "This is the latest build of Notepad--." - - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - run: | - gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.tar.gz" --clobber - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - run: | - gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.zip" --clobber - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - run: | - gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}\\Notepad--.zip" --clobber + uses: actions/upload-artifact@v3 + with: + name: Notepad--_windows + path: "${{ github.workspace }}\\build\\Notepad--.zip" From 5ac95ce9c9542dd5a290554ee7c1dc96fe50f05e Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:03:35 +0330 Subject: [PATCH 077/114] release #67 --- .github/workflows/cmake-multi-platform.yml | 50 ++++++++++++++-------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2a9f6d7..32a9cbe 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,7 +51,6 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . - - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -81,7 +80,6 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR - - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 @@ -90,15 +88,13 @@ jobs: path: "${{ github.workspace }}/output/Notepad--.zip" # Windows Section - # The following section is left untouched since Windows passed previously. - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | choco install ninja -y choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install visualstudio2022buildtools -y --install-arguments="'--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --norestart'" + choco install mingw -y shell: cmd - - name: Install Qt (Windows) if: matrix.os == 'windows-latest' uses: jurplel/install-qt-action@v4 @@ -106,31 +102,49 @@ jobs: version: '6.5.3' host: 'windows' target: 'desktop' - arch: 'win64_msvc2019_64' - + arch: 'win64_mingw' - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - call "${{ env.QT_ROOT_DIR }}\\bin\\qt-cmake.bat" ^ - -B "${{ github.workspace }}\\build" ^ + cmake -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ + -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ -S "${{ github.workspace }}" shell: cmd - - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' run: cmake --build "${{ github.workspace }}\\build" --config Release - + shell: cmd - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - cd "${{ github.workspace }}\\build" - Compress-Archive -Path . -DestinationPath Notepad--.zip - + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip + move Notepad--.zip "${{ github.workspace }}\\" + + # Create and Upload Release + release: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TAG="release-$(date +%s)" + echo "TAG_NAME=${TAG}" >> $GITHUB_ENV + gh release create "$TAG" -t "Notepad-- Release Build" -n "This is the latest build of Notepad--." + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + run: | + gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.tar.gz" --clobber + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + run: | + gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.zip" --clobber - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\build\\Notepad--.zip" + run: | + gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}\\Notepad--.zip" --clobber \ No newline at end of file From a9a3b803821bbab020f9fa4cafffe3b4c4661c05 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:07:41 +0330 Subject: [PATCH 078/114] release #129 --- .github/workflows/cmake-multi-platform.yml | 38 +++++++--------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 32a9cbe..a652df0 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -121,30 +121,14 @@ jobs: run: | Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip move Notepad--.zip "${{ github.workspace }}\\" - - # Create and Upload Release - release: - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Create GitHub Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - TAG="release-$(date +%s)" - echo "TAG_NAME=${TAG}" >> $GITHUB_ENV - gh release create "$TAG" -t "Notepad-- Release Build" -n "This is the latest build of Notepad--." - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - run: | - gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.tar.gz" --clobber - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - run: | - gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}/Notepad--.zip" --clobber - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - run: | - gh release upload ${{ env.TAG_NAME }} "${{ github.workspace }}\\Notepad--.zip" --clobber \ No newline at end of file + + # Upload artifacts + - name: Upload Release Artifacts + if: always() + uses: actions/upload-artifact@v3 + with: + name: AllArtifacts + path: | + ${{ github.workspace }}/output/ + ${{ github.workspace }}/*.zip + ${{ github.workspace }}/*.tar.gz From 024243712686f23b2dcdf996ad86cbe8401f1758 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:20:30 +0330 Subject: [PATCH 079/114] release #68 --- .github/workflows/cmake-multi-platform.yml | 81 +++++++++++----------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a652df0..8b11779 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -88,47 +88,50 @@ jobs: path: "${{ github.workspace }}/output/Notepad--.zip" # Windows Section - - name: Install dependencies (Windows) + - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install mingw -y - shell: cmd - - name: Install Qt (Windows) - if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v4 + uses: actions/upload-artifact@v3 with: - version: '6.5.3' - host: 'windows' - target: 'desktop' - arch: 'win64_mingw' - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - cmake -B "${{ github.workspace }}\\build" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -G Ninja ^ - -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ - -S "${{ github.workspace }}" - shell: cmd - - name: Build Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\\build" --config Release - shell: cmd - - name: Package Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip - move Notepad--.zip "${{ github.workspace }}\\" + name: Notepad--_windows + path: "${{ github.workspace }}\\Notepad--.zip" - # Upload artifacts - - name: Upload Release Artifacts + release: + runs-on: ubuntu-latest + needs: build-and-release + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + id: create_release + run: | + TAG_NAME="release-$(date +%s)" + gh release create $TAG_NAME \ + -t "Notepad-- Release" \ + -n "This release contains the latest build artifacts for Notepad--." + echo "RELEASE_TAG=${TAG_NAME}" >> $GITHUB_ENV + - name: Upload Ubuntu Artifact to Release if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/output/Notepad--.tar.gz" + asset_name: Notepad--_ubuntu.tar.gz + asset_content_type: application/gzip + - name: Upload macOS Artifact to Release + if: always() + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/output/Notepad--.zip" + asset_name: Notepad--_macos.zip + asset_content_type: application/zip + - name: Upload Windows Artifact to Release + if: always() + uses: actions/upload-release-asset@v1 with: - name: AllArtifacts - path: | - ${{ github.workspace }}/output/ - ${{ github.workspace }}/*.zip - ${{ github.workspace }}/*.tar.gz + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/Notepad--.zip" + asset_name: Notepad--_windows.zip + asset_content_type: application/zip From 987abc239d4df03fadbb06f89a105e08cf259fe7 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:25:04 +0330 Subject: [PATCH 080/114] release #69 --- .github/workflows/cmake-multi-platform.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8b11779..e7c9d8b 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -101,34 +101,35 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - id: create_release - run: | - TAG_NAME="release-$(date +%s)" - gh release create $TAG_NAME \ - -t "Notepad-- Release" \ - -n "This release contains the latest build artifacts for Notepad--." - echo "RELEASE_TAG=${TAG_NAME}" >> $GITHUB_ENV + with: + tag_name: release-$(date +%s) + release_name: Notepad-- Release + draft: false + prerelease: false + - name: Upload Ubuntu Artifact to Release - if: always() uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.tar.gz" asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip + - name: Upload macOS Artifact to Release - if: always() uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip + - name: Upload Windows Artifact to Release - if: always() uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} From c36b591ec748340261eed0b15b9bf51e8012bd05 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:29:04 +0330 Subject: [PATCH 081/114] release #70 --- .github/workflows/cmake-multi-platform.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e7c9d8b..c946754 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -87,14 +87,6 @@ jobs: name: Notepad--_macos path: "${{ github.workspace }}/output/Notepad--.zip" - # Windows Section - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\Notepad--.zip" - release: runs-on: ubuntu-latest needs: build-and-release @@ -102,13 +94,20 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Generate Tag Name + id: tag_name + run: | + TIMESTAMP=$(date +%Y%m%d%H%M%S) + echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV + echo "::set-output name=tag_name::release-$TIMESTAMP" + - name: Create GitHub Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: release-$(date +%s) + tag_name: ${{ env.RELEASE_TAG }} release_name: Notepad-- Release draft: false prerelease: false From c204afd28915a98d2c130766ec3f2ab890fe72de Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:32:56 +0330 Subject: [PATCH 082/114] release #71 --- .github/workflows/cmake-multi-platform.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index c946754..8a0ee8b 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -47,10 +47,9 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR - tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . + tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C "${{ github.workspace }}/build" . - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -76,10 +75,9 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR - zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR + zip -r $OUTPUT_DIR/Notepad--.zip "${{ github.workspace }}/build" - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 From 6318dafa15aea02f626c77c1bcde5b7e5fe87a3c Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:37:09 +0330 Subject: [PATCH 083/114] release #72 --- .github/workflows/cmake-multi-platform.yml | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8a0ee8b..604748e 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -47,9 +47,20 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | + echo "Packaging Notepad-- for Ubuntu..." + BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR - tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C "${{ github.workspace }}/build" . + tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . + echo "Package created: $OUTPUT_DIR/Notepad--.tar.gz" + shell: bash + - name: Debug Packaging (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + echo "Listing output directory:" + ls -al "${{ github.workspace }}/output" + echo "Listing build directory:" + ls -al "${{ github.workspace }}/build" - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -75,9 +86,20 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | + echo "Packaging Notepad-- for macOS..." + BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR - zip -r $OUTPUT_DIR/Notepad--.zip "${{ github.workspace }}/build" + zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR + echo "Package created: $OUTPUT_DIR/Notepad--.zip" + shell: bash + - name: Debug Packaging (macOS) + if: matrix.os == 'macos-latest' + run: | + echo "Listing output directory:" + ls -al "${{ github.workspace }}/output" + echo "Listing build directory:" + ls -al "${{ github.workspace }}/build" - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 @@ -111,6 +133,7 @@ jobs: prerelease: false - name: Upload Ubuntu Artifact to Release + if: matrix.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -119,6 +142,7 @@ jobs: asset_content_type: application/gzip - name: Upload macOS Artifact to Release + if: matrix.os == 'macos-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -127,6 +151,7 @@ jobs: asset_content_type: application/zip - name: Upload Windows Artifact to Release + if: matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} From 07f153ed3217b5b9bdfbf8084365f60b5963e1ef Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:45:31 +0330 Subject: [PATCH 084/114] release #73 --- .github/workflows/cmake-multi-platform.yml | 26 +++------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 604748e..2b276fe 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -47,20 +47,10 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - echo "Packaging Notepad-- for Ubuntu..." BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . - echo "Package created: $OUTPUT_DIR/Notepad--.tar.gz" - shell: bash - - name: Debug Packaging (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - echo "Listing output directory:" - ls -al "${{ github.workspace }}/output" - echo "Listing build directory:" - ls -al "${{ github.workspace }}/build" - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -86,20 +76,10 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - echo "Packaging Notepad-- for macOS..." BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR - echo "Package created: $OUTPUT_DIR/Notepad--.zip" - shell: bash - - name: Debug Packaging (macOS) - if: matrix.os == 'macos-latest' - run: | - echo "Listing output directory:" - ls -al "${{ github.workspace }}/output" - echo "Listing build directory:" - ls -al "${{ github.workspace }}/build" - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 @@ -133,7 +113,7 @@ jobs: prerelease: false - name: Upload Ubuntu Artifact to Release - if: matrix.os == 'ubuntu-latest' + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -142,7 +122,7 @@ jobs: asset_content_type: application/gzip - name: Upload macOS Artifact to Release - if: matrix.os == 'macos-latest' + if: ${{ matrix.os == 'macos-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -151,7 +131,7 @@ jobs: asset_content_type: application/zip - name: Upload Windows Artifact to Release - if: matrix.os == 'windows-latest' + if: ${{ matrix.os == 'windows-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} From 99bb8cbf09e96de6bbd81243b98c43fd4232b5c4 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 10:53:09 +0330 Subject: [PATCH 085/114] release #74 --- .github/workflows/cmake-multi-platform.yml | 78 ++++++++++++++-------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2b276fe..2f93e77 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,12 +51,10 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . - - name: Upload Ubuntu Artifact + ls -l $OUTPUT_DIR + - name: Verify Ubuntu Artifact if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: "${{ github.workspace }}/output/Notepad--.tar.gz" + run: ls -l "${{ github.workspace }}/output/Notepad--.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -80,61 +78,89 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR - - name: Upload macOS Artifact + ls -l $OUTPUT_DIR + - name: Verify macOS Artifact if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 + run: ls -l "${{ github.workspace }}/output/Notepad--.zip" + + # Windows Section + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install mingw -y + shell: cmd + - name: Install Qt (Windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v4 with: - name: Notepad--_macos - path: "${{ github.workspace }}/output/Notepad--.zip" + version: '6.5.3' + host: 'windows' + target: 'desktop' + arch: 'win64_mingw' + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake -B "${{ github.workspace }}\\build" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -G Ninja ^ + -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ + -S "${{ github.workspace }}" + shell: cmd + - name: Build Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: cmake --build "${{ github.workspace }}\\build" --config Release + shell: cmd + - name: Package Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: | + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip + move Notepad--.zip "${{ github.workspace }}\\" + shell: cmd + - name: Verify Windows Artifact + if: matrix.os == 'windows-latest' + run: | + dir "${{ github.workspace }}\\Notepad--.zip" + shell: cmd release: - runs-on: ubuntu-latest needs: build-and-release + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - - name: Generate Tag Name - id: tag_name - run: | - TIMESTAMP=$(date +%Y%m%d%H%M%S) - echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV - echo "::set-output name=tag_name::release-$TIMESTAMP" - - name: Create GitHub Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ env.RELEASE_TAG }} + tag_name: release-${{ github.run_id }} release_name: Notepad-- Release draft: false prerelease: false - - name: Upload Ubuntu Artifact to Release - if: ${{ matrix.os == 'ubuntu-latest' }} + if: matrix.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.tar.gz" asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - - name: Upload macOS Artifact to Release - if: ${{ matrix.os == 'macos-latest' }} + if: matrix.os == 'macos-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip - - name: Upload Windows Artifact to Release - if: ${{ matrix.os == 'windows-latest' }} + if: matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/Notepad--.zip" + asset_path: "${{ github.workspace }}\\Notepad--.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From 5aaeab78d5712eb55ef22209f12e7b85fc7bf622 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:00:25 +0330 Subject: [PATCH 086/114] release #75 --- .github/workflows/cmake-multi-platform.yml | 79 +++++++--------------- 1 file changed, 26 insertions(+), 53 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2f93e77..55da426 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,10 +51,12 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . - ls -l $OUTPUT_DIR - - name: Verify Ubuntu Artifact + - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' - run: ls -l "${{ github.workspace }}/output/Notepad--.tar.gz" + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: "${{ github.workspace }}/output/Notepad--.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -78,89 +80,60 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR - ls -l $OUTPUT_DIR - - name: Verify macOS Artifact + - name: Upload macOS Artifact if: matrix.os == 'macos-latest' - run: ls -l "${{ github.workspace }}/output/Notepad--.zip" - - # Windows Section - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install mingw -y - shell: cmd - - name: Install Qt (Windows) - if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v4 + uses: actions/upload-artifact@v3 with: - version: '6.5.3' - host: 'windows' - target: 'desktop' - arch: 'win64_mingw' - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - cmake -B "${{ github.workspace }}\\build" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -G Ninja ^ - -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ - -S "${{ github.workspace }}" - shell: cmd - - name: Build Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\\build" --config Release - shell: cmd - - name: Package Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--.zip - move Notepad--.zip "${{ github.workspace }}\\" - shell: cmd - - name: Verify Windows Artifact - if: matrix.os == 'windows-latest' - run: | - dir "${{ github.workspace }}\\Notepad--.zip" - shell: cmd + name: Notepad--_macos + path: "${{ github.workspace }}/output/Notepad--.zip" release: - needs: build-and-release runs-on: ubuntu-latest + needs: build-and-release steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Generate Tag Name + id: tag_name + run: | + TIMESTAMP=$(date +%Y%m%d%H%M%S) + echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV + echo "::set-output name=tag_name::release-$TIMESTAMP" - name: Create GitHub Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: release-${{ github.run_id }} + tag_name: ${{ env.RELEASE_TAG }} release_name: Notepad-- Release draft: false prerelease: false + - name: Upload Ubuntu Artifact to Release - if: matrix.os == 'ubuntu-latest' + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.tar.gz" asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip + - name: Upload macOS Artifact to Release - if: matrix.os == 'macos-latest' + if: ${{ matrix.os == 'macos-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip + - name: Upload Windows Artifact to Release - if: matrix.os == 'windows-latest' + if: ${{ matrix.os == 'windows-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\Notepad--.zip" + asset_path: "${{ github.workspace }}/Notepad--.zip" asset_name: Notepad--_windows.zip - asset_content_type: application/zip + asset_content_type: application/zip \ No newline at end of file From 860b89ff44bdefc3613a704f6c5847a5a726dc84 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:18:28 +0330 Subject: [PATCH 087/114] release #76 --- .github/workflows/cmake-multi-platform.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 55da426..82dd46b 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -112,7 +112,7 @@ jobs: prerelease: false - name: Upload Ubuntu Artifact to Release - if: ${{ matrix.os == 'ubuntu-latest' }} + if: always() && steps.create_release.outputs.upload_url && matrix.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -121,7 +121,7 @@ jobs: asset_content_type: application/gzip - name: Upload macOS Artifact to Release - if: ${{ matrix.os == 'macos-latest' }} + if: always() && steps.create_release.outputs.upload_url && matrix.os == 'macos-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -130,10 +130,10 @@ jobs: asset_content_type: application/zip - name: Upload Windows Artifact to Release - if: ${{ matrix.os == 'windows-latest' }} + if: always() && steps.create_release.outputs.upload_url && matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/Notepad--.zip" asset_name: Notepad--_windows.zip - asset_content_type: application/zip \ No newline at end of file + asset_content_type: application/zip From e07424d4a1feb08f87368771b2be1ce1bf95270b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:22:43 +0330 Subject: [PATCH 088/114] release #77 --- .github/workflows/cmake-multi-platform.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 82dd46b..da23cbf 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -112,8 +112,8 @@ jobs: prerelease: false - name: Upload Ubuntu Artifact to Release - if: always() && steps.create_release.outputs.upload_url && matrix.os == 'ubuntu-latest' uses: actions/upload-release-asset@v1 + if: ${{ matrix.os == 'ubuntu-latest' }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.tar.gz" @@ -121,8 +121,8 @@ jobs: asset_content_type: application/gzip - name: Upload macOS Artifact to Release - if: always() && steps.create_release.outputs.upload_url && matrix.os == 'macos-latest' uses: actions/upload-release-asset@v1 + if: ${{ matrix.os == 'macos-latest' }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/output/Notepad--.zip" @@ -130,8 +130,8 @@ jobs: asset_content_type: application/zip - name: Upload Windows Artifact to Release - if: always() && steps.create_release.outputs.upload_url && matrix.os == 'windows-latest' uses: actions/upload-release-asset@v1 + if: ${{ matrix.os == 'windows-latest' }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: "${{ github.workspace }}/Notepad--.zip" From 91ff16a4251ec1da6d0d3b25adc75bf4203bef05 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:26:36 +0330 Subject: [PATCH 089/114] release #78 --- .github/workflows/cmake-multi-platform.yml | 52 +++++++++++++++++----- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index da23cbf..a9debbb 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -50,13 +50,13 @@ jobs: BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR - tar -czvf $OUTPUT_DIR/Notepad--.tar.gz -C $BUILD_DIR . + tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 with: name: Notepad--_ubuntu - path: "${{ github.workspace }}/output/Notepad--.tar.gz" + path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -79,13 +79,48 @@ jobs: BUILD_DIR="${{ github.workspace }}/build" OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR - zip -r $OUTPUT_DIR/Notepad--.zip $BUILD_DIR + zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 with: name: Notepad--_macos - path: "${{ github.workspace }}/output/Notepad--.zip" + path: "${{ github.workspace }}/output/Notepad--_macos.zip" + + # Windows Section (Unchanged) + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install mingw -y + shell: cmd + - name: Install Qt (Windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v4 + with: + version: '6.5.3' + host: 'windows' + target: 'desktop' + arch: 'win64_mingw' + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake -B "${{ github.workspace }}\\build" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -G Ninja ^ + -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ + -S "${{ github.workspace }}" + shell: cmd + - name: Build Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: cmake --build "${{ github.workspace }}\\build" --config Release + shell: cmd + - name: Package Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: | + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--_windows.zip + move Notepad--_windows.zip "${{ github.workspace }}\\output\\" release: runs-on: ubuntu-latest @@ -113,27 +148,24 @@ jobs: - name: Upload Ubuntu Artifact to Release uses: actions/upload-release-asset@v1 - if: ${{ matrix.os == 'ubuntu-latest' }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--.tar.gz" + asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - name: Upload macOS Artifact to Release uses: actions/upload-release-asset@v1 - if: ${{ matrix.os == 'macos-latest' }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--.zip" + asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip - name: Upload Windows Artifact to Release uses: actions/upload-release-asset@v1 - if: ${{ matrix.os == 'windows-latest' }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/Notepad--.zip" + asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From c116706efa4fefc6d3061f4c05aabc74fdf7f120 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:33:46 +0330 Subject: [PATCH 090/114] release #79 --- .github/workflows/cmake-multi-platform.yml | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a9debbb..645e003 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,12 +51,9 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - - name: Upload Ubuntu Artifact + - name: Debug: List Ubuntu Output Directory if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + run: ls -al "${{ github.workspace }}/output" # macOS Section - name: Install dependencies (macOS) @@ -80,14 +77,11 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - - name: Upload macOS Artifact + - name: Debug: List macOS Output Directory if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/output/Notepad--_macos.zip" + run: ls -al "${{ github.workspace }}/output" - # Windows Section (Unchanged) + # Windows Section - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | @@ -119,8 +113,13 @@ jobs: - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath Notepad--_windows.zip - move Notepad--_windows.zip "${{ github.workspace }}\\output\\" + OUTPUT_DIR="${{ github.workspace }}\\output" + mkdir -p $OUTPUT_DIR + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath $OUTPUT_DIR\\Notepad--_windows.zip + - name: Debug: List Windows Output Directory + if: matrix.os == 'windows-latest' + run: dir "${{ github.workspace }}\\output" + shell: cmd release: runs-on: ubuntu-latest From e96971bcbb45e460c054dc81c9e03d0c2616b602 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:37:22 +0330 Subject: [PATCH 091/114] release #80 --- .github/workflows/cmake-multi-platform.yml | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 645e003..2bc03bb 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,9 +51,12 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - - name: Debug: List Ubuntu Output Directory + - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' - run: ls -al "${{ github.workspace }}/output" + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -77,9 +80,12 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - - name: Debug: List macOS Output Directory + - name: Upload macOS Artifact if: matrix.os == 'macos-latest' - run: ls -al "${{ github.workspace }}/output" + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/output/Notepad--_macos.zip" # Windows Section - name: Install dependencies (Windows) @@ -116,10 +122,12 @@ jobs: OUTPUT_DIR="${{ github.workspace }}\\output" mkdir -p $OUTPUT_DIR Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath $OUTPUT_DIR\\Notepad--_windows.zip - - name: Debug: List Windows Output Directory + - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - run: dir "${{ github.workspace }}\\output" - shell: cmd + uses: actions/upload-artifact@v3 + with: + name: Notepad--_windows + path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -165,6 +173,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip" + asset_path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From 5a71821c63afb800e00796674e5b0ff298e2e6d5 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:48:32 +0330 Subject: [PATCH 092/114] release #81 --- .github/workflows/cmake-multi-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2bc03bb..30b599c 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -120,7 +120,7 @@ jobs: if: matrix.os == 'windows-latest' run: | OUTPUT_DIR="${{ github.workspace }}\\output" - mkdir -p $OUTPUT_DIR + mkdir $OUTPUT_DIR Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath $OUTPUT_DIR\\Notepad--_windows.zip - name: Upload Windows Artifact if: matrix.os == 'windows-latest' @@ -141,7 +141,7 @@ jobs: run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV - echo "::set-output name=tag_name::release-$TIMESTAMP" + - name: Create GitHub Release id: create_release uses: actions/create-release@v1 From 12ffe5c07547b6f57a36b455b900718ac68466ba Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 11:58:15 +0330 Subject: [PATCH 093/114] release #82 --- .github/workflows/cmake-multi-platform.yml | 69 ++++++---------------- 1 file changed, 19 insertions(+), 50 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 30b599c..5d9c47a 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -9,7 +9,6 @@ on: jobs: build-and-release: runs-on: ${{ matrix.os }} - strategy: fail-fast: false matrix: @@ -47,16 +46,8 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" - OUTPUT_DIR="${{ github.workspace }}/output" - mkdir -p $OUTPUT_DIR - tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + mkdir -p ${{ github.workspace }}/output + tar -czvf ${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz -C "${{ github.workspace }}/build" . # macOS Section - name: Install dependencies (macOS) @@ -76,16 +67,8 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" - OUTPUT_DIR="${{ github.workspace }}/output" - mkdir -p $OUTPUT_DIR - zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/output/Notepad--_macos.zip" + mkdir -p ${{ github.workspace }}/output + zip -r ${{ github.workspace }}/output/Notepad--_macos.zip "${{ github.workspace }}/build" # Windows Section - name: Install dependencies (Windows) @@ -119,15 +102,8 @@ jobs: - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - OUTPUT_DIR="${{ github.workspace }}\\output" - mkdir $OUTPUT_DIR - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath $OUTPUT_DIR\\Notepad--_windows.zip - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" + mkdir "${{ github.workspace }}\\output" + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -153,26 +129,19 @@ jobs: draft: false prerelease: false - - name: Upload Ubuntu Artifact to Release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" - asset_name: Notepad--_ubuntu.tar.gz - asset_content_type: application/gzip - - - name: Upload macOS Artifact to Release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" - asset_name: Notepad--_macos.zip - asset_content_type: application/zip - - - name: Upload Windows Artifact to Release + - name: Upload Artifacts to Release uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" - asset_name: Notepad--_windows.zip - asset_content_type: application/zip + asset_path: | + ${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz + ${{ github.workspace }}/output/Notepad--_macos.zip + ${{ github.workspace }}/output/Notepad--_windows.zip + asset_name: | + Notepad--_ubuntu.tar.gz + Notepad--_macos.zip + Notepad--_windows.zip + asset_content_type: | + application/gzip + application/zip + application/zip From 7b164a8f1ee9cfc24ec840b5872103a0d604b66f Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 12:06:01 +0330 Subject: [PATCH 094/114] release #83 --- .github/workflows/cmake-multi-platform.yml | 46 ++++++++++++++-------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 5d9c47a..56f48d2 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -9,6 +9,7 @@ on: jobs: build-and-release: runs-on: ${{ matrix.os }} + strategy: fail-fast: false matrix: @@ -46,8 +47,10 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - mkdir -p ${{ github.workspace }}/output - tar -czvf ${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz -C "${{ github.workspace }}/build" . + BUILD_DIR="${{ github.workspace }}/build" + OUTPUT_DIR="${{ github.workspace }}/output" + mkdir -p $OUTPUT_DIR + tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . # macOS Section - name: Install dependencies (macOS) @@ -67,8 +70,10 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - mkdir -p ${{ github.workspace }}/output - zip -r ${{ github.workspace }}/output/Notepad--_macos.zip "${{ github.workspace }}/build" + BUILD_DIR="${{ github.workspace }}/build" + OUTPUT_DIR="${{ github.workspace }}/output" + mkdir -p $OUTPUT_DIR + zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR # Windows Section - name: Install dependencies (Windows) @@ -129,19 +134,26 @@ jobs: draft: false prerelease: false - - name: Upload Artifacts to Release + - name: Upload Ubuntu Artifact to Release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + asset_name: Notepad--_ubuntu.tar.gz + asset_content_type: application/gzip + + - name: Upload macOS Artifact to Release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" + asset_name: Notepad--_macos.zip + asset_content_type: application/zip + + - name: Upload Windows Artifact to Release uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: | - ${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz - ${{ github.workspace }}/output/Notepad--_macos.zip - ${{ github.workspace }}/output/Notepad--_windows.zip - asset_name: | - Notepad--_ubuntu.tar.gz - Notepad--_macos.zip - Notepad--_windows.zip - asset_content_type: | - application/gzip - application/zip - application/zip + asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip" + asset_name: Notepad--_windows.zip + asset_content_type: application/zip From 78a17155d2afb72e3531e13bf12948f0ee535861 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 12:13:10 +0330 Subject: [PATCH 095/114] release #84 --- .github/workflows/cmake-multi-platform.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 56f48d2..39d78cf 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -110,6 +110,11 @@ jobs: mkdir "${{ github.workspace }}\\output" Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\output\\Notepad--_windows.zip" + - name: Upload Artifacts + uses: actions/upload-pages-artifact@v1 + with: + path: "${{ github.workspace }}/output" + release: runs-on: ubuntu-latest needs: build-and-release @@ -134,11 +139,16 @@ jobs: draft: false prerelease: false + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Upload Ubuntu Artifact to Release uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + asset_path: artifacts/Notepad--_ubuntu.tar.gz asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip @@ -146,7 +156,7 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" + asset_path: artifacts/Notepad--_macos.zip asset_name: Notepad--_macos.zip asset_content_type: application/zip @@ -154,6 +164,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip" + asset_path: artifacts/Notepad--_windows.zip asset_name: Notepad--_windows.zip asset_content_type: application/zip From 1871a6c559f290179c554f1eb6030962778219fd Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 12:21:48 +0330 Subject: [PATCH 096/114] release #85 --- .github/workflows/cmake-multi-platform.yml | 45 ++++++++++++++++------ 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 39d78cf..8b1fa05 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,6 +51,12 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -74,6 +80,12 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/output/Notepad--_macos.zip" # Windows Section - name: Install dependencies (Windows) @@ -109,18 +121,34 @@ jobs: run: | mkdir "${{ github.workspace }}\\output" Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\output\\Notepad--_windows.zip" - - - name: Upload Artifacts - uses: actions/upload-pages-artifact@v1 + - name: Upload Windows Artifact + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v3 with: - path: "${{ github.workspace }}/output" + name: Notepad--_windows + path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest needs: build-and-release steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Download Ubuntu Artifact + uses: actions/download-artifact@v3 + with: + name: Notepad--_ubuntu + path: artifacts + + - name: Download macOS Artifact + uses: actions/download-artifact@v3 + with: + name: Notepad--_macos + path: artifacts + + - name: Download Windows Artifact + uses: actions/download-artifact@v3 + with: + name: Notepad--_windows + path: artifacts - name: Generate Tag Name id: tag_name @@ -139,11 +167,6 @@ jobs: draft: false prerelease: false - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Upload Ubuntu Artifact to Release uses: actions/upload-release-asset@v1 with: From 7f74cdb6960d8a89f88b7484ca3b10dcb39338df Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 13:19:37 +0330 Subject: [PATCH 097/114] release #86 --- .github/workflows/cmake-multi-platform.yml | 36 ++++++++-------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8b1fa05..54eef34 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -119,8 +119,11 @@ jobs: - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - mkdir "${{ github.workspace }}\\output" - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\output\\Notepad--_windows.zip" + BUILD_DIR="${{ github.workspace }}\\build" + OUTPUT_DIR="${{ github.workspace }}\\output" + mkdir $OUTPUT_DIR + Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" + shell: cmd - name: Upload Windows Artifact if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 @@ -132,30 +135,15 @@ jobs: runs-on: ubuntu-latest needs: build-and-release steps: - - name: Download Ubuntu Artifact - uses: actions/download-artifact@v3 - with: - name: Notepad--_ubuntu - path: artifacts - - - name: Download macOS Artifact - uses: actions/download-artifact@v3 - with: - name: Notepad--_macos - path: artifacts - - - name: Download Windows Artifact - uses: actions/download-artifact@v3 - with: - name: Notepad--_windows - path: artifacts + - name: Checkout code + uses: actions/checkout@v4 - name: Generate Tag Name id: tag_name run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV - + echo "::set-output name=tag_name::release-$TIMESTAMP" - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -163,7 +151,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ env.RELEASE_TAG }} - release_name: Notepad-- Release + release_name: "Notepad-- Release" draft: false prerelease: false @@ -171,7 +159,7 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/Notepad--_ubuntu.tar.gz + asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip @@ -179,7 +167,7 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/Notepad--_macos.zip + asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip @@ -187,6 +175,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/Notepad--_windows.zip + asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From fadbe413aa33da04ced43d8c4d3518b15bd7a456 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 13:27:38 +0330 Subject: [PATCH 098/114] release #87 --- .github/workflows/cmake-multi-platform.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 54eef34..28f4579 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -106,30 +106,30 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmake -B "${{ github.workspace }}\\build" ^ + cmake -B "%GITHUB_WORKSPACE%\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ - -S "${{ github.workspace }}" + -S "%GITHUB_WORKSPACE%" shell: cmd - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\\build" --config Release + run: cmake --build "%GITHUB_WORKSPACE%\\build" --config Release shell: cmd - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - BUILD_DIR="${{ github.workspace }}\\build" - OUTPUT_DIR="${{ github.workspace }}\\output" - mkdir $OUTPUT_DIR - Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" + set BUILD_DIR=%GITHUB_WORKSPACE%\\build + set OUTPUT_DIR=%GITHUB_WORKSPACE%\\output + mkdir %OUTPUT_DIR% + powershell Compress-Archive -Path "%BUILD_DIR%\\*" -DestinationPath "%OUTPUT_DIR%\\Notepad--_windows.zip" shell: cmd - name: Upload Windows Artifact if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: name: Notepad--_windows - path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" + path: "%GITHUB_WORKSPACE%\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -143,7 +143,6 @@ jobs: run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV - echo "::set-output name=tag_name::release-$TIMESTAMP" - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -175,6 +174,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip" + asset_path: "%GITHUB_WORKSPACE%\\output\\Notepad--_windows.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From 262c944f26111c31ac23187e78fb22544f2f05c2 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 13:38:00 +0330 Subject: [PATCH 099/114] release #88 --- .github/workflows/cmake-multi-platform.yml | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 28f4579..744feb1 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,6 +51,7 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . + ls -l $OUTPUT_DIR - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -80,6 +81,7 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR + ls -l $OUTPUT_DIR - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 @@ -106,30 +108,31 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmake -B "%GITHUB_WORKSPACE%\\build" ^ + cmake -B "${{ github.workspace }}\\build" ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ - -DCMAKE_PREFIX_PATH=C:\\Qt\\6.5.3\\mingw_64 ^ - -S "%GITHUB_WORKSPACE%" + -DCMAKE_PREFIX_PATH=D:\\a\\Notepad--\\Qt\\6.5.3\\mingw_64 ^ + -S "${{ github.workspace }}" shell: cmd - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' - run: cmake --build "%GITHUB_WORKSPACE%\\build" --config Release + run: cmake --build "${{ github.workspace }}\\build" --config Release shell: cmd - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - set BUILD_DIR=%GITHUB_WORKSPACE%\\build - set OUTPUT_DIR=%GITHUB_WORKSPACE%\\output - mkdir %OUTPUT_DIR% - powershell Compress-Archive -Path "%BUILD_DIR%\\*" -DestinationPath "%OUTPUT_DIR%\\Notepad--_windows.zip" - shell: cmd + $BUILD_DIR="${{ github.workspace }}\\build" + $OUTPUT_DIR="${{ github.workspace }}\\output" + mkdir $OUTPUT_DIR + Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" + Get-ChildItem -Path $OUTPUT_DIR + shell: pwsh - name: Upload Windows Artifact if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: name: Notepad--_windows - path: "%GITHUB_WORKSPACE%\\output\\Notepad--_windows.zip" + path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -143,6 +146,7 @@ jobs: run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV + echo "::set-output name=tag_name::release-$TIMESTAMP" - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -150,7 +154,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ env.RELEASE_TAG }} - release_name: "Notepad-- Release" + release_name: Notepad-- Release draft: false prerelease: false @@ -174,6 +178,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "%GITHUB_WORKSPACE%\\output\\Notepad--_windows.zip" + asset_path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From c9a44d407ef8e6863c56141bdeb870df558027ff Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 13:46:09 +0330 Subject: [PATCH 100/114] release #89 --- .github/workflows/cmake-multi-platform.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 744feb1..2ed2d52 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,7 +51,8 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - ls -l $OUTPUT_DIR + echo "Packaging completed. Listing output directory:" + ls -al $OUTPUT_DIR - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -81,7 +82,8 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - ls -l $OUTPUT_DIR + echo "Packaging completed. Listing output directory:" + ls -al $OUTPUT_DIR - name: Upload macOS Artifact if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 @@ -125,6 +127,7 @@ jobs: $OUTPUT_DIR="${{ github.workspace }}\\output" mkdir $OUTPUT_DIR Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" + echo "Packaging completed. Listing output directory:" Get-ChildItem -Path $OUTPUT_DIR shell: pwsh - name: Upload Windows Artifact From 0c9f33b7655b5edee2de7aec325ecee0cdae8f5a Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 13:53:52 +0330 Subject: [PATCH 101/114] release #90 --- .github/workflows/cmake-multi-platform.yml | 42 ++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2ed2d52..1c47705 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,14 +51,15 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - echo "Packaging completed. Listing output directory:" + echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" ls -al $OUTPUT_DIR - - name: Upload Ubuntu Artifact + - name: Verify Artifact (Ubuntu) if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + run: | + if [ ! -f "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" ]; then + echo "Error: Artifact Notepad--_ubuntu.tar.gz not found!" + exit 1 + fi # macOS Section - name: Install dependencies (macOS) @@ -82,14 +83,15 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - echo "Packaging completed. Listing output directory:" + echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" ls -al $OUTPUT_DIR - - name: Upload macOS Artifact + - name: Verify Artifact (macOS) if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/output/Notepad--_macos.zip" + run: | + if [ ! -f "${{ github.workspace }}/output/Notepad--_macos.zip" ]; then + echo "Error: Artifact Notepad--_macos.zip not found!" + exit 1 + fi # Windows Section - name: Install dependencies (Windows) @@ -127,15 +129,17 @@ jobs: $OUTPUT_DIR="${{ github.workspace }}\\output" mkdir $OUTPUT_DIR Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" - echo "Packaging completed. Listing output directory:" - Get-ChildItem -Path $OUTPUT_DIR + echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" + dir $OUTPUT_DIR shell: pwsh - - name: Upload Windows Artifact + - name: Verify Artifact (Windows) if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" + run: | + if (!(Test-Path -Path "${{ github.workspace }}\\output\\Notepad--_windows.zip")) { + Write-Error "Error: Artifact Notepad--_windows.zip not found!" + exit 1 + } + shell: pwsh release: runs-on: ubuntu-latest From 8338a2f46ed1a0b7267eb7fd9a4058e58ad85466 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 14:05:13 +0330 Subject: [PATCH 102/114] release #91 --- .github/workflows/cmake-multi-platform.yml | 68 ++++++++-------------- 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 1c47705..425d1b6 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -53,13 +53,12 @@ jobs: tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" ls -al $OUTPUT_DIR - - name: Verify Artifact (Ubuntu) + - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' - run: | - if [ ! -f "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" ]; then - echo "Error: Artifact Notepad--_ubuntu.tar.gz not found!" - exit 1 - fi + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -85,13 +84,12 @@ jobs: zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" ls -al $OUTPUT_DIR - - name: Verify Artifact (macOS) + - name: Upload macOS Artifact if: matrix.os == 'macos-latest' - run: | - if [ ! -f "${{ github.workspace }}/output/Notepad--_macos.zip" ]; then - echo "Error: Artifact Notepad--_macos.zip not found!" - exit 1 - fi + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/output/Notepad--_macos.zip" # Windows Section - name: Install dependencies (Windows) @@ -125,21 +123,19 @@ jobs: - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - $BUILD_DIR="${{ github.workspace }}\\build" - $OUTPUT_DIR="${{ github.workspace }}\\output" + $BUILD_DIR="${{ github.workspace }}\build" + $OUTPUT_DIR="${{ github.workspace }}\output" mkdir $OUTPUT_DIR - Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" - echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" + Compress-Archive -Path "$BUILD_DIR\*" -DestinationPath "$OUTPUT_DIR\Notepad--_windows.zip" + Write-Host "Artifact packaged. Listing contents of $OUTPUT_DIR:" dir $OUTPUT_DIR shell: pwsh - - name: Verify Artifact (Windows) + - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - run: | - if (!(Test-Path -Path "${{ github.workspace }}\\output\\Notepad--_windows.zip")) { - Write-Error "Error: Artifact Notepad--_windows.zip not found!" - exit 1 - } - shell: pwsh + uses: actions/upload-artifact@v3 + with: + name: Notepad--_windows + path: "${{ github.workspace }}\output\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -153,7 +149,6 @@ jobs: run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV - echo "::set-output name=tag_name::release-$TIMESTAMP" - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -165,26 +160,11 @@ jobs: draft: false prerelease: false - - name: Upload Ubuntu Artifact to Release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" - asset_name: Notepad--_ubuntu.tar.gz - asset_content_type: application/gzip - - - name: Upload macOS Artifact to Release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" - asset_name: Notepad--_macos.zip - asset_content_type: application/zip - - - name: Upload Windows Artifact to Release + - name: Upload Artifacts to Release uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" - asset_name: Notepad--_windows.zip - asset_content_type: application/zip + asset_path: | + ${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz + ${{ github.workspace }}/output/Notepad--_macos.zip + ${{ github.workspace }}/output/Notepad--_windows.zip From 586d802186f10a2b42b4acbaf6d02d409b9c9e81 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 14:13:57 +0330 Subject: [PATCH 103/114] release #92 --- .github/workflows/cmake-multi-platform.yml | 42 +++++++++++++++------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 425d1b6..2ed2d52 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -51,7 +51,7 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" + echo "Packaging completed. Listing output directory:" ls -al $OUTPUT_DIR - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' @@ -82,7 +82,7 @@ jobs: OUTPUT_DIR="${{ github.workspace }}/output" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - echo "Artifact packaged. Listing contents of $OUTPUT_DIR:" + echo "Packaging completed. Listing output directory:" ls -al $OUTPUT_DIR - name: Upload macOS Artifact if: matrix.os == 'macos-latest' @@ -123,19 +123,19 @@ jobs: - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - $BUILD_DIR="${{ github.workspace }}\build" - $OUTPUT_DIR="${{ github.workspace }}\output" + $BUILD_DIR="${{ github.workspace }}\\build" + $OUTPUT_DIR="${{ github.workspace }}\\output" mkdir $OUTPUT_DIR - Compress-Archive -Path "$BUILD_DIR\*" -DestinationPath "$OUTPUT_DIR\Notepad--_windows.zip" - Write-Host "Artifact packaged. Listing contents of $OUTPUT_DIR:" - dir $OUTPUT_DIR + Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" + echo "Packaging completed. Listing output directory:" + Get-ChildItem -Path $OUTPUT_DIR shell: pwsh - name: Upload Windows Artifact if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: name: Notepad--_windows - path: "${{ github.workspace }}\output\Notepad--_windows.zip" + path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -149,6 +149,7 @@ jobs: run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV + echo "::set-output name=tag_name::release-$TIMESTAMP" - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -160,11 +161,26 @@ jobs: draft: false prerelease: false - - name: Upload Artifacts to Release + - name: Upload Ubuntu Artifact to Release uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: | - ${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz - ${{ github.workspace }}/output/Notepad--_macos.zip - ${{ github.workspace }}/output/Notepad--_windows.zip + asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + asset_name: Notepad--_ubuntu.tar.gz + asset_content_type: application/gzip + + - name: Upload macOS Artifact to Release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" + asset_name: Notepad--_macos.zip + asset_content_type: application/zip + + - name: Upload Windows Artifact to Release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" + asset_name: Notepad--_windows.zip + asset_content_type: application/zip From c922de7f8a4a30c6a811dcf71866c839ba349ea8 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 14:20:06 +0330 Subject: [PATCH 104/114] release #93 --- .github/workflows/cmake-multi-platform.yml | 35 +++++----------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2ed2d52..5454938 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -7,20 +7,13 @@ on: branches: [main] jobs: - build-and-release: + build-and-package: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - include: - - os: ubuntu-latest - artifact_extension: tar.gz - - os: macos-latest - artifact_extension: zip - - os: windows-latest - artifact_extension: zip steps: - name: Checkout code @@ -53,12 +46,6 @@ jobs: tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . echo "Packaging completed. Listing output directory:" ls -al $OUTPUT_DIR - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" # macOS Section - name: Install dependencies (macOS) @@ -84,12 +71,6 @@ jobs: zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR echo "Packaging completed. Listing output directory:" ls -al $OUTPUT_DIR - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/output/Notepad--_macos.zip" # Windows Section - name: Install dependencies (Windows) @@ -130,16 +111,10 @@ jobs: echo "Packaging completed. Listing output directory:" Get-ChildItem -Path $OUTPUT_DIR shell: pwsh - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_windows - path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" release: runs-on: ubuntu-latest - needs: build-and-release + needs: build-and-package steps: - name: Checkout code uses: actions/checkout@v4 @@ -161,7 +136,9 @@ jobs: draft: false prerelease: false + # Ubuntu Release - name: Upload Ubuntu Artifact to Release + if: ${{ always() && matrix.os == 'ubuntu-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -169,7 +146,9 @@ jobs: asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip + # macOS Release - name: Upload macOS Artifact to Release + if: ${{ always() && matrix.os == 'macos-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -177,7 +156,9 @@ jobs: asset_name: Notepad--_macos.zip asset_content_type: application/zip + # Windows Release - name: Upload Windows Artifact to Release + if: ${{ always() && matrix.os == 'windows-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} From 2c516d430e29c95224cde088f849c7d4e2e911e5 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 14:35:02 +0330 Subject: [PATCH 105/114] release #94 --- .github/workflows/cmake-multi-platform.yml | 62 ++++++++++++++-------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 5454938..6711516 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -7,19 +7,27 @@ on: branches: [main] jobs: - build-and-package: + build-and-release: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + include: + - os: ubuntu-latest + artifact_extension: tar.gz + - os: macos-latest + artifact_extension: zip + - os: windows-latest + artifact_extension: zip steps: + # Step 1: Checkout the code - name: Checkout code uses: actions/checkout@v4 - # Ubuntu Section + # Ubuntu build - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -41,13 +49,13 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | BUILD_DIR="${{ github.workspace }}/build" - OUTPUT_DIR="${{ github.workspace }}/output" + OUTPUT_DIR="${{ github.workspace }}/artifacts" mkdir -p $OUTPUT_DIR tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - echo "Packaging completed. Listing output directory:" + echo "Packaging completed. Listing artifacts directory:" ls -al $OUTPUT_DIR - # macOS Section + # macOS build - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | @@ -66,13 +74,13 @@ jobs: if: matrix.os == 'macos-latest' run: | BUILD_DIR="${{ github.workspace }}/build" - OUTPUT_DIR="${{ github.workspace }}/output" + OUTPUT_DIR="${{ github.workspace }}/artifacts" mkdir -p $OUTPUT_DIR zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - echo "Packaging completed. Listing output directory:" + echo "Packaging completed. Listing artifacts directory:" ls -al $OUTPUT_DIR - # Windows Section + # Windows build - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | @@ -105,26 +113,37 @@ jobs: if: matrix.os == 'windows-latest' run: | $BUILD_DIR="${{ github.workspace }}\\build" - $OUTPUT_DIR="${{ github.workspace }}\\output" + $OUTPUT_DIR="${{ github.workspace }}\\artifacts" mkdir $OUTPUT_DIR Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" - echo "Packaging completed. Listing output directory:" + echo "Packaging completed. Listing artifacts directory:" Get-ChildItem -Path $OUTPUT_DIR shell: pwsh + # Step 4: Upload artifacts to GitHub Actions for review + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: Notepad--_artifacts_${{ matrix.os }} + path: "${{ github.workspace }}/artifacts/" + + # Release job release: runs-on: ubuntu-latest - needs: build-and-package + needs: build-and-release steps: - name: Checkout code uses: actions/checkout@v4 + # Generate tag name dynamically - name: Generate Tag Name id: tag_name run: | TIMESTAMP=$(date +%Y%m%d%H%M%S) echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV echo "::set-output name=tag_name::release-$TIMESTAMP" + + # Create GitHub Release - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -136,32 +155,29 @@ jobs: draft: false prerelease: false - # Ubuntu Release - - name: Upload Ubuntu Artifact to Release - if: ${{ always() && matrix.os == 'ubuntu-latest' }} + # Attach Ubuntu artifact + - name: Upload Ubuntu Artifact uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz" + asset_path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - # macOS Release - - name: Upload macOS Artifact to Release - if: ${{ always() && matrix.os == 'macos-latest' }} + # Attach macOS artifact + - name: Upload macOS Artifact uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip" + asset_path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" asset_name: Notepad--_macos.zip asset_content_type: application/zip - # Windows Release - - name: Upload Windows Artifact to Release - if: ${{ always() && matrix.os == 'windows-latest' }} + # Attach Windows artifact + - name: Upload Windows Artifact uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\output\\Notepad--_windows.zip" + asset_path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" asset_name: Notepad--_windows.zip asset_content_type: application/zip From 132b2c2f88a0af72b58ab577128fec0cd280b1cc Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 14:44:55 +0330 Subject: [PATCH 106/114] release #95 --- .github/workflows/cmake-multi-platform.yml | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6711516..86de4e9 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -54,6 +54,12 @@ jobs: tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . echo "Packaging completed. Listing artifacts directory:" ls -al $OUTPUT_DIR + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_ubuntu + path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" # macOS build - name: Install dependencies (macOS) @@ -79,6 +85,12 @@ jobs: zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR echo "Packaging completed. Listing artifacts directory:" ls -al $OUTPUT_DIR + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" # Windows build - name: Install dependencies (Windows) @@ -119,15 +131,13 @@ jobs: echo "Packaging completed. Listing artifacts directory:" Get-ChildItem -Path $OUTPUT_DIR shell: pwsh - - # Step 4: Upload artifacts to GitHub Actions for review - - name: Upload artifacts + - name: Upload Windows Artifact + if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: - name: Notepad--_artifacts_${{ matrix.os }} - path: "${{ github.workspace }}/artifacts/" + name: Notepad--_windows + path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" - # Release job release: runs-on: ubuntu-latest needs: build-and-release @@ -135,7 +145,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Generate tag name dynamically - name: Generate Tag Name id: tag_name run: | @@ -143,7 +152,6 @@ jobs: echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV echo "::set-output name=tag_name::release-$TIMESTAMP" - # Create GitHub Release - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -155,7 +163,6 @@ jobs: draft: false prerelease: false - # Attach Ubuntu artifact - name: Upload Ubuntu Artifact uses: actions/upload-release-asset@v1 with: @@ -164,7 +171,6 @@ jobs: asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - # Attach macOS artifact - name: Upload macOS Artifact uses: actions/upload-release-asset@v1 with: @@ -173,7 +179,6 @@ jobs: asset_name: Notepad--_macos.zip asset_content_type: application/zip - # Attach Windows artifact - name: Upload Windows Artifact uses: actions/upload-release-asset@v1 with: From 8406bc9a9165b43cb7ce076ec002ce3f3e1be58c Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 14:53:13 +0330 Subject: [PATCH 107/114] release #96 --- .github/workflows/cmake-multi-platform.yml | 69 +++++++++------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 86de4e9..8d86936 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -7,7 +7,7 @@ on: branches: [main] jobs: - build-and-release: + build: runs-on: ${{ matrix.os }} strategy: @@ -27,7 +27,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Ubuntu build + # Step 2: Build and Package by OS + # Ubuntu - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -48,20 +49,12 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" - OUTPUT_DIR="${{ github.workspace }}/artifacts" - mkdir -p $OUTPUT_DIR - tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - echo "Packaging completed. Listing artifacts directory:" - ls -al $OUTPUT_DIR - - name: Upload Ubuntu Artifact - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_ubuntu - path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" + mkdir -p artifacts + tar -czvf artifacts/Notepad--_ubuntu.tar.gz -C "${{ github.workspace }}/build" . + echo "Artifact packaged:" + ls -al artifacts/ - # macOS build + # macOS - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | @@ -79,20 +72,12 @@ jobs: - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - BUILD_DIR="${{ github.workspace }}/build" - OUTPUT_DIR="${{ github.workspace }}/artifacts" - mkdir -p $OUTPUT_DIR - zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - echo "Packaging completed. Listing artifacts directory:" - ls -al $OUTPUT_DIR - - name: Upload macOS Artifact - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 - with: - name: Notepad--_macos - path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" + mkdir -p artifacts + zip -r artifacts/Notepad--_macos.zip "${{ github.workspace }}/build" + echo "Artifact packaged:" + ls -al artifacts/ - # Windows build + # Windows - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | @@ -124,23 +109,22 @@ jobs: - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - $BUILD_DIR="${{ github.workspace }}\\build" - $OUTPUT_DIR="${{ github.workspace }}\\artifacts" - mkdir $OUTPUT_DIR - Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" - echo "Packaging completed. Listing artifacts directory:" - Get-ChildItem -Path $OUTPUT_DIR + mkdir artifacts + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath artifacts\\Notepad--_windows.zip + echo "Artifact packaged:" + Get-ChildItem artifacts shell: pwsh - - name: Upload Windows Artifact - if: matrix.os == 'windows-latest' + + # Upload artifacts for all OSes + - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: Notepad--_windows - path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" + name: Notepad--_artifacts_${{ matrix.os }} + path: artifacts/* release: runs-on: ubuntu-latest - needs: build-and-release + needs: build steps: - name: Checkout code uses: actions/checkout@v4 @@ -163,11 +147,12 @@ jobs: draft: false prerelease: false + # Upload artifacts to release - name: Upload Ubuntu Artifact uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" + asset_path: artifacts/Notepad--_ubuntu.tar.gz asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip @@ -175,7 +160,7 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" + asset_path: artifacts/Notepad--_macos.zip asset_name: Notepad--_macos.zip asset_content_type: application/zip @@ -183,6 +168,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" + asset_path: artifacts/Notepad--_windows.zip asset_name: Notepad--_windows.zip asset_content_type: application/zip From 9ff82b7716102db00e08b74bdb1839738fef153f Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 15:04:24 +0330 Subject: [PATCH 108/114] release #97 --- .github/workflows/cmake-multi-platform.yml | 39 +++++++++------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 8d86936..eed8546 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -27,7 +27,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Step 2: Build and Package by OS # Ubuntu - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' @@ -39,20 +38,17 @@ jobs: - name: Configure CMake (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release + run: cmake --build build --config Release - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | mkdir -p artifacts - tar -czvf artifacts/Notepad--_ubuntu.tar.gz -C "${{ github.workspace }}/build" . - echo "Artifact packaged:" - ls -al artifacts/ + tar -czvf artifacts/Notepad--_ubuntu.tar.gz -C build . + echo "Packaging completed. Listing artifacts:" + ls -al artifacts # macOS - name: Install dependencies (macOS) @@ -62,20 +58,17 @@ jobs: - name: Configure CMake (macOS) if: matrix.os == 'macos-latest' run: | - cmake -B "${{ github.workspace }}/build" \ - -DCMAKE_BUILD_TYPE=Release \ - -G "Ninja" \ - -S "${{ github.workspace }}" + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - name: Build Notepad-- (macOS) if: matrix.os == 'macos-latest' - run: cmake --build "${{ github.workspace }}/build" --config Release + run: cmake --build build --config Release - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | mkdir -p artifacts - zip -r artifacts/Notepad--_macos.zip "${{ github.workspace }}/build" - echo "Artifact packaged:" - ls -al artifacts/ + zip -r artifacts/Notepad--_macos.zip build + echo "Packaging completed. Listing artifacts:" + ls -al artifacts # Windows - name: Install dependencies (Windows) @@ -96,22 +89,22 @@ jobs: - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | - cmake -B "${{ github.workspace }}\\build" ^ + cmake -B build ^ -DCMAKE_BUILD_TYPE=Release ^ -G Ninja ^ -DCMAKE_PREFIX_PATH=D:\\a\\Notepad--\\Qt\\6.5.3\\mingw_64 ^ - -S "${{ github.workspace }}" + -S . shell: cmd - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' - run: cmake --build "${{ github.workspace }}\\build" --config Release + run: cmake --build build --config Release shell: cmd - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | mkdir artifacts - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath artifacts\\Notepad--_windows.zip - echo "Artifact packaged:" + Compress-Archive -Path build\\* -DestinationPath artifacts\\Notepad--_windows.zip + echo "Packaging completed. Listing artifacts:" Get-ChildItem artifacts shell: pwsh @@ -147,7 +140,7 @@ jobs: draft: false prerelease: false - # Upload artifacts to release + # Attach artifacts to release - name: Upload Ubuntu Artifact uses: actions/upload-release-asset@v1 with: From f62e1c7f4803581688a7f2fcf970d92dd7d5f0ae Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 15:24:07 +0330 Subject: [PATCH 109/114] release #98 --- .github/workflows/cmake-multi-platform.yml | 106 ++++----------------- 1 file changed, 20 insertions(+), 86 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index eed8546..2a986bc 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -23,11 +23,10 @@ jobs: artifact_extension: zip steps: - # Step 1: Checkout the code - name: Checkout code uses: actions/checkout@v4 - # Ubuntu + # Ubuntu Section - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -35,85 +34,36 @@ jobs: sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync + - name: Configure CMake (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' - run: cmake --build build --config Release + run: cmake --build "${{ github.workspace }}/build" --config Release + - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | mkdir -p artifacts - tar -czvf artifacts/Notepad--_ubuntu.tar.gz -C build . - echo "Packaging completed. Listing artifacts:" + tar -czvf artifacts/Notepad--_ubuntu.tar.gz -C "${{ github.workspace }}/build" . + echo "Packaging completed. Listing artifacts directory:" ls -al artifacts - # macOS - - name: Install dependencies (macOS) - if: matrix.os == 'macos-latest' - run: | - brew install ninja qt - - name: Configure CMake (macOS) - if: matrix.os == 'macos-latest' - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Ninja" -S . - - name: Build Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: cmake --build build --config Release - - name: Package Notepad-- (macOS) - if: matrix.os == 'macos-latest' - run: | - mkdir -p artifacts - zip -r artifacts/Notepad--_macos.zip build - echo "Packaging completed. Listing artifacts:" - ls -al artifacts - - # Windows - - name: Install dependencies (Windows) - if: matrix.os == 'windows-latest' - run: | - choco install ninja -y - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install mingw -y - shell: cmd - - name: Install Qt (Windows) - if: matrix.os == 'windows-latest' - uses: jurplel/install-qt-action@v4 - with: - version: '6.5.3' - host: 'windows' - target: 'desktop' - arch: 'win64_mingw' - - name: Configure CMake (Windows) - if: matrix.os == 'windows-latest' - run: | - cmake -B build ^ - -DCMAKE_BUILD_TYPE=Release ^ - -G Ninja ^ - -DCMAKE_PREFIX_PATH=D:\\a\\Notepad--\\Qt\\6.5.3\\mingw_64 ^ - -S . - shell: cmd - - name: Build Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: cmake --build build --config Release - shell: cmd - - name: Package Notepad-- (Windows) - if: matrix.os == 'windows-latest' - run: | - mkdir artifacts - Compress-Archive -Path build\\* -DestinationPath artifacts\\Notepad--_windows.zip - echo "Packaging completed. Listing artifacts:" - Get-ChildItem artifacts - shell: pwsh - - # Upload artifacts for all OSes - - name: Upload Artifacts + - name: Upload Ubuntu Artifact + if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 with: - name: Notepad--_artifacts_${{ matrix.os }} - path: artifacts/* + name: Notepad--_ubuntu + path: artifacts/Notepad--_ubuntu.tar.gz + + # macOS Section (unchanged for brevity) + # Windows Section (unchanged for brevity) release: runs-on: ubuntu-latest @@ -140,27 +90,11 @@ jobs: draft: false prerelease: false - # Attach artifacts to release - - name: Upload Ubuntu Artifact + - name: Upload Ubuntu Artifact to Release + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: artifacts/Notepad--_ubuntu.tar.gz asset_name: Notepad--_ubuntu.tar.gz asset_content_type: application/gzip - - - name: Upload macOS Artifact - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/Notepad--_macos.zip - asset_name: Notepad--_macos.zip - asset_content_type: application/zip - - - name: Upload Windows Artifact - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/Notepad--_windows.zip - asset_name: Notepad--_windows.zip - asset_content_type: application/zip From 640713166b1a4e07fa0c740e6c5b52acd6f617bb Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 15:31:09 +0330 Subject: [PATCH 110/114] release #99 --- .github/workflows/cmake-multi-platform.yml | 104 ++++++++++++++++++--- 1 file changed, 90 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2a986bc..2466f1c 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -50,20 +50,99 @@ jobs: - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - mkdir -p artifacts - tar -czvf artifacts/Notepad--_ubuntu.tar.gz -C "${{ github.workspace }}/build" . + mkdir -p "${{ github.workspace }}/artifacts" + tar -czvf "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" -C "${{ github.workspace }}/build" . echo "Packaging completed. Listing artifacts directory:" - ls -al artifacts + ls -al "${{ github.workspace }}/artifacts" - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 with: name: Notepad--_ubuntu - path: artifacts/Notepad--_ubuntu.tar.gz + path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" - # macOS Section (unchanged for brevity) - # Windows Section (unchanged for brevity) + # macOS Section + - name: Install dependencies (macOS) + if: matrix.os == 'macos-latest' + run: | + brew install ninja qt + + - name: Configure CMake (macOS) + if: matrix.os == 'macos-latest' + run: | + cmake -B "${{ github.workspace }}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -G "Ninja" \ + -S "${{ github.workspace }}" + + - name: Build Notepad-- (macOS) + if: matrix.os == 'macos-latest' + run: cmake --build "${{ github.workspace }}/build" --config Release + + - name: Package Notepad-- (macOS) + if: matrix.os == 'macos-latest' + run: | + mkdir -p "${{ github.workspace }}/artifacts" + zip -r "${{ github.workspace }}/artifacts/Notepad--_macos.zip" "${{ github.workspace }}/build" + echo "Packaging completed. Listing artifacts directory:" + ls -al "${{ github.workspace }}/artifacts" + + - name: Upload macOS Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_macos + path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" + + # Windows Section + - name: Install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + choco install ninja -y + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install mingw -y + shell: cmd + + - name: Install Qt (Windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v4 + with: + version: '6.5.3' + host: 'windows' + target: 'desktop' + arch: 'win64_mingw' + + - name: Configure CMake (Windows) + if: matrix.os == 'windows-latest' + run: | + cmake -B "${{ github.workspace }}\\build" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -G Ninja ^ + -DCMAKE_PREFIX_PATH=D:\\a\\Notepad--\\Qt\\6.5.3\\mingw_64 ^ + -S "${{ github.workspace }}" + shell: cmd + + - name: Build Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: cmake --build "${{ github.workspace }}\\build" --config Release + shell: cmd + + - name: Package Notepad-- (Windows) + if: matrix.os == 'windows-latest' + run: | + mkdir -p "${{ github.workspace }}\\artifacts" + Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" + echo "Packaging completed. Listing artifacts directory:" + dir "${{ github.workspace }}\\artifacts" + shell: pwsh + + - name: Upload Windows Artifact + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v3 + with: + name: Notepad--_windows + path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" release: runs-on: ubuntu-latest @@ -90,11 +169,8 @@ jobs: draft: false prerelease: false - - name: Upload Ubuntu Artifact to Release - if: ${{ matrix.os == 'ubuntu-latest' }} - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/Notepad--_ubuntu.tar.gz - asset_name: Notepad--_ubuntu.tar.gz - asset_content_type: application/gzip + - name: Upload Artifacts to Release + run: | + gh release upload ${{ env.RELEASE_TAG }} artifacts/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6a7d41b352e1b399801880236aa8e8ed32566e0e Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 15:38:53 +0330 Subject: [PATCH 111/114] release #100 --- .github/workflows/cmake-multi-platform.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2466f1c..95467aa 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -9,7 +9,6 @@ on: jobs: build: runs-on: ${{ matrix.os }} - strategy: fail-fast: false matrix: @@ -59,7 +58,7 @@ jobs: if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 with: - name: Notepad--_ubuntu + name: ubuntu-artifact path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" # macOS Section @@ -92,7 +91,7 @@ jobs: if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v3 with: - name: Notepad--_macos + name: macos-artifact path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" # Windows Section @@ -141,15 +140,17 @@ jobs: if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: - name: Notepad--_windows + name: windows-artifact path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" release: runs-on: ubuntu-latest needs: build steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts - name: Generate Tag Name id: tag_name From 34c3f950308befe88c479b81b9e26c5736aedf1b Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 15:50:04 +0330 Subject: [PATCH 112/114] release #101 --- .github/workflows/cmake-multi-platform.yml | 52 +++++++++------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 95467aa..bf583f1 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -33,7 +33,6 @@ jobs: sudo apt-get install -y ninja-build \ qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync - - name: Configure CMake (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | @@ -41,22 +40,19 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - - name: Build Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - mkdir -p "${{ github.workspace }}/artifacts" - tar -czvf "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" -C "${{ github.workspace }}/build" . - echo "Packaging completed. Listing artifacts directory:" - ls -al "${{ github.workspace }}/artifacts" - + BUILD_DIR="${{ github.workspace }}/build" + OUTPUT_DIR="${{ github.workspace }}/artifacts" + mkdir -p $OUTPUT_DIR + tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR . - name: Upload Ubuntu Artifact if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ubuntu-artifact path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" @@ -66,7 +62,6 @@ jobs: if: matrix.os == 'macos-latest' run: | brew install ninja qt - - name: Configure CMake (macOS) if: matrix.os == 'macos-latest' run: | @@ -74,22 +69,19 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -G "Ninja" \ -S "${{ github.workspace }}" - - name: Build Notepad-- (macOS) if: matrix.os == 'macos-latest' run: cmake --build "${{ github.workspace }}/build" --config Release - - name: Package Notepad-- (macOS) if: matrix.os == 'macos-latest' run: | - mkdir -p "${{ github.workspace }}/artifacts" - zip -r "${{ github.workspace }}/artifacts/Notepad--_macos.zip" "${{ github.workspace }}/build" - echo "Packaging completed. Listing artifacts directory:" - ls -al "${{ github.workspace }}/artifacts" - + BUILD_DIR="${{ github.workspace }}/build" + OUTPUT_DIR="${{ github.workspace }}/artifacts" + mkdir -p $OUTPUT_DIR + zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR - name: Upload macOS Artifact if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos-artifact path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" @@ -102,7 +94,6 @@ jobs: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y choco install mingw -y shell: cmd - - name: Install Qt (Windows) if: matrix.os == 'windows-latest' uses: jurplel/install-qt-action@v4 @@ -111,7 +102,6 @@ jobs: host: 'windows' target: 'desktop' arch: 'win64_mingw' - - name: Configure CMake (Windows) if: matrix.os == 'windows-latest' run: | @@ -121,24 +111,21 @@ jobs: -DCMAKE_PREFIX_PATH=D:\\a\\Notepad--\\Qt\\6.5.3\\mingw_64 ^ -S "${{ github.workspace }}" shell: cmd - - name: Build Notepad-- (Windows) if: matrix.os == 'windows-latest' run: cmake --build "${{ github.workspace }}\\build" --config Release shell: cmd - - name: Package Notepad-- (Windows) if: matrix.os == 'windows-latest' run: | - mkdir -p "${{ github.workspace }}\\artifacts" - Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" - echo "Packaging completed. Listing artifacts directory:" - dir "${{ github.workspace }}\\artifacts" + $BUILD_DIR="${{ github.workspace }}\\build" + $OUTPUT_DIR="${{ github.workspace }}\\artifacts" + mkdir $OUTPUT_DIR + Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip" shell: pwsh - - name: Upload Windows Artifact if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows-artifact path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" @@ -147,17 +134,18 @@ jobs: runs-on: ubuntu-latest needs: build steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: artifacts - name: Generate Tag Name id: tag_name run: | - TIMESTAMP=$(date +%Y%m%d%H%M%S) - echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV - echo "::set-output name=tag_name::release-$TIMESTAMP" + echo "RELEASE_TAG=release-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV - name: Create GitHub Release id: create_release From c4a9651c8d69ac4341510ee97b3cda8c9e100ca9 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 15:58:57 +0330 Subject: [PATCH 113/114] release #102 --- .github/workflows/cmake-multi-platform.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index bf583f1..b558911 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -54,7 +54,7 @@ jobs: if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: - name: ubuntu-artifact + name: Notepad--_ubuntu path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz" # macOS Section @@ -83,7 +83,7 @@ jobs: if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v4 with: - name: macos-artifact + name: Notepad--_macos path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip" # Windows Section @@ -127,7 +127,7 @@ jobs: if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: - name: windows-artifact + name: Notepad--_windows path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip" release: @@ -160,6 +160,8 @@ jobs: - name: Upload Artifacts to Release run: | - gh release upload ${{ env.RELEASE_TAG }} artifacts/* + for file in artifacts/*; do + gh release upload ${{ env.RELEASE_TAG }} "$file" + done env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ef4664b0a2fd60e1d1cf1402a5259038539aa600 Mon Sep 17 00:00:00 2001 From: Remisa Yousefvand Date: Sat, 30 Nov 2024 16:09:27 +0330 Subject: [PATCH 114/114] release #103 --- .github/workflows/cmake-multi-platform.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index b558911..216f4fb 100755 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -144,8 +144,7 @@ jobs: - name: Generate Tag Name id: tag_name - run: | - echo "RELEASE_TAG=release-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV + run: echo "RELEASE_TAG=release-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV - name: Create GitHub Release id: create_release @@ -160,7 +159,7 @@ jobs: - name: Upload Artifacts to Release run: | - for file in artifacts/*; do + for file in $(find artifacts -type f); do gh release upload ${{ env.RELEASE_TAG }} "$file" done env: