Skip to content

Commit

Permalink
Merge branch 'release/0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnf committed Nov 17, 2019
2 parents b6fc542 + 12b06ae commit 1aa72cd
Show file tree
Hide file tree
Showing 60 changed files with 2,819 additions and 1,150 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gitignore export-ignore
.gitattributes export-ignore
_config.yml export-ignore
.travis.yml export-ignore
.github export-ignore
cmake/modules/ArchiveExportInfo.cmake export-subst
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a bug report to help the project improve
title: "[BUG] Title"
labels: ''
assignees: ''

---

**Description**
A clear and concise description of what the bug is.

**To Reproduce**
Please describe the steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Desktop/Linux Environment (please complete the following information):**
- Linux Distribution and Version: [e.g. Ubuntu 18.04]
- Desktop/Window Manager and Version [e.g. GNOME 3.28, KDE 5.4...]
- Did you built _Projecteur_ yourself?: `[y/n]` \
_(If yes: Please run cmake for existing build directories, to ensure the generated version info is up to date)_
- What is the output of `projecteur -f` ?: ...
- What is the output of `projecteur -d` ?: ...

**Screenshots**
Only if applicable, add screenshots to help explain your problem.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/everything-else.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Everything else
about: For everything that's not a bug or a feature request...
title: ''
labels: ''
assignees: ''

---


17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: You have a request or an idea, awesome - let's hear it
title: 'Feature Request: Title'
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
If yes, please describe what the problem is. Example: I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CMakeLists.txt.user*
.vscode

.idea
build
build/*
24 changes: 13 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
language: cpp
matrix:
include:
- os: linux
dist: bionic
env: DOCKER_IMG=jahnf/projecteur:archlinux
- os: linux
dist: xenial
env: DOCKER_IMG=jahnf/projecteur:debian-stretch
- os: linux
dist: xenial
env: DOCKER_IMG=jahnf/projecteur:ubuntu-16.04
dist: bionic
env: DOCKER_IMG=jahnf/projecteur:debian-buster
- os: linux
dist: xenial
env:
- DOCKER_IMG=jahnf/projecteur:ubuntu-18.04
- BUILD_SOURCE_PKG=1
env: DOCKER_IMG=jahnf/projecteur:ubuntu-18.04
- os: linux
dist: xenial
env: DOCKER_IMG=jahnf/projecteur:opensuse-15.0
- os: linux
dist: xenial
env: DOCKER_IMG=jahnf/projecteur:opensuse-42.3
env: DOCKER_IMG=jahnf/projecteur:opensuse-15.1
- os: linux
dist: bionic
env: DOCKER_IMG=jahnf/projecteur:fedora-30
- os: linux
dist: bionic
env: DOCKER_IMG=jahnf/projecteur:fedora-31
script:
- git fetch --tags
- "[ -f $(git rev-parse --git-dir)/shallow ] && git fetch --unshallow || echo No need to unshallow..."
Expand All @@ -27,12 +34,7 @@ script:
- docker exec -it build /bin/bash -c "cd /build && cmake --build ."
- docker exec -it build /bin/bash -c "cd /build && cmake --build . --target dist-package"
- docker exec -it build /bin/bash -c "cd /build && ./projecteur --version"
- docker exec -it build /bin/bash -c "mv /build/*.deb /build/dist-pkg || true"
- docker exec -it build /bin/bash -c "mv /build/*.rpm /build/dist-pkg || true"
- docker exec -it build /bin/bash -c "mv /build/*.tgz /build/dist-pkg || true"
- docker exec -it build /bin/bash -c "mv /build/*.tar.gz /build/dist-pkg || true"
- "[ \"${BUILD_SOURCE_PKG}\" = 1 ] && docker exec -it build /bin/bash -c \"cd /build && cmake --build . --target source-archive\" || true"
- "[ \"${BUILD_SOURCE_PKG}\" = 1 ] && docker exec -it build /bin/bash -c \"mv /build/archive_output/* /build/dist-pkg\" || true"
- docker cp build:/build/dist-pkg .
- docker cp build:/build/travis-ci-bintray-deploy.json .
- ls -alh dist-pkg
Expand Down
17 changes: 3 additions & 14 deletions 55-spotlight.rules.in
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
# Set up permissions for non root users to open the Logitech Spotlight USB Receiver
# Enables the Projecteur application to access the device.

# Copy this file to /etc/udev/rules.d/55-spotlight.rules and replace '@DEVICE_USER_GROUP@'
# with a group your user is a member in.
#
# Existing groups like 'plugdev' and 'dialout' can be used, but the `install` target
# uses a group called 'spotlight-device' by default.
# Linux packages created with the 'dist-package' target will create this group if not
# present during installation.
#
# Run `sudo udevadm control --reload-rules` and `sudo udevadm trigger`
# to load rules without rebooting.

# Note that for kernels before 2.6.24, you will need to substitute "usb" with "usb_device".
# Copy this file to /lib/udev/rules.d/55-spotlight.rules

# Rule for USB Receiver
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c53e", MODE="660", GROUP="@DEVICE_USER_GROUP@", ENV{USB_HUB_TYPE}="046d:c53e"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c53e", MODE="0660", TAG+="uaccess"

# Rule when connected via Bluetooth
# Updated rule, thanks to Torsten Maehne (https://github.com/maehne)
SUBSYSTEMS=="input", ATTRS{name}=="SPOTLIGHT*", MODE="660", GROUP="@DEVICE_USER_GROUP@"
SUBSYSTEMS=="input", ATTRS{name}=="SPOTLIGHT*", MODE="0660", TAG+="uaccess"
77 changes: 58 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,87 @@ project(Projecteur LANGUAGES CXX)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
include(GitVersion)
include(Translation)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(Qt5 COMPONENTS Core Gui Quick Widgets REQUIRED)
find_package(Qt5 5.7 COMPONENTS Core Gui Quick Widgets REQUIRED)
find_package(Qt5 QUIET COMPONENTS X11Extras)
set(HAS_Qt5_X11Extras ${Qt5_FOUND})

# Qt 5.8 seems to have issues with the way Projecteur shows the full screen overlay window,
# let's warn the user about it.
if(Qt5_VERSION VERSION_EQUAL "5.8"
OR (Qt5_VERSION VERSION_GREATER "5.8" AND Qt5_VERSION VERSION_LESS "5.9"))
message(WARNING "There are known issues when using Projecteur with Qt Version 5.8, "
"please use a different Qt Version.")
endif()

add_executable(projecteur
main.cc
aboutdlg.cc aboutdlg.h
colorselector.cc colorselector.h
preferencesdlg.cc preferencesdlg.h
projecteurapp.cc projecteurapp.h
runguard.cc runguard.h
settings.cc settings.h
spotlight.cc spotlight.h
spotshapes.cc spotshapes.h
resources.qrc qml/qml.qrc)
src/main.cc
src/aboutdlg.cc src/aboutdlg.h
src/colorselector.cc src/colorselector.h
src/imageitem.cc src/imageitem.h
src/preferencesdlg.cc src/preferencesdlg.h
src/projecteurapp.cc src/projecteurapp.h
src/runguard.cc src/runguard.h
src/settings.cc src/settings.h
src/spotlight.cc src/spotlight.h
src/spotshapes.cc src/spotshapes.h
resources.qrc qml/qml.qrc)

target_link_libraries(projecteur
Qt5::Core Qt5::Quick Qt5::Widgets
PRIVATE Qt5::Core Qt5::Quick Qt5::Widgets
)

if(HAS_Qt5_X11Extras)
target_link_libraries(projecteur PRIVATE Qt5::X11Extras)
target_compile_definitions(projecteur PRIVATE HAS_Qt5_X11Extras=1)
endif()

target_compile_options(projecteur
PRIVATE
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wall -Wextra>
)

target_compile_definitions(projecteur PRIVATE
CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID} CXX_COMPILER_VERSION=${CMAKE_CXX_COMPILER_VERSION})

# Set version project properties for builds not from a git repository (e.g. created with git archive)
# If creating the version number via git information fails, the following target properties
# will be used. IMPORTANT - when creating a release tag with git flow:
# Update this information - the version numbers and the version type.
# VERSION_TYPE must be either 'release' or 'develop'
set_target_properties(projecteur PROPERTIES
VERSION_MAJOR 0
VERSION_MINOR 5
VERSION_MINOR 6
VERSION_PATCH 0
VERSION_TYPE release
)
add_version_info(projecteur "${CMAKE_CURRENT_SOURCE_DIR}")

# Create files containing generated version strings, helping package maintainers
get_target_property(PROJECTEUR_VERSION_STRING projecteur VERSION_STRING)
# Arch Linux = PKGBUILD/makepkg: '-' is not allowed in version number
string(REPLACE "-" "" PROJECTEUR_VERSION_STRING_ARCHLINUX "${PROJECTEUR_VERSION_STRING}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version-string" "${PROJECTEUR_VERSION_STRING}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version-string.archlinux" "${PROJECTEUR_VERSION_STRING_ARCHLINUX}")

# Translation
list(APPEND languages de fr es)
set(ts_directories "${CMAKE_CURRENT_SOURCE_DIR}/i18n")
add_translations_target("projecteur" "${CMAKE_CURRENT_BINARY_DIR}" "${ts_directories}" "${languages}")
add_translation_update_task("projecteur" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/i18n" "${languages}")

# Add target with non-source files for convenience when using IDEs like QtCreator and others
add_custom_target(non-sources SOURCES README.md LICENSE.md)

# Install
install(TARGETS projecteur DESTINATION bin)
set(PROJECTEUR_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/bin/projecteur")
set(PROJECTEUR_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/bin/projecteur") #used in desktop file template

# Use udev.pc pkg-config file to set the dir path
if (NOT CMAKE_INSTALL_UDEVRULESDIR)
Expand All @@ -86,7 +124,6 @@ set (CMAKE_INSTALL_UDEVRULESDIR ${UDEVDIR}/rules.d CACHE PATH "Where to install
mark_as_advanced(CMAKE_INSTALL_UDEVRULESDIR)

# Configure and install files
set(DEVICE_USER_GROUP spotlight-device)
set(OUTDIR "${CMAKE_CURRENT_BINARY_DIR}")
set(TMPLDIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates")

Expand All @@ -106,8 +143,13 @@ configure_file("${TMPLDIR}/postinst.in" "pkg/scripts/postinst" @ONLY)

set(HOMEPAGE "https://github.com/jahnf/Projecteur")

# Add 'dist-package' target: Creates a deb/rpm/tgz package depending on the current Linux distribution
# --- Linux packaging ---
include(LinuxPackaging)

# Add 'source-archive' target
add_source_archive_target(projecteur)

# Add 'dist-package' target: Creates a deb/rpm/tgz package depending on the current Linux distribution
add_dist_package_target(
PROJECT "${CMAKE_PROJECT_NAME}"
TARGET projecteur
Expand All @@ -120,6 +162,3 @@ add_dist_package_target(
POSTINST_SCRIPT "${OUTDIR}/pkg/scripts/postinst"
)

# Add 'source-archive' target
add_source_archive_target(projecteur)

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Contributing

* Contributions are very welcome.
* When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
* When contributing to this repository, please first discuss the change(s) you wish to implement
via issue, email, or any other method with the owners of this repository before making a change.
Loading

0 comments on commit 1aa72cd

Please sign in to comment.