Rename to TNCat, add chip chase, G-codes and a Wayland layout
The project is now TNCat, after HEIDENHAIN's TNC controls. Binary, QML module URI, settings path, bundle id and .desktop entry follow; the environment switches are TNCAT_*. Entertainment: a curled steel chip skitters in every minute or two, the cat runs it down and bats it away a few times before sitting back looking pleased. Mood changes flash the matching machine code above its head, G00 for a sprint, G01 for a stroll, M08 while it washes, G28 for a stretch, M30 for a nap. Window handling was split into two layouts. X11 and macOS keep one small window per object, positioned by the app. Wayland gets a screen-filling overlay whose input region is masked down to the cat, since a Wayland client cannot place its own window. Overlay mode is automatic there and available elsewhere via TNCAT_OVERLAY=1. Also adds a ground-line setting so the cat can walk above a softkey row. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
acef398f49
commit
0f1df75a1d
19 files changed
+817
-185
No files matched your search
+22
-20
@@ -1,17 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
|
||||
project(Workcat
|
||||
VERSION 0.2.0
|
||||
project(TNCat
|
||||
VERSION 0.3.0
|
||||
DESCRIPTION "A cute desktop cat that wanders along the bottom of your screen"
|
||||
LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt6 6.8 REQUIRED COMPONENTS Core Gui Quick QuickControls2 Widgets)
|
||||
qt_standard_project_setup(REQUIRES 6.8)
|
||||
find_package(Qt6 6.5 REQUIRED COMPONENTS Core Gui Quick QuickControls2 Widgets)
|
||||
qt_standard_project_setup(REQUIRES 6.5)
|
||||
|
||||
qt_add_executable(workcat
|
||||
qt_add_executable(tncat
|
||||
src/main.cpp
|
||||
src/catcontroller.h src/catcontroller.cpp
|
||||
src/traycontroller.h src/traycontroller.cpp
|
||||
@@ -19,44 +19,46 @@ qt_add_executable(workcat
|
||||
src/platforminfo.h src/platforminfo.cpp
|
||||
)
|
||||
|
||||
target_include_directories(workcat PRIVATE src)
|
||||
target_include_directories(tncat PRIVATE src)
|
||||
|
||||
# QML files live in qml/ but register at the module root (Workcat.Main etc.)
|
||||
set(WORKCAT_QML Main Cat SettingsWindow)
|
||||
foreach(qmlfile IN LISTS WORKCAT_QML)
|
||||
# QML files live in qml/ but register at the module root (TNCat.Main etc.)
|
||||
set(TNCAT_QML Main Cat Chip CatWindow ChipWindow OverlayWindow SettingsWindow CatMoods)
|
||||
foreach(qmlfile IN LISTS TNCAT_QML)
|
||||
set_source_files_properties(qml/${qmlfile}.qml PROPERTIES QT_RESOURCE_ALIAS ${qmlfile}.qml)
|
||||
list(APPEND WORKCAT_QML_FILES qml/${qmlfile}.qml)
|
||||
list(APPEND TNCAT_QML_FILES qml/${qmlfile}.qml)
|
||||
endforeach()
|
||||
|
||||
qt_add_qml_module(workcat
|
||||
URI Workcat
|
||||
set_source_files_properties(qml/CatMoods.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
||||
|
||||
qt_add_qml_module(tncat
|
||||
URI TNCat
|
||||
VERSION 1.0
|
||||
QML_FILES ${WORKCAT_QML_FILES}
|
||||
QML_FILES ${TNCAT_QML_FILES}
|
||||
)
|
||||
|
||||
target_link_libraries(workcat PRIVATE
|
||||
target_link_libraries(tncat PRIVATE
|
||||
Qt6::Core Qt6::Gui Qt6::Quick Qt6::QuickControls2 Qt6::Widgets)
|
||||
|
||||
set_target_properties(workcat PROPERTIES
|
||||
set_target_properties(tncat PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/Info.plist.in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER app.workcat.example
|
||||
MACOSX_BUNDLE_BUNDLE_NAME Workcat
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER app.tncat.example
|
||||
MACOSX_BUNDLE_BUNDLE_NAME TNCat
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
WIN32_EXECUTABLE TRUE)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS workcat
|
||||
install(TARGETS tncat
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(FILES linux/workcat.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
install(FILES linux/tncat.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
endif()
|
||||
|
||||
qt_generate_deploy_qml_app_script(
|
||||
TARGET workcat
|
||||
TARGET tncat
|
||||
OUTPUT_SCRIPT deploy_script
|
||||
MACOS_BUNDLE_POST_BUILD
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR
|
||||
|
||||
Reference in new issue
Block a user