From f11073bc00f1f656a590daa940e7497400f273cb Mon Sep 17 00:00:00 2001 From: borgmanJeremy <46930769+borgmanJeremy@users.noreply.github.com> Date: Mon, 12 Oct 2020 08:40:35 -0500 Subject: [PATCH 1/8] fixing icon regression (#1051) * fixing icon regression * fixed symlink --- data/graphics.qrc | 2 ++ data/img/app/flameshot.png | 1 + data/img/app/flameshot.svg | 1 + data/img/hicolor/128x128/apps/flameshot.png | 1 + data/img/hicolor/48x48/apps/flameshot.png | 1 + data/img/hicolor/scalable/apps/flameshot.svg | 1 + src/CMakeLists.txt | 11 +++++++++++ src/config/configwindow.cpp | 2 +- src/core/controller.cpp | 6 +++--- src/tools/imgur/imguruploader.cpp | 2 +- src/tools/launcher/applauncherwidget.cpp | 2 +- src/utils/screenshotsaver.cpp | 3 +-- src/widgets/infowindow.cpp | 2 +- 13 files changed, 26 insertions(+), 9 deletions(-) create mode 120000 data/img/app/flameshot.png create mode 120000 data/img/app/flameshot.svg create mode 120000 data/img/hicolor/128x128/apps/flameshot.png create mode 120000 data/img/hicolor/48x48/apps/flameshot.png create mode 120000 data/img/hicolor/scalable/apps/flameshot.svg diff --git a/data/graphics.qrc b/data/graphics.qrc index 971b9fd5..76adcd3a 100644 --- a/data/graphics.qrc +++ b/data/graphics.qrc @@ -1,7 +1,9 @@ img/app/org.flameshot.Flameshot.svg + img/app/flameshot.svg img/app/org.flameshot.Flameshot.png + img/app/flameshot.png img/material/black/undo-variant.svg img/material/black/text.svg img/material/black/square.svg diff --git a/data/img/app/flameshot.png b/data/img/app/flameshot.png new file mode 120000 index 00000000..9639efdd --- /dev/null +++ b/data/img/app/flameshot.png @@ -0,0 +1 @@ +org.flameshot.Flameshot.png \ No newline at end of file diff --git a/data/img/app/flameshot.svg b/data/img/app/flameshot.svg new file mode 120000 index 00000000..44f59631 --- /dev/null +++ b/data/img/app/flameshot.svg @@ -0,0 +1 @@ +org.flameshot.Flameshot.svg \ No newline at end of file diff --git a/data/img/hicolor/128x128/apps/flameshot.png b/data/img/hicolor/128x128/apps/flameshot.png new file mode 120000 index 00000000..9639efdd --- /dev/null +++ b/data/img/hicolor/128x128/apps/flameshot.png @@ -0,0 +1 @@ +org.flameshot.Flameshot.png \ No newline at end of file diff --git a/data/img/hicolor/48x48/apps/flameshot.png b/data/img/hicolor/48x48/apps/flameshot.png new file mode 120000 index 00000000..9639efdd --- /dev/null +++ b/data/img/hicolor/48x48/apps/flameshot.png @@ -0,0 +1 @@ +org.flameshot.Flameshot.png \ No newline at end of file diff --git a/data/img/hicolor/scalable/apps/flameshot.svg b/data/img/hicolor/scalable/apps/flameshot.svg new file mode 120000 index 00000000..44f59631 --- /dev/null +++ b/data/img/hicolor/scalable/apps/flameshot.svg @@ -0,0 +1 @@ +org.flameshot.Flameshot.svg \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ca41c96..ba9c917a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -171,6 +171,17 @@ configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/org.flameshot.F configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg COPYONLY) +## Install icon with both names +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/flameshot.png COPYONLY) + +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/flameshot.png COPYONLY) + +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/flameshot.svg + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/flameshot.svg COPYONLY) + + # Install assets install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) diff --git a/src/config/configwindow.cpp b/src/config/configwindow.cpp index ccd10714..737c6573 100644 --- a/src/config/configwindow.cpp +++ b/src/config/configwindow.cpp @@ -39,7 +39,7 @@ ConfigWindow::ConfigWindow(QWidget* parent) setAttribute(Qt::WA_DeleteOnClose); const int size = GlobalValues::buttonBaseSize() * 12; setMinimumSize(size, size); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("Configuration")); auto changedSlot = [this](QString s) { diff --git a/src/core/controller.cpp b/src/core/controller.cpp index 2f341694..b0cf0b3d 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -224,8 +224,8 @@ void Controller::enableTrayIcon() m_trayIcon = new QSystemTrayIcon(); m_trayIcon->setToolTip(QStringLiteral("Flameshot")); m_trayIcon->setContextMenu(trayIconMenu); - QIcon trayicon = QIcon::fromTheme( - "flameshot-tray", QIcon(":img/app/org.flameshot.Flameshot.png")); + QIcon trayicon = + QIcon::fromTheme("flameshot-tray", QIcon(":img/app/flameshot.png")); m_trayIcon->setIcon(trayicon); auto trayIconActivated = [this](QSystemTrayIcon::ActivationReason r) { @@ -260,7 +260,7 @@ void Controller::sendTrayNotification(const QString& text, { if (m_trayIcon) { m_trayIcon->showMessage( - title, text, QIcon(":img/app/org.flameshot.Flameshot.svg"), timeout); + title, text, QIcon(":img/app/flameshot.svg"), timeout); } } diff --git a/src/tools/imgur/imguruploader.cpp b/src/tools/imgur/imguruploader.cpp index a457c1c3..26e3f149 100644 --- a/src/tools/imgur/imguruploader.cpp +++ b/src/tools/imgur/imguruploader.cpp @@ -50,7 +50,7 @@ ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent) , m_pixmap(capture) { setWindowTitle(tr("Upload to Imgur")); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) QRect position = frameGeometry(); diff --git a/src/tools/launcher/applauncherwidget.cpp b/src/tools/launcher/applauncherwidget.cpp index 1ca1dc50..4ae24175 100644 --- a/src/tools/launcher/applauncherwidget.cpp +++ b/src/tools/launcher/applauncherwidget.cpp @@ -52,7 +52,7 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent) , m_pixmap(p) { setAttribute(Qt::WA_DeleteOnClose); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("Open With")); m_keepOpen = ConfigHandler().keepOpenAppLauncherValue(); diff --git a/src/utils/screenshotsaver.cpp b/src/utils/screenshotsaver.cpp index 40363042..fd5c433d 100644 --- a/src/utils/screenshotsaver.cpp +++ b/src/utils/screenshotsaver.cpp @@ -108,8 +108,7 @@ bool ScreenshotSaver::saveToFilesystemGUI(const QPixmap& capture) QString msg = QObject::tr("Error trying to save as ") + savePath; QMessageBox saveErrBox( QMessageBox::Warning, QObject::tr("Save Error"), msg); - saveErrBox.setWindowIcon( - QIcon(":img/app/org.flameshot.Flameshot.svg")); + saveErrBox.setWindowIcon(QIcon(":img/app/flameshot.svg")); saveErrBox.exec(); } } diff --git a/src/widgets/infowindow.cpp b/src/widgets/infowindow.cpp index 23bc8c8d..b624adfa 100644 --- a/src/widgets/infowindow.cpp +++ b/src/widgets/infowindow.cpp @@ -36,7 +36,7 @@ InfoWindow::InfoWindow(QWidget* parent) : QWidget(parent) { setAttribute(Qt::WA_DeleteOnClose); - setWindowIcon(QIcon(":img/app/org.flameshot.Flameshot.svg")); + setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("About")); #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) From 7df5a1332697bfc1d65d38aa7271477bf7620d4d Mon Sep 17 00:00:00 2001 From: borgmanJeremy <46930769+borgmanJeremy@users.noreply.github.com> Date: Tue, 13 Oct 2020 19:49:05 -0500 Subject: [PATCH 2/8] Testing appveyor (#1058) --- appveyor.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 960e86f2..3be2328f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,7 @@ clone_folder: c:\projects\source environment: Qt5_INSTALL_DIR: 'C:\Qt\5.15.0\msvc2019_64' PATH: '%Qt5_INSTALL_DIR%\bin;%PATH%' + build_script: - cmd: >- @@ -16,5 +17,30 @@ build_script: cmake c:\projects\source -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE:STRING=Release - cmake --build . --config "Release" + cmake --build . --parallel 2 --config "Release" + + cpack -G WIX -B package + mkdir artifact + + dir + + cp package/*.msi artifact/. + + cp src/Release/*.exe artifact/. + + 7z a -tzip artifact.zip artifact/ + +artifacts: +- path: build\package\*.msi + name: installer +- path: build\src\Release\*.exe + name: executable +- path: build\artifact.zip + name: archive + +deploy: +- provider: Webhook + url: https://app.signpath.io/API/v1/042f605f-b378-45d8-ad16-b7695b071036/Integrations/AppVeyor?ProjectSlug=flameshot&SigningPolicySlug=test-signing + authorization: + secure: G5nNnkfRSJ+EEx+7LlUSSoEyoL+pHYItvjrNxbWITE7RB+cm9qzuHRdwmrZdEDjdVCLZ2TkNawynMxYcGMZAQA== From cc34ede2c7570cece76561104aa7e439ea6c4a41 Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Tue, 13 Oct 2020 20:20:13 -0500 Subject: [PATCH 3/8] matching flatpak files to flathub repo --- .github/workflows/Linux-pack.yml | 2 +- data/flatpak/org.flameshot.Flameshot.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 48e03595..b37b6382 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -457,7 +457,7 @@ jobs: - name: Upload flatpak package(daily build) run: | echo "=====================flatpak download link=====================" - echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak) + echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak) echo "======no operation for you can see link in the log console=====" - name: Artifact Upload uses: actions/upload-artifact@v2 diff --git a/data/flatpak/org.flameshot.Flameshot.yml b/data/flatpak/org.flameshot.Flameshot.yml index cf246772..183a241b 100644 --- a/data/flatpak/org.flameshot.Flameshot.yml +++ b/data/flatpak/org.flameshot.Flameshot.yml @@ -30,4 +30,4 @@ modules: sources: - type: git url: https://github.com/flameshot-org/flameshot.git - branch: master + branch: master \ No newline at end of file From 3ceaf66cd82da204e465ccf153dfc539b4970855 Mon Sep 17 00:00:00 2001 From: James LaChance Date: Wed, 14 Oct 2020 01:44:55 -0400 Subject: [PATCH 4/8] Add instructions for how to format code This took @jfly and me far too long to figure out how to actually get the code formatted. --- docs/CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 21b1a2b1..5935a019 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -19,6 +19,7 @@ For small fixes or incremental improvements simply fork the repo and follow the 2. Start coding! - Implement your feature. - Check your code works as expected. + - Run the code formatter: `clang-format -i $(git ls-files "*.cpp" "*.h")` 3. Commit your changes to a new branch (not `master`, one change per branch) and push it: - Commit messages should: From 4eaad7b9884aaf406403babc0f60288874b0b919 Mon Sep 17 00:00:00 2001 From: Mehrad Mahmoudian Date: Wed, 14 Oct 2020 17:43:07 +0300 Subject: [PATCH 5/8] Revamped GitHub Issue templates --- .github/ISSUE_TEMPLATE/Bug_report.md | 7 ++++++- .github/ISSUE_TEMPLATE/Feature_request.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index d253e120..f7f774cd 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -4,11 +4,16 @@ about: Create a report to help us improve --- + + **Flameshot version** **Describe the bug** - + **To Reproduce** diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index 8b511242..7b62f674 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -5,5 +5,10 @@ about: Suggest an idea for this project --- **Is your feature request related to a problem?** + \ No newline at end of file From ce331924a4a1695a142cfb021bf5c8a13b8d4382 Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Wed, 14 Oct 2020 09:07:01 -0500 Subject: [PATCH 6/8] organizing files --- .github/workflows/Linux-pack.yml | 11 +- CMakeLists.txt | 6 +- .../org.flameshot.Flameshot.metainfo.xml | 0 .../package/org.flameshot.Flameshot.desktop | 0 {docs => data}/shell-completion/flameshot | 0 {data => packaging}/debian/changelog | 0 {data => packaging}/debian/compat | 0 {data => packaging}/debian/control | 0 {data => packaging}/debian/copyright | 0 {data => packaging}/debian/docs | 0 {data => packaging}/debian/rules | 0 {data => packaging}/debian/source/format | 0 .../flatpak/org.flameshot.Flameshot.yml | 0 {data => packaging}/rpm/flameshot.spec | 0 .../Bitmaps/CPACK_WIX_UI_BANNER.BMP | Bin .../Bitmaps/CPACK_WIX_UI_DIALOG.BMP | Bin .../win-installer/LICENSE/GPL-3.0.txt | 0 scripts/upload_services/transfer.sh.sh | 19 ---- snapcraft.yaml | 107 ++++++++++++++++++ src/CMakeLists.txt | 9 +- 20 files changed, 120 insertions(+), 32 deletions(-) rename {docs => data}/appdata/org.flameshot.Flameshot.metainfo.xml (100%) rename {docs => data}/desktopEntry/package/org.flameshot.Flameshot.desktop (100%) rename {docs => data}/shell-completion/flameshot (100%) rename {data => packaging}/debian/changelog (100%) rename {data => packaging}/debian/compat (100%) rename {data => packaging}/debian/control (100%) rename {data => packaging}/debian/copyright (100%) rename {data => packaging}/debian/docs (100%) rename {data => packaging}/debian/rules (100%) rename {data => packaging}/debian/source/format (100%) rename {data => packaging}/flatpak/org.flameshot.Flameshot.yml (100%) rename {data => packaging}/rpm/flameshot.spec (100%) rename {data => packaging}/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP (100%) rename {data => packaging}/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP (100%) rename {data => packaging}/win-installer/LICENSE/GPL-3.0.txt (100%) delete mode 100644 scripts/upload_services/transfer.sh.sh create mode 100644 snapcraft.yaml diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index b37b6382..eb367711 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -76,7 +76,7 @@ jobs: path: tools - name: Packaging on ${{ matrix.dist.name }} run: | - cp -r $GITHUB_WORKSPACE/data/debian $GITHUB_WORKSPACE + cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE bash $GITHUB_WORKSPACE/tools/packpack mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb env: @@ -165,7 +165,7 @@ jobs: echo "=========================" - name: Packaging on ubuntu-18.04 run: | - cp -r $GITHUB_WORKSPACE/data/debian $GITHUB_WORKSPACE + cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE mkdir -p $GITHUB_WORKSPACE/build sed -e "/cmake (>= 3.13~),/d" -i $GITHUB_WORKSPACE/debian/control dpkg-buildpackage -b @@ -243,7 +243,7 @@ jobs: path: tools - name: Packaging on ${{ matrix.dist.name }} run: | - cp -r $GITHUB_WORKSPACE/data/rpm $GITHUB_WORKSPACE + cp -r $GITHUB_WORKSPACE/packaging/rpm $GITHUB_WORKSPACE bash $GITHUB_WORKSPACE/tools/packpack env: OS: ${{ matrix.dist.os }} @@ -439,7 +439,7 @@ jobs: - name: Packaging flatpak run: | BUNDLE="org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak" - MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.Flameshot.yml + MANIFEST_PATH=$GITHUB_WORKSPACE/packaging/flatpak/org.flameshot.Flameshot.yml RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo" APP_ID="org.flameshot.Flameshot" BRANCH="master" @@ -494,11 +494,10 @@ jobs: echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}" echo "================================" echo ::set-env name=VERSION::$(echo ${last_committed_tag:1}) + - name: Packaging snap uses: snapcore/action-build@v1 id: snapcraft - with: - path: data - name: Rename snap name shell: bash run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a3bfc17..bf6f2fa2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,15 +82,15 @@ if(WIN32) # Supported languages can be found at # http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html #set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE") - set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/data/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP") - set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/data/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP") + set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/packaging/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP") + set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/packaging/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP") set(CPACK_WIX_PROPERTY_ARPHELPLINK "${CPACK_PACKAGE_HOMEPAGE_URL}") set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${CPACK_PACKAGE_HOMEPAGE_URL}") set(CPACK_WIX_ROOT_FEATURE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") # set high compression - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/data/win-installer/LICENSE/GPL-3.0.txt") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/packaging/win-installer/LICENSE/GPL-3.0.txt") set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") # The correct way would be to include both x32 and x64 into one installer diff --git a/docs/appdata/org.flameshot.Flameshot.metainfo.xml b/data/appdata/org.flameshot.Flameshot.metainfo.xml similarity index 100% rename from docs/appdata/org.flameshot.Flameshot.metainfo.xml rename to data/appdata/org.flameshot.Flameshot.metainfo.xml diff --git a/docs/desktopEntry/package/org.flameshot.Flameshot.desktop b/data/desktopEntry/package/org.flameshot.Flameshot.desktop similarity index 100% rename from docs/desktopEntry/package/org.flameshot.Flameshot.desktop rename to data/desktopEntry/package/org.flameshot.Flameshot.desktop diff --git a/docs/shell-completion/flameshot b/data/shell-completion/flameshot similarity index 100% rename from docs/shell-completion/flameshot rename to data/shell-completion/flameshot diff --git a/data/debian/changelog b/packaging/debian/changelog similarity index 100% rename from data/debian/changelog rename to packaging/debian/changelog diff --git a/data/debian/compat b/packaging/debian/compat similarity index 100% rename from data/debian/compat rename to packaging/debian/compat diff --git a/data/debian/control b/packaging/debian/control similarity index 100% rename from data/debian/control rename to packaging/debian/control diff --git a/data/debian/copyright b/packaging/debian/copyright similarity index 100% rename from data/debian/copyright rename to packaging/debian/copyright diff --git a/data/debian/docs b/packaging/debian/docs similarity index 100% rename from data/debian/docs rename to packaging/debian/docs diff --git a/data/debian/rules b/packaging/debian/rules similarity index 100% rename from data/debian/rules rename to packaging/debian/rules diff --git a/data/debian/source/format b/packaging/debian/source/format similarity index 100% rename from data/debian/source/format rename to packaging/debian/source/format diff --git a/data/flatpak/org.flameshot.Flameshot.yml b/packaging/flatpak/org.flameshot.Flameshot.yml similarity index 100% rename from data/flatpak/org.flameshot.Flameshot.yml rename to packaging/flatpak/org.flameshot.Flameshot.yml diff --git a/data/rpm/flameshot.spec b/packaging/rpm/flameshot.spec similarity index 100% rename from data/rpm/flameshot.spec rename to packaging/rpm/flameshot.spec diff --git a/data/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP b/packaging/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP similarity index 100% rename from data/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP rename to packaging/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP diff --git a/data/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP b/packaging/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP similarity index 100% rename from data/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP rename to packaging/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP diff --git a/data/win-installer/LICENSE/GPL-3.0.txt b/packaging/win-installer/LICENSE/GPL-3.0.txt similarity index 100% rename from data/win-installer/LICENSE/GPL-3.0.txt rename to packaging/win-installer/LICENSE/GPL-3.0.txt diff --git a/scripts/upload_services/transfer.sh.sh b/scripts/upload_services/transfer.sh.sh deleted file mode 100644 index 082ac8c4..00000000 --- a/scripts/upload_services/transfer.sh.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -URL="https://transfer.sh" - -if [ $# -eq 0 ]; then - echo "Usage: transfer.sh FILE\n" - exit 1 -fi - -FILE=$1 - -if [ ! -f "$FILE" ]; then - echo "File ${FILE} not found" - exit 1 -fi - -RESPONSE=$(curl -# -F "file=@${FILE}" "${URL}") - -echo "${RESPONSE}" # to terminal \ No newline at end of file diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 00000000..a737fc9b --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,107 @@ +--- + +name: flameshot +adopt-info: flameshot +base: core18 +summary: Powerful yet simple to use screenshot software +description: | + A powerful open source screenshot and annotation tool for Linux, Flameshot + has a varied set of markup tools available, which include Freehand drawing, + Lines, Arrows, Boxes, Circles, Highlighting, Blur. Additionally, you can + customise the color, size and/or thickness of many of these image annotation + tools. +grade: stable # must be 'stable' to release into candidate/stable channels +confinement: strict # use 'strict' once you have the right plugs and slots +#confinement: devmode # use 'strict' once you have the right plugs and slots +architectures: + - build-on: amd64 + - build-on: i386 + + +apps: + flameshot: + command: flameshot + desktop: usr/share/applications/org.flameshot.Flameshot.desktop + extensions: + - kde-neon + environment: + DISABLE_WAYLAND: 1 + XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS + QT_QPA_PLATFORMTHEME: gtk3 + slots: [dbus-flameshot] + plugs: + - kde-frameworks-5-plug + - home + - removable-media + - network + - network-bind + - opengl + - pulseaudio + - wayland + - unity7 + - x11 + +parts: + flameshot: + build-snaps: + - kde-frameworks-5-core18-sdk + - kde-frameworks-5-core18 + - cmake #core18 does not have new enough cmake so install from snap + plugin: cmake + configflags: + - '-DCMAKE_BUILD_TYPE=RelWithDebInfo' + - '-DCMAKE_INSTALL_PREFIX=/usr' + source: https://github.com/flameshot-org/flameshot.git + source-type: git + override-pull: | + snapcraftctl pull + last_committed_tag="$(git tag -l --sort=-v:refname | head -1)" + git_revno="$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)" + git_hash="$(git rev-parse --short HEAD)" + snapcraftctl set-version "${last_committed_tag}+git${git_revno}.${git_hash}" + override-build: | + snapcraftctl build + # Correct the Icon path + sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + build-packages: + - g++ + - make + - qt5-default + - qttools5-dev-tools + - libqt5svg5-dev + stage-packages: + - dbus-x11 + - libgtk2.0-0 + - openssl + - ca-certificates + - qtwayland5 + - libqt5dbus5 + - libqt5network5 + - libqt5core5a + - libqt5widgets5 + - libqt5gui5 + - libqt5svg5 + - libxkbcommon0 + - ttf-ubuntu-font-family + - dmz-cursor-theme + - light-themes + - adwaita-icon-theme + - gnome-themes-standard + - shared-mime-info + - libgdk-pixbuf2.0-0 + prime: + # libquazip5-1 pulls in Qt5 from bionic as a dependency. We don't + # want it in our snap, however, because we get a newer Qt5 from the + # kde-kf5 platform snap. + - "-usr/lib/x86_64-linux-gnu/libQt5*" + - "-usr/lib/x86_64-linux-gnu/libqt5*" +slots: + # Depending on in which environment we're running we either need + # to use the system or session DBus so we also need to have one + # slot for each. + dbus-flameshot: + interface: dbus + bus: session + name: org.flameshot.Flameshot diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ba9c917a..bde4e49b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,6 +130,7 @@ foreach(FILE ${QM_FILES}) COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${F_NAME} ${CMAKE_CURRENT_BINARY_DIR}/translations/${F_NAME}) endforeach() + # ###################################################################################################################### # Installation instructions @@ -143,16 +144,16 @@ install( RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # Install desktop files, completion and dbus files -configure_file(${CMAKE_SOURCE_DIR}/docs/desktopEntry/package/org.flameshot.Flameshot.desktop +configure_file(${CMAKE_SOURCE_DIR}/data/desktopEntry/package/org.flameshot.Flameshot.desktop ${CMAKE_CURRENT_BINARY_DIR}/share/applications/org.flameshot.Flameshot.desktop COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/docs/appdata/org.flameshot.Flameshot.metainfo.xml +configure_file(${CMAKE_SOURCE_DIR}/data/appdata/org.flameshot.Flameshot.metainfo.xml ${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/org.flameshot.Flameshot.metainfo.xml COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/docs/shell-completion/flameshot +configure_file(${CMAKE_SOURCE_DIR}/data/shell-completion/flameshot ${CMAKE_CURRENT_BINARY_DIR}/share/bash-completion/completions/flameshot COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/docs/shell-completion/flameshot +configure_file(${CMAKE_SOURCE_DIR}/data/shell-completion/flameshot ${CMAKE_CURRENT_BINARY_DIR}/share/zsh/site-functions/_flameshot COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/data/dbus/org.flameshot.Flameshot.xml From 80dd24f675187e52515e2351024d2b645766492e Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Wed, 14 Oct 2020 10:07:47 -0500 Subject: [PATCH 7/8] Added code signing information --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 053f6cae..9451ab32 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,8 @@ - [Build](#build) - [Install](#install) - [License](#license) +- [Privacy Policy](#privacy-policy) +- [Code Signing Policy](#code-signing-policy) - [Contribute](#contribute) - [Acknowledgment](#acknowledgment) @@ -367,12 +369,18 @@ Note: If you install from source, there is no uninstaller, you will need to manu Info: If I take code from your project and that implies a relicense to GPLv3, you can reuse my changes with the original previous license of your project applied. +## Privacy Policy +This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it. + + +## Code Signing Policy +Free code signing provided by [SignPath.io](https://signpath.io/), certificate by [SignPath Foundation](https://signpath.org/). + +Code signing is currently a manual process so not every patch release will be signed. + ## Contribute - If you want to contribute check the [CONTRIBUTING.md](docs/CONTRIBUTING.md) - - ## Acknowledgment Thanks to those who have shown interest in the early development process: - [lupoDharkael](https://github.com/lupoDharkael) @@ -380,3 +388,7 @@ Thanks to those who have shown interest in the early development process: - [XerTheSquirrel](https://github.com/XerTheSquirrel) - [The members of Sugus GNU/Linux](https://github.com/SUGUS-GNULinux) - ismatori + +Thanks to sponsors: +- JetBrains +- SignPath From 376a6f2a9c17449d00f93ff8fcfb8e5ab6c17339 Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Wed, 14 Oct 2020 18:27:04 -0500 Subject: [PATCH 8/8] Added releasing info for v0.8.5 --- CMakeLists.txt | 2 +- data/appdata/org.flameshot.Flameshot.metainfo.xml | 1 + packaging/debian/changelog | 4 ++-- packaging/rpm/flameshot.spec | 4 +++- snapcraft.yaml | 2 -- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf6f2fa2..2d9810aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) # This can be read from ${PROJECT_NAME} after project() is called project( flameshot - VERSION 0.8.4 + VERSION 0.8.5 LANGUAGES CXX) set(PROJECT_NAME_CAPITALIZED "Flameshot") diff --git a/data/appdata/org.flameshot.Flameshot.metainfo.xml b/data/appdata/org.flameshot.Flameshot.metainfo.xml index 7f7517bd..bcfdae7d 100644 --- a/data/appdata/org.flameshot.Flameshot.metainfo.xml +++ b/data/appdata/org.flameshot.Flameshot.metainfo.xml @@ -5,6 +5,7 @@ GPL-3.0-or-later Flameshot + diff --git a/packaging/debian/changelog b/packaging/debian/changelog index bee8f48f..60948a3b 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,5 +1,5 @@ -flameshot (0.8.4-1) unstable; urgency=medium +flameshot (0.8.5-1) unstable; urgency=medium * New stable release. - -- Jeremy Borgman Mon, 30 Sep 2020 09:18:29 -0600 + -- Jeremy Borgman Wed, 14 Oct 2020 18:24:29 -0600 diff --git a/packaging/rpm/flameshot.spec b/packaging/rpm/flameshot.spec index 585ad194..e64afcdd 100644 --- a/packaging/rpm/flameshot.spec +++ b/packaging/rpm/flameshot.spec @@ -1,5 +1,5 @@ Name: flameshot -Version: 0.8.4 +Version: 0.8.5 Release: 1%{?dist} Summary: Powerful yet simple to use screenshot software Summary(eu-ES): Potente pero simple de usar software de capturas @@ -95,6 +95,8 @@ make %{?_smp_mflags} %{_datadir}/icons/hicolor %changelog +* Sat Oct 14 2020 Jeremy Borgman - 0.8.5-1 +- Updated for flameshot 0.8.5 * Sat Oct 10 2020 Jeremy Borgman - 0.8.4-1 - Updated for flameshot 0.8.4 * Mon Sep 19 2020 Jeremy Borgman - 0.8.3-1 diff --git a/snapcraft.yaml b/snapcraft.yaml index a737fc9b..3444f26c 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -15,8 +15,6 @@ confinement: strict # use 'strict' once you have the right plugs and slots #confinement: devmode # use 'strict' once you have the right plugs and slots architectures: - build-on: amd64 - - build-on: i386 - apps: flameshot: