Watcher -- будильник+таймер+логгер

safocl
### Build
on GNU/Linux:

after cloning this repository, you should do `git submodule update –init`.

```bash
$ mkdir build && cd build
$ cmake ..
$ make -jN # N – number threads of you processor
```
Результат:
[anode@TM-8481 Watch]$ git clone https://github.com/safocl/Watcher
Cloning into 'Watcher'...
remote: Enumerating objects: 137, done.
remote: Counting objects: 100% (137/137), done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 11751 (delta 70), reused 99 (delta 47), pack-reused 11614
Receiving objects: 100% (11751/11751), 47.76 MiB | 2.05 MiB/s, done.
Resolving deltas: 100% (2044/2044), done.
Updating files: 100% (11171/11171), done.
[anode@TM-8481 Watch]$ cd Watcher/
[anode@TM-8481 Watcher]$ git submodule update --init
Submodule '3rd-party/nlohmann_json' (https://github.com/nlohmann/json.git) registered for path '3rd-party/nlohmann_json'
Cloning into '/home/anode/Watch/Watcher/3rd-party/nlohmann_json'...
Submodule path '3rd-party/nlohmann_json': checked out 'eb7376bb131a4b19a5fc6aacfd046fd298cd0119'
[anode@TM-8481 Watcher]$ mkdir build && cd build
[anode@TM-8481 build]$ cmake ..
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
OS: Linux
Build system is Linux
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
-- Checking for one of the modules 'gtkmm-3.0'
-- Checking for one of the modules 'SDL2_mixer'
CMake Error at /usr/share/cmake-3.19/Modules/FindPkgConfig.cmake:805 (message):
  None of the required 'SDL2_mixer' found
Call Stack (most recent call first):
  CMakeLists.txt:30 (pkg_search_module)
-- Using the single-header code from /home/anode/Watch/Watcher/3rd-party/nlohmann_json/single_include/
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring incomplete, errors occurred!
See also "/home/anode/Watch/Watcher/build/CMakeFiles/CMakeOutput.log".
See also "/home/anode/Watch/Watcher/build/CMakeFiles/CMakeError.log".
Файлов CMakeOutput.log". CMakeError.log" в каталоге build нет.
anode
None of the required 'SDL2_mixer' found
тут у тебя не установлен пакет для sdl2_mixer
anode
Файлов CMakeOutput.log". CMakeError.log" в каталоге build нет.
они в
anode
See also "/home/anode/Watch/Watcher/build/CMakeFiles/CMakeOutput.log".
See also "/home/anode/Watch/Watcher/build/CMakeFiles/CMakeError.log".
safocl
тут у тебя не установлен пакет для sdl2_mixer
Я читать умею )))

safocl, где тут sdl2_mixer?
safocl
### Dependies:
gtkmm3 – to make and linkage (headers and libs).
this project use [nlohmann/json](https://github.com/nlohmann/json/tree/eb7376bb131a4b19a5fc6aacfd046fd298cd0119) for JSON parse.

### Build
Запуск таймера на 1 минуту:
[anode@TM-8481 src]$ ./Watcher
Not valid pathToLogFile in config file
load default pathToLogFile
Not valid pathToTheme in config file
load default pathToTheme
Not valid pathToLogFile in config file
load default pathToLogFile
Not valid pathToTheme in config file
load default pathToTheme
css file not found
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Перервано (збережено знімок оперативної пам’яті)
anode
где тут sdl2_mixer?
я же тут в теме указал... -- надо в гите тоже добавить в редми...
anode
what(): locale::facet::_S_create_c_locale name not valid
а у тебя установлена utf-8 локаль?

если запускать так:
LC_ALL=en_US.utf-8 watcher
как будет?
наверна надо локаль получать из переменной окружения...
надо составить карту по импрувменту проги -- типа ТОДО листа...
Кстати, поучительный пример, что писание для себя и писание для других требуют разной культуры программирования.
такие дела.
не очень это помагает
[anode@TM-8481 src]$ locale
LANG=uk_UA.UTF8
LC_CTYPE="uk_UA.UTF8"
LC_NUMERIC="uk_UA.UTF8"
LC_TIME="uk_UA.UTF8"
LC_COLLATE="uk_UA.UTF8"
LC_MONETARY="uk_UA.UTF8"
LC_MESSAGES="uk_UA.UTF8"
LC_PAPER="uk_UA.UTF8"
LC_NAME="uk_UA.UTF8"
LC_ADDRESS="uk_UA.UTF8"
LC_TELEPHONE="uk_UA.UTF8"
LC_MEASUREMENT="uk_UA.UTF8"
LC_IDENTIFICATION="uk_UA.UTF8"
LC_ALL=
[anode@TM-8481 src]$ LC_ALL=uk_UA.UTF8 ./Watcher
Not valid pathToLogFile in config file
load default pathToLogFile
Not valid pathToTheme in config file
load default pathToTheme
Not valid pathToLogFile in config file
load default pathToLogFile
Not valid pathToTheme in config file
load default pathToTheme
css file not found
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Перервано (збережено знімок оперативної пам’яті)
У меня не было локали en_US.UTF8. После ее генерации:
[anode@TM-8481 src]$ LC_ALL=en_US.UTF8 ./Watcher
Not valid pathToLogFile in config file
load default pathToLogFile
Not valid pathToTheme in config file
load default pathToTheme
Not valid pathToLogFile in config file
load default pathToLogFile
Not valid pathToTheme in config file
load default pathToTheme
css file not found
Timer stoped at: 2021-01-14 15:30:37
terminate called after throwing an instance of 'std::runtime_error'
  what():  Couldn't open 'share/alarm.opus'
Aborted (core dumped)
 
Зарегистрироваться или войдите чтобы оставить сообщение.