Skip to content

Commit 1aa72cd

Browse files
committed
Merge branch 'release/0.6'
2 parents b6fc542 + 12b06ae commit 1aa72cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2819
-1150
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.gitignore export-ignore
2+
.gitattributes export-ignore
3+
_config.yml export-ignore
4+
.travis.yml export-ignore
5+
.github export-ignore
6+
cmake/modules/ArchiveExportInfo.cmake export-subst
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report to help the project improve
4+
title: "[BUG] Title"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Description**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Please describe the steps to reproduce the behavior
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Desktop/Linux Environment (please complete the following information):**
20+
- Linux Distribution and Version: [e.g. Ubuntu 18.04]
21+
- Desktop/Window Manager and Version [e.g. GNOME 3.28, KDE 5.4...]
22+
- Did you built _Projecteur_ yourself?: `[y/n]` \
23+
_(If yes: Please run cmake for existing build directories, to ensure the generated version info is up to date)_
24+
- What is the output of `projecteur -f` ?: ...
25+
- What is the output of `projecteur -d` ?: ...
26+
27+
**Screenshots**
28+
Only if applicable, add screenshots to help explain your problem.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Everything else
3+
about: For everything that's not a bug or a feature request...
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: You have a request or an idea, awesome - let's hear it
4+
title: 'Feature Request: Title'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
If yes, please describe what the problem is. Example: I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
CMakeLists.txt.user*
22
.vscode
3-
3+
.idea
4+
build
5+
build/*

.travis.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
language: cpp
22
matrix:
33
include:
4+
- os: linux
5+
dist: bionic
6+
env: DOCKER_IMG=jahnf/projecteur:archlinux
47
- os: linux
58
dist: xenial
69
env: DOCKER_IMG=jahnf/projecteur:debian-stretch
710
- os: linux
8-
dist: xenial
9-
env: DOCKER_IMG=jahnf/projecteur:ubuntu-16.04
11+
dist: bionic
12+
env: DOCKER_IMG=jahnf/projecteur:debian-buster
1013
- os: linux
1114
dist: xenial
12-
env:
13-
- DOCKER_IMG=jahnf/projecteur:ubuntu-18.04
14-
- BUILD_SOURCE_PKG=1
15+
env: DOCKER_IMG=jahnf/projecteur:ubuntu-18.04
1516
- os: linux
1617
dist: xenial
1718
env: DOCKER_IMG=jahnf/projecteur:opensuse-15.0
1819
- os: linux
1920
dist: xenial
20-
env: DOCKER_IMG=jahnf/projecteur:opensuse-42.3
21+
env: DOCKER_IMG=jahnf/projecteur:opensuse-15.1
22+
- os: linux
23+
dist: bionic
24+
env: DOCKER_IMG=jahnf/projecteur:fedora-30
25+
- os: linux
26+
dist: bionic
27+
env: DOCKER_IMG=jahnf/projecteur:fedora-31
2128
script:
2229
- git fetch --tags
2330
- "[ -f $(git rev-parse --git-dir)/shallow ] && git fetch --unshallow || echo No need to unshallow..."
@@ -27,12 +34,7 @@ script:
2734
- docker exec -it build /bin/bash -c "cd /build && cmake --build ."
2835
- docker exec -it build /bin/bash -c "cd /build && cmake --build . --target dist-package"
2936
- docker exec -it build /bin/bash -c "cd /build && ./projecteur --version"
30-
- docker exec -it build /bin/bash -c "mv /build/*.deb /build/dist-pkg || true"
31-
- docker exec -it build /bin/bash -c "mv /build/*.rpm /build/dist-pkg || true"
32-
- docker exec -it build /bin/bash -c "mv /build/*.tgz /build/dist-pkg || true"
33-
- docker exec -it build /bin/bash -c "mv /build/*.tar.gz /build/dist-pkg || true"
3437
- "[ \"${BUILD_SOURCE_PKG}\" = 1 ] && docker exec -it build /bin/bash -c \"cd /build && cmake --build . --target source-archive\" || true"
35-
- "[ \"${BUILD_SOURCE_PKG}\" = 1 ] && docker exec -it build /bin/bash -c \"mv /build/archive_output/* /build/dist-pkg\" || true"
3638
- docker cp build:/build/dist-pkg .
3739
- docker cp build:/build/travis-ci-bintray-deploy.json .
3840
- ls -alh dist-pkg

55-spotlight.rules.in

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
# Set up permissions for non root users to open the Logitech Spotlight USB Receiver
22
# Enables the Projecteur application to access the device.
33

4-
# Copy this file to /etc/udev/rules.d/55-spotlight.rules and replace '@DEVICE_USER_GROUP@'
5-
# with a group your user is a member in.
6-
#
7-
# Existing groups like 'plugdev' and 'dialout' can be used, but the `install` target
8-
# uses a group called 'spotlight-device' by default.
9-
# Linux packages created with the 'dist-package' target will create this group if not
10-
# present during installation.
11-
#
12-
# Run `sudo udevadm control --reload-rules` and `sudo udevadm trigger`
13-
# to load rules without rebooting.
14-
15-
# Note that for kernels before 2.6.24, you will need to substitute "usb" with "usb_device".
4+
# Copy this file to /lib/udev/rules.d/55-spotlight.rules
165

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

209
# Rule when connected via Bluetooth
2110
# Updated rule, thanks to Torsten Maehne (https://github.com/maehne)
22-
SUBSYSTEMS=="input", ATTRS{name}=="SPOTLIGHT*", MODE="660", GROUP="@DEVICE_USER_GROUP@"
11+
SUBSYSTEMS=="input", ATTRS{name}=="SPOTLIGHT*", MODE="0660", TAG+="uaccess"

CMakeLists.txt

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,87 @@ project(Projecteur LANGUAGES CXX)
2020

2121
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
2222
include(GitVersion)
23+
include(Translation)
2324

2425
set(CMAKE_CXX_STANDARD 14)
2526
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2627

2728
set(CMAKE_AUTOMOC ON)
2829
set(CMAKE_AUTORCC ON)
29-
find_package(Qt5 COMPONENTS Core Gui Quick Widgets REQUIRED)
30+
find_package(Qt5 5.7 COMPONENTS Core Gui Quick Widgets REQUIRED)
31+
find_package(Qt5 QUIET COMPONENTS X11Extras)
32+
set(HAS_Qt5_X11Extras ${Qt5_FOUND})
33+
34+
# Qt 5.8 seems to have issues with the way Projecteur shows the full screen overlay window,
35+
# let's warn the user about it.
36+
if(Qt5_VERSION VERSION_EQUAL "5.8"
37+
OR (Qt5_VERSION VERSION_GREATER "5.8" AND Qt5_VERSION VERSION_LESS "5.9"))
38+
message(WARNING "There are known issues when using Projecteur with Qt Version 5.8, "
39+
"please use a different Qt Version.")
40+
endif()
3041

3142
add_executable(projecteur
32-
main.cc
33-
aboutdlg.cc aboutdlg.h
34-
colorselector.cc colorselector.h
35-
preferencesdlg.cc preferencesdlg.h
36-
projecteurapp.cc projecteurapp.h
37-
runguard.cc runguard.h
38-
settings.cc settings.h
39-
spotlight.cc spotlight.h
40-
spotshapes.cc spotshapes.h
41-
resources.qrc qml/qml.qrc)
43+
src/main.cc
44+
src/aboutdlg.cc src/aboutdlg.h
45+
src/colorselector.cc src/colorselector.h
46+
src/imageitem.cc src/imageitem.h
47+
src/preferencesdlg.cc src/preferencesdlg.h
48+
src/projecteurapp.cc src/projecteurapp.h
49+
src/runguard.cc src/runguard.h
50+
src/settings.cc src/settings.h
51+
src/spotlight.cc src/spotlight.h
52+
src/spotshapes.cc src/spotshapes.h
53+
resources.qrc qml/qml.qrc)
4254

4355
target_link_libraries(projecteur
44-
Qt5::Core Qt5::Quick Qt5::Widgets
56+
PRIVATE Qt5::Core Qt5::Quick Qt5::Widgets
57+
)
58+
59+
if(HAS_Qt5_X11Extras)
60+
target_link_libraries(projecteur PRIVATE Qt5::X11Extras)
61+
target_compile_definitions(projecteur PRIVATE HAS_Qt5_X11Extras=1)
62+
endif()
63+
64+
target_compile_options(projecteur
65+
PRIVATE
66+
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wall -Wextra>
4567
)
4668

69+
target_compile_definitions(projecteur PRIVATE
70+
CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID} CXX_COMPILER_VERSION=${CMAKE_CXX_COMPILER_VERSION})
71+
4772
# Set version project properties for builds not from a git repository (e.g. created with git archive)
4873
# If creating the version number via git information fails, the following target properties
4974
# will be used. IMPORTANT - when creating a release tag with git flow:
5075
# Update this information - the version numbers and the version type.
5176
# VERSION_TYPE must be either 'release' or 'develop'
5277
set_target_properties(projecteur PROPERTIES
5378
VERSION_MAJOR 0
54-
VERSION_MINOR 5
79+
VERSION_MINOR 6
5580
VERSION_PATCH 0
5681
VERSION_TYPE release
5782
)
5883
add_version_info(projecteur "${CMAKE_CURRENT_SOURCE_DIR}")
5984

85+
# Create files containing generated version strings, helping package maintainers
86+
get_target_property(PROJECTEUR_VERSION_STRING projecteur VERSION_STRING)
87+
# Arch Linux = PKGBUILD/makepkg: '-' is not allowed in version number
88+
string(REPLACE "-" "" PROJECTEUR_VERSION_STRING_ARCHLINUX "${PROJECTEUR_VERSION_STRING}")
89+
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version-string" "${PROJECTEUR_VERSION_STRING}")
90+
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version-string.archlinux" "${PROJECTEUR_VERSION_STRING_ARCHLINUX}")
91+
92+
# Translation
93+
list(APPEND languages de fr es)
94+
set(ts_directories "${CMAKE_CURRENT_SOURCE_DIR}/i18n")
95+
add_translations_target("projecteur" "${CMAKE_CURRENT_BINARY_DIR}" "${ts_directories}" "${languages}")
96+
add_translation_update_task("projecteur" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/i18n" "${languages}")
97+
6098
# Add target with non-source files for convenience when using IDEs like QtCreator and others
6199
add_custom_target(non-sources SOURCES README.md LICENSE.md)
62100

63101
# Install
64102
install(TARGETS projecteur DESTINATION bin)
65-
set(PROJECTEUR_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/bin/projecteur")
103+
set(PROJECTEUR_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/bin/projecteur") #used in desktop file template
66104

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

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

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

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

109-
# Add 'dist-package' target: Creates a deb/rpm/tgz package depending on the current Linux distribution
146+
# --- Linux packaging ---
110147
include(LinuxPackaging)
148+
149+
# Add 'source-archive' target
150+
add_source_archive_target(projecteur)
151+
152+
# Add 'dist-package' target: Creates a deb/rpm/tgz package depending on the current Linux distribution
111153
add_dist_package_target(
112154
PROJECT "${CMAKE_PROJECT_NAME}"
113155
TARGET projecteur
@@ -120,6 +162,3 @@ add_dist_package_target(
120162
POSTINST_SCRIPT "${OUTDIR}/pkg/scripts/postinst"
121163
)
122164

123-
# Add 'source-archive' target
124-
add_source_archive_target(projecteur)
125-

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Contributing
22

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

0 commit comments

Comments
 (0)