From 897f65891c10e735d1e6ec551f83d64705b4433c Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Tue, 11 Jul 2023 10:44:27 +0200 Subject: [PATCH 01/11] Reason: --- .github/workflows/build.yml | 54 ++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7eb4128a..5b488caf1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,8 +137,11 @@ jobs: os: ubuntu-latest ninja_platform: linux qt_platform: linux + qt_arch: gcc_64 openssl_arch: linux-x86_64 - cmake_flags: "-DGENERATE_APPDATA=ON" + ld_library_arch: linux-x86-64 + cmake_flags: "-DGENERATE_APPDATA=ON -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_QT=ON" + pack: 1 cmake_env: {} - name: macos @@ -315,9 +318,14 @@ jobs: if: matrix.env.pack && !matrix.qt.check_only uses: actions/upload-artifact@v3 with: - path: build/release/VERSION.txt + path: build/release/Version.txt name: Gittyup-VERSION + - name: Check Version file + run: | + cd build/release + cat ./Version.txt + - name: Test if: matrix.env.ninja_platform != 'win' && matrix.env.ninja_platform != 'mac' uses: GabrielBB/xvfb-action@v1 @@ -331,6 +339,45 @@ jobs: cd build/release ninja check_no_win32_offscreen + - name: Build Appimage + if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only + run: | + cd build/release + sudo apt -y install appstream + sudo apt -y install libfuse2 + sudo apt -y install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 + sudo apt -y install libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxcb-xrm0 libxcb-xv0 libxcb-xvmc0 libxcb1 + + mkdir -p AppDir + DESTDIR=AppDir ninja install + + export QTDIR=$RUNNER_WORKSPACE/Qt/${{ matrix.qt.version }}/${{ matrix.env.qt_arch }} + export LD_LIBRARY_PATH=$QTDIR/lib + + rm -rf ./AppDir/usr/include/ + strip ./AppDir/usr/bin/cmark ./AppDir/usr/bin/gittyup ./AppDir/usr/bin/indexer ./AppDir/usr/bin/relauncher + + wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) + chmod +x appimagetool-*.AppImage + QTDIR=$QTDIR LD_LIBRARY_PATH=$QTDIR/lib/ ./appimagetool-*.AppImage -s deploy ./AppDir/usr/share/applications/*.desktop --appimage-extract-and-run # Bundle EVERYTHING + + # Modify the AppDir: move ld-linux into the same directory as the payload application + # and change AppRun accordingly; so that, e.g., Qt qApp->applicationDirPath() works + mv ./AppDir/lib64/ld-${{ matrix.env.ld_library_arch }}.so.2 ./AppDir/usr/bin/ + sed -i -e 's@^LD_LINUX.*@LD_LINUX=$(find "$HERE/usr/bin" -name "ld-*.so.*" | head -n 1)@g' ./AppDir/AppRun + + rm ./AppDir/usr/share/metainfo/gittyup.appdata.xml + VERSION=$(cat ./Version.txt) + VERSION="$VERSION" ./appimagetool-*.AppImage ./AppDir # turn AppDir into AppImage + ls -lh Gittyup-* + + - name: Publish Appimage + if: matrix.env.ninja_platform == 'linux' + uses: actions/upload-artifact@v3 + with: + path: build/release/*.AppImage + name: Gittyup Appimage + publish: # https://github.com/marvinpinto/actions/issues/177 needs: [flatpak, build] @@ -361,7 +408,7 @@ jobs: # version is exported from cmake to file - name: Retrieve version run: | - echo "::set-output name=VERSION::$(cat artifacts/Gittyup-VERSION/VERSION.txt)" + echo "::set-output name=VERSION::$(cat artifacts/Gittyup-VERSION/Version.txt)" id: version - name: Update GitHub release (latest tag) @@ -392,6 +439,7 @@ jobs: **/artifacts/Gittyup macos/Gittyup*.dmg **/artifacts/Gittyup Flatpak/com.github.Murmele.Gittyup.yml **/Gittyup-x86_64/*.flatpak + **/artifacts/Gittyup Appimage/Gittyup-* # needed otherwise the docs folder is not available - name: Checkout repository From 7b82477e329970ec9fcced8ca0dd8dc1c02975c2 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Tue, 11 Jul 2023 10:45:49 +0200 Subject: [PATCH 02/11] disable updating over gui --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b488caf1..53d6cc55d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,7 +140,7 @@ jobs: qt_arch: gcc_64 openssl_arch: linux-x86_64 ld_library_arch: linux-x86-64 - cmake_flags: "-DGENERATE_APPDATA=ON -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_QT=ON" + cmake_flags: "-DGENERATE_APPDATA=ON -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_QT=ON -DENABLE_UPDATE_OVER_GUI=OFF" pack: 1 cmake_env: {} From a21cf7eeb7a6ec4bceb5729c281ee2b61348c0da Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Tue, 11 Jul 2023 10:53:00 +0200 Subject: [PATCH 03/11] do not publish linux artifacts --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53d6cc55d..cd738e7d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,7 +141,7 @@ jobs: openssl_arch: linux-x86_64 ld_library_arch: linux-x86-64 cmake_flags: "-DGENERATE_APPDATA=ON -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_QT=ON -DENABLE_UPDATE_OVER_GUI=OFF" - pack: 1 + pack: 0 cmake_env: {} - name: macos From ceb597bea13412d2695aa19ec81e1dfc418915f7 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Tue, 11 Jul 2023 10:53:19 +0200 Subject: [PATCH 04/11] publish also appimagetool --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd738e7d1..a56beabd6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -439,7 +439,7 @@ jobs: **/artifacts/Gittyup macos/Gittyup*.dmg **/artifacts/Gittyup Flatpak/com.github.Murmele.Gittyup.yml **/Gittyup-x86_64/*.flatpak - **/artifacts/Gittyup Appimage/Gittyup-* + **/artifacts/Gittyup Appimage/* # needed otherwise the docs folder is not available - name: Checkout repository From 52db196c5218e0c65b095092fbe43b90680a9159 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Tue, 11 Jul 2023 10:53:27 +0200 Subject: [PATCH 05/11] cleanup --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a56beabd6..4d8a021d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -352,14 +352,13 @@ jobs: DESTDIR=AppDir ninja install export QTDIR=$RUNNER_WORKSPACE/Qt/${{ matrix.qt.version }}/${{ matrix.env.qt_arch }} - export LD_LIBRARY_PATH=$QTDIR/lib rm -rf ./AppDir/usr/include/ strip ./AppDir/usr/bin/cmark ./AppDir/usr/bin/gittyup ./AppDir/usr/bin/indexer ./AppDir/usr/bin/relauncher wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) chmod +x appimagetool-*.AppImage - QTDIR=$QTDIR LD_LIBRARY_PATH=$QTDIR/lib/ ./appimagetool-*.AppImage -s deploy ./AppDir/usr/share/applications/*.desktop --appimage-extract-and-run # Bundle EVERYTHING + QTDIR=$QTDIR ./appimagetool-*.AppImage -s deploy ./AppDir/usr/share/applications/*.desktop --appimage-extract-and-run # Bundle EVERYTHING # Modify the AppDir: move ld-linux into the same directory as the payload application # and change AppRun accordingly; so that, e.g., Qt qApp->applicationDirPath() works @@ -369,10 +368,10 @@ jobs: rm ./AppDir/usr/share/metainfo/gittyup.appdata.xml VERSION=$(cat ./Version.txt) VERSION="$VERSION" ./appimagetool-*.AppImage ./AppDir # turn AppDir into AppImage - ls -lh Gittyup-* + #ls -lh Gittyup-* - name: Publish Appimage - if: matrix.env.ninja_platform == 'linux' + if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only uses: actions/upload-artifact@v3 with: path: build/release/*.AppImage From 34aef5bc7fe3eaf4c9d6d7066b0c99e4b1d1990a Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Thu, 13 Jul 2023 10:35:10 +0200 Subject: [PATCH 06/11] trying to fix qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d8a021d9..d3f97f188 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -365,6 +365,8 @@ jobs: mv ./AppDir/lib64/ld-${{ matrix.env.ld_library_arch }}.so.2 ./AppDir/usr/bin/ sed -i -e 's@^LD_LINUX.*@LD_LINUX=$(find "$HERE/usr/bin" -name "ld-*.so.*" | head -n 1)@g' ./AppDir/AppRun + rm ./AppDir/lib/x86_64-linux-gnu/libxcb-glx.so.0 + rm ./AppDir/usr/share/metainfo/gittyup.appdata.xml VERSION=$(cat ./Version.txt) VERSION="$VERSION" ./appimagetool-*.AppImage ./AppDir # turn AppDir into AppImage From 0e6e1e4cdebba97a73a443f39a1d6c67c314a256 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Sat, 22 Jul 2023 20:51:53 +0200 Subject: [PATCH 07/11] add Debugging --- src/ui/MenuBar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/MenuBar.cpp b/src/ui/MenuBar.cpp index 39f8b3865..3c4cb1f8c 100644 --- a/src/ui/MenuBar.cpp +++ b/src/ui/MenuBar.cpp @@ -966,7 +966,9 @@ void MenuBar::updateCutCopyPaste() { mFindSelection->setEnabled(false); QWidget *widget = QApplication::focusWidget(); + Debug("Starting reading clipboard"); bool canPaste = !QApplication::clipboard()->text().isEmpty(); + Debug("Finished reading clipboard"); if (TextEditor *editor = qobject_cast(widget)) { mCut->setEnabled(!editor->selectionEmpty() && !editor->readOnly()); mCopy->setEnabled(!editor->selectionEmpty()); From 2326e01928c7c43601da2b6eff08d6453b4c8ca7 Mon Sep 17 00:00:00 2001 From: Murmele Date: Mon, 24 Jul 2023 17:22:45 +0200 Subject: [PATCH 08/11] Debug build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3f97f188..7b3d31783 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -281,7 +281,7 @@ jobs: run: | mkdir -p build/release cd build/release - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DGITTYUP_CI_TESTS=ON ${{ env.CMAKE_FLAGS }} ${{ matrix.env.cmake_flags }} ../.. + cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DGITTYUP_CI_TESTS=ON ${{ env.CMAKE_FLAGS }} ${{ matrix.env.cmake_flags }} ../.. - name: Build Information run: | From f81c01fde6e727849b8b1df1e2e354c7de71530b Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Sun, 12 Nov 2023 11:51:01 +0100 Subject: [PATCH 09/11] use release build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b3d31783..d3f97f188 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -281,7 +281,7 @@ jobs: run: | mkdir -p build/release cd build/release - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DGITTYUP_CI_TESTS=ON ${{ env.CMAKE_FLAGS }} ${{ matrix.env.cmake_flags }} ../.. + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DGITTYUP_CI_TESTS=ON ${{ env.CMAKE_FLAGS }} ${{ matrix.env.cmake_flags }} ../.. - name: Build Information run: | From 3f2d23669229b5ff81923c1beb57399b4b6f8437 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Sat, 22 Jul 2023 20:51:53 +0200 Subject: [PATCH 10/11] Revert "add Debugging" This reverts commit 9bcfefeb08a3347547b00f0351b66fc794c5c5cf. --- src/ui/MenuBar.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ui/MenuBar.cpp b/src/ui/MenuBar.cpp index 3c4cb1f8c..39f8b3865 100644 --- a/src/ui/MenuBar.cpp +++ b/src/ui/MenuBar.cpp @@ -966,9 +966,7 @@ void MenuBar::updateCutCopyPaste() { mFindSelection->setEnabled(false); QWidget *widget = QApplication::focusWidget(); - Debug("Starting reading clipboard"); bool canPaste = !QApplication::clipboard()->text().isEmpty(); - Debug("Finished reading clipboard"); if (TextEditor *editor = qobject_cast(widget)) { mCut->setEnabled(!editor->selectionEmpty() && !editor->readOnly()); mCopy->setEnabled(!editor->selectionEmpty()); From 1b74bf7357097a66b1f8fcf2cbf9d27c5685d278 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Thu, 13 Jul 2023 10:35:10 +0200 Subject: [PATCH 11/11] Revert "trying to fix qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat" This reverts commit 0c5035fc4786de4ff17c92849f3d7c04bc6da25d. --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3f97f188..4d8a021d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -365,8 +365,6 @@ jobs: mv ./AppDir/lib64/ld-${{ matrix.env.ld_library_arch }}.so.2 ./AppDir/usr/bin/ sed -i -e 's@^LD_LINUX.*@LD_LINUX=$(find "$HERE/usr/bin" -name "ld-*.so.*" | head -n 1)@g' ./AppDir/AppRun - rm ./AppDir/lib/x86_64-linux-gnu/libxcb-glx.so.0 - rm ./AppDir/usr/share/metainfo/gittyup.appdata.xml VERSION=$(cat ./Version.txt) VERSION="$VERSION" ./appimagetool-*.AppImage ./AppDir # turn AppDir into AppImage