diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0dc94a3c..00000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# Build and IDE files -build/ -bin/ -CMakeLists.txt.* -*.pro.* -.tags* -src/libhs/doc/pages - -# I like to keep a bunch of test firmwares around -*.hex -*.elf - -# Don't show the static Qt5 builds -qt5/* -lib/qt5/* -!lib/qt5/README.md -!lib/qt5/download-static-qt5.sh diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..69b5c6da --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,426 @@ +## TyTools 0.9.9 (2023-08-06) + +**Main changes:** + +- Tolerate longer delays in Teensy code +- Port TyTools to Qt 6 + +**Platform support:** + +- Only macOS 11, 12, 13 are supported +- Only Windows 10 and 11 (64-bit) are supported + +**Repository change :** + +- This repository does not contain any code anymore because I host [everything in my monorepo](https://github.com/Koromix/rygel) +- For reasons explained here: https://github.com/Koromix/rygel#mono-repository + +## TyTools 0.9.8 (2022-10-02) + +- Support Teensy USB Type Serial + MTP (@KurtE) +- Support infinite log size + +## TyTools 0.9.7 (2022-01-23) + +- Fix upload failure regression introduced in version 0.9.6 + +## TyTools 0.9.6 (2022-01-17) + +**Main Fixes:** + +- Fix support for big firmware files (for Teensy 4.0 and 4.1) +- Signal Serial readiness to Teensy in SEREMU mode +- Increase wait delay after board reset + +**Other changes:** + +- Companion app TyUpdater is renamed to TyUploader + +## TyTools 0.9.5 (2021-11-03) + +**New Features:** + +- Add per-board RTC mode setting to TyCommander (localtime, UTC, ignore) + +**Other changes:** + +- Change URL in About dialog +- Remove leftover debug statement + +## TyTools 0.9.4 (2021-10-21) + +**New Features:** + +- Set RTC time when uploading to Teensy 4.0 and 4.1 (thanks @mecparts) +- Support Teensy Micro Mod (@KurtE) + +**Other changes:** + +- Use bright blue icon for TyCommander and bright green for TyUpdater +- Fix Qt HighDPI support being set incorrectly + +## TyTools 0.9.3 (2020-11-26) + +- Fix wrong COM port detection with Teensyduino 1.54 on Windows (thanks to @luni64 and @Defragster) + +## TyTools 0.9.2 (2020-08-07) + +**New Features:** + +- Show Dual/Triple Serial Teensy builds as multiple boards + +**Other changes:** + +- Add TyCommander upload --delegate to cooperate with Teensy Loader +- Fix support for composite devices on Windows 7 (e.g. Serial + MIDI) +- Remove all Windows XP compatibility code + +**OS support:** + +- Prevous release builds did not actually work on Windows XP, but the code for it was still there... +- ... now it is official, and it is not possible to build TyTools or libhs with XP support anymore + +## TyTools 0.9.1 (2020-06-27) + +**New Features:** + +- Support Teensy 4.1 (@KurtE) + +**Other changes:** + +- Disable autocompletion in serial input field +- Allow 1984K flash to be used on Teensy 4.0 +- Add VID:PID pairs for dual and triple serial Teensy sketches + +## TyTools 0.9.0 (2019-12-02) + +**New Features:** + +- Support Teensy 4 (caveat: no RTC programming yet) +- Support macOS Catalina +- Configurable per-board serial rate (useful for serial non-Teensy boards) + +**Main Fixes:** + +- Look less ugly on HiDPI screens +- Fix ugly "classic Windows" style in TyUpdater +- Fix extra empty lines in serial monitor in some cases +- Fix JSON format in tycmd list -Ojson (string escaping, array) + +## TyTools 0.8.11 (2019-03-31) + +**New Features:** + +- Support Teensy 4 beta boards (experimental) + +**OS support:** + +- macOS 10.10 (Yosemite) is now the oldest supported version +- Windows 7 is now the oldest supported version + +**Other changes:** + +- Use Qt 5.12.2 on Windows +- Use Qt 5.9.7 on macOS + +## TyTools 0.8.10 (2018-09-23) + +**New Features:** + +- Detect running Teensy model with bcdDevice descriptor value (introduced in Teensyduino 1.42) +- Add @-prefixed commands 'send_file' and 'send' to TyCommander serial input +- Support loading firmwares from stdin in tycmd upload and tycmd identity + +**Main Fixes:** + +- Fix errors with Teensy 3.5 firmwares (caused by 'RAM = 256K' change introduced Teensyduino 1.42) +- Fix rare Intel HEX parse errors + +*Note: This is the mostly the same as 0.8.9 except this time the macOS version works. For Windows and Linux users, nothing has changed (except the version number).* + +## TyTools 0.8.8 (2019-08-20) + +**Main Fixes:** + +- Fix firmware model detection with LTO, -mpure-code +- Fix occasional serial read truncation with HID boards on Win32 + +**Miscellaneous:** + +- Remove artificial Teensy upload delays (makes upload faster) + +## TyTools 0.8.7 (2017-06-06) + +*This project has been renamed to TyTools, along with the tools included in this project.* + +Old name | New name +-------- | ----------- +TyQt | TyCommander +tyc | tycmd +UpTy | TyUpdater + +**New Features:** + +- Support non-Teensy USB serial devices ("Generic" boards) +- Customize board models and PID:VID matching with TyTools.ini +- Add option to configure board serial log directory +- Add tyc identify to analyze firmware models +- Add TyCommanderC attach (and detach) commands + +**Main Fixes:** + +- Fix crash with some USB3 controllers on Windows (pre-10) +- Restore compatibility with Mac OS X Yosemite +- Fix broken Teensy firmware compatibility check with LTO builds +- Expand Teensy VID/PID list for new USB modes +- Support FTDI chips (@jbliesener) +- Fix incorrect use of case-sensitive test with firmware extensions +- Configure serial speed (115200 bauds) in tycmd and TyCommander +- Fix board selection behavior on insertion and removal +- Fix optline bug with non-option permutation and option values + +**UI changes:** + +- Change serial input field to QComboBox, which supports history dropdown (@tni) +- Reduce board list wiget height and show tag on top +- Use monospaced fonts in serial monitor +- Turn board log path label into clickable URLs with tooltips (@tni) + +**Miscellaneous:** + +- Harmonize libty and TyCommander INI configuration path +- Echo 'Send File' (when echo is enabled) commands in serial log +- Rename 'TY_' environment variables to 'TYTOOLS_' +- Add tweakable board drop delay +- Increase limit number of board log files from 3 to 4 +- Rotate board log file when 'Clear on reset' is checked +- Add Win32 crash memory dumper to TyCommander +- Use Unity builds for releases +- Upgrade Win32 and OSX builds to Qt 5.7.1 +- Improve thread-safety of serial log file handling +- Provide single-file amalgamation of libhs +- Replace all uses of linked lists with dynamic arrays +- Various small fixes and code improvements + +## TyQt 0.8.0 (2016-11-05) + +**New Features:** + +- Add support for Teensy 3.5 and 3.6, including beta versions +- Implement command-line multi-action with TyQt --multi +- Add Send File to serial and Seremu boards +- Add per-board serial log file +- Add simple firmware updater application called UpTy +- Improve Arduino integration when building for different board models + +**Main Fixes:** + +- Enumerate boards / devices without opening them +- Improve USB 3.0 device enumeration on Windows (invisible Teensies) +- Fix TyQt freeze with blocking serial writes +- Fix discovery of Serial IAD devices on Windows (Windows 10 only) +- Fix potential crash after application reset +- Assert DTR in all cases when opening serial devices +- Wait for device enumeration on Win32 when the driver wizard is running +- Fix 'Clear on Serial' behavior when enabling serial +- Fix support for Windows running under Virtual PC (probably) + +**UI changes:** + +- Add collapsible groups on settings page in Compact Mode +- Add keyboard shortcuts to switch board (Ctrl + Tab) +- Merge Compact Mode and splitter collapse +- Show board product string in tyc and TyQt Info tab +- Show task progress in Compact Mode +- Focus the serial input widget when changing tab or board selection +- Many other small GUI tweaks + +**Miscellaneous:** + +- Add Teensy model / usage debug information +- Add log statements for added and removed devices +- Show relevant task in log messages +- Improve board task error messages +- Continue 'tyc upload' when some firmwares are invalid +- Add global setting to disable serial by default +- Small tyc command-line changes +- Various small fixes and code improvements + +## TyQt 0.7.6 (2016-07-28) + +- Fix incorrect exit code with TyQt remote commands +- (this fixes the error message when uploading from Arduino 1.6.10) +- Fix potential crashes in HID code on OSX +- Fix intermittent crash when enumerating some devices on Win32 +- Fix incorrect I/O error messages in HalfKay code +- Add debug log with Teensy usage value +- Use smaller 128x128 icons to waste less memory +- Build release binaries with Qt 5.6.1-1 + +## TyQt 0.7.5 (2016-04-29) + +*The windows version is now built with MSVC 2015 and is relatively smaller.* + +**Main Changes:** + +- Improve Compact Mode (board selection combobox, action toolbar) +- Add context menu to the board list +- Add global Preferences dialog +- Add setting to limit number of parallel tasks +- Enable Teensy++ 2.0 support by default +- Configure new windows like the current one +- Add dedicated Log Window (errors and debug) +- Add action to reset TyQt and settings +- Add per-board scrollback size setting +- Add per-board encoding setting +- Disable persistent settings for ambiguous boards (without a unique S/N) +- Memorize the full board model when possible +- Keep a list of recent firmwares for each board +- Add action to forget the firmware associated with a board +- Show RawHID interface device path +- Add pending board status icon +- Use slightly more colorful status icons +- Move newline / echo settings to Monitor tab +- Make attachMonitor a persistent board setting +- Add more context to some errors messages +- Avoid useless error / warning when rebooting a board already in bootloader mode +- Disable UI actions for busy boards + +**Main Fixes:** + +- Fix IRP leak on Win32 that leads to non-paged memory exhaustion after a while +- Fix random serial timeout behavior with Serial devices on Win32 +- Fix support for USB 3.0 ports on OSX (missing devices) +- Improve robustness / checks in Intel HEX parser +- Fix autoscroll quirks with the Monitor text control +- Use lower maxTasks by default to limit USB problems (especially on Windows) +- Fix crash with extension-less firmware filenames +- Fix tyc monitor statements not respecting --quiet +- Fix relatively slow UI updates on board changes +- Try harder to show the board selection dialog on top + +**Code Refactoring:** + +- Extract "low-level" cross-platform device code to libhs +- Port to MSVC for the Windows packages +- Diffuse code refactoring + +## TyQt 0.7.0 (2016-01-20) + +**New features:** + +- Select and work on multiple boards at once +- Add Arduino integration dialog +- Attach/detach function to let other softwares access the device +- Rename/alias boards in TyQt +- Save individual board settings +- Add tyqtc to pilot TyQt (win32) +- Add JSON output in tyc with tyc list -Ojson + +**Main Changes:** + +- Vastly improved monitor performance +- Show board status with dedicated icons +- Visual warning on task errors +- Show last uploaded firmware in board list +- Board tags are now "-" (e.g. 112340-Teensy) +- Drop missing boards after a longer delay +- Faster firmwares uploads +- Use short COM port names when possible (win32) +- Static binaries (no dependency on libty.dll) +- Improve command-line syntax for TyQt (close to tyc) +- Make TyQt autostart opt-in (--autostart) +- Select board using device path in tyc/tyqt (e.g. "tyc upload --board @COM1") +- Extend board selection syntax to "[][-][@]" +- Increase size of monitor scrollback in TyQt to 200000 lines +- Resizable board list using a QSplitter +- Replace "Upload" tab with "Settings" tab +- Allow selection of missing boards in TyQt +- Disable word-wrap in monitor text widget +- Add monitor send button +- Add keyboard shortcut to clear monitor (Ctrl + Alt + X) +- Remove annoying LICENSE prompt from OSX bundles + +**Main Fixes:** + +- Support El Capitan (osx) +- Fix freeze of serial read in some cases on Win32 +- Better handling of device close on Windows XP +- Hide harmless spurious I/O errors when uploading +- Make README.txt/LICENSE.txt notepad-friendly (win32) + +## TyQt 0.6.4 (2015-09-23) + +- Add support for Teensy 3.2 + +## TyQt 0.6.3 (2015-06-16) + +**Main changes:** + +- Windows XP support +- Longer board drop delay + +**Minor fixes:** + +- Ensure non-blocking behavior of tyc monitor on Windows +- Apply serial settings in tyc monitor on reconnect +- Always quit TyQt when the last window is closed + +## TyQt 0.6.2 (2015-03-29) + +- Working Teensy LC support + +## TyQt 0.6.1 (2015-03-26) + +- Disable Teensy LC support (broken until I can get one) +- Always assert DTR line on Windows and OS X, to not block on "while (!Serial);" +- Ignore devices on permission errors, instead of aborting enumeration + +## TyQt 0.6.0 (2015-03-18) + +- Tentative Teensy LC support +- Clear on reset option for monitor +- Better autoscrolling behavior in the monitor (keyboard navigation works) +- Go to bootloader with CLI: tyc reset --bootloader + +## TyQt 0.5.7 (2015-03-11) + +- Use bigger serial buffer to avoid overflows +- Don't hog the CPU if the Teensy sends a lot of stuff +- Better autoscroll behavior in the monitor + +## TyQt 0.5.6 (2015-03-09) + +- Easier to use command-line tool +- Bug fixes and code cleanup + +## TyQt 0.5.5 (2015-02-28) + +- Single-instance mode for TyQt: send commands using tyqt.exe (see tyqt.exe --help) +- Minimal interface option to hide board list, toolbar and statusbar +- Bug fixes + +## TyQt 0.5.1 (2015-02-20) + +- Proper packaging: MSI on Windows, Bundle on OS X +- Better art and icons (well, I try) + +## TyQt 0.5.0 (2015-02-10) + +- Teensy Qt! + +## tyc 0.4.0 (2015-02-12) + +- Support Mac OS X + +## tyc 0.3.0 (2015-01-12) + +- Add native compilation instructions for Windows + +## tyc 0.2.1 (2014-12-21) + +- Dynamic device detection and management + +## ty 0.1.0 (20134-09-01) + +- Document the EXPERIMENTAL option in README.md diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 5ab777c2..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,225 +0,0 @@ -# TyTools - public domain -# Niels Martignène -# https://koromix.dev/tytools - -# This software is in the public domain. Where that dedication is not -# recognized, you are granted a perpetual, irrevocable license to copy, -# distribute, and modify this file as you see fit. - -# See the LICENSE file for more details. - -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "") -cmake_minimum_required(VERSION 3.1) -project(TyTools C CXX) - -if(CONFIG_VARIANT) - if(IS_ABSOLUTE ${CONFIG_VARIANT}) - set(CONFIG_VARIANT_PATH ${CONFIG_VARIANT}) - else() - set(CONFIG_VARIANT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/variants/${CONFIG_VARIANT}") - endif() - if(EXISTS "${CONFIG_VARIANT_PATH}/variant.cmake") - include("${CONFIG_VARIANT_PATH}/variant.cmake") - endif() - - set(USE_UNITY_BUILDS OFF CACHE BOOL "") -endif() - -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) -include("cmake/Utility.cmake") - -set(VERSION_DEFAULT "0.9.8" CACHE STRING "Default version number") -set(VERSION_WITH_GIT ON CACHE BOOL "Compute version using git tags (fallback)") - -set(CONFIG_TYCMD_BUILD ON CACHE BOOL "Build tycmd (Teensy command-line manager)") -set(CONFIG_TYCMD_EXECUTABLE "tycmd" CACHE STRING "Rename tycmd executable") -set(CONFIG_TYCMD_NAME "tycmd" CACHE STRING "Rename tycmd application") - -set(CONFIG_TYCOMMANDER_BUILD ON CACHE BOOL "Build TyCommander (Teensy GUI manager)") -if(WIN32 OR APPLE) - set(CONFIG_TYCOMMANDER_EXECUTABLE "TyCommander" CACHE STRING "Rename TyCommander executable") -else() - set(CONFIG_TYCOMMANDER_EXECUTABLE "tycommander" CACHE STRING "Rename TyCommander executable") -endif() -set(CONFIG_TYCOMMANDER_NAME "TyCommander" CACHE STRING "Rename TyCommander application") - -set(CONFIG_TYUPLOADER_BUILD ON CACHE BOOL "Build TyUploader (Teensy GUI updater)") -if(WIN32 OR APPLE) - set(CONFIG_TYUPLOADER_EXECUTABLE "TyUploader" CACHE STRING "Rename TyUploader executable") -else() - set(CONFIG_TYUPLOADER_EXECUTABLE "tyuploader" CACHE STRING "Rename TyUploader executable") -endif() -set(CONFIG_TYUPLOADER_NAME "TyUploader" CACHE STRING "Rename TyUploader application") - -set(CONFIG_URL_WEBSITE "https://koromix.dev/tytools" CACHE STRING "Project website") -set(CONFIG_URL_BUGS "https://github.com/Koromix/tytools/issues" CACHE STRING "Project bug report page") - -set(CONFIG_PACKAGE_NAME "TyTools" CACHE STRING "Package / installer name") -set(CONFIG_PACKAGE_FILENAME "TyTools" CACHE STRING "Package / installer filename") - -if(MSVC) - set(USE_SHARED_MSVCRT OFF CACHE BOOL "Build with shared version of MS CRT (/MD)") -endif() -set(BUILD_EXAMPLES ON CACHE BOOL "Build library examples") - -if(MSVC) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") - - if(NOT USE_SHARED_MSVCRT) - foreach(lang C CXX) - foreach(mode DEBUG RELEASE RELWITHDEBINFO MINSIZEREL) - string(REPLACE "/MD" "/MT" CMAKE_${lang}_FLAGS_${mode} "${CMAKE_${lang}_FLAGS_${mode}}") - endforeach() - endforeach() - endif() - - include_directories(contrib/msvc) -elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fvisibility=hidden -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-missing-field-initializers -Wno-missing-braces -Wno-deprecated-declarations -Wshadow -Wconversion -Wformat=2") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -fvisibility=hidden -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-missing-field-initializers -Wno-old-style-cast -Wno-deprecated-declarations -Wformat=2") - - foreach(lang C CXX) - foreach(mode RELEASE RELWITHDEBINFO MINSIZEREL) - set(CMAKE_${lang}_FLAGS_${mode} "${CMAKE_${lang}_FLAGS_${mode}} -D_FORTIFY_SOURCE=2") - endforeach() - endforeach() - - if(MINGW) - add_definitions(-D__USE_MINGW_ANSI_STDIO=1) - # Latest approach to force MinGW to statically link libwinpthread, until a new - # version breaks this one too. - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++ -Wl,-Bstatic") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++ -Wl,-Bstatic") - set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lstdc++ -lwinpthread") - endif() -endif() - -if(WIN32) - add_definitions(-DWINVER=0x0602 -D_WIN32_WINNT=0x0602) -elseif(APPLE) - if(POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) - endif() - - # https://stackoverflow.com/questions/4929255/building-static-libraries-on-mac-using-cmake-and-gcc - set(CMAKE_C_ARCHIVE_CREATE " Scr ") - set(CMAKE_CXX_ARCHIVE_CREATE " Scr ") - set(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") - set(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") - - set(CMAKE_INSTALL_NAME_DIR "@rpath") - set(CMAKE_INSTALL_RPATH "@executable_path;@executable_path/../lib;@executable_path/../Frameworks") -endif() - -set(VERSION ${VERSION_DEFAULT}) -if(VERSION_WITH_GIT AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") - find_package(Git) - if(GIT_FOUND) - # Recompute the version string after each commit, does not work for tags though - if(EXISTS "${CMAKE_SOURCE_DIR}/.git/logs/HEAD") - configure_file("${CMAKE_SOURCE_DIR}/.git/logs/HEAD" git_logs_HEAD COPYONLY) - endif() - execute_process( - COMMAND ${GIT_EXECUTABLE} describe --tags - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) - string(SUBSTRING ${VERSION} 1 -1 VERSION) - endif() -endif() - -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") - -add_subdirectory(src/libhs) -add_subdirectory(src/libty) -if(CONFIG_TYCMD_BUILD) - add_subdirectory(src/tycmd) -endif() -if(CONFIG_TYCOMMANDER_BUILD OR CONFIG_TYUPLOADER_BUILD) - find_package(EasyQt5) - if(NOT Qt5_FOUND) - message(FATAL_ERROR "Could not find Qt5, add the following flags to the CMake invocation to build non-Qt binaries:\n" - "-DCONFIG_TYCOMMANDER_BUILD=0 -DCONFIG_TYUPLOADER_BUILD=0") - endif() - - if(CONFIG_TYCOMMANDER_BUILD) - add_subdirectory(src/tycommander) - list(APPEND CPACK_PACKAGE_EXECUTABLES tycommander "${CONFIG_TYCOMMANDER_NAME}") - endif() - if(CONFIG_TYUPLOADER_BUILD) - add_subdirectory(src/tyuploader) - list(APPEND CPACK_PACKAGE_EXECUTABLES tyuploader "${CONFIG_TYUPLOADER_NAME}") - endif() -endif() - -set(BUILD_TESTS ON CACHE BOOL "Build unit tests and enable CTest") -if(BUILD_TESTS) - enable_testing() - add_subdirectory(tests/libty) -endif() - -set(CPACK_PACKAGE_NAME "${CONFIG_PACKAGE_NAME}") -string(REGEX REPLACE "\\-.*$" "" CPACK_PACKAGE_VERSION "${VERSION}") -set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CONFIG_PACKAGE_FILENAME}") - -if(WIN32) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(CPACK_PACKAGE_FILE_NAME "${CONFIG_PACKAGE_FILENAME}-${VERSION}-win64") - else() - set(CPACK_PACKAGE_FILE_NAME "${CONFIG_PACKAGE_FILENAME}-${VERSION}-win32") - endif() - if(CONFIG_TYCOMMANDER_BUILD) - set(CPACK_PACKAGE_ICON "${TYCOMMANDER_ICON_FILE_PREFIX}.ico") - elseif(CONFIG_TYUPLOADER_BUILD) - set(CPACK_PACKAGE_ICON "${TYUPLOADER_ICON_FILE_PREFIX}.ico") - endif() - if (NOT CONFIG_VARIANT AND NOT CMAKE_CROSSCOMPILING) - set(CPACK_GENERATOR ZIP WIX) - else() - set(CPACK_GENERATOR ZIP) - endif() - - set(CPACK_WIX_UPGRADE_GUID "72663aca-47a7-4b9b-aa53-aa067b872b8a") - set(CPACK_WIX_PRODUCT_ICON "${CPACK_PACKAGE_ICON}") - set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/contrib/images/wix_banner.jpg") - set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/contrib/images/wix_dialog.jpg") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt") - - if(CONFIG_TYCOMMANDER_BUILD OR CONFIG_TYCMD_BUILD) - # Someday, notepad will support LF newlines and this won't be necessary anymore - file(WRITE "${CMAKE_BINARY_DIR}/dos2unix.cmake" "configure_file(\${IN} \${OUT} NEWLINE_STYLE CRLF)") - add_custom_command(OUTPUT README_crlf.md COMMAND ${CMAKE_COMMAND} - ARGS -DIN="${CMAKE_SOURCE_DIR}/README.md" -DOUT="${CMAKE_BINARY_DIR}/README_crlf.md" -P "${CMAKE_BINARY_DIR}/dos2unix.cmake") - add_custom_command(OUTPUT LICENSE_crlf.txt COMMAND ${CMAKE_COMMAND} - ARGS -DIN="${CMAKE_SOURCE_DIR}/LICENSE.txt" -DOUT="${CMAKE_BINARY_DIR}/LICENSE_crlf.txt" -P "${CMAKE_BINARY_DIR}/dos2unix.cmake") - add_custom_target(crlf ALL DEPENDS README_crlf.md LICENSE_crlf.txt) - - install(FILES "${CMAKE_BINARY_DIR}/README_crlf.md" DESTINATION . RENAME README.txt) - install(FILES "${CMAKE_BINARY_DIR}/LICENSE_crlf.txt" DESTINATION . RENAME LICENSE.txt) - else() - set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) - endif() - if(MINGW) - install(DIRECTORY contrib/mingw/ DESTINATION . FILES_MATCHING PATTERN *.txt) - endif() - - include(CPack) -elseif(APPLE) - set(CPACK_PACKAGE_FILE_NAME "${CONFIG_PACKAGE_FILENAME}-${VERSION}-osx") - if(CONFIG_TYCOMMANDER_BUILD) - set(CPACK_PACKAGE_ICON "${TYCOMMANDER_ICON_FILE_PREFIX}.icns") - elseif(CONFIG_TYUPLOADER_BUILD) - set(CPACK_PACKAGE_ICON "${TYUPLOADER_ICON_FILE_PREFIX}.icns") - endif() - set(CPACK_GENERATOR DragNDrop) - - if(CONFIG_TYCOMMANDER_BUILD OR CONFIG_TYCMD_BUILD) - install(FILES README.md DESTINATION . RENAME README.txt) - install(FILES LICENSE.txt DESTINATION .) - endif() - - include(CPack) -endif() diff --git a/README.md b/README.md index 59e5d0d0..ffa9351e 100644 --- a/README.md +++ b/README.md @@ -104,129 +104,15 @@ without programming anything. You can also use `tycmd reset -b` to start the bootloader. This is the same as pushing the button on your Teensy. -# Hacking TyTools +# Source code -## Build on Windows +This repository does not contain the code of TyTools but only exists as a front. For pratical reasons, I've started using a single repository for all my projects in 2018 because it is easier to manage. -You can use MSVC (≥ 2015) or MinGW-w64. I have not tested Clang on Windows yet. The historical -MinGW toolchain is not supported. +The source code is available here: https://github.com/Koromix/rygel/ (in the *src/meestic* subdirectory). -You need to install [CMake](http://www.cmake.org/) to build the project files before you can -use Visual Studio or MinGW. +Monorepositories have two killer features for me: -If **you don't have Qt, only the libraries and command-line tools** will be compiled. There -are two options to enable Qt in TyTools: +- Cross-project refactoring +- Simplified dependency management -- _dynamic Qt build_: Easiest option, you only need to install the pre-built Qt DLLs for - your compiler with the official Qt installer. The binaries need the Qt DLLs to work. -- _static Qt build_: Harder, but will produce autonomous binaries. Read the README in the - [lib/qt5 directory](https://github.com/Koromix/tytools/tree/master/lib/qt5) for instructions. - -To build TyTools with MSVC 2015 32-bit, launch _VS2015 x86 Native Tools Command Prompt_, -navigate to the project directory and execute CMake: - -```batch -REM You can of course use another build directory if you prefer. -mkdir build -mkdir build/win32 -cd build/win32 -cmake ../.. -``` - -This will create Visual Studio project and solution files in _build/win32_. You can then open -the _solution TyTools.sln_. - -To build 64-bit binaries, you should use _VS2015 x64 Native Tools Command Prompt_ instead. - -## Build on Mac OS X - -Install Xcode, the developer command-line tools and [CMake](http://www.cmake.org/). The native -Clang compiler can build TyTools. - -If **you don't have Qt, only the libraries and command-line tools** will be compiled. There -are two options to enable Qt in TyTools: - -- _dynamic Qt build_: Easiest option, you only need to install the pre-built Qt DLLs for - your compiler with the official Qt installer. The binaries need the Qt DLLs to work. -- _static Qt build_: Harder, but will produce autonomous binaries. Read the README in the - [lib/qt5 directory](https://github.com/Koromix/tytools/tree/master/lib/qt5) for instructions. - -After Qt is ready, you can build TyTools by executing the following commands in the -project directory: - -```bash -# You can of course use another directory if you prefer. -mkdir -p build/darwin && cd build/darwin -cd build/darwin -cmake ../.. -``` - -If you want to build debug binaries instead, you should specify the build type: - -```bash -cmake -DCMAKE_BUILD_TYPE=Debug ../.. -``` - -## Build on Linux - -TyTools can be built with GCC or Clang. - -### Prerequisites - -To install the dependencies on Debian or Ubuntu execute: - -```bash -sudo apt-get install build-essential cmake libudev-dev qtbase5-dev pkg-config -``` - -On Arch Linux you can do so (as root): - -```bash -pacman -S --needed base-devel cmake udev qt5-base -``` - -### Compilation - -Open the project directory in a terminal and execute: - -```bash -# You can of course use another directory if you prefer. -mkdir -p build/linux && cd build/linux -cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../.. -make -``` - -If you want to build debug binaries instead, you should specify the build type: - -```bash -cmake -DCMAKE_BUILD_TYPE=Debug ../.. -``` - -The compiled binaries can be used directly from the build directory. Follow through the -next section if you want to install the application. - -### Installation - -You can deploy TyTools to your system with the following commands: - -```bash -sudo make install -``` - -By default this will copy the files to `/usr/local`. To change this directory you need -to change the `CMAKE_INSTALL_PREFIX` value in the Compilation section above. - -## Customized builds - -A number of customized builds are available in the [variants directory](https://github.com/Koromix/tytools/tree/master/variants). - -In order to activate a customized build, you need to specify it when running cmake. -For example, in order to build the morningstar variant, run the following commands from the -project directory: - -```batch -mkdir build -mkdir build/morningstar -cd build/morningstar -cmake -DCONFIG_VARIANT=morningstar ../.. -``` +You can find a more detailed rationale here: https://danluu.com/monorepo/ diff --git a/cmake/AmalgamateSourceFiles.cmake b/cmake/AmalgamateSourceFiles.cmake deleted file mode 100644 index 089f2535..00000000 --- a/cmake/AmalgamateSourceFiles.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# TyTools - public domain -# Niels Martignène -# https://koromix.dev/tytools - -# This software is in the public domain. Where that dedication is not -# recognized, you are granted a perpetual, irrevocable license to copy, -# distribute, and modify this file as you see fit. - -# See the LICENSE file for more details. - -set(ARGV) -math(EXPR argv_end "${CMAKE_ARGC} - 1") -foreach(i RANGE 1 ${argv_end}) - if(CMAKE_ARGV${i} STREQUAL "-P") - math(EXPR argv_first "${i} + 2") - foreach(j RANGE ${argv_first} ${argv_end}) - list(APPEND ARGV "${CMAKE_ARGV${j}}") - endforeach() - break() - endif() -endforeach() - -list(GET ARGV 0 SRC) -list(GET ARGV 1 DEST) -if(NOT WORKING_DIRECTORY) - get_filename_component(WORKING_DIRECTORY "${SRC}" DIRECTORY) -endif() - -file(REMOVE "${DEST}") - - -file(STRINGS "${SRC}" lines ENCODING "UTF-8") - -foreach(line IN LISTS lines) - if(line MATCHES "^ *#include \"([a-zA-Z0-9_\\-]+\\.[a-zA-Z]+)\"$") - set(include_file "${CMAKE_MATCH_1}") - list(FIND EXCLUDE "${include_file}" exclude_index) - if(exclude_index EQUAL -1) - if(NOT IS_ABSOLUTE "${include_file}") - set(include_file_full "${WORKING_DIRECTORY}/${include_file}") - else() - set(include_file_full "${include_file}") - endif() - - file(READ "${include_file_full}" include_content) - string(REGEX REPLACE "\n$" "" include_content "${include_content}") - - string(FIND "${include_content}" "#" offset) - if(offset EQUAL -1) - set(offset 0) - endif() - string(SUBSTRING "${include_content}" ${offset} -1 include_content) - string(REGEX REPLACE "(#include \"[a-zA-Z0-9\\.-_]+\")" "// \\1" include_content "${include_content}") - - file(APPEND "${DEST}" "\ -// ${include_file}\n\ -// ------------------------------------\n\n\ -${include_content}\n\n") - else() - file(APPEND "${DEST}" "${line}\n") - endif() - else() - file(APPEND "${DEST}" "${line}\n") - endif() -endforeach() diff --git a/cmake/FindEasyQt5.cmake b/cmake/FindEasyQt5.cmake deleted file mode 100644 index b4fe5a81..00000000 --- a/cmake/FindEasyQt5.cmake +++ /dev/null @@ -1,190 +0,0 @@ -# TyTools - public domain -# Niels Martignène -# https://koromix.dev/tytools - -# This software is in the public domain. Where that dedication is not -# recognized, you are granted a perpetual, irrevocable license to copy, -# distribute, and modify this file as you see fit. - -# See the LICENSE file for more details. - -# I don't really know if this is any close to the "correct" way to make modules -# in modern CMake, but it works and... I don't care much beyond that. - -if(NOT Qt5_FOUND) - # Simple and stupid host-compiler triplet, only valid for the handful of - # supported platforms. - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(HOST_CPU "x86_64") - else() - set(HOST_CPU "i686") - endif() - if(MSVC) - if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 18) - set(HOST "${HOST_CPU}-win32-msvc") - else() - message(FATAL_ERROR "Only Visual Studio 2015 and later versions are supported") - endif() - if(NOT USE_SHARED_MSVCRT) - set(HOST "${HOST}-mt") - endif() - elseif(MINGW) - set(HOST "${HOST_CPU}-w64-mingw32") - elseif(CMAKE_COMPILER_IS_GNUCC) - string(TOLOWER "${HOST_CPU}-${CMAKE_SYSTEM_NAME}-gcc" HOST) - elseif(CMAKE_COMPILER_IS_CLANG) - string(TOLOWER "${HOST_CPU}-${CMAKE_SYSTEM_NAME}-clang" HOST) - else() - string(TOLOWER "${HOST_CPU}-${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}" HOST) - endif() - - if (CMAKE_CROSSCOMPILING) - find_package(Qt5 - COMPONENTS Widgets Network PrintSupport - HINTS "${CMAKE_SOURCE_DIR}/lib/qt5/${HOST}" - "${CMAKE_SOURCE_DIR}/qt5/${HOST}" - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - NO_CMAKE_SYSTEM_PACKAGE_REGISTRY) - else() - find_package(Qt5 - COMPONENTS Widgets Network PrintSupport - HINTS "${CMAKE_SOURCE_DIR}/lib/qt5/${HOST}" - "${CMAKE_SOURCE_DIR}/qt5/${HOST}" - "/usr/local/opt/qt5") - endif() -endif() - -if(Qt5_FOUND AND NOT TARGET EasyQt5) - add_library(EasyQt5 INTERFACE) - - get_target_property(Qt5_TYPE Qt5::Core TYPE) - get_target_property(Qt5_LOCATION Qt5::Core LOCATION) - message(STATUS "Found Qt5: ${Qt5_LOCATION} (${Qt5_TYPE})") - - # Static libraries are painful. Be careful when you touch this, it was made - # through an extremely evolved trial and error process :] - if(Qt5_TYPE STREQUAL "STATIC_LIBRARY") - get_filename_component(Qt5_DIRECTORY "${Qt5_LOCATION}" DIRECTORY) - get_filename_component(Qt5_DIRECTORY "${Qt5_DIRECTORY}" DIRECTORY) - set(Qt5_LIBRARY_DIRECTORIES - "${Qt5_DIRECTORY}/lib" "${Qt5_DIRECTORY}/plugins/platforms" "${Qt5_DIRECTORY}/plugins/styles") - - if(WIN32) - # Fix undefined reference to _imp__WSAAsyncSelect@16 - set_property(TARGET Qt5::Network APPEND PROPERTY INTERFACE_LINK_LIBRARIES ws2_32) - - # Why is there no config package for this? - find_library(qtpcre_LIBRARIES NAMES qtpcre qtpcre2 - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(qtpng_LIBRARIES NAMES qtpng qtlibpng - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(qtfreetype_LIBRARIES qtfreetype - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(qwindows_LIBRARIES qwindows - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(qwindowsvistastyle_LIBRARIES qwindowsvistastyle - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5WindowsUIAutomationSupport_LIBRARIES Qt5WindowsUIAutomationSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5FontDatabaseSupport_LIBRARIES Qt5FontDatabaseSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5EventDispatcherSupport_LIBRARIES Qt5EventDispatcherSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5ThemeSupport_LIBRARIES Qt5ThemeSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - - target_link_libraries(EasyQt5 INTERFACE - Qt5::QWindowsIntegrationPlugin Qt5::Core Qt5::Widgets Qt5::Network - imm32 winmm dwmapi version wtsapi32 netapi32 userenv uxtheme - ${Qt5WindowsUIAutomationSupport_LIBRARIES} ${Qt5FontDatabaseSupport_LIBRARIES} - ${Qt5EventDispatcherSupport_LIBRARIES} ${Qt5ThemeSupport_LIBRARIES} - ${qwindows_LIBRARIES} ${qwindowsvistastyle_LIBRARIES} - ${qtpcre_LIBRARIES} ${qtpng_LIBRARIES} ${qtfreetype_LIBRARIES}) - elseif(APPLE) - find_library(COCOA_LIBRARIES Cocoa) - find_library(CARBON_LIBRARIES Carbon) - find_library(SECURITY_LIBRARIES Security) - find_library(SC_LIBRARIES SystemConfiguration) - find_package(ZLIB REQUIRED) - find_package(Cups REQUIRED) - find_package(OpenGL REQUIRED) - - find_library(qtpcre_LIBRARIES NAMES qtpcre qtpcre2 - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(qtpng_LIBRARIES NAMES qtpng qtlibpng - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(qcocoa_LIBRARIES qcocoa - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5FontDatabaseSupport_LIBRARIES Qt5FontDatabaseSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5EventDispatcherSupport_LIBRARIES Qt5EventDispatcherSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5ThemeSupport_LIBRARIES Qt5ThemeSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5ClipboardSupport_LIBRARIES Qt5ClipboardSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5GraphicsSupport_LIBRARIES Qt5GraphicsSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5AccessibilitySupport_LIBRARIES Qt5AccessibilitySupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - find_library(Qt5CglSupport_LIBRARIES Qt5CglSupport - HINTS ${Qt5_LIBRARY_DIRECTORIES} - NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) - - target_link_libraries(EasyQt5 INTERFACE - Qt5::QCocoaIntegrationPlugin Qt5::PrintSupport - Qt5::Core Qt5::Widgets Qt5::Network - ${qcocoa_LIBRARIES} ${Qt5CglSupport_LIBRARIES} - ${Qt5FontDatabaseSupport_LIBRARIES} ${Qt5ClipboardSupport_LIBRARIES} - ${Qt5EventDispatcherSupport_LIBRARIES} ${Qt5ThemeSupport_LIBRARIES} - ${Qt5GraphicsSupport_LIBRARIES} ${Qt5AccessibilitySupport_LIBRARIES} - ${qtpcre_LIBRARIES} ${qtpng_LIBRARIES} - ${COCOA_LIBRARIES} ${CARBON_LIBRARIES} ${SECURITY_LIBRARIES} - ${ZLIB_LIBRARIES} ${CUPS_LIBRARIES} ${SC_LIBRARIES} ${OPENGL_LIBRARIES}) - endif() - else() - target_link_libraries(EasyQt5 INTERFACE Qt5::Core Qt5::Widgets Qt5::Network) - - if(WIN32 OR APPLE) - message(WARNING "Cannot package Qt5 shared libraries") - endif() - endif() -endif() diff --git a/cmake/Utility.cmake b/cmake/Utility.cmake deleted file mode 100644 index a0a71b04..00000000 --- a/cmake/Utility.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# TyTools - public domain -# Niels Martignène -# https://koromix.dev/tytools - -# This software is in the public domain. Where that dedication is not -# recognized, you are granted a perpetual, irrevocable license to copy, -# distribute, and modify this file as you see fit. - -# See the LICENSE file for more details. - -if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") - set(CMAKE_COMPILER_IS_CLANG 1) -endif() -if(CMAKE_SYSTEM_NAME STREQUAL Linux) - set(LINUX 1) -endif() - -if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR - CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") - set(USE_UNITY_BUILDS ON CACHE BOOL "Use single-TU builds (aka. Unity builds)") -else() - set(USE_UNITY_BUILDS OFF CACHE BOOL "Use single-TU builds (aka. Unity builds)") -endif() -if(USE_UNITY_BUILDS) - function(enable_unity_build TARGET) - get_target_property(sources ${TARGET} SOURCES) - string(GENEX_STRIP "${sources}" sources) - - set(unity_file_c "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_unity.c") - set(unity_file_cpp "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_unity.cpp") - file(REMOVE ${unity_file_c} ${unity_file_cpp}) - - foreach(src ${sources}) - get_source_file_property(language ${src} LANGUAGE) - if(IS_ABSOLUTE ${src}) - set(src_full ${src}) - else() - set(src_full "${CMAKE_CURRENT_SOURCE_DIR}/${src}") - endif() - if(language STREQUAL "C") - set_source_files_properties(${src} PROPERTIES HEADER_FILE_ONLY 1) - file(APPEND ${unity_file_c} "#include \"${src_full}\"\n") - elseif(language STREQUAL "CXX") - set_source_files_properties(${src} PROPERTIES HEADER_FILE_ONLY 1) - file(APPEND ${unity_file_cpp} "#include \"${src_full}\"\n") - endif() - endforeach() - - if(EXISTS ${unity_file_c}) - target_sources(${TARGET} PRIVATE ${unity_file_c}) - endif() - if(EXISTS ${unity_file_cpp}) - target_sources(${TARGET} PRIVATE ${unity_file_cpp}) - endif() - endfunction() -else() - function(enable_unity_build TARGET) - endfunction() -endif() - -set(utility_list_dir "${CMAKE_CURRENT_LIST_DIR}") -function(add_amalgamated_file TARGET DEST SRC) - cmake_parse_arguments("OPT" "" "WORKING_DIRECTORY" "EXCLUDE" ${ARGN}) - - if(NOT IS_ABSOLUTE "${DEST}") - set(DEST "${CMAKE_CURRENT_BINARY_DIR}/${DEST}") - endif() - if(NOT IS_ABSOLUTE "${SRC}") - set(SRC "${CMAKE_CURRENT_SOURCE_DIR}/${SRC}") - endif() - - # Without that the semicolons are turned into spaces... Fuck CMake. - string(REPLACE ";" "\\;" opt_exclude_escaped "${OPT_EXCLUDE}") - add_custom_command( - TARGET "${TARGET}" POST_BUILD - COMMAND ${CMAKE_COMMAND} - -DEXCLUDE="${opt_exclude_escaped}" -DWORKING_DIRECTORY="${OPT_WORKING_DIRECTORY}" -P "${utility_list_dir}/AmalgamateSourceFiles.cmake" "${SRC}" "${DEST}") - - target_sources(${TARGET} PRIVATE "${SRC}") - set_source_files_properties("${SRC}" PROPERTIES HEADER_FILE_ONLY 1) -endfunction() diff --git a/contrib/cmake/i686-w64-mingw32.cmake b/contrib/cmake/i686-w64-mingw32.cmake deleted file mode 100644 index 641b222b..00000000 --- a/contrib/cmake/i686-w64-mingw32.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# See here: http://www.cmake.org/Wiki/CmakeMingw - -set(CMAKE_SYSTEM_NAME Windows) - -set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) -set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) -set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) - -set(PKG_CONFIG_EXECUTABLE i686-w64-mingw32-pkg-config) - -set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) - -# Adjust the default behaviour of the FIND_XXX() commands: -# - search headers and libraries in the target environment -# - search programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) diff --git a/contrib/cmake/x86_64-darwin-clang.cmake b/contrib/cmake/x86_64-darwin-clang.cmake deleted file mode 100644 index bee2c38f..00000000 --- a/contrib/cmake/x86_64-darwin-clang.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# See here: http://www.cmake.org/Wiki/CmakeMingw - -set(CMAKE_SYSTEM_NAME Darwin) - -# Go to https://github.com/tpoechtrager/osxcross and fall in love -execute_process(COMMAND xcrun --show-sdk-path - OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND xcrun -f clang - OUTPUT_VARIABLE CMAKE_C_COMPILER OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND xcrun -f clang++ - OUTPUT_VARIABLE CMAKE_CXX_COMPILER OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND xcrun -f pkg-config - OUTPUT_VARIABLE PKG_CONFIG_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE) - -if(NOT CMAKE_FIND_ROOT_PATH) - message(FATAL_ERROR "Cannot find Apple SDK") -endif() -if(NOT CMAKE_C_COMPILER) - message(FATAL_ERROR "Cannot find Apple Clang compiler") -endif() - -# Know a better way to get the Darwin version? -string(REGEX REPLACE "^.*-darwin([0-9]+)-.*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_C_COMPILER}") -set(CMAKE_SYSTEM_VERSION "${DARWIN_MAJOR_VERSION}.0") - -# Adjust the default behaviour of the FIND_XXX() commands: -# - search headers and libraries in the target environment -# - search programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) diff --git a/contrib/cmake/x86_64-w64-mingw32.cmake b/contrib/cmake/x86_64-w64-mingw32.cmake deleted file mode 100644 index 9634f1fe..00000000 --- a/contrib/cmake/x86_64-w64-mingw32.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# See here: http://www.cmake.org/Wiki/CmakeMingw - -set(CMAKE_SYSTEM_NAME Windows) - -set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) -set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) -set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) - -set(PKG_CONFIG_EXECUTABLE x86_64-w64-mingw32-pkg-config) - -set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) - -# Adjust the default behaviour of the FIND_XXX() commands: -# - search headers and libraries in the target environment -# - search programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) diff --git a/contrib/debian/build.sh b/contrib/debian/build.sh deleted file mode 100755 index 7bf10398..00000000 --- a/contrib/debian/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -e - -apt install -y libudev-dev qtbase5-dev pkg-config - -# Fix git error about dubious repository ownership -git config --global safe.directory '*' - -rm -rf /io/bin/Debian/build -mkdir /io/bin/Debian/build -cd /io/bin/Debian/build - -cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr ../../.. -ninja -DESTDIR=/io/bin/Debian ninja install diff --git a/contrib/debian/compat b/contrib/debian/compat deleted file mode 100644 index 9a037142..00000000 --- a/contrib/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 \ No newline at end of file diff --git a/contrib/debian/docker/Dockerfile b/contrib/debian/docker/Dockerfile deleted file mode 100644 index 9abd104d..00000000 --- a/contrib/debian/docker/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM debian:10 -ADD customize.sh /customize.sh -RUN bash /customize.sh && rm -f /customize.sh diff --git a/contrib/debian/docker/customize.sh b/contrib/debian/docker/customize.sh deleted file mode 100755 index fba2eeee..00000000 --- a/contrib/debian/docker/customize.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e - -apt update -apt install -y build-essential git cmake ninja-build pkg-config diff --git a/contrib/debian/format b/contrib/debian/format deleted file mode 100644 index 89ae9db8..00000000 --- a/contrib/debian/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/contrib/debian/install b/contrib/debian/install deleted file mode 100644 index fd110a8c..00000000 --- a/contrib/debian/install +++ /dev/null @@ -1,8 +0,0 @@ -tycmd usr/bin -tycommander usr/bin -tyuploader usr/bin -tycommander.desktop usr/share/applications -tyuploader.desktop usr/share/applications -tycommander.png usr/share/icons/hicolor/512x512/apps -tyuploader.png usr/share/icons/hicolor/512x512/apps -00-teensy.rules usr/lib/udev/rules.d diff --git a/contrib/debian/package.sh b/contrib/debian/package.sh deleted file mode 100755 index 2fe9290a..00000000 --- a/contrib/debian/package.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -e - -cd "$(dirname $0)/../.." - -VERSION=$(git describe --tags | cut -c 2- | awk -F '-' '{print $1}') -DATE=$(git describe --tags | sed -e 's/.*-g//' | xargs -n1 git show -s --format=%ci | LANG=en_US xargs -0 -n1 date "+%a, %d %b %Y %H:%M:%S %z" -d) -PACKAGE_DIR=bin/Debian - -rm -rf $PACKAGE_DIR/pkg -mkdir -p $PACKAGE_DIR $PACKAGE_DIR/pkg $PACKAGE_DIR/pkg/debian - -docker build -t rygel/debian10 contrib/debian/docker -docker run -t -i --rm -v $(pwd):/io rygel/debian10 /io/contrib/debian/build.sh - -install -D -m0755 bin/Debian/usr/bin/tycmd $PACKAGE_DIR/pkg/tycmd -install -D -m0755 bin/Debian/usr/bin/tycommander $PACKAGE_DIR/pkg/tycommander -install -D -m0755 bin/Debian/usr/bin/tyuploader $PACKAGE_DIR/pkg/tyuploader -install -D -m0644 bin/Debian/usr/share/applications/tycommander.desktop $PACKAGE_DIR/pkg/tycommander.desktop -install -D -m0644 bin/Debian/usr/share/applications/tyuploader.desktop $PACKAGE_DIR/pkg/tyuploader.desktop -install -D -m0644 resources/images/tycommander.png $PACKAGE_DIR/pkg/tycommander.png -install -D -m0644 resources/images/tyuploader.png $PACKAGE_DIR/pkg/tyuploader.png -install -D -m0644 contrib/debian/teensy.rules $PACKAGE_DIR/pkg/00-teensy.rules - -install -D -m0755 contrib/debian/rules $PACKAGE_DIR/pkg/debian/rules -install -D -m0644 contrib/debian/compat $PACKAGE_DIR/pkg/debian/compat -install -D -m0644 contrib/debian/install $PACKAGE_DIR/pkg/debian/install -install -D -m0644 contrib/debian/format $PACKAGE_DIR/pkg/debian/source/format - -echo "\ -Source: tytools -Section: utils -Priority: optional -Maintainer: Niels Martignène -Standards-Version: 4.5.1 -Rules-Requires-Root: no - -Package: tytools -Architecture: any -Depends: \${shlibs:Depends}, \${misc:Depends} -Description: GUI and command-line tools to manage Teensy devices -" > $PACKAGE_DIR/pkg/debian/control -echo "\ -tytools ($VERSION) unstable; urgency=low - - * Current release. - - -- Niels Martignène $DATE -" > $PACKAGE_DIR/pkg/debian/changelog - -(cd $PACKAGE_DIR/pkg && dpkg-buildpackage -uc -us) -cp $PACKAGE_DIR/*.deb $PACKAGE_DIR/../ diff --git a/contrib/debian/rules b/contrib/debian/rules deleted file mode 100644 index 2d33f6ac..00000000 --- a/contrib/debian/rules +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ diff --git a/contrib/debian/teensy.rules b/contrib/debian/teensy.rules deleted file mode 100644 index 0a921a50..00000000 --- a/contrib/debian/teensy.rules +++ /dev/null @@ -1,39 +0,0 @@ -# UDEV Rules for Teensy boards, http://www.pjrc.com/teensy/ -# -# The latest version of this file may be found at: -# http://www.pjrc.com/teensy/00-teensy.rules -# -# This file must be placed at: -# -# /etc/udev/rules.d/00-teensy.rules (preferred location) -# or -# /lib/udev/rules.d/00-teensy.rules (req'd on some broken systems) -# -# To install, type this command in a terminal: -# sudo cp 00-teensy.rules /etc/udev/rules.d/00-teensy.rules -# -# After this file is installed, physically unplug and reconnect Teensy. -# -ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" -ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789a]*", ENV{MTP_NO_PROBE}="1" -KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666", RUN:="/bin/stty -F /dev/%k raw -echo" -KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666" -KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013*", MODE:="0666" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013*", MODE:="0666" - -# -# If you share your linux system with other users, or just don't like the -# idea of write permission for everybody, you can replace MODE:="0666" with -# OWNER:="yourusername" to create the device owned by you, or with -# GROUP:="somegroupname" and mange access using standard unix groups. -# -# ModemManager tends to interfere with USB Serial devices like Teensy. -# Problems manifest as the Arduino Serial Monitor missing some incoming -# data, and "Unable to open /dev/ttyACM0 for reboot request" when -# uploading. If you experience these problems, disable or remove -# ModemManager from your system. If you must use a modem, perhaps -# try disabling the "MM_FILTER_RULE_TTY_ACM_INTERFACE" ModemManager -# rule. Changing ModemManager's filter policy from "strict" to "default" -# may also help. But if you don't use a modem, completely removing -# the troublesome ModemManager is the most effective solution. diff --git a/contrib/images/wix_banner.jpg b/contrib/images/wix_banner.jpg deleted file mode 100644 index ab3574d3..00000000 Binary files a/contrib/images/wix_banner.jpg and /dev/null differ diff --git a/contrib/images/wix_dialog.jpg b/contrib/images/wix_dialog.jpg deleted file mode 100644 index 97c2ace5..00000000 Binary files a/contrib/images/wix_dialog.jpg and /dev/null differ diff --git a/contrib/mingw/COPYING.MinGW-w64-runtime.txt b/contrib/mingw/COPYING.MinGW-w64-runtime.txt deleted file mode 100644 index ca6a077e..00000000 --- a/contrib/mingw/COPYING.MinGW-w64-runtime.txt +++ /dev/null @@ -1,240 +0,0 @@ -MinGW-w64 runtime licensing -*************************** - -This program or library was built using MinGW-w64 and statically -linked against the MinGW-w64 runtime. Some parts of the runtime -are under licenses which require that the copyright and license -notices are included when distributing the code in binary form. -These notices are listed below. - - -======================== -Overall copyright notice -======================== - -Copyright (c) 2009, 2010, 2011, 2012, 2013 by the mingw-w64 project - -This license has been certified as open source. It has also been designated -as GPL compatible by the Free Software Foundation (FSF). - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions in source code must retain the accompanying copyright - notice, this list of conditions, and the following disclaimer. - 2. Redistributions in binary form must reproduce the accompanying - copyright notice, this list of conditions, and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - 3. Names of the copyright holders must not be used to endorse or promote - products derived from this software without prior written permission - from the copyright holders. - 4. The right to distribute this software or to use it for any purpose does - not give you the right to use Servicemarks (sm) or Trademarks (tm) of - the copyright holders. Use of them is covered by separate agreement - with the copyright holders. - 5. If any files are modified, you must cause the modified files to carry - prominent notices stating that you changed the files and the date of - any change. - -Disclaimer - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -======================================== -getopt, getopt_long, and getop_long_only -======================================== - -Copyright (c) 2002 Todd C. Miller - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - - * * * * * * * - -Copyright (c) 2000 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Dieter Baron and Thomas Klausner. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -=============================================================== -gdtoa: Converting between IEEE floating point numbers and ASCII -=============================================================== - -The author of this software is David M. Gay. - -Copyright (C) 1997, 1998, 1999, 2000, 2001 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - * * * * * * * - -The author of this software is David M. Gay. - -Copyright (C) 2005 by David M. Gay -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that the copyright notice and this permission notice and warranty -disclaimer appear in supporting documentation, and that the name of -the author or any of his current or former employers not be used in -advertising or publicity pertaining to distribution of the software -without specific, written prior permission. - -THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN -NO EVENT SHALL THE AUTHOR OR ANY OF HIS CURRENT OR FORMER EMPLOYERS BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY -DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - * * * * * * * - -The author of this software is David M. Gay. - -Copyright (C) 2004 by David M. Gay. -All Rights Reserved -Based on material in the rest of /netlib/fp/gdota.tar.gz, -which is copyright (C) 1998, 2000 by Lucent Technologies. - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - -========================= -Parts of the math library -========================= - -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunSoft, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - - * * * * * * * - -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - - * * * * * * * - -FIXME: Cephes math lib -Copyright (C) 1984-1998 Stephen L. Moshier - -It sounds vague, but as to be found at -, it gives an -impression that the author could be willing to give an explicit -permission to distribute those files e.g. under a BSD style license. So -probably there is no problem here, although it could be good to get a -permission from the author and then add a license into the Cephes files -in MinGW runtime. At least on follow-up it is marked that debian sees the -version a-like BSD one. As MinGW.org (where those cephes parts are coming -from) distributes them now over 6 years, it should be fine. - -=================================== -Headers and IDLs imported from Wine -=================================== - -Some header and IDL files were imported from the Wine project. These files -are prominent maked in source. Their copyright belongs to contributors and -they are distributed under LGPL license. - -Disclaimer - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. diff --git a/contrib/mingw/COPYING.winpthreads.txt b/contrib/mingw/COPYING.winpthreads.txt deleted file mode 100644 index 35077012..00000000 --- a/contrib/mingw/COPYING.winpthreads.txt +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2011 mingw-w64 project - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - -/* - * Parts of this library are derived by: - * - * Posix Threads library for Microsoft Windows - * - * Use at own risk, there is no implied warranty to this code. - * It uses undocumented features of Microsoft Windows that can change - * at any time in the future. - * - * (C) 2010 Lockless Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of Lockless Inc. nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AN - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ diff --git a/contrib/msvc/unistd.h b/contrib/msvc/unistd.h deleted file mode 100644 index d3881a3e..00000000 --- a/contrib/msvc/unistd.h +++ /dev/null @@ -1,22 +0,0 @@ -/* TyTools - public domain - Niels Martignène - https://koromix.dev/tytools - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef _UNISTD_H -#define _UNISTD_H - -#include -#include -#include - -#define STDIN_FILENO 0 -#define STDOUT_FILENO 1 -#define STDERR_FILENO 2 - -#endif diff --git a/lib/qt5/README.md b/lib/qt5/README.md deleted file mode 100644 index ac5b2f04..00000000 --- a/lib/qt5/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Compilation on Windows - -## MSVC 20xx 32-bit with static MSVCRT - -These instructions have been tested with *Qt 5.12.11*, they will probably **not work for -Qt versions < or > 5.12**. Even if they work, you may not be able to link TyTools correctly. - -Download qtbase source from http://download.qt.io/official_releases/qt/5.12/5.12.11/submodules/qtbase-everywhere-src-5.12.11.zip - -Extract the directory inside it to "tytools/lib/qt5" and rename "qtbase-everywhere-src-5.12.11" to -"i686-win32-msvc-mt". Open the "VS20xx x86 Native Tools Command Prompt" and cd to -this directory. - -```batch -cd i686-win32-msvc-mt -REM Now we are in tytools/lib/qt5/i686-win32-msvc-mt -configure -platform win32-msvc ^ - -opensource ^ - -confirm-license ^ - -static ^ - -static-runtime ^ - -release ^ - -nomake examples ^ - -nomake tests ^ - -no-opengl ^ - -no-harfbuzz ^ - -no-icu ^ - -no-cups ^ - -qt-pcre ^ - -qt-zlib ^ - -qt-freetype ^ - -qt-libpng ^ - -qt-libjpeg -nmake -``` - -Unfortunately Qt static builds are fragile and cannot be moved around. You will need to rebuild Qt -if you move your project. - -## MSVC 20xx 64-bit with static MSVCRT - -These instructions have been tested with *Qt 5.12.11*, they will probably **not work for -Qt versions < or > 5.12**. Even if they work, you may not be able to link TyTools correctly. - -Download qtbase source from http://download.qt.io/official_releases/qt/5.12/5.12.11/submodules/qtbase-everywhere-src-5.12.11.zip - -Extract the directory inside it to "tytools/lib/qt5" and rename "qtbase-everywhere-src-5.12.11" to -"x86_64-win32-msvc-mt". Open the "VS20xx x64 Native Tools Command Prompt" and cd to -this directory. - -```batch -cd x86_64-win32-msvc-mt -REM Now we are in tytools/lib/qt5/x86_64-win32-msvc-mt -configure -platform win32-msvc ^ - -opensource ^ - -confirm-license ^ - -static ^ - -static-runtime ^ - -release ^ - -nomake examples ^ - -nomake tests ^ - -no-opengl ^ - -no-harfbuzz ^ - -no-icu ^ - -no-cups ^ - -qt-pcre ^ - -qt-zlib ^ - -qt-freetype ^ - -qt-libpng ^ - -qt-libjpeg -nmake -``` - -Unfortunately Qt static builds are fragile and cannot be moved around. You will need to rebuild Qt -if you move your project. - -# Mac OS X / Clang 64-bit - -These instructions have been tested with *Qt 5.9.9*, they will probably **not work for -Qt versions < or > 5.9**. Even if they work, you may not be able to link TyTools correctly. - -A recent version of XCode must be installed. - -Download qtbase source from http://download.qt.io/official_releases/qt/5.9/5.9.9/submodules/qtbase-opensource-src-5.9.9.tar.xz - -Extract the directory inside it to "tytools/lib/qt5" and rename "qtbase-opensource-src-5.9.8" to -"x86_64-darwin-clang". Open a command prompt and go to that directory. - -```sh -cd x86_64-darwin-clang -# Now we are in tytools/lib/qt5/x86_64-darwin-clang -./configure -platform macx-clang \ - -opensource \ - -confirm-license \ - -static \ - -release \ - -nomake examples \ - -nomake tests \ - -no-pkg-config \ - -no-harfbuzz \ - -no-icu \ - -no-cups \ - -no-freetype \ - -qt-pcre -make -``` - -Unfortunately Qt static builds are fragile and cannot be moved around. You will need to rebuild Qt -if you move your project. diff --git a/lib/qt5/download-static-qt5.sh b/lib/qt5/download-static-qt5.sh deleted file mode 100755 index ae9a8f7f..00000000 --- a/lib/qt5/download-static-qt5.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -e - -print_usage() { - printf "usage: %s [options] (e.g. 5.12.2)\n\n" "$(basename $0)" - printf "This tool downloads the appropriate Qt sources needed to build\n" - printf "a static build of Qt\n\n" - printf "Options:\n" - printf " -x [] Extract Qt to \n" - printf " -f Overwrite destination directory if it exists\n" -} - -while getopts ":x:f" opt; do - case $opt in - x) DESTDIR=$OPTARG ;; - f) OVERWRITE=true ;; - - \?) echo "Invalid option -$OPTARG" >&2; print_usage >&2; exit 1 ;; - esac -done -VERSION=${@:$OPTIND:1} - -[ -z "$VERSION" ] && (echo "Missing Qt version parameter" >&2; print_usage >&2; exit 1) - -# Delete any partial downloads using the checksum files, unfortunately I can't find -# any GPG signature for the source downloads to make this secure. -[ ! -f qtbase-md5sums-$VERSION.txt ] && wget -O qtbase-md5sums-$VERSION.txt http://download.qt.io/official_releases/qt/$(echo $VERSION | cut -d. -f1,2)/$VERSION/submodules/md5sums.txt -md5sum --quiet -c qtbase-md5sums-$VERSION.txt 2>/dev/null | cut -d: -f1 | xargs rm -f -[ ! -f qtbase-everywhere-src-$VERSION.tar.xz ] && wget http://download.qt.io/official_releases/qt/$(echo $VERSION | cut -d. -f1,2)/$VERSION/submodules/qtbase-everywhere-src-$VERSION.tar.xz -echo "All files downloaded" - -if [ -n "$DESTDIR" ]; then - echo Extracting qtbase-opensource-src-$VERSION.tar.xz... - if [ "$OVERWRITE" = true ]; then - rm -rf "$DESTDIR" - fi - mkdir "$DESTDIR" - tar Jxf qtbase-opensource-src-$VERSION.tar.xz -C "$DESTDIR" --strip-components 1 - printf "Qt source extracted in '%s'\n" "$DESTDIR" -fi diff --git a/resources/images/board_attached.png b/resources/images/board_attached.png deleted file mode 100644 index a7f4f1dc..00000000 Binary files a/resources/images/board_attached.png and /dev/null differ diff --git a/resources/images/board_attached.xcf b/resources/images/board_attached.xcf deleted file mode 100644 index f87fb46c..00000000 Binary files a/resources/images/board_attached.xcf and /dev/null differ diff --git a/resources/images/board_bootloader.png b/resources/images/board_bootloader.png deleted file mode 100644 index 7b0f29ce..00000000 Binary files a/resources/images/board_bootloader.png and /dev/null differ diff --git a/resources/images/board_bootloader.xcf b/resources/images/board_bootloader.xcf deleted file mode 100644 index 23f10356..00000000 Binary files a/resources/images/board_bootloader.xcf and /dev/null differ diff --git a/resources/images/board_detached.png b/resources/images/board_detached.png deleted file mode 100644 index 76dd29a0..00000000 Binary files a/resources/images/board_detached.png and /dev/null differ diff --git a/resources/images/board_detached.xcf b/resources/images/board_detached.xcf deleted file mode 100644 index fa9b3a91..00000000 Binary files a/resources/images/board_detached.xcf and /dev/null differ diff --git a/resources/images/board_error.png b/resources/images/board_error.png deleted file mode 100644 index 8489cf29..00000000 Binary files a/resources/images/board_error.png and /dev/null differ diff --git a/resources/images/board_error.xcf b/resources/images/board_error.xcf deleted file mode 100644 index 4a819d24..00000000 Binary files a/resources/images/board_error.xcf and /dev/null differ diff --git a/resources/images/board_other.png b/resources/images/board_other.png deleted file mode 100644 index 8b61cd2d..00000000 Binary files a/resources/images/board_other.png and /dev/null differ diff --git a/resources/images/board_other.xcf b/resources/images/board_other.xcf deleted file mode 100644 index 745089b8..00000000 Binary files a/resources/images/board_other.xcf and /dev/null differ diff --git a/resources/images/board_pending.png b/resources/images/board_pending.png deleted file mode 100644 index 2f9e2247..00000000 Binary files a/resources/images/board_pending.png and /dev/null differ diff --git a/resources/images/board_pending.xcf b/resources/images/board_pending.xcf deleted file mode 100644 index b2e25fb6..00000000 Binary files a/resources/images/board_pending.xcf and /dev/null differ diff --git a/resources/images/board_working.png b/resources/images/board_working.png deleted file mode 100644 index 5b3860a4..00000000 Binary files a/resources/images/board_working.png and /dev/null differ diff --git a/resources/images/board_working.xcf b/resources/images/board_working.xcf deleted file mode 100644 index d3f032ef..00000000 Binary files a/resources/images/board_working.xcf and /dev/null differ diff --git a/resources/images/monitor.png b/resources/images/monitor.png deleted file mode 100644 index e2e8cd02..00000000 Binary files a/resources/images/monitor.png and /dev/null differ diff --git a/resources/images/reboot.png b/resources/images/reboot.png deleted file mode 100644 index 348de9dc..00000000 Binary files a/resources/images/reboot.png and /dev/null differ diff --git a/resources/images/reset.png b/resources/images/reset.png deleted file mode 100644 index 455611c6..00000000 Binary files a/resources/images/reset.png and /dev/null differ diff --git a/resources/images/tycommander.icns b/resources/images/tycommander.icns deleted file mode 100644 index 65002c31..00000000 Binary files a/resources/images/tycommander.icns and /dev/null differ diff --git a/resources/images/tycommander.ico b/resources/images/tycommander.ico deleted file mode 100644 index 664e3663..00000000 Binary files a/resources/images/tycommander.ico and /dev/null differ diff --git a/resources/images/tycommander.png b/resources/images/tycommander.png deleted file mode 100644 index 3088048e..00000000 Binary files a/resources/images/tycommander.png and /dev/null differ diff --git a/resources/images/tycommander.xcf b/resources/images/tycommander.xcf deleted file mode 100644 index 1e4fce2a..00000000 Binary files a/resources/images/tycommander.xcf and /dev/null differ diff --git a/resources/images/tyuploader.icns b/resources/images/tyuploader.icns deleted file mode 100644 index f070911e..00000000 Binary files a/resources/images/tyuploader.icns and /dev/null differ diff --git a/resources/images/tyuploader.ico b/resources/images/tyuploader.ico deleted file mode 100644 index d396c92d..00000000 Binary files a/resources/images/tyuploader.ico and /dev/null differ diff --git a/resources/images/tyuploader.png b/resources/images/tyuploader.png deleted file mode 100644 index d38a8136..00000000 Binary files a/resources/images/tyuploader.png and /dev/null differ diff --git a/resources/images/tyuploader.xcf b/resources/images/tyuploader.xcf deleted file mode 100644 index 010f38a2..00000000 Binary files a/resources/images/tyuploader.xcf and /dev/null differ diff --git a/resources/images/upload.png b/resources/images/upload.png deleted file mode 100644 index 70699782..00000000 Binary files a/resources/images/upload.png and /dev/null differ diff --git a/resources/resources.qrc b/resources/resources.qrc deleted file mode 100644 index eeeaa3b9..00000000 --- a/resources/resources.qrc +++ /dev/null @@ -1,18 +0,0 @@ - - - images/tycommander.png - images/tyuploader.png - - images/board_attached.png - images/board_detached.png - images/board_bootloader.png - images/board_other.png - images/board_pending.png - images/board_working.png - images/board_error.png - images/reset.png - images/upload.png - images/reboot.png - images/monitor.png - - diff --git a/src/libhs/CMakeLists.txt b/src/libhs/CMakeLists.txt deleted file mode 100644 index cb32601d..00000000 --- a/src/libhs/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ -# libhs - public domain -# Niels Martignène -# https://koromix.dev/libhs - -# This software is in the public domain. Where that dedication is not -# recognized, you are granted a perpetual, irrevocable license to copy, -# distribute, and modify this file as you see fit. - -# See the LICENSE file for more details. - -if(WIN32) - list(APPEND LIBHS_LINK_LIBRARIES hid setupapi) -elseif(APPLE) - find_library(COREFOUNDATION_LIBRARIES CoreFoundation) - find_library(IOKIT_LIBRARIES IOKit) - list(APPEND LIBHS_LINK_LIBRARIES ${COREFOUNDATION_LIBRARIES} ${IOKIT_LIBRARIES}) -elseif(LINUX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE") - - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBUDEV REQUIRED libudev) - - include_directories(${LIBUDEV_INCLUDE_DIRS}) - list(APPEND LIBHS_LINK_LIBRARIES ${LIBUDEV_LIBRARIES}) -endif() - -include(CheckSymbolExists) -check_symbol_exists(asprintf stdio.h HAVE_ASPRINTF) - -find_package(Threads) -list(APPEND LIBHS_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) - -set(LIBHS_SOURCES array.c - array.h - common.c - common.h - common_priv.h - device.c - device_posix.c - device_win32.c - device.h - device_priv.h - hid_darwin.c - hid_linux.c - hid_win32.c - hid.h - htable.c - match.c - match.h - match_priv.h - monitor_common.c - monitor_darwin.c - monitor_linux.c - monitor_win32.c - monitor.h - monitor_priv.h - platform.c - platform_darwin.c - platform_linux.c - platform_win32.c - platform.h - serial_posix.c - serial_win32.c - serial.h) - -add_library(libhs STATIC ${LIBHS_SOURCES}) -set_target_properties(libhs PROPERTIES OUTPUT_NAME hs) -target_link_libraries(libhs ${LIBHS_LINK_LIBRARIES}) -if(HAVE_ASPRINTF) - target_compile_definitions(libhs PRIVATE HAVE_ASPRINTF) -endif() -enable_unity_build(libhs) - -add_amalgamated_file(libhs "${CMAKE_BINARY_DIR}/libhs.h" libhs.h) - -if(BUILD_EXAMPLES) - add_subdirectory(examples/enumerate_devices) - add_subdirectory(examples/monitor_devices) - add_subdirectory(examples/serial_dumper) -endif() diff --git a/src/libhs/README.md b/src/libhs/README.md deleted file mode 100644 index 83b80246..00000000 --- a/src/libhs/README.md +++ /dev/null @@ -1,12 +0,0 @@ -libhs -===== - -libhs is a C library to enumerate HID and serial devices and interact with them. It is: - -- **single-file**: one header is all you need to make it work. -- **public domain**: use it, hack it, do whatever you want. -- **multiple platforms**: Windows (≥ Vista), Mac OS X (≥ 10.9) and Linux. -- **multiple compilers**: MSVC (≥ 2015), GCC and Clang. -- **driverless**: uses native OS-provided interfaces and does not require custom drivers. - -You can download the library in the [release section](https://github.com/Koromix/libraies). diff --git a/src/libhs/array.c b/src/libhs/array.c deleted file mode 100644 index e0d781db..00000000 --- a/src/libhs/array.c +++ /dev/null @@ -1,69 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#include "common_priv.h" -#include "array.h" - -void _hs_array_release_(struct _hs_array *array) -{ - assert(array); - - free(array->values); - - array->values = NULL; - array->allocated = 0; - array->count = 0; -} - -int _hs_array_expand_(struct _hs_array *array, size_t value_size, size_t need) -{ - assert(array); - assert(array->count <= SIZE_MAX - need); - - if (need > array->allocated - array->count) { - size_t new_size; - void *new_values; - - new_size = 4; - while (new_size < array->count) - new_size += new_size / 2; - while (need > new_size - array->count) - new_size += new_size / 2; - new_values = realloc(array->values, new_size * value_size); - if (!new_values) - return hs_error(HS_ERROR_MEMORY, NULL); - memset((uint8_t *)new_values + (array->allocated * value_size), 0, - (new_size - array->allocated) * value_size); - - array->values = new_values; - array->allocated = new_size; - } - - return 0; -} - -void _hs_array_shrink_(struct _hs_array *array, size_t value_size) -{ - assert(array); - - if (array->count) { - void *new_items = realloc(array->values, array->count * value_size); - if (!new_items) - return; - - array->values = new_items; - array->allocated = array->count; - } else { - free(array->values); - - array->values = NULL; - array->allocated = 0; - } -} diff --git a/src/libhs/array.h b/src/libhs/array.h deleted file mode 100644 index a483238f..00000000 --- a/src/libhs/array.h +++ /dev/null @@ -1,84 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef HS_ARRAY_H -#define HS_ARRAY_H - -#include "common.h" - -_HS_BEGIN_C - -struct _hs_array { - void *values; - size_t allocated; - size_t count; -}; - -#define _HS_ARRAY(Type) \ - struct { \ - Type *values; \ - size_t allocated; \ - size_t count; \ - } - -#define _hs_array_release(Array) \ - _hs_array_release_((struct _hs_array *)&(Array)->values) - -#define _hs_array_grow(Array, Need) \ - _hs_array_grow_((struct _hs_array *)&(Array)->values, sizeof(*(Array)->values), (Need)) -#define _hs_array_push(Array, Value) \ - (_hs_array_grow((Array), 1) < 0 \ - ? HS_ERROR_MEMORY \ - : (((Array)->values[(Array)->count++] = (Value)), 0)) - -#define _hs_array_shrink(Array) \ - _hs_array_shrink_((struct _hs_array *)&(Array)->values, sizeof(*(Array)->values)) -#define _hs_array_pop(Array, Count) \ - do { \ - (Array)->count -= (Count); \ - if ((Array)->count <= (Array)->allocated / 2) \ - _hs_array_shrink(Array); \ - } while (0) -#define _hs_array_remove(Array, Offset, Count) \ - do { \ - size_t _HS_UNIQUE_ID(start) = (Offset); \ - size_t _HS_UNIQUE_ID(count) = (Count); \ - size_t _HS_UNIQUE_ID(end) = _HS_UNIQUE_ID(start) + _HS_UNIQUE_ID(count); \ - memmove((Array)->values + _HS_UNIQUE_ID(start), \ - (Array)->values + _HS_UNIQUE_ID(end), \ - ((Array)->count - _HS_UNIQUE_ID(end)) * sizeof(*(Array)->values)); \ - _hs_array_pop((Array), _HS_UNIQUE_ID(count)); \ - } while (0) - -#define _hs_array_move(Src, Dest) \ - do { \ - (Dest)->values = (Src)->values; \ - (Dest)->count = (Src)->count; \ - (Dest)->allocated = (Src)->allocated; \ - memset((Src), 0, sizeof(*(Src))); \ - } while (0) - -void _hs_array_release_(struct _hs_array *array); - -int _hs_array_expand_(struct _hs_array *array, size_t value_size, size_t need); -static inline int _hs_array_grow_(struct _hs_array *array, size_t value_size, size_t need) -{ - if (need > array->allocated - array->count) { - return _hs_array_expand_(array, value_size, need); - } else { - return 0; - } -} - -void _hs_array_shrink_(struct _hs_array *array, size_t value_size); - -_HS_END_C - -#endif diff --git a/src/libhs/common.c b/src/libhs/common.c deleted file mode 100644 index 9c9444b7..00000000 --- a/src/libhs/common.c +++ /dev/null @@ -1,182 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#include "common_priv.h" - -static hs_log_handler_func *log_handler = hs_log_default_handler; -static void *log_handler_udata; - -static _HS_THREAD_LOCAL hs_error_code error_masks[32]; -static _HS_THREAD_LOCAL unsigned int error_masks_count; - -static _HS_THREAD_LOCAL char last_error_msg[512]; - -uint32_t hs_version(void) -{ - return HS_VERSION; -} - -const char *hs_version_string(void) -{ - return HS_VERSION_STRING; -} - -static const char *generic_message(int err) -{ - if (err >= 0) - return "Success"; - - switch ((hs_error_code)err) { - case HS_ERROR_MEMORY: { return "Memory error"; } break; - case HS_ERROR_NOT_FOUND: { return "Not found"; } break; - case HS_ERROR_ACCESS: { return "Permission error"; } break; - case HS_ERROR_IO: { return "I/O error"; } break; - case HS_ERROR_PARSE: { return "Parse error"; } break; - case HS_ERROR_SYSTEM: { return "System error"; } break; - } - - return "Unknown error"; -} - -void hs_log_set_handler(hs_log_handler_func *f, void *udata) -{ - assert(f); - assert(f != hs_log_default_handler || !udata); - - log_handler = f; - log_handler_udata = udata; -} - -void hs_log_default_handler(hs_log_level level, int err, const char *msg, void *udata) -{ - _HS_UNUSED(err); - _HS_UNUSED(udata); - - if (level == HS_LOG_DEBUG && !getenv("LIBHS_DEBUG")) - return; - - fputs(msg, stderr); - fputc('\n', stderr); -} - -void hs_error_mask(hs_error_code err) -{ - assert(error_masks_count < _HS_COUNTOF(error_masks)); - - error_masks[error_masks_count++] = err; -} - -void hs_error_unmask(void) -{ - assert(error_masks_count); - - error_masks_count--; -} - -int hs_error_is_masked(int err) -{ - if (err >= 0) - return 0; - - for (unsigned int i = 0; i < error_masks_count; i++) { - if (error_masks[i] == err) - return 1; - } - - return 0; -} - -const char *hs_error_last_message() -{ - return last_error_msg; -} - -void hs_log(hs_log_level level, const char *fmt, ...) -{ - assert(fmt); - - va_list ap; - char buf[sizeof(last_error_msg)]; - - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - - (*log_handler)(level, 0, buf, log_handler_udata); -} - -int hs_error(hs_error_code err, const char *fmt, ...) -{ - va_list ap; - char buf[sizeof(last_error_msg)]; - - /* Don't copy directly to last_error_message because we need to support - ty_error(err, "%s", ty_error_last_message()). */ - if (fmt) { - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - } else { - strncpy(buf, generic_message(err), sizeof(buf)); - buf[sizeof(buf) - 1] = 0; - } - - strcpy(last_error_msg, buf); - if (!hs_error_is_masked(err)) - (*log_handler)(HS_LOG_ERROR, err, buf, log_handler_udata); - - return err; -} - -int _hs_asprintf(char **strp, const char *fmt, ...) -{ - va_list ap; - int r; - - va_start(ap, fmt); -#ifdef HAVE_ASPRINTF - r = vasprintf(strp, fmt, ap); -#else - r = _hs_vasprintf(strp, fmt, ap); -#endif - va_end(ap); - - return r; -} - -int _hs_vasprintf(char **strp, const char *fmt, va_list ap) -{ -#ifdef HAVE_ASPRINTF - return vasprintf(strp, fmt, ap); -#else - va_list ap_copy; - char *s; - int r; - - va_copy(ap_copy, ap); - r = vsnprintf(NULL, 0, fmt, ap_copy); - if (r < 0) - return -1; - va_end(ap_copy); - - s = (char *)malloc((size_t)r + 1); - if (!s) - return -1; - - va_copy(ap_copy, ap); - r = vsnprintf(s, (size_t)r + 1, fmt, ap_copy); - if (r < 0) - return -1; - va_end(ap_copy); - - *strp = s; - return r; -#endif -} diff --git a/src/libhs/common.h b/src/libhs/common.h deleted file mode 100644 index 78e0da79..00000000 --- a/src/libhs/common.h +++ /dev/null @@ -1,325 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef HS_COMMON_H -#define HS_COMMON_H - -#include -#include -#include -#include -#include - -#ifdef __cplusplus - #define _HS_BEGIN_C extern "C" { - #define _HS_END_C } -#else - #define _HS_BEGIN_C - #define _HS_END_C -#endif - -_HS_BEGIN_C - -typedef struct hs_device hs_device; -typedef struct hs_monitor hs_monitor; -typedef struct hs_port hs_port; -typedef struct hs_match_spec hs_match_spec; - -/** - * @defgroup misc Miscellaneous - * @brief Error management and platform-specific functions. - */ - -/** - * @ingroup misc - * @brief Compile-time libhs version. - * - * The version is represented as a six-digit decimal value respecting **semantic versioning**: - * MMmmpp (major, minor, patch), e.g. 900 for "0.9.0", 10002 for "1.0.2" or 220023 for "22.0.23". - * - * @sa hs_version() for the run-time version. - * @sa HS_VERSION_STRING for the version string. - */ -#define HS_VERSION 900 -/** - * @ingroup misc - * @brief Compile-time libhs version string. - * - * @sa hs_version_string() for the run-time version. - * @sa HS_VERSION for the version number. - */ -#define HS_VERSION_STRING "0.9.0" - -#if defined(__GNUC__) - #define _HS_POSSIBLY_UNUSED __attribute__((__unused__)) - #define _HS_THREAD_LOCAL __thread - #define _HS_ALIGN_OF(type) __alignof__(type) - - #ifdef __MINGW_PRINTF_FORMAT - #define _HS_PRINTF_FORMAT(fmt, first) __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt, first))) - #else - #define _HS_PRINTF_FORMAT(fmt, first) __attribute__((__format__(__printf__, fmt, first))) - #endif -#elif _MSC_VER >= 1900 - #define _HS_POSSIBLY_UNUSED - #define _HS_THREAD_LOCAL __declspec(thread) - #define _HS_ALIGN_OF(type) __alignof(type) - - #define _HS_PRINTF_FORMAT(fmt, first) - - // HAVE_SSIZE_T is used this way by other projects - #ifndef HAVE_SSIZE_T - #define HAVE_SSIZE_T - #ifdef _WIN64 -typedef __int64 ssize_t; - #else -typedef long ssize_t; - #endif - #endif - - #define strcasecmp _stricmp - #define strncasecmp _strnicmp -#else - #error "This compiler is not supported" -#endif - -#define _HS_CONCAT_HELPER(a, b) a ## b -#define _HS_CONCAT(a, b) _HS_CONCAT_HELPER(a, b) -#define _HS_UNIQUE_ID(prefix) _HS_CONCAT(prefix, __LINE__) -#define _HS_UNUSED(arg) ((void)(arg)) -#define _HS_COUNTOF(a) (sizeof(a) / sizeof(*(a))) -#define _HS_MIN(a,b) ((a) < (b) ? (a) : (b)) -#define _HS_MAX(a,b) ((a) > (b) ? (a) : (b)) -#define _HS_ALIGN_SIZE(size, align) (((size) + (align) - 1) / (align) * (align)) -#define _HS_ALIGN_SIZE_FOR_TYPE(size, type) _HS_ALIGN_SIZE((size), sizeof(type)) -#define _HS_CONTAINER_OF(head, type, member) \ - ((type *)((char *)(head) - (size_t)(&((type *)0)->member))) - -int _hs_asprintf(char **strp, const char *fmt, ...) _HS_PRINTF_FORMAT(2, 3); -int _hs_vasprintf(char **strp, const char *fmt, va_list ap) _HS_PRINTF_FORMAT(2, 0); - -#if defined(DOXYGEN) -/** - * @ingroup misc - * @brief Type representing an OS descriptor/handle. - * - * This is used in functions taking or returning an OS descriptor/handle, in order to avoid - * having different function prototypes on different platforms. - * - * The underlying type is: - * - int on POSIX platforms, including OS X - * - HANDLE (aka. void *) on Windows - */ -typedef _platform_specific_ hs_handle; -#elif defined(_WIN32) -typedef void *hs_handle; // HANDLE -#else -typedef int hs_handle; -#endif - -/** - * @ingroup misc - * @brief libhs message log levels. - */ -typedef enum hs_log_level { - /** Fatal errors. */ - HS_LOG_ERROR, - /** Non-fatal problem. */ - HS_LOG_WARNING, - /** Internal debug information. */ - HS_LOG_DEBUG -} hs_log_level; - -/** - * @ingroup misc - * @brief libhs error codes. - */ -typedef enum hs_error_code { - /** Memory error. */ - HS_ERROR_MEMORY = -1, - /** Missing resource error. */ - HS_ERROR_NOT_FOUND = -2, - /** Permission denied. */ - HS_ERROR_ACCESS = -3, - /** Input/output error. */ - HS_ERROR_IO = -4, - /** Parse error. */ - HS_ERROR_PARSE = -5, - /** Generic system error. */ - HS_ERROR_SYSTEM = -6 -} hs_error_code; - -typedef void hs_log_handler_func(hs_log_level level, int err, const char *msg, void *udata); - -/** - * @{ - * @name Version Functions - */ - -/** - * @ingroup misc - * @brief Run-time libhs version. - * - * The version is represented as a six-digit decimal value respecting **semantic versioning**: - * MMmmpp (major, minor, patch), e.g. 900 for "0.9.0", 10002 for "1.0.2" or 220023 for "22.0.23". - * - * @return This function returns the run-time version number. - * - * @sa HS_VERSION for the compile-time version. - * @sa hs_version_string() for the version string. - */ -uint32_t hs_version(void); -/** - * @ingroup misc - * @brief Run-time libhs version string. - * - * @return This function returns the run-time version string. - * - * @sa HS_VERSION_STRING for the compile-time version. - * @sa hs_version() for the version number. - */ -const char *hs_version_string(void); - -/** @} */ - -/** - * @{ - * @name Log Functions - */ - -/** - * @ingroup misc - * @brief Default log handler, see hs_log_set_handler() for more information. - */ -void hs_log_default_handler(hs_log_level level, int err, const char *msg, void *udata); -/** - * @ingroup misc - * @brief Change the log handler function. - * - * The default handler prints the message to stderr. It does not print debug messages unless - * the environment variable LIBHS_DEBUG is set. - * - * @param f New log handler, or hs_log_default_handler to restore the default one. - * @param udata Pointer to user-defined data for the handler (use NULL for hs_log_default_handler). - * - * @sa hs_log() - * @sa hs_log_default_handler() is the default log handler. - */ -void hs_log_set_handler(hs_log_handler_func *f, void *udata); -/** - * @ingroup misc - * @brief Call the log callback with a printf-formatted message. - * - * Format a message and call the log callback with it. The default callback prints it to stderr, - * see hs_log_set_handler(). This callback does not print debug messages unless the environment - * variable LIBHS_DEBUG is set. - * - * @param level Log level. - * @param fmt Format string, using printf syntax. - * @param ... - * - * @sa hs_log_set_handler() to use a custom callback function. - */ -void hs_log(hs_log_level level, const char *fmt, ...) _HS_PRINTF_FORMAT(2, 3); - -/** @} */ - -/** - * @{ - * @name Error Functions - */ - -/** - * @ingroup misc - * @brief Mask an error code. - * - * Mask error codes to prevent libhs from calling the log callback (the default one simply prints - * the string to stderr). It does not change the behavior of the function where the error occurs. - * - * For example, if you want to open a device without a missing device message, you can use: - * @code{.c} - * hs_error_mask(HS_ERROR_NOT_FOUND); - * r = hs_port_open(dev, HS_PORT_MODE_RW, &port); - * hs_error_unmask(); - * if (r < 0) - * return r; - * @endcode - * - * The masked codes are kept in a limited stack, you must not forget to unmask codes quickly - * with @ref hs_error_unmask(). - * - * @param err Error code to mask. - * - * @sa hs_error_unmask() - * @sa hs_error_is_masked() - */ -void hs_error_mask(hs_error_code err); -/** - * @ingroup misc - * @brief Unmask the last masked error code. - * - * @sa hs_error_mask() - */ -void hs_error_unmask(void); -/** - * @ingroup misc - * @brief Check whether an error code is masked. - * - * Returns 1 if error code @p err is currently masked, or 0 otherwise. - * - * hs_error() does not call the log handler for masked errors, you only need to use - * this function if you want to bypass hs_error() and call hs_log() directly. - * - * @param err Error code to check. - * - * @sa hs_error_mask() - */ -int hs_error_is_masked(int err); - -/** - * @ingroup misc - * @brief Get the last error message emitted on the current thread. - */ -const char *hs_error_last_message(); - -/** - * @ingroup misc - * @brief Call the log callback with a printf-formatted error message. - * - * Format an error message and call the log callback with it. Pass NULL to @p fmt to use a - * generic error message. The default callback prints it to stderr, see hs_log_set_handler(). - * - * The error code is simply returned as a convenience, so you can use this function like: - * @code{.c} - * // Explicit error message - * int pipe[2], r; - * r = pipe(pipe); - * if (r < 0) - * return hs_error(HS_ERROR_SYSTEM, "pipe() failed: %s", strerror(errno)); - * - * // Generic error message (e.g. "Memory error") - * char *p = malloc(128); - * if (!p) - * return hs_error(HS_ERROR_MEMORY, NULL); - * @endcode - * - * @param err Error code. - * @param fmt Format string, using printf syntax. - * @param ... - * @return This function returns the error code. - * - * @sa hs_error_mask() to mask specific error codes. - * @sa hs_log_set_handler() to use a custom callback function. - */ -int hs_error(hs_error_code err, const char *fmt, ...) _HS_PRINTF_FORMAT(2, 3); - -_HS_END_C - -#endif diff --git a/src/libhs/common_priv.h b/src/libhs/common_priv.h deleted file mode 100644 index cfefa2d0..00000000 --- a/src/libhs/common_priv.h +++ /dev/null @@ -1,23 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef _HS_COMMON_PRIV_H -#define _HS_COMMON_PRIV_H - -#include "common.h" -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/src/libhs/device.c b/src/libhs/device.c deleted file mode 100644 index 4d969924..00000000 --- a/src/libhs/device.c +++ /dev/null @@ -1,129 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#include "common_priv.h" -#ifdef _MSC_VER - #include -#endif -#include "device_priv.h" -#include "monitor.h" -#include "platform.h" - -hs_device *hs_device_ref(hs_device *dev) -{ - assert(dev); - -#ifdef _MSC_VER - InterlockedIncrement((long *)&dev->refcount); -#else - __atomic_fetch_add(&dev->refcount, 1, __ATOMIC_RELAXED); -#endif - return dev; -} - -void hs_device_unref(hs_device *dev) -{ - if (dev) { -#ifdef _MSC_VER - if (InterlockedDecrement((long *)&dev->refcount)) - return; -#else - if (__atomic_fetch_sub(&dev->refcount, 1, __ATOMIC_RELEASE) > 1) - return; - __atomic_thread_fence(__ATOMIC_ACQUIRE); -#endif - - free(dev->key); - free(dev->location); - free(dev->path); - - free(dev->manufacturer_string); - free(dev->product_string); - free(dev->serial_number_string); - } - - free(dev); -} - -void _hs_device_log(const hs_device *dev, const char *verb) -{ - switch (dev->type) { - case HS_DEVICE_TYPE_SERIAL: { - hs_log(HS_LOG_DEBUG, "%s serial device '%s' on iface %u\n" - " - USB VID/PID = %04x:%04x, USB location = %s\n" - " - USB manufacturer = %s, product = %s, S/N = %s", - verb, dev->key, dev->iface_number, dev->vid, dev->pid, dev->location, - dev->manufacturer_string ? dev->manufacturer_string : "(none)", - dev->product_string ? dev->product_string : "(none)", - dev->serial_number_string ? dev->serial_number_string : "(none)"); - } break; - - case HS_DEVICE_TYPE_HID: { - hs_log(HS_LOG_DEBUG, "%s HID device '%s' on iface %u\n" - " - USB VID/PID = %04x:%04x, USB location = %s\n" - " - USB manufacturer = %s, product = %s, S/N = %s\n" - " - HID usage page = 0x%x, HID usage = 0x%x", - verb, dev->key, dev->iface_number, dev->vid, dev->pid, dev->location, - dev->manufacturer_string ? dev->manufacturer_string : "(none)", - dev->product_string ? dev->product_string : "(none)", - dev->serial_number_string ? dev->serial_number_string : "(none)", - dev->u.hid.usage_page, dev->u.hid.usage); - } break; - } -} - -int hs_port_open(hs_device *dev, hs_port_mode mode, hs_port **rport) -{ - assert(dev); - assert(rport); - - if (dev->status != HS_DEVICE_STATUS_ONLINE) - return hs_error(HS_ERROR_NOT_FOUND, "Device '%s' is not connected", dev->path); - -#ifdef __APPLE__ - if (dev->type == HS_DEVICE_TYPE_HID) - return _hs_darwin_open_hid_port(dev, mode, rport); -#endif - - return _hs_open_file_port(dev, mode, rport); -} - -void hs_port_close(hs_port *port) -{ - if (!port) - return; - -#ifdef __APPLE__ - if (port->type == HS_DEVICE_TYPE_HID) { - _hs_darwin_close_hid_port(port); - return; - } -#endif - - _hs_close_file_port(port); -} - -hs_device *hs_port_get_device(const hs_port *port) -{ - assert(port); - return port->dev; -} - -hs_handle hs_port_get_poll_handle(const hs_port *port) -{ - assert(port); - -#ifdef __APPLE__ - if (port->type == HS_DEVICE_TYPE_HID) - return _hs_darwin_get_hid_port_poll_handle(port); -#endif - - return _hs_get_file_port_poll_handle(port); -} diff --git a/src/libhs/device.h b/src/libhs/device.h deleted file mode 100644 index e4f3cd27..00000000 --- a/src/libhs/device.h +++ /dev/null @@ -1,250 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef HS_DEVICE_H -#define HS_DEVICE_H - -#include "common.h" -#include "htable.h" - -_HS_BEGIN_C - -/** - * @defgroup device Device handling - * @brief Access device information and open device handles. - */ - -/** - * @ingroup device - * @brief Current device status. - * - * The device status can only change when hs_monitor_refresh() is called. - * - * @sa hs_device - */ -typedef enum hs_device_status { - /** Device is connected and ready. */ - HS_DEVICE_STATUS_ONLINE = 1, - /** Device has been disconnected. */ - HS_DEVICE_STATUS_DISCONNECTED -} hs_device_status; - -/** - * @ingroup device - * @brief Device type. - * - * @sa hs_device - * @sa hs_device_type_strings - */ -typedef enum hs_device_type { - /** HID device. */ - HS_DEVICE_TYPE_HID = 1, - /** Serial device. */ - HS_DEVICE_TYPE_SERIAL -} hs_device_type; - -/** - * @ingroup device - * @brief Device type strings - * - * Use hs_device_type_strings[dev->type] to get a string representation: - * - HS_DEVICE_TYPE_HID = "hid" - * - HS_DEVICE_TYPE_SERIAL = "serial" - * - * @sa hs_device_type - */ -static const char *const hs_device_type_strings[] = { - NULL, - "hid", - "serial" -}; - -/** - * @ingroup device - * @brief The hs_device struct - * - * Members omitted from the list below are reserved for internal use. - */ -struct hs_device { - /** @cond */ - unsigned int refcount; - _hs_htable_head hnode; - char *key; - /** @endcond */ - - /** Device type, see @ref hs_device_type. */ - hs_device_type type; - /** Current device status, see @ref hs_device_status. */ - hs_device_status status; - /** - * @brief Device location. - * - * The location is bus-specific: - * - **USB** = "usb-[-]+" (e.g. "usb-2-5-4") - */ - char *location; - /** - * @brief Get the device node path. - * - * This may not always be a real filesystem path, for example on OS X HID devices cannot be - * used through a device node. - */ - char *path; - /** Device vendor identifier. */ - uint16_t vid; - /** Device product identifier. */ - uint16_t pid; - /** Device bcd. */ - uint16_t bcd_device; - /** Device manufacturer string, or NULL if not available. */ - char *manufacturer_string; - /** Device product string, or NULL if not available. */ - char *product_string; - /** Device serial number string, or NULL if not available. */ - char *serial_number_string; - /** Device interface number. */ - uint8_t iface_number; - - /** Match pointer, copied from udata in @ref hs_match_spec. */ - void *match_udata; - - /** Contains type-specific information, see below. */ - union { - /** Only valid when type == HS_DEVICE_TYPE_HID. */ - struct { - /** Primary usage page value read from the HID report descriptor. */ - uint16_t usage_page; - /** Primary usage value read from the HID report descriptor. */ - uint16_t usage; - - /** Maximum input report size calculated from HID report descriptor. */ - size_t max_input_len; - /** Maximum output report size calculated from HID report descriptor. */ - size_t max_output_len; - /** Maximum feature report size calculated from HID report descriptor. */ - size_t max_feature_len; - -#ifdef __linux__ - /** @cond */ - // Needed to work around a bug on old Linux kernels - bool numbered_reports; - /** @endcond */ -#endif - } hid; - } u; -}; - -/** - * @ingroup device - * @brief Device open mode. - * - * @sa hs_port_open() - */ -typedef enum hs_port_mode { - /** Open device for reading. */ - HS_PORT_MODE_READ = 1, - /** Open device for writing. */ - HS_PORT_MODE_WRITE = 2, - /** Open device for read/write operations. */ - HS_PORT_MODE_RW = 3 -} hs_port_mode; - -/** - * @ingroup device - * @typedef hs_port - * @brief Opaque structure representing a device I/O port. - * - */ -struct hs_port; - -/** - * @{ - * @name Resource management - */ - -/** - * @ingroup device - * @brief Increase the device reference count. - * - * This function is thread-safe. - * - * @param dev Device object. - * @return This function returns the device object, for convenience. - */ -hs_device *hs_device_ref(hs_device *dev); -/** - * @ingroup device - * @brief Decrease the device reference count. - * - * When the reference count reaches 0, the device object is freed. This function is thread-safe. - * - * @param dev Device object. - */ -void hs_device_unref(hs_device *dev); - -/** - * @{ - * @name Handle Functions - */ - -/** - * @ingroup device - * @brief Open a device. - * - * The handle object keeps a refcounted reference to the device object, you are free to drop - * your own reference. - * - * @param dev Device object to open. - * @param mode Open device for read / write or both. - * @param[out] rport Device handle, the value is changed only if the function succeeds. - * @return This function returns 0 on success, or a negative @ref hs_error_code value. - */ -int hs_port_open(hs_device *dev, hs_port_mode mode, hs_port **rport); -/** - * @ingroup device - * @brief Close a device, and free all used resources. - * - * @param port Device handle. - */ -void hs_port_close(hs_port *port); - -/** - * @ingroup device - * @brief Get the device object from which this handle was opened. - * - * @param port Device handle. - * @return Device object. - */ -hs_device *hs_port_get_device(const hs_port *port); -/** - * @ingroup device - * @brief Get a pollable device handle. - * - * @ref hs_handle is a typedef to the platform descriptor type: int on POSIX platforms, - * HANDLE on Windows. - * - * You can use this descriptor with select()/poll() on POSIX platforms and the Wait - * (e.g. WaitForSingleObject()) functions on Windows to know when the device input buffer contains - * data. - * - * Note that this descriptor may not be the real device descriptor on some platforms. For - * HID devices on OSX, this is actually a pipe that gets signalled when IOHIDDevice gives - * libhs a report on the background thread. - * - * @param port Device handle. - * @return This function returns a pollable handle. - * - * @sa hs_handle - */ -hs_handle hs_port_get_poll_handle(const hs_port *port); - -_HS_END_C - -#endif diff --git a/src/libhs/device_posix.c b/src/libhs/device_posix.c deleted file mode 100644 index 4165ad25..00000000 --- a/src/libhs/device_posix.c +++ /dev/null @@ -1,162 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef _WIN32 - -#include "common_priv.h" -#include -#include -#include -#include -#include -#include -#include "device_priv.h" -#include "platform.h" - -int _hs_open_file_port(hs_device *dev, hs_port_mode mode, hs_port **rport) -{ - hs_port *port; -#ifdef __APPLE__ - unsigned int retry = 4; -#endif - int fd_flags; - int r; - - port = (hs_port *)calloc(1, sizeof(*port)); - if (!port) { - r = hs_error(HS_ERROR_MEMORY, NULL); - goto error; - } - port->type = dev->type; - port->u.file.fd = -1; - - port->mode = mode; - port->path = dev->path; - port->dev = hs_device_ref(dev); - - fd_flags = O_CLOEXEC | O_NOCTTY | O_NONBLOCK; - switch (mode) { - case HS_PORT_MODE_READ: { fd_flags |= O_RDONLY; } break; - case HS_PORT_MODE_WRITE: { fd_flags |= O_WRONLY; } break; - case HS_PORT_MODE_RW: { fd_flags |= O_RDWR; } break; - } - -restart: - port->u.file.fd = open(dev->path, fd_flags); - if (port->u.file.fd < 0) { - switch (errno) { - case EINTR: { - goto restart; - } break; - - case EACCES: { - r = hs_error(HS_ERROR_ACCESS, "Permission denied for device '%s'", dev->path); - } break; - case EIO: - case ENXIO: - case ENODEV: { - r = hs_error(HS_ERROR_IO, "I/O error while opening device '%s'", dev->path); - } break; - case ENOENT: - case ENOTDIR: { - r = hs_error(HS_ERROR_NOT_FOUND, "Device '%s' not found", dev->path); - } break; - -#ifdef __APPLE__ - /* On El Capitan (and maybe before), the open fails for some time (around 40 - 50 ms - on my computer) after the device notification. */ - case EBUSY: { - if (retry--) { - usleep(20000); - goto restart; - } - } // fallthrough -#endif - - default: { - r = hs_error(HS_ERROR_SYSTEM, "open('%s') failed: %s", dev->path, strerror(errno)); - } break; - } - goto error; - } - - if (dev->type == HS_DEVICE_TYPE_SERIAL) { - struct termios tio; - int modem_bits; - - r = tcgetattr(port->u.file.fd, &tio); - if (r < 0) { - r = hs_error(HS_ERROR_SYSTEM, "tcgetattr() failed on '%s': %s", dev->path, - strerror(errno)); - goto error; - } - - /* Use raw I/O and sane settings, set DTR by default even on platforms that don't - enforce that. */ - cfmakeraw(&tio); - tio.c_cc[VMIN] = 0; - tio.c_cc[VTIME] = 0; - tio.c_cflag |= CLOCAL | CREAD | HUPCL; - modem_bits = TIOCM_DTR; - - r = tcsetattr(port->u.file.fd, TCSANOW, &tio); - if (r < 0) { - r = hs_error(HS_ERROR_SYSTEM, "tcsetattr() failed on '%s': %s", dev->path, - strerror(errno)); - goto error; - } - r = ioctl(port->u.file.fd, TIOCMBIS, &modem_bits); - if (r < 0) { - r = hs_error(HS_ERROR_SYSTEM, "ioctl(TIOCMBIS, TIOCM_DTR) failed on '%s': %s", - dev->path, strerror(errno)); - goto error; - } - r = tcflush(port->u.file.fd, TCIFLUSH); - if (r < 0) { - r = hs_error(HS_ERROR_SYSTEM, "tcflush(TCIFLUSH) failed on '%s': %s", - dev->path, strerror(errno)); - goto error; - } - } -#ifdef __linux__ - else if (dev->type == HS_DEVICE_TYPE_HID) { - port->u.file.numbered_hid_reports = dev->u.hid.numbered_reports; - } -#endif - - *rport = port; - return 0; - -error: - hs_port_close(port); - return r; -} - -void _hs_close_file_port(hs_port *port) -{ - if (port) { -#ifdef __linux__ - // Only used for hidraw to work around a bug on old kernels - free(port->u.file.read_buf); -#endif - - close(port->u.file.fd); - hs_device_unref(port->dev); - } - - free(port); -} - -hs_handle _hs_get_file_port_poll_handle(const hs_port *port) -{ - return port->u.file.fd; -} - -#endif diff --git a/src/libhs/device_priv.h b/src/libhs/device_priv.h deleted file mode 100644 index 4382c1da..00000000 --- a/src/libhs/device_priv.h +++ /dev/null @@ -1,72 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifndef _HS_DEVICE_PRIV_H -#define _HS_DEVICE_PRIV_H - -#include "common_priv.h" -#include "device.h" - -struct hs_port { - hs_device_type type; - const char *path; - hs_port_mode mode; - hs_device *dev; - - union { -#if defined(_WIN32) - struct { - void *h; // HANDLE - - struct _OVERLAPPED *read_ov; - size_t read_buf_size; - uint8_t *read_buf; - uint8_t *read_ptr; - size_t read_len; - int read_status; - - void *write_event; // HANDLE - } handle; -#else - struct { - int fd; - - #ifdef __linux__ - // Used to work around an old kernel 2.6 (pre-2.6.34) hidraw bug - uint8_t *read_buf; - size_t read_buf_size; - bool numbered_hid_reports; - #endif - } file; - - #ifdef __APPLE__ - struct _hs_hid_darwin *hid; - #endif -#endif - } u; -}; - -void _hs_device_log(const hs_device *dev, const char *verb); - -int _hs_open_file_port(hs_device *dev, hs_port_mode mode, hs_port **rport); -void _hs_close_file_port(hs_port *port); -hs_handle _hs_get_file_port_poll_handle(const hs_port *port); - -#if defined(_WIN32) -void _hs_win32_start_async_read(hs_port *port); -void _hs_win32_finalize_async_read(hs_port *port, int timeout); -ssize_t _hs_win32_write_sync(hs_port *port, const uint8_t *buf, size_t size, int timeout); -#elif defined(__APPLE__) -int _hs_darwin_open_hid_port(hs_device *dev, hs_port_mode mode, hs_port **rport); -void _hs_darwin_close_hid_port(hs_port *port); -hs_handle _hs_darwin_get_hid_port_poll_handle(const hs_port *port); -#endif - -#endif diff --git a/src/libhs/device_win32.c b/src/libhs/device_win32.c deleted file mode 100644 index a670de80..00000000 --- a/src/libhs/device_win32.c +++ /dev/null @@ -1,276 +0,0 @@ -/* libhs - public domain - Niels Martignène - https://koromix.dev/libhs - - This software is in the public domain. Where that dedication is not - recognized, you are granted a perpetual, irrevocable license to copy, - distribute, and modify this file as you see fit. - - See the LICENSE file for more details. */ - -#ifdef _WIN32 - -#include "common_priv.h" -#define WIN32_LEAN_AND_MEAN -#include -#include -#include "device_priv.h" -#include "platform.h" - -#define READ_BUFFER_SIZE 16384 - -int _hs_open_file_port(hs_device *dev, hs_port_mode mode, hs_port **rport) -{ - hs_port *port = NULL; - DWORD access; - int r; - - port = (hs_port *)calloc(1, sizeof(*port)); - if (!port) { - r = hs_error(HS_ERROR_MEMORY, NULL); - goto error; - } - port->type = dev->type; - - port->mode = mode; - port->path = dev->path; - port->dev = hs_device_ref(dev); - - access = UINT32_MAX; - switch (mode) { - case HS_PORT_MODE_READ: { access = GENERIC_READ; } break; - case HS_PORT_MODE_WRITE: { access = GENERIC_WRITE; } break; - case HS_PORT_MODE_RW: { access = GENERIC_READ | GENERIC_WRITE; } break; - } - assert(access != UINT32_MAX); - - port->u.handle.h = CreateFileA(dev->path, access, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - if (port->u.handle.h == INVALID_HANDLE_VALUE) { - switch (GetLastError()) { - case ERROR_FILE_NOT_FOUND: - case ERROR_PATH_NOT_FOUND: { - r = hs_error(HS_ERROR_NOT_FOUND, "Device '%s' not found", dev->path); - } break; - case ERROR_NOT_ENOUGH_MEMORY: - case ERROR_OUTOFMEMORY: { - r = hs_error(HS_ERROR_MEMORY, NULL); - } break; - case ERROR_ACCESS_DENIED: { - r = hs_error(HS_ERROR_ACCESS, "Permission denied for device '%s'", dev->path); - } break; - - default: { - r = hs_error(HS_ERROR_SYSTEM, "CreateFile('%s') failed: %s", dev->path, - hs_win32_strerror(0)); - } break; - } - goto error; - } - - if (dev->type == HS_DEVICE_TYPE_SERIAL) { - DCB dcb; - COMMTIMEOUTS timeouts; - BOOL success; - - dcb.DCBlength = sizeof(dcb); - success = GetCommState(port->u.handle.h, &dcb); - if (!success) { - r = hs_error(HS_ERROR_SYSTEM, "GetCommState() failed on '%s': %s", port->path, - hs_win32_strerror(0)); - goto error; - } - - /* Sane config, inspired by libserialport, and with DTR pin on by default for - consistency with UNIX platforms. */ - dcb.fBinary = TRUE; - dcb.fAbortOnError = FALSE; - dcb.fErrorChar = FALSE; - dcb.fNull = FALSE; - dcb.fDtrControl = DTR_CONTROL_ENABLE; - dcb.fDsrSensitivity = FALSE; - - /* See SERIAL_TIMEOUTS documentation on MSDN, this basically means "Terminate read request - when there is at least one byte available". You still need a total timeout in that mode - so use 0xFFFFFFFE (using 0xFFFFFFFF for all read timeouts is not allowed). Using - WaitCommEvent() instead would probably be a good idea, I'll look into that later. */ - timeouts.ReadIntervalTimeout = ULONG_MAX; - timeouts.ReadTotalTimeoutMultiplier = ULONG_MAX; - timeouts.ReadTotalTimeoutConstant = ULONG_MAX - 1; - timeouts.WriteTotalTimeoutMultiplier = 0; - timeouts.WriteTotalTimeoutConstant = 5000; - - success = SetCommState(port->u.handle.h, &dcb); - if (!success) { - r = hs_error(HS_ERROR_SYSTEM, "SetCommState() failed on '%s': %s", - port->path, hs_win32_strerror(0)); - goto error; - } - success = SetCommTimeouts(port->u.handle.h, &timeouts); - if (!success) { - r = hs_error(HS_ERROR_SYSTEM, "SetCommTimeouts() failed on '%s': %s", - port->path, hs_win32_strerror(0)); - goto error; - } - success = PurgeComm(port->u.handle.h, PURGE_RXCLEAR); - if (!success) { - r = hs_error(HS_ERROR_SYSTEM, "PurgeComm(PURGE_RXCLEAR) failed on '%s': %s", - port->path, hs_win32_strerror(0)); - goto error; - } - } - - if (mode & HS_PORT_MODE_READ) { - port->u.handle.read_ov = (OVERLAPPED *)calloc(1, sizeof(*port->u.handle.read_ov)); - if (!port->u.handle.read_ov) { - r = hs_error(HS_ERROR_MEMORY, NULL); - goto error; - } - - port->u.handle.read_ov->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - if (!port->u.handle.read_ov->hEvent) { - r = hs_error(HS_ERROR_SYSTEM, "CreateEvent() failed: %s", hs_win32_strerror(0)); - goto error; - } - - if (dev->type == HS_DEVICE_TYPE_HID) { - port->u.handle.read_buf_size = dev->u.hid.max_input_len + 1; - } else { - port->u.handle.read_buf_size = READ_BUFFER_SIZE; - } - - if (port->u.handle.read_buf_size) { - port->u.handle.read_buf = (uint8_t *)malloc(port->u.handle.read_buf_size); - if (!port->u.handle.read_buf) { - r = hs_error(HS_ERROR_MEMORY, NULL); - goto error; - } - - _hs_win32_start_async_read(port); - if (port->u.handle.read_status < 0) { - r = port->u.handle.read_status; - goto error; - } - } - } - - if (mode & HS_PORT_MODE_WRITE) { - port->u.handle.write_event = CreateEvent(NULL, TRUE, FALSE, NULL); - if (!port->u.handle.write_event) { - r = hs_error(HS_ERROR_SYSTEM, "CreateEvent() failed: %s", hs_win32_strerror(0)); - goto error; - } - } - - *rport = port; - return 0; - -error: - hs_port_close(port); - return r; -} - -void _hs_close_file_port(hs_port *port) -{ - if (port) { - hs_device_unref(port->dev); - port->dev = NULL; - - if (CancelIoEx(port->u.handle.h, NULL)) - WaitForSingleObject(port->u.handle.read_ov->hEvent, INFINITE); - if (port->u.handle.h) - CloseHandle(port->u.handle.h); - - free(port->u.handle.read_buf); - if (port->u.handle.read_ov && port->u.handle.read_ov->hEvent) - CloseHandle(port->u.handle.read_ov->hEvent); - free(port->u.handle.read_ov); - - if (port->u.handle.write_event) - CloseHandle(port->u.handle.write_event); - } - - free(port); -} - -hs_handle _hs_get_file_port_poll_handle(const hs_port *port) -{ - return port->u.handle.read_ov->hEvent; -} - -// Call only when port->status != 0, otherwise you will leak kernel memory -void _hs_win32_start_async_read(hs_port *port) -{ - DWORD ret; - - ret = (DWORD)ReadFile(port->u.handle.h, port->u.handle.read_buf, - (DWORD)port->u.handle.read_buf_size, NULL, port->u.handle.read_ov); - if (!ret && GetLastError() != ERROR_IO_PENDING) { - CancelIo(port->u.handle.h); - - port->u.handle.read_status = hs_error(HS_ERROR_IO, "I/O error while reading from '%s'", - port->path); - return; - } - - port->u.handle.read_status = 0; -} - -void _hs_win32_finalize_async_read(hs_port *port, int timeout) -{ - DWORD len, ret; - - if (!port->u.handle.read_buf_size) - return; - - if (timeout > 0) - WaitForSingleObject(port->u.handle.read_ov->hEvent, (DWORD)timeout); - ret = (DWORD)GetOverlappedResult(port->u.handle.h, port->u.handle.read_ov, &len, timeout < 0); - if (!ret) { - if (GetLastError() == ERROR_IO_INCOMPLETE) { - port->u.handle.read_status = 0; - return; - } - - port->u.handle.read_status = hs_error(HS_ERROR_IO, "I/O error while reading from '%s'", - port->path); - return; - } - - port->u.handle.read_len = (size_t)len; - port->u.handle.read_ptr = port->u.handle.read_buf; - - port->u.handle.read_status = 1; -} - -ssize_t _hs_win32_write_sync(hs_port *port, const uint8_t *buf, size_t size, int timeout) -{ - OVERLAPPED ov = {0}; - DWORD len; - BOOL success; - - ov.hEvent = port->u.handle.write_event; - success = WriteFile(port->u.handle.h, buf, (DWORD)size, NULL, &ov); - if (!success && GetLastError() != ERROR_IO_PENDING) - return hs_error(HS_ERROR_IO, "I/O error while writing to '%s'", port->path); - - if (timeout > 0) - WaitForSingleObject(ov.hEvent, (DWORD)timeout); - - success = GetOverlappedResult(port->u.handle.h, &ov, &len, timeout < 0); - if (!success) { - if (GetLastError() == ERROR_IO_INCOMPLETE) { - CancelIoEx(port->u.handle.h, &ov); - - success = GetOverlappedResult(port->u.handle.h, &ov, &len, TRUE); - if (!success) - len = 0; - } else { - return hs_error(HS_ERROR_IO, "I/O error while writing to '%s'", port->path); - } - } - - return (ssize_t)len; -} - -#endif diff --git a/src/libhs/doc/Doxyfile b/src/libhs/doc/Doxyfile deleted file mode 100644 index ff5326e1..00000000 --- a/src/libhs/doc/Doxyfile +++ /dev/null @@ -1,2636 +0,0 @@ -# Doxyfile 1.9.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = libhs - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Cross-platform HID and serial library" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:^^" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". Note that you cannot put \n's in the value part of an alias -# to insert newlines (in the resulting output). You can put ^^ in the value part -# of an alias to insert a newline as if a physical newline was in the original -# file. When you need a literal { or } or , in the value part of an alias you -# have to escape them by means of a backslash (\), this can lead to conflicts -# with the commands \{ and \} for these it is advised to use the version @{ and -# @} or use a double escape (\\{ and \\}) - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, -# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. When specifying no_extension you should add -# * to the FILE_PATTERNS. -# -# Note see also the list of default file extension mappings. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = NO - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = YES - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = YES - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use -# during processing. When set to 0 doxygen will based this on the number of -# cores available in the system. You can set it explicitly to a value larger -# than 0 to get more control over the balance between CPU load and processing -# speed. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which effectively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = NO - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If this flag is set to YES, the name of an unnamed parameter in a declaration -# will be determined by the corresponding definition. By default unnamed -# parameters remain unnamed in the output. -# The default value is: YES. - -RESOLVE_UNNAMED_PARAMS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# With the correct setting of option CASE_SENSE_NAMES doxygen will better be -# able to match the capabilities of the underlying filesystem. In case the -# filesystem is case sensitive (i.e. it supports files in the same directory -# whose names only differ in casing), the option must be set to YES to properly -# deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be be set to NO to properly deal with -# output files written for symbols that only differ in casing, such as for two -# classes, one named CLASS and the other named Class, and to also support -# references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and MacOS, users should typically set this option -# to NO, whereas on Linux or other Unix flavors it should typically be set to -# YES. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class -# will show which file needs to be included to use the class. -# The default value is: YES. - -SHOW_HEADERFILE = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = NO - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = NO - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= NO - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = NO - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. See also section "Changing the -# layout of pages" for information. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as documenting some parameters in -# a documented function twice, or documenting parameters that don't exist or -# using markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete -# function parameter documentation. If set to NO, doxygen will accept that some -# parameters have no documentation without warning. -# The default value is: YES. - -WARN_IF_INCOMPLETE_DOC = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong parameter -# documentation, but not about the absence of documentation. If EXTRACT_ALL is -# set to YES then this flag will automatically be disabled. See also -# WARN_IF_INCOMPLETE_DOC -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the doxygen process doxygen will return with a non-zero status. -# Possible values are: NO, YES and FAIL_ON_WARNINGS. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = index.md \ - ../monitor.h \ - ../match.h \ - ../device.h \ - ../hid.h \ - ../serial.h \ - ../common.h \ - ../platform.h - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: -# https://www.gnu.org/software/libiconv/) for the list of possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# Note the list of default checked file patterns might differ from the list of -# default file extension mappings. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, -# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C -# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: -# http://clang.llvm.org/) for more accurate parsing at the cost of reduced -# performance. This can be particularly helpful with template rich C++ code for -# which doxygen's built-in parser lacks the necessary type information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS -# tag is set to YES then doxygen will add the directory of each input to the -# include path. -# The default value is: YES. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_ADD_INC_PATHS = YES - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the directory containing a file called compile_commands.json. This -# file is the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the -# options used when the source files were built. This is equivalent to -# specifying the -p option to a clang tool, such as clang-check. These options -# will then be passed to the parser. Any options specified with CLANG_OPTIONS -# will be added as well. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = NO - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = pages - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a color-wheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use gray-scales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: -# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, doxygen will generate a Makefile in the HTML -# output directory. Running make will produce the docset in that directory and -# running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# on Windows. In the beginning of 2021 Microsoft took the original page, with -# a.o. the download links, offline the HTML help workshop was already many years -# in maintenance mode). You can download the HTML help workshop from the web -# archives at Installation executable (see: -# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo -# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to -# run qhelpgenerator on the generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = YES - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine tune the look of the index (see "Fine-tuning the output"). As an -# example, the default style sheet generated by doxygen has an example that -# shows how to put an image at the root of the tree instead of the PROJECT_NAME. -# Since the tree basically has the same information as the tab index, you could -# consider setting DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the -# FULL_SIDEBAR option determines if the side bar is limited to only the treeview -# area (value NO) or if it should extend to the full height of the window (value -# YES). Setting this to YES gives a layout similar to -# https://docs.readthedocs.io with more room for contents, but less room for the -# project logo, title, and description. If either GENERATOR_TREEVIEW or -# DISABLE_INDEX is set to NO, this option has no effect. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FULL_SIDEBAR = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. -# Note that the different versions of MathJax have different requirements with -# regards to the different settings, so it is possible that also other MathJax -# settings have to be changed when switching between the different MathJax -# versions. -# Possible values are: MathJax_2 and MathJax_3. -# The default value is: MathJax_2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_VERSION = MathJax_2 - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. For more details about the output format see MathJax -# version 2 (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 -# (see: -# http://docs.mathjax.org/en/latest/web/components/output.html). -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility. This is the name for Mathjax version 2, for MathJax version 3 -# this will be translated into chtml), NativeMML (i.e. MathML. Only supported -# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This -# is the name for Mathjax version 3, for MathJax version 2 this will be -# translated into HTML-CSS) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. The default value is: -# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 -# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# for MathJax version 2 (see -# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# For example for MathJax version 3 (see -# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): -# MATHJAX_EXTENSIONS = ams -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /