Merge pull request 'master' (#26) from Applications/ubl-settings-video:master into develop

Reviewed-on: YanTheKaller/ubl-settings-video#26
pull/28/head
commit 5bbd2dbbe5

@ -8,13 +8,10 @@ MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH))
CMAKE_COMMAND = cmake CMAKE_COMMAND = cmake
CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
#CMAKE_SOURCE_DIR = ./source
#CMAKE_BUILD_DIR = ./compile
FILE_VERSION = VERSION.md FILE_VERSION = VERSION.md
DEPENDS = /bin/cmake DEPENDS = /bin/cmake
PREFIX ?= /usr PREFIX ?= /usr
PKGNAME = $(MAKEFILE_DIR) PKGNAME = $(MAKEFILE_DIR)
#PKGNAME = ubl-settings-manager
default_target: all default_target: all
@ -35,8 +32,8 @@ depend:
exit 1; \ exit 1; \
fi; \ fi; \
done; \ done; \
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B${CMAKE_BUILD_DIR} --check-build-system CMakeFiles/Makefile.cmake 1 || exit 1; \
echo "Check depends: OK" echo "Check depends: OK"
# $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
debug: debug:
@echo "Debug ..." @echo "Debug ..."
@ -84,10 +81,16 @@ uninstall:
done; \ done; \
done done
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}/etc/xdg/${PKGNAME}/${PKGNAME}.conf"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
@$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}/images" @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/devices/com.ublinux.${PKGNAME}.display.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/devices/com.ublinux.${PKGNAME}.video-card.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/emblems/com.ublinux.${PKGNAME}.nvidia-logo.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/emblems/com.ublinux.${PKGNAME}.intel-logo.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/emblems/com.ublinux.${PKGNAME}.amd-logo.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/com.ublinux.${PKGNAME}.checked.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/com.ublinux.${PKGNAME}.warning.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"
@$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}" @$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}"
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
@ -120,14 +123,13 @@ install: check uninstall
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg"
@install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions" @install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.pkexec.${PKGNAME}.exec.policy" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"
@install -Dm655 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
@install -dm755 "${DESTDIR}${PREFIX}/share/applications" @install -dm755 "${DESTDIR}${PREFIX}/share/applications"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
@install -dm655 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images} @install -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images,csv}
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css"
@install -dm655 "${DESTDIR}${PREFIX}/share/${PKGNAME}/images"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "${PKGNAME}-banner.png" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "${PKGNAME}-banner.png"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/csv/" "resolutions.csv" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/csv/" "resolutions.csv"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/csv/" "video-drivers.csv" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/csv/" "video-drivers.csv"

@ -1,5 +1,11 @@
# ubl-settings-video # ubl-settings-video
# Настройки видеоадаптера и дисплея # Настройка видеоадаптера и дисплея
[RU] Утилита для настройки видеоадаптера и дисплея
Utility for configuring the video adapter and display
![alt text](screenshot/screenshot.png)
# Build # Build
In order to build ubl-settings-video you will need: In order to build ubl-settings-video you will need:
@ -7,23 +13,42 @@ In order to build ubl-settings-video you will need:
- C compiler - C compiler
- GTK+ 3 & dependencies - GTK+ 3 & dependencies
- vte-2.91 - vte-2.91
- webkit2gtk
Options for compiling:
`--nowebkit2gtk` - Compiling without webkit2gtk
Once you have all the necessary dependencies, you can use: Once you have all the necessary dependencies, you can use:
```sh ```bash
$ make $ make
``` ```
# Installation # Installation
After a successful build, just use: After a successful build, just use:
```sh ```bash
$ sudo make install clean $ sudo make install clean
``` ```
# Uninstallation # Uninstallation
After a successful build, just use: After a successful build, just use:
```sh ```bash
$ sudo make uninstall $ sudo make uninstall
``` ```
![alt text](desc/ubl-settings-video-screenshot.png) # Usage
```bash
$ ubl-settings-video --help
Configuring the video adapter and display for UBLinux
Usage: ubl-settings-video [OPTIONS...]
Options:
-h, --help Show this help
-V, --version Show package version
--lock-save Lock saving local and global configuration
--lock-save-local Lock save global configuration
--lock-save-global Lock load global configuration
--lock-load-global Lock load global configuration
$ ubl-settings-video --version
ubl-settings-video version: x.xx
```

@ -1 +1 @@
VERSION 1.0 VERSION 2.1

@ -7,11 +7,11 @@
<vendor>UBLinux</vendor> <vendor>UBLinux</vendor>
<vendor_url>https://ublinux.ru</vendor_url> <vendor_url>https://ublinux.ru</vendor_url>
<action id="org.freedesktop.policykit.ubl-settings-video.pkexec.policy.run"> <action id="com.ublinux.ubl-settings-video.run">
<description>Run "ubl-settings-video" as root</description> <description>Run ubl-settings-video as root</description>
<description xml:lang="ru">Запуск утилиты "ubl-settings-video" с правами root</description> <description xml:lang="ru">Запуск утилиты ubl-settings-video с правами root</description>
<message>Authentication is required to run "ubl-settings-video"</message> <message>Authentication is required to run ubl-settings-video</message>
<message xml:lang="ru">Требуется авторизация для запуска утилиты "ubl-settings-video" с правами root</message> <message xml:lang="ru">Требуется авторизация для запуска утилиты ubl-settings-video с правами root</message>
<defaults> <defaults>
<allow_any>auth_admin</allow_any> <allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive> <allow_inactive>auth_admin</allow_inactive>

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

@ -1,17 +1,21 @@
cmake_minimum_required(VERSION 3.7) cmake_minimum_required(VERSION 3.23)
project(ubl-settings-video) project(ubl-settings-video)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtk+-3.0) pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
include_directories(${GTK_INCLUDE_DIRS}) include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS}) link_directories(${GTK3_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER}) add_definitions(${GTK3_CFLAGS_OTHER})
option(WEBKIT_FOUND "No" OFF) pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF)
if(WEBKIT_LIBRARIES_FOUND) if(WEBKIT_LIBRARIES_FOUND)
option(WEBKIT_FOUND "Yes" ON) option(WEBKIT_FOUND "Yes" ON)
PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0) PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
@ -35,15 +39,12 @@ set(SOURCE_FILES
ubl-settings-video-cm.h) ubl-settings-video-cm.h)
set(LIBRARIES set(LIBRARIES
${GTK_LIBRARIES} ${GTK3_LIBRARIES}
pthread ${WEBKIT_LIBRARIES}
vte-2.91) ${VTE291_LIBRARIES}
pthread)
add_executable(ubl-settings-video ${SOURCE_FILES}) add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(ubl-settings-video PUBLIC ${WEBKIT_LIBRARIES} ${LIBRARIES}) target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBRARIES})
target_include_directories(ubl-settings-video PUBLIC target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR})
"${PROJECT_BINARY_DIR}" install(TARGETS ${PROJECT_NAME} DESTINATION bin)
${WEBKIT_INCLUDE_DIRS}
)
install(TARGETS ubl-settings-video DESTINATION bin)

@ -90,7 +90,7 @@ char *local;
typedef char *string; typedef char *string;
string version_application = "1.6"; string version_application = "1.8";
#define _(String) gettext(String) #define _(String) gettext(String)

@ -3,7 +3,7 @@ Encoding=UTF-8
Name=ubl-settings-video Name=ubl-settings-video
Name[ru]=Настройки видеоадаптера и дисплея Name[ru]=Настройки видеоадаптера и дисплея
GenericName=ubl-settings-video GenericName=ubl-settings-video
GenericName[ru]=Настройки Видеоадаптера и дисплея GenericName[ru]=Настройки видеоадаптера и дисплея
Comment=Application for managing video adapter and display settings Comment=Application for managing video adapter and display settings
Comment[ru]=Приложение для управления настройками видеоадаптера и дисплея Comment[ru]=Приложение для управления настройками видеоадаптера и дисплея
Type=Application Type=Application
@ -12,4 +12,4 @@ Icon=com.ublinux.ubl-settings-video
Terminal=false Terminal=false
X-XfcePluggable=true X-XfcePluggable=true
X-UBLPluggable=true X-UBLPluggable=true
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-HardwareSettings; Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;X-UBL-SettingsManager;X-UBL-HardwareSettings;

Loading…
Cancel
Save