chore: clean up code comments
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# Project-level configuration.
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
@@ -6,8 +5,6 @@ project(runner LANGUAGES CXX)
|
||||
# registered by the runner subdirectory.
|
||||
include(CTest)
|
||||
|
||||
# The name of the executable created for the application. Change this to change
|
||||
# the on-disk name of your application.
|
||||
set(BINARY_NAME "plezy")
|
||||
# The unique GTK application identifier for this application. See:
|
||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||
@@ -30,7 +27,6 @@ if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endif()
|
||||
|
||||
# Define build configuration options.
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
||||
STRING "Flutter build mode" FORCE)
|
||||
@@ -63,7 +59,6 @@ function(APPLY_STANDARD_SETTINGS TARGET)
|
||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||
endfunction()
|
||||
|
||||
# Flutter library and tool build rules.
|
||||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Ensure binaries are executable
|
||||
chmod +x /usr/bin/plezy
|
||||
chmod +x /opt/plezy/plezy
|
||||
chmod +x /opt/plezy/lib/crashpad_handler
|
||||
|
||||
# Update icon cache
|
||||
if command -v gtk-update-icon-cache &> /dev/null; then
|
||||
gtk-update-icon-cache -f -t /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
# Update desktop database
|
||||
if command -v update-desktop-database &> /dev/null; then
|
||||
update-desktop-database /usr/share/applications || true
|
||||
fi
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Update icon cache
|
||||
if command -v gtk-update-icon-cache &> /dev/null; then
|
||||
gtk-update-icon-cache -f -t /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
# Update desktop database
|
||||
if command -v update-desktop-database &> /dev/null; then
|
||||
update-desktop-database /usr/share/applications || true
|
||||
fi
|
||||
|
||||
@@ -6,14 +6,12 @@ import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Paths
|
||||
SCRIPT_DIR = Path(__file__).parent.resolve()
|
||||
PROJECT_ROOT = SCRIPT_DIR.parent.parent
|
||||
BUILD_DIR = Path(os.environ["BUILD_DIR"]) if "BUILD_DIR" in os.environ else PROJECT_ROOT / "build/linux/x64/release/bundle"
|
||||
OUTPUT_DIR = Path(os.environ.get("OUTPUT_DIR", PROJECT_ROOT))
|
||||
ARCH_SUFFIX = os.environ.get("ARCH_SUFFIX", "x64")
|
||||
|
||||
# Package metadata
|
||||
METADATA = {
|
||||
"name": "plezy",
|
||||
"license": "GPL-3.0",
|
||||
@@ -23,16 +21,13 @@ METADATA = {
|
||||
"description": "A modern Plex and Jellyfin client for desktop and mobile",
|
||||
}
|
||||
|
||||
# Icon sizes to generate
|
||||
ICON_SIZES = [16, 32, 48, 64, 128, 256, 512]
|
||||
|
||||
# Architecture mappings per package format
|
||||
ARCH_MAP = {
|
||||
"x64": {"deb": "amd64", "rpm": "x86_64", "pacman": "x86_64"},
|
||||
"arm64": {"deb": "arm64", "rpm": "aarch64", "pacman": "aarch64"},
|
||||
}
|
||||
|
||||
# Distro-specific configuration
|
||||
DISTROS = {
|
||||
"deb": {
|
||||
"type": "deb",
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME in the
|
||||
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
|
||||
# work.
|
||||
#
|
||||
# Any new source files that you add to the application should be added here.
|
||||
add_executable(${BINARY_NAME}
|
||||
"main.cc"
|
||||
"my_application.cc"
|
||||
@@ -15,8 +10,6 @@ add_executable(${BINARY_NAME}
|
||||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
|
||||
)
|
||||
|
||||
# Apply the standard set of build settings. This can be removed for applications
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# apply_standard_settings asks for cxx_std_14, which current compilers satisfy
|
||||
@@ -25,14 +18,8 @@ apply_standard_settings(${BINARY_NAME})
|
||||
# compiler happens to default to.
|
||||
target_compile_features(${BINARY_NAME} PRIVATE cxx_std_17)
|
||||
|
||||
# Add preprocessor definitions for the application ID.
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
|
||||
# Find mpv library.
|
||||
pkg_check_modules(MPV REQUIRED IMPORTED_TARGET mpv)
|
||||
|
||||
# Find epoxy (OpenGL loader).
|
||||
pkg_check_modules(EPOXY REQUIRED IMPORTED_TARGET epoxy)
|
||||
|
||||
# Wayland client + EGL back the native video plane (a wl_subsurface below the
|
||||
# Flutter surface). GTK's Wayland backend already links these, but the runner
|
||||
@@ -40,6 +27,8 @@ pkg_check_modules(EPOXY REQUIRED IMPORTED_TARGET epoxy)
|
||||
pkg_check_modules(WAYLAND_CLIENT REQUIRED IMPORTED_TARGET wayland-client)
|
||||
pkg_check_modules(WAYLAND_EGL REQUIRED IMPORTED_TARGET wayland-egl)
|
||||
pkg_check_modules(EGL REQUIRED IMPORTED_TARGET egl)
|
||||
pkg_check_modules(MPV REQUIRED IMPORTED_TARGET mpv)
|
||||
pkg_check_modules(EPOXY REQUIRED IMPORTED_TARGET epoxy)
|
||||
|
||||
# Vendored wayland-scanner output for color-management-v1 (staging), which backs
|
||||
# HDR on the native video plane. Built separately because it is C (the runner is
|
||||
@@ -65,14 +54,11 @@ target_include_directories(wayland_protocols PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}
|
||||
target_link_libraries(wayland_protocols PUBLIC PkgConfig::WAYLAND_CLIENT)
|
||||
target_compile_options(wayland_protocols PRIVATE -w)
|
||||
|
||||
# Build simdutf as a static library from the single-header amalgamation.
|
||||
add_library(simdutf STATIC "${simdutf_SOURCE_DIR}/simdutf.cpp")
|
||||
target_include_directories(simdutf PUBLIC "${simdutf_SOURCE_DIR}")
|
||||
target_compile_features(simdutf PUBLIC cxx_std_14)
|
||||
# Suppress warnings in third-party code
|
||||
target_compile_options(simdutf PRIVATE -w)
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::MPV)
|
||||
|
||||
Reference in New Issue
Block a user