organizing files

This commit is contained in:
Jeremy Borgman
2020-10-14 09:07:01 -05:00
committed by borgmanJeremy
parent 4eaad7b988
commit ce331924a4
20 changed files with 120 additions and 32 deletions

View File

@@ -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: |

View File

@@ -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

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 224 KiB

View File

@@ -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

107
snapcraft.yaml Normal file
View File

@@ -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

View File

@@ -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