Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic switching of audio profiles #463

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
60be21e
compile with cmake
jmlich Dec 13, 2024
e054ab5
Build with ubuntu touch
jmlich Dec 25, 2024
debfaf5
Make sure ubuntu touch is using qmls from qrc
jmlich Dec 25, 2024
b346ef2
Try to fix spec file
jmlich Dec 25, 2024
1aac7c5
fix lib+mlite
jmlich Dec 25, 2024
11537b2
update qble
jmlich Dec 25, 2024
408052d
update to current libwatchfish
jmlich Dec 26, 2024
810b8f1
Install daemon translations
jmlich Dec 28, 2024
0d44379
Make sure to resolve relative path for translations
jmlich Dec 28, 2024
c23a306
Update spec
jmlich Dec 28, 2024
a1b2b02
Update build for SFOS
jmlich Dec 28, 2024
25887c6
Install icons
jmlich Dec 29, 2024
4d105b8
Merge remote-tracking branch 'origin/master' into cmake
jmlich Dec 29, 2024
de3ee39
install icon
jmlich Dec 30, 2024
d62a5ac
Enable sailfish os modules
jmlich Dec 31, 2024
4e944c6
Add ninja, update cmake
jmlich Dec 31, 2024
d3744f0
%install
jmlich Dec 31, 2024
09a3ee0
build of sailfish os rpm
jmlich Dec 31, 2024
b814bfb
Use qmls from qrc
jmlich Jan 1, 2025
aae28a2
ninja is used to compile
jmlich Jan 1, 2025
db81b32
Disable systemd. feature summary
jmlich Jan 1, 2025
646e39c
Test icons
jmlich Jan 4, 2025
d7cd621
Remove unused icons
jmlich Jan 4, 2025
30ef1ae
add all files into qrc
jmlich Jan 4, 2025
99d6d65
fix uuitk styler icon paths
jmlich Jan 4, 2025
dc4941f
Update icon paths
jmlich Jan 4, 2025
0afbdda
QtCreatorDeployment.txt for ui
jmlich Jan 4, 2025
d931b34
Remove unused and broken icon
jmlich Jan 4, 2025
3c5b1b1
SailfishOS translation dir
jmlich Jan 4, 2025
6a176e3
SailfishOS fix paths
jmlich Jan 4, 2025
e1f9ce4
load chirp other way around
jmlich Jan 4, 2025
20278d4
Update documentation for cmake
jmlich Jan 5, 2025
2ae666f
fix icon path
jmlich Jan 10, 2025
28f73bf
Add automatically everything into qrc
jmlich Jan 10, 2025
86b2b3a
Remove qmake files
jmlich Jan 10, 2025
d40a674
Merge remote-tracking branch 'upstream/master' into cmake
jmlich Jan 10, 2025
37a269c
Update icons into qrc
jmlich Jan 10, 2025
181e8ba
some cleanup in cmakes
jmlich Jan 11, 2025
8e6c0c6
Fix translation path
jmlich Jan 11, 2025
d04462f
Merge remote-tracking branch 'upstream/master' into cmake
jmlich Jan 17, 2025
8505b4e
Merge remote-tracking branch 'upstream/master' into cmake
jmlich Jan 17, 2025
3cbcaf5
Merge branch 'master' into cmake
jmlich Jan 18, 2025
6a249d3
Merge remote-tracking branch 'upstream/master' into cmake
jmlich Jan 20, 2025
a13ca89
Switch to silent profile when smartwatch connected
jmlich Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sailfishos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
cp -r /share/* . ;
sb2 -t SailfishOS-$OS_VERSION-${{ matrix.arch }} -R zypper --non-interactive ar --no-gpgcheck https://repo.sailfishos.org/obs/sailfishos:/chum/4.6_${{ matrix.arch }}/ sailfishos_chum ;
sb2 -t SailfishOS-$OS_VERSION-${{ matrix.arch }} -R zypper --non-interactive refresh ;
sb2 -t SailfishOS-$OS_VERSION-${{ matrix.arch }} -R zypper --non-interactive in -y mpris-qt5-devel libkf5archive-devel kcoreaddons-devel kdb-devel libKDb3-3 mkcal-qt5-devel libicu-devel pulseaudio-devel;
sb2 -t SailfishOS-$OS_VERSION-${{ matrix.arch }} -R zypper --non-interactive in -y mpris-qt5-devel libkf5archive-devel kcoreaddons-devel kdb-devel libKDb3-3 mkcal-qt5-devel libicu-devel pulseaudio-devel ninja;
mb2 -t SailfishOS-$OS_VERSION-${{ matrix.arch }} build ;
sudo cp -r RPMS/*.rpm /share/output"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ harbour-amazfish.pro.user*
.clickable/
3rdparty/
build/
CMakeLists.txt.*
47 changes: 47 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.16)

project(harbour-amazfish LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(GNUInstallDirs)
include(FeatureSummary)

find_package(Qt5 COMPONENTS Core Gui Quick Sql DBus LinguistTools REQUIRED)

if(NOT DEFINED FLAVOR)
message(FATAL_ERROR "Please specify the platform using -DFLAVOR=platform as a CMake option. Supported platforms: kirigami, silica, qtcontrols, uuitk.")
elseif(FLAVOR STREQUAL "silica")
add_definitions(-DMER_EDITION_SAILFISH)
add_definitions(-DKF5CALENDARCORE) ### FIXME this should be in libwatchfish

include(FindPkgConfig)
pkg_search_module(SAILFISH sailfishapp REQUIRED)
elseif(FLAVOR STREQUAL "kirigami")
add_definitions(-Dflavor_kirigami)
elseif(FLAVOR STREQUAL "qtcontrols")
add_definitions(-Dflavor_qtcontrols)
elseif(FLAVOR STREQUAL "uuitk")
add_definitions(-DUUITK_EDITION)
add_subdirectory(click)
else()
message(FATAL_ERROR "Unsupported platform '${FLAVOR}'. Supported platforms: kirigami, silica, qtcontrols, uuitk.")
endif()

add_subdirectory(qble)
add_subdirectory(lib)
add_subdirectory(daemon)
add_subdirectory(ui)

feature_summary(WHAT ALL)
36 changes: 36 additions & 0 deletions click/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
OUTPUT_VARIABLE ARCH_TRIPLET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")

set(PROJECT_NAME "harbour-amazfish")
set(FULL_PROJECT_NAME "uk.co.piggz.amazfish")
set(DATA_DIR /)
set(DESKTOP_FILE_NAME ${PROJECT_NAME}-ui.desktop)

# This command figures out the minimum SDK framework for use in the manifest
# file via the environment variable provided by Clickable or sets a default value otherwise.
if(DEFINED ENV{SDK_FRAMEWORK})
set(CLICK_FRAMEWORK "$ENV{SDK_FRAMEWORK}")
else()
set(CLICK_FRAMEWORK "ubuntu-sdk-20.04")
endif()

# This figures out the target architecture for use in the manifest file.
if(DEFINED ENV{ARCH})
set(CLICK_ARCH "$ENV{ARCH}")
else()
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_ARCH
OUTPUT_VARIABLE CLICK_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()

configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR})
install(FILES ${DESKTOP_FILE_NAME} DESTINATION ${DATA_DIR})
install(FILES ./run.sh PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION ${CMAKE_INSTALL_BINDIR})
44 changes: 0 additions & 44 deletions click/click.pro

This file was deleted.

4 changes: 2 additions & 2 deletions click/harbour-amazfish-ui.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Icon=harbour-amazfish-ui.png
Exec=run.sh
Icon=share/icons/hicolor/172x172/apps/harbour-amazfish-ui.png
Exec=./bin/run.sh
Name=Amazfish
X-Ubuntu-Touch=true
X-Ubuntu-Splash-Color=#F5F5F5
11 changes: 5 additions & 6 deletions clickable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ prebuild: git submodule update --init
kill: harbour-amazfish
ignore_review_errors: true

builder: qmake
builder: cmake
build_args:
- FLAVOR=uuitk
- CONFIG+=click
- INCLUDEPATH+=${QTMPRIS_LIB_INSTALL_DIR}/usr/include/${ARCH_TRIPLET}/qt5/MprisQt
- INCLUDEPATH+=${QTMPRIS_LIB_INSTALL_DIR}/usr/include/${ARCH_TRIPLET}/qt5
- LIBS+=-L${QTMPRIS_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}
- -DFLAVOR=uuitk
- -DCMAKE_CXX_FLAGS=-I${QTMPRIS_LIB_INSTALL_DIR}/usr/include/${ARCH_TRIPLET}/qt5/\ -I${QTMPRIS_LIB_INSTALL_DIR}/usr/include/${ARCH_TRIPLET}/qt5/MprisQt
- -DCMAKE_EXE_LINKER_FLAGS=-L${QTMPRIS_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/
env_vars:
PKG_CONFIG_PATH: ${QTMPRIS_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/pkgconfig:${NEMO_QML_PLUGIN_DBUS_LIB_INSTALL_DIR}/usr/lib/${ARCH_TRIPLET}/pkgconfig

dependencies_target:
- libkdb3-driver-sqlite
- qml-module-org-kde-bluezqt
Expand Down
Loading
Loading