Skip to content

Commit

Permalink
Merge pull request #1 from alexzk1/sort_it
Browse files Browse the repository at this point in the history
Sort it
  • Loading branch information
alexzk1 authored Apr 13, 2024
2 parents 2604be8 + 796f516 commit df6c558
Show file tree
Hide file tree
Showing 21 changed files with 134 additions and 225 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ CMakeFiles/
Testing/
cmake_install.cmake
qtcsettings.cmake
Build*/
build*/

24 changes: 0 additions & 24 deletions CMakeLists.txt

This file was deleted.

130 changes: 0 additions & 130 deletions CODE_OF_CONDUCT.md

This file was deleted.

17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@

## Installation

- Clone the repo into your EDMC plugins directory
- NB: you *must* name the directory `edmcoverlay`, not `edmcoverlay2`
- Clone the repo into your EDMC plugins' directory
- NB: you *must* name the directory `edmcoverlay`, not `edmcoverlay2`. You may clone repo elsewhere and symlink it as `edmcoverlay` to the plugins' directory. This is required because all other plugins use this name to access overlay (some are using `EDMCOverlay` naming too).
- Install the dependencies (mostly X11 development headers; on Ubuntu,
the `xorg-dev` package may be sufficient)
- Run `cmake . & make`
- Run script `create_binary.sh` it will handle all needed.
- In the EDMC settings, configure the size and position of the overlay

## Dependencies

Full list of libraries used check into `cpp/CMakeLists.txt`. Those must be pre-installed in system before running compilation.

## Usage

edmcoverlay2 aims to be 100% compatible with EDMC Overlay. Python library is a wrapper to pass json to the compiled binary.
Expand All @@ -21,15 +25,10 @@ TTF fonts are supported.

Some features are not yet implemented, and there are likely to be bugs.

## Contributing

Everyone interacting with this project is expected to abide by the terms
of the Contributor Covenant Code of Conduct. Violations should be
reported to coc-enforcement-edmcoverlay2@sorrel.sh.

## Copyright

Copyright © 2020 Ash Holland. Licensed under the GPL (version 3 only).

Copyright © 2021-2024 Oleksiy Zakharov. Licensed under the GPL (version 3 only).

edmcoverlay2 is heavily based on [X11 overlay][] by @ericek111 (GPLv3).
Expand Down
27 changes: 27 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.5)

project(edmc_linux_overlay LANGUAGES CXX)

#Required packages, please install it using package manager, on Ubuntu it may have prefix "lib" or suffix "-dev" or both.
find_package(Freetype REQUIRED)
find_package(Fontconfig REQUIRED)
find_package(X11 COMPONENTS Xft Xfixes Xext REQUIRED)


set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_VERBOSE_MAKEFILE ON)


add_executable(${CMAKE_PROJECT_NAME} overlay.cpp json.hpp socket.cc socket.hh json_message.cc json_message.hh xoverlayoutput.cpp xoverlayoutput.h
opaque_ptr.h cm_ctors.h colors_mgr.h drawables.h layer_out.h runners.h)

target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -march=native -Wall)

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}
${X11_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} ${Fontconfig_INCLUDE_DIR})

target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC ${X11_X11_LIB} ${X11_Xfixes_LIB}
${X11_Xft_LIB} ${X11_Xext_LIB}
${FREETYPE_LIBRARIES} ${Fontconfig_LIBRARY} -lpthread)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions create_binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -e

#First find the folder, where this script resides.
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )

#We expect subfolder cpp there.
cd $DIR/cpp

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --verbose

echo ""
echo ""
echo "Everything is prepared. You can start EDMC now."

Loading

0 comments on commit df6c558

Please sign in to comment.