diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 1357ee7512..0000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,237 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -enable_testing() - -project(scopy VERSION 2.0.0 LANGUAGES CXX) -set(SCOPY_VERSION ${PROJECT_VERSION}) - -# set CMAKE_BUILD_TYPE if not set externally -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Default build type: RelWithDebInfo" FORCE) -endif() - -# Make sure our local CMake Modules path comes first -list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake/Modules) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -add_compile_definitions(QT_MESSAGELOGCONTEXT) - -include(GNUInstallDirs) - -find_package(QT NAMES Qt5 REQUIRED COMPONENTS Widgets) -find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools) - -if(Qt5Widgets_VERSION VERSION_LESS 5.15.2) - message(FATAL_ERROR "Minimum supported Qt 5.15.2") - return() -else() - message(STATUS "Using Qt version: " ${Qt5Widgets_VERSION}) -endif() - -# message(QtVersion: ${QT_VERSION_MAJOR}:${QT_VERSION_MINOR}) - -file(GLOB SRC_LIST *.cpp *.cc) -file(GLOB HEADER_LIST *.h *.hpp) -file(GLOB UI_LIST *.ui) - -set(PROJECT_SOURCES ${SRC_LIST} ${HEADER_LIST} ${UI_LIST}) - -include(ScopyAbout) -configure_about(./resources/about) -file(GLOB SCOPY_RESOURCE_FILES gui/res/resources.qrc resources/aboutpage.qrc) -find_file(SCOPY_ICON_ICO icon.ico PATHS ${CMAKE_SOURCE_DIR}/gui/res) -message(STATUS "SCOPY_RESOURCE_FILES: " ${SCOPY_RESOURCE_FILES}) - -option(ENABLE_TRANSLATION "Enable translation" ON) -include(ScopyTranslation) - -if(ENABLE_TRANSLATION) - generate_translations() - qt_add_resources(SCOPY_RESOURCES ${CMAKE_BINARY_DIR}/translations.qrc) -endif() - -if(DEFINED ENV{APPIMAGE}) - add_compile_definitions(__appimage__) -endif() - -qt_add_resources(SCOPY_RESOURCES ${SCOPY_RESOURCE_FILES}) - -if(WIN32) - # Set .exe properties - string(REPLACE "." "," SCOPY_FILEVERSION ${PROJECT_VERSION}) - set(SCOPY_PRODUCTVERSION_STR ${PROJECT_VERSION}) - string(TIMESTAMP BUILD_YEAR "%Y") - set(SCOPY_WIN32_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/resources/properties.rc) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/properties.rc.cmakein ${SCOPY_WIN32_RESOURCES} @ONLY) -endif() - -find_path( - IIO_INCLUDE_DIRS - NAMES iio.h - HINTS ${CMAKE_INSTALL_PREFIX}/include - /include - /usr/include - /usr/local/include - /opt/local/include - REQUIRED -) - -find_library( - IIO_LIBRARIES - NAMES iio libiio - HINTS ${CMAKE_INSTALL_PREFIX}/lib - /usr/lib - /usr/lib64 - /usr/local/lib - /usr/local/lib64 - /opt/local/lib - /opt/local/lib64 - REQUIRED -) -message("IIO LIBRARIES: " ${IIO_LIBRARIES}) - -set(SCOPY_DLL_BUILD_PATH ${CMAKE_BINARY_DIR}) -set(SCOPY_DLL_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}) -set(SCOPY_PLUGIN_BUILD_PATH ${CMAKE_BINARY_DIR}/plugins/plugins) -set(SCOPY_PLUGIN_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/scopy/plugins) -set(SCOPY_TRANSLATION_BUILD_PATH ${CMAKE_CURRENT_BINARY_DIR}/translations) -set(SCOPY_TRANSLATION_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/scopy/translations) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCOPY_DLL_BUILD_PATH}) -elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Scopy.app/Contents/Frameworks") -else() - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCOPY_DLL_BUILD_PATH}) -endif() - -option(ENABLE_TESTING "Enable unit tests" ON) -if(ENABLE_TESTING) - message(STATUS "Unit tests enabled") - add_subdirectory(tests) -endif() - -option(ENABLE_APPLICATION_BUNDLE "Enable application bundle for OSX" OFF) -if(APPLE) - set(ENABLE_APPLICATION_BUNDLE ON) - include(ScopyMacOS) -endif(APPLE) - -add_subdirectory(common) -add_subdirectory(iioutil) -add_subdirectory(gui) -add_subdirectory(gr-util) -add_subdirectory(pluginbase) -add_subdirectory(core) -add_subdirectory(plugins) -add_subdirectory(iio-widgets) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Scopy.app/Contents/MacOS") -endif() - -set(SCOPY_DEPENDENCIES ${IIO_LIBRARIES}) - -if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) - qt_add_executable( - ${PROJECT_NAME} - MANUAL_FINALIZATION - ${PROJECT_SOURCES} - ${SCOPY_RESOURCES} - ${SCOPY_DEPENDENCIES} - ${SCOPY_WIN32_RESOURCES} - ) - # Define target properties for Android with Qt 6 as: set_property(TARGET tool_launcher APPEND PROPERTY - # QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android) For more information, see - # https://doc.qt.io/qt-6/qt-add-executable.html#target-creation -else() - if(ANDROID) - add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCES} ${SCOPY_RESOURCES} ${SCOPY_DEPENDENCIES}) - # Define properties for Android with Qt 5 after find_package() calls as: set(ANDROID_PACKAGE_SOURCE_DIR - # "${CMAKE_CURRENT_SOURCE_DIR}/android") - else() - add_executable( - ${PROJECT_NAME} WIN32 - ${OSX_BUNDLE} - ${PROJECT_SOURCES} - ${SCOPY_RESOURCES} - ${SCOPY_DEPENDENCIES} - ${EXTRA_BUNDLE_FILES} - ${SCOPY_WIN32_RESOURCES} - ) - endif() -endif() - -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_constexpr OUT_CONSTEXPR) -add_definitions(-DQT_NO_KEYWORDS) - -set(CMAKE_VERBOSE_MAKEFILE ON) -target_include_directories(${PROJECT_NAME} PUBLIC scopy-gui scopy-core) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets ${SCOPY_DEPENDENCIES} scopy-core scopy-gui) - -# Compiler options -target_compile_options(${PROJECT_NAME} PUBLIC -Wall) - -# List of warnings to be treated as errors -target_compile_options( - ${PROJECT_NAME} PUBLIC -Werror=return-type -Werror=uninitialized -Werror=init-self -Werror=switch -) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/apple/Info.plist.cmakein ${CMAKE_CURRENT_BINARY_DIR}/Info.plist COPYONLY) -set_target_properties( - ${PROJECT_NAME} - PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER scopy - MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} - MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} - MACOSX_BUNDLE TRUE - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist - WIN32_EXECUTABLE TRUE - ENABLE_EXPORTS ON # equiv to -rdynamic -) - -if(ENABLE_APPLICATION_BUNDLE OR ${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME Scopy) -endif() - -configure_file(resources/qt.conf.cmakein ${CMAKE_CURRENT_BINARY_DIR}/qt.conf COPYONLY) -configure_file(resources/scopy.desktop.cmakein ${CMAKE_CURRENT_BINARY_DIR}/scopy.desktop @ONLY) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/scopy.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gui/res/icon_small.svg - DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps RENAME scopy.svg - ) -endif() -if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - include(ScopyWindows) - duplicate_target(${PROJECT_NAME} Scopy-console) - set_target_properties(Scopy-console PROPERTIES WIN32_EXECUTABLE FALSE) -endif() -if(NOT ENABLE_APPLICATION_BUNDLE) - install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) -endif() - -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/translations DESTINATION ${SCOPY_TRANSLATION_INSTALL_PATH}) -install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}) - -if(QT_VERSION_MAJOR EQUAL 6) - qt_finalize_executable(${PROJECT_NAME}) -endif() - -# make uninstall -add_custom_target("uninstall" COMMENT "Uninstall installed files") -add_custom_command( - TARGET "uninstall" - POST_BUILD - COMMENT "Uninstall files with install_manifest.txt" - COMMAND xargs rm -vf < install_manifest.txt || echo Nothing in install_manifest.txt to be uninstalled! -) diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9cecc1d466..0000000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/README.md b/README.md deleted file mode 100644 index 8d5901f500..0000000000 --- a/README.md +++ /dev/null @@ -1,19 +0,0 @@ -[![Mingw build](https://github.com/analogdevicesinc/scopy/actions/workflows/mingwbuild.yml/badge.svg?branch=master)](https://github.com/analogdevicesinc/scopy/actions/workflows/mingwbuild.yml?query=branch%3Amaster+) -[![Flatpak build](https://github.com/analogdevicesinc/scopy/actions/workflows/linuxflatpakbuild.yml/badge.svg?branch=master)](https://github.com/analogdevicesinc/scopy/actions/workflows/linuxflatpakbuild.yml?query=branch%3Amaster+) -[![MacOs status](https://dev.azure.com/AnalogDevices/M2k/_apis/build/status/analogdevicesinc.scopy?branchName=master)](https://dev.azure.com/AnalogDevices/M2k/_build/latest?definitionId=25&branchName=master) -[![Android build](https://github.com/analogdevicesinc/scopy/actions/workflows/androidbuild.yml/badge.svg?branch=master)](https://github.com/analogdevicesinc/scopy/actions/workflows/androidbuild.yml?query=branch%3Amaster+) -[![Ubuntu build](https://github.com/analogdevicesinc/scopy/actions/workflows/clangtidy.yml/badge.svg?branch=master)](https://github.com/analogdevicesinc/scopy/actions/workflows/clangtidy.yml?query=branch%3Amaster+) - -# Scopy [![GitHub Release](https://img.shields.io/github/release/analogdevicesinc/scopy.svg)](https://github.com/analogdevicesinc/scopy/releases/latest) [![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://github.com/analogdevicesinc/scopy/blob/update-readme/LICENSE) -Scopy is a software oscilloscope and signal analysis toolset. - -## Builds -Nightly builds are available under the [Continuous build](https://github.com/analogdevicesinc/scopy/releases/tag/continous) tag. - -### Supported platforms -- Windows (x86-64) -- Linux flatpak (x86-64, arm32) -- MacOs (x86-64) -- Android (aarch64) - -Complete instalation and usage instructions can be found on our [Wiki](https://wiki.analog.com/university/tools/m2k/scopy) page. diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml deleted file mode 100644 index 49040b53aa..0000000000 --- a/android/AndroidManifest.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/assets/README.MD b/android/assets/README.MD deleted file mode 100644 index ab10509ffc..0000000000 --- a/android/assets/README.MD +++ /dev/null @@ -1,9 +0,0 @@ -To have a correct deploy, this should look something like: - -assets - - libsigrokdecode - | - decoders - | | - - - python3.8 - | - - - iio-emu (wip) diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index fded106b17..0000000000 --- a/android/gradle.properties +++ /dev/null @@ -1,11 +0,0 @@ -# Project-wide Gradle settings. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m - -# Gradle caching allows reusing the build artifacts from a previous -# build with the same inputs. However, over time, the cache size will -# grow. Uncomment the following line to enable it. -#org.gradle.caching=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index f6b961fd5a..0000000000 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 412dfb395f..0000000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -#distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew deleted file mode 100755 index cccdd3d517..0000000000 --- a/android/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat deleted file mode 100644 index f9553162f1..0000000000 --- a/android/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/android/res/drawable-hdpi/icon.png b/android/res/drawable-hdpi/icon.png deleted file mode 100644 index 3ae98caf6b..0000000000 Binary files a/android/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/android/res/drawable-hdpi/logo.png b/android/res/drawable-hdpi/logo.png deleted file mode 100644 index 119fc5b33d..0000000000 Binary files a/android/res/drawable-hdpi/logo.png and /dev/null differ diff --git a/android/res/drawable-hdpi/logo_land.png b/android/res/drawable-hdpi/logo_land.png deleted file mode 100644 index 119fc5b33d..0000000000 Binary files a/android/res/drawable-hdpi/logo_land.png and /dev/null differ diff --git a/android/res/drawable-hdpi/logo_port.png b/android/res/drawable-hdpi/logo_port.png deleted file mode 100644 index 119fc5b33d..0000000000 Binary files a/android/res/drawable-hdpi/logo_port.png and /dev/null differ diff --git a/android/res/drawable-ldpi/icon.png b/android/res/drawable-ldpi/icon.png deleted file mode 100644 index 5bf398f9bd..0000000000 Binary files a/android/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/android/res/drawable-ldpi/logo.png b/android/res/drawable-ldpi/logo.png deleted file mode 100644 index 4a2cd30e9e..0000000000 Binary files a/android/res/drawable-ldpi/logo.png and /dev/null differ diff --git a/android/res/drawable-ldpi/logo_land.png b/android/res/drawable-ldpi/logo_land.png deleted file mode 100644 index 4a2cd30e9e..0000000000 Binary files a/android/res/drawable-ldpi/logo_land.png and /dev/null differ diff --git a/android/res/drawable-ldpi/logo_port.png b/android/res/drawable-ldpi/logo_port.png deleted file mode 100644 index 4a2cd30e9e..0000000000 Binary files a/android/res/drawable-ldpi/logo_port.png and /dev/null differ diff --git a/android/res/drawable-mdpi/icon.png b/android/res/drawable-mdpi/icon.png deleted file mode 100644 index 4d36b946a4..0000000000 Binary files a/android/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/android/res/drawable-mdpi/logo.png b/android/res/drawable-mdpi/logo.png deleted file mode 100644 index bc60acaa50..0000000000 Binary files a/android/res/drawable-mdpi/logo.png and /dev/null differ diff --git a/android/res/drawable-mdpi/logo_land.png b/android/res/drawable-mdpi/logo_land.png deleted file mode 100644 index bc60acaa50..0000000000 Binary files a/android/res/drawable-mdpi/logo_land.png and /dev/null differ diff --git a/android/res/drawable-mdpi/logo_port.png b/android/res/drawable-mdpi/logo_port.png deleted file mode 100644 index bc60acaa50..0000000000 Binary files a/android/res/drawable-mdpi/logo_port.png and /dev/null differ diff --git a/android/res/drawable-xhdpi/icon.png b/android/res/drawable-xhdpi/icon.png deleted file mode 100644 index e64f3bad1a..0000000000 Binary files a/android/res/drawable-xhdpi/icon.png and /dev/null differ diff --git a/android/res/drawable-xhdpi/logo.png b/android/res/drawable-xhdpi/logo.png deleted file mode 100644 index a0d35d63db..0000000000 Binary files a/android/res/drawable-xhdpi/logo.png and /dev/null differ diff --git a/android/res/drawable-xhdpi/logo_land.png b/android/res/drawable-xhdpi/logo_land.png deleted file mode 100644 index a0d35d63db..0000000000 Binary files a/android/res/drawable-xhdpi/logo_land.png and /dev/null differ diff --git a/android/res/drawable-xhdpi/logo_port.png b/android/res/drawable-xhdpi/logo_port.png deleted file mode 100644 index a0d35d63db..0000000000 Binary files a/android/res/drawable-xhdpi/logo_port.png and /dev/null differ diff --git a/android/res/drawable-xxhdpi/icon.png b/android/res/drawable-xxhdpi/icon.png deleted file mode 100644 index 1a83ad1c54..0000000000 Binary files a/android/res/drawable-xxhdpi/icon.png and /dev/null differ diff --git a/android/res/drawable-xxhdpi/logo.png b/android/res/drawable-xxhdpi/logo.png deleted file mode 100644 index e3f8b02a58..0000000000 Binary files a/android/res/drawable-xxhdpi/logo.png and /dev/null differ diff --git a/android/res/drawable-xxhdpi/logo_land.png b/android/res/drawable-xxhdpi/logo_land.png deleted file mode 100644 index e3f8b02a58..0000000000 Binary files a/android/res/drawable-xxhdpi/logo_land.png and /dev/null differ diff --git a/android/res/drawable-xxhdpi/logo_port.png b/android/res/drawable-xxhdpi/logo_port.png deleted file mode 100644 index e3f8b02a58..0000000000 Binary files a/android/res/drawable-xxhdpi/logo_port.png and /dev/null differ diff --git a/android/res/drawable-xxxhdpi/icon.png b/android/res/drawable-xxxhdpi/icon.png deleted file mode 100644 index fc73a6f117..0000000000 Binary files a/android/res/drawable-xxxhdpi/icon.png and /dev/null differ diff --git a/android/res/drawable-xxxhdpi/logo.png b/android/res/drawable-xxxhdpi/logo.png deleted file mode 100644 index 3545c6ce89..0000000000 Binary files a/android/res/drawable-xxxhdpi/logo.png and /dev/null differ diff --git a/android/res/drawable-xxxhdpi/logo_land.png b/android/res/drawable-xxxhdpi/logo_land.png deleted file mode 100644 index 3545c6ce89..0000000000 Binary files a/android/res/drawable-xxxhdpi/logo_land.png and /dev/null differ diff --git a/android/res/drawable-xxxhdpi/logo_port.png b/android/res/drawable-xxxhdpi/logo_port.png deleted file mode 100644 index 3545c6ce89..0000000000 Binary files a/android/res/drawable-xxxhdpi/logo_port.png and /dev/null differ diff --git a/android/res/drawable/splashscreen.xml b/android/res/drawable/splashscreen.xml deleted file mode 100644 index 405a7fae44..0000000000 --- a/android/res/drawable/splashscreen.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/android/res/drawable/splashscreen_land.xml b/android/res/drawable/splashscreen_land.xml deleted file mode 100644 index 0a0b3e8e18..0000000000 --- a/android/res/drawable/splashscreen_land.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/android/res/drawable/splashscreen_port.xml b/android/res/drawable/splashscreen_port.xml deleted file mode 100644 index 25fe888676..0000000000 --- a/android/res/drawable/splashscreen_port.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/android/res/values-land/splashscreentheme.xml b/android/res/values-land/splashscreentheme.xml deleted file mode 100644 index 800b923fc9..0000000000 --- a/android/res/values-land/splashscreentheme.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/android/res/values-port/splashscreentheme.xml b/android/res/values-port/splashscreentheme.xml deleted file mode 100644 index a20302e451..0000000000 --- a/android/res/values-port/splashscreentheme.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/android/res/values/libs.xml b/android/res/values/libs.xml deleted file mode 100644 index 6b1a4a2a02..0000000000 --- a/android/res/values/libs.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - https://download.qt.io/ministro/android/qt5/qt-5.14 - - - - - - - - - - - - - - - - - diff --git a/android/res/values/splashscreentheme.xml b/android/res/values/splashscreentheme.xml deleted file mode 100644 index 53b3673d83..0000000000 --- a/android/res/values/splashscreentheme.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/android/res/xml/device_filter.xml b/android/res/xml/device_filter.xml deleted file mode 100644 index e30fe0e84b..0000000000 --- a/android/res/xml/device_filter.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/android/src/org/adi/scopy/ScopyActivity.java b/android/src/org/adi/scopy/ScopyActivity.java deleted file mode 100644 index f12d3f964f..0000000000 --- a/android/src/org/adi/scopy/ScopyActivity.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2021 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package org.adi.scopy; - -import java.io.File; -import java.io.IOException; -import org.qtproject.qt5.android.bindings.QtActivity; -import android.content.pm.PackageManager; -import android.content.Intent; -import android.content.Context; -import android.content.ComponentName; -import android.os.Bundle; -import android.util.DisplayMetrics; -import android.view.WindowManager; - -import android.app.Notification; -import android.app.NotificationManager; -import android.app.NotificationChannel; -import android.app.PendingIntent; - -import android.widget.RemoteViews; -import android.widget.Toast; - -import android.os.PowerManager; -import android.os.PowerManager.WakeLock; - - -//import androidx.core.app.NotificationCompat; - - -public class ScopyActivity extends QtActivity -{ - public static native void saveSessionJavaHelper(); - public static native void saveAndStopRunningToolsJNI(); - public static native void saveAndStopRunningInputToolsJNI(); - public static native void restoreRunningToolsJNI(); - public static native int nrOfToolsSavedJNI(); - public static native int nrOfToolsRunningJNI(); - public static native boolean hasCtxJNI(); - private static final int SCOPY_WAKELOCK_NOTIFICATION_ID = 1; - private static final String SCOPY_NOTIFICATION_CHANNEL_ID = "scopy"; - boolean initialized; - private WakeLock wakeLock; - - - private void createNotificationChannel() { - // Create the NotificationChannel, but only on API 26+ because - // the NotificationChannel class is new and not in the support library - - CharSequence name = "Scopy notifications"; - String description = "Various messages from Scopy"; - int importance = NotificationManager.IMPORTANCE_DEFAULT; - NotificationChannel scopyNotificationChannel = new NotificationChannel(SCOPY_NOTIFICATION_CHANNEL_ID, name, importance); - scopyNotificationChannel.setDescription(description); - // Register the channel with the system; you can't change the importance - // or other notification behaviors after this - NotificationManager notificationManager = getSystemService(NotificationManager.class); - notificationManager.createNotificationChannel(scopyNotificationChannel); - - } - - public void createNotification(String message) - { - NotificationManager notificationManager = (NotificationManager) getSystemService(NotificationManager.class); - createNotificationChannel(); - - Intent notificationIntent = new Intent(this, ScopyActivity.class); - notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); - - PendingIntent openAppOnTapIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); - - Notification notification = new Notification.Builder(this,SCOPY_NOTIFICATION_CHANNEL_ID) - .setSmallIcon(R.drawable.icon) - .setContentText(message) - .setPriority(Notification.PRIORITY_DEFAULT) - .setContentIntent(openAppOnTapIntent) - .setOngoing(true) - .build(); - - notificationManager.notify(SCOPY_WAKELOCK_NOTIFICATION_ID, notification); - } - - @Override - public void onCreate(Bundle savedInstanceState) - { - System.out.println("-- ScopyActivity: onCreate"); - initialized = false; - super.onCreate(savedInstanceState); - getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE); - wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, - "Scopy::ScopyWakelockTag"); - - } - - @Override - protected void onStart() - { - System.out.println("-- ScopyActivity: onStart"); - super.onStart(); - if(initialized) { - restoreRunningToolsJNI(); - } - } - - @Override - protected void onStop() - { - System.out.println("-- ScopyActivity: onStop"); - if (initialized) { - if (hasCtxJNI()) { - saveAndStopRunningInputToolsJNI(); - if (nrOfToolsRunningJNI() != 0) { - System.out.println("-- Creating Notification"); - wakeLock.acquire(); - createNotification("Scopy is still running in the background. Device outputs are still enabled."); - } - } - } - super.onStop(); - } - - @Override - protected void onResume() - { - cancelNotification(SCOPY_WAKELOCK_NOTIFICATION_ID); - if (wakeLock.isHeld()) { - wakeLock.release(); - } - - super.onResume(); - } - - protected void onPause(){ - System.out.println("-- ScopyActivity: onPause - saving application state to ini file "); - if (initialized) { - saveSessionJavaHelper(); // actually save the data - } - - super.onPause(); - } - - protected void onDestroy(){ - System.out.println("-- ScopyActivity: onDestroy "); - cancelNotification(SCOPY_WAKELOCK_NOTIFICATION_ID); - if (wakeLock.isHeld()) { - wakeLock.release(); - } - if(initialized) { - saveAndStopRunningToolsJNI(); - } - - super.onDestroy(); - } - - public void restart() { - saveSessionJavaHelper(); - System.out.println("-- ScopyActivity: Restarting "); - Context context = getApplicationContext(); - PackageManager packageManager = context.getPackageManager(); - Intent intent = packageManager.getLaunchIntentForPackage(context.getPackageName()); - ComponentName componentName = intent.getComponent(); - Intent mainIntent = Intent.makeRestartActivityTask(componentName); - context.startActivity(mainIntent); - Runtime.getRuntime().exit(0); - } - - public String getScaleFactor() { - initialized = true; - DisplayMetrics displayMetrics = new DisplayMetrics(); - getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); - - double scaleFactor = ((double)displayMetrics.widthPixels/displayMetrics.heightPixels) - /displayMetrics.scaledDensity; - String formattedScaleFactor = String.format("%.02f", scaleFactor); - System.out.println("-- ScopyActivity: scale factor is: " + formattedScaleFactor); - - - return formattedScaleFactor.replace(",","."); - } - - private void cancelNotification(int id){ - NotificationManager nMgr = (NotificationManager) this.getSystemService(NotificationManager.class); - nMgr.cancel(id); - } -} diff --git a/android/src/org/adi/scopy/ScopyApplication.java b/android/src/org/adi/scopy/ScopyApplication.java deleted file mode 100644 index 3679319e18..0000000000 --- a/android/src/org/adi/scopy/ScopyApplication.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2021 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package org.adi.scopy; - -import org.qtproject.qt5.android.bindings.QtApplication; - -import java.io.File; -import java.io.IOException; -import android.system.Os; -import android.system.ErrnoException; - - -public class ScopyApplication extends QtApplication -{ - @Override - public void onCreate() - { - System.out.println("QtApplication started"); - String apk = getApplicationInfo().sourceDir; - String cache = getApplicationContext().getCacheDir().toString(); - System.out.println("sourcedir: "+ getApplicationInfo().sourceDir); - System.out.println("public sourcedir: "+ getApplicationInfo().publicSourceDir); - String libdir = getApplicationInfo().nativeLibraryDir; - System.out.println("native library dir:" + libdir); - System.out.println("applcation cache dir:" + cache); - System.out.println("Hello Scopy !"); - - try { - Os.setenv("PYTHONHOME",".",true); - Os.setenv("PYTHONPATH",apk + "/assets/python3.8",true); - Os.setenv("SIGROKDECODE_DIR", apk + "/assets/libsigrokdecode/decoders",true); - Os.setenv("APPDATA", cache, true); - Os.setenv("LD_LIBRARY_PATH", libdir, true); - Os.setenv("IIOEMU_BIN", libdir+"/iio-emu.so", true); - - } - - catch(ErrnoException x) { - System.out.println("Cannot set envvars"); - } - - super.onCreate(); - } - -} diff --git a/android/src/org/qtproject/example/jnimessenger/JniMessenger.java b/android/src/org/qtproject/example/jnimessenger/JniMessenger.java deleted file mode 100644 index 750a643568..0000000000 --- a/android/src/org/qtproject/example/jnimessenger/JniMessenger.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.qtproject.example.jnimessenger; -import android.content.Context; -import android.hardware.usb.UsbManager; -import android.hardware.usb.UsbDevice; -import android.hardware.usb.UsbDeviceConnection; -import android.content.IntentFilter; -import android.app.PendingIntent; -import android.content.pm.PackageManager; -import android.content.Intent; -import android.content.BroadcastReceiver; -import android.os.ParcelFileDescriptor; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileDescriptor; -import android.util.Log; -import java.util.HashMap; -import java.util.Iterator; - - -public class JniMessenger -{ - - -private static final String ACTION_USB_PERMISSION = - "com.android.example.USB_PERMISSION"; -private static final String TAG = "MyActivity"; - -private final BroadcastReceiver usbReceiver = new BroadcastReceiver() { - - public void onReceive(Context context, Intent intent) { - String action = intent.getAction(); - if (ACTION_USB_PERMISSION.equals(action)) { - synchronized (this) { - UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); - - if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) { - if(device != null){ - //call method to set up device communication - } - } - else { - Log.d(TAG, "permission denied for device " + device); - } - } - } - if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(action)) { - UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); - if (device != null) { - // call your method that cleans up and closes communication with the device - } - } - } -}; - - private static native void callFromJava(String message); - - public JniMessenger() {} - - public static void printFromJava(String message) - { - System.out.println("This is printed from JAVA, message is: " + message); - callFromJava("Hello from JAVA!"); - } - - - UsbDeviceConnection connection; - UsbDevice device; - - public int getUsbFd(Context ctx) { - - UsbManager manager = (UsbManager) ctx.getSystemService(Context.USB_SERVICE); - - PendingIntent permissionIntent = PendingIntent.getBroadcast(ctx, 0, new Intent(ACTION_USB_PERMISSION), 0); - IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION); - ctx.registerReceiver(usbReceiver, filter); - - HashMap deviceList = manager.getDeviceList(); - Iterator deviceIterator = deviceList.values().iterator(); - System.out.println("Devices found " + Integer.toString(deviceList.size())); - while(deviceIterator.hasNext()){ - device = deviceIterator.next(); - System.out.println("Device " + device.getDeviceName()); - manager.requestPermission(device, permissionIntent); - - // if(ContextCompat.checkSelfPermission(ACTION_USB_PERMISSION) == PackageManager.PERMISSION_GRANTED) { - try { - connection = manager.openDevice(device); - - - String fd = Integer.toString(connection.getFileDescriptor()); - String usbfsPath = device.getDeviceName(); - String serial = device.getSerialNumber(); - String man = device.getManufacturerName(); - String pn = device.getProductName(); - String vid = Integer.toString(device.getVendorId(),16); - String pid = Integer.toString(device.getProductId(),16); - - System.out.println("fd: " + fd + "\nusbfs: "+usbfsPath+"\nserial: "+serial+"\nvid: "+vid+" pid: "+ pid + "\nManufacturer: "+ man + "\nProduct Name: "+ pn); - return connection.getFileDescriptor(); - }catch(Exception e) {System.out.println(e);} - - //} - } - return -1; - } - - public String getUsbFs() { - return device.getDeviceName(); - } - - -}; - diff --git a/apple/Info.plist.cmakein b/apple/Info.plist.cmakein deleted file mode 100644 index 812dc6da9d..0000000000 --- a/apple/Info.plist.cmakein +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Scopy - CFBundleGetInfoString - @VERSION@, Copyright 2016 Analog Devices Inc. - CFBundleIconFile - Scopy.icns - CFBundleIdentifier - org.adi.Scopy - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - APPL - CFBundleShortVersionString - @VERSION@ - CFBundleSignature - Scopy - CFBundleVersion - @PROJECT_VERSION@ - NSHumanReadableCopyright - Copyright 2016 Analog Devices Inc., GNU GPLv3+. - NSPrincipalClass - NSApplication - NSHighResolutionCapable - - LSMinimumSystemVersion - 10.6 - - diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ff51afc533..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,99 +0,0 @@ -variables: - QT_FORMULAE: qt@5 - REPO_SLUG: $(Build.Repository.Name) - CURRENT_COMMIT: $(Build.SourceVersion) - -trigger: - branches: - include: - - main - - master - - dev - - scopy2-ci-macOS - - ci-* - tags: - include: - - v* - -pr: - branches: - include: - - main - - master - - dev - - ci-* - -stages: -- stage: Builds - jobs: - - job: macOSBuilds - strategy: - matrix: - macOS_12: - vmImage: 'macOS-12' - artifactName: 'macOS-12' - macOS_13: - vmImage: 'macOS-13' - artifactName: 'macOS-13' - macOS_14: - vmImage: 'macOS-14' - artifactName: 'macOS-14' - pool: - vmImage: $[ variables['vmImage'] ] - steps: - - checkout: self - fetchDepth: 1 - clean: true - - script: ./ci/macOS/install_macos_deps.sh - displayName: 'Build and Install Dependencies' - workingDirectory: $(Build.Repository.LocalPath) - - script: | - export BUILD_HOST="$(vmImage)" - export ACCOUNT_NAME=`echo $REPO_SLUG | awk -F "/" '{print $1}'` - export PROJECT_NAME=`echo $REPO_SLUG | awk -F "/" '{print $2}'` - export USERNAME="azure-pipelines" - export BUILD_REPO_URL=$(Build.Repository.Uri) - export RUN_ID=$(Build.BuildId) - export RUN_NUMBER=$(Build.BuildNumber) - export JOB_ID=$(System.JobId) - export JOB_NAME=$(System.JobName) - export RUNNER_ARCH=$(Agent.OSArchitecture) - export MACOSX_DEPLOYMENT_TARGET=11.0 - ./ci/macOS/build_azure_macos.sh - displayName: 'Build Scopy' - workingDirectory: $(Build.Repository.LocalPath) - - script: ./ci/macOS/package_darwin.sh - displayName: 'Create Scopy.dmg' - workingDirectory: $(Build.Repository.LocalPath) - - script: cp -R staging ${BUILD_ARTIFACTSTAGINGDIRECTORY} - displayName: 'Copy Staging Dir' - workingDirectory: $(Build.Repository.LocalPath) - - script: | - echo "ACCOUNT_NAME = " ${ACCOUNT_NAME} - echo "PROJECT_NAME = " ${PROJECT_NAME} - MACOS_VERSION=$(/usr/libexec/PlistBuddy -c "Print:ProductVersion" /System/Library/CoreServices/SystemVersion.plist) - DEPLOY_FILE=Scopy-macos${MACOS_VERSION}-${CURRENT_COMMIT:0:7}.dmg - cp build/ScopyApp.zip ${BUILD_ARTIFACTSTAGINGDIRECTORY} - cp build/Scopy.dmg ${BUILD_ARTIFACTSTAGINGDIRECTORY}/${DEPLOY_FILE} - cd ${BUILD_ARTIFACTSTAGINGDIRECTORY} - tar czvf Scopy-macos${MACOS_VERSION}.tar.gz ${DEPLOY_FILE} - ls -la - displayName: 'Rename and copy artifact' - workingDirectory: $(Build.Repository.LocalPath) - - task: GithubRelease@0 - displayName: 'Push to continuous release' - condition: and(succeeded(), and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))) - inputs: - githubConnection: scopy_continuous_release - repositoryName: $(Build.Repository.Name) - action: edit - tag: continous - assets: $(Build.ArtifactStagingDirectory)/Scopy*.tar.gz - assetUploadMode: replace - isPreRelease: true - addChangeLog: false - - task: PublishPipelineArtifact@1 - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)' - artifactName: '$(artifactName)' diff --git a/ci/README.md b/ci/README.md deleted file mode 100644 index 098e43fe49..0000000000 --- a/ci/README.md +++ /dev/null @@ -1,89 +0,0 @@ - -This file contains dependency information for different platforms - -**Windows (x86_64)** - -https://github.com/analogdevicesinc/scopy-mingw-build-deps -builds the docker image - `docker pull analogdevices/scopy-build:mingw64` -Github Actions workflow: -https://github.com/analogdevicesinc/scopy/blob/master/.github/workflows/mingwbuild.yml - -**Linux (flatpak - x86_64)** -https://github.com/analogdevicesinc/scopy-flatpak -docker pull analogdevices/scopy-build:flatpak - - ARCH=x86_64 make - -Github Actions workflow - https://github.com/analogdevicesinc/scopy/blob/master/.github/workflows/linuxflatpakbuild.yml - -**Linux (flatpak - arm)** -https://github.com/analogdevicesinc/scopy-flatpak -Run locally on arm machine (raspberry pi) - - ARCH=arm make -Not build in CI - -**Linux (ubuntu - x86_64) - development** -Built on appveyor - https://github.com/analogdevicesinc/scopy/blob/master/appveyor.yml -**macOS (x86_64)** -Built on appveyor - https://github.com/analogdevicesinc/scopy/blob/master/appveyor.yml - -**Android (aarch64)** -https://github.com/analogdevicesinc/scopy-android-deps - `docker pull analogdevices/scopy-build:android` -Github Actions workflow - https://github.com/analogdevicesinc/scopy/blob/master/.github/workflows/androidbuild.yml - -Dependency versions (links used in source builds) - - - Qt: 5.15.12 - - Qwt - https://github.com/cseci/qwt - qwt-multiaxes - - libiio - https://github.com/analogdevicesinc/libiio - https://github.com/analogdevicesinc/libiio/tree/cad83146837971acdac28beaeb8156b9da33ba6b - v0.24 - - libxml2 - https://github.com/GNOME/libxml2 - - iconv (only on Android from src) - - libffi (only on Android from src) - - libgettext (only on Android from src) - - libusb - https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2 - - Android specific libusb: https://github.com/xloem/libusb/tree/d1856aa8c246f9e56cf00a0765462b67fc5a4871 - - libm2k- https://github.com/analogdevicesinc/libm2k - master - - glog - https://github.com/google/glog - - boost - - - gnuradio - https://github.com/analogdevicesinc/gnuradio - scopy / scopy-android-2(for Android) - - volk - - log4cpp - https://github.com/cseci/log4cpp - - fftw3 - - libgmp - - gr-iio https://github.com/analogdevicesinc/gr-iio - upgrade3.8 - - libad9361 - https://github.com/analogdevicesinc/ad9361 - - gr-m2k - https://github.com/analogdevicesinc/gr-m2k - master - - gr-scopy - https://github.com/analogdevicesinc/gr-scopy - master - - libsigrokdecode - https://github.com/sigrokproject/libsigrokdecode - master - - glib - - glibmm - - sigcpp - - python - - libtinyiiod - https://github.com/analogdevicesinc/libtinyiiod - master - -How to install Qt from qt.io : https://github.com/analogdevicesinc/scopy-android-deps/blob/master/docker/Dockerfile#L43-L49 - - -| Dependency | Windows | Linux Flatpak | Linux Ubuntu(development) | Linux ARM | macOS | Android | -| --- | --- | --- | --- | --- | --- | --- | -| Qt | pacman | org.kde.Sdk (v5.15)| Qt.io |org.kde.Sdk (v5.14) | brew | Qt.io | -| qwt | src | src | src | src | src | src | -| libxml2 | pacman | src | apt | src | brew | src | -| libusb | pacman | src | apt | src | brew | src - android branch/commit | -| libiio | src | src | src | src | src | src| -| glog | src | src | src | src | brew | src | -| libm2k | src | src | src | src | src | src | -| volk | src | with GR | with GR | src | with GR | src | -| fftw3 | pacman| src | apt | src | brew| src| -| libgmp | pacman | src | apt | src | brew | src | -| boost | 1.75 | 1.72 | apt/src | 1.72 | brew | Boost-for-Android | -| gnuradio | src | src | apt/src | src | src | src | -| gr-iio | src | src | src | src | src | src | -| gr-m2k | src | src | src | src | src | src | -| gr-scopy | src | src | src | src | src | src | -| glib | pacman | src | apt | src | brew | src | -| glibmm | pacman | src | apt | src | src | src | -| sigcpp | pacman | src | apt | src | src | src | -| python | pacman | src | apt | src | brew | src | -| libsigrokdecode | src | src | src | src | src | src | -| libtinyiiod | src | src | src | src | src | src| diff --git a/ci/android/android_scopy_keystore b/ci/android/android_scopy_keystore deleted file mode 100644 index e6ceb6aac8..0000000000 --- a/ci/android/android_scopy_keystore +++ /dev/null @@ -1 +0,0 @@ -KEYSTOREPASSWORD="--storepass xxx --keypass xxx" diff --git a/ci/armhf/AppRun b/ci/armhf/AppRun deleted file mode 100755 index e655f07926..0000000000 --- a/ci/armhf/AppRun +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e -SELF=$(readlink -f "$0") -HERE=${SELF%/*} - -export QT_PLUGIN_PATH=$HERE/usr/plugins -export QT_QPA_PLATFORM_PLUGIN_PATH=$HERE/usr/plugins/platforms -export QT_QPA_PLATFORM=xcb -export LD_LIBRARY_PATH=$HERE/usr/lib - -python_dir=$(find "$HERE/usr/lib/" -maxdepth 1 -type d -name "python3.*") -export PYTHONHOME=$python_dir -export PYTHONPATH=$python_dir:$python_dir/lib-dynload:$python_dir/site-packages:$python_dir/encodings -echo "Starting Scopy" -ldd $HERE/usr/bin/scopy -exec $HERE/usr/bin/scopy \ No newline at end of file diff --git a/ci/armhf/armhf_build_config.sh b/ci/armhf/armhf_build_config.sh deleted file mode 100644 index c035be0a13..0000000000 --- a/ci/armhf/armhf_build_config.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -LIBIIO_VERSION=v0.25 -LIBAD9361_BRANCH=main -GLOG_BRANCH=v0.4.0 -LIBM2K_BRANCH=main -SPDLOG_BRANCH=v1.x -VOLK_BRANCH=main -GNURADIO_BRANCH=maint-3.10 -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=main -LIBSIGROKDECODE_BRANCH=master -QWT_BRANCH=qwt-multiaxes-updated -LIBTINYIIOD_BRANCH=master -IIOEMU_BRANCH=main - -export APPIMAGE=1 - -PYTHON_VERSION=python3.9 # default python version used in CI scripts, can be changed to match locally installed python - -STAGING_AREA=$SRC_DIR/CI/armhf/staging - -STAGING_AREA=$SRC_DIR/ci/armhf/staging -SYSROOT=$STAGING_AREA/sysroot -SYSROOT_TAR=$STAGING_AREA/sysroot.tar.gz -SYSROOT_DOCKER=$SRC_DIR/ci/armhf/docker/sysroot.tar.gz -TOOLCHAIN=$STAGING_AREA/cross-pi-gcc -TOOLCHAIN_BIN=$TOOLCHAIN/bin -TOOLCHAIN_HOST="arm-linux-gnueabihf" -TOOLCHAIN_FILE=$SRC_DIR/ci/armhf/cmake_toolchain.cmake -QT_LOCATION=$SYSROOT/usr/local/qt5.15 - -CMAKE_BIN=$STAGING_AREA/cmake/bin/cmake -QMAKE_BIN=$QT_LOCATION/bin/qmake -JOBS=-j14 - -APP_DIR=$SRC_DIR/ci/armhf/scopy.AppDir -APP_IMAGE=$SRC_DIR/ci/armhf/Scopy.AppImage -APP_RUN=$SRC_DIR/ci/armhf/AppRun -APP_DESKTOP=$SRC_DIR/ci/armhf/scopy.desktop -APP_SQUASHFS=$SRC_DIR/ci/armhf/scopy.squashfs -RUNTIME_ARMHF=$SRC_DIR/ci/armhf/runtime-armhf - -CMAKE_OPTS=(\ - -DCMAKE_SYSROOT="$SYSROOT" \ - -DQT_LOCATION="$QT_LOCATION" \ - -DSTAGING_AREA="$STAGING_AREA" \ - -DCMAKE_INSTALL_PREFIX="$SYSROOT" \ - -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) - -CMAKE="$CMAKE_BIN ${CMAKE_OPTS[*]}" - -QT_BUILD_LOCATION=$QT_LOCATION # the location where Qt will be installed in the system -QT_SYSTEM_LOCATION=/usr/local/qt5.15 # the Qt location relative to the sysroot folder -CROSS_COMPILER=$STAGING_AREA/cross-pi-gcc - -CROSSCOMPILER_DOWNLOAD_LINK=https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Bullseye/GCC%2010.2.0/Raspberry%20Pi%203A%2B%2C%203B%2B%2C%204/cross-gcc-10.2.0-pi_3%2B.tar.gz -CMAKE_DOWNLOAD_LINK=https://github.com/Kitware/CMake/releases/download/v3.29.0-rc2/cmake-3.29.0-rc2-linux-x86_64.tar.gz -KUIPER_DOWNLOAD_LINK=https://swdownloads.analog.com/cse/kuiper/image_2023-12-13-ADI-Kuiper-full.zip -QT_DOWNLOAD_LINK=http://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz -SYSROOT_RELATIVE_LINKS=https://raw.githubusercontent.com/abhiTronix/rpi_rootfs/master/scripts/sysroot-relativelinks.py diff --git a/ci/armhf/armhf_build_process.sh b/ci/armhf/armhf_build_process.sh deleted file mode 100755 index 631ae58fbf..0000000000 --- a/ci/armhf/armhf_build_process.sh +++ /dev/null @@ -1,427 +0,0 @@ -#!/bin/bash - -set -ex -git config --global --add safe.directory $HOME/scopy -SRC_DIR=$(git rev-parse --show-toplevel 2>/dev/null ) || \ -SRC_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../ && pwd ) -source $SRC_DIR/ci/armhf/armhf_build_config.sh - -echo -- USING CMAKE COMMAND: -echo $CMAKE -echo -- USING QT: $QT -echo -- USING QMAKE: $QMAKE_BIN - -build_with_cmake() { - BUILD_FOLDER=$PWD/build - rm -rf $BUILD_FOLDER - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE $CURRENT_BUILD_CMAKE_OPTS ../ - make $JOBS - CURRENT_BUILD_CMAKE_OPTS="" - # TODO: Create build-status file -} - -set_config_opts() { - CPP="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-cpp" - CC="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-gcc" - CXX="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-g++" - LD="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-ld" - AS="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-as" - AR="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-ar" - RANLIB="${TOOLCHAIN_BIN}/${TOOLCHAIN_HOST}-ranlib" - - CFLAGS=" -I${SYSROOT}/include -I${SYSROOT}/include/arm-linux-gnueabihf -I${SYSROOT}/usr/include -I${SYSROOT}/usr/include/arm-linux-gnueabihf -I${TOOLCHAIN}/include- -fPIC" - CPPFLAGS="-fexceptions ${CFLAGS}" - LDFLAGS="-Wl,-rpath=XORIGIN -L${TOOLCHAIN}/arm-linux-gnueabihf/lib -L${TOOLCHAIN}/arm-linux-gnueabihf/libc/lib -L${TOOLCHAIN}/arm-linux-gnueabihf/libc/usr/lib -L${SYSROOT}/lib -L${SYSROOT}/usr/lib -L${SYSROOT}/usr/lib/arm-linux-gnueabihf -L${SYSROOT}/usr/lib/arm-linux-gnueabihf" - - CONFIG_OPTS=() - CONFIG_OPTS+=("--prefix=${SYSROOT}") - CONFIG_OPTS+=("--host=${TOOLCHAIN_HOST}") - CONFIG_OPTS+=("--with-sysroot=${SYSROOT}") - CONFIG_OPTS+=("CFLAGS=${CFLAGS}") - CONFIG_OPTS+=("CPPFLAGS=${CPPFLAGS}") - CONFIG_OPTS+=("LDFLAGS=${LDFLAGS}") - CONFIG_OPTS+=("PKG_CONFIG=${SYSROOT}/usr/bin/arm-linux-gnueabihf-pkg-config" ) - CONFIG_OPTS+=("PKG_CONFIG_DIR=") - CONFIG_OPTS+=("PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${SYSROOT}/usr/share/pkgconfig:${SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${SYSROOT}/usr/local/lib/pkgconfig") - CONFIG_OPTS+=("PKG_CONFIG_SYSROOT=${SYSROOT}") - CONFIG_OPTS+=("PKG_CONFIG_SYSROOT_DIR=${SYSROOT}") - CONFIG_OPTS+=("PKG_CONFIG_PATH=${SYSROOT}/usr/bin/arm-linux-gnueabihf-pkg-config") - CONFIG_OPTS+=("PKG_CONFIG_ALLOW_CROSS=1") - CONFIG_OPTS+=("CPP=${CPP}") - CONFIG_OPTS+=("CC=${CC}") - CONFIG_OPTS+=("CXX=${CXX}") - CONFIG_OPTS+=("LD=${LD}") - CONFIG_OPTS+=("AS=${AS}") - CONFIG_OPTS+=("AR=${AR}") - CONFIG_OPTS+=("RANLIB=${RANLIB}") -} - -install_packages() { - sudo apt update - sudo apt install -y build-essential cmake unzip gfortran gcc git bison libtool \ - ${PYTHON_VERSION}-full pip gperf pkg-config gdb-multiarch g++ flex texinfo gawk openssl \ - pigz libncurses-dev autoconf automake tar figlet liborc-0.4-dev* patchelf libc6-dev-armhf-cross squashfs-tools - pip install mako -} - -download_cmake() { - mkdir -p ${STAGING_AREA} - pushd ${STAGING_AREA} - if [ ! -d cmake ];then - wget ${CMAKE_DOWNLOAD_LINK} - # unzip and rename - tar -xf cmake*.tar.gz && rm cmake*.tar.gz && mv cmake* cmake - else - echo "Cmake already downloaded" - fi - popd -} - -download_crosscompiler(){ - mkdir -p ${STAGING_AREA} - pushd ${STAGING_AREA} - if [ ! -d cross-pi-gcc ];then - wget --progress=dot:giga ${CROSSCOMPILER_DOWNLOAD_LINK} - # unzip and rename - tar -xf cross-gcc-*.tar.gz && rm cross-gcc-*.tar.gz && mv cross-pi-* cross-pi-gcc - else - echo "Crosscompiler already downloaded" - fi - popd -} - -clone() { - echo "#######CLONE#######" - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - [ -d 'libiio' ] || git clone --recursive https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio - [ -d 'libad9361' ] || git clone --recursive https://github.com/analogdevicesinc/libad9361-iio.git -b $LIBAD9361_BRANCH libad9361 - [ -d 'libm2k' ] || git clone --recursive https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH libm2k - [ -d 'spdlog' ] || git clone --recursive https://github.com/gabime/spdlog.git -b $SPDLOG_BRANCH spdlog - [ -d 'gr-scopy' ] || git clone --recursive https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH gr-scopy - [ -d 'gr-m2k' ] || git clone --recursive https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH gr-m2k - [ -d 'volk' ] || git clone --recursive https://github.com/gnuradio/volk.git -b $VOLK_BRANCH volk - [ -d 'gnuradio' ] || git clone --recursive https://github.com/gnuradio/gnuradio.git -b $GNURADIO_BRANCH gnuradio - [ -d 'qwt' ] || git clone --recursive https://github.com/cseci/qwt.git -b $QWT_BRANCH qwt - [ -d 'libsigrokdecode' ] || git clone --recursive https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH libsigrokdecode - [ -d 'libtinyiiod' ] || git clone --recursive https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH libtinyiiod - popd -} - -build_libiio() { - echo "### Building libiio - version $LIBIIO_VERSION" - pushd $STAGING_AREA/libiio - CURRENT_BUILD_CMAKE_OPTS="\ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=OFF\ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - -DWITH_SERIAL_BACKEND:BOOL=ON \ - -DENABLE_IPV6:BOOL=OFF \ - -DINSTALL_UDEV_RULE:BOOL=OFF - " - if [ -d 'build' ];then - echo "### IIO-EMU already built --- skipping" - else - build_with_cmake - sudo make install - fi - popd -} - -build_libad9361() { - echo "### Building libad9361 - branch $LIBAD9361_BRANCH" - pushd $STAGING_AREA/libad9361 - build_with_cmake - sudo make install - popd -} - -build_spdlog() { - echo "### Building spdlog - branch $SPDLOG_BRANCH" - pushd $STAGING_AREA/spdlog - CURRENT_BUILD_CMAKE_OPTS="-DSPDLOG_BUILD_SHARED=ON" - build_with_cmake - sudo make install - popd -} - -build_libm2k() { - echo "### Building libm2k - branch $LIBM2K_BRANCH" - pushd $STAGING_AREA/libm2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DENABLE_CSHARP=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DENABLE_TOOLS=OFF \ - -DINSTALL_UDEV_RULES=OFF \ - -DENABLE_LOG=OFF - " - build_with_cmake - sudo make install - popd -} - -build_volk() { - echo "### Building volk - branch $VOLK_BRANCH" - pushd $STAGING_AREA/volk - build_with_cmake - sudo make install - popd -} - -build_gnuradio() { - echo "### Building gnuradio - branch $GNURADIO_BRANCH" - pushd $STAGING_AREA/gnuradio - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_DEFAULT=OFF \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_IIO=ON \ - -DENABLE_POSTINSTALL=OFF - " - build_with_cmake - sudo make install - popd -} - -build_grscopy() { - echo "### Building gr-scopy - branch $GRSCOPY_BRANCH" - pushd $STAGING_AREA/gr-scopy - build_with_cmake - sudo make install - popd -} - -build_grm2k() { - echo "### Building gr-m2k - branch $GRM2K_BRANCH" - pushd $STAGING_AREA/gr-m2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DDIGITAL=OFF - " - build_with_cmake - sudo make install - popd -} - -build_qwt() { - echo "### Building qwt - branch $QWT_BRANCH" - pushd $STAGING_AREA/qwt - git clean -xdf - sed -i 's|/usr/local/qwt-$$QWT_VERSION-ma|/usr/local|g' qwtconfig.pri - $QMAKE_BIN INCLUDEPATH=$SYSROOT/include LIBS=-L$SYSROOT/lib qwt.pro - make $JOBS - patchelf --force-rpath --set-rpath \$ORIGIN $STAGING_AREA/qwt/lib/libqwt.so - sudo make INSTALL_ROOT=$SYSROOT install - popd -} - -build_libsigrokdecode() { - echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH" - set_config_opts - pushd $STAGING_AREA/libsigrokdecode - git clean -xdf - ./autogen.sh - ./configure "${CONFIG_OPTS[@]}" - make $JOBS - patchelf --force-rpath --set-rpath \$ORIGIN $STAGING_AREA/libsigrokdecode/.libs/libsigrokdecode.so - sudo make install - popd -} - -build_libtinyiiod() { - echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH" - pushd $STAGING_AREA/libtinyiiod - CURRENT_BUILD_CMAKE_OPTS="-DBUILD_EXAMPLES=OFF" - build_with_cmake - sudo make install - popd -} - -build_iio-emu(){ - echo "### Building iio-emu - branch $IIOEMU_BRANCH" - pushd $STAGING_AREA - [ -d 'iio-emu' ] || git clone --recursive https://github.com/analogdevicesinc/iio-emu -b $IIOEMU_BRANCH iio-emu - pushd $STAGING_AREA/iio-emu - build_with_cmake - sudo make install - popd - popd -} - -build_scopy() { - echo "### Building scopy" - pushd $SRC_DIR - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PLUGIN_TEST=ON \ - -DENABLE_TESTING=ON \ - -DPYTHON_EXECUTABLE=/usr/bin/python3.9 - " - build_with_cmake - popd -} - -create_appdir(){ - - BUILD_FOLDER=$SRC_DIR/build - EMU_BUILD_FOLDER=$STAGING_AREA/iio-emu/build - PLUGINS=$BUILD_FOLDER/plugins/plugins - SCOPY_DLL=$(find $BUILD_FOLDER -maxdepth 1 -type f -name "libscopy*") - REGMAP_XMLS=$PLUGINS/regmap/xmls - TRANSLATIONS_QM=$(find $BUILD_FOLDER/translations -type f -name "*.qm") - COPY_DEPS=$SRC_DIR/ci/armhf/copy-deps.sh - - rm -rf $APP_DIR - mkdir -p $APP_DIR - mkdir -p $APP_DIR/usr/bin - mkdir -p $APP_DIR/usr/lib - mkdir -p $APP_DIR/usr/share/applications - mkdir -p $APP_DIR/usr/share/icons/hicolor/512x512 - - cp $APP_RUN $APP_DIR - cp $APP_DESKTOP $APP_DIR - cp $SRC_DIR/gui/res/scopy.png $APP_DIR - cp $SRC_DIR/gui/res/scopy.png $APP_DIR/usr/share/icons/hicolor/512x512 - cp $APP_DESKTOP $APP_DIR/usr/share/applications - - cp $EMU_BUILD_FOLDER/iio-emu $APP_DIR/usr/bin - cp $BUILD_FOLDER/scopy $APP_DIR/usr/bin - - cp $SCOPY_DLL $APP_DIR/usr/lib - mkdir -p $APP_DIR/usr/lib/scopy/plugins - cp $PLUGINS/*.so $APP_DIR/usr/lib/scopy/plugins - - mkdir -p $APP_DIR/usr/lib/scopy/translations - cp $TRANSLATIONS_QM $APP_DIR/usr/lib/scopy/translations - - if [ -d $REGMAP_XMLS ]; then - cp -r $REGMAP_XMLS $APP_DIR/usr/lib/scopy/plugins - fi - - $COPY_DEPS $APP_DIR/usr/bin/scopy $APP_DIR/usr/lib - $COPY_DEPS $APP_DIR/usr/bin/iio-emu $APP_DIR/usr/lib - $COPY_DEPS $APP_DIR/usr/bin/scopy $APP_DIR/usr/lib - $COPY_DEPS "$APP_DIR/usr/lib/scopy/plugins/*.so" $APP_DIR/usr/lib - cp -r $QT_LOCATION/plugins $APP_DIR/usr - - # search for the python version linked by cmake and copy inside the appimage the same version - FOUND_PYTHON_VERSION=$(grep 'PYTHON_VERSION' $SRC_DIR/build/CMakeCache.txt | awk -F= '{print $2}' | grep -o 'python[0-9]\+\.[0-9]\+') - python_path=${SYSROOT}/usr/lib/$FOUND_PYTHON_VERSION - cp -r $python_path $APP_DIR/usr/lib - - cp -r $SYSROOT/share/libsigrokdecode/decoders $APP_DIR/usr/lib - - cp $QT_LOCATION/lib/libQt5XcbQpa.so* $APP_DIR/usr/lib - cp $QT_LOCATION/lib/libQt5EglFSDeviceIntegration.so* $APP_DIR/usr/lib - cp $QT_LOCATION/lib/libQt5DBus.so* $APP_DIR/usr/lib - cp $SYSROOT/lib/arm-linux-gnueabihf/libGLESv2.so* $APP_DIR/usr/lib - cp $SYSROOT/lib/arm-linux-gnueabihf/libbsd.so* $APP_DIR/usr/lib - cp $SYSROOT/lib/arm-linux-gnueabihf/libXdmcp.so* $APP_DIR/usr/lib - cp $SYSROOT/usr/lib/arm-linux-gnueabihf/libXau.so* $APP_DIR/usr/lib - cp $SYSROOT/usr/lib/arm-linux-gnueabihf/libffi.so* $APP_DIR/usr/lib -} - -create_appimage(){ - rm -rf $APP_IMAGE - mksquashfs $APP_DIR $APP_SQUASHFS -root-owned -noappend - cat $RUNTIME_ARMHF >> $APP_IMAGE - cat $APP_SQUASHFS >> $APP_IMAGE - chmod a+x $APP_IMAGE -} - -# move the sysroot from the home of the docker container to the known location -move_sysroot(){ - mkdir -p $STAGING_AREA - [ -d /home/runner/sysroot ] && sudo mv /home/runner/sysroot $SYSROOT || echo "Sysroot not found or already moved" - if [ ! -d $SYSROOT ];then - echo "Missing SYSROOT" - exit 1 - fi -} - -# move and rename the AppImage artifact -move_appimage(){ - mv $APP_IMAGE $SRC_DIR/Scopy-armhf.AppImage -} - -generate_ci_envs() -{ - $SRC_DIR/ci/general/gen_ci_envs.sh > $SRC_DIR/ci/general/gh-actions.envs -} - - -# -# Helper functions -# -build_deps(){ - build_libiio - build_libad9361 - build_spdlog - build_libm2k - build_volk - build_gnuradio - build_grscopy - build_grm2k - build_qwt - build_libsigrokdecode - build_libtinyiiod -} - -run_workflow(){ - install_packages - download_cmake - download_crosscompiler - move_sysroot - build_iio-emu - build_scopy - create_appdir - create_appimage - move_appimage -} - -get_tools(){ - install_packages - download_cmake - download_crosscompiler - move_sysroot -} - -generate_appimage(){ - build_iio-emu - build_scopy - create_appdir - create_appimage -} - -dev_setup(){ - # for the local development of Scopy armhf the easyest method is to download the docker image - # a temporary docker volume is created to bridge the local environment and the docker container - # the compiling is done inside the container unsing the already prepared filesystem - docker pull cristianbindea/scopy2-armhf-appimage:latest - docker run -it \ - --mount type=bind,source="$SRC_DIR",target=/home/runner/scopy \ - cristianbindea/scopy2-armhf-appimage:latest - # now this repository folder it shared with the docker container - - # to compile the application use "scopy/ci/armhf/armhf_build_process.sh get_tools generate_appimage" - # after the first compilation just use "scopy/ci/armhf/armhf_build_process.sh generate_appimage" - # to continue using the same docker container use docker start (container id) and "docker attach (container id)" - - # finally after the development is done use this to clean the system - # "docker container rm -v (container id)" - # "docker image rm cristianbindea/scopy2-armhf-appimage:latest" - - # to get the container id use "docker container ls -a" -} - -for arg in $@; do - $arg -done diff --git a/ci/armhf/build_qt.sh b/ci/armhf/build_qt.sh deleted file mode 100755 index e2a32d244a..0000000000 --- a/ci/armhf/build_qt.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -set -ex -SRC_DIR=$(git rev-parse --show-toplevel 2>/dev/null ) || \ -SRC_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../ && pwd ) -source $SRC_DIR/ci/armhf/armhf_build_config.sh - -install_packages(){ - sudo apt install -y build-essential cmake unzip gfortran gcc git bison \ - python gperf pkg-config gdb-multiarch g++ flex texinfo gawk openssl \ - pigz libncurses-dev autoconf automake tar figlet libclang-dev -} - -# Download and extract QT Source (QT 5.15.2) -download_qt(){ - mkdir -p ${STAGING_AREA} - pushd ${STAGING_AREA} - if [ ! -d qt-everywhere-src ];then - wget --progress=dot:giga ${QT_DOWNLOAD_LINK} - tar -xf qt-everywhere-src-*.tar.xz && rm qt-everywhere-src-*.tar.xz && mv qt-everywhere-src-* qt-everywhere-src # unzip and rename - cd qt-everywhere-src - patch -p1 < $SRC_DIR/ci/armhf/qt_patch.patch # Patch QT Source - else - echo "QT already downloaded" - fi - popd -} - -download_crosscompiler(){ - mkdir -p ${STAGING_AREA} - pushd ${STAGING_AREA} - if [ ! -d cross-pi-gcc ];then - wget --progress=dot:giga ${CROSSCOMPILER_DOWNLOAD_LINK} - tar -xf cross-gcc-*.tar.gz && rm cross-gcc-*.tar.gz && mv cross-pi-* cross-pi-gcc # unzip and rename - else - echo "Crosscompiler already downloaded" - fi - popd -} - -build_qt5.15.2(){ - mkdir -p $STAGING_AREA/build-qt5.15.2 && cd $STAGING_AREA/build-qt5.15.2 - ../qt-everywhere-src/configure \ - -v \ - -release \ - -opensource \ - -confirm-license \ - -sysroot $SYSROOT \ - -prefix $QT_SYSTEM_LOCATION \ - -extprefix $QT_BUILD_LOCATION \ - -eglfs \ - -opengl desktop \ - -device linux-rasp-pi4-v3d-g++ \ - -device-option CROSS_COMPILE=$CROSS_COMPILER/bin/arm-linux-gnueabihf- \ - -skip qtscript \ - -skip qtwayland \ - -skip qtwebengine \ - -nomake tests \ - -make libs \ - -pkg-config \ - -no-use-gold-linker \ - -recheck \ - -xcb \ - -xcb-xlib \ - -bundled-xcb-xinput \ - -qt-pcre \ - -qpa eglfs \ - -L$SYSROOT/usr/lib/arm-linux-gnueabihf -I$SYSROOT/usr/include/arm-linux-gnueabihf - - make -j14 - sudo make install # installs to $QT_BUILD_LOCATION -} - -for arg in $@; do - $arg -done diff --git a/ci/armhf/cmake_toolchain.cmake b/ci/armhf/cmake_toolchain.cmake deleted file mode 100644 index d7ebfb16aa..0000000000 --- a/ci/armhf/cmake_toolchain.cmake +++ /dev/null @@ -1,88 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_LIBRARY_ARCHITECTURE arm-linux-gnueabihf) - -# In this case the variables CMAKE_SYSROOT and STAGING_AREA are defined as parameters to the cmake command -set(TOOLCHAIN_FILE ${STAGING_AREA}/cross-pi-gcc) -set(TOOLCHAIN_BIN ${TOOLCHAIN_FILE}/bin) -set(CMAKE_PREFIX_PATH ${QT_LOCATION}) -list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf") -list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SYSROOT}/lib") -set(CMAKE_VERBOSE ON) - -set(PKG_CONFIG_EXECUTABLE "${CMAKE_SYSROOT}/usr/bin/arm-linux-gnueabihf-pkg-config" CACHE PATH "PKG_CONFIG_EXECUTABLE" - FORCE -) -set(ENV{PKG_CONFIG_ALLOW_CROSS} 1) -set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) -set(RPI_PKG_CONFIG_LIBDIR "${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${RPI_PKG_CONFIG_LIBDIR}") -set(RPI_PKG_CONFIG_LIBDIR "${CMAKE_SYSROOT}/usr/share/pkgconfig:${RPI_PKG_CONFIG_LIBDIR}") -set(RPI_PKG_CONFIG_LIBDIR "${CMAKE_SYSROOT}/usr/lib/pkgconfig:${RPI_PKG_CONFIG_LIBDIR}") -set(RPI_PKG_CONFIG_LIBDIR "${CMAKE_SYSROOT}/usr/local/lib/pkgconfig:${RPI_PKG_CONFIG_LIBDIR}") -set(ENV{PKG_CONFIG_LIBDIR} "${RPI_PKG_CONFIG_LIBDIR}") -set(ENV{PKG_CONFIG} "${CMAKE_SYSROOT}/usr/bin/arm-linux-gnueabihf-pkg-config") - -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/include:") -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/include:") -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/include/arm-linux-gnueabihf:") -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/share/include:") - -set(ENV{PKG_CONFIG_SYSROOT_DIR} "${CMAKE_SYSROOT}") -set(ENV{LD_LIBRARY_PATH} "${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf:$ENV{LD_LIBRARY_PATH}") - -set(CMAKE_LIBRARY_PATH "${CMAKE_SYSROOT}/usr/lib") -set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH} ${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf") -set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH} ${CMAKE_SYSROOT}/usr/local/lib") -set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH} ${CMAKE_SYSROOT}/usr/local/lib/arm-linux-gnueabihf") - -set(CMAKE_AR ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-ar) -set(CMAKE_ASM_COMPILER ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-gcc) -set(CMAKE_C_COMPILER ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-gcc) -set(CMAKE_CXX_COMPILER ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-g++) -set(CMAKE_LINKER ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-ld) -set(CMAKE_OBJCOPY ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-objcopy) -set(CMAKE_RANLIB ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-ranlib) -set(CMAKE_SIZE ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-size) -set(CMAKE_STRIP ${TOOLCHAIN_BIN}/arm-linux-gnueabihf-strip) - -set(CMAKE_C_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=vfp") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/include") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/include") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/include/arm-linux-gnueabihf") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/share/include") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") -set(CMAKE_CXX_FLAGS "-fexceptions -frtti ${CMAKE_C_FLAGS}") -set(CMAKE_CXX_FLAGS_DEBUG "-Os -g") -set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG") -set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -mthumb -lpthread -pthread") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/lib") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/local/lib") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${QT_LOCATION}/lib") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${TOOLCHAIN_FILE}/arm-linux-gnueabihf/lib") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${TOOLCHAIN_FILE}/arm-linux-gnueabihf/libc/lib") -set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) - -#[[ -# Debug Mode -set(PKG_CONFIG_ARGN "--debug") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--verbose ") -]] - -set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # Perform compiler test with static library -set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -set(CMAKE_INSTALL_RPATH - "$ORIGIN" - "$ORIGIN/../lib" - "/lib/arm-linux-gnueabihf" - "/lib" - "/usr/local/qt5.15/lib" -) -set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) -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 ONLY) diff --git a/ci/armhf/copy-deps.sh b/ci/armhf/copy-deps.sh deleted file mode 100755 index cae9d95065..0000000000 --- a/ci/armhf/copy-deps.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -set -e -SRC_DIR=$(git rev-parse --show-toplevel 2>/dev/null ) || \ -SRC_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../ && pwd ) -source $SRC_DIR/ci/armhf/armhf_build_config.sh - -BINARY=$1 -LOCATION=$2 -LIBS_ARRAY=() -BLACKLISTED=($(wget --quiet https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist -O - | sort | uniq | cut -d '#' -f 1 | grep -v "^#.*" | grep "[^-\s]")) - -if [ ! -f "${SRC_DIR}"/ci/armhf/ldd-mod ]; then - sed 's|.*RTLDLIST=.*|RTLDLIST="/usr/arm-linux-gnueabihf/lib/ld-2.31.so /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3"|' /usr/bin/ldd | tee "${SRC_DIR}"/ci/armhf/ldd-mod - chmod +x "${SRC_DIR}"/ci/armhf/ldd-mod -fi - -export LD_LIBRARY_PATH="${APP_DIR}/usr/lib:${SYSROOT}/lib:${SYSROOT}/lib/arm-linux-gnueabihf:${SYSROOT}/usr/arm-linux-gnueabihf/lib:${SYSROOT}/usr/local/qt5.15/lib:${SYSROOT}/usr/local/lib:${SRC_DIR}/build" -run_ldd(){ - for library in $("${SRC_DIR}"/ci/armhf/ldd-mod "$1" | cut -d '>' -f 2 | awk '{print $1}') - do - # check if the library exists at that path and if it was processed already or blacklisted - if ! [[ "${BLACKLISTED[*]}" =~ "${library##*/}" ]]; then - if [ -f "${library}" ] && ! [[ "${LIBS_ARRAY[*]}" =~ "${library}" ]]; then - LIBS_ARRAY+=("${library}") - echo "---Added new lib: ${library}" - if [ ! -f "${LOCATION}"/"${library##*/}" ]; then - cp "${library}" "${LOCATION}" - [ -L "${library}" ] && cp "$(realpath "${library}")" "${LOCATION}" - fi - run_ldd "${library}" - fi - fi - done -} - -for arg in $BINARY; do - run_ldd "${arg}" -done diff --git a/ci/armhf/create_docker_image.sh b/ci/armhf/create_docker_image.sh deleted file mode 100755 index 4c0d247af6..0000000000 --- a/ci/armhf/create_docker_image.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -set -ex -SRC_DIR=$(git rev-parse --show-toplevel 2>/dev/null ) || \ -SRC_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../ && pwd ) -source $SRC_DIR/ci/armhf/armhf_build_config.sh - -# install docker -install_packages(){ - sudo apt-get update - sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install containerd.io docker-ce docker-ce-cli docker-buildx-plugin -} - -create_sysroot(){ - $SRC_DIR/ci/armhf/create_sysroot.sh \ - install_packages \ - download_kuiper \ - install_qemu \ - extract_sysroot \ - configure_sysroot -} - -# archive the sysroot and move it next to Dockerfile in order to copy the tar in the docker image -tar_and_move_sysroot(){ - pushd $STAGING_AREA - sudo tar -czvf "${SYSROOT_TAR##*/}" sysroot - sudo mv $SYSROOT_TAR $SYSROOT_DOCKER - popd -} - -create_image(){ - pushd ${SRC_DIR}/ci/armhf/docker - sudo docker build --load --tag cristianbindea/scopy2-armhf-appimage . - # sudo DOCKER_BUILDKIT=0 docker build --tag cristianbindea/scopy2-armhf-appimage . # build the image using old backend - popd -} - -install_packages -create_sysroot -tar_and_move_sysroot -create_image diff --git a/ci/armhf/create_sysroot.sh b/ci/armhf/create_sysroot.sh deleted file mode 100755 index 108ab2d7dd..0000000000 --- a/ci/armhf/create_sysroot.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -set -ex -SRC_DIR=$(git rev-parse --show-toplevel 2>/dev/null ) || \ -SRC_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../ && pwd ) -source $SRC_DIR/ci/armhf/armhf_build_config.sh - -IMAGE_FILE=2023-12-13-ADI-Kuiper-full.img - -install_packages(){ - sudo apt update - sudo apt -y install git wget unzip python3 python2 python -} - -download_kuiper(){ - mkdir -p ${STAGING_AREA} - pushd ${STAGING_AREA} - wget --progress=dot:giga ${KUIPER_DOWNLOAD_LINK} - unzip image*.zip - popd -} - -# install qemu needed for the sysroot configuration -install_qemu(){ - sudo apt update - sudo apt -y install qemu qemu-system qemu-user-static qemu-user -} - -# mount the Kuiper image and copy the entire rootfs partition -extract_sysroot(){ - sudo mkdir -p /mnt/kuiper - - # with file ${IMAGE_FILE} we can see the start sector (4218880) and the length (19947520) of the second partition contained in the Kuiper image - # using this info we can directly mount that partition - sudo mount -v -o loop,offset=$((512*4218880)),sizelimit=$((512*19947520)) ${STAGING_AREA}/${IMAGE_FILE} /mnt/kuiper - - mkdir -p ${SYSROOT} - sudo cp -arp /mnt/kuiper/* ${SYSROOT} - sudo cp /etc/resolv.conf ${SYSROOT}/etc/resolv.conf - sudo umount /mnt/kuiper - sudo rm -rf /mnt/kuiper - rm -rf ${STAGING_AREA:?}/${IMAGE_FILE} - rm -rf ${STAGING_AREA}/image*.zip -} - -# execute chroot inside the sysroot folder and install/remove packages using apt -configure_sysroot(){ - cat $SRC_DIR/ci/armhf/inside_chroot.sh | sudo chroot ${SYSROOT} -} - -move_and_extract_sysroot(){ - if [ -f $HOME/sysroot.tar.gz ]; then - mkdir -p $STAGING_AREA - sudo tar -xf $HOME/sysroot.tar.gz --directory $STAGING_AREA - rm $HOME/sysroot.tar.gz - fi -} - -fix_relativelinks(){ - pushd ${STAGING_AREA} - wget $SYSROOT_RELATIVE_LINKS - chmod +x sysroot-relativelinks.py - sudo ./sysroot-relativelinks.py ${SYSROOT} - popd -} - -for arg in $@; do - $arg -done - diff --git a/ci/armhf/docker/Dockerfile b/ci/armhf/docker/Dockerfile deleted file mode 100644 index 6d88c76fbe..0000000000 --- a/ci/armhf/docker/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -FROM --platform=linux/amd64 ubuntu:20.04 AS start -SHELL ["/bin/bash", "-c"] -ARG USER=runner -ENV DEBIAN_FRONTEND=noninteractive -ENV TZ=Europe/Bucharest -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt-get update && \ - apt-get -y upgrade && \ - apt-get install -y apt-utils sudo git wget flex bison pkg-config make python3 pip vim -RUN groupadd -g 1000 -r $USER && \ - useradd -u 1000 -g 1000 --create-home -r $USER - -#Change password -RUN echo "$USER:$USER" | chpasswd - -#Make sudo passwordless -RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-$USER && \ - usermod -aG sudo $USER && \ - usermod -aG plugdev $USER - -USER $USER -WORKDIR /home/${USER} - - - -FROM start AS sysroot_builder -ARG USER=runner -ENV DEBIAN_FRONTEND=noninteractive -COPY sysroot.tar.gz /home/${USER} -RUN git clone https://github.com/analogdevicesinc/scopy -b dev -WORKDIR /home/${USER}/scopy -RUN ./ci/armhf/create_sysroot.sh \ - install_packages \ - move_and_extract_sysroot \ - fix_relativelinks -RUN ./ci/armhf/build_qt.sh \ - install_packages \ - download_qt \ - download_crosscompiler \ - build_qt5.15.2 -RUN ./ci/armhf/armhf_build_process.sh \ - install_packages \ - download_cmake \ - download_crosscompiler \ - clone \ - build_deps - - - -FROM start -ARG USER=runner -ENV DEBIAN_FRONTEND=noninteractive -RUN mkdir -p /home/${USER}/sysroot -COPY --from=sysroot_builder /home/${USER}/scopy/ci/armhf/staging/sysroot/usr /home/${USER}/sysroot/usr -COPY --from=sysroot_builder /home/${USER}/scopy/ci/armhf/staging/sysroot/share /home/${USER}/sysroot/share -COPY --from=sysroot_builder /home/${USER}/scopy/ci/armhf/staging/sysroot/include /home/${USER}/sysroot/include -WORKDIR /home/${USER}/sysroot -RUN ln -s usr/bin bin && ln -s usr/lib lib && ln -s usr/sbin sbin -WORKDIR /home/${USER} \ No newline at end of file diff --git a/ci/armhf/inside_chroot.sh b/ci/armhf/inside_chroot.sh deleted file mode 100644 index 24b2d3c623..0000000000 --- a/ci/armhf/inside_chroot.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive -ln -snf /usr/share/zoneinfo/Europe/Bucharest /etc/localtime && echo "Europe/Bucharest" > /etc/timezone -echo "LC_ALL=en_US.UTF-8" | tee -a /etc/environment -echo "LANG=en_US.UTF-8" | tee -a /etc/locale.conf -locale-gen en_US.UTF-8 - -sed -i 's/#deb-src/deb-src/' /etc/apt/sources.list - -apt -y purge openjdk* tex-common -apt -y remove gnuradio gnuradio-* libgnuradio-* libvolk* -apt -y remove qt* libqt5* -apt -y autoremove -apt update && apt -y upgrade -apt -y dist-upgrade -dpkg --configure -a - -rm -rf /usr/local/include/volk /usr/local/lib/libvolk* \ - /usr/local/lib/cmake/volk -rm -rf /usr/lib/arm-linux-gnueabihf/libiio.so* \ - usr/local/src/libiio \ - /usr/lib/arm-linux-gnueabihf/pkgconfig/libiio.pc -rm -rf /usr/local/lib/cmake/m2k \ - /usr/local/lib/arm-linux-gnueabihf/pkgconfig/libm2k.pc \ - /usr/local/lib/arm-linux-gnueabihf/pkgconfig/gnuradio-m2k.pc \ - /usr/local/lib/arm-linux-gnueabihf/libgnuradio-m2k.so* \ - /usr/local/lib/arm-linux-gnueabihf/libm2k.so* \ - /usr/local/lib/arm-linux-gnueabihf/cmake/libm2k \ - /usr/local/include/libm2k /usr/local/include/m2k -rm -rf /usr/local/lib/arm-linux-gnueabihf/libgnuradio-iio.so* \ - /usr/local/lib/arm-linux-gnueabihf/pkgconfig/gnuradio-iio.pc \ - /usr/local/lib/cmake/iio -rm -rf /usr/lib/arm-linux-gnueabihf/libad9361.so* \ - /usr/lib/arm-linux-gnueabihf/pkgconfig/libad9361.pc \ - /usr/lib/libad9166.so* \ - /usr/lib/pkgconfig/libad9166.pc - -apt -y build-dep qtbase5-dev || true -apt -y install build-essential gcc g++ gdb-multiarch cmake autoconf automake bison flex git wget pkg-config figlet gawk unzip libsndfile1-dev \ - libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 gdbserver libspeechd-dev perl \ - libgl1-mesa-dev libxcb-composite0-dev libxcb-cursor-dev libxcb-damage0-dev libxcb-xv0-dev \ - libxcb-dpms0-dev libxcb-dri2-0-dev libxcb-ewmh-dev libxcb-imdkit-dev libxcb-xvmc0-dev \ - libxcb-present-dev libxcb-record0-dev libxcb-res0-dev libxcb-xrm-dev libx11-xcb-dev libxcb-glx0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-xkb-dev libxkbcommon-x11-dev \ - libxcb-screensaver0-dev libxcb-util0-dev libxcb-xf86dri0-dev libxcb-xtest0-dev -apt -y install libunwind-dev libsndfile1-dev mesa-utils* mesa-common-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev python2 libopenal-dev || true -apt -y install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev || true - -wget https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/utils/SSymlinker -sed -i 's/sudo//g' SSymlinker -chmod +x SSymlinker -./SSymlinker -s /usr/include/arm-linux-gnueabihf/asm -d /usr/include -./SSymlinker -s /usr/include/arm-linux-gnueabihf/gnu -d /usr/include -./SSymlinker -s /usr/include/arm-linux-gnueabihf/bits -d /usr/include -./SSymlinker -s /usr/include/arm-linux-gnueabihf/sys -d /usr/include -./SSymlinker -s /usr/lib/arm-linux-gnueabihf/crtn.o -d /usr/lib/crtn.o -./SSymlinker -s /usr/lib/arm-linux-gnueabihf/crt1.o -d /usr/lib/crt1.o -./SSymlinker -s /usr/lib/arm-linux-gnueabihf/crti.o -d /usr/lib/crti.o \ No newline at end of file diff --git a/ci/armhf/local_build_scopy_for_kuiper.sh b/ci/armhf/local_build_scopy_for_kuiper.sh deleted file mode 100755 index 809f42a680..0000000000 --- a/ci/armhf/local_build_scopy_for_kuiper.sh +++ /dev/null @@ -1,253 +0,0 @@ -#!/bin/bash -set -ex -export PS4='+(${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' - -STAGING_AREA=$HOME"/staging" -STAGING_AREA_DEPS=$STAGING_AREA"/dependencies" -JOBS=-j1 - -USE_STAGING=OFF - -LIBIIO_VERSION=v0.25 -LIBM2K_BRANCH=master -SPDLOG_BRANCH=v1.x -VOLK_BRANCH=main -GNURADIO_BRANCH=maint-3.10 -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=master -LIBSIGROKDECODE_BRANCH=master -QWT_BRANCH=qwt-multiaxes-updated -LIBTINYIIOD_BRANCH=master -IIOEMU_BRANCH=master -SCOPY_BRANCH=dev - -if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - echo -- USING STAGING - mkdir -p $STAGING_AREA_DEPS - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STAGING_AREA_DEPS/lib - CMAKE_OPTS=(\ - -DCMAKE_LIBRARY_PATH=$STAGING_AREA_DEPS \ - -DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS \ - -DCMAKE_PREFIX_PATH=$STAGING_AREA_DEPS \ - -DCMAKE_EXE_LINKER_FLAGS="-L$STAGING_AREA_DEPS -L$STAGING_AREA_DEPS/lib" \ - -DCMAKE_SHARED_LINKER_FLAGS="-L$STAGING_AREA_DEPS -L$STAGING_AREA_DEPS/lib" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) - echo -- STAGING_DIR $STAGING_AREA_DEPS - else - echo -- NO STAGING - mkdir -p $STAGING_AREA - CMAKE_OPTS=(\ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) -fi - -CMAKE_BIN=/bin/cmake -CMAKE="$CMAKE_BIN ${CMAKE_OPTS[*]}" -echo -- USING CMAKE COMMAND: -echo $CMAKE - -build_with_cmake() { - echo $PWD - BUILD_FOLDER=$PWD/build - rm -rf $BUILD_FOLDER - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE "$@" - make $JOBS - sudo make $JOBS install - sudo ldconfig -} - -clone() { - echo "#######CLONE#######" - pushd $STAGING_AREA - [ -d 'libiio' ] || git clone --recursive https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio - [ -d 'libm2k' ] || git clone --recursive https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH libm2k - [ -d 'spdlog' ] || git clone --recursive https://github.com/gabime/spdlog.git -b $SPDLOG_BRANCH spdlog - [ -d 'volk' ] || git clone --recursive https://github.com/gnuradio/volk.git -b $VOLK_BRANCH volk - [ -d 'gnuradio' ] || git clone --recursive https://github.com/gnuradio/gnuradio.git -b $GNURADIO_BRANCH gnuradio - [ -d 'gr-scopy' ] || git clone --recursive https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH gr-scopy - [ -d 'gr-m2k' ] || git clone --recursive https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH gr-m2k - [ -d 'qwt' ] || git clone --recursive https://github.com/cseci/qwt.git -b $QWT_BRANCH qwt - [ -d 'libsigrokdecode' ] || git clone --recursive https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH libsigrokdecode - [ -d 'libtinyiiod' ] || git clone --recursive https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH libtinyiiod - [ -d 'iio-emu' ] || git clone --recursive https://github.com/analogdevicesinc/iio-emu -b $IIOEMU_BRANCH iio-emu - [ -d 'scopy' ] || git clone --recursive https://github.com/analogdevicesinc/scopy -b $SCOPY_BRANCH scopy - popd -} - -install_apt() { - sudo apt-get update - sudo apt-get -y upgrade - sudo apt-get -y install build-essential cmake vim bison flex swig swig4.0 python3 mlocate \ - libusb-1.0-* libavahi-client* libavahi-common* libxml2* libsndfile-dev libfuse2 libboost1.74-* \ - qtbase5-dev* qt5-qmake* qttools5-dev* qtdeclarative5-dev libqt5qml* libqt5svg5* - pip install mako --break-system-packages -} - -build_libiio() { - echo "#######build_libiio#######" - pushd $STAGING_AREA/libiio - build_with_cmake \ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=ON\ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - -DWITH_SERIAL_BACKEND:BOOL=ON \ - -DENABLE_IPV6:BOOL=OFF \ - -DINSTALL_UDEV_RULE:BOOL=OFF\ - ../ - popd -} - -build_libm2k() { - echo "#######build_libm2k#######" - pushd $STAGING_AREA/libm2k - build_with_cmake -DENABLE_PYTHON=OFF -DENABLE_TOOLS=ON ../ - popd -} - -build_spdlog() { - echo "#######build_spdlog#######" - pushd $STAGING_AREA/spdlog - build_with_cmake -DSPDLOG_BUILD_SHARED=ON ../ - popd -} - -build_volk() { - echo "#######build_volk#######" - pushd $STAGING_AREA/volk - build_with_cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DPYTHON_EXECUTABLE=/usr/bin/python3 ../ - popd -} - -build_gnuradio() { - echo "#######build_gnuradio#######" - pushd $STAGING_AREA/gnuradio - build_with_cmake \ - -DPYTHON_EXECUTABLE=/usr/bin/python3 \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_IIO=ON \ - -DENABLE_POSTINSTALL=OFF \ - ../ - popd -} - -build_gr_scopy() { - echo "#######build_gr_scopy#######" - pushd $STAGING_AREA/gr-scopy - build_with_cmake -DWITH_PYTHON=OFF ../ - popd -} - -build_gr_m2k() { - echo "#######build_gr_m2k#######" - pushd $STAGING_AREA/gr-m2k - build_with_cmake -DWITH_PYTHON=OFF -DDIGITAL=OFF ../ - popd -} - -build_qwt() { - echo "#######build_qwt#######" - pushd $STAGING_AREA/qwt - git clean -xdf - if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - qmake INCLUDEPATH=$STAGING_AREA_DEPS/include LIBS=-L$STAGING_AREA_DEPS/lib qwt.pro - make $JOBS - make INSTALL_ROOT=$STAGING_AREA_DEPS install - cp -r $STAGING_AREA_DEPS/usr/local/* $STAGING_AREA_DEPS/ - else - qmake qwt.pro - make $JOBS - sudo make install - fi - - sudo ldconfig - popd -} - -build_libsigrokdecode() { - echo "#######build_libsigrokdecode#######" - pushd $STAGING_AREA/libsigrokdecode - git clean -xdf - ./autogen.sh - - if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - ./configure --prefix $STAGING_AREA_DEPS - else - ./configure - fi - - make $JOBS - sudo make install - sudo ldconfig - popd -} - -build_libtinyiiod() { - echo "#######build_libtinyiiod#######" - pushd $STAGING_AREA/libtinyiiod - build_with_cmake -DBUILD_EXAMPLES=OFF ../ - popd -} - -build_iio-emu() { - echo "#######build_iio-emu#######" - pushd $STAGING_AREA/iio-emu - build_with_cmake ../ - popd -} - -build_scopy() { - echo "#######build_scopy#######" - pushd $STAGING_AREA/scopy - build_with_cmake ../ - popd -} - -test_scopy() { - echo "#######TEST_SCOPY#######" - pushd $STAGING_AREA/scopy/build - ./scopy - popd -} - -buid_deps() { - build_libiio - build_libm2k - build_spdlog - build_volk - build_gnuradio - build_gr_scopy - build_gr_m2k - build_qwt - build_libsigrokdecode - build_libtinyiiod -} - - -# instal_apt -# clone -# buid_deps -# build_scopy -# test_scopy - -for arg in $@; do - $arg -done - diff --git a/ci/armhf/qt_patch.patch b/ci/armhf/qt_patch.patch deleted file mode 100644 index ec1e6bf431..0000000000 --- a/ci/armhf/qt_patch.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- new/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf -+++ qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf -@@ -0,0 +1,26 @@ -+# -+# qmake configuration for building with arm-linux-gnueabihf-g++ -+# -+ -+MAKEFILE_GENERATOR = UNIX -+CONFIG += incremental -+QMAKE_INCREMENTAL_STYLE = sublib -+ -+include(../common/linux.conf) -+include(../common/gcc-base-unix.conf) -+include(../common/g++-unix.conf) -+ -+QMAKE_LIBS_EGL = -lEGL -+ -+# modifications to g++.conf -+QMAKE_CC = arm-linux-gnueabihf-gcc -+QMAKE_CXX = arm-linux-gnueabihf-g++ -+QMAKE_LINK = arm-linux-gnueabihf-g++ -+QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++ -+ -+# modifications to linux.conf -+QMAKE_AR = arm-linux-gnueabihf-ar cqs -+QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy -+QMAKE_NM = arm-linux-gnueabihf-nm -P -+QMAKE_STRIP = arm-linux-gnueabihf-strip -+load(qt_config) ---- new/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-arm-gnueabihf-g++/qplatformdefs.h -+++ qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-arm-gnueabihf-g++/qplatformdefs.h -@@ -0,0 +1,40 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2016 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the qmake spec of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include "../linux-g++/qplatformdefs.h" ---- new/qt-everywhere-src-5.15.2/qtbase/src/3rdparty/angle/include/EGL/eglplatform.h -+++ qt-everywhere-src-5.15.2/qtbase/src/3rdparty/angle/include/EGL/eglplatform.h -@@ -141,6 +141,7 @@ - */ - typedef khronos_int32_t EGLint; - -+typedef uint32_t DISPMANX_ELEMENT_HANDLE_T; - - /* C++ / C typecast macros for special EGL handle values */ - #if defined(__cplusplus) ---- new/qt-everywhere-src-5.15.2/qtbase/src/gui/configure.json -+++ qt-everywhere-src-5.15.2/qtbase/src/gui/configure.json -@@ -862,7 +862,10 @@ - "type": "compile", - "test": { - "include": [ "EGL/egl.h", "bcm_host.h" ], -- "main": "vc_dispmanx_display_open(0);" -+ "main": [ -+ "vc_dispmanx_display_open(0);", -+ "EGL_DISPMANX_WINDOW_T *eglWindow = new EGL_DISPMANX_WINDOW_T;" -+ ] - }, - "use": "egl bcm_host" - }, ---- new/qt-everywhere-src-5.15.2/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.cpp -+++ qt-everywhere-src-5.15.2/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.cpp -@@ -44,6 +44,12 @@ - - static DISPMANX_DISPLAY_HANDLE_T dispman_display = 0; - -+typedef struct { -+ DISPMANX_ELEMENT_HANDLE_T element; -+ int width; /* This is necessary because dispmanx elements are not queriable. */ -+ int height; -+} EGL_DISPMANX_WINDOW_T; -+ - static EGLNativeWindowType createDispmanxLayer(const QPoint &pos, const QSize &size, int z, DISPMANX_FLAGS_ALPHA_T flags) - { - VC_RECT_T dst_rect; -@@ -76,12 +82,12 @@ - eglWindow->width = size.width(); - eglWindow->height = size.height(); - -- return eglWindow; -+ return (EGLNativeWindowType)eglWindow; - } - - static void destroyDispmanxLayer(EGLNativeWindowType window) - { -- EGL_DISPMANX_WINDOW_T *eglWindow = static_cast(window); -+ EGL_DISPMANX_WINDOW_T *eglWindow = (EGL_DISPMANX_WINDOW_T*)(window); - DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0); - vc_dispmanx_element_remove(dispman_update, eglWindow->element); - vc_dispmanx_update_submit_sync(dispman_update); diff --git a/ci/armhf/runtime-armhf b/ci/armhf/runtime-armhf deleted file mode 100644 index d094f36552..0000000000 Binary files a/ci/armhf/runtime-armhf and /dev/null differ diff --git a/ci/armhf/scopy.desktop b/ci/armhf/scopy.desktop deleted file mode 100644 index f2f77d50fd..0000000000 --- a/ci/armhf/scopy.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=2.0 -Icon=scopy -Exec=scopy -Terminal=false -Type=Application -Categories=Science -Name=Scopy -GenericName=Oscilloscope -Comment=A software oscilloscope diff --git a/ci/flatpak/inside_flatpak_docker.sh b/ci/flatpak/inside_flatpak_docker.sh deleted file mode 100755 index 738e4183f4..0000000000 --- a/ci/flatpak/inside_flatpak_docker.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -xe - -if [ -n "$BRANCH" ]; then - ARTIFACT_LOCATION=/scopy -else - ARTIFACT_LOCATION=$GITHUB_WORKSPACE -fi - -apt-get install -y jq - -REPO_LOCAL=/home/docker/scopy-flatpak -cd "$REPO_LOCAL" - -#workaround for https://github.blog/2021-10-18-git-security-vulnerabilities-announced/#cve-2022-39253 -git config --global protocol.file.allow always - -# this ensures that latest master is pulled from origin while keeping file cache -# the cache should be updated from time to time locally -git fetch && git reset origin/ci-for-scopy2 --hard -git submodule update --init - -# Run the preprocess step to generate org.adi.Scopy.json -make preprocess - -# Disable the preprocess step; The Json file will now be modified and -# we don't want to re-generate it at the build step -export EN_PREPROCESS=false - -# check the number of elements in the json file in order to get the last element, which is Scopy -cnt=$( echo $(jq '.modules | length' org.adi.Scopy.json) ) -cnt=$(($cnt-1)) - -if [ -n "$BRANCH" ]; then - REPO_URL=https://github.com/"$REPO" - # We are building in Appveyor and we have access to the current branch on a CACHED Docker image - # use jq to replace the Scopy branch + the repo url used for building - # we want to build the branch and repo we're currently on - cat org.adi.Scopy.json | jq --tab '.modules['$cnt'].sources[0].branch = "'$BRANCH'"' > tmp.json - cp tmp.json org.adi.Scopy.json - cat org.adi.Scopy.json | jq --tab '.modules['$cnt'].sources[0].url = "'$REPO_URL'"' > tmp.json -else - # We are building in Github Actions and we use the current directory folder on a CLEAN Docker image - cat org.adi.Scopy.json | jq --tab '.modules['$cnt'].sources[0].type = "dir"' > tmp.json - cp tmp.json org.adi.Scopy.json - cat org.adi.Scopy.json | jq --tab '.modules['$cnt'].sources[0].path = "'$GITHUB_WORKSPACE'"' > tmp.json - cp tmp.json org.adi.Scopy.json - cat org.adi.Scopy.json | jq --tab 'del(.modules['$cnt'].sources[0].url)' > tmp.json - cp tmp.json org.adi.Scopy.json - cat org.adi.Scopy.json | jq --tab 'del(.modules['$cnt'].sources[0].branch)' > tmp.json -fi -cp tmp.json org.adi.Scopy.json -rm tmp.json - -# Generate build status info for the about page -echo "Details about the versions of dependencies can be found here" > build-status -cp build-status $GITHUB_WORKSPACE/build-status - -# Insert env vars in the sandboxed flatpak build -CI_ENVS=$(jq -R -n -c '[inputs|split("=")|{(.[0]):.[1]}] | add' $GITHUB_WORKSPACE/ci/general/gh-actions.envs) -echo "CI_ENVS= $CI_ENVS" -cat org.adi.Scopy.json | jq --tab '."build-options".env += ('$CI_ENVS')' > tmp.json -cp tmp.json org.adi.Scopy.json - -make clean -make -j4 - -# Copy the Scopy.flatpak file in $GITHUB_WORKSPACE (which is the external location, mount when docker starts) -cp Scopy.flatpak $ARTIFACT_LOCATION/ diff --git a/ci/general/gen_ci_envs.sh b/ci/general/gen_ci_envs.sh deleted file mode 100755 index 62cc021f13..0000000000 --- a/ci/general/gen_ci_envs.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -echo GITHUB_WORKSPACE=$GITHUB_WORKSPACE -echo REPO_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} -echo BUILD_HOST=${BUILD_HOST} -echo USERNAME=${USERNAME} -echo GITHUB_SERVER_URL=${GITHUB_SERVER_URL} -echo GITHUB_API_URL=${GITHUB_API_URL} -echo GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY%/*} -echo GITHUB_REPOSITORY=${GITHUB_REPOSITORY#*/} -echo GITHUB_RUN_ID=${GITHUB_RUN_ID} -echo GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} -echo GITHUB_JOB=${GITHUB_JOB} -echo GITHUB_RUN_ID=${GITHUB_RUN_ID} -echo GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} -echo RUNNER_ARCH=${RUNNER_ARCH} \ No newline at end of file diff --git a/ci/macOS/before_install_lib.sh b/ci/macOS/before_install_lib.sh deleted file mode 100755 index ad1b0826c5..0000000000 --- a/ci/macOS/before_install_lib.sh +++ /dev/null @@ -1,195 +0,0 @@ -#!/bin/bash -set -e - -NUM_JOBS=4 - -STAGING_AREA=$PWD/staging -STAGINGDIR=$STAGING_AREA/dependencies -WORKDIR=$STAGING_AREA - -export PYTHON3=python3 - -__cmake() { - local args="$1" - mkdir -p build - pushd build # build - - cmake -DCMAKE_PREFIX_PATH="$STAGINGDIR" -DCMAKE_INSTALL_PREFIX="$STAGINGDIR" \ - -DCMAKE_EXE_LINKER_FLAGS="-L${STAGINGDIR}/lib" \ - $args .. $SILENCED - CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib make -j${NUM_JOBS} $SILENCED - make -j${NUM_JOBS} - sudo make install - popd -} - -__make() { - $preconfigure - $configure --prefix="$STAGINGDIR" - $make -j${NUM_JOBS} - sudo $make install -} - -__qmake() { - $QMAKE $qtarget - make -j${NUM_JOBS} - sudo make install -} - -__build_common() { - local dir="$1" - local buildfunc="$2" - local getfunc="$3" - local subdir="$4" - local args="$5" - - pushd "$WORKDIR" # deps dir - - # if we have this folder, we may not need to download it - [ -d "$dir" ] || $getfunc - - pushd "$dir" # this dep dir - [ -z "$subdir" ] || pushd "$subdir" # in case there is a build subdir or smth - - $buildfunc "$args" - - popd - popd - [ -z "$subdir" ] || popd -} - -wget_and_untar() { - [ -d "$WORKDIR/$dir" ] || { - local tar_file="${dir}.tar.gz" - wget --no-check-certificate "$url" -O "$tar_file" - tar -xvf "$tar_file" > /dev/null - [ -z "$patchfunc" ] || { - pushd $dir - $patchfunc - popd - } - } -} - -git_clone_update() { - [ -d "$WORKDIR/$dir" ] || { - [ -z "$branch" ] || branch="-b $branch" - git clone --recursive $branch "$url" "$dir" - [ -z "$patchfunc" ] || { - pushd $dir - $patchfunc - popd - } - } -} - -cmake_build_wget() { - local dir="$1" - local url="$2" - - __build_common "$dir" "__cmake" "wget_and_untar" -} - -cmake_build_git() { - local dir="$1" - local url="$2" - local branch="$3" - local args="$4" - - __build_common "$dir" "__cmake" "git_clone_update" "" "$args" -} - -make_build_wget() { - local dir="$1" - local url="$2" - local configure="${3:-./configure}" - local make="${4:-make}" - - __build_common "$dir" "__make" "wget_and_untar" -} - -make_build_git() { - local dir="$1" - local url="$2" - local configure="${3:-./configure}" - local make="${4:-make}" - local preconfigure="$5" - - __build_common "$dir" "__make" "git_clone_update" -} - -qmake_build_wget() { - local dir="$1" - local url="$2" - local qtarget="$3" - local patchfunc="$4" - - __build_common "$dir" "__qmake" "wget_and_untar" -} - -qmake_build_git() { - local dir="$1" - local url="$2" - local branch="$3" - local qtarget="$4" - local patchfunc="$5" - - __build_common "$dir" "__qmake" "git_clone_update" -} - -qmake_build_local() { - local dir="$1" - local qtarget="$2" - local patchfunc="$3" - [ ! -d "$WORKDIR/$dir" ] || { - [ -z "$patchfunc" ] || { - pushd $WORKDIR/$dir - $patchfunc - popd - } - } - __build_common "$dir" "__qmake" -} - -patch_qwt() { - patch -p1 <<-EOF ---- a/qwtconfig.pri -+++ b/qwtconfig.pri -@@ -19,7 +19,7 @@ - QWT_INSTALL_PREFIX = \$\$[QT_INSTALL_PREFIX] - - unix { -- QWT_INSTALL_PREFIX = /usr/local -+ QWT_INSTALL_PREFIX = $STAGINGDIR - # QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-ma-qt-\$\$QT_VERSION - } - -@@ -42,7 +42,7 @@ QWT_INSTALL_LIBS = \$\${QWT_INSTALL_PREFIX}/lib - # runtime environment of designer/creator. - ###################################################################### - --QWT_INSTALL_PLUGINS = \$\${QWT_INSTALL_PREFIX}/plugins/designer -+#QWT_INSTALL_PLUGINS = \$\${QWT_INSTALL_PREFIX}/plugins/designer - - # linux distributors often organize the Qt installation - # their way and QT_INSTALL_PREFIX doesn't offer a good -@@ -163,7 +163,7 @@ QWT_CONFIG += QwtOpenGL - - macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) { - -- QWT_CONFIG += QwtFramework -+# QWT_CONFIG += QwtFramework - } - - ###################################################################### ---- a/src/src.pro -+++ b/src/src.pro -@@ -36,6 +36,7 @@ contains(QWT_CONFIG, QwtDll) { - QMAKE_LFLAGS_SONAME= - } - } -+ macx: QWT_SONAME=\$\${QWT_INSTALL_LIBS}/libqwt.dylib - } -EOF -} - diff --git a/ci/macOS/build_azure_macos.sh b/ci/macOS/build_azure_macos.sh deleted file mode 100755 index ab63225923..0000000000 --- a/ci/macOS/build_azure_macos.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -set -ex -REPO_SRC=$(git rev-parse --show-toplevel) -source $REPO_SRC/ci/macOS/macos_config.sh - -build_iio-emu(){ - echo "### Clone and Build IIO-Emulator" - pushd $REPO_SRC - if [ ! -d "$REPO_SRC/iio-emu" ]; then - git clone https://github.com/analogdevicesinc/iio-emu $REPO_SRC/iio-emu - fi - mkdir -p $REPO_SRC/iio-emu/build - cd $REPO_SRC/iio-emu/build - cmake \ - -DCMAKE_LIBRARY_PATH="$STAGING_AREA_DEPS" \ - -DCMAKE_INSTALL_PREFIX="$STAGING_AREA_DEPS" \ - -DCMAKE_PREFIX_PATH="${STAGING_AREA_DEPS};${STAGING_AREA_DEPS}/lib/cmake;" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_STAGING_PREFIX="$STAGING_AREA_DEPS" \ - -DCMAKE_EXE_LINKER_FLAGS="-L${STAGING_AREA_DEPS}/lib" \ - ../ - CFLAGS=-I${STAGING_AREA_DEPS}/include LDFLAGS=-L${STAGING_AREA_DEPS}/lib make ${JOBS} - popd -} - -build_scopy(){ - echo "### Building Scopy" - ls -la $REPO_SRC - pushd $REPO_SRC - - rm -rf $REPO_SRC/build - mkdir -p $REPO_SRC/build - cd $REPO_SRC/build - cmake \ - -DCMAKE_LIBRARY_PATH="$STAGING_AREA_DEPS" \ - -DCMAKE_INSTALL_PREFIX="$STAGING_AREA_DEPS" \ - -DCMAKE_PREFIX_PATH="${STAGING_AREA_DEPS};${STAGING_AREA_DEPS}/lib/cmake;${STAGING_AREA_DEPS}/lib/pkgconfig;${STAGING_AREA_DEPS}/lib/cmake/gnuradio;${STAGING_AREA_DEPS}/lib/cmake/iio" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_STAGING_PREFIX="$STAGING_AREA_DEPS" \ - -DCMAKE_EXE_LINKER_FLAGS="-L${STAGING_AREA_DEPS}/lib" \ - -DENABLE_TESTING=OFF \ - ../ - CFLAGS=-I${STAGING_AREA_DEPS}/include LDFLAGS=-L${STAGING_AREA_DEPS}/lib make ${JOBS} - otool -l ./Scopy.app/Contents/MacOS/Scopy - otool -L ./Scopy.app/Contents/MacOS/Scopy - popd -} - -build_iio-emu -build_scopy diff --git a/ci/macOS/install_macos_deps.sh b/ci/macOS/install_macos_deps.sh deleted file mode 100755 index 3b0df3a357..0000000000 --- a/ci/macOS/install_macos_deps.sh +++ /dev/null @@ -1,302 +0,0 @@ -#!/bin/bash - -set -ex -REPO_SRC=$(git rev-parse --show-toplevel) -source $REPO_SRC/ci/macOS/macos_config.sh - -PACKAGES=" ${QT_FORMULAE} volk spdlog boost pkg-config cmake fftw bison gettext autoconf automake libtool libzip glib libusb glog " -PACKAGES="$PACKAGES doxygen wget gnu-sed libmatio dylibbundler libxml2 ghr libserialport libsndfile" - -OS_VERSION=${1:-$(sw_vers -productVersion)} -echo "MacOS version $OS_VERSION" - -source ${REPO_SRC}/ci/macOS/before_install_lib.sh - -install_packages() { - - # Workaround: Homebrew fails to upgrade Python's 2to3 due to conflicting symlinks https://github.com/actions/runner-images/issues/6817 - rm /usr/local/bin/2to3 || true - rm /usr/local/bin/idle3 || true - rm /usr/local/bin/pydoc3 || true - rm /usr/local/bin/python3 || true - rm /usr/local/bin/python3-config || true - - brew update - brew upgrade || true #ignore homebrew upgrade errors - brew search ${QT_FORMULAE} - brew install --display-times $PACKAGES - for pkg in gcc bison gettext cmake python; do - brew link --overwrite --force $pkg - done - - pip3 install --break-system-packages mako -} - -export_paths(){ - QT_PATH="$(brew --prefix ${QT_FORMULAE})/bin" - export PATH="/usr/local/bin:$PATH" - export PATH="/usr/local/opt/bison/bin:$PATH" - export PATH="${QT_PATH}:$PATH" - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libzip/lib/pkgconfig" - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig" - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$STAGING_AREA_DEPS/lib/pkgconfig" - - QMAKE="$(command -v qmake)" - CMAKE_BIN="$(command -v cmake)" - CMAKE_OPTS="-DCMAKE_PREFIX_PATH=$STAGING_AREA_DEPS -DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS" - CMAKE="$CMAKE_BIN ${CMAKE_OPTS[*]}" - - echo -- USING CMAKE COMMAND: - echo $CMAKE - echo -- USING QT: $QT_PATH - echo -- USING QMAKE: $QMAKE - echo -- PATH: $PATH - echo -- PKG_CONFIG_PATH: $PKG_CONFIG_PATH -} - -clone() { - echo "#######CLONE#######" - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - git clone --recursive https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio - git clone --recursive https://github.com/analogdevicesinc/libad9361-iio.git -b $LIBAD9361_BRANCH libad9361 - git clone --recursive https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH libm2k - git clone --recursive https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH gr-scopy - git clone --recursive https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH gr-m2k - git clone --recursive https://github.com/gnuradio/gnuradio.git -b $GNURADIO_BRANCH gnuradio - git clone --recursive https://github.com/cseci/qwt.git -b $QWT_BRANCH qwt - git clone --recursive https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH libsigrokdecode - git clone --recursive https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH libtinyiiod - popd -} - -generate_status_file(){ - # Generate build status info for the about page - BUILD_STATUS_FILE=${REPO_SRC}/build-status - brew list --versions $PACKAGES > $BUILD_STATUS_FILE -} - -save_version_info() { - echo "$CURRENT_BUILD - $(git rev-parse --short HEAD)" >> $BUILD_STATUS_FILE -} - -build_with_cmake() { - echo $PWD - BUILD_FOLDER=$PWD/build - rm -rf $BUILD_FOLDER - git clean -xdf - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE $CURRENT_BUILD_CMAKE_OPTS ../ - make $JOBS - - #clear variable - CURRENT_BUILD_CMAKE_OPTS="" -} - -build_libiio() { - echo "### Building libiio - version $LIBIIO_VERSION" - CURRENT_BUILD=libiio - save_version_info - - pushd $STAGING_AREA/libiio - CURRENT_BUILD_CMAKE_OPTS="\ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=ON \ - -DENABLE_DNS_SD:BOOL=ON \ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - -DINSTALL_UDEV_RULE:BOOL=OFF \ - -DWITH_SERIAL_BACKEND:BOOL=ON \ - -DENABLE_IPV6:BOOL=OFF \ - -DOSX_PACKAGE:BOOL=OFF - " - build_with_cmake - sudo make install - sudo chmod -R 775 $STAGING_AREA_DEPS - sudo chmod 664 $STAGING_AREA_DEPS/lib/pkgconfig/libiio.pc - cp -R $STAGING_AREA/libiio/build/iio.framework $STAGING_AREA_DEPS/lib - popd -} - -build_libm2k() { - echo "### Building libm2k - branch $LIBM2K_BRANCH" - pushd $STAGING_AREA/libm2k - CURRENT_BUILD=libm2k - save_version_info - - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DENABLE_CSHARP=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DENABLE_TOOLS=OFF \ - -DINSTALL_UDEV_RULES=OFF \ - -DENABLE_LOG=OFF\ - " - build_with_cmake - make install - popd -} - -build_libad9361() { - echo "### Building libad9361 - branch $LIBAD9361_BRANCH" - CURRENT_BUILD=libad9361-iio - save_version_info - - pushd $STAGING_AREA/libad9361 - build_with_cmake - make install - popd -} - -build_gnuradio() { - echo "### Building gnuradio - branch $GNURADIO_BRANCH" - CURRENT_BUILD=gnuradio - save_version_info - - pushd $STAGING_AREA/gnuradio - CURRENT_BUILD_CMAKE_OPTS="\ - -DPYTHON_EXECUTABLE=/usr/bin/python3 \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_IIO=ON \ - -DENABLE_POSTINSTALL=OFF - " - build_with_cmake - make install - popd -} - -build_grm2k() { - echo "### Building gr-m2k - branch $GRM2K_BRANCH" - CURRENT_BUILD=gr-m2k - save_version_info - - pushd $STAGING_AREA/gr-m2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DDIGITAL=OFF - " - build_with_cmake - make install - popd -} - -build_grscopy() { - echo "### Building gr-scopy - branch $GRSCOPY_BRANCH" - CURRENT_BUILD=gr-scopy - save_version_info - - pushd $STAGING_AREA/gr-scopy - CURRENT_BUILD_CMAKE_OPTS="-DWITH_PYTHON=OFF " - build_with_cmake - make install - popd -} - -build_libsigrokdecode() { - echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH" - CURRENT_BUILD=libsigrokdecode - save_version_info - - pushd $STAGING_AREA/libsigrokdecode - git reset --hard - git clean -xdf - ./autogen.sh - ./configure --prefix $STAGING_AREA_DEPS - make $JOBS install - popd -} - -patch_qwt() { - patch -p1 <<-EOF ---- a/qwtconfig.pri -+++ b/qwtconfig.pri -@@ -19,7 +19,7 @@ - QWT_INSTALL_PREFIX = \$\$[QT_INSTALL_PREFIX] - - unix { -- QWT_INSTALL_PREFIX = /usr/local -+ QWT_INSTALL_PREFIX = $STAGING_AREA_DEPS - # QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-ma-qt-\$\$QT_VERSION - } - -@@ -42,7 +42,7 @@ QWT_INSTALL_LIBS = \$\${QWT_INSTALL_PREFIX}/lib - # runtime environment of designer/creator. - ###################################################################### - --QWT_INSTALL_PLUGINS = \$\${QWT_INSTALL_PREFIX}/plugins/designer -+#QWT_INSTALL_PLUGINS = \$\${QWT_INSTALL_PREFIX}/plugins/designer - - # linux distributors often organize the Qt installation - # their way and QT_INSTALL_PREFIX doesn't offer a good -@@ -163,7 +163,7 @@ QWT_CONFIG += QwtOpenGL - - macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) { - -- QWT_CONFIG += QwtFramework -+# QWT_CONFIG += QwtFramework - } - - ###################################################################### ---- a/src/src.pro -+++ b/src/src.pro -@@ -36,6 +36,7 @@ contains(QWT_CONFIG, QwtDll) { - QMAKE_LFLAGS_SONAME= - } - } -+ macx: QWT_SONAME=\$\${QWT_INSTALL_LIBS}/libqwt.dylib - } -EOF -} - - -build_qwt() { - echo "### Building qwt - branch qwt-multiaxes" - CURRENT_BUILD=qwt - save_version_info - pushd $STAGING_AREA/qwt - git clean -xdf - git reset --hard - patch_qwt - $QMAKE INCLUDEPATH=$STAGING_AREA_DEPS/include LIBS=-L$STAGING_AREA_DEPS/lib qwt.pro - make $JOBS - make install - popd -} - -build_libtinyiiod() { - echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH" - CURRENT_BUILD=libtinyiiod - save_version_info - - pushd $STAGING_AREA/libtinyiiod - CURRENT_BUILD_CMAKE_OPTS="-DBUILD_EXAMPLES=OFF" - build_with_cmake - make install - popd -} - -build_deps(){ - build_libiio - build_libad9361 - build_libm2k - build_gnuradio - build_grscopy - build_grm2k - build_qwt - build_libsigrokdecode - build_libtinyiiod -} - -install_packages -export_paths -clone -generate_status_file -build_deps diff --git a/ci/macOS/macos_config.sh b/ci/macOS/macos_config.sh deleted file mode 100644 index 467602ce14..0000000000 --- a/ci/macOS/macos_config.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -STAGING_AREA=$PWD/staging -STAGING_AREA_DEPS=$STAGING_AREA/dependencies -REPO_SRC=$(git rev-parse --show-toplevel) -BUILDDIR=$REPO_SRC/build -JOBS=-j8 -QT_FORMULAE=qt@5 -QT_PATH="$(brew --prefix ${QT_FORMULAE})/bin" -export PATH="${QT_PATH}:$PATH" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$STAGING_AREA_DEPS;$STAGING_AREA_DEPS/lib" - - -LIBIIO_VERSION=v0.25 -LIBAD9361_BRANCH=main -LIBM2K_BRANCH=main -GNURADIO_BRANCH=maint-3.10 -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=main -QWT_BRANCH=qwt-multiaxes -LIBSIGROKDECODE_BRANCH=master -LIBTINYIIOD_BRANCH=master diff --git a/ci/macOS/package_darwin.sh b/ci/macOS/package_darwin.sh deleted file mode 100755 index 77dc9e65be..0000000000 --- a/ci/macOS/package_darwin.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/bash -set -ex -REPO_SRC=$(git rev-parse --show-toplevel) -source $REPO_SRC/ci/macOS/macos_config.sh - -pushd $BUILDDIR - -SCOPYPLUGINS=$(find $BUILDDIR/Scopy.app/Contents/MacOs/plugins -name "*.dylib" -type f) -SCOPYLIBS=$(find $BUILDDIR/Scopy.app/Contents/Frameworks -name "*.dylib" -type f) - -echo "### Copy DLLs to Frameworks folder" -cp -R $STAGING_AREA/libiio/build/iio.framework Scopy.app/Contents/Frameworks/ -cp -R $STAGING_AREA/libad9361/build/ad9361.framework Scopy.app/Contents/Frameworks/ - -libqwtpath=${STAGING_AREA_DEPS}/lib/libqwt.6.4.0.dylib #hardcoded -libqwtid="$(otool -D ${libqwtpath} | tail -1)" -echo "=== Fixing libqwt" -[ -z "$(otool -L ${libqwtpath} | grep libqwt...dylib)" ] || install_name_tool -id ${libqwtid} ${libqwtpath} -otool -L ${libqwtpath} -install_name_tool -change ${libqwtid} ${libqwtpath} ./Scopy.app/Contents/MacOS/Scopy -for dylib in ${SCOPYLIBS} ${SCOPYPLUGINS} -do - [ -z "$(otool -L ${dylib} | grep libqwt...dylib)" ] || install_name_tool -change ${libqwtid} ${libqwtpath} ${dylib} - otool -L $dylib -done - - -iiorpath="$(otool -D ./Scopy.app/Contents/Frameworks/iio.framework/iio | grep @rpath)" -iioid=${iiorpath#"@rpath/"} - -ad9361rpath="$(otool -D ./Scopy.app/Contents/Frameworks/ad9361.framework/ad9361 | grep @rpath)" -ad9361id=${ad9361rpath#"@rpath/"} - -libusbpath="$(otool -L ./Scopy.app/Contents/Frameworks/iio.framework/iio | grep libusb | cut -d " " -f 1 | awk '{$1=$1};1')" -libusbid="$(echo ${libusbpath} | rev | cut -d "/" -f 1 | rev)" -cp ${libusbpath} ./Scopy.app/Contents/Frameworks/ - -m2kpath=${STAGING_AREA_DEPS}/lib/libm2k.dylib -m2krpath="$(otool -D ${m2kpath} | grep @rpath)" -m2kid=${m2krpath#"@rpath/"} -cp ${STAGING_AREA_DEPS}/lib/libm2k.* ./Scopy.app/Contents/Frameworks -install_name_tool -id @executable_path/../Frameworks/${m2kid} ./Scopy.app/Contents/Frameworks/${m2kid} - - -echo "### Check available python version" -for version in 3.8 3.9 3.10 3.11 3.12 -do - if [ -e $(brew --prefix python3)/Frameworks/Python.framework/Versions/$version/Python ] ; then - pythonpath=$(brew --prefix python3)/Frameworks/Python.framework/Versions/$version/Python - pyversion=$version - pythonidrpath="$(otool -D $pythonpath | head -2 | tail -1)" - fi -done - -if [ -z $pyversion ] ; then - echo "No Python 3.8, 3.9, 3.10, 3.11, 3.12 paths found" - exit 1 -fi -echo " - Found python$version at $pythonpath" -pythonid=${pythonidrpath#"$(brew --prefix python3)/Frameworks/"} -cp -R $(brew --prefix python3)/Frameworks/Python.framework Scopy.app/Contents/Frameworks/ - -echo "### Fixing scopy libraries and plugins " -for dylib in ${SCOPYLIBS} ${SCOPYPLUGINS} -do - echo "--- FIXING LIB: ${dylib##*/}" - echo $STAGING_AREA_DEPS/lib | dylibbundler --no-codesign --overwrite-files --bundle-deps --create-dir \ - --fix-file $dylib \ - --dest-dir $BUILDDIR/Scopy.app/Contents/Frameworks/ \ - --install-path @executable_path/../Frameworks/ \ - --search-path $BUILDDIR/Scopy.app/Contents/Frameworks/ -done - - -echo "### Fixing Scopy binary" -echo $STAGING_AREA_DEPS/lib | dylibbundler -ns -of -b \ - -x $BUILDDIR/Scopy.app/Contents/MacOS/Scopy \ - -d $BUILDDIR/Scopy.app/Contents/Frameworks \ - -p @executable_path/../Frameworks \ - -s $BUILDDIR/Scopy.app/Contents/Frameworks - -echo "### Fixing the frameworks dylibbundler failed to copy" -echo "=== Fixing iio.framework" -install_name_tool -id @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/iio.framework/iio -install_name_tool -id @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/${iioid} -install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/MacOS/Scopy -for dylib in ${SCOPYLIBS} ${SCOPYPLUGINS} -do - otool -L $dylib - [ -z "$(otool -L ${dylib}| grep iio.framework)" ] && echo "SKIP ${dylib##*/}" || install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ${dylib} -done - - -echo "=== Fixing ad9361.framework" -install_name_tool -id @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/Frameworks/ad9361.framework/ad9361 -install_name_tool -id @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/Frameworks/${ad9361id} -install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/${ad9361id} -install_name_tool -change ${ad9361rpath} @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/Frameworks/libgnuradio-iio* - -echo "=== Fixing libusb" -install_name_tool -id @executable_path/../Frameworks/${libusbid} ./Scopy.app/Contents/Frameworks/${libusbid} -install_name_tool -change ${libusbpath} @executable_path/../Frameworks/${libusbid} ./Scopy.app/Contents/Frameworks/iio.framework/iio - -echo "=== Fixing python" -install_name_tool -id @executable_path/../Frameworks/${pythonid} ./Scopy.app/Contents/Frameworks/${pythonid} -python_sigrokdecode=$(otool -L ./Scopy.app/Contents/Frameworks/libsigrokdecode* | grep python | cut -d " " -f 1 | awk '{$1=$1};1') -install_name_tool -change ${python_sigrokdecode} @executable_path/../Frameworks/${pythonid} ./Scopy.app/Contents/Frameworks/libsigrokdecode* -python_scopy=$(otool -L ./Scopy.app/Contents/MacOS/Scopy | grep -i python | cut -d " " -f 1 | awk '{$1=$1};1') -install_name_tool -change ${python_scopy} @executable_path/../Frameworks/${pythonid} ./Scopy.app/Contents/MacOS/Scopy -for dylib in ${SCOPYLIBS} ${SCOPYPLUGINS} -do - otool -L $dylib - python=$(otool -L ${dylib} | grep -i python | cut -d " " -f 1 | awk '{$1=$1};1'); - [ -z "${python}" ] && echo "SKIP ${dylib##*/}" || install_name_tool -change ${python} @executable_path/../Frameworks/${pythonid} ${dylib} -done - - -echo "=== Fixing libserialport" -libserialportpath="$(otool -L ./Scopy.app/Contents/Frameworks/iio.framework/iio | grep libserialport | cut -d " " -f 1 | awk '{$1=$1};1')" -libserialportid="$(echo ${libserialportpath} | rev | cut -d "/" -f 1 | rev)" -install_name_tool -change ${libserialportpath} @executable_path/../Frameworks/${libserialportid} ./Scopy.app/Contents/Frameworks/iio.framework/iio - -install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/libm2k.dylib -install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/libm2k.?.?.?.dylib -install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/libgnuradio-m2k* -install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/libgnuradio-scopy* -install_name_tool -change ${m2krpath} @executable_path/../Frameworks/${m2kid} ./Scopy.app/Contents/Frameworks/libgnuradio-m2k* -install_name_tool -change ${m2krpath} @executable_path/../Frameworks/${m2kid} ./Scopy.app/Contents/Frameworks/libgnuradio-scopy* - - -echo "=== Fixing iio-emu + libtinyiiod" -cp $REPO_SRC/iio-emu/build/iio-emu ./Scopy.app/Contents/MacOS/ -echo $STAGING_AREA_DEPS/lib | dylibbundler -ns -of -b \ - --fix-file $BUILDDIR/Scopy.app/Contents/MacOS/iio-emu \ - --dest-dir $BUILDDIR/Scopy.app/Contents/Frameworks/ \ - --install-path @executable_path/../Frameworks/ \ - --search-path $BUILDDIR/Scopy.app/Contents/Frameworks/ - -echo "=== Bundle the Qt libraries & Create Scopy.dmg" -macdeployqt Scopy.app -verbose=3 -zip -Xvr ScopyApp.zip Scopy.app -macdeployqt Scopy.app -dmg -verbose=3 -popd diff --git a/ci/old/before_deploy.sh b/ci/old/before_deploy.sh deleted file mode 100644 index 1a4eee9789..0000000000 --- a/ci/old/before_deploy.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -set -e - -deploy=0 -if [ -z "$TRAVIS_BUILD_DIR" ] ; then - t=$(find ./ -name CMakeCache.txt|head -1) - if [ -n "${t}" ] ; then - cd $(dirname $(dirname ${t})) - TRAVIS_BUILD_DIR=$(pwd) - else - echo "I am confused - can't find CMakeCache.txt" - exit - fi -else - cd $TRAVIS_BUILD_DIR -fi -pwd - -if [ -z "${LDIST}" ] ; then - LDIST=-$(lsb_release -c | awk '{print $NF}') -fi - -check_file() -{ -temp="" -for i in $(find ./ -name CMakeCache.txt) -do -hit=$(find $(dirname ${i}) -maxdepth 1 -name "scopy*.$1" | grep -v -- ${LDIST}) -if [ "$(echo ${hit} | wc -w)" -gt "1" ] ; then - echo "I am confused - more than 2 $1 files!" - echo $hit - exit 1 -else - if [ "$(echo ${hit} | wc -w)" -eq "1" ] ; then - if [ -z "${temp}" ] ; then - temp=$hit - else - echo "I am confused - more than 2 $1 files" - echo $temp - echo $hit - exit 1 - fi - fi -fi -done -} - -check_file dmg -if [ -n "${temp}" ] ; then - deploy=$(expr ${deploy} + 1) - if [ -z "${TARGET_DMG}" ] ; then - export TARGET_DMG=$(echo ${temp} | \ - sed -e 's:^./.*/::' -e 's:.dmg$::')${LDIST}.dmg - fi - echo "deploying ${temp} to nightly $TARGET_DMG" - if [ -z "${RELEASE_PKG_FILE_DMG}" ] ; then - export RELEASE_PKG_FILE_DMG=$(dirname ${temp})/${TARGET_DMG} - cp ${temp} ${RELEASE_PKG_FILE_DMG} - fi - echo ${TARGET_DMG} - ls -lh ${temp} - echo ${RELEASE_PKG_FILE_DMG} - ls -lh ${RELEASE_PKG_FILE_DMG} -else - echo "Skipping deployment of OS X package" -fi - -if [ "${deploy}" -eq "0" ] ; then - echo did not deploy any files - exit 1 -fi diff --git a/ci/old/before_install_darwin.sh b/ci/old/before_install_darwin.sh deleted file mode 100755 index 7c18aa1dc1..0000000000 --- a/ci/old/before_install_darwin.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -set -e - -. CI/travis/lib.sh - -if [ -z "${LDIST}" -a -f "build/.LDIST" ] ; then - export LDIST="-$(cat build/.LDIST)" -fi -if [ -z "${LDIST}" ] ; then - export LDIST="-$(get_ldist)" -fi - -brew update - -brew_install_or_upgrade() { - brew install $1 || \ - brew upgrade $1 || \ - brew ls --versions $1 # check if installed last-ly -} - -brew_install() { - brew install $1 || \ - brew ls --versions $1 -} - -PYTHON="python3 python@2 python brew-pip" -PACKAGES="qt cmake fftw bison gettext autoconf automake libtool libzip glib libusb $PYTHON" -PACKAGES="$PACKAGES glibmm doxygen wget boost gnu-sed libmatio dylibbundler libxml2 pkg-config" - -for pak in $PACKAGES ; do - brew_install $pak -done - -brew upgrade python3 - -for pkg in qt gcc bison gettext; do - brew link --overwrite --force $pkg -done - -. CI/travis/before_install_lib.sh - -QT_PATH="$(brew --prefix qt)/bin" -export PATH="${QT_PATH}:$PATH" -export PATH="/usr/local/opt/bison/bin:$PATH" - -patch_qwtpolar_mac() { - patch_qwtpolar - - patch -p1 <<-EOF ---- a/qwtpolarconfig.pri -+++ b/qwtpolarconfig.pri -@@ -16,7 +16,9 @@ QWT_POLAR_VER_PAT = 1 - QWT_POLAR_VERSION = \$\${QWT_POLAR_VER_MAJ}.\$\${QWT_POLAR_VER_MIN}.\$\${QWT_POLAR_VER_PAT} - - unix { -- QWT_POLAR_INSTALL_PREFIX = /usr/local/qwtpolar-\$\$QWT_POLAR_VERSION -+ QWT_POLAR_INSTALL_PREFIX = $STAGINGDIR -+ QMAKE_CXXFLAGS = -I${STAGINGDIR}/include -+ QMAKE_LFLAGS = ${STAGINGDIR}/lib/libqwt*dylib - } - - win32 { -EOF -} - -# Get pip if not installed ; on Travis + OS X, Python is not well supported -if ! command -v pip ; then - curl https://bootstrap.pypa.io/get-pip.py > get-pip.py - sudo -H python get-pip.py -fi - -QMAKE="$(command -v qmake)" - -pip install --user cheetah - -make_build_git "libsigrok" "https://github.com/sigrokproject/libsigrok" "" "" "./autogen.sh" - -make_build_wget "libsigrokdecode-0.4.1" "http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-0.4.1.tar.gz" - -qmake_build_git "qwt" "https://github.com/osakared/qwt.git" "qwt-6.1-multiaxes" "qwt.pro" "patch_qwt" - -qmake_build_wget "qwtpolar-1.1.1" "https://downloads.sourceforge.net/project/qwtpolar/qwtpolar/1.1.1/qwtpolar-1.1.1.tar.bz2" "qwtpolar.pro" "patch_qwtpolar_mac" - -cmake_build_wget "volk-1.3" "http://libvolk.org/releases/volk-1.3.tar.gz" - -cmake_build_git "gnuradio" "https://github.com/analogdevicesinc/gnuradio" "scopy" "-DENABLE_INTERNAL_VOLK:BOOL=OFF -DENABLE_GR_FEC:BOOL=OFF -DENABLE_GR_DIGITAL:BOOL=OFF -DENABLE_GR_DTV:BOOL=OFF -DENABLE_GR_ATSC:BOOL=OFF -DENABLE_GR_AUDIO:BOOL=OFF -DENABLE_GR_CHANNELS:BOOL=OFF -DENABLE_GR_NOAA:BOOL=OFF -DENABLE_GR_PAGER:BOOL=OFF -DENABLE_GR_TRELLIS:BOOL=OFF -DENABLE_GR_VOCODER:BOOL=OFF" - -if [ "$TRAVIS" == "true" ] ; then - for pkg in libiio libad9361-iio ; do - wget http://swdownloads.analog.com/cse/travis_builds/master_latest_${pkg}${LDIST}.pkg - sudo installer -pkg master_latest_${pkg}${LDIST}.pkg -target / - done -else - SUDO=sudo - cmake_build_git "libiio" "https://github.com/analogdevicesinc/libiio" "" "-DINSTALL_UDEV_RULE:BOOL=OFF" - - cmake_build_git "libad9361-iio" "https://github.com/analogdevicesinc/libad9361-iio" - # no longer need sudo from here - unset SUDO -fi - -cmake_build_git "gr-iio" "https://github.com/analogdevicesinc/gr-iio" diff --git a/ci/old/before_install_lib_travis.sh b/ci/old/before_install_lib_travis.sh deleted file mode 100644 index 99e76ff0cd..0000000000 --- a/ci/old/before_install_lib_travis.sh +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/bash -set -e - -source ./CI/travis/lib.sh - -__cmake() { - local args="$1" - mkdir -p build - pushd build # build - - if [ "$TRAVIS" == "true" ] ; then - cmake $args .. - make -j${NUM_JOBS} - sudo make install - else - cmake -DCMAKE_PREFIX_PATH="$STAGINGDIR" -DCMAKE_INSTALL_PREFIX="$STAGINGDIR" \ - -DCMAKE_EXE_LINKER_FLAGS="-L${STAGINGDIR}/lib" \ - $args .. $SILENCED - CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib make -j${NUM_JOBS} $SILENCED - make install - fi - - popd -} - -__make() { - $preconfigure - if [ "$TRAVIS" == "true" ] ; then - $configure - $make -j${NUM_JOBS} - sudo $make install - else - $configure --prefix="$STAGINGDIR" $SILENCED - CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib $make -j${NUM_JOBS} $SILENCED - $SUDO $make install - fi -} - -__qmake() { - if [ "$TRAVIS" == "true" ] ; then - $QMAKE $qtarget - make -j${NUM_JOBS} - sudo make install - else - $QMAKE "$qtarget" $SILENCED - QMAKE=$QMAKE CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib \ - make -j${NUM_JOBS} $SILENCED - $SUDO make install - fi -} - -__build_common() { - local dir="$1" - local buildfunc="$2" - local getfunc="$3" - local subdir="$4" - local args="$5" - - pushd "$WORKDIR" # deps dir - - # if we have this folder, we may not need to download it - [ -d "$dir" ] || $getfunc - - pushd "$dir" # this dep dir - [ -z "$subdir" ] || pushd "$subdir" # in case there is a build subdir or smth - - $buildfunc "$args" - - popd - popd - [ -z "$subdir" ] || popd -} - -wget_and_untar() { - [ -d "$WORKDIR/$dir" ] || { - local tar_file="${dir}.tar.gz" - wget --no-check-certificate "$url" -O "$tar_file" - tar -xvf "$tar_file" > /dev/null - [ -z "$patchfunc" ] || { - pushd $dir - $patchfunc - popd - } - } -} - -git_clone_update() { - [ -d "$WORKDIR/$dir" ] || { - [ -z "$branch" ] || branch="-b $branch" - git clone --recursive $branch "$url" "$dir" - [ -z "$patchfunc" ] || { - pushd $dir - $patchfunc - popd - } - } -} - -cmake_build_wget() { - local dir="$1" - local url="$2" - - __build_common "$dir" "__cmake" "wget_and_untar" -} - -cmake_build_git() { - local dir="$1" - local url="$2" - local branch="$3" - local args="$4" - - __build_common "$dir" "__cmake" "git_clone_update" "" "$args" -} - -make_build_wget() { - local dir="$1" - local url="$2" - local configure="${3:-./configure}" - local make="${4:-make}" - - __build_common "$dir" "__make" "wget_and_untar" -} - -make_build_git() { - local dir="$1" - local url="$2" - local configure="${3:-./configure}" - local make="${4:-make}" - local preconfigure="$5" - - __build_common "$dir" "__make" "git_clone_update" -} - -qmake_build_wget() { - local dir="$1" - local url="$2" - local qtarget="$3" - local patchfunc="$4" - - __build_common "$dir" "__qmake" "wget_and_untar" -} - -qmake_build_git() { - local dir="$1" - local url="$2" - local branch="$3" - local qtarget="$4" - local patchfunc="$5" - - __build_common "$dir" "__qmake" "git_clone_update" -} - -patch_qwt() { - patch -p1 <<-EOF ---- a/qwtconfig.pri -+++ b/qwtconfig.pri -@@ -19,7 +19,7 @@ QWT_VERSION = \$\${QWT_VER_MAJ}.\$\${QWT_VER_MIN}.\$\${QWT_VER_PAT} - QWT_INSTALL_PREFIX = \$\$[QT_INSTALL_PREFIX] - - unix { -- QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-svn -+ QWT_INSTALL_PREFIX = $STAGINGDIR - # QWT_INSTALL_PREFIX = /usr/local/qwt-\$\$QWT_VERSION-svn-qt-\$\$QT_VERSION - } - -@@ -161,7 +161,7 @@ QWT_CONFIG += QwtPlayground - - macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) { - -- QWT_CONFIG += QwtFramework -+ #QWT_CONFIG += QwtFramework - } - - ###################################################################### ---- a/src/src.pro -+++ b/src/src.pro -@@ -30,7 +30,8 @@ contains(QWT_CONFIG, QwtDll) { - - # we increase the SONAME for every minor number - -- QWT_SONAME=libqwt.so.\$\${VER_MAJ}.\$\${VER_MIN} -+ !macx: QWT_SONAME=libqwt.so.\$\${VER_MAJ}.\$\${VER_MIN} -+ macx: QWT_SONAME=\$\${QWT_INSTALL_LIBS}/libqwt.dylib - QMAKE_LFLAGS *= \$\${QMAKE_LFLAGS_SONAME}\$\${QWT_SONAME} - QMAKE_LFLAGS_SONAME= - } ---- a/textengines/mathml/mathml.pro -+++ b/textengines/mathml/mathml.pro -@@ -57,7 +57,8 @@ contains(QWT_CONFIG, QwtDll) { - - # we increase the SONAME for every minor number - -- QWT_SONAME=libqwtmathml.so.\$\${VER_MAJ}.\$\${VER_MIN} -+ !macx: QWT_SONAME=libqwtmathml.so.\$\${VER_MAJ}.\$\${VER_MIN} -+ macx: QWT_SONAME=\$\${QWT_INSTALL_LIBS}/libqwtmathml.dylib - QMAKE_LFLAGS *= \$\${QMAKE_LFLAGS_SONAME}\$\${QWT_SONAME} - QMAKE_LFLAGS_SONAME= - } -EOF -} - -patch_qwtpolar() { - wget https://raw.githubusercontent.com/analogdevicesinc/scopy-flatpak/master/qwtpolar-qwt-6.1-compat.patch -O - | patch -p1 - - patch -p1 <<-EOF ---- a/qwtpolarconfig.pri -+++ b/qwtpolarconfig.pri -@@ -70,14 +72,14 @@ QWT_POLAR_INSTALL_FEATURES = \$\${QWT_POLAR_INSTALL_PREFIX}/features - # Otherwise you have to build it from the designer directory. - ###################################################################### - --QWT_POLAR_CONFIG += QwtPolarDesigner -+#QWT_POLAR_CONFIG += QwtPolarDesigner - - ###################################################################### - # If you want to auto build the examples, enable the line below - # Otherwise you have to build them from the examples directory. - ###################################################################### - --QWT_POLAR_CONFIG += QwtPolarExamples -+#QWT_POLAR_CONFIG += QwtPolarExamples - - ###################################################################### - # When Qt has been built as framework qmake wants -@@ -86,6 +88,6 @@ QWT_POLAR_CONFIG += QwtPolarExamples - - macx:CONFIG(qt_framework, qt_framework|qt_no_framework) { - -- QWT_POLAR_CONFIG += QwtPolarFramework -+ #QWT_POLAR_CONFIG += QwtPolarFramework - } - -EOF -} diff --git a/ci/old/before_install_linux.sh b/ci/old/before_install_linux.sh deleted file mode 100755 index e668c0e262..0000000000 --- a/ci/old/before_install_linux.sh +++ /dev/null @@ -1,232 +0,0 @@ -#!/bin/bash -set -e - -. CI/travis/lib.sh - -handle_ubuntu_flatpak_docker() { - sudo apt-get -qq update - sudo service docker restart - sudo docker pull alexandratr/ubuntu-flatpak-kde:latest -} - -handle_ubuntu_docker() { - sudo apt-get -qq update - sudo service docker restart - sudo docker pull ubuntu:${OS_VERSION} -} - -handle_centos_docker() { - sudo apt-get -qq update - sudo service docker restart - sudo docker pull centos:${OS_VERSION} -} - -install_breakpad() { - pushd "$WORKDIR" - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git - export PATH=$PATH:$(pwd)/depot_tools - mkdir breakpad && cd breakpad - fetch breakpad - cd src - ./configure CXXFLAGS="-Wno-error" - make - sudo make install - popd -} - -handle_default() { - pwd - ls - - if [ -z "${LDIST}" -a -f "build/.LDIST" ] ; then - export LDIST="-$(cat build/.LDIST)" - fi - if [ -z "${LDIST}" ] ; then - export LDIST="-$(get_ldist)" - fi - - if ! is_new_ubuntu ; then - CODENAME=-"$(get_codename)" - sudo add-apt-repository --yes ppa:beineri/opt-qt592${CODENAME} - fi - -sudo apt-get -qq update -sudo apt-get install -y build-essential g++ bison flex libxml2-dev libglibmm-2.4-dev \ - libmatio-dev libglib2.0-dev libzip-dev libfftw3-dev libusb-dev doxygen \ - python-cheetah cmake - -BOOST_PACKAGES_BASE="libboost libboost-regex libboost-date-time - libboost-program-options libboost-test libboost-filesystem - libboost-system libboost-thread" - -for package in $BOOST_PACKAGES_BASE ; do - BOOST_PACKAGES="$BOOST_PACKAGES ${package}${BOOST_VER}-dev" -done - -sudo apt-get install -y $BOOST_PACKAGES - -. CI/travis/before_install_lib.sh - -if ! is_new_ubuntu ; then - sudo apt-get install -y qt59base qt59declarative qt59quickcontrols \ - qt59svg qt59tools python-dev automake libtool mesa-common-dev \ - libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev - # temporarily disable `set -e` - QMAKE=/opt/qt59/bin/qmake - $QMAKE -set QMAKE $QMAKE - set +e - . /opt/qt59/bin/qt59-env.sh - set -e -else - sudo apt-get install -y qt5-default qttools5-dev qtdeclarative5-dev \ - libqt5svg5-dev libqt5opengl5-dev - QMAKE="$(command -v qmake)" -fi - -patch_qwtpolar_linux() { - patch_qwtpolar - - patch -p1 <<-EOF ---- a/qwtpolarconfig.pri -+++ b/qwtpolarconfig.pri -@@ -16,7 +16,9 @@ QWT_POLAR_VER_PAT = 1 - QWT_POLAR_VERSION = \$\${QWT_POLAR_VER_MAJ}.\$\${QWT_POLAR_VER_MIN}.\$\${QWT_POLAR_VER_PAT} - - unix { -- QWT_POLAR_INSTALL_PREFIX = /usr/local/qwtpolar-\$\$QWT_POLAR_VERSION -+ QWT_POLAR_INSTALL_PREFIX = $STAGINGDIR -+ QMAKE_CXXFLAGS = -I${STAGINGDIR}/include -+ QMAKE_LFLAGS = -L${STAGINGDIR}/lib - } - - win32 { -EOF -} - -install_breakpad - -if ! is_new_ubuntu ; then - make_build_git "libsigrok" "https://github.com/sigrokproject/libsigrok" "" "" "./autogen.sh" - - make_build_wget "libsigrokdecode-0.4.1" "http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-0.4.1.tar.gz" - - cmake_build_wget "volk-1.3" "http://libvolk.org/releases/volk-1.3.tar.gz" -else - sudo apt-get install -y \ - libvolk1-dev libsigrok-dev libsigrokcxx-dev libsigrokdecode-dev -fi - -qmake_build_git "qwt" "https://github.com/osakared/qwt.git" "qwt-6.1-multiaxes" "qwt.pro" "patch_qwt" - -qmake_build_wget "qwtpolar-1.1.1" "https://downloads.sourceforge.net/project/qwtpolar/qwtpolar/1.1.1/qwtpolar-1.1.1.tar.bz2" "qwtpolar.pro" "patch_qwtpolar_linux" - -cmake_build_git "gnuradio" "https://github.com/analogdevicesinc/gnuradio" "scopy" "-DENABLE_INTERNAL_VOLK:BOOL=OFF -DENABLE_GR_FEC:BOOL=OFF -DENABLE_GR_DIGITAL:BOOL=OFF -DENABLE_GR_DTV:BOOL=OFF -DENABLE_GR_ATSC:BOOL=OFF -DENABLE_GR_AUDIO:BOOL=OFF -DENABLE_GR_CHANNELS:BOOL=OFF -DENABLE_GR_NOAA:BOOL=OFF -DENABLE_GR_PAGER:BOOL=OFF -DENABLE_GR_TRELLIS:BOOL=OFF -DENABLE_GR_VOCODER:BOOL=OFF" - -if [ "$TRAVIS" == "true" ] ; then -# for pkg in libiio libad9361-iio ; do -# wget http://swdownloads.analog.com/cse/travis_builds/master_latest_${pkg}${LDIST}.deb -# sudo dpkg -i ./master_latest_${pkg}${LDIST}.deb -# done - wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio${LDIST}.deb - sudo dpkg -i ./master_latest_libiio${LDIST}.deb - wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio${CODENAME}.deb - sudo dpkg -i ./master_latest_libad9361-iio${CODENAME}.deb -else - cmake_build_git "libiio" "https://github.com/analogdevicesinc/libiio" "" "-DINSTALL_UDEV_RULE:BOOL=OFF" - - cmake_build_git "libad9361-iio" "https://github.com/analogdevicesinc/libad9361-iio" "" "-DLIBIIO_INCLUDEDIR:PATH=$STAGINGDIR/include -DLIBIIO_LIBRARIES:FILEPATH=$STAGINGDIR/lib/libiio.so" -fi - -cmake_build_git "gr-iio" "https://github.com/analogdevicesinc/gr-iio" -} - -handle_centos() { - ls - - yum install -y epel-release - - yum -y groupinstall 'Development Tools' - - yum -y update - - yum -y install cmake3 gcc bison boost-devel python2-devel python36 libxml2-devel libzip-devel \ - fftw-devel bison flex yum matio-devel glibmm24-devel glib2-devel doxygen \ - swig git libusb1-devel doxygen python-six python-mako \ - rpm rpm-build libxml2-devel \ - python-cheetah wget tar autoconf autoconf-archive \ - libffi-devel libmount-devel pcre2-devel cppunit-devel - - yum -y install python36 python36-pip python36-devel - - ln -s /usr/bin/cmake3 /usr/bin/cmake - - . CI/travis/before_install_lib.sh - - yum -y install qt5-qtbase qt5-qtbase-common qt5-qtbase-devel qt5-qtbase-gui \ - qt5-qtdeclarative-devel qt5-qtquickcontrols \ - qt5-qtsvg-devel qt5-qttools-devel qt5-qttools-static qt5-qtscript automake libtool libglvnd-glx libstdc++ \ - mesa-libEGL - - QMAKE=/usr/lib64/qt5/bin/qmake - $QMAKE -set QMAKE $QMAKE - - install_breakpad - export TRAVIS="true" - -patch_qwtpolar_linux() { - patch_qwtpolar - - patch -p1 <<-EOF ---- a/qwtpolarconfig.pri -+++ b/qwtpolarconfig.pri -@@ -16,7 +16,9 @@ QWT_POLAR_VER_PAT = 1 - QWT_POLAR_VERSION = \$\${QWT_POLAR_VER_MAJ}.\$\${QWT_POLAR_VER_MIN}.\$\${QWT_POLAR_VER_PAT} - - unix { -- QWT_POLAR_INSTALL_PREFIX = /usr/local/qwtpolar-\$\$QWT_POLAR_VERSION -+ QWT_POLAR_INSTALL_PREFIX = $STAGINGDIR -+ QMAKE_CXXFLAGS = -I${STAGINGDIR}/include -+ QMAKE_LFLAGS = -L${STAGINGDIR}/lib - } - - win32 { -EOF -} - - make_build_git "libsigrok" "https://github.com/sigrokproject/libsigrok" "" "" "./autogen.sh" - - make_build_wget "libsigrokdecode-0.4.1" "http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-0.4.1.tar.gz" - - - qmake_build_git "qwt" "https://github.com/osakared/qwt.git" "qwt-6.1-multiaxes" "qwt.pro" "patch_qwt" - - qmake_build_wget "qwtpolar-1.1.1" "https://downloads.sourceforge.net/project/qwtpolar/qwtpolar/1.1.1/qwtpolar-1.1.1.tar.bz2" "qwtpolar.pro" "patch_qwtpolar_linux" - - cmake_build_git "gnuradio" \ - "https://github.com/analogdevicesinc/gnuradio" \ - "scopy" \ - "-DENABLE_INTERNAL_VOLK:BOOL=ON -DENABLE_GR_FEC:BOOL=OFF -DENABLE_GR_DIGITAL:BOOL=OFF -DENABLE_GR_DTV:BOOL=OFF -DENABLE_GR_ATSC:BOOL=OFF -DENABLE_GR_AUDIO:BOOL=OFF -DENABLE_GR_CHANNELS:BOOL=OFF -DENABLE_GR_NOAA:BOOL=OFF -DENABLE_GR_PAGER:BOOL=OFF -DENABLE_GR_TRELLIS:BOOL=OFF -DENABLE_GR_VOCODER:BOOL=OFF" - - if [ "$TRAVIS" == "true" ] ; then - # for pkg in libiio libad9361-iio ; do - # wget http://swdownloads.analog.com/cse/travis_builds/master_latest_${pkg}${LDIST}.deb - # sudo dpkg -i ./master_latest_${pkg}${LDIST}.deb - # done - wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio${LDIST}.rpm - sudo yum localinstall -y ./master_latest_libiio${LDIST}.rpm - wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio${LDIST}.rpm - sudo yum localinstall -y ./master_latest_libad9361-iio${LDIST}.rpm - else - cmake_build_git "libiio" "https://github.com/analogdevicesinc/libiio" "" "-DINSTALL_UDEV_RULE:BOOL=OFF" - - cmake_build_git "libad9361-iio" "https://github.com/analogdevicesinc/libad9361-iio" "" "-DLIBIIO_INCLUDEDIR:PATH=$STAGINGDIR/include -DLIBIIO_LIBRARIES:FILEPATH=$STAGINGDIR/lib/libiio.so" - fi - - cmake_build_git "gr-iio" "https://github.com/analogdevicesinc/gr-iio" -} - -OS_TYPE=${1:-default} -OS_VERSION=${2} -LIBNAME=${3:-home/travis/build/analogdevicesinc/scopy} - -handle_${OS_TYPE} diff --git a/ci/old/deploy.sh b/ci/old/deploy.sh deleted file mode 100644 index 97e7503c2e..0000000000 --- a/ci/old/deploy.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -set -e - -cd $TRAVIS_BUILD_DIR - -send() -{ -if [ "$#" -ne 3 ] ; then - echo "skipping deployment of something" - echo "send called with $@" - return -fi - -if [ "x$1" = "x" ] ; then - echo no file to send - return -fi - -if [ ! -r "$1" ] ; then - echo "file $1 is not readable" - ls -l $1 - return -fi - -if [ $BRANCH_PULL ] ; then - branch=$BRANCH_PULL -else - branch=$BRANCH -fi - -FROM=$1 -TO=${branch}_$2 -LATE=${branch}_latest_scopy${LDIST}$3 -GLOB=${DEPLOY_TO}/${branch}_scopy-* - -echo attemting to deploy $FROM to $TO -echo and ${branch}_scopy${LDIST}$3 -ssh -V - -echo "cd ${DEPLOY_TO}" > script$3 -if curl -m 10 -s -I -f -o /dev/null http://swdownloads.analog.com/cse/travis_builds/${TO} ; then - echo "rm ${TO}" >> script$3 -fi -echo "put ${FROM} ${TO}" >> script$3 -echo "ls -l ${TO}" >> script$3 -if curl -m 10 -s -I -f -o /dev/null http://swdownloads.analog.com/cse/travis_builds/${LATE} ; then - echo "rm ${LATE}" >> script$3 -fi -echo "symlink ${TO} ${LATE}" >> script$3 -echo "ls -l ${LATE}" >> script$3 -echo "bye" >> script$3 - -sftp ${EXTRA_SSH} -b script$3 ${SSHUSER}@${SSHHOST} - -# limit things to a few files, so things don't grow forever -if [ "${LDIST}" = "-precise" -a "$3" = ".deb" ] ; then - for files in $(ssh ${EXTRA_SSH} ${SSHUSER}@${SSHHOST} \ - "ls -lt ${GLOB}" | tail -n +100 | awk '{print $NF}') - do - ssh ${EXTRA_SSH} ${SSHUSER}@${SSHHOST} \ - "rm ${DEPLOY_TO}/${files}" - done -fi -} - -# from to suffix -send ${RELEASE_PKG_FILE_DMG} ${TARGET_DMG} .dmg diff --git a/ci/old/extract_msys_deps.sh b/ci/old/extract_msys_deps.sh deleted file mode 100644 index ebc363a1e4..0000000000 --- a/ci/old/extract_msys_deps.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/bash.exe - -SCOPY_MINGW_BUILD_DEPS_FORK=analogdevicesinc -SCOPY_MINGW_BUILD_DEPS_BRANCH=master - -echo "Download pre-downloaded MSYS2 libraries with required versions... " -wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/old-msys-build-deps-$MINGW_VERSION.tar.xz?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/old-msys-build-deps-$MINGW_VERSION.tar.xz -cd /c -tar xvf /tmp/old-msys-build-deps-$MINGW_VERSION.tar.xz diff --git a/ci/old/inside_centos_docker.sh b/ci/old/inside_centos_docker.sh deleted file mode 100755 index 3428c3a0dc..0000000000 --- a/ci/old/inside_centos_docker.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -xe - -LIBNAME="$1" - -cd /$LIBNAME - -/$LIBNAME/CI/travis/before_install_linux.sh centos centos7 "$LIBNAME" - -export TRAVIS="false" - -echo $PATH -echo $PKG_CONFIG_PATH - -ls /usr/local/lib/pkgconfig -ls /usr/local/lib64/pkgconfig - - -/$LIBNAME/CI/travis/make_linux.sh "$LIBNAME" centos -. /${LIBNAME}/CI/travis/lib.sh -echo "$(get_ldist)" > /${LIBNAME}/build/.LDIST diff --git a/ci/old/inside_ubuntu_docker.sh b/ci/old/inside_ubuntu_docker.sh deleted file mode 100644 index b8e04b1da1..0000000000 --- a/ci/old/inside_ubuntu_docker.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -xe - -LIBNAME="$1" - -cd /$LIBNAME - -apt-get -qq update -apt-get -y install sudo -apt-get -y install software-properties-common git wget -pwd -ls -/$LIBNAME/CI/travis/before_install_linux.sh default bionic "$LIBNAME" - -/$LIBNAME/CI/travis/make_linux.sh "$LIBNAME" default -. /${LIBNAME}/CI/travis/lib.sh -echo "$(get_ldist)" > /${LIBNAME}/build/.LDIST diff --git a/ci/old/inside_ubuntu_flatpak_docker.sh b/ci/old/inside_ubuntu_flatpak_docker.sh deleted file mode 100644 index fcb008b8ef..0000000000 --- a/ci/old/inside_ubuntu_flatpak_docker.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -xe - -cd /home -apt-get -y install flatpak-builder git wget cmake - -git clone https://github.com/analogdevicesinc/scopy-flatpak -b test -cd scopy-flatpak -make -j4 - -ls - diff --git a/ci/old/install_msys_deps.sh b/ci/old/install_msys_deps.sh deleted file mode 100644 index a7c66f6450..0000000000 --- a/ci/old/install_msys_deps.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/bash.exe - -SCOPY_MINGW_BUILD_DEPS_FORK=analogdevicesinc -SCOPY_MINGW_BUILD_DEPS_BRANCH=master - -echo "Download and install pre-compiled libraries ... " -wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/scopy-$MINGW_VERSION-build-deps-pacman.txt?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/scopy-$MINGW_VERSION-build-deps-pacman.txt -wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/scopy-$MINGW_VERSION-build-deps.tar.xz?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/scopy-$MINGW_VERSION-build-deps.tar.xz -wget "https://ci.appveyor.com/api/projects/$SCOPY_MINGW_BUILD_DEPS_FORK/scopy-mingw-build-deps/artifacts/scopy-mingw-build-status?branch=$SCOPY_MINGW_BUILD_DEPS_BRANCH&job=Environment: MINGW_VERSION=$MINGW_VERSION, ARCH=$ARCH" -O /tmp/scopy-mingw-build-status - - -cd /c - -pacman -S --noconfirm unzip -wget https://swdownloads.analog.com/cse/scopydeps/cv2pdb.zip -unzip cv2pdb.zip -#/c/cv2pdb/cv2pdb.exe - -tar xJf /tmp/scopy-$MINGW_VERSION-build-deps.tar.xz - -cat /tmp/scopy-mingw-build-status - -SCOPY_MINGW_BUILD_DEPS_PACMAN=$(/dev/null 2>&1 -} - -ensure_command_exists() { - local cmd="$1" - local package="$2" - [ -n "$cmd" ] || return 1 - [ -n "$package" ] || package="$cmd" - ! command_exists "$cmd" || return 0 - # go through known package managers - for pacman in apt-get brew yum ; do - command_exists $pacman || continue - $pacman install -y $package || { - # Try an update if install doesn't work the first time - $pacman -y update && \ - $pacman install -y $package - } - return $? - done - return 1 -} - -ensure_command_exists wget -ensure_command_exists sudo - -# Get the common stuff from libiio -[ -f ${TRAVIS_BUILD_DIR}/build/lib.sh ] || { - mkdir -p ${TRAVIS_BUILD_DIR}/build - wget https://raw.githubusercontent.com/analogdevicesinc/libiio/master/CI/travis/lib.sh \ - -O ${TRAVIS_BUILD_DIR}/build/lib.sh -} - -. ${TRAVIS_BUILD_DIR}/build/lib.sh - -if [ -z "${LDIST}" -a -f "build/.LDIST" ] ; then - export LDIST="-$(cat build/.LDIST)" -fi -if [ -z "${LDIST}" ] || [ "$LDIST" = "DO_NOT_DEPLOY" ] ; then - export LDIST="-$(get_ldist)" -fi diff --git a/ci/old/make_darwin.sh b/ci/old/make_darwin.sh deleted file mode 100755 index 03eb381e1a..0000000000 --- a/ci/old/make_darwin.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -e - -. CI/travis/lib.sh - -# if we have a Qt59 installation use it -if [ -f /opt/qt59/bin/qt59-env.sh ] ; then - . /opt/qt59/bin/qt59-env.sh -fi - -if command -v brew ; then - QT_PATH="$(brew --prefix qt)/bin" - export PATH="${QT_PATH}:$PATH" -fi - -NUM_JOBS=4 - -mkdir -p build - -pushd build - -if [ "$TRAVIS" == "true" ] ; then - cmake .. - make -j${NUM_JOBS} -else - cmake -DCMAKE_PREFIX_PATH="$STAGINGDIR;${QT_PATH}/lib/cmake" -DCMAKE_INSTALL_PREFIX="$STAGINGDIR" \ - -DCMAKE_EXE_LINKER_FLAGS="-L${STAGINGDIR}/lib" .. - CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib make -j${NUM_JOBS} -fi - -popd - diff --git a/ci/old/make_linux.sh b/ci/old/make_linux.sh deleted file mode 100755 index 894516c783..0000000000 --- a/ci/old/make_linux.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -e - -. CI/travis/lib.sh - -handle_default() { -echo "HANDLE DEFAULT" - # if we have a Qt59 installation use it -if [ -f /opt/qt59/bin/qt59-env.sh ] ; then - set +e - . /opt/qt59/bin/qt59-env.sh - set -e -fi - -NUM_JOBS=4 - -mkdir -p build -pushd build -if [ "$TRAVIS" == "true" ] ; then - cmake .. - make -j${NUM_JOBS} -else - cmake -DCMAKE_PREFIX_PATH="$STAGINGDIR;${QT_PATH}/lib/cmake" -DCMAKE_INSTALL_PREFIX="$STAGINGDIR" \ - -DCMAKE_EXE_LINKER_FLAGS="-L${STAGINGDIR}/lib" .. - CFLAGS=-I${STAGINGDIR}/include LDFLAGS=-L${STAGINGDIR}/lib make -j${NUM_JOBS} -fi - -popd -} - -handle_centos() { - export PATH=/usr/lib64:/usr/local/lib/pkgconfig:$PATH - export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig - - handle_default -} - -handle_centos_docker() { - sudo docker run --rm=true \ - -v `pwd`:/scopy:rw \ - centos:${OS_VERSION} \ - /bin/bash -xe /scopy/CI/travis/inside_centos_docker.sh scopy -} - -handle_ubuntu_docker() { - sudo docker run --rm=true \ - -v `pwd`:/scopy:rw \ - ubuntu:${OS_VERSION} \ - /bin/bash -xe /scopy/CI/travis/inside_ubuntu_docker.sh scopy -} - -handle_ubuntu_flatpak_docker() { - sudo docker run --privileged --rm=true \ - -v `pwd`:/scopy:rw \ - alexandratr/ubuntu-flatpak-kde:latest \ - /bin/bash -xe /scopy/CI/travis/inside_ubuntu_flatpak_docker.sh -} - -LIBNAME=${1:-home/travis/build/analogdevicesinc/scopy} -OS_TYPE=${2:-default} -OS_VERSION="$3" - -handle_${OS_TYPE} diff --git a/ci/old/package_darwin_travis.sh b/ci/old/package_darwin_travis.sh deleted file mode 100755 index 2826e2acef..0000000000 --- a/ci/old/package_darwin_travis.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -set -e - -sudo cp -a /usr/local/opt/icu4c/lib/. /usr/local/lib -sudo echo "/usr/local/lib" | dylibbundler -od -b -x ./Scopy.app/Contents/MacOS/Scopy -d ./Scopy.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ >/dev/null - -sudo cp -R /usr/local/opt/python/Frameworks/Python.framework Scopy.app/Contents/Frameworks/ -sudo cp -R /Library/Frameworks/iio.framework Scopy.app/Contents/Frameworks/ -sudo cp -R /Library/Frameworks/ad9361.framework Scopy.app/Contents/Frameworks/ - -iiorpath="$(otool -D ./Scopy.app/Contents/Frameworks/iio.framework/iio | grep @rpath)" -ad9361rpath="$(otool -D ./Scopy.app/Contents/Frameworks/ad9361.framework/ad9361 | grep @rpath)" -if [ -e /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python ] ; then - pythonidrpath="$(otool -D /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python | head -2 | tail -1)" -elif [ -e /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/Python ] ; then - pythonidrpath="$(otool -D /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/Python | head -2 | tail -1)" -else - echo "No Python 3.7 or 3.6 paths found" - exit 1 -fi -libusbpath="$(otool -L ./Scopy.app/Contents/Frameworks/iio.framework/iio | grep libusb | cut -d " " -f 1)" -libusbid="$(echo ${libusbpath} | rev | cut -d "/" -f 1 | rev)" - -sudo cp ${libusbpath} ./Scopy.app/Contents/Frameworks/ - -iioid=${iiorpath#"@rpath/"} -ad9361id=${ad9361rpath#"@rpath/"} -pythonid=${pythonidrpath#"/usr/local/opt/python/Frameworks/"} - -sudo install_name_tool -id @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/iio.framework/iio -sudo install_name_tool -id @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/${iioid} -sudo install_name_tool -id @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/Frameworks/ad9361.framework/ad9361 -sudo install_name_tool -id @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/Frameworks/${ad9361id} -sudo install_name_tool -id @executable_path/../Frameworks/${pythonid} ./Scopy.app/Contents/Frameworks/${pythonid} -sudo install_name_tool -id @executable_path/../Frameworks/${libusbid} ./Scopy.app/Contents/Frameworks/${libusbid} - -sudo install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/MacOS/Scopy -sudo install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/${ad9361id} -sudo install_name_tool -change ${iiorpath} @executable_path/../Frameworks/${iioid} ./Scopy.app/Contents/Frameworks/libgnuradio-iio* -sudo install_name_tool -change ${ad9361rpath} @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/MacOS/Scopy -sudo install_name_tool -change ${ad9361rpath} @executable_path/../Frameworks/${ad9361id} ./Scopy.app/Contents/Frameworks/libgnuradio-iio* -sudo install_name_tool -change ${pythonidrpath} @executable_path/../Frameworks/${pythonid} ./Scopy.app/Contents/Frameworks/libsigrokdecode* -sudo install_name_tool -change ${libusbpath} @executable_path/../Frameworks/${libusbid} ./Scopy.app/Contents/Frameworks/iio.framework/iio - -sudo /usr/local/opt/qt/bin/macdeployqt Scopy.app - -brew install python@2 || brew ls --versions python@2 -curl -o /tmp/macdeployqtfix.py https://raw.githubusercontent.com/aurelien-rainone/macdeployqtfix/master/macdeployqtfix.py -sudo /usr/local/opt/python2/bin/python2 /tmp/macdeployqtfix.py ./Scopy.app/Contents/MacOS/Scopy /usr/local/opt/qt/ -sudo /usr/local/opt/python2/bin/python2 /tmp/macdeployqtfix.py ./Scopy.app/Contents/MacOS/Scopy ./Scopy.app/Contents/Frameworks/ - -sudo /usr/local/opt/qt/bin/macdeployqt Scopy.app -dmg -cp Scopy.dmg ${TRAVIS_BUILD_DIR}/scopy_latest${LDIST}.dmg -curl --upload-file ${TRAVIS_BUILD_DIR}/scopy_latest${LDIST}.dmg https://transfer.sh/scopy_latest${LDIST}.dmg diff --git a/ci/old/patches/boost-darwin.patch b/ci/old/patches/boost-darwin.patch deleted file mode 100644 index abda8afca5..0000000000 --- a/ci/old/patches/boost-darwin.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/darwin.jam b/darwin.jam ---- a/tools/build/src/tools/darwin.jam -+++ b/tools/build/src/tools/darwin.jam -@@ -138,10 +138,10 @@ - common.handle-options darwin : $(condition) : $(command) : $(options) ; - - # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates. -- if $(real-version) < "4.0.0" -- { -- flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ; -- } -+# if $(real-version) < "4.0.0" -+# { -+# flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ; -+# } - # - GCC 4.2 and higher in Darwin does not have -Wno-long-double. - if $(real-version) < "4.2.0" - { diff --git a/ci/old/set_build_env_msys.sh b/ci/old/set_build_env_msys.sh deleted file mode 100644 index a0d97ec3bf..0000000000 --- a/ci/old/set_build_env_msys.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/bash.exe - -export MINGW_VERSION=mingw64 -export ARCH=x86_64 - -export CC=/${MINGW_VERSION}/bin/${ARCH}-w64-mingw32-gcc.exe -export CXX=/${MINGW_VERSION}/bin/${ARCH}-w64-mingw32-g++.exe - -export CMAKE_OPTS=" - -DCMAKE_C_COMPILER:FILEPATH=${CC} \ - -DCMAKE_CXX_COMPILER:FILEPATH=${CXX} \ - -DPKG_CONFIG_EXECUTABLE=/c/msys64/$MINGW_VERSION/bin/pkg-config.exe \ - -DCMAKE_PREFIX_PATH=/c/msys64/$MINGW_VERSION/lib/cmake \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - " - -export SCOPY_CMAKE_OPTS=" - $RC_COMPILER_OPT \ - -DBREAKPAD_HANDLER=OFF \ - -DGIT_EXECUTABLE=/c/Program\\ Files/Git/cmd/git.exe \ - -DPYTHON_EXECUTABLE=/$MINGW_VERSION/bin/python3.exe \ - " diff --git a/ci/ubuntu/docker_ubuntu20/Dockerfile b/ci/ubuntu/docker_ubuntu20/Dockerfile deleted file mode 100644 index 4f0cd0d480..0000000000 --- a/ci/ubuntu/docker_ubuntu20/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -#docker build -t cristianbindea/scopy2-ubuntu22 --build-arg QT_USER= --build-arg QT_PASSWORD= . - -FROM ubuntu:20.04 -SHELL ["/bin/bash", "-c"] - -ARG USER=runner -ENV DEBIAN_FRONTEND=noninteractive - -ENV TZ=Europe/Bucharest -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt-get update && apt-get -y upgrade && apt-get install -y apt-utils sudo git - -RUN groupadd -g 1000 -r $USER && \ - useradd -u 1000 -g 1000 --create-home -r $USER - -#Change password -RUN echo "$USER:$USER" | chpasswd - -#Make sudo passwordless -RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-$USER && \ - usermod -aG sudo $USER && \ - usermod -aG plugdev $USER - -USER $USER -WORKDIR /home/${USER} -RUN git clone https://github.com/analogdevicesinc/scopy --branch dev - -RUN source scopy/ci/ubuntu/ubuntu20_build_process.sh && install_apt - -RUN wget https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run && chmod +x qt-unified-linux-x64-online.run -ARG QT_USER -ARG QT_PASSWORD -RUN ./qt-unified-linux-x64-online.run install --ao --al --aa DownloadError=Retry -c -m $QT_USER --pw $QT_PASSWORD qt.qt5.5152.gcc_64 qt.tools.cmake -RUN sudo apt remove qtchooser && sudo ln -s /home/$USER/Qt/Tools/QtCreator/bin/qtcreator.sh /usr/local/bin/qtcreator - -RUN source scopy/ci/ubuntu/ubuntu20_build_process.sh && clone -RUN source scopy/ci/ubuntu/ubuntu20_build_process.sh && build_deps -RUN sudo rm -rf staging \ No newline at end of file diff --git a/ci/ubuntu/docker_ubuntu22/Dockerfile b/ci/ubuntu/docker_ubuntu22/Dockerfile deleted file mode 100644 index f1c9786083..0000000000 --- a/ci/ubuntu/docker_ubuntu22/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -#docker build -t cristianbindea/scopy2-ubuntu22 . - -FROM ubuntu:22.04 -SHELL ["/bin/bash", "-c"] - -ARG USER=runner -ENV DEBIAN_FRONTEND=noninteractive - -ENV TZ=Europe/Bucharest -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt-get update && apt-get -y upgrade && apt-get install -y apt-utils sudo git - -RUN groupadd -g 1000 -r $USER && \ - useradd -u 1000 -g 1000 --create-home -r $USER - -#Change password -RUN echo "$USER:$USER" | chpasswd - -#Make sudo passwordless -RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-$USER && \ - usermod -aG sudo $USER && \ - usermod -aG plugdev $USER - -USER $USER -WORKDIR /home/${USER} -RUN git clone https://github.com/analogdevicesinc/scopy --branch dev - -RUN source scopy/ci/ubuntu/ubuntu22_build_process.sh && install_apt - -RUN pip3 install aqtinstall && python3 -m aqt install-qt --outputdir $HOME linux desktop 5.15.2 - -RUN source scopy/ci/ubuntu/ubuntu22_build_process.sh && clone -RUN source scopy/ci/ubuntu/ubuntu22_build_process.sh && build_deps -RUN sudo rm -rf staging \ No newline at end of file diff --git a/ci/ubuntu/install_qt_ubuntu_20.sh b/ci/ubuntu/install_qt_ubuntu_20.sh deleted file mode 100755 index 1a62f461d9..0000000000 --- a/ci/ubuntu/install_qt_ubuntu_20.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo apt-get -y install vim git cmake qt5-default qtcreator qtdeclarative5-dev qtdeclarative5-dev-tools libqt5svg5 libqt5svg5-dev qttools5-dev qttools5-dev-tools libqt5opengl5 diff --git a/ci/ubuntu/ubuntu18_build_process.sh b/ci/ubuntu/ubuntu18_build_process.sh deleted file mode 100755 index 0e02002b55..0000000000 --- a/ci/ubuntu/ubuntu18_build_process.sh +++ /dev/null @@ -1,252 +0,0 @@ -#!/bin/bash - -LIBIIO_VERSION=0ed18cd8f6b2fac5204a99e38922bea73f1f778c -LIBAD9361_BRANCH=master -GLOG_BRANCH=v0.4.0 -LIBM2K_BRANCH=master -GRIIO_BRANCH=upgrade-3.8 -#GNURADIO_FORK=analogdevicesinc -#GNURADIO_BRANCH=scopy -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=master -QWT_BRANCH=qwt-multiaxes -LIBSIGROK_BRANCH=master -LIBSIGROKDECODE_BRANCH=master -LIBTINYIIOD_BRANCH=master - -set -e -if [ $# -eq 0 ]; then - echo "Using default qmake" - QMAKE=qmake - $QMAKE --version -else - QMAKE=$1/gcc_64/bin/qmake - $QMAKE --version - -fi - -cd ~ -WORKDIR=${PWD} - -install_apt() { - sudo add-apt-repository -y ppa:gnuradio/gnuradio-releases - sudo apt-get update - - curl -fsSL -o doxygen.tar.gz "https://phoenixnap.dl.sourceforge.net/project/doxygen/rel-1.8.17/doxygen-1.8.17.linux.bin.tar.gz" - tar -xzf doxygen.tar.gz - sudo cp -a doxygen-1.8.17/bin/doxy* /usr/local/bin - doxygen --version - - sudo apt-get -y install build-essential libxml2-dev libxml2 flex bison swig libpython3-all-dev python3 python3-numpy libfftw3-bin libfftw3-dev libfftw3-3 liblog4cpp5v5 liblog4cpp5-dev libboost1.65-dev libboost1.65 g++ git cmake autoconf libzip4 libzip-dev libglib2.0-dev libsigc++-2.0-dev libglibmm-2.4-dev curl libvolk1-bin libvolk1-dev libvolk1.3 libgmp-dev libmatio-dev liborc-0.4-dev subversion mesa-common-dev libgl1-mesa-dev libserialport0 libserialport-dev libusb-1.0 libusb-1.0-0 libusb-1.0-0-dev libaio-dev - - sudo apt-get -y update - sudo apt-get -y install gnuradio -} - -build_libiio() { - echo "### Building libiio - version $LIBIIO_VERSION" - - cd ~ - git clone https://github.com/analogdevicesinc/libiio.git ${WORKDIR}/libiio - cd ${WORKDIR}/libiio - git checkout $LIBIIO_VERSION - - mkdir ${WORKDIR}/libiio/build-${ARCH} - cd ${WORKDIR}/libiio/build-${ARCH} - # Download a 32-bit version of windres.exe - - cmake ${CMAKE_OPTS} \ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=OFF\ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - ${WORKDIR}/libiio - - make $JOBS - sudo make ${JOBS} install -# DESTDIR=${WORKDIR} make ${JOBS} install -} - -build_glog() { - - echo "### Building glog - branch $GLOG_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/google/glog.git -b $GLOG_BRANCH ${WORKDIR}/glog - - mkdir ${WORKDIR}/glog/build-${ARCH} - cd ${WORKDIR}/glog/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - -DWITH_GFLAGS=OFF\ - ${WORKDIR}/glog - - make $JOBS - sudo make ${JOBS} install - #DESTDIR=${WORKDIR} make ${JOBS} install -} - -build_libm2k() { - - echo "### Building libm2k - branch $LIBM2K_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH ${WORKDIR}/libm2k - - mkdir ${WORKDIR}/libm2k/build-${ARCH} - cd ${WORKDIR}/libm2k/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - -DENABLE_PYTHON=OFF\ - -DENABLE_CSHARP=OFF\ - -DENABLE_EXAMPLES=OFF\ - -DENABLE_TOOLS=OFF\ - -DINSTALL_UDEV_RULES=OFF\ - -DENABLE_LOG=ON\ - ${WORKDIR}/libm2k - - make $JOBS - sudo make ${JOBS} install - #DESTDIR=${WORKDIR} make ${JOBS} install -} -build_libad9361() { - echo "### Building libad9361 - branch $LIBAD9361_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/analogdevicesinc/libad9361-iio.git -b $LIBAD9361_BRANCH ${WORKDIR}/libad9361 - - mkdir ${WORKDIR}/libad9361/build-${ARCH} - cd ${WORKDIR}/libad9361/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - ${WORKDIR}/libad9361 - - make $JOBS - sudo make $JOBS install - #DESTDIR=${WORKDIR} make $JOBS install -} - -build_griio() { - echo "### Building gr-iio - branch $GRIIO_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/analogdevicesinc/gr-iio.git -b $GRIIO_BRANCH ${WORKDIR}/gr-iio - mkdir ${WORKDIR}/gr-iio/build-${ARCH} - cd ${WORKDIR}/gr-iio/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - ${WORKDIR}/gr-iio - - make $JOBS - sudo make $JOBS install - #DESTDIR=${WORKDIR} make $JOBS install -} - -build_grm2k() { - echo "### Building gr-m2k - branch $GRM2K_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH ${WORKDIR}/gr-m2k - mkdir ${WORKDIR}/gr-m2k/build-${ARCH} - cd ${WORKDIR}/gr-m2k/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - -DENABLE_PYTHON=OFF \ - -DDIGITAL=OFF \ - ${WORKDIR}/gr-m2k - - make $JOBS - sudo make $JOBS install - #DESTDIR=${WORKDIR} make $JOBS install - -} - -build_grscopy() { - echo "### Building gr-scopy - branch $GRSCOPY_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH ${WORKDIR}/gr-scopy - mkdir ${WORKDIR}/gr-scopy/build-${ARCH} - cd ${WORKDIR}/gr-scopy/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - ${WORKDIR}/gr-scopy - - make $JOBS - sudo make $JOBS install - #DESTDIR=${WORKDIR} make $JOBS install -} - -build_libsigrok() { - echo "### Building libsigrok - branch $LIBSIGROK_BRANCH" - - git clone --depth 1 https://github.com/sigrokproject/libsigrok.git -b $LIBSIGROK_BRANCH ${WORKDIR}/libsigrok - - mkdir ${WORKDIR}/libsigrok/build-${ARCH} - cd ${WORKDIR}/libsigrok - - ./autogen.sh - ./configure --disable-all-drivers --enable-bindings --enable-cxx - - sudo make $JOBS install - #DESTDIR=${WORKDIR} make $JOBS install - - # For some reason, Scopy chokes if these are present in enums.hpp - #sed -i "s/static const Quantity \* const DIFFERENCE;$//g" ${WORKDIR}/msys64/${MINGW_VERSION}/include/libsigrokcxx/enums.hpp - #sed -i "s/static const QuantityFlag \* const RELATIVE;$//g" ${WORKDIR}/msys64/${MINGW_VERSION}/include/libsigrokcxx/enums.hpp -} - -build_libsigrokdecode() { - echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH" - - git clone --depth 1 https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH ${WORKDIR}/libsigrokdecode - - cd ${WORKDIR}/libsigrokdecode - - ./autogen.sh - ./configure - - sudo make $JOBS install - #DESTDIR=${WORKDIR} make $JOBS install -} - -build_qwt() { - echo "### Building qwt - branch $QWT_BRANCH" - - git clone https://github.com/cseci/qwt --branch $QWT_BRANCH ${WORKDIR}/qwt - cd ${WORKDIR}/qwt - - $QMAKE qwt.pro - make $JOBS - sudo make install -} - -build_libtinyiiod() { - echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH" - - cd ~ - git clone --depth 1 https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH ${WORKDIR}/libtinyiiod - mkdir ${WORKDIR}/libtinyiiod/build-${ARCH} - cd ${WORKDIR}/libtinyiiod/build-${ARCH} - - cmake ${CMAKE_OPTS} \ - -DBUILD_EXAMPLES=OFF \ - ${WORKDIR}/libtinyiiod - - make $JOBS - sudo make $JOBS install -} - -install_apt -build_libiio -build_libad9361 -build_glog -build_libm2k -#build_griio -build_grscopy -build_grm2k -build_qwt -build_libsigrokdecode -build_libtinyiiod diff --git a/ci/ubuntu/ubuntu20_build_process.sh b/ci/ubuntu/ubuntu20_build_process.sh deleted file mode 100755 index 3f6e23cd21..0000000000 --- a/ci/ubuntu/ubuntu20_build_process.sh +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/bash -if [ "$CI_SCRIPT" == "ON" ] - then - set -ex - SRC_DIR=$GITHUB_WORKSPACE - git config --global --add safe.directory '*' - QT=/home/runner/Qt/5.15.2/gcc_64 # this is used to force the use of Qt5.15 for qt_add_resources - else - set -x - SRC_DIR=$(git rev-parse --show-toplevel) - QT=/opt/Qt/5.15.2/gcc_64 -fi - -USE_STAGING=$1 - -LIBIIO_VERSION=master -LIBAD9361_BRANCH=master -GLOG_BRANCH=v0.4.0 - -LIBM2K_BRANCH=master -SPDLOG_BRANCH=v1.x -VOLK_BRANCH=main -GNURADIO_BRANCH=maint-3.10 -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=master -LIBSIGROKDECODE_BRANCH=master -QWT_BRANCH=qwt-multiaxes -LIBTINYIIOD_BRANCH=master - -QMAKE_BIN=$QT/bin/qmake -CMAKE_BIN=/bin/cmake -JOBS=-j8 -ARCH=x86_64 - -if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - echo -- USING STAGING - STAGING_AREA=$PWD/staging - STAGING_AREA_DEPS=$STAGING_AREA/dependencies - mkdir -p $STAGING_AREA_DEPS - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STAGING_AREA_DEPS/lib:$QT/lib - CMAKE_OPTS=(\ - -DCMAKE_LIBRARY_PATH=$STAGING_AREA_DEPS \ - -DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS \ - -DCMAKE_PREFIX_PATH=$QT\;$STAGING_AREA_DEPS \ - -DCMAKE_EXE_LINKER_FLAGS="-L$STAGING_AREA_DEPS -L$STAGING_AREA_DEPS/lib" \ - -DCMAKE_SHARED_LINKER_FLAGS="-L$STAGING_AREA_DEPS -L$STAGING_AREA_DEPS/lib" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) - echo -- STAGING_DIR $STAGING_AREA_DEPS - else - echo -- NO STAGING - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QT/lib - CMAKE_OPTS=(\ - -DCMAKE_PREFIX_PATH=$QT \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) -fi - -CMAKE="$CMAKE_BIN ${CMAKE_OPTS[*]}" -echo -- USING CMAKE COMMAND: -echo $CMAKE -echo -- USING QT: $QT -echo -- USING QMAKE: $QMAKE_BIN - -clone() { - echo "#######CLONE#######" - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - git clone --recursive https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio - git clone --recursive https://github.com/analogdevicesinc/libad9361-iio.git -b $LIBAD9361_BRANCH libad9361 - git clone --recursive https://github.com/google/glog.git -b $GLOG_BRANCH glog - git clone --recursive https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH libm2k - git clone --recursive https://github.com/gabime/spdlog.git -b $SPDLOG_BRANCH spdlog - git clone --recursive https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH gr-scopy - git clone --recursive https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH gr-m2k - git clone --recursive https://github.com/gnuradio/volk.git -b $VOLK_BRANCH volk - git clone --recursive https://github.com/gnuradio/gnuradio.git -b $GNURADIO_BRANCH gnuradio - git clone --recursive https://github.com/cseci/qwt.git -b $QWT_BRANCH qwt - git clone --recursive https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH libsigrokdecode - git clone --recursive https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH libtinyiiod - popd -} - - -build_with_cmake() { - echo $PWD - BUILD_FOLDER=$PWD/build-${ARCH} - rm -rf $BUILD_FOLDER - git clean -xdf - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE $CURRENT_BUILD_CMAKE_OPTS ../ - make $JOBS - if [ $INSTALL = "ON" ] - then - sudo make $JOBS install - sudo ldconfig - fi - INSTALL="" - CURRENT_BUILD_CMAKE_OPTS="" -} - -update(){ - sudo apt-get update - sudo apt-get -y upgrade -} - -install_apt() { - sudo DEBIAN_FRONTEND=noninteractive apt-get -y install keyboard-configuration - sudo apt-get -y install vim git wget libxcb-xinerama0 cmake libgmp3-dev libboost-all-dev libxml2-dev libxml2 flex bison swig \ - libpython3-all-dev python3 python3-pip python3-numpy libfftw3-bin libfftw3-dev libfftw3-3 liblog4cpp5v5 \ - liblog4cpp5-dev g++ autoconf libzip-dev libglib2.0-dev libsigc++-2.0-dev libglibmm-2.4-dev \ - libclang1-9 doxygen curl libmatio-dev liborc-0.4-dev subversion mesa-common-dev libgl1-mesa-dev libserialport0 \ - libserialport-dev libusb-1.0 libusb-1.0-0 libusb-1.0-0-dev libtool libaio-dev libzmq3-dev libsndfile1-dev \ - libavahi-client-dev graphviz unzip xserver-xorg openjdk-11-jre build-essential pkg-config \ - autogen python-dev gettext texinfo libxkbcommon-x11-0 libqt5gui5 libncurses5 autoconf-archive mm-common - pip3 install mako - pip3 install packaging -} - -build_libiio() { - echo "### Building libiio - version $LIBIIO_VERSION" - pushd $STAGING_AREA/libiio - CURRENT_BUILD_CMAKE_OPTS="\ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=OFF\ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - -DWITH_SERIAL_BACKEND:BOOL=ON \ - -DENABLE_IPV6:BOOL=OFF \ - -DINSTALL_UDEV_RULE:BOOL=OFF - " - INSTALL="ON" - build_with_cmake - popd -} - -build_glog() { - echo "### Building glog - branch $GLOG_BRANCH" - pushd $STAGING_AREA/glog - CURRENT_BUILD_CMAKE_OPTS="-DWITH_GFLAGS=OFF" - INSTALL="ON" - build_with_cmake - popd -} - -build_libad9361() { - echo "### Building libad9361 - branch $LIBAD9361_BRANCH" - pushd $STAGING_AREA/libad9361 - INSTALL="ON" - build_with_cmake - popd -} - -build_libm2k() { - echo "### Building libm2k - branch $LIBM2K_BRANCH" - pushd $STAGING_AREA/libm2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DENABLE_CSHARP=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DENABLE_TOOLS=OFF \ - -DINSTALL_UDEV_RULES=OFF \ - -DENABLE_LOG=ON - " - INSTALL="ON" - build_with_cmake - popd -} - -build_spdlog() { - echo "### Building spdlog - branch $SPDLOG_BRANCH" - pushd $STAGING_AREA/spdlog - CURRENT_BUILD_CMAKE_OPTS="-DSPDLOG_BUILD_SHARED=ON" - INSTALL="ON" - build_with_cmake - popd -} - -build_volk() { - echo "### Building volk - branch $VOLK_BRANCH" - pushd $STAGING_AREA/volk - CURRENT_BUILD_CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3" - INSTALL="ON" - build_with_cmake - popd -} - -build_gnuradio() { - echo "### Building gnuradio - branch $GNURADIO_BRANCH" - pushd $STAGING_AREA/gnuradio - CURRENT_BUILD_CMAKE_OPTS="\ - -DPYTHON_EXECUTABLE=/usr/bin/python3 \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_IIO=ON \ - -DENABLE_POSTINSTALL=OFF - " - INSTALL="ON" - build_with_cmake - popd -} - -build_grm2k() { - echo "### Building gr-m2k - branch $GRM2K_BRANCH" - pushd $STAGING_AREA/gr-m2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DDIGITAL=OFF - " - INSTALL="ON" - build_with_cmake - popd -} - -build_grscopy() { - echo "### Building gr-scopy - branch $GRSCOPY_BRANCH" - pushd $STAGING_AREA/gr-scopy - INSTALL="ON" - build_with_cmake - popd -} - -build_libsigrokdecode() { - echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH" - pushd $STAGING_AREA/libsigrokdecode - ./autogen.sh - if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - ./configure --prefix $STAGING_AREA_DEPS - else - ./configure - fi - make $JOBS - sudo make install - sudo ldconfig - popd -} - -build_qwt() { - echo "### Building qwt - branch $QWT_BRANCH" - pushd $STAGING_AREA/qwt - - if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - $QMAKE_BIN INCLUDEPATH=$STAGING_AREA_DEPS/include LIBS=-L$STAGING_AREA_DEPS/lib qwt.pro - make $JOBS - sudo make INSTALL_ROOT=$STAGING_AREA_DEPS install - sudo cp -r $STAGING_AREA_DEPS/usr/local/* $STAGING_AREA_DEPS/ - else - $QMAKE_BIN qwt.pro - make $JOBS - sudo make install - fi - - sudo ldconfig - popd -} - -build_libtinyiiod() { - echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH" - pushd $STAGING_AREA/libtinyiiod - CURRENT_BUILD_CMAKE_OPTS="-DBUILD_EXAMPLES=OFF" - build_with_cmake - popd -} - -build_scopy() { - echo "### Building scopy" - ls -la $SRC_DIR - pushd $SRC_DIR - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PLUGIN_TEST=ON \ - -DENABLE_TESTING=ON - " - INSTALL="OFF" - build_with_cmake - popd -} - -build_deps(){ - build_libiio - build_libad9361 - build_glog - build_spdlog - build_libm2k - build_volk - build_gnuradio - build_grscopy - build_grm2k - build_qwt - build_libsigrokdecode - build_libtinyiiod -} - -#clone -#update -#install_apt -#install_qt -#build_deps -#build_scopy diff --git a/ci/ubuntu/ubuntu22_build_process.sh b/ci/ubuntu/ubuntu22_build_process.sh deleted file mode 100755 index 711add44ef..0000000000 --- a/ci/ubuntu/ubuntu22_build_process.sh +++ /dev/null @@ -1,309 +0,0 @@ -#!/bin/bash -if [ "$CI_SCRIPT" == "ON" ] - then - set -ex - SRC_DIR=$GITHUB_WORKSPACE - git config --global --add safe.directory '*' - QT=/home/runner/5.15.2/gcc_64 # this is used to force the use of Qt5.15 for qt_add_resources - else - set -x - SRC_DIR=$(git rev-parse --show-toplevel) - QT=/opt/Qt/5.15.2/gcc_64 -fi - -USE_STAGING=$1 - -LIBIIO_VERSION=master -LIBAD9361_BRANCH=master -GLOG_BRANCH=v0.4.0 - -LIBM2K_BRANCH=master -SPDLOG_BRANCH=v1.x -VOLK_BRANCH=main -GNURADIO_BRANCH=maint-3.10 -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=master -LIBSIGROKDECODE_BRANCH=master -QWT_BRANCH=qwt-multiaxes -LIBTINYIIOD_BRANCH=master - -QMAKE_BIN=$QT/bin/qmake -CMAKE_BIN=/bin/cmake -JOBS=-j8 -ARCH=x86_64 - -if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - echo -- USING STAGING - STAGING_AREA=$PWD/staging - STAGING_AREA_DEPS=$STAGING_AREA/dependencies - mkdir -p $STAGING_AREA_DEPS - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STAGING_AREA_DEPS/lib:$QT/lib - CMAKE_OPTS=(\ - -DCMAKE_LIBRARY_PATH=$STAGING_AREA_DEPS \ - -DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS \ - -DCMAKE_PREFIX_PATH=$QT\;$STAGING_AREA_DEPS \ - -DCMAKE_EXE_LINKER_FLAGS="-L$STAGING_AREA_DEPS -L$STAGING_AREA_DEPS/lib" \ - -DCMAKE_SHARED_LINKER_FLAGS="-L$STAGING_AREA_DEPS -L$STAGING_AREA_DEPS/lib" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) - echo -- STAGING_DIR $STAGING_AREA_DEPS - else - echo -- NO STAGING - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QT/lib - CMAKE_OPTS=(\ - -DCMAKE_PREFIX_PATH=$QT \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) -fi - -CMAKE="$CMAKE_BIN ${CMAKE_OPTS[*]}" -echo -- USING CMAKE COMMAND: -echo $CMAKE -echo -- USING QT: $QT -echo -- USING QMAKE: $QMAKE_BIN - -clone() { - echo "#######CLONE#######" - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - git clone --recursive https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio - git clone --recursive https://github.com/analogdevicesinc/libad9361-iio.git -b $LIBAD9361_BRANCH libad9361 - git clone --recursive https://github.com/google/glog.git -b $GLOG_BRANCH glog - git clone --recursive https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH libm2k - git clone --recursive https://github.com/gabime/spdlog.git -b $SPDLOG_BRANCH spdlog - git clone --recursive https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH gr-scopy - git clone --recursive https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH gr-m2k - git clone --recursive https://github.com/gnuradio/volk.git -b $VOLK_BRANCH volk - git clone --recursive https://github.com/gnuradio/gnuradio.git -b $GNURADIO_BRANCH gnuradio - git clone --recursive https://github.com/cseci/qwt.git -b $QWT_BRANCH qwt - git clone --recursive https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH libsigrokdecode - git clone --recursive https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH libtinyiiod - popd -} - - -build_with_cmake() { - echo $PWD - BUILD_FOLDER=$PWD/build-${ARCH} - rm -rf $BUILD_FOLDER - git clean -xdf - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE $CURRENT_BUILD_CMAKE_OPTS ../ - make $JOBS - if [ $INSTALL = "ON" ] - then - sudo make $JOBS install - sudo ldconfig - fi - INSTALL="" - CURRENT_BUILD_CMAKE_OPTS="" -} - -update(){ - sudo apt-get update - sudo apt-get -y upgrade -} - -install_apt() { - sudo DEBIAN_FRONTEND=noninteractive apt-get -y install keyboard-configuration - sudo apt-get -y install vim git cmake libgmp3-dev libboost-all-dev libxml2-dev libxml2 flex bison swig \ - libpython3-all-dev python3 python3-pip python3-numpy libfftw3-bin libfftw3-dev libfftw3-3 liblog4cpp5v5 \ - liblog4cpp5-dev g++ autoconf libzip-dev libglib2.0-dev libsigc++-2.0-dev libglibmm-2.4-dev \ - libclang-dev doxygen curl libmatio-dev liborc-0.4-dev subversion mesa-common-dev libgl1-mesa-dev libserialport0 \ - libserialport-dev libusb-1.0 libusb-1.0-0 libusb-1.0-0-dev libtool libaio-dev libzmq3-dev libsndfile1-dev \ - libavahi-client-dev graphviz build-essential - pip3 install mako - pip3 install packaging -} - -build_libiio() { - echo "### Building libiio - version $LIBIIO_VERSION" - pushd $STAGING_AREA/libiio - CURRENT_BUILD_CMAKE_OPTS="\ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=OFF\ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - -DWITH_SERIAL_BACKEND:BOOL=ON \ - -DENABLE_IPV6:BOOL=OFF \ - -DINSTALL_UDEV_RULE:BOOL=OFF - " - INSTALL="ON" - build_with_cmake - popd -} - -build_glog() { - echo "### Building glog - branch $GLOG_BRANCH" - pushd $STAGING_AREA/glog - CURRENT_BUILD_CMAKE_OPTS="-DWITH_GFLAGS=OFF" - INSTALL="ON" - build_with_cmake - popd -} - -build_libad9361() { - echo "### Building libad9361 - branch $LIBAD9361_BRANCH" - pushd $STAGING_AREA/libad9361 - INSTALL="ON" - build_with_cmake - popd -} - -build_libm2k() { - echo "### Building libm2k - branch $LIBM2K_BRANCH" - pushd $STAGING_AREA/libm2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DENABLE_CSHARP=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DENABLE_TOOLS=OFF \ - -DINSTALL_UDEV_RULES=OFF \ - -DENABLE_LOG=ON - " - INSTALL="ON" - build_with_cmake - popd -} - -build_spdlog() { - echo "### Building spdlog - branch $SPDLOG_BRANCH" - pushd $STAGING_AREA/spdlog - CURRENT_BUILD_CMAKE_OPTS="-DSPDLOG_BUILD_SHARED=ON" - INSTALL="ON" - build_with_cmake - popd -} - -build_volk() { - echo "### Building volk - branch $VOLK_BRANCH" - pushd $STAGING_AREA/volk - CURRENT_BUILD_CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3" - INSTALL="ON" - build_with_cmake - popd -} - -build_gnuradio() { - echo "### Building gnuradio - branch $GNURADIO_BRANCH" - pushd $STAGING_AREA/gnuradio - CURRENT_BUILD_CMAKE_OPTS="\ - -DPYTHON_EXECUTABLE=/usr/bin/python3 \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_IIO=ON \ - -DENABLE_POSTINSTALL=OFF - " - INSTALL="ON" - build_with_cmake - popd -} - -build_grm2k() { - echo "### Building gr-m2k - branch $GRM2K_BRANCH" - pushd $STAGING_AREA/gr-m2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DDIGITAL=OFF - " - INSTALL="ON" - build_with_cmake - popd -} - -build_grscopy() { - echo "### Building gr-scopy - branch $GRSCOPY_BRANCH" - pushd $STAGING_AREA/gr-scopy - INSTALL="ON" - build_with_cmake - popd -} - -build_libsigrokdecode() { - echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH" - pushd $STAGING_AREA/libsigrokdecode - ./autogen.sh - if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - ./configure --prefix $STAGING_AREA_DEPS - else - ./configure - fi - make $JOBS - sudo make install - sudo ldconfig - popd -} - -build_qwt() { - echo "### Building qwt - branch $QWT_BRANCH" - pushd $STAGING_AREA/qwt - - if [ ! -z "$USE_STAGING" ] && [ "$USE_STAGING" == "ON" ] - then - $QMAKE_BIN INCLUDEPATH=$STAGING_AREA_DEPS/include LIBS=-L$STAGING_AREA_DEPS/lib qwt.pro - make $JOBS - sudo make INSTALL_ROOT=$STAGING_AREA_DEPS install - sudo cp -r $STAGING_AREA_DEPS/usr/local/* $STAGING_AREA_DEPS/ - else - $QMAKE_BIN qwt.pro - make $JOBS - sudo make install - fi - - sudo ldconfig - popd -} - -build_libtinyiiod() { - echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH" - pushd $STAGING_AREA/libtinyiiod - CURRENT_BUILD_CMAKE_OPTS="-DBUILD_EXAMPLES=OFF" - build_with_cmake - popd -} - -build_scopy() { - echo "### Building scopy" - ls -la $SRC_DIR - pushd $SRC_DIR - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PLUGIN_TEST=ON \ - -DENABLE_TESTING=ON - " - INSTALL="OFF" - build_with_cmake - popd -} - -build_deps(){ - build_libiio - build_libad9361 - build_glog - build_spdlog - build_libm2k - build_volk - build_gnuradio - build_grscopy - build_grm2k - build_qwt - build_libsigrokdecode - build_libtinyiiod -} - -#clone -#update -#install_apt -#install_qt -#build_deps -#build_scopy diff --git a/ci/windows/build_and_create_installer.sh b/ci/windows/build_and_create_installer.sh deleted file mode 100644 index 40b7068136..0000000000 --- a/ci/windows/build_and_create_installer.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/bash -if [ "$CI_SCRIPT" == "ON" ]; - then - set -ex - export WORKDIR=$HOME - SRC_FOLDER=$WORKDIR/scopy - else - set -x - SRC_FOLDER=$(git rev-parse --show-toplevel) - export WORKDIR=$SRC_FOLDER - git clone https://github.com/analogdevicesinc/scopy-mingw-build-deps.git -b ci-for-scopy2 $WORKDIR/scopy-mingw-build-deps -fi - -BUILD_TARGET=x86_64 -ARCH_BIT=64 - -## Set STAGING -USE_STAGING=OFF -## - -TOOLS_FOLDER=$WORKDIR/scopy-mingw-build-deps -pushd $TOOLS_FOLDER -source ./mingw_toolchain.sh $BUILD_TARGET $USE_STAGING -popd - -export DEST_FOLDER=$WORKDIR/scopy_$ARCH -BUILD_FOLDER=$WORKDIR/build_$ARCH -DEBUG_FOLDER=$WORKDIR/debug_$ARCH -ARTIFACT_FOLDER=$WORKDIR/artifact_$ARCH -PYTHON_FILES=$STAGING_DIR/lib/python3.* -DLL_DEPS=$(cat $SRC_FOLDER/ci/windows/mingw_dll_deps) -EMU_BUILD_FOLDER=$WORKDIR/iio-emu/build -STAGING_AREA=$SRC_FOLDER/ci/windows/staging -REGMAP_XMLS=$BUILD_FOLDER/plugins/plugins/regmap/xmls - -# Generate build status info for the about page -cp $BUILD_STATUS_FILE $SRC_FOLDER/build-status -pacman -Qe >> $SRC_FOLDER/build-status - -build_scopy(){ - echo "### Building Scopy" - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE $RC_COMPILER_OPT -DPYTHON_EXECUTABLE=$STAGING_DIR/bin/python3.exe \ - -DENABLE_TESTING=OFF \ - $SRC_FOLDER - $MAKE_BIN -j4 - ls -la $BUILD_FOLDER -} - -build_iio-emu(){ - echo "### Building IIO-EMU" - if [ ! -d "$WORKDIR/iio-emu" ]; then - git clone https://github.com/analogdevicesinc/iio-emu $WORKDIR/iio-emu - fi - - mkdir -p $EMU_BUILD_FOLDER - cd $EMU_BUILD_FOLDER - $CMAKE -DBUILD_TOOLS=ON ../ - $MAKE_BIN -j4 -} - -download_tools() { - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - if [ ! -f windres.exe ]; then - wget http://swdownloads.analog.com/cse/build/windres.exe.gz - gunzip windres.exe.gz - fi - - if [ ! -f dpinst.zip ]; then - wget http://swdownloads.analog.com/cse/m1k/drivers/dpinst.zip - unzip "dpinst.zip" - fi - - if [ ! -f dfu-util.zip ]; then - wget http://swdownloads.analog.com/cse/m1k/drivers/dfu-util.zip - unzip "dfu-util.zip" - fi - - if [ ! -f cv2pdb-dlls.zip ]; then - wget https://swdownloads.analog.com/cse/scopydeps/cv2pdb-dlls.zip - unzip "cv2pdb-dlls.zip" - fi - - if [ ! -f is.exe ]; then - wget https://jrsoftware.org/download.php/is.exe - fi - popd -} - -deploy_app(){ - echo "### Deploying application and dependencies" - if [ -d $DEST_FOLDER ]; then - rm -rf $DEST_FOLDER - fi - rm -rf $DEST_FOLDER - mkdir -p $DEST_FOLDER - cp $BUILD_FOLDER/Scopy.exe $DEST_FOLDER/ - cp $BUILD_FOLDER/qt.conf $DEST_FOLDER/ - cp $BUILD_FOLDER/Scopy-console.exe $DEST_FOLDER/ - - mkdir $DEST_FOLDER/resources - $STAGING_DIR/bin/windeployqt.exe --dir $DEST_FOLDER --no-translations --no-system-d3d-compiler --no-compiler-runtime --no-quick-import --opengl --printsupport $BUILD_FOLDER/Scopy.exe - - cp -r $STAGING_DIR/share/libsigrokdecode/decoders $DEST_FOLDER/ - - pushd $STAGING_DIR/bin - cp -n $DLL_DEPS $DEST_FOLDER/ - cp -n iio_*.exe $DEST_FOLDER/ - popd - - cp $EMU_BUILD_FOLDER/iio-emu.exe $DEST_FOLDER - cp -r $PYTHON_FILES $DEST_FOLDER - cp $BUILD_FOLDER/windows/scopy-$ARCH_BIT.iss $DEST_FOLDER - cp -v $BUILD_FOLDER/libscopy-*.dll $DEST_FOLDER - - PLUGINS_DLL=$(find $BUILD_FOLDER/plugins/plugins -type f -name "*.dll") - mkdir -p $DEST_FOLDER/plugins - cp -v $PLUGINS_DLL $DEST_FOLDER/plugins - - TRANSLATIONS_QM=$(find $BUILD_FOLDER/translations -type f -name "*.qm") - mkdir -p $DEST_FOLDER/translations - cp $TRANSLATIONS_QM $DEST_FOLDER/translations - - if [ -d $REGMAP_XMLS ]; then - cp -r $REGMAP_XMLS $DEST_FOLDER/plugins - fi -} - -extract_debug_symbols(){ - echo "### Duplicating unstripped bundle" - rm -rf $DEBUG_FOLDER - mkdir -p $DEBUG_FOLDER - cp -r $DEST_FOLDER/* $DEBUG_FOLDER/ - echo "### Stripping bundle for installer" - /$MINGW_VERSION/bin/strip.exe --strip-debug --strip-unneeded $DEST_FOLDER/*.exe - /$MINGW_VERSION/bin/strip.exe --strip-debug --strip-unneeded $DEST_FOLDER/*.dll - /$MINGW_VERSION/bin/strip.exe --strip-debug --strip-unneeded $DEST_FOLDER/plugins/*.dll -} - -bundle_drivers(){ - echo "### Bundling drivers" - cp -R $SRC_FOLDER/windows/drivers $DEST_FOLDER - if [[ $ARCH_BIT == "64" ]]; then - cp -R $STAGING_AREA/dfu-util-static-amd64.exe $DEST_FOLDER/drivers/dfu-util.exe - cp -R $STAGING_AREA/dpinst_amd64.exe $DEST_FOLDER/drivers/dpinst.exe - else - cp -R $STAGING_AREA/dfu-util-static.exe $DEST_FOLDER/drivers/dfu-util.exe - cp -R $STAGING_AREA/dpinst.exe $DEST_FOLDER/drivers/dpinst.exe - fi -} - -create_installer() { - echo "### Creating installer" - pushd $WORKDIR - mkdir -p $ARTIFACT_FOLDER - cp -R $WORKDIR/scopy_${ARCH} $ARTIFACT_FOLDER/scopy-${ARCH} - [ -d $WORKDIR/debug_${ARCH} ] && cp -R $WORKDIR/debug_${ARCH} $ARTIFACT_FOLDER/debug-${ARCH} || echo "No debug folder" - PATH="/c/innosetup:/c/Program Files (x86)/Inno Setup 6:$PATH" - iscc //p $BUILD_FOLDER/windows/scopy-$ARCH_BIT.iss - mv $WORKDIR/scopy-$ARCH_BIT-setup.exe $ARTIFACT_FOLDER - - echo "Done. Artifacts generated in $ARTIFACT_FOLDER" - ls -la $ARTIFACT_FOLDER - - if [ "$CI_SCRIPT" == "ON" ]; then - cp -R $ARTIFACT_FOLDER $SRC_FOLDER - ls -la $SRC_FOLDER - fi - popd -} - -run_workflow(){ - download_tools - build_scopy - build_iio-emu - deploy_app - bundle_drivers - extract_debug_symbols - create_installer -} - -run_workflow - -for arg in $@; do - $arg -done diff --git a/ci/windows/mingw_dll_deps b/ci/windows/mingw_dll_deps deleted file mode 100644 index 32d06e617a..0000000000 --- a/ci/windows/mingw_dll_deps +++ /dev/null @@ -1 +0,0 @@ -libspdlog.dll* libglibmm-*.dll libsigrokdecode-*.dll libgcc_s_*.dll libstdc++-*.dll Qt5Core.dll libboost_thread-mt.dll libgnuradio-analog.dll libgnuradio-blocks.dll libgnuradio-fft.dll libwinpthread-*.dll libgnuradio-filter.dll libgnuradio-m2k.dll libgnuradio-pmt.dll libgnuradio-runtime.dll libgnuradio-scopy.dll libgnuradio-iio.dll libad9361.dll libiio.dll Qt5Qml.dll Qt5Xml.dll qwt.dll libglib-*.dll libgmodule-*.dll libsigc-*.dll libgobject-*.dll libpython*.dll libboost_filesystem-mt.dll libboost_chrono-mt.dll libboost_program_options-mt.dll libgmp-*.dll libusb-*.dll libxml2-*.dll Qt5Network.dll Qt5OpenGL.dll Qt5Svg.dll Qt5PrintSupport.dll libintl-*.dll libiconv-*.dll zlib1.dll Qt5Gui.dll tinyiiod.dll libm2k.dll libvolk.dll libfftw3f*.dll Qt5Widgets.dll libicudt*.dll libffi-*.dll liblzma-5.dll libdouble-conversion.dll libicuin*.dll libicuuc*.dll libpcre2-*.dll libzstd.dll libharfbuzz-*.dll libpng16-*.dll liborc-*.dll libfreetype-*.dll libgraphite2.dll libbrotlidec.dll libbz2-*.dll libbrotlicommon.dll libcrypto*.dll libssl*.dll libmd4c.dll libserialport-0.dll diff --git a/ci/x86_64/AppRun b/ci/x86_64/AppRun deleted file mode 100755 index f66a8dcf19..0000000000 --- a/ci/x86_64/AppRun +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e -SELF=$(readlink -f "$0") -HERE=${SELF%/*} - -export QT_PLUGIN_PATH=$HERE/usr/plugins -export QT_QPA_PLATFORM_PLUGIN_PATH=$HERE/usr/plugins/platforms -export LD_LIBRARY_PATH=$HERE/usr/lib - -python_dir=$(find "$HERE/usr/lib/" -maxdepth 1 -type d -name "python3.*") -export PYTHONHOME=$python_dir -export PYTHONPATH=$python_dir:$python_dir/lib-dynload:$python_dir/site-packages:$python_dir/encodings -echo "Starting Scopy" -ldd $HERE/usr/bin/scopy -exec $HERE/usr/bin/scopy diff --git a/ci/x86_64/copy-deps.sh b/ci/x86_64/copy-deps.sh deleted file mode 100755 index 35d3ecbe6f..0000000000 --- a/ci/x86_64/copy-deps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e -SRC_DIR=$(git rev-parse --show-toplevel 2>/dev/null ) || \ -SRC_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd ../../ && pwd ) -source $SRC_DIR/ci/armhf/armhf_build_config.sh - -BINARY=$1 -LOCATION=$2 -LIBS_ARRAY=() -BLACKLISTED=($(wget --quiet https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist -O - | sort | uniq | cut -d '#' -f 1 | grep -v "^#.*" | grep "[^-\s]")) - -export LD_LIBRARY_PATH="${APP_DIR}/usr/lib:${SYSROOT}/lib:${SYSROOT}/lib/arm-linux-gnueabihf:${SYSROOT}/usr/arm-linux-gnueabihf/lib:${SYSROOT}/usr/local/qt5.15/lib:${SYSROOT}/usr/local/lib:${SRC_DIR}/build" -run_ldd(){ - for library in $(ldd "$1" | cut -d '>' -f 2 | awk '{print $1}') - do - # check if the library exists at that path and if it was processed already or blacklisted - if ! [[ "${BLACKLISTED[*]}" =~ "${library##*/}" ]]; then - if [ -f "${library}" ] && ! [[ "${LIBS_ARRAY[*]}" =~ "${library}" ]]; then - LIBS_ARRAY+=("${library}") - echo "---Added new lib: ${library}" - if [ ! -f "${LOCATION}"/"${library##*/}" ]; then - cp "${library}" "${LOCATION}" - [ -L "${library}" ] && cp "$(realpath "${library}")" "${LOCATION}" - strip --strip-unneeded "${LOCATION}"/"${library##*/}" - fi - run_ldd "${library}" - fi - fi - done -} - -for arg in $BINARY; do - run_ldd "${arg}" -done diff --git a/ci/x86_64/docker/Dockerfile b/ci/x86_64/docker/Dockerfile deleted file mode 100644 index c758c53f88..0000000000 --- a/ci/x86_64/docker/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -#docker build -t cristianbindea/scopy2-x86_64-appimage . -#DOCKER_BUILDKIT=0 -FROM ubuntu:20.04 -SHELL ["/bin/bash", "-c"] - -ARG USER=runner -ARG DEBIAN_FRONTEND=noninteractive - -ENV TZ=Europe/Bucharest -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt-get update && apt-get -y upgrade && apt-get install -y apt-utils sudo git tzdata keyboard-configuration - -RUN groupadd -g 1000 -r $USER && \ - useradd -u 1000 -g 1000 --create-home -r $USER - -#Change password -RUN echo "$USER:$USER" | chpasswd - -#Make sudo passwordless -RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-$USER && \ - usermod -aG sudo $USER && \ - usermod -aG plugdev $USER - -USER $USER -WORKDIR /home/${USER} -RUN git clone https://github.com/analogdevicesinc/scopy --branch dev -WORKDIR /home/${USER}/scopy - -ENV CI_SCRIPT=ON -RUN ./ci/x86_64/x86-64_appimage_process.sh install_packages -RUN sudo pip3 install aqtinstall && sudo python3 -m aqt install-qt --outputdir /opt/Qt linux desktop 5.15.2 -RUN ./ci/x86_64/x86-64_appimage_process.sh clone download_tools build_deps - -WORKDIR /home/${USER} -# RUN rm -rf scopy diff --git a/ci/x86_64/scopy.desktop b/ci/x86_64/scopy.desktop deleted file mode 100644 index ee6591769f..0000000000 --- a/ci/x86_64/scopy.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Icon=scopy -Exec=scopy -Terminal=false -Type=Application -Categories=Science -Name=Scopy -GenericName=Oscilloscope -Comment=A software oscilloscope diff --git a/ci/x86_64/x86-64_appimage_process.sh b/ci/x86_64/x86-64_appimage_process.sh deleted file mode 100755 index 9f1a1878b0..0000000000 --- a/ci/x86_64/x86-64_appimage_process.sh +++ /dev/null @@ -1,473 +0,0 @@ -#!/bin/bash -set -ex - -## Set STAGING -USE_STAGING=OFF -## - -if [ "$CI_SCRIPT" == "ON" ] - then - SRC_DIR=/home/runner/scopy - git config --global --add safe.directory '*' - USE_STAGING=OFF - else - SRC_DIR=$(git rev-parse --show-toplevel) -fi - -export APPIMAGE=1 - -LIBIIO_VERSION=v0.25 -LIBAD9361_BRANCH=main -LIBM2K_BRANCH=main -SPDLOG_BRANCH=v1.x -VOLK_BRANCH=main -GNURADIO_BRANCH=maint-3.10 -GRSCOPY_BRANCH=3.10 -GRM2K_BRANCH=main -LIBSIGROKDECODE_BRANCH=master -QWT_BRANCH=qwt-multiaxes-updated -LIBTINYIIOD_BRANCH=master -IIOEMU_BRANCH=master - -# default python version used in CI scripts, can be changed to match locally installed python -PYTHON_VERSION=python3.8 - -QT_LOCATION=/opt/Qt/5.15.2/gcc_64 - -STAGING_AREA=$SRC_DIR/ci/x86_64/staging -QMAKE_BIN=$QT_LOCATION/bin/qmake -CMAKE_BIN=${STAGING_AREA}/cmake/bin/cmake -JOBS=-j14 - -APP_DIR_NAME=scopy.AppDir -APP_DIR=$SRC_DIR/ci/x86_64/$APP_DIR_NAME -APP_IMAGE=$SRC_DIR/ci/x86_64/Scopy-x86_64.AppImage - -if [ "$USE_STAGING" == "ON" ] - then - echo -- USING STAGING FOLDER: $STAGING_AREA_DEPS - STAGING_AREA_DEPS=$STAGING_AREA/dependencies - export LD_LIBRARY_PATH=$STAGING_AREA_DEPS/lib:$QT_LOCATION/lib:$LD_LIBRARY_PATH - CMAKE_OPTS=(\ - -DCMAKE_LIBRARY_PATH=$STAGING_AREA_DEPS \ - -DCMAKE_INSTALL_PREFIX=$STAGING_AREA_DEPS \ - -DCMAKE_PREFIX_PATH=$QT_LOCATION\;$STAGING_AREA_DEPS \ - -DCMAKE_EXE_LINKER_FLAGS=-L$STAGING_AREA_DEPS\;-L$STAGING_AREA_DEPS/lib \ - -DCMAKE_SHARED_LINKER_FLAGS=-L$STAGING_AREA_DEPS\;-L$STAGING_AREA_DEPS/lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) - echo -- STAGING_DIR $STAGING_AREA_DEPS - else - echo -- NO STAGING: INSTALLING IN SYSTEM - STAGING_AREA_DEPS=/usr/local - export LD_LIBRARY_PATH=$QT_LOCATION/lib:$LD_LIBRARY_PATH: - CMAKE_OPTS=(\ - -DCMAKE_PREFIX_PATH=$QT_LOCATION \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - ) -fi - -CMAKE="$CMAKE_BIN ${CMAKE_OPTS[*]}" -echo -- USING CMAKE COMMAND: -echo $CMAKE -echo -- USING QT: $QT_LOCATION -echo -- USING QMAKE: $QMAKE_BIN - -clone() { - echo "#######CLONE#######" - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - [ -d 'libiio' ] || git clone --recursive https://github.com/analogdevicesinc/libiio.git -b $LIBIIO_VERSION libiio - [ -d 'libad9361' ] || git clone --recursive https://github.com/analogdevicesinc/libad9361-iio.git -b $LIBAD9361_BRANCH libad9361 - [ -d 'libm2k' ] || git clone --recursive https://github.com/analogdevicesinc/libm2k.git -b $LIBM2K_BRANCH libm2k - [ -d 'spdlog' ] || git clone --recursive https://github.com/gabime/spdlog.git -b $SPDLOG_BRANCH spdlog - [ -d 'gr-scopy' ] || git clone --recursive https://github.com/analogdevicesinc/gr-scopy.git -b $GRSCOPY_BRANCH gr-scopy - [ -d 'gr-m2k' ] || git clone --recursive https://github.com/analogdevicesinc/gr-m2k.git -b $GRM2K_BRANCH gr-m2k - [ -d 'volk' ] || git clone --recursive https://github.com/gnuradio/volk.git -b $VOLK_BRANCH volk - [ -d 'gnuradio' ] || git clone --recursive https://github.com/gnuradio/gnuradio.git -b $GNURADIO_BRANCH gnuradio - [ -d 'qwt' ] || git clone --recursive https://github.com/cseci/qwt.git -b $QWT_BRANCH qwt - [ -d 'libsigrokdecode' ] || git clone --recursive https://github.com/sigrokproject/libsigrokdecode.git -b $LIBSIGROKDECODE_BRANCH libsigrokdecode - [ -d 'libtinyiiod' ] || git clone --recursive https://github.com/analogdevicesinc/libtinyiiod.git -b $LIBTINYIIOD_BRANCH libtinyiiod - popd -} - -download_tools() { - mkdir -p ${STAGING_AREA} - pushd ${STAGING_AREA} - - if [ ! -d cmake ];then - wget https://github.com/Kitware/CMake/releases/download/v3.29.0-rc2/cmake-3.29.0-rc2-linux-x86_64.tar.gz - tar -xf cmake*.tar.gz && rm cmake*.tar.gz && mv cmake* cmake # unzip and rename - fi - - # download tools for creating the AppDir and the AppImage - if [ ! -f linuxdeploy-x86_64.AppImage ];then - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage - chmod +x linuxdeploy-x86_64.AppImage - fi - - if [ ! -f linuxdeploy-plugin-qt-x86_64.AppImage ];then - wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage - chmod +x linuxdeploy-plugin-qt-x86_64.AppImage - fi - - if [ ! -f linuxdeploy-plugin-appimage-x86_64.AppImage ];then - wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/1-alpha-20230713-1/linuxdeploy-plugin-appimage-x86_64.AppImage - chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage - fi - - popd -} - -build_with_cmake() { - INSTALL=$1 - [ -z $INSTALL ] && INSTALL=ON - BUILD_FOLDER=$PWD/build - rm -rf $BUILD_FOLDER - mkdir -p $BUILD_FOLDER - cd $BUILD_FOLDER - $CMAKE $CURRENT_BUILD_CMAKE_OPTS ../ - make $JOBS - if [ "$INSTALL" == "ON" ];then - if [ "$USE_STAGING" == "ON" ]; then make install; else sudo make install; fi - fi - CURRENT_BUILD_CMAKE_OPTS="" -} - -install_packages() { - sudo DEBIAN_FRONTEND=noninteractive apt-get -y install - - sudo apt-get update - sudo apt-get -y upgrade - sudo apt-get -y install \ - $PYTHON_VERSION-full python3-pip lib$PYTHON_VERSION-dev python3-numpy \ - keyboard-configuration vim git wget unzip\ - g++ build-essential cmake curl autogen autoconf autoconf-archive pkg-config flex bison swig \ - subversion mesa-common-dev graphviz xserver-xorg gettext texinfo mm-common doxygen \ - libboost-all-dev libfftw3-bin libfftw3-dev libfftw3-3 liblog4cpp5v5 liblog4cpp5-dev \ - libxcb-xinerama0 libgmp3-dev libzip-dev libglib2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev \ - libclang1-9 libmatio-dev liborc-0.4-dev libgl1-mesa-dev libserialport0 libserialport-dev \ - libusb-1.0 libusb-1.0-0 libusb-1.0-0-dev libavahi-client-dev libsndfile1-dev \ - libxkbcommon-x11-0 libqt5gui5 libncurses5 libtool libaio-dev libzmq3-dev libxml2-dev - - pip3 install mako - pip3 install packaging -} - -build_libiio() { - echo "### Building libiio - version $LIBIIO_VERSION" - pushd $STAGING_AREA/libiio - CURRENT_BUILD_CMAKE_OPTS="\ - -DWITH_TESTS:BOOL=OFF \ - -DWITH_DOC:BOOL=OFF \ - -DHAVE_DNS_SD:BOOL=OFF\ - -DWITH_MATLAB_BINDINGS:BOOL=OFF \ - -DCSHARP_BINDINGS:BOOL=OFF \ - -DPYTHON_BINDINGS:BOOL=OFF \ - -DWITH_SERIAL_BACKEND:BOOL=ON \ - -DENABLE_IPV6:BOOL=OFF \ - -DINSTALL_UDEV_RULE:BOOL=OFF - " - build_with_cmake $1 - popd -} - -build_libad9361() { - echo "### Building libad9361 - branch $LIBAD9361_BRANCH" - pushd $STAGING_AREA/libad9361 - build_with_cmake $1 - popd -} - -build_spdlog() { - echo "### Building spdlog - branch $SPDLOG_BRANCH" - pushd $STAGING_AREA/spdlog - CURRENT_BUILD_CMAKE_OPTS="-DSPDLOG_BUILD_SHARED=ON" - build_with_cmake $1 - popd -} - -build_libm2k() { - echo "### Building libm2k - branch $LIBM2K_BRANCH" - pushd $STAGING_AREA/libm2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DENABLE_CSHARP=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DENABLE_TOOLS=OFF \ - -DINSTALL_UDEV_RULES=OFF \ - " - build_with_cmake $1 - popd -} - -build_volk() { - echo "### Building volk - branch $VOLK_BRANCH" - pushd $STAGING_AREA/volk - CURRENT_BUILD_CMAKE_OPTS="-DPYTHON_EXECUTABLE=/usr/bin/python3" - build_with_cmake $1 - popd -} - -build_gnuradio() { - echo "### Building gnuradio - branch $GNURADIO_BRANCH" - pushd $STAGING_AREA/gnuradio - CURRENT_BUILD_CMAKE_OPTS="\ - -DPYTHON_EXECUTABLE=/usr/bin/python3 \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_IIO=ON \ - -DENABLE_POSTINSTALL=OFF - " - build_with_cmake $1 - popd -} - -build_grscopy() { - echo "### Building gr-scopy - branch $GRSCOPY_BRANCH" - pushd $STAGING_AREA/gr-scopy - build_with_cmake $1 - popd -} - -build_grm2k() { - echo "### Building gr-m2k - branch $GRM2K_BRANCH" - pushd $STAGING_AREA/gr-m2k - CURRENT_BUILD_CMAKE_OPTS="\ - -DENABLE_PYTHON=OFF \ - -DDIGITAL=OFF - " - build_with_cmake $1 - popd -} - -build_qwt() { - echo "### Building qwt - branch $QWT_BRANCH" - pushd $STAGING_AREA/qwt - git clean -xdf - sed -i 's|/usr/local/qwt-$$QWT_VERSION-ma|/usr/local|g' qwtconfig.pri - - INSTALL=$1 - [ -z $INSTALL ] && INSTALL=ON - - if [ "$USE_STAGING" == "ON" ] - then - $QMAKE_BIN INCLUDEPATH=$STAGING_AREA_DEPS/include LIBS=-L$STAGING_AREA_DEPS/lib qwt.pro - make $JOBS - if [ "$INSTALL" == "ON" ];then - make INSTALL_ROOT=$STAGING_AREA_DEPS install - fi - cp -r $STAGING_AREA_DEPS/usr/local/* $STAGING_AREA_DEPS/ - else - $QMAKE_BIN qwt.pro - make $JOBS - if [ "$INSTALL" == "ON" ];then - sudo make install - fi - fi - - popd -} - -build_libsigrokdecode() { - echo "### Building libsigrokdecode - branch $LIBSIGROKDECODE_BRANCH" - pushd $STAGING_AREA/libsigrokdecode - git clean -xdf - ./autogen.sh - - INSTALL=$1 - [ -z $INSTALL ] && INSTALL=ON - - if [ "$USE_STAGING" == "ON" ] - then - ./configure --prefix $STAGING_AREA_DEPS - LD_RUN_PATH=$STAGING_AREA_DEPS/lib make $JOBS - else - ./configure - make $JOBS - fi - - if [ "$INSTALL" == "ON" ];then - if [ "$USE_STAGING" == "ON" ]; then make install; else sudo make install; fi - fi - popd -} - -build_libtinyiiod() { - echo "### Building libtinyiiod - branch $LIBTINYIIOD_BRANCH" - pushd $STAGING_AREA/libtinyiiod - CURRENT_BUILD_CMAKE_OPTS="-DBUILD_EXAMPLES=OFF" - build_with_cmake $1 - popd -} - -build_iio-emu() { - echo "### Building iio-emu - branch $IIOEMU_BRANCH" - mkdir -p $STAGING_AREA - pushd $STAGING_AREA - [ -d 'iio-emu' ] || git clone --recursive https://github.com/analogdevicesinc/iio-emu -b $IIOEMU_BRANCH iio-emu - pushd $STAGING_AREA/iio-emu - build_with_cmake OFF - popd - popd -} - -build_scopy() { - echo "### Building scopy" - pushd $SRC_DIR - CURRENT_BUILD_CMAKE_OPTS="\ - -DPYTHON_EXECUTABLE=/usr/bin/$PYTHON_VERSION - " - build_with_cmake OFF - popd -} - -create_appdir(){ - pushd ${STAGING_AREA} - BUILD_FOLDER=$SRC_DIR/build - EMU_BUILD_FOLDER=$STAGING_AREA/iio-emu/build - PLUGINS=$BUILD_FOLDER/plugins/plugins - SCOPY_DLL=$(find $BUILD_FOLDER -maxdepth 1 -type f -name "libscopy*") - REGMAP_XMLS=$BUILD_FOLDER/plugins/regmap/xmls - TRANSLATIONS_QM=$(find $BUILD_FOLDER/translations -type f -name "*.qm") - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STAGING_AREA_DEPS/lib:$QT_LOCATION/lib - DLL_FOLDER=${STAGING_AREA}/dll_folder - COPY_DEPS=${SRC_DIR}/ci/x86_64/copy-deps.sh - export PATH=$QT_LOCATION:$PATH - sudo ldconfig - - rm -rf $APP_DIR - rm -rf $DLL_FOLDER - mkdir $DLL_FOLDER - cp $SCOPY_DLL $DLL_FOLDER - cp $PLUGINS/*.so $DLL_FOLDER - - export QMAKE=$QMAKE_BIN # this is needed for deploy-plugin-qt.AppImage - # inside a docker image you can't run an appimage executable without privileges - # so the solution is to extract the appimage first and only then to run it - export APPIMAGE_EXTRACT_AND_RUN=1 - ${STAGING_AREA}/linuxdeploy-x86_64.AppImage \ - --appdir $APP_DIR \ - --executable $SRC_DIR/build/scopy \ - --custom-apprun $SRC_DIR/ci/x86_64/AppRun \ - --desktop-file $SRC_DIR/ci/x86_64/scopy.desktop \ - --icon-file $SRC_DIR/gui/res/scopy.png \ - --deploy-deps-only $DLL_FOLDER \ - --plugin qt - - $COPY_DEPS "$DLL_FOLDER/*" $APP_DIR/usr/lib - rm -rf $DLL_FOLDER - cp $SCOPY_DLL $APP_DIR/usr/lib - mkdir -p $APP_DIR/usr/lib/scopy/plugins - cp $PLUGINS/*.so $APP_DIR/usr/lib/scopy/plugins - - cp $EMU_BUILD_FOLDER/iio-emu $APP_DIR/usr/bin - cp ${STAGING_AREA_DEPS}/lib/tinyiiod.so* $APP_DIR/usr/lib - - # search for the python version linked by cmake and copy inside the appimage the same version - FOUND_PYTHON_VERSION=$(grep 'PYTHON_VERSION' $SRC_DIR/build/CMakeCache.txt | awk -F= '{print $2}' | grep -o 'python[0-9]\+\.[0-9]\+') - python_path=/usr/lib/$FOUND_PYTHON_VERSION - cp -r $python_path $APP_DIR/usr/lib - - if [ -d $STAGING_AREA_DEPS/share/libsigrokdecode/decoders ]; then - cp -r $STAGING_AREA_DEPS/share/libsigrokdecode/decoders $APP_DIR/usr/lib - elif [ -d $STAGING_AREA/libsigrokdecode/decoders ];then - cp -r $STAGING_AREA/libsigrokdecode/decoders $APP_DIR/usr/lib - else - echo "No decoders for libsigrokdecode found" - exit 1 - fi - - mkdir -p $APP_DIR/usr/lib/scopy/translations - cp $TRANSLATIONS_QM $APP_DIR/usr/lib/scopy/translations - - if [ -d $REGMAP_XMLS ]; then - cp -r $REGMAP_XMLS $APP_DIR/usr/lib/scopy/plugins - fi - - cp $STAGING_AREA_DEPS/lib/libspdlog.so* $APP_DIR/usr/lib - cp -r $QT_LOCATION/plugins $APP_DIR/usr - cp $QT_LOCATION/lib/libQt5XcbQpa.so* $APP_DIR/usr/lib - cp $QT_LOCATION/lib/libQt5EglFSDeviceIntegration.so* $APP_DIR/usr/lib - cp $QT_LOCATION/lib/libQt5DBus.so* $APP_DIR/usr/lib - cp /usr/lib/x86_64-linux-gnu/libXdmcp.so* $APP_DIR/usr/lib - cp /usr/lib/x86_64-linux-gnu/libbsd.so* $APP_DIR/usr/lib - cp /usr/lib/x86_64-linux-gnu/libXau.so* $APP_DIR/usr/lib - cp /usr/lib/x86_64-linux-gnu/libffi.so* $APP_DIR/usr/lib - popd -} - -create_appimage(){ - rm -rf $APP_IMAGE - - pushd ${STAGING_AREA} - export APPIMAGE_EXTRACT_AND_RUN=1 - ${STAGING_AREA}/linuxdeploy-plugin-appimage-x86_64.AppImage --appdir $APP_DIR - mv Scopy*.AppImage $APP_IMAGE - chmod +x $APP_IMAGE - popd -} - -generate_ci_envs(){ - $GITHUB_WORKSPACE/ci/general/gen_ci_envs.sh > $GITHUB_WORKSPACE/ci/x86_64/gh-actions.envs -} - -move_appimage(){ - mv $APP_IMAGE $SRC_DIR -} - - -# -# Helper functions -# - -build_deps(){ - install_packages - clone - download_tools - build_libiio ON - build_libad9361 ON - build_spdlog ON - build_libm2k ON - build_volk ON - build_gnuradio ON - build_grscopy ON - build_grm2k ON - build_qwt ON - build_libsigrokdecode ON - build_libtinyiiod ON -} - -run_workflow(){ - install_packages - download_tools - build_iio-emu - build_scopy - create_appdir - create_appimage - move_appimage -} - -get_tools(){ - install_packages - download_tools -} - -generate_appimage(){ - download_tools - build_iio-emu - build_scopy - create_appdir - create_appimage -} - - -for arg in $@; do - $arg -done diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake deleted file mode 100644 index debf74223d..0000000000 --- a/cmake/Modules/FindQwt.cmake +++ /dev/null @@ -1,54 +0,0 @@ -# * try to find Qwt libraries and include files QWT_INCLUDE_DIR where to find qwt_global.h, etc. QWT_LIBRARIES libraries -# to link against QWT_FOUND If false, do not try to use Qwt qwt_global.h holds a string with the QWT version; test to -# make sure it's at least 5.2 - -find_path( - QWT_INCLUDE_DIRS - NAMES qwt_global.h - HINTS ${CMAKE_INSTALL_PREFIX}/include/qwt - PATHS /usr/local/include/qwt-qt5 - /usr/local/include/qwt - /usr/include/qwt6 - /usr/include/qwt-qt5 - /usr/include/qwt - /usr/include/qwt5 - /opt/local/include/qwt - /sw/include/qwt - /usr/local/lib/qwt.framework/Headers -) - -find_library( - QWT_LIBRARIES - NAMES qwt6 qwt6-qt5 qwt qwt-qt5 - HINTS ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64 - PATHS /usr/local/lib - /usr/lib - /opt/local/lib - /sw/lib - /usr/local/lib/qwt.framework -) - -set(QWT_FOUND FALSE) -if(QWT_INCLUDE_DIRS) - file(STRINGS "${QWT_INCLUDE_DIRS}/qwt_global.h" QWT_STRING_VERSION REGEX "QWT_VERSION_STR") - set(QWT_WRONG_VERSION True) - set(QWT_VERSION "No Version") - string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" QWT_VERSION ${QWT_STRING_VERSION}) - string(COMPARE LESS ${QWT_VERSION} "5.2.0" QWT_WRONG_VERSION) - string(COMPARE GREATER ${QWT_VERSION} "6.2.0" QWT_WRONG_VERSION) - - message(STATUS "QWT Version: ${QWT_VERSION}") - if(NOT QWT_WRONG_VERSION) - set(QWT_FOUND TRUE) - else(NOT QWT_WRONG_VERSION) - message(STATUS "QWT Version must be >= 5.2 and <= 6.2.0, Found ${QWT_VERSION}") - endif(NOT QWT_WRONG_VERSION) - -endif(QWT_INCLUDE_DIRS) - -if(QWT_FOUND) - # handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if all listed variables are TRUE - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS) - mark_as_advanced(QWT_LIBRARIES QWT_INCLUDE_DIRS) -endif(QWT_FOUND) diff --git a/cmake/Modules/ScopyAbout.cmake b/cmake/Modules/ScopyAbout.cmake deleted file mode 100644 index 47942c826d..0000000000 --- a/cmake/Modules/ScopyAbout.cmake +++ /dev/null @@ -1,115 +0,0 @@ -if(DEFINED __INCLUDED_SCOPY_ABOUT_CMAKE) - return() -endif() -set(__INCLUDED_SCOPY_ABOUT_CMAKE TRUE) - -# Get the GIT hash of the latest commit -include(FindGit OPTIONAL) -if(GIT_FOUND) - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --show-toplevel - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE SCOPY_GIT_REPO - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE SCOPY_VERSION_GIT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND ${GIT_EXECUTABLE} diff - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE SCOPY_GIT_DIFF - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - if(NOT SCOPY_GIT_DIFF STREQUAL "") - set(SCOPY_GIT_DIRTY "dirty") - endif() -endif() - -function(configure_about ABOUT_RESOURCES_DIR) - string(TIMESTAMP TODAY "%Y-%m-%d") - string(TIMESTAMP NOW "%H:%M:%S") - cmake_host_system_information(RESULT BUILD_HOST QUERY HOSTNAME) - - set(BUILD_INFO) - if(DEFINED ENV{BUILD_HOST}) - if($ENV{USERNAME} STREQUAL "github-actions") - set(CI_URL $ENV{GITHUB_SERVER_URL}) - set(CI_API_URL $ENV{GITHUB_API_URL}) - set(CI_ACCOUNT_NAME $ENV{GITHUB_REPOSITORY_OWNER}) - set(CI_PROJECT_NAME $ENV{GITHUB_REPOSITORY}) - set(CI_RUN_ID $ENV{GITHUB_RUN_ID}) - set(CI_RUN_NUMBER $ENV{GITHUB_RUN_NUMBER}) - set(CI_JOB_ID $ENV{GITHUB_RUN_ID}) - set(CI_JOB_NAME $ENV{GITHUB_JOB}) - set(CI_JOB_NUMBER $ENV{GITHUB_RUN_NUMBER}) - set(CI_JOB_LINK - $ENV{GITHUB_SERVER_URL}/$ENV{GITHUB_REPOSITORY_OWNER}/$ENV{GITHUB_REPOSITORY}/actions/runs/$ENV{GITHUB_RUN_ID} - ) - else($ENV{USERNAME} STREQUAL "azure-pipelines") - set(CI_URL $ENV{BUILD_REPO_URL}) - set(CI_API_URL "-") - set(CI_ACCOUNT_NAME $ENV{ACCOUNT_NAME}) - set(CI_PROJECT_NAME $ENV{PROJECT_NAME}) - set(CI_RUN_ID $ENV{RUN_ID}) - set(CI_RUN_NUMBER $ENV{RUN_NUMBER}) - set(CI_JOB_ID $ENV{JOB_ID}) - set(CI_JOB_NAME $ENV{JOB_NAME}) - set(CI_JOB_NUMBER "-") - set(CI_JOB_LINK "-") - endif() - - set(BUILD_INFO ${BUILD_INFO}Built\ on\ $ENV{USERNAME}\n) - set(BUILD_INFO ${BUILD_INFO}url:\ ${CI_URL}\n) - set(BUILD_INFO ${BUILD_INFO}api_url:\ ${CI_API_URL}\n) - set(BUILD_INFO ${BUILD_INFO}acc_name:\ ${CI_ACCOUNT_NAME}\n) - set(BUILD_INFO ${BUILD_INFO}prj_name:\ ${CI_PROJECT_NAME}\n) - set(BUILD_INFO ${BUILD_INFO}run_id:\ ${CI_RUN_ID}\n) - set(BUILD_INFO ${BUILD_INFO}run_nr:\ ${CI_RUN_NUMBER}\n) - set(BUILD_INFO ${BUILD_INFO}job_id:\ ${CI_JOB_ID}\n) - set(BUILD_INFO ${BUILD_INFO}job_name:\ ${CI_JOB_NAME}\n) - set(BUILD_INFO ${BUILD_INFO}job_nr:\ ${CI_JOB_NUMBER}\n) - set(BUILD_INFO ${BUILD_INFO}job_link:\ ${CI_JOB_LINK}\n) - - if(EXISTS ${CMAKE_SOURCE_DIR}/build-status) - message("build-status found in ${CMAKE_SOURCE_DIR}.. populating") - file(READ ${CMAKE_SOURCE_DIR}/build-status SCOPY_BUILD_STATUS_INFO) - endif() - else() - set(BUILD_INFO ${BUILD_INFO} "Built locally") - endif() - - message(STATUS "AboutPage Info: " ${BUILD_INFO}) - # TODO: Pack these in a GLOB and run foreach - - set(ABOUT_RESOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${ABOUT_RESOURCES_DIR}) - set(ABOUT_RESOURCES_TARGET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/resources) - configure_file(${ABOUT_RESOURCES_DIR}/buildinfo.html.cmakein ${ABOUT_RESOURCES_TARGET_DIR}/buildinfo.html) - configure_file(${ABOUT_RESOURCES_DIR}/scopy_osp.html.cmakein ${ABOUT_RESOURCES_TARGET_DIR}/scopy_osp.html) - configure_file(${ABOUT_RESOURCES_DIR}/credits.html.cmakein ${ABOUT_RESOURCES_TARGET_DIR}/credits.html) - configure_file(${ABOUT_RESOURCES_DIR}/about.html.cmakein ${ABOUT_RESOURCES_TARGET_DIR}/about.html) - configure_file(${ABOUT_RESOURCES_DIR}/scopy_home.html.cmakein ${ABOUT_RESOURCES_TARGET_DIR}/scopy_home.html) - - set(ABOUT_HTML_SOURCES - ${ABOUT_RESOURCES_TARGET_DIR}/buildinfo.html - ${ABOUT_RESOURCES_TARGET_DIR}/scopy_osp.html - ${ABOUT_RESOURCES_TARGET_DIR}/credits.html - ${ABOUT_RESOURCES_TARGET_DIR}/about.html - ${ABOUT_RESOURCES_TARGET_DIR}/scopy_home.html - ${ABOUT_RESOURCES_TARGET_DIR}/license.html - ) - - set(ABOUT_HTML_QRC_SOURCES) - foreach(file ${ABOUT_HTML_SOURCES}) - get_filename_component(file_name ${file} NAME) - set(ABOUT_HTML_QRC_SOURCES "${ABOUT_HTML_QRC_SOURCES}\n${file_name}") - endforeach() - - configure_file(${ABOUT_RESOURCES_DIR}/aboutpage.qrc.cmakein ${ABOUT_RESOURCES_TARGET_DIR}/aboutpage.qrc @ONLY) - message(STATUS "built about page in - " ${ABOUT_RESOURCES_TARGET_DIR}/aboutpage.qrc) - -endfunction() diff --git a/cmake/Modules/ScopyMacOS.cmake b/cmake/Modules/ScopyMacOS.cmake deleted file mode 100644 index 6f49bae6ee..0000000000 --- a/cmake/Modules/ScopyMacOS.cmake +++ /dev/null @@ -1,60 +0,0 @@ -if(DEFINED __INCLUDED_SCOPY_MACOS_CMAKE) - return() -endif() -set(__INCLUDED_SCOPY_MACOS_CMAKE TRUE) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") - -set(PKGINFO ${CMAKE_BINARY_DIR}/PkgInfo) -file(WRITE ${PKGINFO} "APPLScopy") -set_source_files_properties(${PKGINFO} PROPERTIES MACOSX_PACKAGE_LOCATION .) - -set(QT_CONF ${CMAKE_BINARY_DIR}/qt.conf) -file(APPEND ${QT_CONF} "") -set_source_files_properties(${QT_CONF} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - -set(ICON_FILE ${CMAKE_SOURCE_DIR}/gui/res/Scopy.icns) -set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - -set(CMAKE_EXE_LINKER_FLAGS "-Wl,-headerpad_max_install_names -Wl,-search_paths_first ${CMAKE_EXE_LINKER_FLAGS}") - -foreach(plugin ${Qt5Gui_PLUGINS} ${Qt5Svg_PLUGINS}) - get_target_property(_loc ${plugin} LOCATION) - get_filename_component(_name ${_loc} NAME) - get_filename_component(_dir ${_loc} DIRECTORY) - get_filename_component(_dir ${_dir} NAME) - - set_source_files_properties(${_loc} PROPERTIES MACOSX_PACKAGE_LOCATION plugins/${_dir}) - set(QT_PLUGINS ${QT_PLUGINS} ${_loc}) - set(BUNDLED_QT_PLUGINS ${BUNDLED_QT_PLUGINS} ${CMAKE_BINARY_DIR}/Scopy.app/Contents/plugins/${_dir}/${_name}) -endforeach() - -install( - CODE " - set(BU_CHMOD_BUNDLE_ITEMS ON) - include(BundleUtilities) - fixup_bundle(\"${CMAKE_BINARY_DIR}/Scopy.app\" \"${BUNDLED_QT_PLUGINS}\" \"${CMAKE_SOURCE_DIR}\")" -) - -set(OSX_BUNDLE MACOSX_BUNDLE) - -find_package(PkgConfig) -set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) -pkg_check_modules(GLIB REQUIRED glib-2.0) -pkg_check_modules(LIBSIGROK_DECODE REQUIRED libsigrokdecode) -pkg_get_variable(LIBSIGROK_DECODERS_DIR libsigrokdecode decodersdir) -file(GLOB_RECURSE DECODERS ${LIBSIGROK_DECODERS_DIR}/*.py) -foreach(_decoder ${DECODERS}) - file(RELATIVE_PATH _file ${LIBSIGROK_DECODERS_DIR} ${_decoder}) - get_filename_component(_path ${_file} DIRECTORY) - set_property(SOURCE ${_decoder} PROPERTY MACOSX_PACKAGE_LOCATION MacOS/decoders/${_path}) - set(EXTRA_BUNDLE_FILES ${EXTRA_BUNDLE_FILES} ${_decoder}) -endforeach() - -set(EXTRA_BUNDLE_FILES - ${EXTRA_BUNDLE_FILES} - ${QT_PLUGINS} - ${ICON_FILE} - ${PKGINFO} - ${QT_CONF} -) diff --git a/cmake/Modules/ScopyStylesheets.cmake b/cmake/Modules/ScopyStylesheets.cmake deleted file mode 100644 index 2947e08341..0000000000 --- a/cmake/Modules/ScopyStylesheets.cmake +++ /dev/null @@ -1,22 +0,0 @@ -if(DEFINED __INCLUDED_SCOPY_TEST_CMAKE) - return() -endif() -set(__INCLUDED_SCOPY_TEST_CMAKE TRUE) - -# Tell CMake to run moc when necessary: -set(CMAKE_AUTOMOC ON) -# As moc files are generated in the binary dir, tell CMake to always look for includes there: -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -function(configure_stylesheets DU_OPTION) - file(GLOB_RECURSE STYLESHEETS ${CMAKE_CURRENT_SOURCE_DIR}/resources/stylesheets/templates/*.qss.c) - - foreach(_stylesheet ${STYLESHEETS}) - string(REPLACE ".c" "" FILE_OUT ${_stylesheet}) - string(REPLACE "templates/" "" FILE_OUT ${FILE_OUT}) - - execute_process(COMMAND ${CMAKE_C_COMPILER} -E -P ${DU_OPTION} ${_stylesheet} -o ${FILE_OUT}) - - message(STATUS "Done preprocessing ${_stylesheet}, file written to: ${FILE_OUT}") - endforeach() -endfunction() diff --git a/cmake/Modules/ScopyTest.cmake b/cmake/Modules/ScopyTest.cmake deleted file mode 100644 index 00350d96df..0000000000 --- a/cmake/Modules/ScopyTest.cmake +++ /dev/null @@ -1,19 +0,0 @@ -if(DEFINED __INCLUDED_SCOPY_STYLESHEETS_CMAKE) - return() -endif() -set(__INCLUDED_SCOPY_STYLESHEETS_CMAKE TRUE) - -# Tell CMake to run moc when necessary: -set(CMAKE_AUTOMOC ON) -# As moc files are generated in the binary dir, tell CMake to always look for includes there: -set(CMAKE_INCLUDE_CURRENT_DIR ON) -find_package(Qt5 COMPONENTS Test REQUIRED) - -function(SETUP_SCOPY_TESTS) - foreach(_testname ${ARGN}) - set(_test_target ${PROJECT_NAME}_test_${_testname}) - add_executable(${_test_target} tst_${_testname}.cpp) - add_test(NAME ${_test_target} COMMAND ${_test_target}) - target_link_libraries(${_test_target} Qt5::Test ${PROJECT_NAME}) - endforeach() -endfunction() diff --git a/cmake/Modules/ScopyTranslation.cmake b/cmake/Modules/ScopyTranslation.cmake deleted file mode 100644 index 267206ef18..0000000000 --- a/cmake/Modules/ScopyTranslation.cmake +++ /dev/null @@ -1,24 +0,0 @@ -if(DEFINED __INCLUDED_SCOPY_TRANSLATIONS_CMAKE) - return() -endif() -set(__INCLUDED_SCOPY_TRANSLATIONS_CMAKE TRUE) - -function(generate_translations) - file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/translations/*.ts) - set_source_files_properties( - ${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_BINARY_DIR}/translations - MACOSX_PACKAGE_LOCATION ${CMAKE_BINARY_DIR}/translations - ) - qt_add_translation(QM_FILES ${TS_FILES}) - - set(TRANSLATIONS) - foreach(file ${TS_FILES}) - get_filename_component(file_name ${file} NAME_WE) - set(TRANSLATIONS "${TRANSLATIONS}\n${CMAKE_BINARY_DIR}/translations/${file_name}.qm") - endforeach() - - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/resources/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc - @ONLY - ) -endfunction() diff --git a/cmake/Modules/ScopyWindows.cmake b/cmake/Modules/ScopyWindows.cmake deleted file mode 100644 index 448f60d29b..0000000000 --- a/cmake/Modules/ScopyWindows.cmake +++ /dev/null @@ -1,24 +0,0 @@ -if(DEFINED __INCLUDED_SCOPY_WINDOWS_CMAKE) - return() -endif() -set(__INCLUDED_SCOPY_WINDOWS_CMAKE TRUE) - -# Env variables -set(ENV_WORKDIR $ENV{WORKDIR}) -set(ENV_DEST_FOLDER $ENV{DEST_FOLDER}) - -configure_file(windows/scopy-64.iss.cmakein ${CMAKE_CURRENT_BINARY_DIR}/windows/scopy-64.iss @ONLY) - -macro(duplicate_target ORIGINAL NEW) - get_target_property(original_libraries ${ORIGINAL} LINK_LIBRARIES) - get_target_property(original_includes ${ORIGINAL} INCLUDE_DIRECTORIES) - get_target_property(original_options ${ORIGINAL} COMPILE_OPTIONS) - - add_executable( - ${NEW} WIN32 ${PROJECT_SOURCES} ${SCOPY_RESOURCES} ${SCOPY_DEPENDENCIES} ${SCOPY_WIN32_RESOURCES} - ) - - target_link_libraries(${NEW} PRIVATE ${original_libraries}) - target_include_directories(${NEW} PRIVATE ${original_includes}) - target_compile_options(${NEW} PRIVATE ${original_options}) -endmacro() diff --git a/cmake/Modules/ScopyWindowsInstaller.cmake b/cmake/Modules/ScopyWindowsInstaller.cmake deleted file mode 100644 index 782874d436..0000000000 --- a/cmake/Modules/ScopyWindowsInstaller.cmake +++ /dev/null @@ -1,17 +0,0 @@ -set(PLUGIN_COMPONENTS "" CACHE STRING "PLUGIN COMPONENTS FOR WINDOWS INSTALLER" FORCE) -set(PLUGIN_COMPONENTS_FILES "" CACHE STRING "PLUGIN COMPONENTS FILES FOR WINDOWS INSTALLER" FORCE) - -function(ConfigureInstallerSettings PLUGIN_TARGET_NAME PLUGIN_INSTALLER_DESCRIPTION FIXED_INSTALLER_OPTION) - set(SELECTABLE "; Flags: disablenouninstallwarning") - if(${FIXED_INSTALLER_OPTION} MATCHES FALSE) - set(SELECTABLE "compact custom ; Flags: fixed") - endif() - set(PLUGIN_COMPONENTS - "${PLUGIN_COMPONENTS} \n Name: \"plugins/${PLUGIN_TARGET_NAME}\"; Description: ${PLUGIN_INSTALLER_DESCRIPTION} ; Types: full plugins ${SELECTABLE} ;" - CACHE STRING "PLUGIN COMPONENTS FOR WINDOWS INSTALLER" FORCE - ) - set(PLUGIN_COMPONENTS_FILES - "${PLUGIN_COMPONENTS_FILES} \n Source:\"{#DestFolder}\\plugins\\libscopy-${PLUGIN_TARGET_NAME}.dll\"; DestDir: \"{app}\\plugins\"; Components: plugins\\${PLUGIN_TARGET_NAME}; Flags: ignoreversion skipifsourcedoesntexist onlyifdoesntexist ;" - CACHE STRING "PLUGIN COMPONENTS FILES FOR WINDOWS INSTALLER" FORCE - ) -endfunction() diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt deleted file mode 100644 index 4b9bfc2385..0000000000 --- a/common/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ -cmake_minimum_required(VERSION 3.9) - -set(SCOPY_MODULE common) -project(scopy-${SCOPY_MODULE} VERSION 0.1 LANGUAGES CXX) - -include(GenerateExportHeader) - -# TODO: split stylesheet/resources and add here TODO: export header files correctly - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_CXX_VISIBILITY_PRESET hidden) -set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE) - -set(SCOPY_QT_COMPONENTS Core Widgets Concurrent) - -file(GLOB SRC_LIST src/*.cpp src/*.cc) -file(GLOB HEADER_LIST include/${SCOPY_MODULE}/*.h include/${SCOPY_MODULE}/*.hpp) -file(GLOB UI_LIST ui/*.ui) - -configure_file( - include/${SCOPY_MODULE}/${PROJECT_NAME}_config.h.cmakein - ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_config.h @ONLY -) -set(SRC_LIST ${SRC_LIST} ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_config.h) - -set(PROJECT_SOURCES ${SRC_LIST} ${HEADER_LIST} ${UI_LIST}) - -find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${SCOPY_QT_COMPONENTS} REQUIRED) - -add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCES}) - -generate_export_header( - ${PROJECT_NAME} EXPORT_FILE_NAME ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_export.h -) - -target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}) -target_include_directories(${PROJECT_NAME} PUBLIC scopy-gui scopy-pluginbase scopyiioutil) - -foreach(comp ${SCOPY_QT_COMPONENTS}) - set(SCOPY_QT_LIBRARIES ${SCOPY_QT_LIBRARIES} Qt${QT_VERSION_MAJOR}::${comp}) -endforeach() - -target_link_libraries(${PROJECT_NAME} PUBLIC ${SCOPY_QT_LIBRARIES}) - -install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SCOPY_DLL_INSTALL_PATH} - RUNTIME DESTINATION ${SCOPY_DLL_INSTALL_PATH} -) diff --git a/common/include/common/common.h b/common/include/common/common.h deleted file mode 100644 index 9977eef47a..0000000000 --- a/common/include/common/common.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef COMMON_H -#define COMMON_H - -#include -#include - -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) -namespace Qt { -static auto endl = ::endl; -static auto SkipEmptyParts = QString::SkipEmptyParts; -} // namespace Qt -#endif - -#endif // COMMON_H diff --git a/common/include/common/scopy-common_config.h.cmakein b/common/include/common/scopy-common_config.h.cmakein deleted file mode 100644 index 18a7d51cea..0000000000 --- a/common/include/common/scopy-common_config.h.cmakein +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SCOPY_COMMON_CONFIG_H_CMAKEIN -#define SCOPY_COMMON_CONFIG_H_CMAKEIN - -#define SCOPY_VERSION "@SCOPY_VERSION@" -#define SCOPY_VERSION_GIT "@SCOPY_VERSION_GIT@" -#define SCOPY_GIT_DIRTY "@SCOPY_GIT_DIRTY@" - -#define SCOPY_PLUGIN_INSTALL_PATH "@SCOPY_PLUGIN_INSTALL_PATH@" -#define SCOPY_PLUGIN_BUILD_PATH "@SCOPY_PLUGIN_BUILD_PATH@" - -#define SCOPY_TRANSLATION_INSTALL_PATH "@SCOPY_TRANSLATION_INSTALL_PATH@" -#define SCOPY_TRANSLATION_BUILD_PATH "./translations" - -#define SCOPY_TEMP_LOG_FILE ".scopyTmpLog" - -#endif // SCOPY_COMMON_CONFIG_H_CMAKEIN - diff --git a/common/include/common/scopyconfig.h b/common/include/common/scopyconfig.h deleted file mode 100644 index f6965fb8d8..0000000000 --- a/common/include/common/scopyconfig.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef SCOPYCONFIG_H -#define SCOPYCONFIG_H - -#include "scopy-common_export.h" - -#include - -namespace scopy { - -class SCOPY_COMMON_EXPORT config -{ -public: - static QString tempLogFilePath(); - static QString defaultPluginFolderPath(); - static QString localPluginFolderPath(); - static QString defaultTranslationFolderPath(); - static QString localTranslationFolderPath(); - static QString preferencesFolderPath(); - static QString settingsFolderPath(); - static QString executableFolderPath(); - static QString version(); - static QString gitCommit(); - static QString fullversion(); - static QString os(); - static QString pcSpecs(); - - static QString dump(); - static QString getUuid(); - -private: - inline static int uuid = 0; -}; -} // namespace scopy -#endif // SCOPYCONFIG_H diff --git a/common/src/scopyconfig.cpp b/common/src/scopyconfig.cpp deleted file mode 100644 index 9e076f50f8..0000000000 --- a/common/src/scopyconfig.cpp +++ /dev/null @@ -1,115 +0,0 @@ -#include "scopyconfig.h" - -#include "scopy-common_config.h" - -#include -#include -#include -#include -#include - -QString scopy::config::tempLogFilePath() { return QDir::cleanPath(settingsFolderPath() + "/" + SCOPY_TEMP_LOG_FILE); } - -QString scopy::config::defaultPluginFolderPath() -{ - -#ifdef WIN32 - // Scopy_install_folder/plugins - return QCoreApplication::applicationDirPath() + "/plugins"; -#elif defined __APPLE__ - // Scopy.app/Contents/MacOS/plugins - return QCoreApplication::applicationDirPath() + "/plugins"; -#elif defined(__appimage__) - // usr/lib/plugins - return QCoreApplication::applicationDirPath() + "/../lib/scopy/plugins"; -#endif - - return SCOPY_PLUGIN_INSTALL_PATH; -} - -QString scopy::config::localPluginFolderPath() { return SCOPY_PLUGIN_BUILD_PATH; } - -QString scopy::config::defaultTranslationFolderPath() -{ -#if defined __APPLE__ - return QCoreApplication::applicationDirPath() + "/translations"; -#elif defined(__appimage__) - return QCoreApplication::applicationDirPath() + "/../lib/scopy/translations"; -#endif - return SCOPY_TRANSLATION_INSTALL_PATH; -} - -QString scopy::config::localTranslationFolderPath() { return SCOPY_TRANSLATION_BUILD_PATH; } - -QString scopy::config::preferencesFolderPath() -{ - return QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); -} - -QString scopy::config::settingsFolderPath() -{ - return QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); -} - -QString scopy::config::executableFolderPath() { return QCoreApplication::applicationDirPath(); } - -QString scopy::config::version() { return SCOPY_VERSION; } - -QString scopy::config::gitCommit() { return SCOPY_VERSION_GIT; } - -QString scopy::config::fullversion() -{ - QString ver = QString("v") + SCOPY_VERSION + "-g" + SCOPY_VERSION_GIT; - if(QString(SCOPY_GIT_DIRTY) == "dirty") { - ver += QString("-") + "dirty"; - } - return ver; -} - -QString scopy::config::os() { return QSysInfo::prettyProductName(); } - -QString scopy::config::pcSpecs() -{ - QString ret; - ret.append("build_abi: " + QSysInfo::buildAbi()); - ret.append("\n"); - ret.append("build_cpu: " + QSysInfo::buildCpuArchitecture()); - ret.append("\n"); - ret.append("host: " + QSysInfo::machineHostName()); - ret.append("\n"); - ret.append("arch: " + QSysInfo::currentCpuArchitecture()); - ret.append("\n"); - ret.append("kernel: " + QSysInfo::kernelType()); - ret.append("\n"); - ret.append("kernel-ver: " + QSysInfo::kernelVersion()); - ret.append("\n"); - - return ret; -} - -QString scopy::config::dump() -{ - QString ret; - - ret = QString("ScopyConfig"); - ret += QString("\n") + "DefaultPluginFolderPath: " + defaultPluginFolderPath(); - ret += QString("\n") + "PreferencesPluginFolderPath: " + preferencesFolderPath(); - ret += QString("\n") + "SettingsFolderPath: " + settingsFolderPath(); - ret += QString("\n") + "ExecutableFolderPath: " + executableFolderPath(); - ret += QString("\n") + "version: " + version(); - ret += QString("\n") + "gitCommit: " + gitCommit(); - ret += QString("\n") + "fullversion: " + fullversion(); - ret += QString("\n") + "os: " + os(); - ret += QString("\n") + "pcSpecs: \n" + pcSpecs(); - - return ret; -} - -QString scopy::config::getUuid() -{ -#ifdef USE_QUUID - return QUuid.createUuid().toString(); -#else - return QString::number(uuid++); -#endif -} diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt deleted file mode 100644 index eadb1639de..0000000000 --- a/core/CMakeLists.txt +++ /dev/null @@ -1,122 +0,0 @@ -cmake_minimum_required(VERSION 3.9) - -set(SCOPY_MODULE core) -project(scopy-${SCOPY_MODULE} VERSION 0.1 LANGUAGES CXX) - -include(GenerateExportHeader) - -# TODO: split stylesheet/resources and add here TODO: export header files correctly - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_CXX_VISIBILITY_PRESET hidden) -set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE) - -set(SCOPY_QT_COMPONENTS Core Widgets Concurrent Network) - -file(GLOB SRC_LIST src/*.cpp src/*.cc) -file(GLOB HEADER_LIST include/${SCOPY_MODULE}/*.h include/${SCOPY_MODULE}/*.hpp) -file(GLOB UI_LIST ui/*.ui) - -if(ENABLE_TESTING) - add_subdirectory(test) -endif() - -option(WITH_PYTHON "Enable Python" ON) -if(${WITH_PYTHON}) - set(Python_ADDITIONAL_VERSIONS 3) - if(PYTHON_EXECUTABLE) - message(STATUS "Using custom Python EXECUTABLE: ${PYTHON_EXECUTABLE}") - set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) - else() - message(STATUS "Using default Python EXECUTABLE") - endif() - - if(CMAKE_SYSTEM_PROCESSOR MATCHES arm) - find_package(Python3 3.9 EXACT REQUIRED COMPONENTS Interpreter) - message(STATUS "Host Python Interpreter " ${Python3_EXECUTABLE}) - set(Python3_EXECUTABLE ${CMAKE_SYSROOT}/bin/python3.9) - message(STATUS "Target Python Interpreter " ${Python3_EXECUTABLE}) - else() - find_package(Python3 REQUIRED COMPONENTS Interpreter Development) - message(STATUS "Python Interpreter " ${Python3_EXECUTABLE}) - message(STATUS "Python Libraries " ${Python3_LIBRARIES}) - endif() - set(PYTHON_VERSION python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} CACHE STRING "PYTHON_USED") - set(PYTHON_VERSION ${PYTHON_VERSION} PARENT_SCOPE) - if(NOT Python3_FOUND) - set(WITH_PYTHON OFF) - message(STATUS "Python not found") - endif() - set(BUILD_PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS}/${PYTHON_VERSION}) -endif() - -option(WITH_SIGROK "Search for libsigrokdecode" ON) -if(WITH_SIGROK) - find_package(PkgConfig) - set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) - pkg_check_modules(GLIB REQUIRED glib-2.0) - pkg_check_modules(LIBSIGROK_DECODE REQUIRED libsigrokdecode) - pkg_get_variable(LIBSIGROK_DECODERS_DIR libsigrokdecode decodersdir) - if(NOT LIBSIGROK_DECODE_FOUND) - set(WITH_SIGROK OFF) - message(STATUS "Libsigrokdecode not found") - endif() -endif() - -option(SCOPY_DEV_MODE "Enable development specific scopy behavior - autoconnect to a context on start" FALSE) - -configure_file( - include/${SCOPY_MODULE}/${PROJECT_NAME}_config.h.cmakein - ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_config.h @ONLY -) -set(SRC_LIST ${SRC_LIST} ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_config.h) - -set(PROJECT_SOURCES ${SRC_LIST} ${HEADER_LIST} ${UI_LIST}) - -find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${SCOPY_QT_COMPONENTS} REQUIRED) - -add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCES}) - -generate_export_header( - ${PROJECT_NAME} EXPORT_FILE_NAME ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE}/${PROJECT_NAME}_export.h -) - -target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) -target_include_directories( - ${PROJECT_NAME} - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/${SCOPY_MODULE} - ${GLIB_INCLUDE_DIRS} - ${GLIBCONFIG_INCLUDE_DIRS} - ${LIBSIGROK_DECODE_INCLUDE_DIRS} - ${Python3_INCLUDE_DIRS} -) - -target_include_directories(${PROJECT_NAME} PUBLIC scopy-gui scopy-pluginbase scopy-iioutil scopy-common) - -foreach(comp ${SCOPY_QT_COMPONENTS}) - set(SCOPY_QT_LIBRARIES ${SCOPY_QT_LIBRARIES} Qt${QT_VERSION_MAJOR}::${comp}) -endforeach() - -target_link_libraries( - ${PROJECT_NAME} - PUBLIC ${SCOPY_QT_LIBRARIES} - scopy-common - scopy-gui - scopy-pluginbase - scopy-iioutil - ${LIBSIGROK_DECODE_LINK_LIBRARIES} - ${Python3_LIBRARIES} -) - -install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SCOPY_DLL_INSTALL_PATH} - RUNTIME DESTINATION ${SCOPY_DLL_INSTALL_PATH} -) diff --git a/core/doc/core.qmodel b/core/doc/core.qmodel deleted file mode 100644 index 477957ed32..0000000000 --- a/core/doc/core.qmodel +++ /dev/null @@ -1,8026 +0,0 @@ - - - - {cb0e6182-fcf3-4d57-b703-f56fdf70a51f} - - - - - - - - {508cbebe-a13d-4171-b5af-cf6166c8c6e5} - - - ToolLauncher - - - - - - - {111561c6-c2fc-49a1-9a09-d5dd9677ecca} - - - - - - - - - - {111561c6-c2fc-49a1-9a09-d5dd9677ecca} - - - ToolLauncher - - - - - - - - - - - - {cbf1a1b0-39c4-4d44-8113-310d37c9e806} - - - {e5cec4ae-5440-402d-ae73-f83619f01a3a} - ToolMenuItem - x:-415;y:140 - x:-105;y:-45;w:210;h:90 - 0 - - - scopy - true - - - - - - - - - - - {f3fb892a-efcc-4cc7-bc8d-d8c4f2ae5478} - - - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - ToolMenu - x:45;y:65 - x:-200;y:-75;w:400;h:150 - 0 - - - scopy - true - - - - - - - - - - - {3d2fa280-8947-40f0-9dcd-362b7b3a4d1d} - - - {8c0170c2-f9d0-4491-bf3d-2204f364499a} - ToolBrowser - x:5;y:-105 - x:-80;y:-45;w:160;h:90 - 0 - - - scopy - true - - - - - - - - - - - {e6f4339c-5403-4e5b-a84e-33e7532a3814} - - - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - IIOScanTask - x:-350;y:1125 - x:-140;y:-60;w:280;h:120 - 0 - - - scopy - true - - - - - - - - - - - {2f13ea6e-7710-49ba-ba5e-0c089c6f89bf} - - - {6eea67d7-35e8-4041-b57f-f991e39eb5b0} - ToolBrowser - x:-385;y:-40 - x:-75;y:-55;w:150;h:110 - 8 - - - Ui - true - - - - - - - - - - - {f25dfcce-a733-48fe-b61f-85da7372dea4} - - - {d82707d1-ed8b-4d71-8be2-b936704d376f} - {3d2fa280-8947-40f0-9dcd-362b7b3a4d1d} - {f3fb892a-efcc-4cc7-bc8d-d8c4f2ae5478} - - - - - 1 - - - - - 1 - 2 - - - - - - - - - - - - - {078c7cdf-513e-49be-9e53-ef9b14ed39f1} - - - {b8905ba5-5a28-4eff-9f32-6b4480a1bdf9} - {cbf1a1b0-39c4-4d44-8113-310d37c9e806} - {f3fb892a-efcc-4cc7-bc8d-d8c4f2ae5478} - - - - - 1 - true - 2 - - - - - N - - - - - - - - - - - - - {e0d560f6-8887-4564-b899-9f69adbdf9d2} - - - {918ef0ee-20c4-4058-98ee-950f9198032d} - ScannedIIOContextCollector - x:0;y:1310 - x:-120;y:-95;w:240;h:190 - false - 0 - - - scopy - true - - - - - - - - - - - {1dadc92d-90a2-4f13-873e-0da9e8850886} - - - {eefce8db-f53b-4c04-a783-53141a58636c} - InfoPageStack - x:705;y:-120 - x:-120;y:-55;w:240;h:110 - 0 - - - scopy - true - - - - - - - - - - - {612af92f-aadd-4bb2-9dc2-d43351278600} - - - {636b2d0b-a84c-49f7-99c4-50acfa484261} - DeviceBrowser - x:880;y:30 - x:-150;y:-80;w:300;h:160 - 0 - - - scopy - true - - - - - - - - - - - {989a4a1a-7a00-4244-8034-3eaf149bd47d} - - - {107011b1-ab5c-41df-ae4c-d3217e9c4cd6} - ToolStack - x:-475;y:505 - x:-65;y:-55;w:130;h:110 - 0 - - - scopy - true - - - - - - - - - - - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - ScopyHomePage - x:535;y:455 - x:-130;y:-130;w:260;h:260 - 0 - - - scopy - true - - - - - - - - - - - {a82a6eeb-bc09-482b-8eb0-a36c68edb4e9} - - - {f031329d-0e5c-4a90-a57e-f8a86416952a} - ScopyHomePage - x:470;y:-110 - x:-70;y:-60;w:140;h:120 - 8 - - - Ui - true - - - - - - - - - - - {6b294752-6f89-4dd6-96cd-bd717f4c54dc} - - - {da64f435-c57c-488d-8868-7ee78f602ca1} - {a82a6eeb-bc09-482b-8eb0-a36c68edb4e9} - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - - - 1 - true - 2 - - - - - - - - - - - - - {129bd5e3-9e46-42b9-806f-8f6d279d7374} - - - {eb5e4992-ae81-4b22-ac67-12549cd7ef64} - {2f13ea6e-7710-49ba-ba5e-0c089c6f89bf} - {f3fb892a-efcc-4cc7-bc8d-d8c4f2ae5478} - - - - - 1 - true - 2 - - - - - - - - - - - - - {2358ec04-d8eb-4c0f-8714-c1fa621cb6fb} - - - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - ScopyHomeAddPage - x:950;y:425 - x:-160;y:-195;w:320;h:390 - 0 - - - scopy - true - - - - - - - - - - - {03139944-2440-4bb1-a1e1-26cae263e3b0} - - - {a129f405-975e-421b-83b6-ebdd955755b1} - {2358ec04-d8eb-4c0f-8714-c1fa621cb6fb} - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - - - 1 - true - 2 - - - - - - - - - - - - - {c48402ba-05a9-4c42-be10-6b9be218d505} - - - {5df62805-153e-4580-ad33-aa575d45b6fe} - {1dadc92d-90a2-4f13-873e-0da9e8850886} - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - - - 1 - true - 2 - - - - - - - - - - - - - {51bbd323-1840-4ac8-96f0-fa46643eda8e} - - - {25806c5b-f5b2-4140-b3d3-2e86ad2b6303} - {612af92f-aadd-4bb2-9dc2-d43351278600} - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - - - 1 - true - 2 - - - - - - - - - - - - - {0c8b1776-fff4-4ce4-ae38-3f7964627170} - - - {65918884-8aa9-46c0-91f2-20de46f824fc} - {a82a6eeb-bc09-482b-8eb0-a36c68edb4e9} - {612af92f-aadd-4bb2-9dc2-d43351278600} - - - - - - - - - - - - - {8eeba126-8b79-4a38-a0bf-49f94489c490} - - - {ad47f512-aade-4023-9a91-64a07c0ed8f4} - {a82a6eeb-bc09-482b-8eb0-a36c68edb4e9} - {1dadc92d-90a2-4f13-873e-0da9e8850886} - - - - - - - - - - - - - {25ac4316-5b0b-458b-821c-7daf350511fc} - - - {91cee32b-4c75-42aa-aa16-baa54c9b6810} - {2f13ea6e-7710-49ba-ba5e-0c089c6f89bf} - {3d2fa280-8947-40f0-9dcd-362b7b3a4d1d} - - - - - - - - - - - - - {e5fd782e-263b-4fcb-bf82-b6be6be9618a} - - - {192a9656-2796-478a-a40b-5619baa8acc9} - ScopyMainWindow - x:-280;y:500 - x:-70;y:-35;w:140;h:70 - false - 8 - - - Ui - - - - - - - - - - - {a82cc4e2-4485-4c4a-9ac2-6a3ee8f33ee8} - - - {2cddb820-4d60-4b57-90c6-9dd7e5909d7b} - {e5fd782e-263b-4fcb-bf82-b6be6be9618a} - {989a4a1a-7a00-4244-8034-3eaf149bd47d} - - - - - - - - - - - - - {6fbd0952-2e96-4a21-9edc-45005f7110f7} - - - {2a1d55a6-8f45-46fb-b4a6-cb7316182a4b} - {e5fd782e-263b-4fcb-bf82-b6be6be9618a} - {f3fb892a-efcc-4cc7-bc8d-d8c4f2ae5478} - - - - - - - - - - - - - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - - - {20440a58-5e88-4172-971b-4184419b0636} - ScopyMainWindow - x:100;y:765 - x:-155;y:-180;w:310;h:360 - 0 - - - scopy - true - - - - - - - - - - - {a00ecd28-cd7d-434e-bbe1-b756de93b404} - - - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - DeviceManager - x:720;y:1130 - x:-170;y:-160;w:340;h:320 - 0 - - - scopy - true - - - - - - - - - - - {9d6dca31-5f32-4536-aa47-7b4002b77910} - - - {8dfe726b-edd7-47bd-a36f-539ed5df80a7} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {e0d560f6-8887-4564-b899-9f69adbdf9d2} - - - - - 1 - true - 2 - - - - - - - - - - - - - {2a301dcf-63db-47d4-b655-135d5493f0bc} - - - {9badadce-e007-4165-9edb-c8d769748076} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {a00ecd28-cd7d-434e-bbe1-b756de93b404} - - - - - 1 - true - 2 - - - - - - - - - - - - - {9674d2db-744f-4611-b219-dd07ddb93528} - - - {702be005-47af-4698-ada9-d7b835e35d12} - - - interface - - - Device - x:715;y:1550 - x:-120;y:-185;w:240;h:370 - 5 - 1 - - - scopy - true - - - - - - - - - - - {0553e4ac-74bb-447f-b1ad-cd7348d01f10} - - - {3b61ef28-c6a5-4942-8d56-094ea9b42f5e} - {a00ecd28-cd7d-434e-bbe1-b756de93b404} - {9674d2db-744f-4611-b219-dd07ddb93528} - - - - - n - true - 2 - - - - - - - - - - - - - {47b0c4b4-ca46-47b2-88d1-a86d5c39ef34} - - - {ac3c9c31-229f-40fb-a01c-7cb74c329e3c} - ScopyHomeInfoPage - x:855;y:165 - x:-60;y:-30;w:120;h:60 - 8 - - - Ui - - - - - - - - - - - {7560fdc0-d1ee-4952-89a3-09c32b507caf} - - - {bd470a57-63dc-4d8a-8ed3-80f16bf2eaae} - ScopyHomeAddPage - x:1210;y:430 - x:-60;y:-30;w:120;h:60 - 8 - - - Ui - - - - - - - - - - - {a09ff26f-2b33-4ade-8f18-367d489ee94b} - - - {5bb1f232-8ff5-4cfe-8f23-c1ea90f3a5a6} - {7560fdc0-d1ee-4952-89a3-09c32b507caf} - {2358ec04-d8eb-4c0f-8714-c1fa621cb6fb} - - - - - 1 - true - 2 - - - - - - - - - - - - - {9a64a7d3-be7d-4dff-a9ca-c0cc48ce442b} - - - {11ca845e-4c2d-434a-9c8a-e0fa6a05a291} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - - - 1 - true - 2 - - - - - - - - - - - - - {d5152f58-1810-475d-83a4-d9ce3465511b} - - - {d47f0fa8-cf3f-4c10-9b02-f80af3d57baa} - ToolManager - x:40;y:290 - x:-175;y:-105;w:350;h:210 - 0 - - - scopy - true - - - - - - - - - - - {cbd0db94-432f-4015-b9d6-9c96d2d028e5} - - - {153d8a14-7f4c-4bff-b84d-43e9fe9899dc} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {d5152f58-1810-475d-83a4-d9ce3465511b} - - - - - 1 - true - 2 - - - - - - - - - - - - - {63c95c20-64f2-4942-b244-ef718096e1ea} - - - {64a0db56-30d7-4da2-8563-1dbc182717ec} - {d5152f58-1810-475d-83a4-d9ce3465511b} - {f3fb892a-efcc-4cc7-bc8d-d8c4f2ae5478} - - - - - true - - - - - - - - - - - - - {240e01ed-e5fe-4e03-bfd4-ab9647bb2e3a} - - - {e9e0564d-6ef2-4282-8b77-74f81fa6ba6f} - - - singleton - - - Preferences - x:1575;y:350 - x:-155;y:-110;w:310;h:220 - false - 0 - - - scopy - true - - - - - - - - - - - {42fe1fc3-b6ce-4ac8-8209-f31459946b28} - - - {ae9b784c-2da5-4b97-be82-301848323aa1} - ScopyPreferencesPage - x:-280;y:570 - x:-70;y:-30;w:140;h:60 - 8 - - - scopy - - - - - - - - - - - {1ccbb4c6-6f1b-42bc-9ff1-b460fea3d047} - - - {acb80f41-d754-4cc2-95a7-df775fa7157e} - ScopyAboutPage - x:-280;y:645 - x:-70;y:-35;w:140;h:70 - false - 8 - - - scopy - - - - - - - - - - - {efe16de1-4e02-45d5-b47c-537b1c5530fb} - - - {3ada95f5-70ce-4634-9e56-589693e0de37} - - - singleton - - - ScopyJS - x:1575;y:100 - x:-155;y:-130;w:310;h:260 - 0 - - - scopy - true - - - - - - - - - - - {5a698e6a-160c-455b-a745-bbf733dd1522} - - - {e929bb03-3710-4a7f-bccf-85ab7e6df124} - - - singleton - - - ContextProvider - x:1920;y:50 - x:-155;y:-75;w:310;h:150 - false - 0 - - - scopy - true - - - - - - - - - - - {7fcaf349-688a-4308-ab75-74f6d692b1a4} - - - {3e714570-f017-421b-9eac-3f4d4b535143} - - - singleton - - - MessageBroker - x:1920;y:220 - x:-155;y:-85;w:310;h:170 - false - 0 - - - scopy - true - - - - - - - - - - - {60df347c-395a-43a7-8f36-bedf20163d09} - - - {ecebe4b3-59a0-464e-9a27-9310eb87cdb1} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {e5fd782e-263b-4fcb-bf82-b6be6be9618a} - - - - - 1 - true - 2 - - - - - - - - - - - - - {680be7fc-30c7-4d43-b4d0-27157f67889b} - - - {88854229-1455-426f-b2b4-c0bb4020e2ea} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {42fe1fc3-b6ce-4ac8-8209-f31459946b28} - - - - - 1 - true - 2 - - - - - - - - - - - - - {7824be7f-c2fb-4385-8d68-93e4271f089d} - - - {9e8a83cb-c801-4e25-8ba4-faf0903518f8} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {1ccbb4c6-6f1b-42bc-9ff1-b460fea3d047} - - - - - 1 - true - 2 - - - - - - - - - - - - - {88d1388a-63f4-4542-a199-737a9570fd29} - - - {4c2b6925-c606-4fe3-a0eb-197091db6b33} - CyclicalTask - x:-290;y:1310 - x:-145;y:-85;w:290;h:170 - 0 - - - scopy - true - - - - - - - - - - - {d51b3fd8-c984-4bbd-b944-8f88319cae30} - - - {e1a0004d-30e5-4261-86c2-03b0f45bee6e} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {88d1388a-63f4-4542-a199-737a9570fd29} - - - - - 1 - true - 2 - - - - - - - - - - - {b8547173-dd1b-48f7-99e3-d6a3410cc5c6} - - - ToolMenu - x:-135;y:120 - x:-435;y:-310;w:870;h:620 - - - - - - - - - {99e99528-e87b-478e-9dfd-37e0339561cd} - - - HomePage - x:820;y:200 - x:-460;y:-430;w:920;h:860 - - - - - - - - - - - {eb5ec4b1-d69d-4aa5-9afe-c696d435e4fe} - - - {57fd3927-5b73-4f4a-aabc-63bc25097500} - {47b0c4b4-ca46-47b2-88d1-a86d5c39ef34} - {d7d56a28-c83a-499f-a32e-a4d5d4793a7e} - - - - - 1 - true - 2 - - - - - - - - - - - - - {58cccf1c-7b09-4d41-9782-9357ccc68967} - - - {b8f6dbab-53f3-4373-ab10-3a89e33f6b9e} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {e6f4339c-5403-4e5b-a84e-33e7532a3814} - - - - - 1 - true - 2 - - - - - - - - - - - {88c596a6-0703-4a64-ba12-81a269b4aeb9} - - - IIO Scanner - x:-190;y:1220 - x:-340;y:-200;w:680;h:400 - - - - - - - - - - - {1b73a85c-954f-4743-aa0f-de25791a6c71} - - - {ddefe768-27cd-4826-a886-1360d27ca8be} - PluginRepository - x:550;y:725 - x:-165;y:-65;w:330;h:130 - false - 0 - - - scopy - true - - - - - - - - - - - {b2514c89-6ccc-4ec8-82ed-1031864f6f64} - - - {ae24a692-ce63-448e-a073-78f38dc60f1d} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {1b73a85c-954f-4743-aa0f-de25791a6c71} - - - - - 1 - true - 2 - - - - - - - - - - - - - {6ac10fe1-9ee3-4a25-9abf-b29af9a1a4d5} - - - {84a2203a-9901-430d-b2b0-eceb9873acf8} - PluginManager - x:1550;y:880 - x:-265;y:-90;w:530;h:180 - 0 - - - scopy - true - - - - - - - - - {1b8091ae-0ef7-450e-bd6e-27bb301690c6} - - - Loads plugins from files - x:385;y:640 - x:0;y:0;w:134.375;h:29 - - - - - - - - - - - {14c3a9e6-25bb-4833-8ec5-6cf015e8877d} - - - {3f6d361a-88d5-4fff-954e-224fdc5049c6} - {1b73a85c-954f-4743-aa0f-de25791a6c71} - {6ac10fe1-9ee3-4a25-9abf-b29af9a1a4d5} - - - - - 1 - true - 2 - - - - - - - - - - - - - {dcec9ade-b44a-4f1c-b0ab-f0a6c377a3ec} - - - {f9b391c1-641c-43ef-92b7-d9e625384a4d} - {a00ecd28-cd7d-434e-bbe1-b756de93b404} - {6ac10fe1-9ee3-4a25-9abf-b29af9a1a4d5} - - - - - - - - - - - - - {ed9372fe-6800-4643-9c09-6a75193bd68a} - - - {1c24efbf-2095-42da-b591-03ac51de74f5} - - - interface - - - Plugin - x:1325;y:1390 - x:-180;y:-305;w:360;h:610 - 5 - 1 - - - scopy - true - - - - - - - - - - - {ec8c339d-7ab2-477c-9ee9-aadd205087ec} - - - {80f110fd-3e62-4acc-b9ec-e8c4b12aed86} - {ed9372fe-6800-4643-9c09-6a75193bd68a} - {6ac10fe1-9ee3-4a25-9abf-b29af9a1a4d5} - - - - - - - - - - - - - {28fe2748-079e-444e-8bfa-ce9344159918} - - - {34a37e62-1b26-470c-aab8-ff932ba4af4f} - DeviceImpl - x:400;y:1630 - x:-125;y:-320;w:250;h:640 - 0 - - - scopy - true - - - - - - - - - - - {6a3dbf9d-da92-4ced-9188-b1fe3a1ebad7} - - - {2dc09cab-f03e-4ea4-bc60-730da5bd016f} - IIODeviceImpl - x:400;y:2030 - x:-125;y:-45;w:250;h:90 - 0 - - - scopy - true - - - - - - - - - - - {29553b09-f6ba-44d3-86a5-c9e6aceaf964} - - - {e021e2a2-f351-43c2-989e-69e9863fdab5} - {6a3dbf9d-da92-4ced-9188-b1fe3a1ebad7} - {28fe2748-079e-444e-8bfa-ce9344159918} - - - - - - - - - - - - - {36166842-6d70-491c-b937-f1c755b28dbd} - - - {32339e89-b019-479e-acdb-85e33500b5e4} - {28fe2748-079e-444e-8bfa-ce9344159918} - {9674d2db-744f-4611-b219-dd07ddb93528} - - - - - - - - - - - {096cd55c-724d-45de-93bb-6856b4aac365} - - - Devices - x:580;y:1575 - x:-320;y:-630;w:640;h:1260 - - - - - - - - - - - {98f23e06-d72a-4a9b-a17a-2b1535e3120f} - - - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - virtual Pluginbase - x:1745;y:1365 - x:-195;y:-250;w:390;h:500 - 0 - - - scopy - true - - - - - - - - - - - {225b0ef4-25ab-4719-9823-add711661609} - - - {57c5ba1b-5d78-4df0-9ea5-ae40bd393211} - {98f23e06-d72a-4a9b-a17a-2b1535e3120f} - {ed9372fe-6800-4643-9c09-6a75193bd68a} - - - - - - - - - - - - - {a5330533-f27d-4453-b69c-292066bcf3d5} - - - {e5d799f1-f437-4b60-8f90-c121dcdfffa7} - MinimalPlugin - x:2235;y:1160 - x:-175;y:-75;w:350;h:150 - false - 0 - - - scopy - true - - - - - - - - - - - {a750c1d6-a2c0-4c43-9992-60b1a15bfdf6} - - - {7b13e5c2-2eef-432f-91bf-bcec1227f956} - {a5330533-f27d-4453-b69c-292066bcf3d5} - {98f23e06-d72a-4a9b-a17a-2b1535e3120f} - - - - - - - - - - - - - {e6ad741d-1489-4d2a-8df2-bd7d3af7a2b4} - - - {6a29bb57-e0d9-4d22-b8a5-71202bb598ed} - Some Other plugin - x:2235;y:1590 - x:-175;y:-45;w:350;h:90 - false - 0 - - - true - - - - - - - - - - - {166a2fd1-71f5-45d8-9998-914fb199b6e1} - - - {4e384797-208b-4c31-9e46-719c31291e37} - {e6ad741d-1489-4d2a-8df2-bd7d3af7a2b4} - {98f23e06-d72a-4a9b-a17a-2b1535e3120f} - - - - - - - - - - - - - {8cbf27f4-011a-4974-9f8e-cfe04de06aa2} - - - {c8c59201-be7f-4531-bc4e-4e6483be1f22} - TestPlugin - x:2235;y:1390 - x:-175;y:-130;w:350;h:260 - 0 - - - scopy - true - - - - - - - - - - - {4ee60f60-2861-4744-a9be-6e01487df093} - - - {0f0647cb-bab1-4254-be37-17453948da23} - {8cbf27f4-011a-4974-9f8e-cfe04de06aa2} - {98f23e06-d72a-4a9b-a17a-2b1535e3120f} - - - - - - - - - - - - - {0c68532d-c719-4332-aaf7-5ca00948a1c5} - - - {d24c3ed9-f0fb-455a-94b1-1b2a54f4a3ff} - {ed9372fe-6800-4643-9c09-6a75193bd68a} - {9674d2db-744f-4611-b219-dd07ddb93528} - - - - - - - - - - - {95724acf-5127-4f02-9604-e68a876a8a69} - - - Plugins --- implemented in pluginbase/core -- - x:1755;y:1265 - x:-700;y:-550;w:1400;h:1100 - - - - - - - - - {112dcc25-6466-461c-aa31-c3941425f8f8} - - - Singleton - x:1740;y:210 - x:-375;y:-290;w:750;h:580 - - - - - - - - - - - {1eb97c8b-dea2-47ad-b34f-0ed781259b76} - - - {fdd7b05c-bb73-4636-952a-c8ce39f7be97} - DeviceLoader - x:395;y:1205 - x:-125;y:-60;w:250;h:120 - 0 - - - scopy - true - - - - - - - - - - - {9c8aec2f-347d-4c37-83b3-75470ee817fc} - - - {b744b131-fa45-4ba3-8a9c-8c15ee06cc4a} - DeviceFactory - x:575;y:2150 - x:-305;y:-40;w:610;h:80 - false - 0 - - - scopy - true - - - - - - - - - - - {beca654d-203c-4f03-8fb3-2baae25a0452} - - - {6a105ad4-9d98-4970-b0c2-e6f14678fdee} - {1eb97c8b-dea2-47ad-b34f-0ed781259b76} - {28fe2748-079e-444e-8bfa-ce9344159918} - - - - - - - - - - - - - {8a822583-9784-4235-bb83-255ac08fa782} - - - {13856c2c-5538-46d8-970f-caf303391d1a} - {a00ecd28-cd7d-434e-bbe1-b756de93b404} - {1eb97c8b-dea2-47ad-b34f-0ed781259b76} - - - - - - - - - - - - - {7ce85ce1-680a-45a8-b79f-a29aa67ef875} - - - {48d6cbe3-addd-452e-979f-13e57400b86c} - ScopyMainWindow_API - x:-335;y:805 - x:-165;y:-110;w:330;h:220 - 0 - - - scopy - true - - - - - - - - - - - {124f058e-4d04-40f6-941a-239bfcfefdc5} - - - {a7dfde00-b313-42be-b1a1-9709b82b389d} - {e6ed922c-ecdc-42c9-b27e-5504f1061806} - {7ce85ce1-680a-45a8-b79f-a29aa67ef875} - - - - - 1 - true - 2 - - - - - - - - - - - - - {77dd9724-9102-457d-a718-308702cd05b8} - - - {43312ec0-6b21-44ef-92c2-11e826117743} - CmdLineHandler - x:-870;y:805 - x:-280;y:-70;w:560;h:140 - 0 - - - scopy - true - - - - - - - - - - - {af857f3c-2f24-4b01-88d9-977f771e4fe2} - - - {e0bf02f8-dd4d-4146-82ff-5262db0d401f} - {77dd9724-9102-457d-a718-308702cd05b8} - {7ce85ce1-680a-45a8-b79f-a29aa67ef875} - - - - - - - - 1695643610058 - General - - - - - - - - - - {e5cec4ae-5440-402d-ae73-f83619f01a3a} - - - - - - - - {e5cec4ae-5440-402d-ae73-f83619f01a3a} - - - ToolMenuItem - - - - - - - {b8905ba5-5a28-4eff-9f32-6b4480a1bdf9} - - - - - - - - {b8905ba5-5a28-4eff-9f32-6b4480a1bdf9} - - - {e5cec4ae-5440-402d-ae73-f83619f01a3a} - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - 1 - true - 2 - - - - - N - - - - - - - - - - - - - - scopy - - - - - {36e72e53-f9a5-4cc8-b456-a2687b1d0327} - 2 - 4 - QPushButton *getToolBtn() - - - - - {0b854737-b70d-4ea6-b69d-e42ac838db3d} - 2 - 4 - QPushButton *getToolRunBtn() - - - - - - - - - - - - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - - - - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - ToolMenu - - - - - - - {12f9e897-5dbe-4bfa-a31a-c632a2b662f8} - - - - - - - - {12f9e897-5dbe-4bfa-a31a-c632a2b662f8} - - - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - {e5cec4ae-5440-402d-ae73-f83619f01a3a} - - - - - n - - - - - 2 - - - - - - - - - - - - - - scopy - - - - - {a1b40a7f-98ec-434f-9764-8dc892d67a70} - 1 - QVector<ToolMenuItem*> tools - - - - - {98107d0a-c99a-4fcc-97dd-3b71750e7d76} - 2 - ToolMenuItem *getToolMenuItemFor(QString toolId) - - - - - {11618b28-f6c9-47ff-9512-9592d2577cdb} - 2 - ToolMenuItem *addTool(QString id, QString name, QString icon, int position) - - - - - {4ce8fbed-1bfc-40dc-8539-3719322dd8e8} - 2 - bool removeTool(QString id) - - - - - {95b82167-f1c6-40db-9221-a8c00301f0cd} - 2 - bool removeTool(ToolMenuItem *tmi) - - - - - {b5d2649c-d514-4989-8190-a56986a637d0} - 2 - 256 - void requestTool(QString) - - - - - - - - - - - - {8c0170c2-f9d0-4491-bf3d-2204f364499a} - - - - - - - - {8c0170c2-f9d0-4491-bf3d-2204f364499a} - - - ToolBrowser - - - - - - - {49ee99b0-a8f7-451b-868c-f9ac5bdb8158} - - - - - - - - {49ee99b0-a8f7-451b-868c-f9ac5bdb8158} - - - {8c0170c2-f9d0-4491-bf3d-2204f364499a} - {6eea67d7-35e8-4041-b57f-f991e39eb5b0} - - - - - 1 - - - - - 2 - - - - - - - - - - {d82707d1-ed8b-4d71-8be2-b936704d376f} - - - - - - - - {d82707d1-ed8b-4d71-8be2-b936704d376f} - - - {8c0170c2-f9d0-4491-bf3d-2204f364499a} - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - 1 - - - - - 1 - 2 - - - - - - - - - - - - - - scopy - - - - - {fbaa9793-4fa5-4c0b-82e0-c1793eb4f1ff} - 2 - ToolMenu* getToolMenu() - - - - - {216c3368-d660-4606-942b-90cbeed4df4a} - 2 - 512 - void requestTool(QString) - - - - - - - - - - - - {4adea8b3-f07c-4731-9092-f050e7182002} - - - - - - - - {4adea8b3-f07c-4731-9092-f050e7182002} - - - singleton ContextProvider - - - - - - - {d2eea9a3-73e3-42e6-927f-509b7ffd899e} - - - - - - - - {d2eea9a3-73e3-42e6-927f-509b7ffd899e} - - - {4adea8b3-f07c-4731-9092-f050e7182002} - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - - - - - - - - - - - - - - adiscope - - - - - {432fdc86-1c3b-471e-b095-5980476ec218} - 2 - 64 - ContextProvider *GetInstance() - - - - - {7c048750-d8e5-41a5-9bc3-d42dc71a7e30} - 2 - struct iio_context* open(QString uri) - - - - - {5f65ce4f-ef81-400e-a4d8-a714ecf23438} - 2 - void close(QString uri) - - - - - - - - - - - - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - - - - - - - - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - - - IIOScanTask - - - - - - - {44e0cae5-892c-49ed-be14-2b822a803abf} - - - - - - - - {44e0cae5-892c-49ed-be14-2b822a803abf} - - - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - {20440a58-5e88-4172-971b-4184419b0636} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {7faa67cc-7d76-4ad6-b139-c1a6ff0ea38c} - 2 - 9 - void run() - - - - - {c8b24a61-4701-44bf-a245-e1bb0ce63ece} - 2 - void setScanParams(QString s) - - - - - {8ddc84d6-7858-4275-be1a-d6504561bb52} - 2 - 64 - int scan(QStringList *ctxs, QString scanParams) - - - - - {208b0601-5cbc-4ce0-ba09-7950fb38b7b3} - 4 - 2 - void scanFinished(QStringList) - - - - - - - - - - - - {ff8114ef-a9e0-42db-90d2-1857b63825dc} - - - - - - - - {ff8114ef-a9e0-42db-90d2-1857b63825dc} - - - - - - - - - - - - {6eea67d7-35e8-4041-b57f-f991e39eb5b0} - - - - - - - - {6eea67d7-35e8-4041-b57f-f991e39eb5b0} - - - ToolBrowser - - - - - - - {eb5e4992-ae81-4b22-ac67-12549cd7ef64} - - - - - - - - {eb5e4992-ae81-4b22-ac67-12549cd7ef64} - - - {6eea67d7-35e8-4041-b57f-f991e39eb5b0} - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - 1 - true - 2 - - - - - - - - - - {91cee32b-4c75-42aa-aa16-baa54c9b6810} - - - - - - - - {91cee32b-4c75-42aa-aa16-baa54c9b6810} - - - {6eea67d7-35e8-4041-b57f-f991e39eb5b0} - {8c0170c2-f9d0-4491-bf3d-2204f364499a} - - - - - - - - - - - - - - Ui - - - - - {7c76fb9c-b90b-4680-8b90-16c1dff823e6} - 1 - QPushButton* btnHome - - - - - {e86d9c16-9df6-4314-87f0-14e3cbb82591} - 1 - QPushButton* btnAbout - - - - - {12aec0be-67e9-4f01-832c-8d22ecc031a4} - 1 - ToolMenu *tm - - - - - - - - - - - - {918ef0ee-20c4-4058-98ee-950f9198032d} - - - - - - - - {918ef0ee-20c4-4058-98ee-950f9198032d} - - - ScannedIIOContextCollector - - - scopy - - - - - {20e65fed-fbe5-4fad-b5d3-5b55e8bfdece} - 7 - 2 - void update(QStringList uris) - - - - - {29a98ba9-7508-461d-aa2d-b0beb726813d} - 7 - 2 - void clearCache() - - - - - {4abbefc1-4fd0-4d2f-bb75-b56f71b0ada0} - 7 - 2 - void lock(QString, Device*) - - - - - {210447f5-e4e3-46cf-816d-dd7007d0e1c6} - 7 - 2 - void unlock(QString, Device*) - - - - - {f460c3ff-4173-44de-beec-9452c6aecfba} - 7 - 2 - void removeDevice(QString id, Device *d) - - - - - {12afad26-817f-47a6-b469-e1184c31c5c2} - 4 - 2 - void foundDevice(QString cat, QString uri) - - - - - {4cbbb274-6d85-4d6c-9087-50298aac2188} - 4 - 2 - void lostDevice(QString cat, QString uri) - - - - - - - - - - - - {eefce8db-f53b-4c04-a783-53141a58636c} - - - - - - - - {eefce8db-f53b-4c04-a783-53141a58636c} - - - InfoPageStack - - - - - - - {b9e42e5a-2a4a-4d6b-a5f7-611e196dc026} - - - - - - - - {b9e42e5a-2a4a-4d6b-a5f7-611e196dc026} - - - {eefce8db-f53b-4c04-a783-53141a58636c} - {f031329d-0e5c-4a90-a57e-f8a86416952a} - - - - - 1 - true - 2 - - - - - - - - - - {5df62805-153e-4580-ad33-aa575d45b6fe} - - - - - - - - {5df62805-153e-4580-ad33-aa575d45b6fe} - - - {eefce8db-f53b-4c04-a783-53141a58636c} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {83ddeab3-5dd1-4f34-a021-fd9ea9e5774f} - 2 - 8 - void add(QString key, QWidget* w) - - - - - {7ee7b2f4-1845-4dd3-a36a-dff81d50dca7} - 2 - 8 - bool remove(QString key) - - - - - {e8b78940-11a5-4ce5-b13e-fa26d9fa93ea} - 7 - 2 - 8 - bool show(QString key) - - - - - - - - - - - - {636b2d0b-a84c-49f7-99c4-50acfa484261} - - - - - - - - {636b2d0b-a84c-49f7-99c4-50acfa484261} - - - DeviceBrowser - - - - - - - {c4254d5d-23a2-4a11-91da-22f1a8460849} - - - - - - - - {c4254d5d-23a2-4a11-91da-22f1a8460849} - - - {636b2d0b-a84c-49f7-99c4-50acfa484261} - {f031329d-0e5c-4a90-a57e-f8a86416952a} - - - - - 1 - true - 2 - - - - - - - - - - {25806c5b-f5b2-4140-b3d3-2e86ad2b6303} - - - - - - - - {25806c5b-f5b2-4140-b3d3-2e86ad2b6303} - - - {636b2d0b-a84c-49f7-99c4-50acfa484261} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {0eb1bd9c-238d-4f56-b876-f76f3fdbbd65} - 1 - 2 - QAbstractButton *getDeviceWidgetFor(QString id) - - - - - {d987b540-7d2f-4736-882b-807f04f58d14} - 1 - 2 - void addDevice(QString id, Device *d, int position = -1) - - - - - {5ce07faa-ca3c-4b54-952b-e22614b37c8a} - 1 - 2 - void removeDevice(QString id) - - - - - {eada4e16-1550-4812-b566-2ebad4e0dc9d} - 1 - 2 - void connectDevice(QString id) - - - - - {14f3afcf-7a80-4d82-9659-a9cbdc3f94a0} - 1 - 2 - void disconnectDevice(QString id) - - - - - {40ba81ae-13c6-434d-8351-09111531e855} - 4 - 2 - void requestDevice(QString id, int direction) - - - - - {99bcaf5f-2d30-4585-892e-bc31a605b374} - 4 - 2 - void requestRemoveDevice(QString id) - - - - - - - - - - - - {107011b1-ab5c-41df-ae4c-d3217e9c4cd6} - - - - - - - - {107011b1-ab5c-41df-ae4c-d3217e9c4cd6} - - - ToolStack - - - scopy - - - - - {b855cc7d-e32c-41d1-b4a1-79281fbdb325} - 2 - void add(QString) - - - - - {f8b684c5-93b6-4e9b-9c3d-66b895483ce8} - 2 - void remove(QString) - - - - - {b72b4cd3-985a-413b-8a54-0aac988dada2} - 7 - 2 - bool show(QString) - - - - - - - - - - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - ScopyHomePage - - - - - - - {f13570ac-eec4-455a-9084-d9849839b9dc} - - - - - - - - {f13570ac-eec4-455a-9084-d9849839b9dc} - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - {eefce8db-f53b-4c04-a783-53141a58636c} - - - - - - - - - - {ed23e470-6f1d-4fa4-84d1-1b1a5a0b3cc7} - - - - - - - - {ed23e470-6f1d-4fa4-84d1-1b1a5a0b3cc7} - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - - - - - 1 - true - 2 - - - - - - - - - - {a4bb44ae-2bd4-4a92-8598-2257c0e3ea58} - - - - - - - - {a4bb44ae-2bd4-4a92-8598-2257c0e3ea58} - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - {eefce8db-f53b-4c04-a783-53141a58636c} - - - - - 1 - true - 2 - - - - - - - - - - {a4c6fda0-3ae3-4bbf-bb21-9e1f3481ff34} - - - - - - - - {a4c6fda0-3ae3-4bbf-bb21-9e1f3481ff34} - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - {20440a58-5e88-4172-971b-4184419b0636} - - - - - 1 - true - 2 - - - - - - - - - - {6b46768c-fb1a-4874-a0f2-dbcc8d252d4b} - - - - - - - - {6b46768c-fb1a-4874-a0f2-dbcc8d252d4b} - - - {29d6cc8f-575c-475d-8969-1a12f0c53306} - {ac3c9c31-229f-40fb-a01c-7cb74c329e3c} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {abd076ba-1de4-427d-a7ad-0307eebb3128} - 4 - 2 - void requestAddDevice(QString cat, QString id) - - - - - {de51d817-4491-4521-a341-5d67a1169018} - 4 - 2 - void requestRemoveDevice(QString id) - - - - - {97e42ccd-928a-42d9-9372-132348a92c03} - 4 - 2 - void requestDevice(QString id) - - - - - {2baf03f2-830a-4207-bf73-19009c78685e} - 4 - 2 - void deviceAddedToUi(QString id) - - - - - {e734afb1-4fa4-4fc4-b17f-99a6e57badc9} - 4 - 2 - void newDeviceAvailable(DeviceImpl *d) - - - - - {27ae4183-b9b3-468c-9210-c93df9193c1f} - 7 - 2 - void addDevice(QString id, Device*) - - - - - {c3ee5d4f-6b89-46cf-b44e-addcc174e0f6} - 7 - 2 - void removeDevice(QString id) - - - - - {9dc3bc78-638e-402f-94a7-9a0daab3bc54} - 7 - 2 - void viewDevice(QString id) - - - - - {1e57a9c1-5eab-4685-afe5-db70e538d147} - 7 - 2 - void connectDevice(QString) - - - - - {1838fda6-ccd1-4f23-b302-23c9819d7a3d} - 7 - 2 - void disconnectDevice(QString) - - - - - {a967ad91-c995-4a4b-b145-c2039239c5d9} - 7 - 1 - Ui::ScopyHomePage *ui - - - - - {2c097f1a-746a-4232-b802-55038dfa8862} - 7 - 1 - ScopyHomeAddPage *add - - - - - {977a6c99-c714-466e-aa2d-1c65d3f50f60} - 7 - 1 - InfoPageStack* is - - - - - {23eb3506-3fa9-4ce6-b685-cdcd834b1baa} - 7 - 1 - DeviceBrowser* db - - - - - - - - - - - - {f031329d-0e5c-4a90-a57e-f8a86416952a} - - - - - - - - {f031329d-0e5c-4a90-a57e-f8a86416952a} - - - ScopyHomePage - - - - - - - {da64f435-c57c-488d-8868-7ee78f602ca1} - - - - - - - - {da64f435-c57c-488d-8868-7ee78f602ca1} - - - {f031329d-0e5c-4a90-a57e-f8a86416952a} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - {65918884-8aa9-46c0-91f2-20de46f824fc} - - - - - - - - {65918884-8aa9-46c0-91f2-20de46f824fc} - - - {f031329d-0e5c-4a90-a57e-f8a86416952a} - {636b2d0b-a84c-49f7-99c4-50acfa484261} - - - - - - - - - - {ad47f512-aade-4023-9a91-64a07c0ed8f4} - - - - - - - - {ad47f512-aade-4023-9a91-64a07c0ed8f4} - - - {f031329d-0e5c-4a90-a57e-f8a86416952a} - {eefce8db-f53b-4c04-a783-53141a58636c} - - - - - - - - - - - - - - Ui - - - - - {5b250858-516f-40f5-9750-50ba4eec4beb} - 1 - QPushButton* btnHome - - - - - {adfb724e-0c97-4701-9755-26585ea0219f} - 1 - QPushButton* btnAdd - - - - - {c7c261dc-d213-48e5-9f3e-81ee190147af} - 1 - InfoPageStack* is - - - - - {34c9a82f-1bd9-4fc3-90bb-22ad1218861f} - 1 - DeviceBrowser* db - - - - - - - - - - - - {3493fdef-b41d-4918-8149-080a80848873} - - - - - - - - {3493fdef-b41d-4918-8149-080a80848873} - - - ScopyHomeInfoPage - - - - - - - {774f644c-cc34-4ac4-a192-a27be2ba9af3} - - - - - - - - {774f644c-cc34-4ac4-a192-a27be2ba9af3} - - - {3493fdef-b41d-4918-8149-080a80848873} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - - - - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - - - - - - - - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - - - ScopyHomeAddPage - - - - - - - {a129f405-975e-421b-83b6-ebdd955755b1} - - - - - - - - {a129f405-975e-421b-83b6-ebdd955755b1} - - - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - {80331562-461b-4a2a-875f-cf28ca85c7a8} - - - - - - - - {80331562-461b-4a2a-875f-cf28ca85c7a8} - - - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - {bd470a57-63dc-4d8a-8ed3-80f16bf2eaae} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {70bca9d7-61ad-40ab-adf7-47174b4b8874} - 4 - 2 - void requestAddDevice(QString, QString) - - - - - {a2c96068-7ee2-43fd-b8a0-e1c76ddbe120} - 4 - 2 - void requestDevice(QString) - - - - - {27ced2ea-59c4-48fb-970b-698c2cfde519} - 4 - 2 - void newDeviceAvailable(DeviceImpl *d) - - - - - {79b53ac5-d5ec-4aa3-a658-93dccec95622} - 4 - 2 - void deviceInfoAvailable(QMap<QString, QString> ctxInfo) - - - - - {eb89293d-580d-49d6-a89d-5038a2972e9b} - 4 - 2 - void uriChanged(QString uri) - - - - - {edb6941c-cf6f-44d6-ad82-0d22f72e1851} - 5 - 2 - void futureVerify() - - - - - {69958132-6a50-4a86-9f9e-027703ae1abf} - 5 - 2 - void futureScan() - - - - - {32793659-dd71-45c1-b128-94380a70b793} - 5 - 2 - bool verify() - - - - - {1bab2795-2f5c-4a25-8cf6-556a2445bd26} - 5 - 2 - void deviceAddedToUi(QString) - - - - - {064f1c8f-801c-477d-9f73-89402d0dafde} - 5 - 2 - void scanFinished() - - - - - {5506f231-f928-4fb7-bf6b-086d09886672} - 5 - 2 - void verifyFinished() - - - - - {23937d97-8a07-4738-b6af-20c9db753cbf} - 5 - 2 - void deviceLoaderInitialized() - - - - - {a2d3d35e-1154-475d-a214-cff115b38d20} - 5 - 2 - void updateUri(QString uri) - - - - - {0f3cc3dd-8309-4421-aeaa-1965e13eb1c6} - 5 - 2 - void addBtnClicked() - - - - - {8ccddcb6-2ce3-42df-984f-880c3b206370} - 3 - 1 - Ui::ScopyHomeAddPage *ui - - - - - {3de0e0a9-c6fd-4367-8096-e43824a701a1} - 3 - 1 - QString pendingUri - - - - - {665234a4-5ef9-4e86-a734-b2de6e9e2034} - 3 - 1 - QFutureWatcher<bool> *fw - - - - - {468dc975-1c8e-4784-8005-a572c22f8d93} - 3 - 1 - QFutureWatcher<int> *fwScan - - - - - {811492e6-4f76-4072-a976-df3df1b5c509} - 3 - 1 - QStringList scanParamsList - - - - - {6f93f862-8533-4313-9e8b-5cda0705c986} - 3 - 1 - QStringList scanList - - - - - {dacc5520-36b8-44d1-802a-391cc19cb21f} - 3 - 1 - InfoPage *deviceInfoPage - - - - - {ec48f745-aefc-45bf-ab4f-33c557361035} - 3 - 1 - PluginManager *pluginManager - - - - - {2748c346-6d51-4487-8397-caced71483a7} - 3 - 1 - DeviceImpl *deviceImpl - - - - - {42116f97-ebd0-4502-ab67-daf329d7e771} - 3 - 1 - QList<PluginEnableWidget*> pluginDescriptionList - - - - - - - - - - - - {192a9656-2796-478a-a40b-5619baa8acc9} - - - - - - - - {192a9656-2796-478a-a40b-5619baa8acc9} - - - ScopyMainWindow - - - - - - - {2cddb820-4d60-4b57-90c6-9dd7e5909d7b} - - - - - - - - {2cddb820-4d60-4b57-90c6-9dd7e5909d7b} - - - {192a9656-2796-478a-a40b-5619baa8acc9} - {107011b1-ab5c-41df-ae4c-d3217e9c4cd6} - - - - - - - - - - {2a1d55a6-8f45-46fb-b4a6-cb7316182a4b} - - - - - - - - {2a1d55a6-8f45-46fb-b4a6-cb7316182a4b} - - - {192a9656-2796-478a-a40b-5619baa8acc9} - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - - - - - - {331be05b-83d5-416d-9b33-c0624c52bbda} - - - - - - - - {331be05b-83d5-416d-9b33-c0624c52bbda} - - - {192a9656-2796-478a-a40b-5619baa8acc9} - {20440a58-5e88-4172-971b-4184419b0636} - - - - - 1 - true - 2 - - - - - - - - - - - - - - Ui - - - - - - - - {20440a58-5e88-4172-971b-4184419b0636} - - - - - - - - {20440a58-5e88-4172-971b-4184419b0636} - - - ScopyMainWindow - - - - - - - {6cf7ce23-6027-4043-8dd2-747426252864} - - - - - - - - {6cf7ce23-6027-4043-8dd2-747426252864} - - - {20440a58-5e88-4172-971b-4184419b0636} - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - - - - - 1 - true - 2 - - - - - - - - - - {8dfe726b-edd7-47bd-a36f-539ed5df80a7} - - - - - - - - {8dfe726b-edd7-47bd-a36f-539ed5df80a7} - - - {20440a58-5e88-4172-971b-4184419b0636} - {918ef0ee-20c4-4058-98ee-950f9198032d} - - - - - 1 - true - 2 - - - - - - - - - - {9badadce-e007-4165-9edb-c8d769748076} - - - - - - - - {9badadce-e007-4165-9edb-c8d769748076} - - - {20440a58-5e88-4172-971b-4184419b0636} - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - - - - - 1 - true - 2 - - - - - - - - - - {11ca845e-4c2d-434a-9c8a-e0fa6a05a291} - - - - - - - - {11ca845e-4c2d-434a-9c8a-e0fa6a05a291} - - - {20440a58-5e88-4172-971b-4184419b0636} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - {153d8a14-7f4c-4bff-b84d-43e9fe9899dc} - - - - - - - - {153d8a14-7f4c-4bff-b84d-43e9fe9899dc} - - - {20440a58-5e88-4172-971b-4184419b0636} - {d47f0fa8-cf3f-4c10-9b02-f80af3d57baa} - - - - - 1 - true - 2 - - - - - - - - - - {edbb60c7-a282-4b54-8bd7-0b5dd1d6508b} - - - - - - - - {edbb60c7-a282-4b54-8bd7-0b5dd1d6508b} - - - {20440a58-5e88-4172-971b-4184419b0636} - {ae9b784c-2da5-4b97-be82-301848323aa1} - - - - - 1 - true - 2 - - - - - - - - - - {ecebe4b3-59a0-464e-9a27-9310eb87cdb1} - - - - - - - - {ecebe4b3-59a0-464e-9a27-9310eb87cdb1} - - - {20440a58-5e88-4172-971b-4184419b0636} - {192a9656-2796-478a-a40b-5619baa8acc9} - - - - - 1 - true - 2 - - - - - - - - - - {88854229-1455-426f-b2b4-c0bb4020e2ea} - - - - - - - - {88854229-1455-426f-b2b4-c0bb4020e2ea} - - - {20440a58-5e88-4172-971b-4184419b0636} - {ae9b784c-2da5-4b97-be82-301848323aa1} - - - - - 1 - true - 2 - - - - - - - - - - {9e8a83cb-c801-4e25-8ba4-faf0903518f8} - - - - - - - - {9e8a83cb-c801-4e25-8ba4-faf0903518f8} - - - {20440a58-5e88-4172-971b-4184419b0636} - {acb80f41-d754-4cc2-95a7-df775fa7157e} - - - - - 1 - true - 2 - - - - - - - - - - {e1a0004d-30e5-4261-86c2-03b0f45bee6e} - - - - - - - - {e1a0004d-30e5-4261-86c2-03b0f45bee6e} - - - {20440a58-5e88-4172-971b-4184419b0636} - {4c2b6925-c606-4fe3-a0eb-197091db6b33} - - - - - 1 - true - 2 - - - - - - - - - - {b8f6dbab-53f3-4373-ab10-3a89e33f6b9e} - - - - - - - - {b8f6dbab-53f3-4373-ab10-3a89e33f6b9e} - - - {20440a58-5e88-4172-971b-4184419b0636} - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - - - - - 1 - true - 2 - - - - - - - - - - {ae24a692-ce63-448e-a073-78f38dc60f1d} - - - - - - - - {ae24a692-ce63-448e-a073-78f38dc60f1d} - - - {20440a58-5e88-4172-971b-4184419b0636} - {ddefe768-27cd-4826-a886-1360d27ca8be} - - - - - 1 - true - 2 - - - - - - - - - - {a7dfde00-b313-42be-b1a1-9709b82b389d} - - - - - - - - {a7dfde00-b313-42be-b1a1-9709b82b389d} - - - {20440a58-5e88-4172-971b-4184419b0636} - {48d6cbe3-addd-452e-979f-13e57400b86c} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {fc1b35fd-2d53-43b6-b118-51513ee8f447} - 1 - 2 - void initAboutPage(PluginManager*) - - - - - {0adec70a-4711-4f00-95d6-d8658dd060fa} - 1 - 2 - void initPreferencesPage(PluginManager *pm = nullptr) - - - - - {60d964f3-2046-498c-8641-1ddcb22040fa} - 1 - 2 - void initPreferences() - - - - - {cc8ae0be-a418-40ef-b531-0cd7dde8473e} - 7 - 2 - void requestTools(QString id) - - - - - {06fb39bb-5ec3-433a-b8a3-192a047cb54f} - 7 - 2 - void addDeviceToUi(QString id, Device *d) - - - - - {deac0560-ece4-49b3-a076-7d7ca712c644} - 7 - 2 - void removeDeviceFromUi(QString) - - - - - {7c4a8702-a575-4708-9369-d9aabb70971c} - 7 - 2 - void save() - - - - - {a64ef4c2-177b-4333-afad-366efca841bd} - 7 - 2 - void load() - - - - - {5d851c15-2164-44cf-97b3-65e228c06b89} - 7 - 2 - void save(QString file) - - - - - {c95e08ac-d60a-4a5b-92c0-3313bebff906} - 7 - 2 - void load(QString file) - - - - - {44886ad1-34ce-4132-8105-5770ca5545e5} - 3 - 1 - ScopyAboutPage* about - - - - - {b86ed672-6e09-476d-a9bc-9ece0bf66e97} - 3 - 1 - ScopyPreferencesPage* prefPage - - - - - {a548632f-9b23-47f2-89a2-86b088354909} - 3 - 1 - PluginRepository *pr - - - - - {cf40afe4-25e2-4b95-896b-834e6a3890a8} - 3 - 1 - ScopyHomePage *hp - - - - - {1327aede-a20d-45b6-929b-4b5e84b75acf} - 3 - 1 - DeviceManager *dm - - - - - {98599244-3dda-4da0-ac1e-2281667dfe65} - 3 - 1 - Preferences *pref - - - - - {85119d77-0b30-43e0-bed0-b18f05f6d677} - 3 - 1 - CyclicalTask *scanCycle - - - - - {57ef2ead-f1e3-4cf4-ad22-c8cef92824ff} - 3 - 1 - IIOScanTask *scanTask - - - - - {de40d895-c5ac-445d-bb20-3d886b05969b} - 3 - 1 - ScannedIIOContextCollector *scc - - - - - {d7fa7359-b218-440b-aac8-92f1150d6b2c} - 3 - 1 - ToolManager *toolman - - - - - {425d684c-6d10-4d02-adf7-fede819f8972} - 3 - 1 - ScopyMainWindow_API *api - - - - - {3bf74e13-8321-400c-bc69-ca951da09a36} - 3 - 1 - Ui::ScopyMainWindow *ui - - - - - - - - - - - - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - - - - - - - - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - - - DeviceManager - - - - - - - {3b61ef28-c6a5-4942-8d56-094ea9b42f5e} - - - - - - - - {3b61ef28-c6a5-4942-8d56-094ea9b42f5e} - - - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - {702be005-47af-4698-ada9-d7b835e35d12} - - - - - n - true - 2 - - - - - - - - - - {f9b391c1-641c-43ef-92b7-d9e625384a4d} - - - - - - - - {f9b391c1-641c-43ef-92b7-d9e625384a4d} - - - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - {84a2203a-9901-430d-b2b0-eceb9873acf8} - - - - - - - - - - {13856c2c-5538-46d8-970f-caf303391d1a} - - - - - - - - {13856c2c-5538-46d8-970f-caf303391d1a} - - - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - {fdd7b05c-bb73-4636-952a-c8ce39f7be97} - - - - - - - - - - - - - - scopy - - - - - {316ee9d3-11b6-45b8-82c1-908b7be795e6} - 7 - 2 - QString createDevice(QString category, QString param) - - - - - {15e5d3ee-56c6-4ff4-92c4-3bbaaa0ecf73} - 7 - 2 - void addDevice(Device*) - - - - - {91020c6a-3dc7-4527-ad16-d5b32ed512af} - 7 - 2 - void removeDevice(QString category, QString id) - - - - - {c773d40b-6bd9-43fd-a3f9-c59ea1fa3fed} - 7 - 2 - void removeDeviceById(QString id) - - - - - {1dc4f75a-6a38-4e9d-827d-12b9a3ccb149} - 7 - 2 - QString restartDevice(QString id) - - - - - {c4e997de-a5c8-44d2-9cdd-214d77c4791c} - 7 - 2 - void disconnectAll() - - - - - {cfedb1d7-3f90-43b9-ac7d-764142882c99} - 7 - 2 - void save(QSettings &s) - - - - - {08e62c3d-3aa3-42c0-885f-c328242e18dc} - 7 - 2 - void load(QSettings &s) - - - - - {f38b95d6-ec89-4ecb-b9d6-afd198eee17c} - 4 - 2 - void deviceChangedToolList(QString, QList<ToolMenuEntry*>) - - - - - {25dd376b-8795-42eb-9fa1-19a8f8f49af0} - 4 - 2 - void deviceAddStarted(QString) - - - - - {c558430c-ba21-4295-a196-75da1c717603} - 4 - 2 - void deviceAdded(QString, Device*) - - - - - {1811284c-7ccc-41f7-a949-fe692c7b06ab} - 4 - 2 - void deviceRemoveStarted(QString, Device*) - - - - - {196af63e-a8d6-4caf-9667-491dace76e5b} - 4 - 2 - void deviceRemoved(QString) - - - - - {ee44e12a-6270-4095-b56b-12cf30d51cd2} - 4 - 2 - void deviceConnected(QString id, Device*) - - - - - {e693fc77-0db5-4603-99a6-5ef185ac5bf7} - 4 - 2 - void deviceDisconnected(QString id, Device*) - - - - - {45fc3a8b-7d5e-4eaa-a23b-ea2c619ec3fd} - 4 - 2 - void requestDevice(QString id) - - - - - {ff3526e6-720b-4b66-9683-4f8e590be883} - 4 - 2 - void requestTool(QString id) - - - - - {c5b521b2-bcf0-43fb-96f4-8a1fd76a76c1} - 4 - 1 - QMap<QString,Device*> map - - - - - {7ce0ec3f-1526-479d-a20d-36d971129a24} - 4 - 1 - PluginManager *pm - - - - - - - - - - - - {702be005-47af-4698-ada9-d7b835e35d12} - - - - - - - - {702be005-47af-4698-ada9-d7b835e35d12} - - - interface - - - - - Device - - - - - - - {948c22eb-714d-42c7-b722-f45e25506007} - - - - - - - - {948c22eb-714d-42c7-b722-f45e25506007} - - - {702be005-47af-4698-ada9-d7b835e35d12} - {dff7f0d9-f6de-4896-af57-6cd0209daa56} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {8bf83dc8-d233-4ec6-b0d9-7aa0b6261d44} - 2 - 3 - QString id() - - - - - {082fbef1-292c-4394-8b7c-2acf7922dc51} - 2 - 3 - QString category() - - - - - {3c6f2ced-6f09-4c10-a65d-dfdfd0322ad6} - 2 - 3 - QString name() - - - - - {18bca1d7-a160-46de-b2ec-d1e80e8fdcea} - 2 - 3 - QString param() - - - - - {d4d3554f-4ae9-44d9-bbbd-67439178c035} - 2 - 3 - QString description() - - - - - {b46e9452-72e0-478d-ac9c-1b7154ab5d07} - 2 - 3 - QWidget *icon() - - - - - {acab10d9-2290-4832-9bad-36fd820fea4a} - 2 - 3 - QWidget *page() - - - - - {960a26fd-a6e7-47ee-823b-9a5e07b4f135} - 2 - 3 - QList<ToolMenuEntry*> toolList() - - - - - {561c6f93-ee52-4d02-8853-872ad483087e} - 2 - 3 - void preload() - - - - - {bd19ee36-4725-4ec6-bba7-fb27fc4b0c9c} - 2 - 3 - void loadPlugins() - - - - - {adc422ef-65c9-420d-907b-388940fe2ef5} - 2 - 3 - void unloadPlugins() - - - - - {4d45d122-d3c2-4cc5-bacc-1b91b95548a5} - 7 - 2 - 3 - void connectDev() - - - - - {73681b75-ea70-43c8-a579-ad47000de374} - 7 - 2 - 3 - void disconnectDev() - - - - - {6fe01cdb-29e6-493d-853b-476ca90770a0} - 7 - 2 - 3 - void showPage() - - - - - {f1a078f8-89c3-4922-9938-47b5eeb56ec8} - 7 - 2 - 3 - void hidePage() - - - - - {6df09a8e-e253-49ad-9263-304ab9dc5a19} - 7 - 2 - 3 - void save(QSettings &) - - - - - {9347dfcf-84ef-4418-a86a-f64456d04f4b} - 7 - 2 - 3 - void load(QSettings &) - - - - - {db9e6e18-3815-44b7-8c70-0b374acab2f9} - 4 - 2 - 3 - void toolListChanged() - - - - - {6c5ae3d0-51a9-4a1b-87ed-1a1a5106a1b2} - 4 - 2 - 3 - void connected() - - - - - {385584de-bea4-4a23-b5b7-99316311c42d} - 4 - 2 - 3 - void disconnected() - - - - - {5e039000-adb0-415c-83a6-e21ee07b057c} - 4 - 2 - 3 - void requestedRestart() - - - - - {0c98efa0-eac8-4bd4-90c4-1ae495a0bdb2} - 4 - 2 - 3 - void requestTool(QString) - - - - - - - - - - - - {ac3c9c31-229f-40fb-a01c-7cb74c329e3c} - - - - - - - - {ac3c9c31-229f-40fb-a01c-7cb74c329e3c} - - - ScopyHomeInfoPage - - - - - - - {82803a30-8ff4-4e3b-9a1c-0783e6b860ec} - - - - - - - - {82803a30-8ff4-4e3b-9a1c-0783e6b860ec} - - - {ac3c9c31-229f-40fb-a01c-7cb74c329e3c} - {3493fdef-b41d-4918-8149-080a80848873} - - - - - 1 - true - 2 - - - - - - - - - - {57fd3927-5b73-4f4a-aabc-63bc25097500} - - - - - - - - {57fd3927-5b73-4f4a-aabc-63bc25097500} - - - {ac3c9c31-229f-40fb-a01c-7cb74c329e3c} - {29d6cc8f-575c-475d-8969-1a12f0c53306} - - - - - 1 - true - 2 - - - - - - - - - - - - - - Ui - - - - - - - - {bd470a57-63dc-4d8a-8ed3-80f16bf2eaae} - - - - - - - - {bd470a57-63dc-4d8a-8ed3-80f16bf2eaae} - - - ScopyHomeAddPage - - - - - - - {5bb1f232-8ff5-4cfe-8f23-c1ea90f3a5a6} - - - - - - - - {5bb1f232-8ff5-4cfe-8f23-c1ea90f3a5a6} - - - {bd470a57-63dc-4d8a-8ed3-80f16bf2eaae} - {a37e8d5a-2c78-4159-af53-b3d1f513d9ee} - - - - - 1 - true - 2 - - - - - - - - - - - - - - Ui - - - - - - - - {d47f0fa8-cf3f-4c10-9b02-f80af3d57baa} - - - - - - - - {d47f0fa8-cf3f-4c10-9b02-f80af3d57baa} - - - ToolManager - - - - - - - {70700dc0-3301-40e5-8ac4-bf4a120916b9} - - - - - - - - {70700dc0-3301-40e5-8ac4-bf4a120916b9} - - - {d47f0fa8-cf3f-4c10-9b02-f80af3d57baa} - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - 1 - true - 2 - - - - - - - - - - {64a0db56-30d7-4da2-8563-1dbc182717ec} - - - - - - - - {64a0db56-30d7-4da2-8563-1dbc182717ec} - - - {d47f0fa8-cf3f-4c10-9b02-f80af3d57baa} - {0bc900fd-1c09-48dc-a03b-394f7e17a68f} - - - - - true - - - - - - - - - - - - - - scopy - - - - - {a3cf1f47-274b-4268-a20f-aa1e0dacb755} - 7 - 2 - void addToolList(QString, QList<ToolMenuEntry*>) - - - - - {5b511e70-3147-49b4-b86a-591c52e15a6b} - 7 - 2 - void removeToolList(QString) - - - - - {59a2750b-b683-4d75-86c9-a11888392e3a} - 7 - 2 - void changeToolListContents(QString, QList<ToolMenuEntry*>) - - - - - {a25f3a3a-1590-4c1f-a685-0582741a1ac6} - 7 - 2 - void showToolList(QString) - - - - - {0867a13b-1a2d-48ea-bf38-50ad6775b9a1} - 7 - 2 - void hideToolList(QString) - - - - - {6ad9feac-d360-4b32-b537-94c490beeb4b} - 7 - 2 - void lockToolList(QString) - - - - - {f9fca70d-d3b6-4284-9259-e8dd95c974a3} - 7 - 2 - void unlockToolList(QString) - - - - - {bbc26f34-689b-4084-b03c-a8c99d7b7ed4} - 7 - 2 - void updateToolEntry(ToolMenuEntry *tme, QString s) - - - - - {c5b16914-03f2-46e6-8846-152addf3ade3} - 7 - 2 - void updateToolEntry() - - - - - {abc0fc64-ad85-4a0e-9a44-69410b6b205e} - 7 - 2 - void updateTool() - - - - - {fd69cc05-e8b6-4fcf-9d7d-0120e6211fc5} - 7 - 2 - void showTool(QString id) - - - - - - - - - - - - {e9e0564d-6ef2-4282-8b77-74f81fa6ba6f} - - - - - - - - {e9e0564d-6ef2-4282-8b77-74f81fa6ba6f} - - - singleton - - - - - Preferences - - - scopy - - - - - {0e1d88c0-6cc4-4893-8116-33a043d281e4} - 1 - QMap<QString,QVariant> p - - - - - {82e47446-9a92-481c-adc8-06630169a92c} - 1 - QSettings *s - - - - - {b08b83a6-b87b-4ba6-a5f8-f7f461aed52c} - 2 - void init(QString, QVariant) - - - - - {fdd44b7d-eb32-4c7a-bced-1ab8b457d24e} - 2 - void clear() - - - - - {fc6816f4-80ec-456b-be87-d5c8b563bc7b} - 2 - QVariant get(QString) - - - - - {5f6f1087-9867-422b-8648-ab45a875055e} - 2 - void set(QString, QVariant) - - - - - {3ec70006-15de-41f6-97af-1d984208d44f} - 2 - void save() - - - - - {fb9a2e47-9969-4585-b0e8-04b53c698210} - 2 - void load() - - - - - {3b21b3bc-312d-4d87-8b66-141b6999d4cf} - 2 - void setPreferencesFilename(QString s) - - - - - {fda5d712-1156-4fd6-8eaa-e05932498e43} - 4 - 2 - void preferenceChanged(QString, QVariant) - - - - - - - - - - - - {ae9b784c-2da5-4b97-be82-301848323aa1} - - - - - - - - {ae9b784c-2da5-4b97-be82-301848323aa1} - - - ScopyPreferencesPage - - - - - - - {40b9ae4c-211c-4867-b396-d3f6ae303b0f} - - - - - - - - {40b9ae4c-211c-4867-b396-d3f6ae303b0f} - - - {ae9b784c-2da5-4b97-be82-301848323aa1} - {20440a58-5e88-4172-971b-4184419b0636} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - - - - {acb80f41-d754-4cc2-95a7-df775fa7157e} - - - - - - - - {acb80f41-d754-4cc2-95a7-df775fa7157e} - - - ScopyAboutPage - - - - - - - {22c2eed3-f805-4efe-ace8-37a184e52b47} - - - - - - - - {22c2eed3-f805-4efe-ace8-37a184e52b47} - - - {acb80f41-d754-4cc2-95a7-df775fa7157e} - {20440a58-5e88-4172-971b-4184419b0636} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - - - - {3ada95f5-70ce-4634-9e56-589693e0de37} - - - - - - - - {3ada95f5-70ce-4634-9e56-589693e0de37} - - - singleton - - - - - ScopyJS - - - scopy - - - - - {1ca7a14b-18d4-44ee-8731-c188b00675ba} - 1 - QJSEngine m_engine - - - - - {8239fc41-f8a8-4a0f-8837-c5471beb58d4} - 2 - 1024 - void exit() - - - - - {4af835a0-5c8e-46a7-82be-9066b2a04ba6} - 2 - 1024 - void sleep(unsigned long s) - - - - - {59e1ec78-b92e-46df-ba68-6559ea09c870} - 2 - 1024 - void msleep(unsigned long ms) - - - - - {dc60c31c-51bd-498f-a39e-208b8187d553} - 2 - 1024 - void printToConsole(const QString& text) - - - - - {05c96f94-d889-4067-b751-182bcd5be8db} - 2 - 1024 - QString readFromConsole(const QString& text) - - - - - {24305bf2-2877-4a5c-8bb1-86b16ad7a28d} - 2 - 1024 - void returnToApplication() - - - - - {5ced017c-810a-42c6-86c9-b78e7d23246b} - 2 - QJSEngine *engine() - - - - - {df4e2455-ae3c-4a40-958b-ca853f3fc86f} - 2 - void registerApi(ApiObject* obj) - - - - - {85c3f431-fa6e-44fc-b25c-4054aeceffdd} - 2 - void unregisterApi(ApiObject* obj) - - - - - {ec6cc378-439f-4b38-93ee-a94fb98af392} - 2 - void registerApi(ApiObject* obj, QJSValue parentObj) - - - - - {7dfc490b-f612-4a3e-af10-429ff030e517} - 2 - void unregisterApi(ApiObject* obj, QJSValue parentObj) - - - - - {2e740b40-55f0-41b2-923a-22c48959fb12} - 7 - 2 - void hasText() - - - - - - - - - - - - {e929bb03-3710-4a7f-bccf-85ab7e6df124} - - - - - - - - {e929bb03-3710-4a7f-bccf-85ab7e6df124} - - - singleton - - - - - ContextProvider - - - scopy - - - - - {ee5a8ef9-12aa-4c36-9f8b-a7c0c17771b7} - 2 - struct iio_context* open(QString uri) - - - - - {7930fe98-ed60-41cc-ac89-b0f589aed7bd} - 2 - void close(QString uri) - - - - - {f6e617bc-c8d9-4fdf-950b-812921ab99f6} - 3 - 1 - QMap<QString, ContextRefCounter*> map - - - - - - - - - - - - {3e714570-f017-421b-9eac-3f4d4b535143} - - - - - - - - {3e714570-f017-421b-9eac-3f4d4b535143} - - - singleton - - - - - MessageBroker - - - scopy - - - - - {5a4a4576-d612-4993-bff4-98b7166b1972} - 2 - void subscribe(QObject *obj, QString topic) - - - - - {f8327884-c103-4733-b3ea-12e51e3a96ea} - 2 - void unsubscribe(QObject *obj, QString topic) - - - - - {58c2fe94-e355-4091-a61d-3dd8f74a1823} - 2 - void publish(QString topic, QString message) - - - - - {a60d6939-4471-4cb2-9d0b-5bddea1779cf} - 4 - 2 - void messageReceived(QString topic, QString message) - - - - - {f79487da-dfca-48eb-ba73-4f415213d1e7} - 3 - 1 - QMap<QObject*, QSet<QString>> map - - - - - - - - - - - - {d44ab1af-0bea-486a-85d0-abd01d56bcd3} - - - - - - - - {d44ab1af-0bea-486a-85d0-abd01d56bcd3} - - - New Component - - - - - - - - - - {4c2b6925-c606-4fe3-a0eb-197091db6b33} - - - - - - - - {4c2b6925-c606-4fe3-a0eb-197091db6b33} - - - CyclicalTask - - - - - - - {d8b29cd1-6142-470e-a27d-1c6d3e3f1b00} - - - - - - - - {d8b29cd1-6142-470e-a27d-1c6d3e3f1b00} - - - {4c2b6925-c606-4fe3-a0eb-197091db6b33} - {389d9ea9-1cdf-4b08-9a5c-552104a09d78} - - - - - true - - - - - - - - - - {d634c08c-5305-42b6-8de4-6a40d65beec5} - - - - - - - - {d634c08c-5305-42b6-8de4-6a40d65beec5} - - - {4c2b6925-c606-4fe3-a0eb-197091db6b33} - {fb660f1e-c159-42a8-9593-8565a739f5cc} - - - - - true - - - - - - - - - - - - - - scopy - - - - - {fcac333a-2f4a-4696-bbd8-5bea6a48e903} - 2 - CyclicalTask(QThread *task, QObject *parent = nullptr) - - - - - {2c7e1567-ee0f-4785-89e7-e5ae3a16c0ae} - 2 - ~CyclicalTask() - - - - - {e60e6068-a481-45fe-885f-12969a3dade5} - 2 - void start(int period = 5000) - - - - - {c36824d3-7bb5-402a-901f-432834e11f74} - 2 - void stop() - - - - - {0ededff1-6aa8-4bee-99fe-7e982983e62a} - 5 - 2 - void startThread() - - - - - {c81b53cb-b609-426b-8eca-6f1e4f6a35d4} - 3 - 1 - QTimer *t - - - - - {957467b1-e043-4f02-8d4a-e2e2f164d197} - 3 - 1 - QThread* task - - - - - - - - - - - - {fb660f1e-c159-42a8-9593-8565a739f5cc} - - - - - - - - {fb660f1e-c159-42a8-9593-8565a739f5cc} - - - IIOPingTask - - - scopy - - - - - {3382b61b-b7ee-4654-9d8a-3878498f4726} - 2 - 9 - void run() - - - - - {bb9d668f-7b80-4452-96dc-76fc34aff3af} - 2 - 64 - bool ping(iio_context *ctx) - - - - - {6fb096ac-202e-4cdf-a94d-96fe24cc04ff} - 4 - 2 - void pingSuccess() - - - - - {d1155538-ab79-4934-878c-57db85a1121a} - 4 - 2 - void pingFailed() - - - - - - - - - - - - {ddefe768-27cd-4826-a886-1360d27ca8be} - - - - - - - - {ddefe768-27cd-4826-a886-1360d27ca8be} - - - PluginRepository - - - - - - - {3f6d361a-88d5-4fff-954e-224fdc5049c6} - - - - - - - - {3f6d361a-88d5-4fff-954e-224fdc5049c6} - - - {ddefe768-27cd-4826-a886-1360d27ca8be} - {84a2203a-9901-430d-b2b0-eceb9873acf8} - - - - - 1 - true - 2 - - - - - - - - - - - - - - scopy - - - - - {43b66616-a6d9-4f16-b9f9-45f9e042a973} - 2 - void init(QString location) - - - - - {06fbf390-d993-49e9-81dd-2d87dc31ada1} - 2 - PluginManager *getPluginManager() - - - - - {d95d8f85-bc6f-4e32-a2ea-4f519444aa46} - 3 - 1 - PluginManager *pm - - - - - {f99aeb79-3195-496c-adb4-8889fdb219f9} - 3 - 1 - QJsonObject metadata - - - - - - - - - - - - {ae970c30-491a-420a-9e68-36ba9d7ed94c} - - - - - - - - {ae970c30-491a-420a-9e68-36ba9d7ed94c} - - - New Component - - - - - - - - - - {84a2203a-9901-430d-b2b0-eceb9873acf8} - - - - - - - - {84a2203a-9901-430d-b2b0-eceb9873acf8} - - - PluginManager - - - scopy - - - - - {da6674b7-ba4c-42b4-a772-2d2bbac881c3} - 2 - void add(QStringList pluginFileList) - - - - - {9536ee68-633a-4494-b85c-dd39c546c9b4} - 2 - void add(QString pluginFileName) - - - - - {0f552226-e9ee-421f-8981-921885f1a14a} - 2 - void sort() - - - - - {3c623bba-205f-485f-96ea-654ef3a603d6} - 2 - 4 - QList<Plugin*> getOriginalPlugins() - - - - - {7d73c8ce-32cc-4317-936a-c35550e91a34} - 2 - QList<Plugin*> getPlugins(QString category = "", QObject *parent = nullptr) - - - - - {eac522db-be33-4e1a-9582-0a1005d3d31a} - 2 - QList<Plugin*> getCompatiblePlugins(QString param, QString category = "", QObject *parent = nullptr) - - - - - {03969939-3e41-4f13-b82f-a2a777d9f2ce} - 3 - 1 - QList<Plugin*> list - - - - - {b3d948e7-ba07-4618-894b-6c859b66f49d} - 3 - 1 - QJsonObject m_metadata - - - - - - - - - - - - {1c24efbf-2095-42da-b591-03ac51de74f5} - - - - - - - - {1c24efbf-2095-42da-b591-03ac51de74f5} - - - interface - - - - - Plugin - - - - - - - {80f110fd-3e62-4acc-b9ec-e8c4b12aed86} - - - - - - - - {80f110fd-3e62-4acc-b9ec-e8c4b12aed86} - - - {1c24efbf-2095-42da-b591-03ac51de74f5} - {84a2203a-9901-430d-b2b0-eceb9873acf8} - - - - - - - - - - {d24c3ed9-f0fb-455a-94b1-1b2a54f4a3ff} - - - - - - - - {d24c3ed9-f0fb-455a-94b1-1b2a54f4a3ff} - - - {1c24efbf-2095-42da-b591-03ac51de74f5} - {702be005-47af-4698-ada9-d7b835e35d12} - - - - - - - - - - - - - - scopy - - - - - {4014520e-2d52-454f-a3b9-98b04277b48f} - 2 - 3 - void setParam(QString) - - - - - {b65513ca-32b7-4b85-873a-534ad90c4d2a} - 2 - 3 - void preload() - - - - - {d61a5ba2-5128-42af-971a-d6da03a83dcd} - 2 - 3 - void initPreferences() - - - - - {744904e6-825d-47de-8093-49e63df17728} - 2 - 3 - void postload() - - - - - {ad6cf349-7123-486a-8ab3-9bd1e6a7fcc8} - 2 - 3 - bool loadIcon() - - - - - {161576ef-1e28-4523-80aa-042d9a8062b4} - 2 - 3 - bool loadPage() - - - - - {af9e5afa-d450-46ea-81a0-8d93dd47075c} - 2 - 3 - void loadToolList() - - - - - {5de11a32-8f05-4379-b51b-9b7edcf74a3f} - 2 - 3 - bool loadPreferencesPage() - - - - - {d276963b-5edb-40f5-9b4d-34a76f1a2677} - 2 - 3 - bool loadExtraButtons() - - - - - {f86b7407-9549-4ace-a0d3-294e091efc01} - 2 - 3 - void init() - - - - - {892d0f32-d704-463d-86e1-07f17a889dfd} - 2 - 3 - void deinit() - - - - - {aae974af-0770-4745-b7fb-f30213722187} - 2 - 3 - void initMetadata() - - - - - {ffdc813b-f1f3-4649-8c32-07ce8878e10d} - 2 - 3 - void setMetadata(QJsonObject obj) - - - - - {5082a005-f8fb-4d39-8d9a-a7f615ae9e70} - 2 - 3 - void saveSettings(QSettings&) - - - - - {abe020fd-dd39-46fe-b29b-545dc5987b66} - 2 - 3 - void loadSettings(QSettings&) - - - - - {7c899173-841f-462f-b4ae-33b2a272d0c1} - 2 - 3 - void unload() - - - - - {f615e960-9d75-4190-8398-b8d6ff1864f8} - 2 - 3 - bool compatible(QString param) - - - - - {45a72db4-5904-4d0b-8d33-60374f89e18d} - 2 - 3 - Plugin* clone() - - - - - {8d9866fe-204d-46d4-8722-4213139b2687} - 2 - 3 - void cloneExtra(Plugin*) - - - - - {8061db89-00d8-4cab-9729-b566e2c5466e} - 2 - 3 - QString param() - - - - - {00e3264b-01f6-4341-9ba0-92166b576b92} - 2 - 3 - QString name() - - - - - {034243a2-9761-4939-8ae0-7d60d35cf9bc} - 2 - 3 - QString displayName() - - - - - {95867797-d1b7-47ab-ac44-b90a8c20b8f9} - 2 - 3 - QString displayDescription() - - - - - {eef4f581-1426-40d6-a87a-6fda2cfe3b39} - 2 - 3 - QWidget* icon() - - - - - {a72bbe96-a362-4ae8-b642-65282e357d9a} - 2 - 3 - QWidget* page() - - - - - {7a27f674-a15a-4135-bffc-4c55fdb78a75} - 2 - 3 - QWidget* preferencesPage() - - - - - {4e4e3be5-5fef-496b-8c28-f9c58393fed0} - 2 - 3 - QList<QAbstractButton*> extraButtons() - - - - - {fa8d8fe5-3c09-4e86-9ef5-b1bb2f1f4212} - 2 - 3 - QList<adiscope::ToolMenuEntry*> toolList() - - - - - {58ee79ec-a22a-436d-9270-2c8fdd590525} - 2 - 3 - QJsonObject metadata() - - - - - {02712944-5dbe-4489-80bd-710a72e7ed51} - 2 - 3 - QString about() - - - - - {acecc1ff-5e8c-4784-a310-520a8907d903} - 2 - 3 - QString version() - - - - - {cfd573ff-3018-44a3-b692-670bbe8f7ea6} - 7 - 2 - 3 - bool onConnect() - - - - - {460e570b-09a5-4d25-b4fb-234ab1e1033e} - 7 - 2 - 3 - bool onDisconnect() - - - - - {39bf4c11-3e10-4c96-a82e-aad0b6653bd7} - 7 - 2 - 3 - void showPageCallback() - - - - - {e4cffa90-2ef5-4f4c-81e0-a4b5b4966031} - 7 - 2 - 3 - void hidePageCallback() - - - - - {78dd9454-b062-402c-a0ba-b9345c8d6163} - 7 - 2 - 3 - void messageCallback(QString topic, QString message) - - - - - {30acb4aa-3167-48bc-a249-1568dfec7bfc} - 4 - 2 - 3 - void connectDevice() - - - - - {d80efac0-5641-4e04-b2be-d06a600f6873} - 4 - 2 - 3 - void disconnectDevice() - - - - - {51362b24-eacb-4894-887b-ed784af7ecf9} - 4 - 2 - 3 - void restartDevice() - - - - - {9a493c98-d484-425e-9607-38f8d1ce9106} - 4 - 2 - 3 - void toolListChanged() - - - - - {57f4408a-1a37-496a-bc0d-6169cea1f296} - 4 - 2 - 3 - void requestTool(QString) - - - - - - - - - - - - {34a37e62-1b26-470c-aab8-ff932ba4af4f} - - - - - - - - {34a37e62-1b26-470c-aab8-ff932ba4af4f} - - - DeviceImpl - - - - - - - {32339e89-b019-479e-acdb-85e33500b5e4} - - - - - - - - {32339e89-b019-479e-acdb-85e33500b5e4} - - - {34a37e62-1b26-470c-aab8-ff932ba4af4f} - {702be005-47af-4698-ada9-d7b835e35d12} - - - - - - - - - - - - - - scopy - - - - - {6919d632-10d3-46b2-9945-6bda5ef41f42} - 2 - 8 - QString id() - - - - - {f84777e2-5ee7-4bfb-8d68-13a409d10d21} - 2 - 8 - QString name() - - - - - {fb235be5-b78c-4750-a547-d2ff7ae45686} - 2 - 8 - QString category() - - - - - {bd1b5e8e-1a55-4889-878f-70628e331b59} - 2 - 8 - QString param() - - - - - {e1c9cc41-7aba-44b5-99e2-0bad46ca481d} - 2 - 8 - QString description() - - - - - {ce996782-b761-484f-8d06-b30cfd7bf662} - 2 - 8 - QWidget *icon() - - - - - {2d85e7f1-986c-4d32-a2e9-121825e4dc78} - 2 - 8 - QWidget *page() - - - - - {71cc2492-2444-4d4a-8f34-5c226a446253} - 2 - 8 - QList<ToolMenuEntry*> toolList() - - - - - {3dcd7321-09ce-426a-895c-72a535c6fa5e} - 2 - 9 - void loadCompatiblePlugins() - - - - - {98d89d09-1f59-466c-a948-9a9076dacf6e} - 2 - 9 - void compatiblePreload() - - - - - {4fa758eb-ba18-430d-a73d-f96bd93ca3a7} - 2 - 9 - void loadPlugins() - - - - - {923313da-ade2-40d5-8065-b74dbea68d71} - 2 - 9 - void unloadPlugins() - - - - - {45a6868e-7b35-40c8-9031-011d22a382e2} - 2 - 4 - QList<Plugin *> plugins() - - - - - {5c5a34bb-573d-4b32-a11b-df2a2e8a06a1} - 7 - 2 - 9 - void connectDev() - - - - - {9da16634-d0dc-4ae8-9301-e1ee172139df} - 7 - 2 - 9 - void disconnectDev() - - - - - {54b2e983-b341-4911-b168-071df170149e} - 7 - 2 - 9 - void showPage() - - - - - {5afa81d6-7732-460c-94f0-a85d42be6bca} - 7 - 2 - 9 - void hidePage() - - - - - {2d56d1b9-fb74-4265-ac57-523c3b81a8a1} - 7 - 2 - 9 - void save(QSettings &) - - - - - {5c47e0f0-ca7f-4981-9051-e7141f8b3d15} - 7 - 2 - 9 - void load(QSettings &) - - - - - {74cc9204-30d1-4044-a310-9f5cedfcdfec} - 7 - 2 - void onConnectionFailed() - - - - - {f8ba1388-144f-47b1-9463-878cc55916ed} - 4 - 2 - 8 - void toolListChanged() - - - - - {5a520eac-736f-49d8-93fc-5e99d2da6a97} - 4 - 2 - 8 - void connected() - - - - - {6dc36a6e-250c-4ee7-a31b-2fd311528ee1} - 4 - 2 - 8 - void disconnected() - - - - - {73705164-8339-479f-8f86-8e84b336499b} - 4 - 2 - 8 - void requestedRestart() - - - - - {f5f3571d-c1aa-4833-b361-0d320a4c8dc6} - 4 - 2 - 8 - void requestTool(QString) - - - - - {397eb139-5c4a-4943-9a01-8bf0881024d6} - 4 - 2 - void connectionFailed() - - - - - {6b1b67e2-6ab1-468f-80b8-eaf32cc8acaa} - 4 - 2 - void forget() - - - - - {ba2403da-3911-4574-8a14-8034f95c3fc5} - 2 - 2 - void loadName() - - - - - {81909448-34de-496f-95cc-62c491dd8d1a} - 2 - 2 - void loadIcons() - - - - - {2a82c4b7-7545-446c-92fc-4a6405c97464} - 2 - 2 - void loadPages() - - - - - {a3b85fe4-a02b-45d7-babf-e3faf31a35a4} - 2 - 2 - void loadToolList() - - - - - {563fe0ae-d537-43b0-a66d-d402aded421e} - 2 - 2 - void loadBadges() - - - - - {8e14e202-78d2-452f-a260-d7d2d9f1bbc9} - 2 - 1 - PluginManager *p - - - - - {8938d569-53ca-4cbe-98e8-65e47dcfb543} - 2 - 1 - QList<Plugin*> m_plugins - - - - - {bdc6184e-ca0e-4667-9754-3e98f7eaada5} - 2 - 1 - QList<Plugin*> m_connectedPlugins - - - - - {3bf2b371-a394-4f8d-888c-43e5d0513182} - 2 - 1 - QString m_id - - - - - {925d4f15-b06a-470b-bc7d-c3287dc097ee} - 2 - 1 - QString m_category - - - - - {b478cd59-c57f-40db-a481-c5532904fe83} - 2 - 1 - QString m_description - - - - - {2f986d36-8070-4152-abb0-e8ad93b7c215} - 2 - 1 - QString m_param - - - - - {890e5660-73a2-414e-b9f6-908131d73c2d} - 2 - 1 - QString m_name - - - - - {56fa1e5a-4fc9-4d79-b74a-578b96ab3e02} - 2 - 1 - QWidget *m_icon - - - - - {6947a32f-40d8-4e84-bf10-de5d7837a034} - 2 - 1 - QWidget *m_page - - - - - {8625039a-6d00-48a9-8c80-d6bc830964f2} - 2 - 1 - QPushButton *connbtn,*discbtn - - - - - - - - - - - - {2dc09cab-f03e-4ea4-bc60-730da5bd016f} - - - - - - - - {2dc09cab-f03e-4ea4-bc60-730da5bd016f} - - - IIODeviceImpl - - - - - - - {e021e2a2-f351-43c2-989e-69e9863fdab5} - - - - - - - - {e021e2a2-f351-43c2-989e-69e9863fdab5} - - - {2dc09cab-f03e-4ea4-bc60-730da5bd016f} - {34a37e62-1b26-470c-aab8-ff932ba4af4f} - - - - - - - - - - - - - - scopy - - - - - {71e50543-9dc1-4331-bc43-dfcef57ebeb1} - 2 - 9 - void loadCompatiblePlugins() - - - - - {fe8ab21e-a196-4245-a894-1ed7878d7148} - 2 - bool verify() - - - - - - - - - - - - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - - - - - - - - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - - - virtual Pluginbase - - - - - - - {57c5ba1b-5d78-4df0-9ea5-ae40bd393211} - - - - - - - - {57c5ba1b-5d78-4df0-9ea5-ae40bd393211} - - - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - {1c24efbf-2095-42da-b591-03ac51de74f5} - - - - - - - - - - - - - - scopy - - - - - {aa702e6c-62ad-48d6-bfef-fb4a3b9b04a4} - 2 - 9 - void setParam(QString param) - - - - - {6a1cbf22-0822-4c6d-8b74-f0991b931458} - 2 - 9 - void initMetadata() - - - - - {8702f699-9df0-463b-ae1f-2889ad64d1da} - 2 - 9 - void setMetadata(QJsonObject obj) - - - - - {816157c6-80cf-4ec5-a1bd-f4c7c393c0ec} - 2 - 9 - void initPreferences() - - - - - {c0249c0e-ef53-4bfb-87c2-6a628533dbea} - 2 - 9 - void init() - - - - - {89b77718-8c86-46a0-82a5-82466ad86dab} - 2 - 9 - void deinit() - - - - - {db25dba7-96fe-486a-b573-bceb617749c4} - 2 - 9 - void preload() - - - - - {c5758557-ba37-45b9-9c85-324bc3fa383d} - 2 - 9 - void postload() - - - - - {b840ead7-a601-4d73-ab71-1cd039af417b} - 2 - 9 - bool loadIcon() - - - - - {dded54f4-e1f8-4340-82be-5528b953f4b2} - 2 - 9 - bool loadPage() - - - - - {722cd703-5e3e-41fb-8dbd-b7c7b1e63b49} - 2 - 9 - void loadToolList() - - - - - {eb668504-06fe-4808-8758-4a711f957f2f} - 2 - 9 - bool loadPreferencesPage() - - - - - {24595dfa-1fe7-46cb-b545-9b1764ba0c12} - 2 - 9 - bool loadExtraButtons() - - - - - {7ca8ba25-923e-4db7-9004-b061d000c614} - 2 - 9 - void saveSettings(QSettings&) - - - - - {4c448fc9-321b-4466-9928-06ccf5fc7e60} - 2 - 9 - void loadSettings(QSettings&) - - - - - {34b69e11-3745-42c6-aa14-b36e3730bd44} - 2 - 9 - void unload() - - - - - {4d69c34e-fcc4-4c47-9b93-b8c52cfa1caa} - 2 - 9 - QString param() - - - - - {c2bd9186-c298-4745-ac5b-7571f95e4a7f} - 2 - 9 - QString name() - - - - - {e97aedc3-a207-4077-b0d4-60142380fbf5} - 2 - 9 - QString displayName() - - - - - {fec40f3f-8f77-4b21-8056-bf3e8876e3c9} - 2 - 9 - QString displayDescription() - - - - - {a36a3ca7-bd53-44cd-9dea-3b5d70d70f84} - 2 - 9 - QWidget* icon() - - - - - {3a3398f8-df1e-4b5f-884c-1346ebaa2c1e} - 2 - 9 - QWidget* page() - - - - - {8530a746-6f83-4876-95f6-b3750207f1a2} - 2 - 9 - QWidget* preferencesPage() - - - - - {1d1f40e7-582b-46b5-944d-ded0a9023c6e} - 2 - 9 - QList<QAbstractButton*> extraButtons() - - - - - {2650fbae-0d77-4920-9d21-a970f36b6259} - 2 - 9 - QList<ToolMenuEntry*> toolList() - - - - - {8aa3b07e-8b87-4f35-b4da-2c17aff6bf5c} - 2 - 9 - QJsonObject metadata() - - - - - {4bede0da-8542-4347-a2d1-b24caf71510e} - 2 - 9 - QString about() - - - - - {5b750c3a-4ab6-4802-8733-4385c5ddc7a2} - 2 - 9 - QString version() - - - - - {ebd0c058-079e-48fc-85ac-1a7b49a23d07} - 2 - 1 - void loadMetadata(QString data) - - - - - {b43cf0b2-86c8-43f8-a54e-de82700f4537} - 2 - 9 - void cloneExtra(Plugin*) - - - - - {daa703a7-6494-4b06-aede-842045628ca6} - 7 - 2 - 9 - void showPageCallback() - - - - - {59a1dd41-9938-4f6c-8c8b-7c4a0d194303} - 7 - 2 - 9 - void hidePageCallback() - - - - - {70a02e11-359a-464c-b10b-eda69cf508c6} - 7 - 2 - 9 - void messageCallback(QString topic, QString message) - - - - - - - - - - - - {e5d799f1-f437-4b60-8f90-c121dcdfffa7} - - - - - - - - {e5d799f1-f437-4b60-8f90-c121dcdfffa7} - - - MinimalPlugin - - - - - - - {7b13e5c2-2eef-432f-91bf-bcec1227f956} - - - - - - - - {7b13e5c2-2eef-432f-91bf-bcec1227f956} - - - {e5d799f1-f437-4b60-8f90-c121dcdfffa7} - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - - - - - - - - - - - - - - scopy - - - - - {e5c4d459-e650-4753-8375-1d429f24f97b} - 2 - 8 - void initMetadata() - - - - - {ce4e468e-64ad-42dc-b256-f3a9bf7a65f3} - 2 - 8 - bool compatible(QString m_param) - - - - - {01641cea-04da-4db1-aca8-b0a4ed04b005} - 2 - 8 - void loadToolList() - - - - - {fad6c90f-6a65-4b73-ba80-3fc6436219e1} - 2 - 8 - bool onConnect() - - - - - {e3711cb2-2048-400f-a1d1-383d4d660ce4} - 2 - 8 - bool onDisconnect() - - - - - - - - - - - - {6a29bb57-e0d9-4d22-b8a5-71202bb598ed} - - - - - - - - {6a29bb57-e0d9-4d22-b8a5-71202bb598ed} - - - Some Other plugin - - - - - - - {4e384797-208b-4c31-9e46-719c31291e37} - - - - - - - - {4e384797-208b-4c31-9e46-719c31291e37} - - - {6a29bb57-e0d9-4d22-b8a5-71202bb598ed} - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - - - - - - - - - - - - - - - - - - {ea87d312-b82c-4119-b976-eea3b0cad043} - 1 - .... - - - - - - - - - - - - {c8c59201-be7f-4531-bc4e-4e6483be1f22} - - - - - - - - {c8c59201-be7f-4531-bc4e-4e6483be1f22} - - - TestPlugin - - - - - - - {0f0647cb-bab1-4254-be37-17453948da23} - - - - - - - - {0f0647cb-bab1-4254-be37-17453948da23} - - - {c8c59201-be7f-4531-bc4e-4e6483be1f22} - {e10a2c0d-269a-4a87-814f-76f00ac85e1d} - - - - - - - - - - - - - - scopy - - - - - {e2ca9ee4-669c-43a8-99d3-bca94f29ca6e} - 2 - 8 - void initPreferences() - - - - - {61691406-5cdd-411e-930f-bff0f59f64de} - 2 - 8 - void initMetadata() - - - - - {3dbb4657-8eb7-4578-a934-e6b741365aad} - 2 - 8 - void init() - - - - - {b6b1916a-0386-4aaf-a855-3cc427a20ef3} - 2 - 8 - bool compatible(QString m_param) - - - - - {5c5fdcb0-0fda-4b63-90a8-fd58fa5ca978} - 2 - 8 - bool loadPreferencesPage() - - - - - {1662dc82-761d-4a02-8949-215ef645caf2} - 2 - 8 - bool loadPage() - - - - - {7d836544-d27e-42ae-8c2f-876343281803} - 2 - 8 - bool loadIcon() - - - - - {7618f1a3-a056-428c-905c-2f1d307dd4cb} - 2 - 8 - void loadToolList() - - - - - {2fac0090-9d0e-4f64-ba2f-668d61b14c85} - 2 - 8 - bool loadExtraButtons() - - - - - {f91467cc-8ddb-43ed-97e6-ff5f2958687d} - 2 - 8 - QString about() - - - - - {9eb47370-e6be-43ec-8c7a-3259fec6a86d} - 2 - 8 - QString version() - - - - - {4fdee1f6-75b3-41a3-9d4f-7b2998b88147} - 2 - 8 - bool onConnect() - - - - - {6a0ed326-5894-4729-953e-d66d66bf7c3b} - 2 - 8 - bool onDisconnect() - - - - - {abef69b6-24ad-4fa1-bf94-338000e28e6f} - 2 - 8 - void cloneExtra(Plugin*) - - - - - {3a1390df-a14d-4d71-8cb1-097c2892343d} - 7 - 2 - 8 - void messageCallback(QString topic, QString message) - - - - - - - - - - - - {fdd7b05c-bb73-4636-952a-c8ce39f7be97} - - - - - - - - {fdd7b05c-bb73-4636-952a-c8ce39f7be97} - - - DeviceLoader - - - - - - - {6a105ad4-9d98-4970-b0c2-e6f14678fdee} - - - - - - - - {6a105ad4-9d98-4970-b0c2-e6f14678fdee} - - - {fdd7b05c-bb73-4636-952a-c8ce39f7be97} - {34a37e62-1b26-470c-aab8-ff932ba4af4f} - - - - - - - - - - - - - - scopy - - - - - {7513a3e9-e68d-4b23-9ade-484403f6d1d2} - 2 - DeviceLoader(DeviceImpl *d, QObject *parent) - - - - - {51827af1-a1be-4bd7-9f33-ac6d0fafdd9d} - 2 - ~DeviceLoader() - - - - - {e0134293-0b3c-49d8-9695-300f971adbe7} - 2 - void init() - - - - - {cebd3c7a-9e9c-4a7f-afd6-6326feb8354f} - 4 - 2 - void initialized() - - - - - - - - - - - - {b744b131-fa45-4ba3-8a9c-8c15ee06cc4a} - - - - - - - - {b744b131-fa45-4ba3-8a9c-8c15ee06cc4a} - - - DeviceFactory - - - scopy - - - - - {504f2a86-6aa9-4780-879c-cfc4fe1c0d99} - 2 - 64 - DeviceImpl* build(QString param, PluginManager *pm, QString category,QObject *parent) - - - - - - - - - - - - {48d6cbe3-addd-452e-979f-13e57400b86c} - - - - - - - - {48d6cbe3-addd-452e-979f-13e57400b86c} - - - ScopyMainWindow_API - - - scopy - - - - - {19984a6a-05ad-49d4-819d-d984cec06dd3} - 1 - 2 - 1024 - void acceptLicense() - - - - - {966c9efd-2d5c-4e8a-8ab2-c16e38a0bf1f} - 1 - 2 - 1024 - QString addDevice(QString cat, QString uri) - - - - - {413ea79b-6694-4090-be84-3f407d473e42} - 1 - 2 - 1024 - bool connectDevice(int idx) - - - - - {b38b83cb-9833-46d6-a295-1e0ff552819f} - 1 - 2 - 1024 - bool connectDevice(QString devID) - - - - - {e22f4d92-3660-4bae-b534-006d1d52746b} - 1 - 2 - 1024 - bool disconnectDevice(QString devID) - - - - - {49739eae-0eb0-4420-914f-6736fd21d3d8} - 1 - 2 - 1024 - bool disconnectDevice() - - - - - {3ddefa2d-53a1-4291-80a8-3e68bcd23e5a} - 1 - 2 - 1024 - void switchTool(QString devID, QString toolName) - - - - - {405673f6-3f4a-4b00-bba7-afd3e361b0af} - 1 - 2 - 1024 - void switchTool(QString toolName) - - - - - {ced55606-80ac-4c59-88f6-4987828a0fe6} - 1 - 2 - 1024 - void runScript(QString content, QString fileName) - - - - - {5bd60966-3a75-47dd-ae5f-66f448392d95} - 3 - 2 - 64 - bool sortByUUID(const QString &k1, const QString &k2) - - - - - {535596bf-5474-424e-bcba-e2a3b38681b7} - 3 - 1 - ScopyMainWindow *m_w - - - - - - - - - - - - {43312ec0-6b21-44ef-92c2-11e826117743} - - - - - - - - {43312ec0-6b21-44ef-92c2-11e826117743} - - - CmdLineHandler - - - - - - - {e0bf02f8-dd4d-4146-82ff-5262db0d401f} - - - - - - - - {e0bf02f8-dd4d-4146-82ff-5262db0d401f} - - - {43312ec0-6b21-44ef-92c2-11e826117743} - {48d6cbe3-addd-452e-979f-13e57400b86c} - - - - - - - - - - - - - - scopy - - - - - {ffe07fe6-2c6a-433a-a0b8-eec580d02817} - 1 - 2 - 64 - int handle(QCommandLineParser &parser, ScopyMainWindow_API &scopyApi) - - - - - {b2da0974-0fb1-4c3d-898f-f035ba271ed8} - 1 - 2 - 64 - void withLogFileOption(QCommandLineParser &parser) - - - - - {3c523f8b-f3cc-489d-b3ef-5eaae0d532ed} - 1 - 2 - 64 - void closeLogFile() - - - - - {b3df2dbf-5038-4d0d-a96d-d7d933b8bbac} - 3 - 2 - 64 - void logOutputHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) - - - - - {eed31e6a-79d6-46a1-a558-9500f8ed9126} - 3 - 1 - 64 - FILE* logFile_ - - - - - - - - - - - - - - - - - - - - diff --git a/core/doc/device_lifecycle.qmodel b/core/doc/device_lifecycle.qmodel deleted file mode 100644 index 2ae9bcde83..0000000000 --- a/core/doc/device_lifecycle.qmodel +++ /dev/null @@ -1,4669 +0,0 @@ - - - - {234b43b8-3705-4790-91ff-361b66228a07} - - - - - - - - {fe231df4-b10b-46b3-954d-08b9ee6e6deb} - - - device_lifecycle - - - - - - - {9143d673-18f1-4ef5-9ea3-db43af21eba9} - - - - - - - - - - {9143d673-18f1-4ef5-9ea3-db43af21eba9} - - - device_lifecycle - - - - - - - - - - - - {8b586446-64b7-4d54-9b78-d8c38a9c48d4} - - - {dcfd5d9c-4af0-4ef1-89e5-8ab8c7946379} - DeviceManager::createDevice(category, param) - x:-150;y:40 - x:-130;y:-15;w:260;h:30 - 0 - - - activity - false - - - - - - - - - - - {675d06b3-4d88-497a-a1a6-4da49ef1c906} - - - {498d2672-1bda-4ed4-a64d-a1c9805a6bec} - Scan devices - x:-190;y:-30 - x:-80;y:-15;w:160;h:30 - false - 0 - - - activity - false - - - - - - - - - - - {dfd6d6cb-d376-40ba-a2a8-c2f44c4d40d8} - - - {8ea7ecb5-02c8-4c0a-a851-89ca5cba3048} - Add devices from add page - x:320;y:50 - x:-80;y:-15;w:160;h:30 - 0 - - - activity - false - - - - - - - - - - - {906914ed-182f-48ed-98f7-0448a5380d4f} - - - {50b2bb3d-95d7-4860-9b61-eccdb07f5591} - {675d06b3-4d88-497a-a1a6-4da49ef1c906} - {8b586446-64b7-4d54-9b78-d8c38a9c48d4} - - - Controlflow - - - true - - - - - - - - - - - - - {ac274100-8944-43bb-925f-2aade04a14aa} - - - {fa160e35-2e2a-4675-a374-72b2f5d61f42} - DeviceFactory::build() - x:-160;y:120 - x:-85;y:-15;w:170;h:30 - false - 0 - - - activity - false - - - - - - - - - - - {5eb63ad8-dbc4-49dc-9f40-0287802b7f87} - - - {88124b19-0e05-4484-9573-9c7187c4d55d} - {8b586446-64b7-4d54-9b78-d8c38a9c48d4} - {ac274100-8944-43bb-925f-2aade04a14aa} - - - Controlflow - - - true - - - - - - - - - - - - - {1362195f-bf29-452c-9b0e-c4025cd98c60} - - - {31c607d0-ef78-4ca1-ae8e-d166d7d63227} - DeviceLoader::init() - x:-160;y:200 - x:-60;y:-15;w:120;h:30 - 0 - - - activity - false - - - - - - - - - - - {786e0980-8bbf-488b-865d-0185972acf62} - - - {2b322948-a804-44dc-a513-8846dfd5df7b} - {ac274100-8944-43bb-925f-2aade04a14aa} - {1362195f-bf29-452c-9b0e-c4025cd98c60} - - - Controlflow - - - true - - - - - - - - - - - - - {09f96115-1482-48cf-89b3-eb1e660bb1c7} - - - {ae89e41c-3635-4ff9-ab9c-8a06021ff888} - Device::loadPlugins() - x:55;y:390 - x:-85;y:-15;w:170;h:30 - false - 0 - - - activity - false - - - - - - - - - {1aadb286-dd8e-4dee-ad55-53bd0e7da7e3} - - - for(plugin : PluginManager) { - plugin->compatible() - d.devicePlugins.append(plugin::clone()) -} - - x:145;y:265 - x:0;y:0;w:220.344;h:81 - - - - - - - - - {b3d76c9f-139b-4544-b742-bd0e281d7e76} - - - for(plugin : d.devicePlugins) { - plugin->preload() - plugin->loadIcon() - plugin->createInfoPage() - etc ... -} - x:130;y:390 - x:0;y:0;w:160.906;h:94 - - - - - - - - - - - {3dbfb375-757c-47ed-a1a7-f6a7b693fbe1} - - - {e07b6101-21d6-42f5-a2fd-2ba363f970d2} - emit deviceAdded(id, d) - x:55;y:505 - x:-85;y:-15;w:170;h:30 - false - 0 - - - activity - false - - - - - - - - - - - {9546d2da-518b-4a8d-b13f-c2277abfb4bc} - - - {8e780fec-15c6-4e7f-bba9-1727d68134aa} - {09f96115-1482-48cf-89b3-eb1e660bb1c7} - {3dbfb375-757c-47ed-a1a7-f6a7b693fbe1} - - - Controlflow - - - true - - - - - - - - - - - - - {760c684f-6f01-48fa-85a8-9b3948846848} - - - {450e5c3e-5352-47f2-937a-be2e8ec4acb8} - deviceAdded(id, d) - x:705;y:-155 - x:-55;y:-15;w:110;h:30 - 0 - - - activity - false - - - - - - - - - - - {54f22c98-9ff6-4780-a64b-e7945d3090b6} - - - {949194fa-3174-4666-a141-7ddad345ca74} - connectBtnClicked - x:495;y:330 - x:-55;y:-15;w:110;h:30 - 0 - - - activity - false - - - - - - - - - - - {327255ed-8177-4eff-87ff-2676a7105d8c} - - - {b46c96d5-c091-4037-b9ea-516f08efb78e} - HomePage::addDevice - x:645;y:-70 - x:-65;y:-15;w:130;h:30 - 0 - - - activity - false - - - - - - - - - - - {4fdbaabe-e432-4b88-a2e3-b5bd4e12b24b} - - - {bd19dbd4-1ad1-4230-ae36-01ed79ed62df} - toolManager::addToolList - x:845;y:-70 - x:-75;y:-15;w:150;h:30 - 0 - - - activity - false - - - - - - - - - - - {c724145c-56c6-45c5-a706-34af21832105} - - - {60a3e1aa-f367-4582-9340-a3dea89c9c09} - {760c684f-6f01-48fa-85a8-9b3948846848} - {327255ed-8177-4eff-87ff-2676a7105d8c} - - - Controlflow - - - true - - - - - - - - - - - - - {652f94f8-4095-4aed-9da4-8e978bec097f} - - - {64be3a56-6a5d-4fcb-a0ad-fa67de710d2e} - {760c684f-6f01-48fa-85a8-9b3948846848} - {4fdbaabe-e432-4b88-a2e3-b5bd4e12b24b} - - - Controlflow - - - true - - - - - - - - - - - - - {3a1a702d-c7b1-408b-ba11-d84d68645f96} - - - {c1e9f882-a5f3-44aa-a098-6ed5b34e19ab} - DeviceBrowser::addDevice - x:515;y:5 - x:-75;y:-15;w:150;h:30 - 0 - - - activity - false - - - - - - - - - - - {00887906-4ed4-466a-9266-f86d699a2b82} - - - {bae749ba-45ee-41b9-99b2-6cdc91a67c52} - InfoPageStack::addDevice - x:695;y:5 - x:-75;y:-15;w:150;h:30 - 0 - - - activity - false - - - - - - - - - - - {da562d2b-212b-45f3-bb1f-36435a9ebec8} - - - {6b035063-9c12-41bc-9e85-88dfc6d5f203} - {327255ed-8177-4eff-87ff-2676a7105d8c} - {3a1a702d-c7b1-408b-ba11-d84d68645f96} - - - Controlflow - - - true - - - - - - - - - - - - - {6663939f-b913-4de2-81c6-daf119c9d776} - - - {ae6fb710-5581-4da8-a461-e89e1c66af83} - {327255ed-8177-4eff-87ff-2676a7105d8c} - {00887906-4ed4-466a-9266-f86d699a2b82} - - - Controlflow - - - true - - - - - - - - - - - - - {09907f36-f759-4b21-9d2f-848d6a1431d4} - - - {f58a866c-b475-4fa8-97e3-6dabeff265db} - disconnectBtnClicked - x:760;y:310 - x:-65;y:-15;w:130;h:30 - 0 - - - activity - false - - - - - - - - - - - {e4297a21-83e5-4992-b9c2-deaf07be84a5} - - - {df125acc-6b7d-40f1-94eb-f06e1bd342be} - DeviceManager::disconnectSignal - x:930;y:310 - x:-95;y:-15;w:190;h:30 - 0 - - - activity - false - - - - - - - - - - - {5b91af63-5612-46c2-bf22-e3f0693c5ab1} - - - {8132c878-c2da-4e2c-a0a9-5d0d71b88730} - Device::connectDev - x:495;y:405 - x:-60;y:-15;w:120;h:30 - false - 0 - - - activity - false - - - - - - - - - - - {5064fa17-eb84-488a-97c7-873f8e643938} - - - {270a5894-7da7-415f-814d-06539e3403cf} - DeviceManager::deviceConnected(id,device) - x:380;y:770 - x:-120;y:-15;w:240;h:30 - 0 - - - activity - false - - - - - - - - - {2397aef5-5810-4f2f-bbe7-6cf75cf59c63} - - - for(plugin : d.devicePlugins) { -plugin->onConnect() -plugin->loadSettings() -... -} - x:565;y:370 - x:0;y:0;w:160.906;h:81 - - - - - - - - - - - {1563b5a1-49d8-4306-b9c7-4bcdbd45187c} - - - {038b99f6-70a8-42cd-a602-41b391557c1c} - {54f22c98-9ff6-4780-a64b-e7945d3090b6} - {5b91af63-5612-46c2-bf22-e3f0693c5ab1} - - - Controlflow - - - true - - - - - - - - - - - - - {1cddff8a-3d67-4688-a989-19549bf8fa6a} - - - {4b15f10b-9672-4d85-b03c-64fd93912cfc} - {1ba23035-12a5-4844-9dd8-826b9ff8a39d} - {feb3a89b-04ca-4092-ba84-16e93fdea37c} - - - Controlflow - - - true - true - - - - - - - - - - - - - {22d9d194-85c0-47bc-9004-9c1986b1e294} - - - {9fc33909-3e4a-431f-af45-1f4e392a3157} - Turn Off scan - x:235;y:825 - x:-45;y:-15;w:90;h:30 - 0 - - - activity - false - - - - - - - - - - - {e980ee33-f4f1-4e38-b200-b8eb2d84fd5c} - - - {b4b525d0-9ac1-4384-b680-74e174f67a78} - toolManager::lockToolList - x:300;y:870 - x:-75;y:-15;w:150;h:30 - 0 - - - activity - false - - - - - - - - - - - {e5745120-cfec-4c0f-8e12-025ddf7839df} - - - {7f38adbc-d539-4594-b6b6-00bc29237713} - {5064fa17-eb84-488a-97c7-873f8e643938} - {e980ee33-f4f1-4e38-b200-b8eb2d84fd5c} - - - Controlflow - - - true - - - - - - - - - - - - - {0c50ea4f-d4ec-493c-ad7f-bee653e257a0} - - - {cf14eb09-f118-4e0a-b3f5-c61c47d2b38a} - {5064fa17-eb84-488a-97c7-873f8e643938} - {22d9d194-85c0-47bc-9004-9c1986b1e294} - - - Controlflow - - - true - - - - - - - - - - - - - {3ef66f84-acf9-4d51-b105-81be1693a4fd} - - - {12b8f9e2-1e10-44ac-b85a-4bc6a6731a7f} - HomePage::connectDevice - x:460;y:850 - x:-75;y:-15;w:150;h:30 - 0 - - - activity - false - - - - - - - - - - - {8b660c41-5a87-468b-aac2-a2e5e13d79ee} - - - {961c2424-3eff-4c76-88f2-f3887d7fb72f} - {5064fa17-eb84-488a-97c7-873f8e643938} - {3ef66f84-acf9-4d51-b105-81be1693a4fd} - - - Controlflow - - - true - - - - - - - - - - - - - {382d0e08-b7be-47c2-ad0b-8802d2c61247} - - - {e8327051-3966-4bfd-a0a2-e2ea9a7736ea} - DeviceBrowser::connectDevice - x:460;y:925 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {41fac51c-cf65-4c82-8870-dad3400180e9} - - - {11861734-7bdb-4915-a918-4c74802e2825} - {3ef66f84-acf9-4d51-b105-81be1693a4fd} - {382d0e08-b7be-47c2-ad0b-8802d2c61247} - - - Controlflow - - - true - - - - - - - - - - - - - {a1e73aa9-a8bb-41ae-a48f-8ab98a028723} - - - {9215c91f-1b56-4021-b796-db29ade8be1b} - Device::disconnectDev - x:930;y:395 - x:-65;y:-15;w:130;h:30 - 0 - - - activity - false - - - - - - - - - - - {e23b345b-5bbf-44a7-ad8c-cbd7b7618d47} - - - {d34961a3-7449-49fa-998b-74674d2fa276} - {09907f36-f759-4b21-9d2f-848d6a1431d4} - {a1e73aa9-a8bb-41ae-a48f-8ab98a028723} - - - Controlflow - - - true - - - - - - - - - - - - - {6a4da5b7-9434-4340-beb6-1a82ee340e71} - - - {ed57151d-9ae5-488c-aaa2-dbba96099ed9} - {e4297a21-83e5-4992-b9c2-deaf07be84a5} - {a1e73aa9-a8bb-41ae-a48f-8ab98a028723} - - - Controlflow - - - true - - - - - - - - - - - - - {ba8ff42c-6636-4ecd-8581-6ba6a716523b} - - - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - DeviceManager::deviceDisconnected(id) - x:925;y:460 - x:-110;y:-15;w:220;h:30 - 0 - - - activity - false - - - - - - - - - - - {2067aba1-fde6-4adb-bed8-cf7782fde026} - - - {c304010c-0039-487f-976b-f7099953204b} - Turn on scan - x:840;y:545 - x:-45;y:-15;w:90;h:30 - 0 - - - activity - false - - - - - - - - - - - {cb8843cf-305c-4894-9f4f-06ca9a8be595} - - - {e3264376-b740-4cb2-a177-6c940aeab52c} - toolManager::unlockToolList - x:895;y:605 - x:-80;y:-15;w:160;h:30 - 0 - - - activity - false - - - - - - - - - - - {13fc9ed6-dc35-47f8-af2a-2895ba6dd023} - - - {98b7c85f-876f-4b54-b2dc-f6392b7fc2c5} - HomePage::disconnectDevice - x:1035;y:545 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {f3c989d9-628d-4106-9a30-68b1c231ad51} - - - {0ef41a07-c8c1-469e-a300-425dade081e2} - HomePage::disconnectDevice - x:1050;y:650 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {59df3f1f-17d6-4dcb-a939-e24c331bf67a} - - - {e1d3e6cc-5f7a-4b52-be1f-abd7c16b0346} - {a1e73aa9-a8bb-41ae-a48f-8ab98a028723} - {ba8ff42c-6636-4ecd-8581-6ba6a716523b} - - - Controlflow - - - true - - - - - - - - - - - - - {5eb79fb9-7a6d-4ee3-b08a-96c4d7918873} - - - {e0fa6e20-050f-402c-aaa5-dcf66e53b03e} - {ba8ff42c-6636-4ecd-8581-6ba6a716523b} - {2067aba1-fde6-4adb-bed8-cf7782fde026} - - - Controlflow - - - true - - - - - - - - - - - - - {2def631d-d19a-470d-95e1-b83d43b9d7f9} - - - {56c812b5-3d31-4c1b-bed9-3f3ed4be1232} - {ba8ff42c-6636-4ecd-8581-6ba6a716523b} - {cb8843cf-305c-4894-9f4f-06ca9a8be595} - - - Controlflow - - - true - - - - - - - - - - - - - {fad092b3-fc6d-4148-bbeb-13ed4b4f2693} - - - {8cf5ac1a-0823-433a-a40a-79b8d470cfbb} - {ba8ff42c-6636-4ecd-8581-6ba6a716523b} - {13fc9ed6-dc35-47f8-af2a-2895ba6dd023} - - - Controlflow - - - true - - - - - - - - - - - - - {919ee79d-88d4-4280-84ab-311089e96d81} - - - {b94f723b-4f20-4e19-82e6-31d3f9e0092e} - {13fc9ed6-dc35-47f8-af2a-2895ba6dd023} - {f3c989d9-628d-4106-9a30-68b1c231ad51} - - - Controlflow - - - true - - - - - - - - - - - - - {4098dc0a-ce54-45ba-98f4-da3478e6f2d2} - - - {b10e95f7-983d-4406-8fbe-969dd5d99c7c} - deviceRemoved(id) - x:900;y:45 - x:-60;y:-15;w:120;h:30 - 0 - - - activity - false - - - - - - - - - - - {e95cd0b9-e251-47bc-96a2-4f2a637a80e6} - - - {b93d1868-8f24-415b-84e4-9804abec0729} - HomePage::removeDevice - x:735;y:110 - x:-75;y:-15;w:150;h:30 - 0 - - - activity - false - - - - - - - - - - - {d155415b-a7ad-47fd-850e-80d07aa981e4} - - - {a47833f4-ec64-4d3e-8ac0-a5e49c7075e8} - DeviceBrowser::removeDevice - x:640;y:185 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {b95160f8-1361-45f0-9823-7e9fbb631162} - - - {8d5c6aff-b7b1-43af-920b-a68cc73790c1} - InfoPageStack::removeDevice - x:840;y:185 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {ceb7178c-b309-4f97-bbb8-486fb961bfd5} - - - {aa13b09a-14d0-470e-b1b8-04a7c11c7020} - {4098dc0a-ce54-45ba-98f4-da3478e6f2d2} - {e95cd0b9-e251-47bc-96a2-4f2a637a80e6} - - - Controlflow - - - true - - - - - - - - - - - - - {b7350cc2-0651-4ba6-b924-881675ab5b5e} - - - {3551c740-83da-4f1f-85d1-58073f903278} - {e95cd0b9-e251-47bc-96a2-4f2a637a80e6} - {d155415b-a7ad-47fd-850e-80d07aa981e4} - - - Controlflow - - - true - - - - - - - - - - - - - {89e5b7a8-a2fe-4093-991d-eebbae770990} - - - {1d0ae087-36ba-4dd0-84ba-1867e4611ac3} - {e95cd0b9-e251-47bc-96a2-4f2a637a80e6} - {b95160f8-1361-45f0-9823-7e9fbb631162} - - - Controlflow - - - true - - - - - - - - - - - - - {173f7acd-ce23-4353-b118-15a7796cfd50} - - - {0de9f20f-e41d-4668-bbf0-4a8c62e25ff8} - toolManager::removeToolList - x:990;y:120 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {4434382b-48b3-45a0-a082-5a6d29e3f216} - - - {642ab7e2-386e-47bc-abae-12c09f7f2b81} - {4098dc0a-ce54-45ba-98f4-da3478e6f2d2} - {173f7acd-ce23-4353-b118-15a7796cfd50} - - - Controlflow - - - true - - - - - - - - - - - - - {d43afd81-92c9-46c6-a602-00579b52a60a} - - - {b71c3466-c9e5-427a-bcc3-da9b26aecbe6} - DeviceManager::addDevice(Device*) - x:50;y:330 - x:-100;y:-15;w:200;h:30 - 0 - - - activity - false - - - - - - - - - - - {95f2a08b-cb94-4d1c-bf3b-e9a2267cf1f1} - - - {f670c895-1d90-40f2-a1e5-9acd1844a3ee} - {1362195f-bf29-452c-9b0e-c4025cd98c60} - {d43afd81-92c9-46c6-a602-00579b52a60a} - - - Controlflow - - - true - - - - - - - - - - - - - {a562e94d-8b05-4229-a1c5-ad61a15044c8} - - - {15be4a11-1f33-44e5-b5e5-702cf5f73a44} - {d43afd81-92c9-46c6-a602-00579b52a60a} - {09f96115-1482-48cf-89b3-eb1e660bb1c7} - - - Controlflow - - - true - - - - - - - - - - - - - {02ba841a-33ca-4cc0-9aa1-8587b17008f7} - - - {e2e93b20-8354-4cf0-85ae-fab7fff2488a} - DeviceFactory::build() - x:315;y:125 - x:-65;y:-15;w:130;h:30 - 0 - - - activity - false - - - - - - - - - - - {f8ba3a48-d104-4549-91b4-2b7a39e4fe5c} - - - {6e64d12e-b70a-4aa8-b1d1-43b6655accfe} - DeviceLoader::init() - x:300;y:185 - x:-60;y:-15;w:120;h:30 - 0 - - - activity - false - - - - - - - - - - - {bad45b10-c449-4dc5-a802-a5febd223ba0} - - - {9d997378-f83a-4e43-9168-20cd03e9d0de} - {dfd6d6cb-d376-40ba-a2a8-c2f44c4d40d8} - {02ba841a-33ca-4cc0-9aa1-8587b17008f7} - - - Controlflow - - - true - - - - - - - - - - - - - {1f00770f-2a65-4391-9d5f-4db50cab116d} - - - {ae37cc42-e517-4d98-9ae6-4881e560bece} - {02ba841a-33ca-4cc0-9aa1-8587b17008f7} - {f8ba3a48-d104-4549-91b4-2b7a39e4fe5c} - - - Controlflow - - - true - - - - - - - - - - - - - {450ef286-21d1-43bd-a4a5-bf63ac51a05f} - - - {a466b152-03e0-4044-8029-ca23b455bc7e} - {f8ba3a48-d104-4549-91b4-2b7a39e4fe5c} - {d43afd81-92c9-46c6-a602-00579b52a60a} - - - Controlflow - - - true - - - - - - - - - - - - - {1ba23035-12a5-4844-9dd8-826b9ff8a39d} - - - {cacf8979-a34d-48a7-beea-6f1573d56769} - Plugin::onConnect() - x:495;y:520 - x:-20;y:-20;w:40;h:40 - 0 - - - condition - false - - - - - - - - - - - {eadfade9-e32d-4c1a-9ab2-bd3006bd4f3a} - - - {5c41df9d-54c6-4fb5-a7c6-7681f126abef} - {5b91af63-5612-46c2-bf22-e3f0693c5ab1} - {1ba23035-12a5-4844-9dd8-826b9ff8a39d} - - - Controlflow - - - true - - - - - - - - - - - - - {d004af97-0937-45b8-a370-5917fda8e311} - - - {069c3266-1486-44f6-9e13-1f73e96390ec} - Add the plugin to the -connected plugins list - x:380;y:680 - x:-65;y:-25;w:130;h:50 - false - 0 - - - activity - false - - - - - - - - - {653820e5-0d02-424f-8b33-7278d3a50a80} - - - For each Plugin - x:520;y:590 - x:-210;y:-140;w:420;h:280 - - - - - - - - - - - {feb3a89b-04ca-4092-ba84-16e93fdea37c} - - - {bcb01831-b3b9-409f-ace6-815810265ed5} - Plugin::loadSettings - x:380;y:605 - x:-60;y:-15;w:120;h:30 - 0 - - - activity - false - - - - - - - - - - - {2c1a3a48-516a-47d8-a81e-20297385b2ba} - - - {2abcfaec-fafb-42f7-b6f0-869f23b4b7af} - {feb3a89b-04ca-4092-ba84-16e93fdea37c} - {d004af97-0937-45b8-a370-5917fda8e311} - - - Controlflow - - - true - - - - - - - - - - - - - {dbc9c9c4-cb91-47f8-8d1f-130d26a4e239} - - - {2df3468c-8f1e-44c3-8355-38e47e79631a} - {d004af97-0937-45b8-a370-5917fda8e311} - {5064fa17-eb84-488a-97c7-873f8e643938} - - - Controlflow - - - true - - - - - - - - - - - - - {74de91a6-a8ce-42de-bf33-2fc303e56579} - - - {182d1eeb-71a7-49b6-accd-cfe4256c2699} - disconnectDevOnConnectFailure - x:615;y:670 - x:-20;y:-20;w:40;h:40 - 0 - - - condition - false - - - - - - - - - - - {089a01eb-39b4-465a-94eb-b1f8976027fc} - - - {52430358-d829-4741-a5f6-220088dc3463} - emit connectionFailed() - x:615;y:770 - x:-70;y:-15;w:140;h:30 - 0 - - - activity - false - - - - - - - - - - - {7168c036-4d7e-461d-8842-1a1087d3edf9} - - - {211c4cec-908f-496e-9e2a-5bf6617df89c} - {1ba23035-12a5-4844-9dd8-826b9ff8a39d} - {abf3d7b1-f926-40cd-b15a-05f630804aa2} - - - Controlflow - - - false - true - - - - - - - - - - - - - {714da7c6-f708-4935-a9d2-117a44308ba1} - - - {5c6b20c4-40fa-4355-9fff-87d61a525523} - {74de91a6-a8ce-42de-bf33-2fc303e56579} - {089a01eb-39b4-465a-94eb-b1f8976027fc} - - - Controlflow - - - true - - - - - true - - - - - - - - - - - - - {4ce23a0d-4cf5-4596-9f45-6f9d44721152} - - - {fd4dc4b2-263f-49ae-83f7-982ad16bbf31} - Show warning badge - x:615;y:850 - x:-65;y:-15;w:130;h:30 - 0 - - - activity - false - - - - - - - - - - - {aceba920-a293-48b8-a4fb-c421e3d05143} - - - {717f99b3-15b7-4eb6-8867-bfdc17892868} - {089a01eb-39b4-465a-94eb-b1f8976027fc} - {4ce23a0d-4cf5-4596-9f45-6f9d44721152} - - - Controlflow - - - true - - - - - - - - - - - - - {abf3d7b1-f926-40cd-b15a-05f630804aa2} - - - {12fc2328-41d4-4191-8a2b-3ef90dcf4444} - Get "disconnectDevOnConnectFailure" -plugin metadata - x:615;y:605 - x:-105;y:-25;w:210;h:50 - 0 - - - activity - false - - - - - - - - - - - {28547bb6-65b5-4a53-8343-1db812f7ede5} - - - {22ee1032-d7a3-444b-b4d5-02a68546a76d} - {abf3d7b1-f926-40cd-b15a-05f630804aa2} - {74de91a6-a8ce-42de-bf33-2fc303e56579} - - - Controlflow - - - true - - - - - - - - - - - - - {0b443c10-0491-4c5c-be73-ac0b1dd05b4e} - - - {283beb3b-bbf6-4808-b77a-1f4183418a5b} - DeviceImpl::connectionFailed() - x:1120;y:310 - x:-85;y:-15;w:170;h:30 - 0 - - - activity - false - - - - - - - - - - - {485b3f9e-e716-495a-9d6b-42b5d6666f29} - - - {d5b54170-970c-4f65-861f-7458898de830} - {0b443c10-0491-4c5c-be73-ac0b1dd05b4e} - {a1e73aa9-a8bb-41ae-a48f-8ab98a028723} - - - Controlflow - - - true - - - - - - - - 1694434093474 - Activities - - - - - - - - - - {8b580cd9-7a28-4238-8810-7d9a71ff0102} - - - - - - - - {8b580cd9-7a28-4238-8810-7d9a71ff0102} - - - - - false - start - - - - - - - - {817d6a7e-d864-45c8-94a1-4c3d24862c0c} - - - - - - - - {817d6a7e-d864-45c8-94a1-4c3d24862c0c} - - - New Condition - - - false - condition - - - - - - - - {dcfd5d9c-4af0-4ef1-89e5-8ab8c7946379} - - - - - - - - {dcfd5d9c-4af0-4ef1-89e5-8ab8c7946379} - - - DeviceManager::createDevice(category, param) - - - - - - - {88124b19-0e05-4484-9573-9c7187c4d55d} - - - - - - - - {88124b19-0e05-4484-9573-9c7187c4d55d} - - - {dcfd5d9c-4af0-4ef1-89e5-8ab8c7946379} - {fa160e35-2e2a-4675-a374-72b2f5d61f42} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {96ff72d7-61ad-44a8-9595-e8da189cfeb0} - - - - - - - - {96ff72d7-61ad-44a8-9595-e8da189cfeb0} - - - ScopyAddPage::addDevice - - - false - activity - - - - - - - - {bf575cc8-e09a-4d70-a5b1-03e54b393884} - - - - - - - - {bf575cc8-e09a-4d70-a5b1-03e54b393884} - - - - - false - start - - - - - - - - {498d2672-1bda-4ed4-a64d-a1c9805a6bec} - - - - - - - - {498d2672-1bda-4ed4-a64d-a1c9805a6bec} - - - Scan devices - - - - - - - {50b2bb3d-95d7-4860-9b61-eccdb07f5591} - - - - - - - - {50b2bb3d-95d7-4860-9b61-eccdb07f5591} - - - {498d2672-1bda-4ed4-a64d-a1c9805a6bec} - {dcfd5d9c-4af0-4ef1-89e5-8ab8c7946379} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {8ea7ecb5-02c8-4c0a-a851-89ca5cba3048} - - - - - - - - {8ea7ecb5-02c8-4c0a-a851-89ca5cba3048} - - - Add devices from add page - - - - - - - {2ca5f30f-a1cb-4904-aac2-9bef6c6615f3} - - - - - - - - {2ca5f30f-a1cb-4904-aac2-9bef6c6615f3} - - - {8ea7ecb5-02c8-4c0a-a851-89ca5cba3048} - {dcfd5d9c-4af0-4ef1-89e5-8ab8c7946379} - - - Controlflow - - - true - - - - - - - - - - {27fff63c-22db-4efb-b200-62913e4424a4} - - - - - - - - {27fff63c-22db-4efb-b200-62913e4424a4} - - - {8ea7ecb5-02c8-4c0a-a851-89ca5cba3048} - {fa160e35-2e2a-4675-a374-72b2f5d61f42} - - - Controlflow - - - true - - - - - - - - - - {9d997378-f83a-4e43-9168-20cd03e9d0de} - - - - - - - - {9d997378-f83a-4e43-9168-20cd03e9d0de} - - - {8ea7ecb5-02c8-4c0a-a851-89ca5cba3048} - {e2e93b20-8354-4cf0-85ae-fab7fff2488a} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {fa160e35-2e2a-4675-a374-72b2f5d61f42} - - - - - - - - {fa160e35-2e2a-4675-a374-72b2f5d61f42} - - - DeviceFactory::build() - - - - - - - {2b322948-a804-44dc-a513-8846dfd5df7b} - - - - - - - - {2b322948-a804-44dc-a513-8846dfd5df7b} - - - {fa160e35-2e2a-4675-a374-72b2f5d61f42} - {31c607d0-ef78-4ca1-ae8e-d166d7d63227} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {31c607d0-ef78-4ca1-ae8e-d166d7d63227} - - - - - - - - {31c607d0-ef78-4ca1-ae8e-d166d7d63227} - - - DeviceLoader::init() - - - - - - - {e04cd05e-93ae-4b9c-a9a1-6b6b3bfaacb6} - - - - - - - - {e04cd05e-93ae-4b9c-a9a1-6b6b3bfaacb6} - - - {31c607d0-ef78-4ca1-ae8e-d166d7d63227} - {ae89e41c-3635-4ff9-ab9c-8a06021ff888} - - - Controlflow - - - true - - - - - - - - - - {f670c895-1d90-40f2-a1e5-9acd1844a3ee} - - - - - - - - {f670c895-1d90-40f2-a1e5-9acd1844a3ee} - - - {31c607d0-ef78-4ca1-ae8e-d166d7d63227} - {b71c3466-c9e5-427a-bcc3-da9b26aecbe6} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {ae89e41c-3635-4ff9-ab9c-8a06021ff888} - - - - - - - - {ae89e41c-3635-4ff9-ab9c-8a06021ff888} - - - Device::loadPlugins() - - - - - - - {8e780fec-15c6-4e7f-bba9-1727d68134aa} - - - - - - - - {8e780fec-15c6-4e7f-bba9-1727d68134aa} - - - {ae89e41c-3635-4ff9-ab9c-8a06021ff888} - {e07b6101-21d6-42f5-a2fd-2ba363f970d2} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {e07b6101-21d6-42f5-a2fd-2ba363f970d2} - - - - - - - - {e07b6101-21d6-42f5-a2fd-2ba363f970d2} - - - emit deviceAdded(id, d) - - - false - activity - - - - - - - - {450e5c3e-5352-47f2-937a-be2e8ec4acb8} - - - - - - - - {450e5c3e-5352-47f2-937a-be2e8ec4acb8} - - - deviceAdded(id, d) - - - - - - - {60a3e1aa-f367-4582-9340-a3dea89c9c09} - - - - - - - - {60a3e1aa-f367-4582-9340-a3dea89c9c09} - - - {450e5c3e-5352-47f2-937a-be2e8ec4acb8} - {b46c96d5-c091-4037-b9ea-516f08efb78e} - - - Controlflow - - - true - - - - - - - - - - {64be3a56-6a5d-4fcb-a0ad-fa67de710d2e} - - - - - - - - {64be3a56-6a5d-4fcb-a0ad-fa67de710d2e} - - - {450e5c3e-5352-47f2-937a-be2e8ec4acb8} - {bd19dbd4-1ad1-4230-ae36-01ed79ed62df} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {8c86f19b-2a8d-49bc-b484-2670781a537b} - - - - - - - - {8c86f19b-2a8d-49bc-b484-2670781a537b} - - - - - false - start - - - - - - - - {949194fa-3174-4666-a141-7ddad345ca74} - - - - - - - - {949194fa-3174-4666-a141-7ddad345ca74} - - - connectBtnClicked - - - - - - - {038b99f6-70a8-42cd-a602-41b391557c1c} - - - - - - - - {038b99f6-70a8-42cd-a602-41b391557c1c} - - - {949194fa-3174-4666-a141-7ddad345ca74} - {8132c878-c2da-4e2c-a0a9-5d0d71b88730} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {98fa7405-bd4a-4a76-a564-c192e220b349} - - - - - - - - {98fa7405-bd4a-4a76-a564-c192e220b349} - - - Remove Device - - - false - activity - - - - - - - - {b46c96d5-c091-4037-b9ea-516f08efb78e} - - - - - - - - {b46c96d5-c091-4037-b9ea-516f08efb78e} - - - HomePage::addDevice - - - - - - - {6b035063-9c12-41bc-9e85-88dfc6d5f203} - - - - - - - - {6b035063-9c12-41bc-9e85-88dfc6d5f203} - - - {b46c96d5-c091-4037-b9ea-516f08efb78e} - {c1e9f882-a5f3-44aa-a098-6ed5b34e19ab} - - - Controlflow - - - true - - - - - - - - - - {ae6fb710-5581-4da8-a461-e89e1c66af83} - - - - - - - - {ae6fb710-5581-4da8-a461-e89e1c66af83} - - - {b46c96d5-c091-4037-b9ea-516f08efb78e} - {bae749ba-45ee-41b9-99b2-6cdc91a67c52} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {bd19dbd4-1ad1-4230-ae36-01ed79ed62df} - - - - - - - - {bd19dbd4-1ad1-4230-ae36-01ed79ed62df} - - - toolManager::addToolList - - - false - activity - - - - - - - - {c1e9f882-a5f3-44aa-a098-6ed5b34e19ab} - - - - - - - - {c1e9f882-a5f3-44aa-a098-6ed5b34e19ab} - - - DeviceBrowser::addDevice - - - false - activity - - - - - - - - {bae749ba-45ee-41b9-99b2-6cdc91a67c52} - - - - - - - - {bae749ba-45ee-41b9-99b2-6cdc91a67c52} - - - InfoPageStack::addDevice - - - false - activity - - - - - - - - {f58a866c-b475-4fa8-97e3-6dabeff265db} - - - - - - - - {f58a866c-b475-4fa8-97e3-6dabeff265db} - - - disconnectBtnClicked - - - - - - - {d34961a3-7449-49fa-998b-74674d2fa276} - - - - - - - - {d34961a3-7449-49fa-998b-74674d2fa276} - - - {f58a866c-b475-4fa8-97e3-6dabeff265db} - {9215c91f-1b56-4021-b796-db29ade8be1b} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {df125acc-6b7d-40f1-94eb-f06e1bd342be} - - - - - - - - {df125acc-6b7d-40f1-94eb-f06e1bd342be} - - - DeviceManager::disconnectSignal - - - - - - - {ed57151d-9ae5-488c-aaa2-dbba96099ed9} - - - - - - - - {ed57151d-9ae5-488c-aaa2-dbba96099ed9} - - - {df125acc-6b7d-40f1-94eb-f06e1bd342be} - {9215c91f-1b56-4021-b796-db29ade8be1b} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {8132c878-c2da-4e2c-a0a9-5d0d71b88730} - - - - - - - - {8132c878-c2da-4e2c-a0a9-5d0d71b88730} - - - Device::connectDev - - - - - - - {5c41df9d-54c6-4fb5-a7c6-7681f126abef} - - - - - - - - {5c41df9d-54c6-4fb5-a7c6-7681f126abef} - - - {8132c878-c2da-4e2c-a0a9-5d0d71b88730} - {cacf8979-a34d-48a7-beea-6f1573d56769} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {270a5894-7da7-415f-814d-06539e3403cf} - - - - - - - - {270a5894-7da7-415f-814d-06539e3403cf} - - - DeviceManager::deviceConnected(id,device) - - - - - - - {7f38adbc-d539-4594-b6b6-00bc29237713} - - - - - - - - {7f38adbc-d539-4594-b6b6-00bc29237713} - - - {270a5894-7da7-415f-814d-06539e3403cf} - {b4b525d0-9ac1-4384-b680-74e174f67a78} - - - Controlflow - - - true - - - - - - - - - - {cf14eb09-f118-4e0a-b3f5-c61c47d2b38a} - - - - - - - - {cf14eb09-f118-4e0a-b3f5-c61c47d2b38a} - - - {270a5894-7da7-415f-814d-06539e3403cf} - {9fc33909-3e4a-431f-af45-1f4e392a3157} - - - Controlflow - - - true - - - - - - - - - - {961c2424-3eff-4c76-88f2-f3887d7fb72f} - - - - - - - - {961c2424-3eff-4c76-88f2-f3887d7fb72f} - - - {270a5894-7da7-415f-814d-06539e3403cf} - {12b8f9e2-1e10-44ac-b85a-4bc6a6731a7f} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {9fc33909-3e4a-431f-af45-1f4e392a3157} - - - - - - - - {9fc33909-3e4a-431f-af45-1f4e392a3157} - - - Turn Off scan - - - false - activity - - - - - - - - {b4b525d0-9ac1-4384-b680-74e174f67a78} - - - - - - - - {b4b525d0-9ac1-4384-b680-74e174f67a78} - - - toolManager::lockToolList - - - false - activity - - - - - - - - {12b8f9e2-1e10-44ac-b85a-4bc6a6731a7f} - - - - - - - - {12b8f9e2-1e10-44ac-b85a-4bc6a6731a7f} - - - HomePage::connectDevice - - - - - - - {11861734-7bdb-4915-a918-4c74802e2825} - - - - - - - - {11861734-7bdb-4915-a918-4c74802e2825} - - - {12b8f9e2-1e10-44ac-b85a-4bc6a6731a7f} - {e8327051-3966-4bfd-a0a2-e2ea9a7736ea} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {e8327051-3966-4bfd-a0a2-e2ea9a7736ea} - - - - - - - - {e8327051-3966-4bfd-a0a2-e2ea9a7736ea} - - - DeviceBrowser::connectDevice - - - false - activity - - - - - - - - {9215c91f-1b56-4021-b796-db29ade8be1b} - - - - - - - - {9215c91f-1b56-4021-b796-db29ade8be1b} - - - Device::disconnectDev - - - - - - - {e1d3e6cc-5f7a-4b52-be1f-abd7c16b0346} - - - - - - - - {e1d3e6cc-5f7a-4b52-be1f-abd7c16b0346} - - - {9215c91f-1b56-4021-b796-db29ade8be1b} - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - - - - - - - - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - - - DeviceManager::deviceDisconnected(id) - - - - - - - {e0fa6e20-050f-402c-aaa5-dcf66e53b03e} - - - - - - - - {e0fa6e20-050f-402c-aaa5-dcf66e53b03e} - - - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - {c304010c-0039-487f-976b-f7099953204b} - - - Controlflow - - - true - - - - - - - - - - {56c812b5-3d31-4c1b-bed9-3f3ed4be1232} - - - - - - - - {56c812b5-3d31-4c1b-bed9-3f3ed4be1232} - - - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - {e3264376-b740-4cb2-a177-6c940aeab52c} - - - Controlflow - - - true - - - - - - - - - - {8cf5ac1a-0823-433a-a40a-79b8d470cfbb} - - - - - - - - {8cf5ac1a-0823-433a-a40a-79b8d470cfbb} - - - {dcf09a8a-c588-42f5-b927-c3ac545b6d2d} - {98b7c85f-876f-4b54-b2dc-f6392b7fc2c5} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {c304010c-0039-487f-976b-f7099953204b} - - - - - - - - {c304010c-0039-487f-976b-f7099953204b} - - - Turn on scan - - - false - activity - - - - - - - - {e3264376-b740-4cb2-a177-6c940aeab52c} - - - - - - - - {e3264376-b740-4cb2-a177-6c940aeab52c} - - - toolManager::unlockToolList - - - false - activity - - - - - - - - {98b7c85f-876f-4b54-b2dc-f6392b7fc2c5} - - - - - - - - {98b7c85f-876f-4b54-b2dc-f6392b7fc2c5} - - - HomePage::disconnectDevice - - - - - - - {b94f723b-4f20-4e19-82e6-31d3f9e0092e} - - - - - - - - {b94f723b-4f20-4e19-82e6-31d3f9e0092e} - - - {98b7c85f-876f-4b54-b2dc-f6392b7fc2c5} - {0ef41a07-c8c1-469e-a300-425dade081e2} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {0ef41a07-c8c1-469e-a300-425dade081e2} - - - - - - - - {0ef41a07-c8c1-469e-a300-425dade081e2} - - - HomePage::disconnectDevice - - - false - activity - - - - - - - - {b10e95f7-983d-4406-8fbe-969dd5d99c7c} - - - - - - - - {b10e95f7-983d-4406-8fbe-969dd5d99c7c} - - - deviceRemoved(id) - - - - - - - {aa13b09a-14d0-470e-b1b8-04a7c11c7020} - - - - - - - - {aa13b09a-14d0-470e-b1b8-04a7c11c7020} - - - {b10e95f7-983d-4406-8fbe-969dd5d99c7c} - {b93d1868-8f24-415b-84e4-9804abec0729} - - - Controlflow - - - true - - - - - - - - - - {642ab7e2-386e-47bc-abae-12c09f7f2b81} - - - - - - - - {642ab7e2-386e-47bc-abae-12c09f7f2b81} - - - {b10e95f7-983d-4406-8fbe-969dd5d99c7c} - {0de9f20f-e41d-4668-bbf0-4a8c62e25ff8} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {b93d1868-8f24-415b-84e4-9804abec0729} - - - - - - - - {b93d1868-8f24-415b-84e4-9804abec0729} - - - HomePage::removeDevice - - - - - - - {3551c740-83da-4f1f-85d1-58073f903278} - - - - - - - - {3551c740-83da-4f1f-85d1-58073f903278} - - - {b93d1868-8f24-415b-84e4-9804abec0729} - {a47833f4-ec64-4d3e-8ac0-a5e49c7075e8} - - - Controlflow - - - true - - - - - - - - - - {1d0ae087-36ba-4dd0-84ba-1867e4611ac3} - - - - - - - - {1d0ae087-36ba-4dd0-84ba-1867e4611ac3} - - - {b93d1868-8f24-415b-84e4-9804abec0729} - {8d5c6aff-b7b1-43af-920b-a68cc73790c1} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {a47833f4-ec64-4d3e-8ac0-a5e49c7075e8} - - - - - - - - {a47833f4-ec64-4d3e-8ac0-a5e49c7075e8} - - - DeviceBrowser::removeDevice - - - false - activity - - - - - - - - {8d5c6aff-b7b1-43af-920b-a68cc73790c1} - - - - - - - - {8d5c6aff-b7b1-43af-920b-a68cc73790c1} - - - InfoPageStack::removeDevice - - - false - activity - - - - - - - - {0de9f20f-e41d-4668-bbf0-4a8c62e25ff8} - - - - - - - - {0de9f20f-e41d-4668-bbf0-4a8c62e25ff8} - - - toolManager::removeToolList - - - false - activity - - - - - - - - {b71c3466-c9e5-427a-bcc3-da9b26aecbe6} - - - - - - - - {b71c3466-c9e5-427a-bcc3-da9b26aecbe6} - - - DeviceManager::addDevice(Device*) - - - - - - - {15be4a11-1f33-44e5-b5e5-702cf5f73a44} - - - - - - - - {15be4a11-1f33-44e5-b5e5-702cf5f73a44} - - - {b71c3466-c9e5-427a-bcc3-da9b26aecbe6} - {ae89e41c-3635-4ff9-ab9c-8a06021ff888} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {e2e93b20-8354-4cf0-85ae-fab7fff2488a} - - - - - - - - {e2e93b20-8354-4cf0-85ae-fab7fff2488a} - - - DeviceFactory::build() - - - - - - - {ae37cc42-e517-4d98-9ae6-4881e560bece} - - - - - - - - {ae37cc42-e517-4d98-9ae6-4881e560bece} - - - {e2e93b20-8354-4cf0-85ae-fab7fff2488a} - {6e64d12e-b70a-4aa8-b1d1-43b6655accfe} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {6e64d12e-b70a-4aa8-b1d1-43b6655accfe} - - - - - - - - {6e64d12e-b70a-4aa8-b1d1-43b6655accfe} - - - DeviceLoader::init() - - - - - - - {a466b152-03e0-4044-8029-ca23b455bc7e} - - - - - - - - {a466b152-03e0-4044-8029-ca23b455bc7e} - - - {6e64d12e-b70a-4aa8-b1d1-43b6655accfe} - {b71c3466-c9e5-427a-bcc3-da9b26aecbe6} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {52430358-d829-4741-a5f6-220088dc3463} - - - - - - - - {52430358-d829-4741-a5f6-220088dc3463} - - - emit connectionFailed() - - - - - - - {717f99b3-15b7-4eb6-8867-bfdc17892868} - - - - - - - - {717f99b3-15b7-4eb6-8867-bfdc17892868} - - - {52430358-d829-4741-a5f6-220088dc3463} - {fd4dc4b2-263f-49ae-83f7-982ad16bbf31} - - - Controlflow - - - true - - - - - - - - - - {9fea4027-3b04-441a-87d4-4b26b8deebd9} - - - - - - - - {9fea4027-3b04-441a-87d4-4b26b8deebd9} - - - {52430358-d829-4741-a5f6-220088dc3463} - {f774d05a-4352-4a74-90f8-962686140379} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {cacf8979-a34d-48a7-beea-6f1573d56769} - - - - - - - - {cacf8979-a34d-48a7-beea-6f1573d56769} - - - Plugin::onConnect() - - - - - - - {4b15f10b-9672-4d85-b03c-64fd93912cfc} - - - - - - - - {4b15f10b-9672-4d85-b03c-64fd93912cfc} - - - {cacf8979-a34d-48a7-beea-6f1573d56769} - {bcb01831-b3b9-409f-ace6-815810265ed5} - - - Controlflow - - - true - true - - - - - - - - - - {0c950c27-3a85-44f8-81f0-1a4ed1ae55c2} - - - - - - - - {0c950c27-3a85-44f8-81f0-1a4ed1ae55c2} - - - false - {cacf8979-a34d-48a7-beea-6f1573d56769} - {52430358-d829-4741-a5f6-220088dc3463} - - - Controlflow - - - true - - - - - - - - - - {211c4cec-908f-496e-9e2a-5bf6617df89c} - - - - - - - - {211c4cec-908f-496e-9e2a-5bf6617df89c} - - - {cacf8979-a34d-48a7-beea-6f1573d56769} - {12fc2328-41d4-4191-8a2b-3ef90dcf4444} - - - Controlflow - - - false - true - - - - - - - - - - - - - - false - condition - - - - - - - - {069c3266-1486-44f6-9e13-1f73e96390ec} - - - - - - - - {069c3266-1486-44f6-9e13-1f73e96390ec} - - - Add the plugin to the -connected plugins list - - - - - - - {2df3468c-8f1e-44c3-8355-38e47e79631a} - - - - - - - - {2df3468c-8f1e-44c3-8355-38e47e79631a} - - - {069c3266-1486-44f6-9e13-1f73e96390ec} - {270a5894-7da7-415f-814d-06539e3403cf} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {bcb01831-b3b9-409f-ace6-815810265ed5} - - - - - - - - {bcb01831-b3b9-409f-ace6-815810265ed5} - - - Plugin::loadSettings - - - - - - - {2abcfaec-fafb-42f7-b6f0-869f23b4b7af} - - - - - - - - {2abcfaec-fafb-42f7-b6f0-869f23b4b7af} - - - {bcb01831-b3b9-409f-ace6-815810265ed5} - {069c3266-1486-44f6-9e13-1f73e96390ec} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {182d1eeb-71a7-49b6-accd-cfe4256c2699} - - - - - - - - {182d1eeb-71a7-49b6-accd-cfe4256c2699} - - - disconnectDevOnConnectFailure - - - - - - - {5c6b20c4-40fa-4355-9fff-87d61a525523} - - - - - - - - {5c6b20c4-40fa-4355-9fff-87d61a525523} - - - {182d1eeb-71a7-49b6-accd-cfe4256c2699} - {52430358-d829-4741-a5f6-220088dc3463} - - - Controlflow - - - true - - - - - true - - - - - - - - - - {1ef7abf3-3e59-48e3-a9bb-59737b5ee755} - - - - - - - - {1ef7abf3-3e59-48e3-a9bb-59737b5ee755} - - - {182d1eeb-71a7-49b6-accd-cfe4256c2699} - {c304010c-0039-487f-976b-f7099953204b} - - - Controlflow - - - false - true - - - - - - - - - - - - - - false - condition - - - - - - - - {fd4dc4b2-263f-49ae-83f7-982ad16bbf31} - - - - - - - - {fd4dc4b2-263f-49ae-83f7-982ad16bbf31} - - - Show warning badge - - - false - activity - - - - - - - - {f774d05a-4352-4a74-90f8-962686140379} - - - - - - - - {f774d05a-4352-4a74-90f8-962686140379} - - - Device::disconnctDev - - - false - activity - - - - - - - - {12fc2328-41d4-4191-8a2b-3ef90dcf4444} - - - - - - - - {12fc2328-41d4-4191-8a2b-3ef90dcf4444} - - - Get "disconnectDevOnConnectFailure" -plugin metadata - - - - - - - {22ee1032-d7a3-444b-b4d5-02a68546a76d} - - - - - - - - {22ee1032-d7a3-444b-b4d5-02a68546a76d} - - - {12fc2328-41d4-4191-8a2b-3ef90dcf4444} - {182d1eeb-71a7-49b6-accd-cfe4256c2699} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {35f9fd25-c76a-486b-919b-edfca514b3dc} - - - - - - - - {35f9fd25-c76a-486b-919b-edfca514b3dc} - - - - - false - horizontalbar - - - - - - - - {283beb3b-bbf6-4808-b77a-1f4183418a5b} - - - - - - - - {283beb3b-bbf6-4808-b77a-1f4183418a5b} - - - DeviceImpl::connectionFailed() - - - - - - - {d5b54170-970c-4f65-861f-7458898de830} - - - - - - - - {d5b54170-970c-4f65-861f-7458898de830} - - - {283beb3b-bbf6-4808-b77a-1f4183418a5b} - {9215c91f-1b56-4021-b796-db29ade8be1b} - - - Controlflow - - - true - - - - - - - - - - - - - - false - activity - - - - - - - - {75c170ad-5c36-4b54-9531-50ce00141dcf} - - - - - - - - {75c170ad-5c36-4b54-9531-50ce00141dcf} - - - - - false - activity - - - - - - - - - - - - - - - - diff --git a/core/include/core/application_restarter.h b/core/include/core/application_restarter.h deleted file mode 100644 index c9fcc4231f..0000000000 --- a/core/include/core/application_restarter.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef APPLICATIONRESTARTER_H -#define APPLICATIONRESTARTER_H - -#include "scopy-core_export.h" - -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT ApplicationRestarter -{ -public: - ApplicationRestarter(const QString &executable); - - static ApplicationRestarter *GetInstance(); - void setArguments(const QStringList &arguments); - QStringList getArguments() const; - - int restart(int exitCode); - static void triggerRestart(); - -private: - static ApplicationRestarter *pinstance_; - QString m_executable; - QStringList m_arguments; - QString m_currentPath; - bool m_restart; -}; -} // namespace scopy -#endif // APPLICATIONRESTARTER_H diff --git a/core/include/core/cmdlinehandler.h b/core/include/core/cmdlinehandler.h deleted file mode 100644 index bd5c97e0a2..0000000000 --- a/core/include/core/cmdlinehandler.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef CMDLINEHANDLER_H -#define CMDLINEHANDLER_H - -#include "scopy-core_export.h" -#include "scopymainwindow_api.h" - -#include - -namespace scopy { -class SCOPY_CORE_EXPORT CmdLineHandler -{ -public: - static int handle(QCommandLineParser &parser, ScopyMainWindow_API &scopyApi); - static void withLogFileOption(QCommandLineParser &parser); - static void closeLogFile(); - -private: - static void logOutputHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg); - static void removeTempLogFile(); - static FILE *logFile_; - static bool tempLogFile_; -}; -} // namespace scopy - -#endif // CMDLINEHANDLER_H diff --git a/core/include/core/crashreport.h b/core/include/core/crashreport.h deleted file mode 100644 index e20cce44d7..0000000000 --- a/core/include/core/crashreport.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef CRASHREPORT_H -#define CRASHREPORT_H - -#include -#include "scopy-core_export.h" - -namespace scopy { -class SCOPY_CORE_EXPORT CrashReport -{ -public: - static void initSignalHandler(); - -private: - static void signalHandler(int); - static QString tmpFilePath_; -}; -} // namespace scopy - -#endif // CRASHREPORT_H diff --git a/core/include/core/detachedtoolwindow.h b/core/include/core/detachedtoolwindow.h deleted file mode 100644 index e577cb2313..0000000000 --- a/core/include/core/detachedtoolwindow.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef DETACHEDTOOLWINDOW_H -#define DETACHEDTOOLWINDOW_H - -#include "scopy-core_export.h" - -#include - -#include - -namespace scopy { -class SCOPY_CORE_EXPORT DetachedToolWindow : public QWidget -{ - Q_OBJECT -public: - DetachedToolWindow(QWidget *parent, ToolMenuEntry *tme); - ~DetachedToolWindow(); - - void saveToolGeometry(ToolMenuEntry *tme, QWidget *w); - void loadToolGeometry(ToolMenuEntry *tme, QWidget *w); - -private: - ToolMenuEntry *tme; - QWidget *w; - -protected: - void closeEvent(QCloseEvent *event) override; -}; -} // namespace scopy -#endif // DETACHEDTOOLWINDOW_H diff --git a/core/include/core/detachedtoolwindowmanager.h b/core/include/core/detachedtoolwindowmanager.h deleted file mode 100644 index 69845b0a4d..0000000000 --- a/core/include/core/detachedtoolwindowmanager.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef DETACHEDTOOLMANAGER_H -#define DETACHEDTOOLMANAGER_H - -#include "detachedtoolwindow.h" -#include "scopy-core_export.h" - -#include -#include - -#include - -namespace scopy { - -class SCOPY_CORE_EXPORT DetachedToolWindowManager : public QObject -{ - Q_OBJECT -public: - DetachedToolWindowManager(QObject *parent = nullptr); - ~DetachedToolWindowManager(); - - void add(QString id, ToolMenuEntry *tme); - bool remove(QString id); - bool contains(QString key); - QWidget *getWidget(QString key); - -public Q_SLOTS: - void show(QString id); - -private: - QMap map; -}; -} // namespace scopy - -#endif // DETACHEDTOOLMANAGER_H diff --git a/core/include/core/device.h b/core/include/core/device.h deleted file mode 100644 index c4e87354bb..0000000000 --- a/core/include/core/device.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef DEVICE_H -#define DEVICE_H - -#include "pluginbase/toolmenuentry.h" -#include "scopy-core_export.h" - -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT Device -{ -public: - virtual ~Device(){}; - virtual QString id() = 0; - virtual QString category() = 0; - virtual QString displayName() = 0; - virtual QString param() = 0; - virtual QString displayParam() = 0; - virtual QWidget *icon() = 0; - - virtual QWidget *page() = 0; - - virtual QList toolList() = 0; - virtual void init() = 0; - virtual void preload() = 0; - virtual void loadPlugins() = 0; - virtual void unloadPlugins() = 0; - -public Q_SLOTS: - virtual void connectDev() = 0; - virtual void disconnectDev() = 0; - virtual void showPage() = 0; - virtual void hidePage() = 0; - virtual void save(QSettings &) = 0; - virtual void load(QSettings &) = 0; - -Q_SIGNALS: - virtual void toolListChanged() = 0; - virtual void connected() = 0; - virtual void disconnected() = 0; - virtual void requestedRestart() = 0; - virtual void requestTool(QString) = 0; -}; -} // namespace scopy - -#endif // DEVICE_H diff --git a/core/include/core/devicebrowser.h b/core/include/core/devicebrowser.h deleted file mode 100644 index f48ace626d..0000000000 --- a/core/include/core/devicebrowser.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef DEVICEBROWSER_H -#define DEVICEBROWSER_H - -#include "scopy-core_export.h" - -#include -#include -#include -#include - -#include - -namespace Ui { -class DeviceBrowser; -} - -namespace scopy { -class SCOPY_CORE_EXPORT DeviceBrowser : public QWidget -{ - Q_OBJECT - -public: - explicit DeviceBrowser(QWidget *parent = nullptr); - ~DeviceBrowser(); - QAbstractButton *getDeviceWidgetFor(QString id); - void addDevice(QString id, Device *d, int position = -1); - void removeDevice(QString id); - void connectDevice(QString id); - void disconnectDevice(QString id); - -Q_SIGNALS: - void requestDevice(QString id, int direction); - void requestRemoveDevice(QString id); - -public Q_SLOTS: - - void nextDevice(); - void prevDevice(); - -private Q_SLOTS: - void updateSelectedDeviceIdx(QString); - void forwardRequestDeviceWithDirection(); - -private: - void initBtns(); - DeviceIcon *buildDeviceIcon(Device *d, QWidget *parent = nullptr); - Ui::DeviceBrowser *ui; - QButtonGroup *bg; - QHBoxLayout *layout; - QList list; - int currentIdx; - - int getIndexOfId(QString k); - QString getIdOfIndex(int idx); - const char *devBrowserId = "DeviceBrowserId"; -}; -} // namespace scopy -#endif // DEVICEBROWSER_H diff --git a/core/include/core/devicefactory.h b/core/include/core/devicefactory.h deleted file mode 100644 index 38f2b20f16..0000000000 --- a/core/include/core/devicefactory.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef DEVICEFACTORY_H -#define DEVICEFACTORY_H - -#include "deviceimpl.h" - -#include - -namespace scopy { - -class DeviceFactory : public QObject -{ - Q_OBJECT -public: - static DeviceImpl *build(QString param, PluginManager *pm, QString category = "", QObject *parent = nullptr); -}; -} // namespace scopy -#endif // DEVICEFACTORY_H diff --git a/core/include/core/deviceicon.h b/core/include/core/deviceicon.h deleted file mode 100644 index 2a24c56679..0000000000 --- a/core/include/core/deviceicon.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef DEVICEICON_H -#define DEVICEICON_H -#include "scopy-core_export.h" - -#include - -#include - -namespace scopy { -class SCOPY_CORE_EXPORT DeviceIcon : public QAbstractButton -{ - Q_OBJECT -public: - DeviceIcon(QWidget *parent = nullptr) - : QAbstractButton(parent){}; - virtual ~DeviceIcon(){}; -public Q_SLOTS: - // virtual Device* device() = 0; - virtual void setConnected(bool) = 0; -Q_SIGNALS: - void refresh(); - void forget(); -}; -} // namespace scopy - -#endif // DEVICEICON_H diff --git a/core/include/core/deviceiconimpl.h b/core/include/core/deviceiconimpl.h deleted file mode 100644 index 7098e083b4..0000000000 --- a/core/include/core/deviceiconimpl.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef DEVICEICONIMPL_H -#define DEVICEICONIMPL_H - -#include "device.h" -#include "gui/utils.h" -#include "scopy-core_export.h" - -#include -#include -#include - -#include - -namespace Ui { -class DeviceButton; -}; - -namespace scopy { -class SCOPY_CORE_EXPORT DeviceIconImpl : public DeviceIcon -{ - Q_OBJECT - QWIDGET_PAINT_EVENT_HELPER -public: - explicit DeviceIconImpl(Device *d, QWidget *parent); - ~DeviceIconImpl(); -public Q_SLOTS: - void setConnected(bool) override; - -private: - Ui::DeviceButton *ui; -}; -} // namespace scopy - -#endif // DEVICEICONIMPL_H diff --git a/core/include/core/deviceimpl.h b/core/include/core/deviceimpl.h deleted file mode 100644 index 7241aa7cd0..0000000000 --- a/core/include/core/deviceimpl.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef DEVICEIMPL_H -#define DEVICEIMPL_H - -#include "device.h" -#include "pluginbase/plugin.h" -#include "pluginmanager.h" -#include "scopy-core_export.h" - -#include -#include -#include - -namespace scopy { - -class SCOPY_CORE_EXPORT DeviceImpl : public QObject, public Device -{ - Q_OBJECT -public: - explicit DeviceImpl(QString param, PluginManager *p, QString category = "", QObject *parent = nullptr); - virtual ~DeviceImpl(); - - // Device interface -public: - QString id() override; - QString displayName() override; - QString displayParam() override; - QString category() override; - QString param() override; - QWidget *icon() override; - QWidget *page() override; - QList toolList() override; - virtual void init() override; - virtual void preload() override; - virtual void loadPlugins() override; - virtual void unloadPlugins() override; - virtual bool verify(); - virtual QMap readDeviceInfo(); - - QList plugins() const; - -public Q_SLOTS: - virtual void connectDev() override; - virtual void disconnectDev() override; - virtual void showPage() override; - virtual void hidePage() override; - virtual void save(QSettings &) override; - virtual void load(QSettings &) override; - // void forgetDev() override; - void onConnectionFailed(); -Q_SIGNALS: - void toolListChanged() override; - void connected() override; - void disconnected() override; - void requestedRestart() override; - void requestTool(QString) override; - void connectionFailed(); - void forget(); - -protected: - void removeDisabledPlugins(); - void loadName(); - void loadIcons(); - void loadPages(); - void loadToolList(); - void loadBadges(); - void setPingPlugin(Plugin *plugin); - void bindPing(); - void unbindPing(); - -protected: - PluginManager *p; - QList m_plugins; - QList m_connectedPlugins; - QString m_id; - QString m_category; - QString m_displayName; - QString m_displayParam; - QString m_param; - QWidget *m_icon; - QWidget *m_page; - QPushButton *connbtn, *discbtn; - Plugin *m_pingPlugin = nullptr; -}; -} // namespace scopy - -#endif // DEVICEIMPL_H diff --git a/core/include/core/deviceloader.h b/core/include/core/deviceloader.h deleted file mode 100644 index 12ae5d2f83..0000000000 --- a/core/include/core/deviceloader.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef DEVICELOADER_H -#define DEVICELOADER_H - -#include "deviceimpl.h" - -#include - -namespace scopy { - -class DeviceLoader : public QObject -{ - Q_OBJECT -public: - DeviceLoader(DeviceImpl *d, QObject *parent = nullptr); - ~DeviceLoader(); - void init(bool async = true); - void asyncInit(); - void syncInit(); -Q_SIGNALS: - void initialized(); - -private: - DeviceImpl *d; - QObject *oldParent; -}; -} // namespace scopy - -#endif // DEVICELOADER_H diff --git a/core/include/core/devicemanager.h b/core/include/core/devicemanager.h deleted file mode 100644 index cc7cd29e56..0000000000 --- a/core/include/core/devicemanager.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef DEVICEMANAGER_H -#define DEVICEMANAGER_H - -#include "device.h" -#include "deviceimpl.h" -#include "pluginmanager.h" -#include "scopy-core_export.h" - -#include -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT DeviceManager : public QObject -{ - Q_OBJECT - friend class ScopyMainWindow_API; - -public: - explicit DeviceManager(PluginManager *pm, QObject *parent = nullptr); - ~DeviceManager(); - Device *getDevice(QString id); - void setExclusive(bool); - bool getExclusive() const; - -public Q_SLOTS: - - void addDevice(Device *d); - QString createDevice(QString category, QString param, bool async = true); - void removeDevice(QString category, QString id); - - void removeDeviceById(QString id); - QString restartDevice(QString id); - void disconnectAll(); - - void save(QSettings &s); - void load(QSettings &s); - // void updateScan(QStringList ls); - -private Q_SLOTS: - void changeToolListDevice(); - void connectDevice(); - void disconnectDevice(); - void restartDevice(); - -Q_SIGNALS: - void deviceChangedToolList(QString, QList); - void deviceAddStarted(QString); - void deviceAdded(QString, Device *); - void deviceRemoveStarted(QString, Device *); - void deviceRemoved(QString); - void deviceConnected(QString id, Device *); - void deviceDisconnected(QString id, Device *); - void requestDevice(QString id); - void requestTool(QString id); - -private: - void connectDeviceToManager(DeviceImpl *d); - void disconnectDeviceFromManager(DeviceImpl *d); - -private: - bool exclusive = false; - QStringList scannedDev; - QStringList connectedDev; - QMap map; - PluginManager *pm; - - void disconnectDevice(QString id); - void connectDevice(QString id); -}; -} // namespace scopy - -#endif // DEVICEMANAGER_H diff --git a/core/include/core/emuwidget.h b/core/include/core/emuwidget.h deleted file mode 100644 index 8a225fdcf7..0000000000 --- a/core/include/core/emuwidget.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef EMUWIDGET_H -#define EMUWIDGET_H - -#include "scopy-core_export.h" - -#include -#include -#include -#include -#include -#include - -namespace Ui { -class EmuWidget; -} - -namespace scopy { -class SCOPY_CORE_EXPORT EmuWidget : public QWidget -{ - Q_OBJECT -public: - explicit EmuWidget(QWidget *parent = nullptr); - ~EmuWidget(); - -Q_SIGNALS: - void emuDeviceAvailable(QString uri); - -protected: - void showEvent(QShowEvent *event) override; -private Q_SLOTS: - void onEnableDemoClicked(); - void browseFile(QLineEdit *lineEditPath); - -private: - QWidget *createDemoOptWidget(QWidget *parent); - QWidget *createXmlPathWidget(QWidget *parent); - QWidget *createRxTxDevWidget(QWidget *parent); - QWidget *createUriWidget(QWidget *parent); - QWidget *createEnBtnWidget(QWidget *parent); - void init(); - void enGenericOptWidget(QWidget *xmlPathWidget, QWidget *rxTxDevWidget, QString crtOpt); - QStringList createArgList(); - void setStatusMessage(QString msg); - QString findEmuPath(); - void stopEnableBtn(QString btnText); - bool startIioEmuProcess(QString processPath, QStringList arg = {}); - void killEmuProcess(); - - QWidget *m_emuWidget; - QComboBox *m_demoOptCb; - MenuLineEdit *m_xmlPathEdit; - MenuLineEdit *m_rxTxDevEdit; - MenuLineEdit *m_uriEdit; - QLabel *m_uriMsgLabel; - AnimationPushButton *m_enDemoBtn; - - QString m_emuPath; - bool m_enableDemo; - QProcess *m_emuProcess; - const QStringList m_availableOptions{"adalm2000", "generic"}; -}; -} // namespace scopy - -#endif // EMUWIDGET_H diff --git a/core/include/core/iiodeviceimpl.h b/core/include/core/iiodeviceimpl.h deleted file mode 100644 index df84dd062b..0000000000 --- a/core/include/core/iiodeviceimpl.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef IIODEVICEIMPL_H -#define IIODEVICEIMPL_H - -#include "deviceimpl.h" - -namespace scopy { - -class SCOPY_CORE_EXPORT IIODeviceImpl : public DeviceImpl -{ -public: - explicit IIODeviceImpl(QString param, PluginManager *p, QObject *parent = nullptr) - : DeviceImpl(param, p, "iio", parent) - {} - ~IIODeviceImpl() {} - - virtual void init() override; - bool verify() override; - QMap readDeviceInfo() override; -}; - -} // namespace scopy - -#endif // IIODEVICEIMPL_H diff --git a/core/include/core/iiotabwidget.h b/core/include/core/iiotabwidget.h deleted file mode 100644 index 955b33eb37..0000000000 --- a/core/include/core/iiotabwidget.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef IIOTABWIDGET_H -#define IIOTABWIDGET_H - -#include "menucombo.h" -#include -#include -#include -#include -#include - -namespace scopy { - -class IioTabWidget : public QWidget -{ - Q_OBJECT -public: - IioTabWidget(QWidget *parent = nullptr); - ~IioTabWidget(); - -public Q_SLOTS: - void onVerifyFinished(bool result); - void updateUri(QString uri); -Q_SIGNALS: - void uriChanged(QString uri); - void startVerify(QString uri, QString cat); - -protected: - void showEvent(QShowEvent *event) override; -private Q_SLOTS: - void scanFinished(); - void serialScanFinished(); - void futureScan(); - void futureSerialScan(); - void verifyBtnClicked(); - -private: - void setupConnections(); - QStringList computeBackendsList(); - void addScanFeedbackMsg(QString message); - QCheckBox *createBackendCheckBox(QString backEnd, QWidget *parent); - void setupFilterWidget(QStringList backednsList); - QString getSerialPath(); - bool isSerialCompatible(); - void setupBtnLdIcon(AnimationPushButton *btn); - QWidget *createFilterWidget(QWidget *parent); - QWidget *createAvlCtxWidget(QWidget *parent); - QWidget *createSerialSettWidget(QWidget *parent); - QWidget *createUriWidget(QWidget *parent); - QWidget *createVerifyBtnWidget(QWidget *parent); - - QWidget *m_filterWidget; - QComboBox *m_avlCtxCb; - MenuCombo *m_serialPortCb; - MenuCombo *m_baudRateCb; - MenuLineEdit *m_serialFrameEdit; - MenuLineEdit *m_uriEdit; - QLabel *m_uriMsgLabel; - AnimationPushButton *m_btnScan; - AnimationPushButton *m_btnSerialScan; - AnimationPushButton *m_btnVerify; - - QFutureWatcher *m_fwScan; - QFutureWatcher> *m_fwSerialScan; - QStringList m_scanParamsList; - QStringList m_scanList; - - const QVector m_availableBaudRates = {2400, 4800, 9600, 14400, 19200, 38400, - 57600, 115200, 230400, 460800, 921600}; -}; -} // namespace scopy - -#endif // IIOTABWIDGET_H diff --git a/core/include/core/infopagestack.h b/core/include/core/infopagestack.h deleted file mode 100644 index d54b9c31fe..0000000000 --- a/core/include/core/infopagestack.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef INFOPAGESTACK_H -#define INFOPAGESTACK_H - -#include "device.h" -#include "gui/homepage_controls.h" -#include "mapstackedwidget.h" -#include "scopy-core_export.h" - -#include - -namespace scopy { - -// implement slide to-from next/prev page - emits to button selection group - -class SCOPY_CORE_EXPORT InfoPageStack : public MapStackedWidget -{ - Q_OBJECT -public: - explicit InfoPageStack(QWidget *parent = nullptr); - ~InfoPageStack(); - void add(QString key, Device *d); - - HomepageControls *getHomepageControls() const; - - void add(QString key, QWidget *w) override; - bool remove(QString key) override; -public Q_SLOTS: - bool show(QString key) override; - bool slideInKey(QString key, int direction); - -protected Q_SLOTS: - void animationDone(); - -private: - QMap idDevMap; - void slideInWidget(QWidget *newWidget, int direction); - HomepageControls *hc; - - enum QEasingCurve::Type animationType; - int speed; - - bool active; - QPoint now; - int current; - int next; -}; -} // namespace scopy -#endif // INFOPAGESTACK_H diff --git a/core/include/core/licenseoverlay.h b/core/include/core/licenseoverlay.h deleted file mode 100644 index 7a3727e995..0000000000 --- a/core/include/core/licenseoverlay.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef LICENSEOVERLAY_H -#define LICENSEOVERLAY_H - -#include "qpushbutton.h" -#include "scopy-core_export.h" -#include - -namespace scopy { -class SCOPY_CORE_EXPORT LicenseOverlay : public QWidget -{ - Q_OBJECT -public: - LicenseOverlay(QWidget *parent = nullptr); - ~LicenseOverlay(); - QString static getLicense(); - void showOverlay(); - QPushButton *getContinueBtn(); - -private: - QWidget *parent; - PopupWidget *m_popupWidget; -}; -} // namespace scopy -#endif // LICENSEOVERLAY_H diff --git a/core/include/core/logging_categories.h b/core/include/core/logging_categories.h deleted file mode 100644 index 5849e3d171..0000000000 --- a/core/include/core/logging_categories.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2019 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef LOGGING_CATEGORIES_H -#define LOGGING_CATEGORIES_H - -#include "scopy-core_export.h" - -#include - -#define QDEBUG_LOG_TIME -//#define QDEBUG_LOG_DATE -#define QDEBUG_LOG_MSG_TYPE -#define QDEBUG_LOG_FILE -//#define QDEBUG_CATEGORY -#define QDEBUG_FUNCTION - -#define QDEBUG_LOG_TIME_STR "%{time h:mm:ss.zzz}" -#define QDEBUG_LOG_DATE_STR "%{time yyyyMMdd }" -#define QDEBUG_LOG_MSG_TYPE_STR \ - "%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}" -#define QDEBUG_LOG_FILE_PREFIX_STR "file://" -#define QDEBUG_LOG_FILE_NAME_STR "%{file}:" -#define QDEBUG_LOG_LINE_NR_STR "%{line}" -#define QDEBUG_LOG_FILE_STR QDEBUG_LOG_FILE_PREFIX_STR QDEBUG_LOG_FILE_NAME_STR QDEBUG_LOG_LINE_NR_STR -#define QDEBUG_CATEGORY_STR "%{category}" -#define QDEBUG_FUNCTION_STR "%{function}" -#define QDEBUG_THREAD_STR "%{threadid}" -#define QDEBUG_PID_STR "%{pid}" -#define QDEBUG_APP_STR "%{appname}" -#define QCRITICAL_BACKTRACE_STR "%{if-critical}%{backtrace depth=100 separator=\n}%{endif}" - -#ifndef QT_NO_DEBUG_OUTPUT -Q_DECLARE_LOGGING_CATEGORY(CAT_TOOL_LAUNCHER) -Q_DECLARE_LOGGING_CATEGORY(CAT_OSCILLOSCOPE) -Q_DECLARE_LOGGING_CATEGORY(CAT_SIGNAL_GENERATOR) -Q_DECLARE_LOGGING_CATEGORY(CAT_VOLTMETER) -Q_DECLARE_LOGGING_CATEGORY(CAT_POWER_CONTROLLER) -Q_DECLARE_LOGGING_CATEGORY(CAT_SPECTRUM_ANALYZER) -Q_DECLARE_LOGGING_CATEGORY(CAT_NETWORK_ANALYZER) -Q_DECLARE_LOGGING_CATEGORY(CAT_DIGITAL_IO) -Q_DECLARE_LOGGING_CATEGORY(CAT_LOGIC_ANALYZER) -Q_DECLARE_LOGGING_CATEGORY(CAT_PATTERN_GENERATOR) -Q_DECLARE_LOGGING_CATEGORY(CAT_CALIBRATION) -Q_DECLARE_LOGGING_CATEGORY(CAT_CALIBRATION_MANUAL) -Q_DECLARE_LOGGING_CATEGORY(CAT_IIO_MANAGER) -Q_DECLARE_LOGGING_CATEGORY(CAT_PLOT) -Q_DECLARE_LOGGING_CATEGORY(CAT_BENCHMARK) -Q_DECLARE_LOGGING_CATEGORY(CAT_CRASH_REPORT) -#else -#define CAT_TOOL_LAUNCHER -#define CAT_OSCILLOSCOPE -#define CAT_SIGNAL_GENERATOR -#define CAT_VOLTMETER -#define CAT_POWER_CONTROLLER -#define CAT_SPECTRUM_ANALYZER -#define CAT_NETWORK_ANALYZER -#define CAT_DIGITAL_IO -#define CAT_LOGIC_ANALYZER -#define CAT_PATTERN_GENERATOR -#define CAT_CALIBRATION -#define CAT_CALIBRATION_MANUAL -#define CAT_IIO_MANAGER -#define CAT_PLOT -#define CAT_BENCHMARK -#define CAT_CRASH_REPORT -#endif - -void SetScopyQDebugMessagePattern(); - -#endif // LOGGING_CATEGORIES_H diff --git a/core/include/core/pluginenablewidget.h b/core/include/core/pluginenablewidget.h deleted file mode 100644 index a9df1d750d..0000000000 --- a/core/include/core/pluginenablewidget.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef PLUGINENABLEWIDGET_H -#define PLUGINENABLEWIDGET_H - -#include "gui/utils.h" -#include "qcheckbox.h" -#include "qlabel.h" - -#include - -namespace scopy { - -class PluginEnableWidget : public QWidget -{ - Q_OBJECT - QWIDGET_PAINT_EVENT_HELPER -public: - explicit PluginEnableWidget(QWidget *parent = nullptr); - ~PluginEnableWidget(); - - void setDescription(QString description); - QCheckBox *checkBox() const; - -private: - QCheckBox *m_checkBox; - QLabel *m_descriptionLabel; -}; - -} // namespace scopy - -#endif // PLUGINENABLEWIDGET_H diff --git a/core/include/core/pluginfilter.h b/core/include/core/pluginfilter.h deleted file mode 100644 index 9c0c0f4e8e..0000000000 --- a/core/include/core/pluginfilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef PLUGINFILTER_H -#define PLUGINFILTER_H -#include - -namespace scopy { -class PluginFilter -{ - -private: - PluginFilter(); - -public: - static bool pluginInCategory(Plugin *p, QString category); // PluginFilter class (?) - static bool pluginInExclusionList(QList pl, Plugin *p); - static bool pluginForcedInclusionList(QList pl, Plugin *p); -}; -} // namespace scopy - -#endif // PLUGINFILTER_H diff --git a/core/include/core/pluginmanager.h b/core/include/core/pluginmanager.h deleted file mode 100644 index 82447e800b..0000000000 --- a/core/include/core/pluginmanager.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef PLUGINMANAGER_H -#define PLUGINMANAGER_H - -#include "scopy-core_export.h" - -#include -#include - -#include - -namespace scopy { -class SCOPY_CORE_EXPORT PluginManager : public QObject -{ - Q_OBJECT -public: - PluginManager(QObject *parent = nullptr); - ~PluginManager(); - void add(QStringList pluginFileList); - void add(QString pluginFileName); - int count(); - void sort(); - void clear(); - QList getOriginalPlugins() const; - QList getPlugins(QString category = ""); - QList getCompatiblePlugins(QString param, QString category = ""); - void setMetadata(QJsonObject metadata); - QJsonObject metadata() const; - -private: - Plugin *loadPlugin(QString file); - QList list; - QJsonObject m_metadata; - - void applyMetadata(Plugin *plugin, QJsonObject *metadata); - bool pluginInCategory(Plugin *p, QString category); -}; -} // namespace scopy -#endif // PLUGINMANAGER_H diff --git a/core/include/core/pluginrepository.h b/core/include/core/pluginrepository.h deleted file mode 100644 index c2923d910b..0000000000 --- a/core/include/core/pluginrepository.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef PLUGINREPOSITORY_H -#define PLUGINREPOSITORY_H - -#include "pluginmanager.h" -#include "scopy-core_export.h" - -#include -#include - -namespace scopy { - -class SCOPY_CORE_EXPORT PluginRepository : public QObject -{ - Q_OBJECT -public: - PluginRepository(QObject *parent); - ~PluginRepository(); - void init(QString location); - PluginManager *getPluginManager() { return pm; } - -private: - PluginManager *pm; - QJsonObject metadata; -}; -} // namespace scopy - -#endif // PLUGINREPOSITORY_H diff --git a/core/include/core/scanbuttoncontroller.h b/core/include/core/scanbuttoncontroller.h deleted file mode 100644 index cbf99bc057..0000000000 --- a/core/include/core/scanbuttoncontroller.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef SCANBUTTONCONTROLLER_H -#define SCANBUTTONCONTROLLER_H - -#include "iioutil/cyclicaltask.h" -#include "scopy-core_export.h" - -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT ScanButtonController : public QObject -{ - Q_OBJECT -public: - explicit ScanButtonController(CyclicalTask *cs, QPushButton *btn, QObject *parent); - ~ScanButtonController(); - -public Q_SLOTS: - void enableScan(bool b); - void startScan(); - void stopScan(); - -private: - QPushButton *btn; - CyclicalTask *cs; - QMetaObject::Connection conn; -}; -} // namespace scopy - -#endif // SCANBUTTONCONTROLLER_H diff --git a/core/include/core/scannediiocontextcollector.h b/core/include/core/scannediiocontextcollector.h deleted file mode 100644 index 41aba53c7a..0000000000 --- a/core/include/core/scannediiocontextcollector.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef SCANNEDIIOCONTEXTCOLLECTOR_H -#define SCANNEDIIOCONTEXTCOLLECTOR_H - -#include "device.h" -#include "scopy-core_export.h" - -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT ScannedIIOContextCollector : public QObject -{ - Q_OBJECT -public: - explicit ScannedIIOContextCollector(QObject *parent = nullptr); - ~ScannedIIOContextCollector(); - -public Q_SLOTS: - void update(QStringList uris); - void clearCache(); - void lock(QString, Device *); - void unlock(QString, Device *); - void removeDevice(QString id, Device *d); -Q_SIGNALS: - void foundDevice(QString cat, QString uri); - void lostDevice(QString cat, QString uri); - -private: - QSet uris; - QSet lockedUris; -}; -} // namespace scopy - -#endif // SCANNEDIIOCONTEXTCOLLECTOR_H diff --git a/core/include/core/scopy-core_config.h.cmakein b/core/include/core/scopy-core_config.h.cmakein deleted file mode 100644 index e5615b390e..0000000000 --- a/core/include/core/scopy-core_config.h.cmakein +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef SCOPY_CORE_CONFIG_H_CMAKEIN -#define SCOPY_CORE_CONFIG_H_CMAKEIN - -#cmakedefine WITH_PYTHON -#cmakedefine WITH_SIGROK -#cmakedefine PYTHON_VERSION "@PYTHON_VERSION@" -#cmakedefine SCOPY_DEV_MODE -#cmakedefine BUILD_PYTHON_LIBRARY_DIRS "@BUILD_PYTHON_LIBRARY_DIRS@" - -#endif // SCOPY_CORE_CONFIG_H_CMAKEIN diff --git a/core/include/core/scopyaboutpage.h b/core/include/core/scopyaboutpage.h deleted file mode 100644 index c6838899f7..0000000000 --- a/core/include/core/scopyaboutpage.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef SCOPYABOUTPAGE_H -#define SCOPYABOUTPAGE_H - -#include "scopy-core_export.h" - -#include -#include -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT ScopyAboutPage : public QWidget -{ - Q_OBJECT -public: - ScopyAboutPage(QWidget *parent = nullptr); - ~ScopyAboutPage(); - void addHorizontalTab(QWidget *w, QString text); - QWidget *buildPage(QString src); - -private: - void initUI(); - void initNavigationWidget(QTextBrowser *browser); - QTabWidget *tabWidget; - QVBoxLayout *layout; -}; -} // namespace scopy - -#endif // SCOPYABOUTPAGE_H diff --git a/core/include/core/scopyhomeaddpage.h b/core/include/core/scopyhomeaddpage.h deleted file mode 100644 index e3df4ad450..0000000000 --- a/core/include/core/scopyhomeaddpage.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef SCOPYHOMEADDPAGE_H -#define SCOPYHOMEADDPAGE_H - -#include "deviceimpl.h" -#include "emuwidget.h" -#include "iiotabwidget.h" -#include "infopage.h" -#include "pluginenablewidget.h" -#include "pluginmanager.h" -#include "scopy-core_export.h" - -#include - -#include -#include -#include -#include - -namespace Ui { -class ScopyHomeAddPage; -} - -namespace scopy { -class SCOPY_CORE_EXPORT ScopyHomeAddPage : public QWidget -{ - Q_OBJECT - -public: - explicit ScopyHomeAddPage(QWidget *parent = nullptr, PluginManager *pm = nullptr); - ~ScopyHomeAddPage(); - -Q_SIGNALS: - void requestAddDevice(QString, QString); - void requestDevice(QString); - void newDeviceAvailable(scopy::DeviceImpl *d); - void verifyFinished(bool valid); - -private Q_SLOTS: - void futureVerify(QString uri, QString cat); - void deviceAddedToUi(QString); - void onVerifyFinished(); - void deviceLoaderInitialized(); - void addBtnClicked(); - void backBtnClicked(); - void onEmuDeviceAvailable(QString uri); - -private: - void loadDeviceInfoPage(); - void initializeDevice(); - void removePluginsCheckBoxes(); - QTabWidget *createTabWidget(QWidget *parent); - QWidget *createInfoSection(QWidget *parent); - QWidget *createBtnsWidget(QWidget *parent); - QWidget *createAddPage(QWidget *parent); - - EmuWidget *m_emuWidget; - IioTabWidget *m_iioTabWidget; - QString m_pendingUri; - QFutureWatcher *m_fw; - - InfoPage *m_deviceInfoPage; - PluginManager *m_pluginManager; - DeviceImpl *m_deviceImpl; - QList m_pluginDescriptionList; - - MenuCollapseSection *m_pluginBrowserSection; - QPushButton *m_addBtn; - QPushButton *m_backBtn; - QLabel *m_connLostLabel; - QWidget *m_addPage; - QTabWidget *m_tabWidget; - QStackedWidget *m_stackedWidget; -}; -} // namespace scopy -#endif // SCOPYHOMEADDPAGE_H diff --git a/core/include/core/scopyhomeinfopage.h b/core/include/core/scopyhomeinfopage.h deleted file mode 100644 index f11a4189ef..0000000000 --- a/core/include/core/scopyhomeinfopage.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef SCOPYHOMEINFOPAGE_H -#define SCOPYHOMEINFOPAGE_H - -#include "scopy-core_export.h" - -#include -#include - -#include - -namespace Ui { -class ScopyHomeInfoPage; -} - -namespace scopy { -class SCOPY_CORE_EXPORT ScopyHomeInfoPage : public QWidget -{ - Q_OBJECT - -public: - explicit ScopyHomeInfoPage(QWidget *parent = nullptr); - ~ScopyHomeInfoPage(); - -private: - Ui::ScopyHomeInfoPage *ui; - - void initReportButton(); -}; -} // namespace scopy - -#endif // SCOPYHOMEINFOPAGE_H diff --git a/core/include/core/scopyhomepage.h b/core/include/core/scopyhomepage.h deleted file mode 100644 index 61bb65e230..0000000000 --- a/core/include/core/scopyhomepage.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef SCOPYHOMEPAGE_H -#define SCOPYHOMEPAGE_H - -#include "device.h" -#include "pluginmanager.h" -#include "scopy-core_export.h" -#include "scopyhomeaddpage.h" - -#include -#include - -namespace Ui { -class ScopyHomePage; -} - -namespace scopy { -class SCOPY_CORE_EXPORT ScopyHomePage : public QWidget -{ - Q_OBJECT - -public: - explicit ScopyHomePage(QWidget *parent = nullptr, PluginManager *pm = nullptr); - ~ScopyHomePage(); - QPushButton *scanControlBtn(); -Q_SIGNALS: - - void requestAddDevice(QString cat, QString id); - void requestRemoveDevice(QString id); - void requestDevice(QString id); - void deviceAddedToUi(QString id); - void newDeviceAvailable(DeviceImpl *d); - -public Q_SLOTS: - void addDevice(QString id, Device *); - void removeDevice(QString id); - void viewDevice(QString id); - void connectDevice(QString); - void disconnectDevice(QString); - -private: - Ui::ScopyHomePage *ui; - ScopyHomeAddPage *add; -}; -} // namespace scopy - -#endif // SCOPYHOMEPAGE_H diff --git a/core/include/core/scopymainwindow.h b/core/include/core/scopymainwindow.h deleted file mode 100644 index c812a315a7..0000000000 --- a/core/include/core/scopymainwindow.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef SCOPYMAINWINDOW_H -#define SCOPYMAINWINDOW_H - -#include -#include - -#include "licenseoverlay.h" -#include "scopyhomepage.h" -#include "devicemanager.h" -#include "scannediiocontextcollector.h" -#include "toolmanager.h" -#include "detachedtoolwindowmanager.h" -#include "pluginrepository.h" -#include "scopy-core_export.h" -#include "scopyaboutpage.h" -#include "scopypreferencespage.h" -#include "pluginbase/preferences.h" -#include "pluginbase/versionchecker.h" -#include "iioutil/cyclicaltask.h" -#include "iioutil/iioscantask.h" -#include -#include "versioncheckmessage.h" - -QT_BEGIN_NAMESPACE -namespace Ui { -class ScopyMainWindow; -} -QT_END_NAMESPACE -namespace scopy { -class ScopyMainWindow_API; -class SCOPY_CORE_EXPORT ScopyMainWindow : public QMainWindow -{ - friend class ScopyMainWindow_API; - Q_OBJECT - -public: - ScopyMainWindow(QWidget *parent = nullptr); - ~ScopyMainWindow(); - void initAboutPage(PluginManager *pm = nullptr); - void initPreferencesPage(PluginManager *pm = nullptr); - void initPreferences(); - void initTranslations(); - void loadPluginsFromRepository(PluginRepository *pr = nullptr); - - void showEvent(QShowEvent *event) override; - -public Q_SLOTS: - void requestTools(QString id); - void receiveVersionDocument(QJsonDocument document); - void addDeviceToUi(QString id, Device *d); - void removeDeviceFromUi(QString); - void save(); - void load(); - void save(QString file); - void load(QString file); - void handlePreferences(QString, QVariant); - -private: - ScopyAboutPage *about; - ScopyPreferencesPage *prefPage; - PluginRepository *pr; - ScopyHomePage *hp; - DeviceManager *dm; - Preferences *pref; - - CyclicalTask *scanCycle; - IIOScanTask *scanTask; - ScannedIIOContextCollector *scc; - ToolManager *toolman; - DetachedToolWindowManager *dtm; - - LicenseOverlay *license = nullptr; - VersionCheckMessage *checkUpdate = nullptr; - ScopyStatusBar *statusBar; - ScopyMainWindow_API *api; - Ui::ScopyMainWindow *ui; - QOpenGLWidget *m_glLoader; - - void loadOpenGL(); - void initPythonWIN32(); - void loadDecoders(); - void initApi(); - void initStatusBar(); - -protected: - void closeEvent(QCloseEvent *event) override; -}; -} // namespace scopy -#endif // SCOPYMAINWINDOW_H diff --git a/core/include/core/scopymainwindow_api.h b/core/include/core/scopymainwindow_api.h deleted file mode 100644 index 927759d26f..0000000000 --- a/core/include/core/scopymainwindow_api.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef SCOPYMAINWINDOW_API_H -#define SCOPYMAINWINDOW_API_H - -#include "scopy-core_export.h" -#include "scopymainwindow.h" -#include - -namespace scopy { -class SCOPY_CORE_EXPORT ScopyMainWindow_API : public ApiObject -{ - Q_OBJECT -public: - explicit ScopyMainWindow_API(ScopyMainWindow *w); - ~ScopyMainWindow_API(); - - Q_INVOKABLE void acceptLicense(); - Q_INVOKABLE QString addDevice(QString cat, QString uri); - Q_INVOKABLE bool connectDevice(int idx); - Q_INVOKABLE bool connectDevice(QString devID); - Q_INVOKABLE bool disconnectDevice(QString devID); - Q_INVOKABLE bool disconnectDevice(); - Q_INVOKABLE void switchTool(QString devID, QString toolName); - Q_INVOKABLE void switchTool(QString toolName); - Q_INVOKABLE void runScript(QString scriptPath, bool exitApp = true); - Q_INVOKABLE void runScriptList(QStringList scriptPathList, bool exitApp = true); - -private: - static bool sortByUUID(const QString &k1, const QString &k2); - const QString getScriptContent(QFile *file); - ScopyMainWindow *m_w; -}; - -} // namespace scopy - -#endif // SCOPYMAINWINDOW_API_H diff --git a/core/include/core/scopypreferencespage.h b/core/include/core/scopypreferencespage.h deleted file mode 100644 index bcc196d77a..0000000000 --- a/core/include/core/scopypreferencespage.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef SCOPYPREFERENCESPAGE_H -#define SCOPYPREFERENCESPAGE_H - -#include "scopy-core_export.h" - -#include -#include - -namespace scopy { -class SCOPY_CORE_EXPORT ScopyPreferencesPage : public QWidget -{ - Q_OBJECT -public: - ScopyPreferencesPage(QWidget *parent = nullptr); - ~ScopyPreferencesPage(); - QWidget *buildGeneralPreferencesPage(); - void addHorizontalTab(QWidget *w, QString text); -private Q_SLOTS: - void resetScopyPreferences(); - -private: - QTabWidget *tabWidget; - void initRestartWidget(); - QWidget *restartWidget; - QWidget *buildSaveSessionPreference(); - QWidget *buildResetScopyDefaultButton(); - QVBoxLayout *layout; - void removeIniFiles(bool backup = true); - void initUI(); -}; -} // namespace scopy -#endif // SCOPYPREFERENCESPAGE_H diff --git a/core/include/core/scopytitlemanager.h b/core/include/core/scopytitlemanager.h deleted file mode 100644 index 0ef4545c2a..0000000000 --- a/core/include/core/scopytitlemanager.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef SCOPY_SCOPYTITLEMANAGER_H -#define SCOPY_SCOPYTITLEMANAGER_H - -#include -#include - -namespace scopy { -class ScopyTitleManager : public QObject -{ - Q_OBJECT -protected: - ScopyTitleManager(QObject *parent = nullptr); - ~ScopyTitleManager(); - - void buildTitle(); - -public: - ScopyTitleManager(ScopyTitleManager &other) = delete; - void operator=(const ScopyTitleManager &other) = delete; - - static ScopyTitleManager *GetInstance(); - - static void setApplicationName(QString title); - static void clearApplicationName(); - - static void setScopyVersion(QString version); - static void clearScopyVersion(); - - static void setGitHash(QString hash); - static void clearGitHash(); - - static void setIniFileName(QString filename); - static void clearIniFileName(); - - static void clearAll(); - static QString getCurrentTitle(); - - static void setMainWindow(QWidget *window); - -private: - static ScopyTitleManager *pinstance_; - QString m_title; - QString m_version; - QString m_hash; - QString m_filename; - QString m_currentTitle; - QWidget *m_mainWindow; -}; -} // namespace scopy - -#endif // SCOPY_SCOPYTITLEMANAGER_H diff --git a/core/include/core/toolbrowser.h b/core/include/core/toolbrowser.h deleted file mode 100644 index 2f611c022c..0000000000 --- a/core/include/core/toolbrowser.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef TOOLBROWSER_H -#define TOOLBROWSER_H - -#include "scopy-core_export.h" - -#include - -#include - -namespace Ui { -class ToolBrowser; -} - -namespace scopy { -class SCOPY_CORE_EXPORT ToolBrowser : public QWidget -{ - Q_OBJECT - -public: - explicit ToolBrowser(QWidget *parent = nullptr); - ~ToolBrowser(); - ToolMenu *getToolMenu(); - -public Q_SLOTS: - void toggleCollapse(); -Q_SIGNALS: - void collapsed(bool); - void requestTool(QString); - void requestSave(); - void requestLoad(); - -private: - bool m_collapsed; - Ui::ToolBrowser *ui; - void hideMenuText(bool collapesd); -}; -} // namespace scopy - -#endif // TOOLBROWSER_H diff --git a/core/include/core/toolmanager.h b/core/include/core/toolmanager.h deleted file mode 100644 index 646ff6662b..0000000000 --- a/core/include/core/toolmanager.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef TOOLMANAGER_H -#define TOOLMANAGER_H - -#include "detachedtoolwindowmanager.h" -#include "pluginbase/toolmenuentry.h" -#include "scopy-core_export.h" -#include "toolmenu.h" -#include "toolstack.h" - -#include -#include - -namespace scopy { - -class SCOPY_CORE_EXPORT ToolManager : public QObject -{ - Q_OBJECT -public: - ToolManager(ToolMenu *tm, ToolStack *ts, DetachedToolWindowManager *dwm, QObject *parent = nullptr); - ~ToolManager(); - -public Q_SLOTS: - void addToolList(QString, QList); - void removeToolList(QString); - void changeToolListContents(QString, QList); - void showToolList(QString); - void hideToolList(QString); - void lockToolList(QString); - void unlockToolList(QString); - - void updateToolEntry(ToolMenuEntry *tme); - void updateToolEntry(); - void updateToolAttached(bool old); - - void updateTool(QWidget *old); - void showTool(QString id); - void toggleAttach(QString id); - -Q_SIGNALS: - void requestTool(QString id); - -private: - void saveToolAttachedState(ToolMenuEntry *tme); - void loadToolAttachedState(ToolMenuEntry *tme); - - typedef struct - { - QString id; - QList tools; - bool lock; - - } st; - QMap map; - QString currentKey; - QStringList lockedToolLists; - ToolMenu *tm; - ToolStack *ts; - DetachedToolWindowManager *dwm; -}; -} // namespace scopy - -#endif // TOOLMANAGER_H diff --git a/core/include/core/toolmenu.h b/core/include/core/toolmenu.h deleted file mode 100644 index bd31ae8806..0000000000 --- a/core/include/core/toolmenu.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2019 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef TOOLMENU_H -#define TOOLMENU_H - -#include "gui/basemenu.h" -#include "scopy-core_export.h" -#include "toolmenuitem.h" - -#include -#include -#include - -namespace scopy { -/** - * @brief The ToolMenu class - */ -class SCOPY_CORE_EXPORT ToolMenu : public BaseMenu -{ - Q_OBJECT -public: - explicit ToolMenu(QWidget *parent = nullptr); - ~ToolMenu(); - - ToolMenuItem *getToolMenuItemFor(QString toolId); - ToolMenuItem *addTool(QString id, QString name, QString icon, int position = -1); - ToolMenuItem *createTool(QString id, QString name, QString icon, int position = -1); - bool removeTool(QString id); - bool removeTool(ToolMenuItem *tmi); - - void hideMenuText(bool hidden); - const QVector &getTools() const; - - QButtonGroup *getButtonGroup() const; - -Q_SIGNALS: - void toggleAttach(QString); - void requestToolSelect(QString); - -public Q_SLOTS: - void detachSuccesful(QString); - void attachSuccesful(QString); - -private: - QVector tools; - QButtonGroup *buttonGroup; - -private Q_SLOTS: - void _updateToolList(short from, short to); - -private: - void _saveState(); - void _loadState(); -}; -} // namespace scopy - -#endif // TOOLMENU_H diff --git a/core/include/core/toolmenuitem.h b/core/include/core/toolmenuitem.h deleted file mode 100644 index eb8893c48d..0000000000 --- a/core/include/core/toolmenuitem.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2019 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef TOOLMENUITEM_H -#define TOOLMENUITEM_H - -#include "gui/basemenuitem.h" -#include "gui/customPushButton.h" -#include "scopy-core_export.h" - -namespace scopy { -/** - * @brief The ToolMenuItem class - */ -class SCOPY_CORE_EXPORT ToolMenuItem : public BaseMenuItem -{ - Q_OBJECT -public: - explicit ToolMenuItem(QString id, QString name, QString iconPath, QWidget *parent = nullptr); - virtual ~ToolMenuItem(); - - QPushButton *getToolBtn() const; - QPushButton *getToolRunBtn() const; - - void setToolEnabled(bool disabled); - void enableDoubleClick(bool enable); - void setSeparator(bool top, bool bot); - - bool eventFilter(QObject *watched, QEvent *event); - - void setName(QString str); - void hideText(bool hidden); - - const QString &getId() const; - -Q_SIGNALS: - void doubleclick(); - -public Q_SLOTS: - void setDisabled(bool disabled); - -protected: - void enterEvent(QEvent *event); - void leaveEvent(QEvent *event); - - void dragMoveEvent(QDragMoveEvent *event); - void dragLeaveEvent(QDragLeaveEvent *event); - - void mouseMoveEvent(QMouseEvent *event); - -private: - QPushButton *toolBtn; - CustomPushButton *toolRunBtn; - - QString id; - QString name; - QString iconPath; - -private: - void _buildUI(); -}; -} // namespace scopy -#endif // TOOLMENUITEM_H diff --git a/core/include/core/toolstack.h b/core/include/core/toolstack.h deleted file mode 100644 index 2894b96b8d..0000000000 --- a/core/include/core/toolstack.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef TOOLSTACK_H -#define TOOLSTACK_H - -#include "gui/mapstackedwidget.h" -#include "scopy-core_export.h" - -#include - -namespace Ui { -class SCOPY_CORE_EXPORT ToolStack; -} -/** - * @brief The ToolStack class - */ -namespace scopy { -class SCOPY_CORE_EXPORT ToolStack : public MapStackedWidget -{ - Q_OBJECT - -public: - explicit ToolStack(QWidget *parent = nullptr); - ~ToolStack(); -}; -} // namespace scopy - -#endif // TOOLSTACK_H diff --git a/core/include/core/translationsrepository.h b/core/include/core/translationsrepository.h deleted file mode 100644 index c132e28604..0000000000 --- a/core/include/core/translationsrepository.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef TRANSLATIONS_CONTROLLER -#define TRANSLATIONS_CONTROLLER - -#include "scopy-core_export.h" - -#include - -namespace scopy { -class SCOPY_CORE_EXPORT TranslationsRepository : public QObject -{ - Q_OBJECT -protected: - TranslationsRepository(QObject *parent = nullptr); - ~TranslationsRepository(); - -public: - static TranslationsRepository *GetInstance(); - QString getTranslationsPath(); - QStringList getLanguages(); - void loadTranslations(QString language); - -private: - static TranslationsRepository *pinstance_; -}; -} // namespace scopy - -#endif // TRANSLATIONS_CONTROLLER diff --git a/core/include/core/versioncheckmessage.h b/core/include/core/versioncheckmessage.h deleted file mode 100644 index 8eaa37d019..0000000000 --- a/core/include/core/versioncheckmessage.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2023 Analog Devices Inc. - * - * This file is part of Scopy - * (see https://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef SCOPY_VERSIONCHECKMESSAGE_H -#define SCOPY_VERSIONCHECKMESSAGE_H - -#include -#include - -#include - -namespace scopy { -class VersionCheckMessage : public QWidget -{ - Q_OBJECT - -public: - explicit VersionCheckMessage(QWidget *parent = nullptr); - ~VersionCheckMessage(); - -Q_SIGNALS: - void setCheckVersion(bool allowed); - -private Q_SLOTS: - void saveCheckVersion(bool allowed); -}; -} // namespace scopy - -#endif // SCOPY_VERSIONCHECKMESSAGE_H diff --git a/core/src/application_restarter.cpp b/core/src/application_restarter.cpp deleted file mode 100644 index 95ce205559..0000000000 --- a/core/src/application_restarter.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "application_restarter.h" - -#include -#include -#include - -#ifdef __ANDROID__ -#include -#endif - -using namespace scopy; - -ApplicationRestarter *ApplicationRestarter::pinstance_{nullptr}; - -ApplicationRestarter::ApplicationRestarter(const QString &executable) - : m_executable(executable) - , m_currentPath(QDir::currentPath()) - , m_restart(false) -{ - pinstance_ = this; -} - -ApplicationRestarter *ApplicationRestarter::GetInstance() { return pinstance_; } - -void ApplicationRestarter::setArguments(const QStringList &arguments) { m_arguments = arguments; } - -QStringList ApplicationRestarter::getArguments() const { return m_arguments; } - -int ApplicationRestarter::restart(int exitCode) -{ - if(m_restart) { -#ifdef __ANDROID__ - QAndroidJniObject activity = QtAndroid::androidActivity(); - activity.callMethod("restart"); -#else - QProcess::startDetached(m_executable, m_arguments, m_currentPath); -#endif - } - - return exitCode; -} - -void ApplicationRestarter::triggerRestart() -{ - GetInstance()->m_restart = true; - qApp->exit(); -} diff --git a/core/src/cmdlinehandler.cpp b/core/src/cmdlinehandler.cpp deleted file mode 100644 index cab148bced..0000000000 --- a/core/src/cmdlinehandler.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include "cmdlinehandler.h" - -using namespace scopy; - -FILE *CmdLineHandler::logFile_{nullptr}; -bool CmdLineHandler::tempLogFile_{false}; - -int CmdLineHandler::handle(QCommandLineParser &parser, ScopyMainWindow_API &scopyApi) -{ - bool acceptLicense = parser.isSet("accept-license"); - if(acceptLicense) { - scopyApi.acceptLicense(); - } - - QString param = parser.value("connect"); - if(!param.isEmpty()) { - QString deviceID = ""; - deviceID = scopyApi.addDevice("", param); - scopyApi.connectDevice(deviceID); - QString tool = parser.value("tool"); - if(!tool.isEmpty()) { - scopyApi.switchTool(deviceID, tool); - } - } - - bool keepRunning = parser.isSet("keep-running"); - if(keepRunning) { - qInfo() << "keep-running option is only useful with a script!"; - } - - QString scriptPath = parser.value("script"); - if(!scriptPath.isEmpty()) { - bool exitApp = !keepRunning; - QMetaObject::invokeMethod(&scopyApi, "runScript", Qt::QueuedConnection, Q_ARG(QString, scriptPath), - Q_ARG(bool, exitApp)); - } - - QStringList scriptListPath = parser.values("script-list"); - if(!scriptListPath.isEmpty()) { - bool exitApp = !keepRunning; - QMetaObject::invokeMethod(&scopyApi, "runScriptList", Qt::QueuedConnection, - Q_ARG(QStringList, scriptListPath), Q_ARG(bool, exitApp)); - } - return EXIT_SUCCESS; -} - -void CmdLineHandler::withLogFileOption(QCommandLineParser &parser) -{ - QString fileName = parser.value("logfile"); - if(fileName.isEmpty()) { - fileName = scopy::config::tempLogFilePath(); - tempLogFile_ = true; - } - logFile_ = fopen(fileName.toStdString().c_str(), "w"); - if(logFile_) { - qInstallMessageHandler(logOutputHandler); - } -} - -void CmdLineHandler::closeLogFile() -{ - if(logFile_) { - fclose(logFile_); - logFile_ = nullptr; - removeTempLogFile(); - } -} - -void CmdLineHandler::removeTempLogFile() -{ - if(tempLogFile_) { - QFile::remove(scopy::config::tempLogFilePath()); - } -} - -void CmdLineHandler::logOutputHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) -{ - QString message = qFormatLogMessage(type, context, msg); - fprintf(stderr, "%s\n", message.toStdString().c_str()); - if(logFile_) { - fprintf(logFile_, "%s\n", message.toStdString().c_str()); - } -} diff --git a/core/src/crashreport.cpp b/core/src/crashreport.cpp deleted file mode 100644 index 0212fac380..0000000000 --- a/core/src/crashreport.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "crashreport.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "logging_categories.h" - -Q_LOGGING_CATEGORY(CAT_CRASH_REPORT, "CrashReport") - -using namespace scopy; - -QString CrashReport::tmpFilePath_; - -void CrashReport::signalHandler(int) -{ - ::signal(SIGSEGV, SIG_DFL); - ::signal(SIGABRT, SIG_DFL); - qSetMessagePattern("[ " -#ifdef QCRITICAL_BACKTRACE_STR - QCRITICAL_BACKTRACE_STR " " -#endif -#ifdef QDEBUG_LOG_TIME - QDEBUG_LOG_TIME_STR -#endif - " ] " - " - " - "%{message}"); - - qCritical(CAT_CRASH_REPORT) << "Scopy finished with error\n"; -} - -void CrashReport::initSignalHandler() -{ - tmpFilePath_ = scopy::config::tempLogFilePath(); - QString qd = scopy::config::settingsFolderPath(); - - QFileInfo previousLog(tmpFilePath_); - - if(previousLog.exists()) { - qInfo(CAT_CRASH_REPORT) << "Found existing crash stack trace"; - QString dumpDateAndTime = - previousLog.lastModified().toString(Qt::ISODate).replace("T", "--").replace(":", "-"); - QString currentLog = QDir::cleanPath(qd + "/" + "ScopyCrashDump--" + dumpDateAndTime + ".log"); - bool renamed = QFile::rename(previousLog.filePath(), currentLog); - if(renamed) { - qInfo(CAT_CRASH_REPORT) << "Successfully renamed crash log to: " << currentLog; - } - QFile::remove(tmpFilePath_); - } - - signal(SIGILL, &signalHandler); - signal(SIGSEGV, &signalHandler); - signal(SIGABRT, &signalHandler); - signal(SIGFPE, &signalHandler); -} diff --git a/core/src/detachedtoolwindow.cpp b/core/src/detachedtoolwindow.cpp deleted file mode 100644 index 1949e7a630..0000000000 --- a/core/src/detachedtoolwindow.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "detachedtoolwindow.h" - -#include -#include -#include -#include - -#include - -Q_LOGGING_CATEGORY(CAT_DETACHEDTOOL, "DetachedToolWindow") - -using namespace scopy; -DetachedToolWindow::DetachedToolWindow(QWidget *parent, ToolMenuEntry *tme) - : QWidget(parent) -{ - - this->tme = tme; - - QHBoxLayout *lay = new QHBoxLayout(this); - lay->setSpacing(0); - lay->setMargin(0); - w = tme->tool(); - setWindowIcon(QApplication::windowIcon()); - setWindowTitle("Scopy - " + tme->pluginName() + " - " + tme->name()); - - lay->addWidget(w); - loadToolGeometry(tme, this); - tme->tool()->show(); - show(); -} - -DetachedToolWindow::~DetachedToolWindow() -{ - saveToolGeometry(tme, this); - w->setParent(nullptr); -} - -void DetachedToolWindow::closeEvent(QCloseEvent *event) -{ - saveToolGeometry(tme, w); - tme->setAttached(true); -} - -void DetachedToolWindow::saveToolGeometry(ToolMenuEntry *tme, QWidget *w) -{ - Preferences *p = Preferences::GetInstance(); - if(!p->get("general_save_attached").toBool()) - return; - QString prefId; - if(w) { - prefId = tme->id() + "_geometry"; - QRect geometry = w->geometry(); - p->set(prefId, geometry); - qDebug(CAT_DETACHEDTOOL) << "Saving " << prefId << " " << geometry; - } -} - -void DetachedToolWindow::loadToolGeometry(ToolMenuEntry *tme, QWidget *w) -{ - Preferences *p = Preferences::GetInstance(); - if(!p->get("general_save_attached").toBool()) - return; - QString prefId; - - if(w && !tme->attached()) { - prefId = tme->id() + "_geometry"; - QRect geometry = p->get(prefId).toRect(); - if(!geometry.isNull()) - w->setGeometry(geometry); - - qDebug(CAT_DETACHEDTOOL) << "Loading " << prefId << tme->tool()->geometry(); - } -} - -#include "moc_detachedtoolwindow.cpp" diff --git a/core/src/detachedtoolwindowmanager.cpp b/core/src/detachedtoolwindowmanager.cpp deleted file mode 100644 index 440e151a35..0000000000 --- a/core/src/detachedtoolwindowmanager.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "detachedtoolwindowmanager.h" - -using namespace scopy; - -DetachedToolWindowManager::DetachedToolWindowManager(QObject *parent) - : QObject(parent) -{} - -DetachedToolWindowManager::~DetachedToolWindowManager() {} - -void DetachedToolWindowManager::add(QString id, ToolMenuEntry *tme) -{ - if(map.contains(id)) { - delete map.take(id); - } - map.insert(id, new DetachedToolWindow(nullptr, tme)); -} - -bool DetachedToolWindowManager::remove(QString id) -{ - if(map.contains(id)) { - delete map.take(id); - return true; - } - return false; -} - -void DetachedToolWindowManager::show(QString id) -{ - if(map.contains(id)) { - map[id]->raise(); - map[id]->show(); - } -} - -QWidget *DetachedToolWindowManager::getWidget(QString key) -{ - if(map.contains(key)) - return map[key]; - return nullptr; -} - -bool DetachedToolWindowManager::contains(QString key) { return map.contains(key); } - -#include "moc_detachedtoolwindowmanager.cpp" diff --git a/core/src/devicebrowser.cpp b/core/src/devicebrowser.cpp deleted file mode 100644 index f04dd86b41..0000000000 --- a/core/src/devicebrowser.cpp +++ /dev/null @@ -1,233 +0,0 @@ -#include "devicebrowser.h" - -#include "deviceicon.h" -#include "deviceiconimpl.h" -#include "dynamicWidget.h" -#include "stylehelper.h" - -#include "ui_devicebrowser.h" - -#include -#include - -Q_LOGGING_CATEGORY(CAT_DEVBROWSER, "DeviceBrowser") - -using namespace scopy; -DeviceBrowser::DeviceBrowser(QWidget *parent) - : QWidget(parent) - , ui(new Ui::DeviceBrowser) -{ - qDebug(CAT_DEVBROWSER) << "ctor"; - ui->setupUi(this); - this->setFixedHeight(185); - - auto dbm = ui->wDeviceBrowserMenu; - layout = new QHBoxLayout(dbm); - - initBtns(); - - connect(ui->btnHome, SIGNAL(clicked()), this, SLOT(forwardRequestDeviceWithDirection())); - connect(ui->btnAdd, SIGNAL(clicked()), this, SLOT(forwardRequestDeviceWithDirection())); - connect(this, SIGNAL(requestDevice(QString, int)), this, SLOT(updateSelectedDeviceIdx(QString))); -} - -DeviceBrowser::~DeviceBrowser() -{ - qDebug(CAT_DEVBROWSER) << "dtor"; - delete ui; -} - -void DeviceBrowser::initBtns() -{ - StyleHelper::FrameBackgroundShadow(ui->containerHome); - StyleHelper::FrameBackgroundShadow(ui->containerAdd); - - bg = new QButtonGroup(this); - - bg->addButton(ui->btnAdd); - bg->addButton(ui->btnHome); - ui->btnHome->setProperty(devBrowserId, "home"); - ui->btnAdd->setProperty(devBrowserId, "add"); - list.append(ui->btnHome); - list.append(ui->btnAdd); - ui->btnHome->setChecked(true); - setDynamicProperty(ui->containerHome, "selected", true); // select home shadow on init - currentIdx = 0; -} - -QAbstractButton *DeviceBrowser::getDeviceWidgetFor(QString id) -{ - for(auto &&w : list) { - if(w->property(devBrowserId) == id) - return w; - } - - return nullptr; -} - -void DeviceBrowser::addDevice(QString id, Device *d, int position) -{ - qInfo(CAT_DEVBROWSER) << "adding device " << id; - auto w = dynamic_cast(buildDeviceIcon(d, this)); - w->setProperty(devBrowserId, id); - layout->insertWidget(position, w); - bg->addButton(w); - if(position == -1) - list.append(w); - else - list.insert(position, w); - - connect(w, &QAbstractButton::clicked, this, &DeviceBrowser::forwardRequestDeviceWithDirection); -} - -void DeviceBrowser::removeDevice(QString id) -{ - qInfo(CAT_DEVBROWSER) << "removing device " << id; - QAbstractButton *w = getDeviceWidgetFor(id); - layout->removeWidget(w); - bg->removeButton(w); - int idx = getIndexOfId(id); - list.removeAt(idx); - disconnect(w, &QAbstractButton::clicked, this, nullptr); // disconnect all signals connected to this instance - delete(w); - - if(currentIdx == idx) { // removed currently selected device - currentIdx = 0; - Q_EMIT requestDevice("home", -1); - } else if(currentIdx > idx) { - currentIdx--; - } -} - -int DeviceBrowser::getIndexOfId(QString k) -{ - for(int i = 0; i < list.size(); i++) { - if(list[i]->property(devBrowserId) == k) - return i; - } - return -1; -} - -QString DeviceBrowser::getIdOfIndex(int idx) { return (list[idx]->property(devBrowserId).toString()); } - -void DeviceBrowser::nextDevice() -{ - int maxIdx = list.size(); - int nextIdx = currentIdx; - - do { // find next visible and enabled button - nextIdx = (nextIdx + 1) % maxIdx; - nextIdx = (nextIdx < 0) ? nextIdx + maxIdx : nextIdx; // wrap around negative - } while(!(list.at(nextIdx)->isVisible() && list.at(nextIdx)->isEnabled())); - - QString nextId = getIdOfIndex(nextIdx); - Q_EMIT requestDevice(nextId, 1); // start animation - list[nextIdx]->setChecked(true); // set checked afterwards -} - -void DeviceBrowser::prevDevice() -{ - int maxIdx = list.size(); - int nextIdx = currentIdx; - - do { // find next visible and enabled button - nextIdx = (nextIdx - 1) % maxIdx; - nextIdx = (nextIdx < 0) ? nextIdx + maxIdx : nextIdx; // wrap around negative - } while(!(list.at(nextIdx)->isVisible() && list.at(nextIdx)->isEnabled())); - - QString nextId = getIdOfIndex(nextIdx); - Q_EMIT requestDevice(nextId, -1); // start animation - list[nextIdx]->setChecked(true); // set checked afterwards -} - -void DeviceBrowser::forwardRequestDeviceWithDirection() -{ - QString id = QObject::sender()->property(devBrowserId).toString(); - int idx = getIndexOfId(id); - int direction = currentIdx - idx; - Q_EMIT requestDevice(id, direction); -} - -void DeviceBrowser::updateSelectedDeviceIdx(QString k) -{ - int prevIdx = currentIdx; // local, just for debug - currentIdx = getIndexOfId(k); - - QWidget *prevDevice = getDeviceWidgetFor(getIdOfIndex(prevIdx)); - QWidget *currentDevice = getDeviceWidgetFor(getIdOfIndex(currentIdx)); - - // hackish -- the btnHome and btnAdd already have a background color so their container must display the shadow - if(currentDevice == ui->btnHome) - currentDevice = ui->containerHome; - - if(currentDevice == ui->btnAdd) - currentDevice = ui->containerAdd; - - if(prevDevice == ui->btnHome) - prevDevice = ui->containerHome; - - if(prevDevice == ui->btnAdd) - prevDevice = ui->containerAdd; - - setDynamicProperty(prevDevice, "selected", false); - setDynamicProperty(currentDevice, "selected", true); - - qDebug(CAT_DEVBROWSER) << "prev: " - << "[" << prevIdx << "] -" << getIdOfIndex(prevIdx) << "-> current: " - << "[" << currentIdx << "] -" << getIdOfIndex(currentIdx); -} - -void DeviceBrowser::connectDevice(QString id) -{ - auto w = dynamic_cast(getDeviceWidgetFor(id)); - w->setConnected(true); -} - -void DeviceBrowser::disconnectDevice(QString id) -{ - auto w = dynamic_cast(getDeviceWidgetFor(id)); - w->setConnected(false); -} - -DeviceIcon *DeviceBrowser::buildDeviceIcon(Device *d, QWidget *parent) { return new DeviceIconImpl(d, parent); } - -/* - auto &&is = ui->wInfoPageStack; - auto &&hc = is->getHomepageControls(); - - is->add("home",new ScopyHomeInfoPage()); - is->add("add", new ScopyHomeAddPage()); - is->add("dev1", new QLabel("dev1")); - is->add("dev2", new QLabel("dev2")); - - auto &&db = ui->wDeviceBrowser; - QPushButton *w1 = new QPushButton("dev1"); - QPushButton *w2 = new QPushButton("dev2"); - w1->setCheckable(true); - w2->setCheckable(true); - db->addDevice("dev1",w1); - db->addDevice("dev2",w2); - w1->setVisible(false); - */ - -/* - ui->setupUi(this); - auto &&is = ui->wInfoPageStack; - auto &&hc = is->getHomepageControls(); - - is->add("home",new ScopyHomeInfoPage()); - is->add("add", new ScopyHomeAddPage()); - is->add("dev1", new QLabel("dev1")); - is->add("dev2", new QLabel("dev2")); - - auto &&db = ui->wDeviceBrowser; - DeviceIcon *w1 = new DeviceIcon("dev1","uri",this); - DeviceIcon *w2 = new DeviceIcon("dev2","uri2",this); - w1->setCheckable(true); - w2->setCheckable(true); - db->addDevice("dev1",w1); - db->addDevice("dev2",w2); - w1->setVisible(false); - */ - -#include "moc_devicebrowser.cpp" diff --git a/core/src/devicefactory.cpp b/core/src/devicefactory.cpp deleted file mode 100644 index 640e2ce25f..0000000000 --- a/core/src/devicefactory.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "devicefactory.h" - -#include "iiodeviceimpl.h" - -using namespace scopy; - -DeviceImpl *DeviceFactory::build(QString param, PluginManager *pm, QString category, QObject *parent) -{ - QString cat = category.toLower(); - if(cat.compare("iio") == 0) { - return new IIODeviceImpl(param, pm, parent); - } else { - return new DeviceImpl(param, pm, category, parent); - } -} - -#include "moc_devicefactory.cpp" diff --git a/core/src/deviceiconimpl.cpp b/core/src/deviceiconimpl.cpp deleted file mode 100644 index 8942bdc241..0000000000 --- a/core/src/deviceiconimpl.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "deviceiconimpl.h" - -#include "gui/dynamicWidget.h" -#include "stylehelper.h" - -#include "ui_devicebutton.h" - -#include -#include -#include -#include - -using namespace scopy; -DeviceIconImpl::DeviceIconImpl(Device *d, QWidget *parent) - : DeviceIcon{parent} -{ - ui = new Ui::DeviceButton; - ui->setupUi(this); - StyleHelper::DeviceIconBackgroundShadow(this); - ui->description->setText(d->displayParam()); - ui->name->setText(d->displayName()); - ui->iconPlaceHolder->layout()->addWidget(d->icon()); - ui->iconPlaceHolder->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - - setCheckable(true); -} - -void DeviceIconImpl::setConnected(bool val) -{ - setDynamicProperty(ui->line, "connected", val); - // ensurePolished(); -} - -DeviceIconImpl::~DeviceIconImpl() {} - -#include "moc_deviceiconimpl.cpp" diff --git a/core/src/deviceimpl.cpp b/core/src/deviceimpl.cpp deleted file mode 100644 index dd6fc2002e..0000000000 --- a/core/src/deviceimpl.cpp +++ /dev/null @@ -1,391 +0,0 @@ -#include "deviceimpl.h" - -#include "logging_categories.h" -#include "pluginbase/preferences.h" -#include "qboxlayout.h" -#include "qpushbutton.h" -#include "qscrollarea.h" - -#include "ui_devicepage.h" - -#include -#include -#include -#include -#include - -#include -#include - -Q_LOGGING_CATEGORY(CAT_DEVICEIMPL, "Device") - -namespace scopy { -DeviceImpl::DeviceImpl(QString param, PluginManager *p, QString category, QObject *parent) - : QObject{parent} - , m_param(param) - , m_category(category) - , p(p) -{ - m_id = "dev_" + category + "_" + param + "_" + scopy::config::getUuid(); - qDebug(CAT_DEVICEIMPL) << m_param << "ctor"; -} - -void DeviceImpl::init() -{ - QElapsedTimer timer; - timer.start(); - m_plugins = p->getCompatiblePlugins(m_param, m_category); - for(Plugin *p : qAsConst(m_plugins)) { - QObject *obj = dynamic_cast(p); - if(obj) { - obj->setParent(this); - } else { - qWarning(CAT_DEVICEIMPL, "Plugin not a QObject"); - } - } - qInfo(CAT_BENCHMARK) << this->displayName() << " init took: " << timer.elapsed() << "ms"; -} - -void DeviceImpl::preload() -{ - for(auto &p : m_plugins) { - p->preload(); - } -} - -void DeviceImpl::loadPlugins() -{ - QElapsedTimer timer; - timer.start(); - removeDisabledPlugins(); - preload(); - loadName(); - loadIcons(); - loadBadges(); - loadPages(); - loadToolList(); - if(m_plugins.isEmpty()) { - connbtn->hide(); - } - for(auto &p : m_plugins) { - connect(dynamic_cast(p), SIGNAL(connectDevice()), this, SLOT(connectDev())); - connect(dynamic_cast(p), SIGNAL(disconnectDevice()), this, SLOT(disconnectDev())); - connect(dynamic_cast(p), SIGNAL(toolListChanged()), this, SIGNAL(toolListChanged())); - connect(dynamic_cast(p), SIGNAL(restartDevice()), this, SIGNAL(requestedRestart())); - connect(dynamic_cast(p), SIGNAL(requestToolByUuid(QString)), this, - SIGNAL(requestTool(QString))); - p->postload(); - } - qInfo(CAT_BENCHMARK) << this->displayName() << " plugins load took: " << timer.elapsed() << "ms"; -} - -void DeviceImpl::unloadPlugins() -{ - QElapsedTimer timer; - timer.start(); - QList::const_iterator pI = m_plugins.constEnd(); - while(pI != m_plugins.constBegin()) { - --pI; - disconnect(dynamic_cast(*pI), SIGNAL(connectDevice()), this, SLOT(connectDev())); - disconnect(dynamic_cast(*pI), SIGNAL(disconnectDevice()), this, SLOT(disconnectDev())); - disconnect(dynamic_cast(*pI), SIGNAL(toolListChanged()), this, SIGNAL(toolListChanged())); - disconnect(dynamic_cast(*pI), SIGNAL(restartDevice()), this, SIGNAL(requestedRestart())); - disconnect(dynamic_cast(*pI), SIGNAL(requestToolByUuid(QString)), this, - SIGNAL(requestTool(QString))); - (*pI)->unload(); - delete(*pI); - } - m_plugins.clear(); - qInfo(CAT_BENCHMARK) << this->displayName() << " plugins unload took: " << timer.elapsed() << "ms"; -} - -bool DeviceImpl::verify() { return true; } - -QMap DeviceImpl::readDeviceInfo() -{ - QMap map; - return map; -} - -void DeviceImpl::removeDisabledPlugins() -{ - QMutableListIterator i(m_plugins); - while(i.hasNext()) { - if(i.next()->enabled() == false) - i.remove(); - } -} - -void DeviceImpl::loadName() -{ - if(m_plugins.count()) { - m_displayName = m_plugins[0]->displayName(); - m_displayParam = m_plugins[0]->displayParam(); - } else { - m_displayName = "NO_PLUGIN"; - } -} - -void DeviceImpl::loadIcons() -{ - m_icon = new QWidget(); - m_icon->setFixedHeight(100); - m_icon->setFixedWidth(100); - new QHBoxLayout(m_icon); - for(auto &p : m_plugins) { - if(p->loadIcon()) { - m_icon->layout()->addWidget(p->icon()); - return; - } - } - - new QLabel("No PLUGIN", m_icon); -} - -void DeviceImpl::loadPages() -{ - m_page = new QWidget(); - Ui::DevicePage *ui = new Ui::DevicePage(); - ui->setupUi(m_page); - - m_page->setProperty("device_page", true); - connbtn = new QPushButton("Connect", m_page); - discbtn = new QPushButton("Disconnect", m_page); - auto m_buttonLayout = ui->m_buttonLayout; - auto m_scrollArea = ui->m_scrollArea; - auto m_scrollAreaContents = ui->m_scrollAreaContents; - auto m_scrollAreaLayout = ui->m_scrollAreaLayout; - - connbtn->setProperty("device_page", true); - connbtn->setProperty("blue_button", true); - connbtn->setAutoDefault(true); - m_buttonLayout->addWidget(connbtn); - - discbtn->setProperty("device_page", true); - discbtn->setProperty("blue_button", true); - discbtn->setAutoDefault(true); - m_buttonLayout->addWidget(discbtn); - discbtn->setVisible(false); - - connect(connbtn, &QPushButton::clicked, this, &DeviceImpl::connectDev); - connect(discbtn, &QPushButton::clicked, this, &DeviceImpl::disconnectDev); - connect(this, &DeviceImpl::connectionFailed, this, &DeviceImpl::onConnectionFailed); - - for(auto &&p : plugins()) { - if(p->loadExtraButtons()) { - for(auto &&b : p->extraButtons()) { - b->setProperty("blue_button", true); - b->setProperty("device_page", true); - m_buttonLayout->addWidget(b); - } - } - } - m_buttonLayout->addSpacerItem(new QSpacerItem(40, 40, QSizePolicy::Expanding)); - - for(auto &&p : plugins()) { - if(p->loadPage()) { - m_scrollAreaLayout->addWidget(p->page()); - } - } -} - -void DeviceImpl::loadToolList() -{ - for(auto &&p : m_plugins) { - p->loadToolList(); - } -} - -void DeviceImpl::loadBadges() -{ - QPushButton *forgetBtn = new QPushButton(); - forgetBtn->setMaximumSize(25, 25); - forgetBtn->setIcon(QIcon(":/gui/icons/orange_close.svg")); - connect(forgetBtn, &QPushButton::clicked, this, &DeviceImpl::forget); - HoverWidget *forgetHover = new HoverWidget(forgetBtn, m_icon, m_icon); - forgetHover->setStyleSheet("background-color: transparent; border: 0px;"); - forgetHover->setAnchorPos(HoverPosition::HP_BOTTOMRIGHT); - forgetHover->setContentPos(HoverPosition::HP_TOPLEFT); - forgetHover->setVisible(true); - forgetHover->raise(); - - QPushButton *warningBtn = new QPushButton(); - warningBtn->setMaximumSize(25, 25); - warningBtn->setIcon(QIcon(":/gui/icons/warning.svg")); - warningBtn->setToolTip(tr("The device is not available!\n" - "Verify the connection!")); - HoverWidget *warningHover = new HoverWidget(warningBtn, m_icon, m_icon); - warningHover->setStyleSheet("background-color: transparent; border: 0px;"); - warningHover->setAnchorPos(HoverPosition::HP_TOPRIGHT); - warningHover->setContentPos(HoverPosition::HP_BOTTOMLEFT); - warningHover->raise(); - connect(this, &DeviceImpl::connectionFailed, warningHover, &HoverWidget::show); - connect(this, &DeviceImpl::connected, warningHover, &HoverWidget::hide); -} - -void DeviceImpl::setPingPlugin(Plugin *plugin) -{ - if(!m_pingPlugin && plugin->pingTask()) { - m_pingPlugin = plugin; - } -} - -void DeviceImpl::bindPing() -{ - if(!m_pingPlugin) { - return; - } - for(auto &&p : m_connectedPlugins) { - connect(dynamic_cast(p), SIGNAL(pausePingTask(bool)), dynamic_cast(m_pingPlugin), - SLOT(onPausePingTask(bool))); - } - connect(m_pingPlugin->pingTask(), &PingTask::pingFailed, this, &DeviceImpl::disconnectDev); - m_pingPlugin->startPingTask(); -} - -void DeviceImpl::unbindPing() -{ - if(!m_pingPlugin) { - return; - } - for(auto &&p : m_connectedPlugins) { - disconnect(dynamic_cast(p), SIGNAL(pausePingTask(bool)), - dynamic_cast(m_pingPlugin), SLOT(onPausePingTask(bool))); - } - m_pingPlugin->stopPingTask(); - disconnect(m_pingPlugin->pingTask(), &PingTask::pingFailed, this, &DeviceImpl::disconnectDev); - m_pingPlugin = nullptr; -} - -void DeviceImpl::onConnectionFailed() { disconnectDev(); } - -QList DeviceImpl::plugins() const { return m_plugins; } - -void DeviceImpl::showPage() -{ - for(auto &&p : m_plugins) - p->showPageCallback(); - if(connbtn->isHidden()) { - discbtn->setFocus(); - } else { - connbtn->setFocus(); - } -} - -void DeviceImpl::hidePage() -{ - for(auto &&p : m_plugins) - p->hidePageCallback(); -} - -void DeviceImpl::save(QSettings &s) -{ - for(Plugin *p : qAsConst(m_plugins)) { - s.beginGroup(p->name()); - p->saveSettings(s); - s.endGroup(); - } -} - -void DeviceImpl::load(QSettings &s) -{ - for(Plugin *p : qAsConst(m_plugins)) { - s.beginGroup(p->name()); - p->loadSettings(s); - s.endGroup(); - } -} - -void DeviceImpl::connectDev() -{ - QElapsedTimer pluginTimer; - QElapsedTimer timer; - timer.start(); - Preferences *pref = Preferences::GetInstance(); - bool disconnectDevice = false; - for(auto &&p : m_plugins) { - pluginTimer.start(); - bool pluginConnectionSucceeded = p->onConnect(); - qInfo(CAT_BENCHMARK) << p->name() << " connection took: " << pluginTimer.elapsed() << "ms"; - if(pluginConnectionSucceeded) { - if(pref->get("general_save_session").toBool()) { - QSettings s = QSettings(scopy::config::settingsFolderPath() + "/" + p->name() + ".ini", - QSettings::IniFormat); - p->loadSettings(s); - } - m_connectedPlugins.push_back(p); - setPingPlugin(p); - } else { - disconnectDevice = p->metadata().value("disconnectDevOnConnectFailure").toBool(); - if(disconnectDevice) { - break; - } - } - } - if(disconnectDevice || m_connectedPlugins.isEmpty()) { - Q_EMIT connectionFailed(); - } else { - connbtn->hide(); - discbtn->show(); - discbtn->setFocus(); - bindPing(); - Q_EMIT connected(); - } - qInfo(CAT_BENCHMARK) << this->displayName() << " device connection took: " << timer.elapsed() << "ms"; -} - -void DeviceImpl::disconnectDev() -{ - QElapsedTimer pluginTimer; - QElapsedTimer timer; - timer.start(); - unbindPing(); - connbtn->show(); - discbtn->hide(); - Preferences *pref = Preferences::GetInstance(); - for(auto &&p : m_connectedPlugins) { - if(pref->get("general_save_session").toBool()) { - QSettings s = QSettings(scopy::config::settingsFolderPath() + "/" + p->name() + ".ini", - QSettings::IniFormat); - p->saveSettings(s); - } - pluginTimer.start(); - p->onDisconnect(); - qInfo(CAT_BENCHMARK) << p->name() << " disconnection took: " << pluginTimer.elapsed() << "ms"; - } - m_connectedPlugins.clear(); - connbtn->setFocus(); - Q_EMIT disconnected(); - qInfo(CAT_BENCHMARK) << this->displayName() << " device disconnection took: " << timer.elapsed() << "ms"; -} - -DeviceImpl::~DeviceImpl() { qDebug(CAT_DEVICEIMPL) << m_id << "dtor"; } - -QString DeviceImpl::id() { return m_id; } - -QString DeviceImpl::displayName() { return m_displayName; } - -QString DeviceImpl::category() { return m_category; } - -QString DeviceImpl::displayParam() { return m_displayParam; } - -QString DeviceImpl::param() { return m_param; } - -QWidget *DeviceImpl::icon() { return m_icon; } - -QWidget *DeviceImpl::page() { return m_page; } - -QList DeviceImpl::toolList() -{ - static int i; - QList ret; - - for(auto &&p : m_plugins) { - ret.append(p->toolList()); - } - return ret; -} - -} // namespace scopy - -#include "moc_deviceimpl.cpp" diff --git a/core/src/deviceloader.cpp b/core/src/deviceloader.cpp deleted file mode 100644 index 63ba94681b..0000000000 --- a/core/src/deviceloader.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "deviceloader.h" - -#include - -using namespace scopy; - -DeviceLoader::DeviceLoader(DeviceImpl *d, QObject *parent) - : d(d) - , QObject(parent) -{} - -DeviceLoader::~DeviceLoader() {} - -void DeviceLoader::init(bool async) -{ - if(async) { - asyncInit(); - } else { - syncInit(); - } -} - -void DeviceLoader::asyncInit() -{ - QThread *th = QThread::create([=] { - // initializer thread - d->init(); - }); - oldParent = d->parent(); - d->setParent(nullptr); - d->moveToThread(th); - - connect( - th, &QThread::destroyed, this, - [=]() { - ; - // back to main thread - d->moveToThread(QThread::currentThread()); - d->setParent(oldParent); - Q_EMIT initialized(); - }, - Qt::QueuedConnection); - connect(th, &QThread::finished, th, &QThread::deleteLater); - - th->start(); -} - -void DeviceLoader::syncInit() -{ - d->init(); - Q_EMIT initialized(); -} - -#include "moc_deviceloader.cpp" diff --git a/core/src/devicemanager.cpp b/core/src/devicemanager.cpp deleted file mode 100644 index 72989185a3..0000000000 --- a/core/src/devicemanager.cpp +++ /dev/null @@ -1,210 +0,0 @@ -#include "devicemanager.h" - -#include "QApplication" -#include "devicefactory.h" -#include "deviceimpl.h" -#include "deviceloader.h" -#include "pluginbase/statusbarmanager.h" - -#include -#include -#include -#include - -Q_LOGGING_CATEGORY(CAT_DEVICEMANAGER, "DeviceManager") -using namespace scopy; -DeviceManager::DeviceManager(PluginManager *pm, QObject *parent) - : QObject{parent} - , pm(pm) -{ - - connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(disconnectAll())); -} - -DeviceManager::~DeviceManager() {} - -Device *DeviceManager::getDevice(QString id) -{ - - Device *d = nullptr; - if(map.contains(id)) { - d = map.value(id, nullptr); - } - return d; -} - -void DeviceManager::addDevice(Device *d) -{ - - DeviceImpl *di = dynamic_cast(d); - QString id = d->id(); - map[id] = d; - di->setParent(this); - di->loadPlugins(); - connectDeviceToManager(di); - Q_EMIT deviceAdded(id, d); -} - -QString DeviceManager::createDevice(QString category, QString param, bool async) -{ - qInfo(CAT_DEVICEMANAGER) << category << "device with params" << param << "added"; - Q_EMIT deviceAddStarted(param); - - DeviceImpl *d = DeviceFactory::build(param, pm, category); - DeviceLoader *dl = new DeviceLoader(d, this); - - connect(dl, &DeviceLoader::initialized, this, - [=]() { addDevice(d); }); // add device to manager once it is initialized - connect(dl, &DeviceLoader::initialized, dl, - &QObject::deleteLater); // don't forget to delete loader once we're done - dl->init(async); - - return d->id(); -} - -// This is only used by scan context collector - should I rethink this ? -// Map all devices to uris in scan context collector -void DeviceManager::removeDevice(QString category, QString param) -{ - - for(Device *d : qAsConst(map)) { - if(d->category() == category && d->param() == param) { - removeDeviceById(d->id()); - return; - } - } -} - -void DeviceManager::removeDeviceById(QString id) -{ - Device *d = nullptr; - - if(connectedDev.contains(id)) { - getDevice(id)->disconnectDev(); - } - - if(!map.contains(id)) { - qWarning(CAT_DEVICEMANAGER) << id << "Device does not exist"; - return; - } - d = map.take(id); - Q_EMIT deviceRemoveStarted(id, d); - - disconnectDeviceFromManager(dynamic_cast(d)); - d->unloadPlugins(); - delete(d); - - qInfo(CAT_DEVICEMANAGER) << "device" << id << "removed"; - - Q_EMIT deviceRemoved(id); -} - -void DeviceManager::connectDeviceToManager(DeviceImpl *d) -{ - connect(d, &DeviceImpl::connected, this, [=]() { connectDevice(d->id()); }); - connect(d, &DeviceImpl::disconnected, this, [=]() { disconnectDevice(d->id()); }); - connect(d, &DeviceImpl::forget, this, [=]() { removeDeviceById(d->id()); }); - connect(d, SIGNAL(requestedRestart()), this, SLOT(restartDevice())); - connect(d, SIGNAL(toolListChanged()), this, SLOT(changeToolListDevice())); - connect(d, SIGNAL(requestTool(QString)), this, SIGNAL(requestTool(QString))); -} -void DeviceManager::disconnectDeviceFromManager(DeviceImpl *d) -{ - disconnect(d, SIGNAL(connected())); - disconnect(d, SIGNAL(disconnected())); - disconnect(d, SIGNAL(forget())); - disconnect(d, SIGNAL(requestedRestart()), this, SLOT(restartDevice())); - disconnect(d, SIGNAL(toolListChanged()), this, SLOT(changeToolListDevice())); - disconnect(d, SIGNAL(requestTool(QString)), this, SIGNAL(requestTool(QString))); -} - -QString DeviceManager::restartDevice(QString id) -{ - QString cat = map[id]->category(); - QString params = map[id]->param(); - removeDeviceById(id); - QString newId = createDevice(cat, params); - return newId; -} - -void DeviceManager::disconnectAll() -{ - for(const QString &d : qAsConst(connectedDev)) { - map[d]->disconnectDev(); - } -} - -void DeviceManager::save(QSettings &s) -{ - for(const QString &d : qAsConst(connectedDev)) { - map[d]->save(s); - } -} - -void DeviceManager::load(QSettings &s) -{ - for(const QString &d : qAsConst(connectedDev)) { - map[d]->load(s); - } -} - -void DeviceManager::changeToolListDevice() -{ - QString id = dynamic_cast(QObject::sender())->id(); - Q_EMIT deviceChangedToolList(id, map[id]->toolList()); -} - -void DeviceManager::connectDevice() -{ - QString id = dynamic_cast(QObject::sender())->id(); - connectDevice(id); -} - -void DeviceManager::connectDevice(QString id) -{ - qDebug(CAT_DEVICEMANAGER) << "connecting " << id << "..."; - if(connectedDev.contains(id)) { - qDebug(CAT_DEVICEMANAGER) << "connecting to the same device, disconnecting first .. "; - map[id]->disconnectDev(); - } - if(exclusive) { - if(connectedDev.size() > 0) { - qDebug(CAT_DEVICEMANAGER) << "exclusive mode, disconnecting all connected devices .. "; - for(int i = 0; i < connectedDev.count(); i++) - map[connectedDev[i]]->disconnectDev(); - } - } - - connectedDev.append(id); - StatusBarManager::pushMessage("Connected to " + map[id]->id(), 3000); - Q_EMIT deviceConnected(id, map[id]); -} - -void DeviceManager::disconnectDevice() -{ - QString id = dynamic_cast(QObject::sender())->id(); - disconnectDevice(id); -} - -void DeviceManager::disconnectDevice(QString id) -{ - qDebug(CAT_DEVICEMANAGER) << "disconnecting " << id << "..."; - connectedDev.removeOne(id); - StatusBarManager::pushMessage("Disconnected from " + map[id]->id(), 3000); - Q_EMIT requestTool("home"); - Q_EMIT deviceDisconnected(id, map[id]); -} - -void DeviceManager::setExclusive(bool val) { exclusive = val; } -bool DeviceManager::getExclusive() const { return exclusive; } - -void DeviceManager::restartDevice() -{ - QString id = dynamic_cast(QObject::sender())->id(); - qDebug(CAT_DEVICEMANAGER) << "restarting " << id << "..."; - QString newId = restartDevice(id); - // connect(this,SIGNAL(deviceAdded(QString,Device*)),this,SIGNAL(requestDevice(QString))); - // Q_EMIT requestDevice(newId); -} - -#include "moc_devicemanager.cpp" diff --git a/core/src/emuwidget.cpp b/core/src/emuwidget.cpp deleted file mode 100644 index b2ca224611..0000000000 --- a/core/src/emuwidget.cpp +++ /dev/null @@ -1,311 +0,0 @@ -#include "emuwidget.h" - -#include "pluginbase/preferences.h" - -#include -#include -#include -#include - -#include - -Q_LOGGING_CATEGORY(CAT_EMU_ADD_PAGE, "EmuAddPage") -using namespace scopy; - -EmuWidget::EmuWidget(QWidget *parent) - : QWidget(parent) - , m_enableDemo(false) - , m_emuProcess(nullptr) -{ - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setSpacing(10); - setLayout(layout); - QWidget *vWidget = new QWidget(this); - QVBoxLayout *vLay = new QVBoxLayout(vWidget); - vLay->setSpacing(10); - vLay->setMargin(0); - vWidget->setLayout(vLay); - - m_emuWidget = new QWidget(vWidget); - QGridLayout *emuWidgetLay = new QGridLayout(m_emuWidget); - emuWidgetLay->setSpacing(10); - emuWidgetLay->setMargin(0); - - QLabel *demoLabel = new QLabel("Demo option:", m_emuWidget); - StyleHelper::MenuSmallLabel(demoLabel); - QWidget *demoOptWidget = createDemoOptWidget(m_emuWidget); - emuWidgetLay->addWidget(demoLabel, 0, 0); - emuWidgetLay->addWidget(demoOptWidget, 0, 1); - - QLabel *xmlLabel = new QLabel("XML path:", m_emuWidget); - StyleHelper::MenuSmallLabel(xmlLabel); - QWidget *xmlPathWidget = createXmlPathWidget(m_emuWidget); - emuWidgetLay->addWidget(xmlLabel, 1, 0); - emuWidgetLay->addWidget(xmlPathWidget, 1, 1); - - QLabel *rxTxLabel = new QLabel("RX/TX Devices:", m_emuWidget); - StyleHelper::MenuSmallLabel(rxTxLabel); - QWidget *rxTxDevWidget = createRxTxDevWidget(m_emuWidget); - emuWidgetLay->addWidget(rxTxLabel, 2, 0); - emuWidgetLay->addWidget(rxTxDevWidget, 2, 1); - - QLabel *uriLabel = new QLabel("Uri:", m_emuWidget); - StyleHelper::MenuSmallLabel(uriLabel); - QWidget *uriWidget = createUriWidget(m_emuWidget); - emuWidgetLay->addWidget(uriLabel, 3, 0); - emuWidgetLay->addWidget(uriWidget, 3, 1); - - QWidget *btnWidget = createEnBtnWidget(vWidget); - - vLay->addWidget(m_emuWidget); - vLay->addWidget(btnWidget); - vLay->addItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding)); - - layout->addWidget(vWidget); - layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed)); - - enGenericOptWidget(xmlPathWidget, rxTxDevWidget, m_demoOptCb->currentText()); - connect(m_demoOptCb, &QComboBox::currentTextChanged, this, - [this, xmlPathWidget, rxTxDevWidget](QString option) { - enGenericOptWidget(xmlPathWidget, rxTxDevWidget, option); - }); - connect(m_enDemoBtn, &QPushButton::clicked, this, &EmuWidget::onEnableDemoClicked); - - m_emuProcess = new QProcess(this); - init(); -} - -EmuWidget::~EmuWidget() -{ - if(m_emuProcess) { - killEmuProcess(); - } -} - -void EmuWidget::init() -{ - Preferences *p = Preferences::GetInstance(); - p->init("iio_emu_path", QCoreApplication::applicationDirPath()); - - QString systemEmuCall = "iio-emu"; - if(startIioEmuProcess(systemEmuCall)) { - m_emuPath = systemEmuCall; - } else { - m_emuPath = findEmuPath(); - } - if(m_emuPath.isEmpty()) { - setStatusMessage("Can't find iio-emu in the system!"); - } else { - setStatusMessage(""); - } - this->setEnabled(!m_emuPath.isEmpty()); -} - -void EmuWidget::enGenericOptWidget(QWidget *xmlPathWidget, QWidget *rxTxDevWidget, QString crtOpt) -{ - bool isGeneric = crtOpt.contains("generic"); - xmlPathWidget->setEnabled(isGeneric); - rxTxDevWidget->setEnabled(isGeneric); - m_enDemoBtn->setFocus(); -} - -void EmuWidget::setStatusMessage(QString msg) -{ - m_uriMsgLabel->clear(); - m_uriMsgLabel->setText(msg); -} - -void EmuWidget::onEnableDemoClicked() -{ - m_enDemoBtn->startAnimation(); - if(!m_enableDemo) { - QStringList arg = createArgList(); - bool started = startIioEmuProcess(m_emuPath, arg); - if(!started) { - stopEnableBtn("Enable Demo"); - return; - } - m_emuWidget->setEnabled(false); - stopEnableBtn("Disable Demo"); - if(m_uriEdit->edit()->text().isEmpty()) { - m_uriEdit->edit()->setText("ip:127.0.0.1"); - } - m_enableDemo = !m_enableDemo; - Q_EMIT emuDeviceAvailable(m_uriEdit->edit()->text()); - } else { - killEmuProcess(); - } -} - -QStringList EmuWidget::createArgList() -{ - QString option = m_demoOptCb->currentText(); - QStringList arguments; - arguments.append(option); - if(option.compare("generic") == 0) { - arguments.append(m_xmlPathEdit->edit()->text()); - arguments.append(m_rxTxDevEdit->edit()->text()); - } - return arguments; -} - -QString EmuWidget::findEmuPath() -{ - Preferences *p = Preferences::GetInstance(); - QString program = p->get("iio_emu_path").toString() + "/iio-emu"; -#ifdef WIN32 - program += ".exe"; -#endif - - QFileInfo fi(program); - if(!fi.exists()) { - program = ""; - } - return program; -} - -void EmuWidget::stopEnableBtn(QString btnText) -{ - m_enDemoBtn->stopAnimation(); - m_enDemoBtn->setText(btnText); -} - -bool EmuWidget::startIioEmuProcess(QString processPath, QStringList arg) -{ - m_emuProcess->setProgram(processPath); - m_emuProcess->setArguments(arg); - m_emuProcess->start(); - - auto started = m_emuProcess->waitForStarted(); - if(!started) { - setStatusMessage("Server failed to start!"); - qDebug(CAT_EMU_ADD_PAGE) << "Process failed to start"; - } else { - qDebug(CAT_EMU_ADD_PAGE) << "Process " << m_emuPath << "started"; - } - return started; -} - -void EmuWidget::killEmuProcess() -{ - m_emuProcess->kill(); - m_emuWidget->setEnabled(true); - stopEnableBtn("Enable Demo"); - m_enableDemo = !m_enableDemo; -} - -void EmuWidget::browseFile(QLineEdit *lineEditPath) -{ - QString filePath = - QFileDialog::getOpenFileName(this, "Open a file", "directoryToOpen", - "All (*);;XML Files (*.xml);;Text Files (*.txt);;BIN Files (*.bin)"); - lineEditPath->setText(filePath); - m_enDemoBtn->setFocus(); -} - -QWidget *EmuWidget::createDemoOptWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - m_demoOptCb = new QComboBox(w); - for(const QString &opt : m_availableOptions) { - m_demoOptCb->addItem(opt); - } - StyleHelper::MenuComboBox(m_demoOptCb, "demo_combo"); - layout->addWidget(m_demoOptCb); - return w; -} - -QWidget *EmuWidget::createXmlPathWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - m_xmlPathEdit = new MenuLineEdit(w); - - QPushButton *xmlPathBtn = new QPushButton("...", w); - StyleHelper::BrowseButton(xmlPathBtn); - connect(xmlPathBtn, &QPushButton::clicked, this, [=]() { browseFile(m_xmlPathEdit->edit()); }); - - layout->addWidget(m_xmlPathEdit); - layout->addWidget(xmlPathBtn); - return w; -} - -QWidget *EmuWidget::createRxTxDevWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - m_rxTxDevEdit = new MenuLineEdit(w); - m_rxTxDevEdit->edit()->setPlaceholderText("iio:device0@/absolutePathTo/data.bin"); - - QPushButton *rxTxDevBtn = new QPushButton("...", w); - StyleHelper::BrowseButton(rxTxDevBtn); - - connect(rxTxDevBtn, &QPushButton::clicked, this, [=]() { browseFile(m_rxTxDevEdit->edit()); }); - - layout->addWidget(m_rxTxDevEdit); - layout->addWidget(rxTxDevBtn); - return w; -} - -QWidget *EmuWidget::createUriWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - QWidget *msgUriWidget = new QWidget(w); - msgUriWidget->setLayout(new QVBoxLayout(msgUriWidget)); - msgUriWidget->layout()->setMargin(0); - msgUriWidget->layout()->setSpacing(0); - m_uriEdit = new MenuLineEdit(msgUriWidget); - m_uriEdit->edit()->setPlaceholderText("ip:127.0.0.1"); - m_uriMsgLabel = new QLabel(msgUriWidget); - msgUriWidget->layout()->addWidget(m_uriEdit); - msgUriWidget->layout()->addWidget(m_uriMsgLabel); - - layout->addWidget(msgUriWidget); - return w; -} - -QWidget *EmuWidget::createEnBtnWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - w->setLayout(new QHBoxLayout(w)); - w->layout()->setMargin(0); - w->layout()->setAlignment(Qt::AlignRight); - - m_enDemoBtn = new AnimationPushButton(parent); - m_enDemoBtn->setText("Enable demo"); - StyleHelper::BlueButton(m_enDemoBtn); - m_enDemoBtn->setFixedWidth(128); - QMovie *loadingIcon(new QMovie(this)); - loadingIcon->setFileName(":/gui/loading.gif"); - m_enDemoBtn->setAnimation(loadingIcon); - m_enDemoBtn->setAutoDefault(true); - - w->layout()->addWidget(m_enDemoBtn); - return w; -} - -void EmuWidget::showEvent(QShowEvent *event) -{ - QWidget::showEvent(event); - m_enDemoBtn->setFocus(); -} - -#include "moc_emuwidget.cpp" diff --git a/core/src/iiodeviceimpl.cpp b/core/src/iiodeviceimpl.cpp deleted file mode 100644 index d16f337506..0000000000 --- a/core/src/iiodeviceimpl.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "iiodeviceimpl.h" - -#include "iioutil/connectionprovider.h" - -#include - -Q_LOGGING_CATEGORY(CAT_IIO_DEVICEIMPL, "IIODevice") - -using namespace scopy; -void IIODeviceImpl::init() -{ - auto cp = ConnectionProvider::GetInstance(); - - // Optimization for iio plugins - keep context open while running compatible - - cp->open(m_param); - DeviceImpl::init(); - cp->close(m_param); -} - -bool IIODeviceImpl::verify() -{ - Connection *conn = ConnectionProvider::GetInstance()->open(m_param); - if(!conn) { - return false; - } - ConnectionProvider::GetInstance()->close(m_param); - return true; -} - -QMap IIODeviceImpl::readDeviceInfo() -{ - QMap contextAttributes; - Connection *conn = ConnectionProvider::GetInstance()->open(m_param); - if(!conn) { - qWarning(CAT_IIO_DEVICEIMPL) << "Cannot read the device info! (unavailable context)"; - } else { - for(int i = 0; i < iio_context_get_attrs_count(conn->context()); i++) { - const char *name; - const char *value; - int ret = iio_context_get_attr(conn->context(), i, &name, &value); - if(ret != 0) - continue; - contextAttributes[name] = value; - } - ConnectionProvider::GetInstance()->close(m_param); - } - - return contextAttributes; -} diff --git a/core/src/iiotabwidget.cpp b/core/src/iiotabwidget.cpp deleted file mode 100644 index c45a97abb7..0000000000 --- a/core/src/iiotabwidget.cpp +++ /dev/null @@ -1,388 +0,0 @@ -#include "iiotabwidget.h" - -#include "iioutil/scopy-iioutil_config.h" -#include "qtconcurrentrun.h" - -#include - -#include -#include -#include - -#include - -Q_LOGGING_CATEGORY(CAT_IIO_ADD_PAGE, "IIOTabWidget") - -using namespace scopy; - -IioTabWidget::IioTabWidget(QWidget *parent) - : QWidget(parent) -{ - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setSpacing(10); - setLayout(layout); - - QWidget *gridWidget = new QWidget(this); - QGridLayout *gridLay = new QGridLayout(this); - gridLay->setSpacing(10); - gridLay->setMargin(0); - gridWidget->setLayout(gridLay); - - QStringList backendsList = computeBackendsList(); - - QLabel *filterLabel = new QLabel("Filter:", gridWidget); - StyleHelper::MenuSmallLabel(filterLabel); - m_filterWidget = createFilterWidget(gridWidget); - setupFilterWidget(backendsList); - gridLay->addWidget(filterLabel, 0, 0); - gridLay->addWidget(m_filterWidget, 0, 1); - - QLabel *ctxLabel = new QLabel("Context:", gridWidget); - StyleHelper::MenuSmallLabel(ctxLabel); - QWidget *avlContextWidget = createAvlCtxWidget(gridWidget); - m_btnScan->setVisible(!backendsList.isEmpty()); - gridLay->addWidget(ctxLabel, 1, 0); - gridLay->addWidget(avlContextWidget, 1, 1); - - QLabel *serialLabel = new QLabel("Serial:", gridWidget); - StyleHelper::MenuSmallLabel(serialLabel); - QWidget *serialSettWiedget = createSerialSettWidget(gridWidget); - bool serialCompatible = isSerialCompatible(); - serialSettWiedget->setEnabled(serialCompatible); - gridLay->addWidget(serialLabel, 2, 0); - gridLay->addWidget(serialSettWiedget, 2, 1); - - QLabel *uriLabel = new QLabel("URI:", gridWidget); - StyleHelper::MenuSmallLabel(uriLabel); - QWidget *uriWidget = createUriWidget(gridWidget); - gridLay->addWidget(uriLabel, 3, 0); - gridLay->addWidget(uriWidget, 3, 1); - - QWidget *btnVerifyWidget = createVerifyBtnWidget(gridWidget); - gridLay->addWidget(btnVerifyWidget, 4, 1, Qt::AlignRight); - - gridLay->addItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding), 5, 0); - - layout->addWidget(gridWidget); - layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed)); - addScanFeedbackMsg("No scanned contexts... Press the refresh button!"); - - m_fwScan = new QFutureWatcher(this); - m_fwSerialScan = new QFutureWatcher>(this); - setupConnections(); -} - -IioTabWidget::~IioTabWidget() {} - -void IioTabWidget::setupConnections() -{ - connect(m_btnVerify, &QPushButton::clicked, this, &IioTabWidget::verifyBtnClicked, Qt::QueuedConnection); - // scanfilterLayout - connect(m_fwScan, &QFutureWatcher::started, m_btnScan, &AnimationPushButton::startAnimation, - Qt::QueuedConnection); - connect(m_fwScan, &QFutureWatcher::finished, this, &IioTabWidget::scanFinished, Qt::QueuedConnection); - connect(m_btnScan, SIGNAL(clicked()), this, SLOT(futureScan()), Qt::QueuedConnection); - - connect(m_avlCtxCb, &QComboBox::textActivated, this, [=]() { Q_EMIT uriChanged(m_avlCtxCb->currentText()); }); - // serial scan - connect(m_fwSerialScan, &QFutureWatcher::started, m_btnSerialScan, &AnimationPushButton::startAnimation, - Qt::QueuedConnection); - connect(m_fwSerialScan, &QFutureWatcher::finished, this, &IioTabWidget::serialScanFinished, - Qt::QueuedConnection); - connect(m_btnSerialScan, SIGNAL(clicked()), this, SLOT(futureSerialScan()), Qt::QueuedConnection); - // serial widget connections - connect(m_serialPortCb->combo(), &QComboBox::textActivated, this, - [=]() { Q_EMIT uriChanged(getSerialPath()); }); - connect(m_baudRateCb->combo(), &QComboBox::textActivated, this, [=]() { Q_EMIT uriChanged(getSerialPath()); }); - connect(m_serialFrameEdit->edit(), &QLineEdit::returnPressed, this, - [=]() { Q_EMIT uriChanged(getSerialPath()); }); - connect(this, &IioTabWidget::uriChanged, this, &IioTabWidget::updateUri); - connect(m_uriEdit->edit(), &QLineEdit::returnPressed, this, [=]() { Q_EMIT m_btnVerify->clicked(); }); - connect(m_uriEdit->edit(), &QLineEdit::textChanged, this, - [=](QString uri) { m_btnVerify->setEnabled(!uri.isEmpty()); }); -} - -QStringList IioTabWidget::computeBackendsList() -{ - QStringList list; - int backEndsCount = iio_get_backends_count(); - for(int i = 0; i < backEndsCount; i++) { - QString backEnd(iio_get_backend(i)); - if(backEnd.compare("xml") == 0 || backEnd.compare("serial") == 0) { - continue; - } - list.append(backEnd); - } - return list; -} - -QCheckBox *IioTabWidget::createBackendCheckBox(QString backEnd, QWidget *parent) -{ - QCheckBox *cb = new QCheckBox(backEnd, m_filterWidget); - cb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - connect(cb, &QCheckBox::toggled, this, [=](bool en) { - if(en) { - m_scanParamsList.push_back(backEnd + ":"); - } else { - m_scanParamsList.removeOne(backEnd + ":"); - } - m_btnScan->setFocus(); - }); - return cb; -} - -void IioTabWidget::setupFilterWidget(QStringList backednsList) -{ - QHBoxLayout *filterLayout = dynamic_cast(m_filterWidget->layout()); - for(const QString &backend : backednsList) { - QCheckBox *cb = createBackendCheckBox(backend, m_filterWidget); - filterLayout->addWidget(cb, 0, Qt::AlignLeft); - } - filterLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed)); -} - -void IioTabWidget::verifyBtnClicked() -{ - QRegExp ipRegex("^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-" - "4][0-9]|25[0-5])$"); - QString uri(m_uriEdit->edit()->text()); - bool isIp = uri.contains(ipRegex); - if(isIp && !m_uriEdit->edit()->text().contains("ip:")) { - m_uriEdit->edit()->blockSignals(true); - m_uriEdit->edit()->setText("ip:" + uri); - m_uriEdit->edit()->blockSignals(false); - } - m_btnScan->setDisabled(true); - m_btnSerialScan->setDisabled(true); - m_btnVerify->startAnimation(); - Q_EMIT startVerify(m_uriEdit->edit()->text(), "iio"); -} - -void IioTabWidget::onVerifyFinished(bool result) -{ - m_uriMsgLabel->clear(); - if(!result) { - m_uriMsgLabel->setText("\"" + m_uriEdit->edit()->text() + "\" not a valid context!"); - } - m_btnVerify->stopAnimation(); - m_btnScan->setEnabled(true); - m_btnSerialScan->setEnabled(true); -} - -void IioTabWidget::futureScan() -{ - m_scanList.clear(); - QString scanParams = m_scanParamsList.join(""); - QFuture f = QtConcurrent::run(std::bind(&IIOScanTask::scan, &m_scanList, scanParams)); - m_fwScan->setFuture(f); -} - -void IioTabWidget::futureSerialScan() -{ - QFuture> f = QtConcurrent::run(std::bind(&IIOScanTask::getSerialPortsName)); - m_fwSerialScan->setFuture(f); -} - -void IioTabWidget::scanFinished() -{ - int retCode = m_fwScan->result(); - m_btnScan->stopAnimation(); - m_avlCtxCb->clear(); - m_uriMsgLabel->clear(); - if(retCode < 0) { - addScanFeedbackMsg("Scan command failed!"); - qWarning(CAT_IIO_ADD_PAGE) << "iio_scan_context_get_info_list error " << retCode; - return; - } - if(m_scanList.isEmpty()) { - addScanFeedbackMsg("No scanned contexts available!"); - return; - } - if(!m_avlCtxCb->isEnabled()) { - m_avlCtxCb->setEnabled(true); - } - for(const auto &ctx : qAsConst(m_scanList)) { - m_avlCtxCb->addItem(ctx); - } - updateUri(m_avlCtxCb->currentText()); -} - -void IioTabWidget::serialScanFinished() -{ - QVector portsName = m_fwSerialScan->result(); - m_btnSerialScan->stopAnimation(); - m_serialPortCb->combo()->clear(); - if(!portsName.empty()) { - for(const QString &port : portsName) { - m_serialPortCb->combo()->addItem(port); - } - } -} - -QString IioTabWidget::getSerialPath() -{ - QString serialPath = "serial:"; - serialPath.append(m_serialPortCb->combo()->currentText()); - serialPath.append("," + m_baudRateCb->combo()->currentText()); - serialPath.append("," + m_serialFrameEdit->edit()->text()); - return serialPath; -} - -bool IioTabWidget::isSerialCompatible() -{ - bool hasLibSerialPort = false; -#ifdef WITH_LIBSERIALPORT - hasLibSerialPort = true; -#endif - bool hasSerialBackend = iio_has_backend("serial"); - return hasLibSerialPort && hasSerialBackend; -} - -void IioTabWidget::updateUri(QString uri) -{ - m_uriEdit->edit()->clear(); - m_uriEdit->edit()->setText(uri); - if(!uri.isEmpty()) { - m_btnVerify->setFocus(); - } -} - -void IioTabWidget::addScanFeedbackMsg(QString message) -{ - m_avlCtxCb->clear(); - m_avlCtxCb->addItem(message); - m_avlCtxCb->setEnabled(false); - updateUri(""); -} - -void IioTabWidget::showEvent(QShowEvent *event) -{ - QWidget::showEvent(event); - m_btnScan->setFocus(); -} - -void IioTabWidget::setupBtnLdIcon(AnimationPushButton *btn) -{ - QMovie *icon(new QMovie(this)); - icon->setFileName(":/gui/loading.gif"); - btn->setAnimation(icon); -} - -QWidget *IioTabWidget::createFilterWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - return w; -} - -QWidget *IioTabWidget::createAvlCtxWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - m_avlCtxCb = new QComboBox(w); - StyleHelper::MenuComboBox(m_avlCtxCb, "ctx_combo"); - - m_btnScan = new AnimationPushButton(w); - setupBtnLdIcon(m_btnScan); - StyleHelper::RefreshButton(m_btnScan); - m_btnScan->setAutoDefault(true); - - layout->addWidget(m_avlCtxCb); - layout->addWidget(m_btnScan); - return w; -} - -QWidget *IioTabWidget::createSerialSettWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - m_serialPortCb = new MenuCombo("Port name", w); - m_baudRateCb = new MenuCombo("Baud rate", w); - for(int baudRate : m_availableBaudRates) { - m_baudRateCb->combo()->addItem(QString::number(baudRate)); - } - - QWidget *lineEditWidget = new QWidget(w); - lineEditWidget->setLayout(new QVBoxLayout(lineEditWidget)); - lineEditWidget->layout()->setMargin(0); - lineEditWidget->layout()->setSpacing(3); - QLabel *serialFrameLabel = new QLabel("Port config", lineEditWidget); - StyleHelper::MenuComboLabel(serialFrameLabel); - - QRegExp re("[5-9]{1}(n|o|e|m|s){1}[1-2]{1}(x|r|d){0,1}$"); - QRegExpValidator *validator = new QRegExpValidator(re, this); - m_serialFrameEdit = new MenuLineEdit(lineEditWidget); - m_serialFrameEdit->edit()->setValidator(validator); - m_serialFrameEdit->edit()->setText("8n1"); - m_serialFrameEdit->edit()->setFocusPolicy(Qt::ClickFocus); - - lineEditWidget->layout()->addWidget(serialFrameLabel); - lineEditWidget->layout()->addWidget(m_serialFrameEdit); - lineEditWidget->setFixedWidth(serialFrameLabel->width()); - - m_btnSerialScan = new AnimationPushButton(w); - setupBtnLdIcon(m_btnSerialScan); - StyleHelper::RefreshButton(m_btnSerialScan); - - layout->addWidget(m_serialPortCb); - layout->addWidget(m_baudRateCb); - layout->addWidget(lineEditWidget); - layout->addWidget(m_btnSerialScan); - return w; -} - -QWidget *IioTabWidget::createUriWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setSpacing(10); - w->setLayout(layout); - - QWidget *msgUriWidget = new QWidget(w); - msgUriWidget->setLayout(new QVBoxLayout(msgUriWidget)); - msgUriWidget->layout()->setMargin(0); - msgUriWidget->layout()->setSpacing(0); - m_uriEdit = new MenuLineEdit(msgUriWidget); - m_uriEdit->edit()->setFocusPolicy(Qt::ClickFocus); - m_uriMsgLabel = new QLabel(msgUriWidget); - msgUriWidget->layout()->addWidget(m_uriEdit); - msgUriWidget->layout()->addWidget(m_uriMsgLabel); - - layout->addWidget(msgUriWidget); - return w; -} - -QWidget *IioTabWidget::createVerifyBtnWidget(QWidget *parent) -{ - QWidget *w = new QWidget(parent); - QHBoxLayout *layout = new QHBoxLayout(w); - layout->setMargin(0); - layout->setAlignment(Qt::AlignRight); - w->setLayout(layout); - - m_btnVerify = new AnimationPushButton(w); - setupBtnLdIcon(m_btnVerify); - StyleHelper::BlueButton(m_btnVerify); - m_btnVerify->setText("Verify"); - m_btnVerify->setIconSize(QSize(30, 30)); - m_btnVerify->setFixedWidth(128); - m_btnVerify->setEnabled(false); - m_btnVerify->setAutoDefault(true); - - layout->addWidget(m_btnVerify); - return w; -} - -#include "moc_iiotabwidget.cpp" diff --git a/core/src/infopagestack.cpp b/core/src/infopagestack.cpp deleted file mode 100644 index f8588f3358..0000000000 --- a/core/src/infopagestack.cpp +++ /dev/null @@ -1,164 +0,0 @@ -#include "infopagestack.h" - -#include "gui/customanimation.h" - -#include -#include -#include - -#include - -using namespace scopy; - -Q_LOGGING_CATEGORY(CAT_INFOPAGESTACK, "InfoPageStack") - -InfoPageStack::InfoPageStack(QWidget *parent) - : MapStackedWidget(parent) -{ - hc = new HomepageControls(this); - this->installEventFilter(hc); - - speed = 200; - animationType = QEasingCurve::InOutCubic; - active = false; - now = QPoint(0, 0); - current = 0; - next = 0; - hc->setVisible(true); - hc->raise(); - qDebug(CAT_INFOPAGESTACK) << "ctor"; -} - -InfoPageStack::~InfoPageStack() -{ - this->removeEventFilter(hc); - qDebug(CAT_INFOPAGESTACK) << "dtor"; -} - -void InfoPageStack::add(QString key, QWidget *w) -{ - MapStackedWidget::add(key, w); - if(count() == 1) { - hc->raise(); - } - hc->setVisible(count() > 1); -} - -void InfoPageStack::add(QString key, Device *d) -{ - QWidget *w = d->page(); - add(key, w); - idDevMap.insert(key, d); -} - -bool InfoPageStack::remove(QString key) -{ - bool ret = MapStackedWidget::remove(key); - idDevMap.take(key); - return ret; -} - -bool InfoPageStack::show(QString key) -{ - QString oldKey = getKey(currentWidget()); - - if(idDevMap.contains(oldKey)) - idDevMap[oldKey]->hidePage(); - auto ret = MapStackedWidget::show(key); - if(idDevMap.contains(key)) - idDevMap[key]->showPage(); - hc->raise(); - hc->setVisible(count() > 1); - return ret; -} - -bool InfoPageStack::slideInKey(QString key, int direction) -{ - QString oldKey = getKey(currentWidget()); - - if(idDevMap.contains(oldKey)) - idDevMap[oldKey]->hidePage(); - - QWidget *w = map.value(key); - - if(idDevMap.contains(key)) - idDevMap[key]->showPage(); - - if(!w) - return false; - slideInWidget(w, direction); - return true; -} - -void InfoPageStack::animationDone() -{ - setCurrentIndex(next); - // widget(current)->hide(); - // widget(current)->move(now); - active = false; - hc->raise(); -} - -void InfoPageStack::slideInWidget(QWidget *newWidget, int direction) -{ - if(active) { - if(this->next != indexOf(newWidget)) { - animationDone(); - } else { - return; - } - } - active = true; - - int current = currentIndex(); - int next = indexOf(newWidget); - if(current == next) { - active = false; - return; - } - - int offsetx = frameRect().width(); - int offsety = frameRect().height(); - widget(next)->setGeometry(0, 0, offsetx, offsety); - - if(direction < 0) { - offsetx = -offsetx; - offsety = 0; - } else { - offsety = 0; - } - - QPoint pnext = widget(next)->pos(); - QPoint pcurrent = widget(current)->pos(); - now = pcurrent; - - widget(next)->move(pnext.x() - offsetx, pnext.y() - offsety); - widget(next)->show(); - widget(next)->raise(); - - CustomAnimation *animNow = new CustomAnimation(widget(current), "pos"); - animNow->setDuration(speed); - animNow->setEasingCurve(animationType); - animNow->setStartValue(QPoint(pcurrent.x(), pcurrent.y())); - animNow->setEndValue(QPoint(offsetx + pcurrent.x(), offsety + pcurrent.y())); - CustomAnimation *animNext = new CustomAnimation(widget(next), "pos"); - animNext->setDuration(speed); - animNext->setEasingCurve(animationType); - animNext->setStartValue(QPoint(-offsetx + pnext.x(), offsety + pnext.y())); - animNext->setEndValue(QPoint(pnext.x(), pnext.y())); - QParallelAnimationGroup *animGroup = new QParallelAnimationGroup(this); - - animGroup->addAnimation(animNow); - animGroup->addAnimation(animNext); - - connect(animGroup, &QParallelAnimationGroup::finished, this, &InfoPageStack::animationDone); - - this->next = next; - this->current = current; - active = true; - animGroup->start(); -} - -HomepageControls *InfoPageStack::getHomepageControls() const { return hc; } - -#include "moc_infopagestack.cpp" diff --git a/core/src/licenseoverlay.cpp b/core/src/licenseoverlay.cpp deleted file mode 100644 index 4ebcb34c00..0000000000 --- a/core/src/licenseoverlay.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include - -#include -#include -using namespace scopy; - -LicenseOverlay::LicenseOverlay(QWidget *parent) - : QWidget(parent) - , parent(parent) -{ - m_popupWidget = new PopupWidget(parent); - m_popupWidget->setFocusOnContinueButton(); - m_popupWidget->setEnableExternalLinks(true); - m_popupWidget->enableTitleBar(false); - m_popupWidget->enableTintedOverlay(true); - m_popupWidget->setDescription(getLicense()); - - connect(m_popupWidget->getContinueBtn(), &QAbstractButton::clicked, [&]() { - Preferences::GetInstance()->set("general_first_run", false); - deleteLater(); - }); - Preferences::connect(m_popupWidget->getExitBtn(), &QAbstractButton::clicked, - [&]() { QCoreApplication::quit(); }); -} - -LicenseOverlay::~LicenseOverlay() { delete m_popupWidget; } - -void LicenseOverlay::showOverlay() -{ - raise(); - show(); - m_popupWidget->move(parent->rect().center() - m_popupWidget->rect().center()); -} - -QPushButton *LicenseOverlay::getContinueBtn() { return m_popupWidget->getContinueBtn(); } - -QString LicenseOverlay::getLicense() -{ - QFile file(":/license.html"); - file.open(QIODevice::ReadOnly); - QString text = QString(file.readAll()); - file.close(); - - return text; -} - -#include "moc_licenseoverlay.cpp" diff --git a/core/src/logging_categories.cpp b/core/src/logging_categories.cpp deleted file mode 100644 index d61be09bad..0000000000 --- a/core/src/logging_categories.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2019 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "logging_categories.h" - -#ifndef QT_NO_DEBUG_OUTPUT -Q_LOGGING_CATEGORY(CAT_TOOL_LAUNCHER, "toolLauncher") -Q_LOGGING_CATEGORY(CAT_OSCILLOSCOPE, "oscilloscope") -Q_LOGGING_CATEGORY(CAT_SIGNAL_GENERATOR, "signalGenerator") -Q_LOGGING_CATEGORY(CAT_VOLTMETER, "voltmeter") -Q_LOGGING_CATEGORY(CAT_POWER_CONTROLLER, "powerController") -Q_LOGGING_CATEGORY(CAT_SPECTRUM_ANALYZER, "spectrumAnalyzer") -Q_LOGGING_CATEGORY(CAT_NETWORK_ANALYZER, "networkAnalyzer") -Q_LOGGING_CATEGORY(CAT_DIGITAL_IO, "digitalIO") -Q_LOGGING_CATEGORY(CAT_LOGIC_ANALYZER, "logicAnalyzer") -Q_LOGGING_CATEGORY(CAT_PATTERN_GENERATOR, "patternGenerator") -Q_LOGGING_CATEGORY(CAT_CALIBRATION, "calibration") -Q_LOGGING_CATEGORY(CAT_CALIBRATION_MANUAL, "calibration.manual") -Q_LOGGING_CATEGORY(CAT_IIO_MANAGER, "iioManager") -Q_LOGGING_CATEGORY(CAT_PLOT, "plot") -Q_LOGGING_CATEGORY(CAT_BENCHMARK, "Benchmark") -#endif diff --git a/core/src/pluginenablewidget.cpp b/core/src/pluginenablewidget.cpp deleted file mode 100644 index e247698c19..0000000000 --- a/core/src/pluginenablewidget.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "pluginenablewidget.h" - -#include "qboxlayout.h" - -using namespace scopy; - -PluginEnableWidget::PluginEnableWidget(QWidget *parent) - : QWidget(parent) -{ - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setContentsMargins(5, 5, 5, 5); - - m_checkBox = new QCheckBox(); - m_checkBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - m_descriptionLabel = new QLabel(); - m_descriptionLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - m_descriptionLabel->setWordWrap(true); - - layout->addWidget(m_checkBox); - layout->setAlignment(m_checkBox, Qt::AlignTop); - layout->addWidget(m_descriptionLabel); - layout->setAlignment(m_descriptionLabel, Qt::AlignTop); - layout->setStretch(0, 1); - layout->setStretch(1, 3); -} - -PluginEnableWidget::~PluginEnableWidget() {} - -void PluginEnableWidget::setDescription(QString description) -{ - m_descriptionLabel->clear(); - m_descriptionLabel->setText(description); -} - -QCheckBox *PluginEnableWidget::checkBox() const { return m_checkBox; } - -#include "moc_pluginenablewidget.cpp" diff --git a/core/src/pluginfilter.cpp b/core/src/pluginfilter.cpp deleted file mode 100644 index 087a00941d..0000000000 --- a/core/src/pluginfilter.cpp +++ /dev/null @@ -1,95 +0,0 @@ -#include "pluginfilter.h" - -#include - -namespace scopy { -bool PluginFilter::pluginInCategory(Plugin *p, QString category) -{ // PluginFilter class (?) - if(category.isEmpty()) // no category selected - return true; - if(!p->metadata().contains("category")) // plugin metadata does not have category - return true; - QJsonValue categoryVal = p->metadata().value("category"); - if(categoryVal.isString()) // single category - return category == p->metadata().value("category").toString(); - if(categoryVal.isArray()) { // list category - for(auto v : categoryVal.toArray()) { - if(!v.isString()) { - continue; - } - if(v.toString() == category) { - return true; - } - } - } - return false; -} - -bool PluginFilter::pluginForcedInclusionList(QList pl, Plugin *p) -{ - bool ret = false; - QStringList includeList; - for(Plugin *test : pl) { - if(test->enabled() == false) - continue; - if(!test->metadata().contains("include-forced")) - continue; - QJsonValue includeVal = test->metadata().value("include-forced"); - if(includeVal.isString()) - includeList.append(includeVal.toString()); - if(includeVal.isArray()) { - for(auto v : includeVal.toArray()) { - if(!v.isString()) { - continue; - } - includeList.append(v.toString()); - } - } - } - - for(const QString &include : includeList) { - if(include.toLower() == p->name().toLower()) { - ret = true; - } - } - return ret; -} - -bool PluginFilter::pluginInExclusionList(QList pl, Plugin *p) -{ - bool ret = false; - QStringList excludeList; - for(Plugin *test : pl) { - if(test->enabled() == false) - continue; - if(!test->metadata().contains("exclude")) - continue; - QJsonValue excludeVal = test->metadata().value("exclude"); - if(excludeVal.isString()) - excludeList.append(excludeVal.toString()); - if(excludeVal.isArray()) { - for(auto v : excludeVal.toArray()) { - if(!v.isString()) { - continue; - } - excludeList.append(v.toString()); - } - } - } - - for(const QString &exclude : excludeList) { - if(exclude == "*") { - ret = true; - } - if(exclude.toLower() == p->name().toLower()) { - ret = true; - } - if(exclude.toLower() == QString("!" + p->name()).toLower()) { - ret = false; - break; - } - } - return ret; -} - -} // namespace scopy diff --git a/core/src/pluginmanager.cpp b/core/src/pluginmanager.cpp deleted file mode 100644 index b51de77a80..0000000000 --- a/core/src/pluginmanager.cpp +++ /dev/null @@ -1,169 +0,0 @@ -#include "pluginmanager.h" - -#include "pluginfilter.h" -#include "qpluginloader.h" - -#include -#include -#include - -#include - -Q_LOGGING_CATEGORY(CAT_PLUGINMANAGER, "PluginManager") -using namespace scopy; - -struct less_than_key -{ - inline bool operator()(Plugin *p1, Plugin *p2) - { - return (p1->metadata()["priority"].toInt() < p2->metadata()["priority"].toInt()); - } -}; - -struct greater_than_key -{ - inline bool operator()(Plugin *p1, Plugin *p2) - { - return (p1->metadata()["priority"].toInt() > p2->metadata()["priority"].toInt()); - } -}; - -PluginManager::PluginManager(QObject *parent) - : QObject(parent) -{} - -PluginManager::~PluginManager() -{ - for(Plugin *p : qAsConst(list)) { - p->deinit(); - } -} - -void PluginManager::add(QStringList pluginFileList) -{ - for(const QString &pluginFileName : pluginFileList) { - add(pluginFileName); - } -} - -void PluginManager::add(QString pluginFileName) -{ - Plugin *p = nullptr; - p = loadPlugin(pluginFileName); - if(p) { - qInfo(CAT_PLUGINMANAGER) << "Found plugin:" << p->name() << "in " << pluginFileName; - list.append(p); - p->initMetadata(); - applyMetadata(p, &m_metadata); - p->init(); - QObject *obj = dynamic_cast(p); - if(obj) - obj->setParent(this); - } -} - -int PluginManager::count() { return list.count(); } - -void PluginManager::applyMetadata(Plugin *plugin, QJsonObject *metadata) -{ - if(metadata->contains(plugin->name())) { - plugin->setMetadata(metadata->value(plugin->name()).toObject()); - } -} - -void PluginManager::sort() -{ - std::sort(list.begin(), list.end(), greater_than_key()); - - qDebug(CAT_PLUGINMANAGER) << "New plugin order:"; - for(Plugin *plugin : qAsConst(list)) { - qDebug(CAT_PLUGINMANAGER) << plugin->name(); - } -} - -void PluginManager::clear() { list.clear(); } - -QList PluginManager::getPlugins(QString category) -{ - QList newlist; - for(Plugin *plugin : qAsConst(list)) { - if(!PluginFilter::pluginInCategory(plugin, category)) - continue; - Plugin *p = plugin->clone(); - newlist.append(p); - } - return newlist; -} - -QList PluginManager::getCompatiblePlugins(QString param, QString category) -{ - QList comp; - for(Plugin *plugin : qAsConst(list)) { - if(!PluginFilter::pluginInCategory(plugin, category)) - continue; - bool enable = (!PluginFilter::pluginInExclusionList(comp, plugin)); - bool forcedInclusion = (PluginFilter::pluginForcedInclusionList(comp, plugin)); - - if(plugin->compatible(param, category) || forcedInclusion) { - Plugin *p = plugin->clone(); - p->setParam(param, category); - p->setEnabled(enable); - comp.append(p); - } - } - return comp; -} - -void PluginManager::setMetadata(QJsonObject metadata) { m_metadata = metadata; } - -Plugin *PluginManager::loadPlugin(QString file) -{ - bool ret; - Plugin *original = nullptr; - Plugin *clone = nullptr; - - if(!QFile::exists(file)) - return nullptr; - - if(!QLibrary::isLibrary(file)) - return nullptr; - - QPluginLoader qp(file); - ret = qp.load(); - if(!ret) { - qWarning(CAT_PLUGINMANAGER) << "Cannot load library " + qp.fileName() + "- err: " + qp.errorString(); - return nullptr; - } - - QObject *inst = qp.instance(); - if(!inst) { - qWarning(CAT_PLUGINMANAGER) << "Cannot create QObject instance from loaded library"; - return nullptr; - } - - original = qobject_cast(qp.instance()); - if(!original) { - qWarning(CAT_PLUGINMANAGER) << "Loaded library instance is not a Plugin*"; - return nullptr; - } - - clone = original->clone(this); - if(!clone) { - qWarning(CAT_PLUGINMANAGER) << "clone method does not clone the object"; - return nullptr; - } - - QString cloneName; - cloneName = clone->name(); - - if(cloneName == "") - return nullptr; - - return clone; -} - -QList PluginManager::getOriginalPlugins() const { return list; } - -QJsonObject PluginManager::metadata() const { return m_metadata; } - -#include "moc_pluginmanager.cpp" diff --git a/core/src/pluginrepository.cpp b/core/src/pluginrepository.cpp deleted file mode 100644 index 9024bd28ff..0000000000 --- a/core/src/pluginrepository.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "pluginrepository.h" - -#ifdef Q_OS_WINDOWS -#include -#include -#endif - -#include -#include -#include -#include -#include -#include -#include - -Q_LOGGING_CATEGORY(CAT_PLUGINREPOSTIORY, "PluginRepository"); - -using namespace scopy; -PluginRepository::PluginRepository(QObject *parent) - : QObject(parent) -{ - pm = new PluginManager(this); -} - -PluginRepository::~PluginRepository() {} - -void PluginRepository::init(QString location) -{ - qInfo(CAT_PLUGINREPOSTIORY) << "initializing plugins from: " << location; - const QString pluginMetaFileName = "plugin.json"; - QString pluginMetaFilePath = ""; - QDir loc(location); - - QFileInfoList plugins = loc.entryInfoList(QDir::Files); - QStringList pluginFiles; - - for(const QFileInfo &p : plugins) { - if(p.fileName() == pluginMetaFileName) { - pluginMetaFilePath = p.absoluteFilePath(); - continue; - } - pluginFiles.append(p.absoluteFilePath()); - } - - if(!pluginMetaFilePath.isEmpty()) { - QFile f(pluginMetaFilePath); - f.open(QFile::ReadOnly); - QString json = f.readAll(); - QJsonParseError err; - QJsonDocument pluginMetaDocument = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical(CAT_PLUGINREPOSTIORY) << "JSON Parse error !" << err.errorString(); - qCritical(CAT_PLUGINREPOSTIORY) << json; - qCritical(CAT_PLUGINREPOSTIORY) << QString(" ").repeated(err.offset) + "^"; - } else { - qDebug(CAT_PLUGINREPOSTIORY) << "Found valid json @ " << pluginMetaFilePath; - } - metadata = pluginMetaDocument.object(); - pm->setMetadata(metadata); - } - -#ifdef Q_OS_WINDOWS - bool b = SetDllDirectoryA(QApplication::applicationDirPath().toStdString().c_str()); - if(!b) { - DWORD error = ::GetLastError(); - std::string message = std::system_category().message(error); - qWarning(CAT_PLUGINREPOSTIORY) - << "cannot add .exe folder to library search path - " << QString::fromStdString(message); - ; - } -#endif - - pm->clear(); - pm->add(pluginFiles); - pm->sort(); -} - -#include "moc_pluginrepository.cpp" diff --git a/core/src/scanbuttoncontroller.cpp b/core/src/scanbuttoncontroller.cpp deleted file mode 100644 index 7b900b7bd3..0000000000 --- a/core/src/scanbuttoncontroller.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "scanbuttoncontroller.h" - -using namespace scopy; - -ScanButtonController::ScanButtonController(CyclicalTask *cs, QPushButton *btn, QObject *parent) - : QObject{parent} -{ - this->cs = cs; - this->btn = btn; - conn = connect(this->btn, SIGNAL(toggled(bool)), this, SLOT(enableScan(bool))); -} -ScanButtonController::~ScanButtonController() { disconnect(conn); } - -void ScanButtonController::enableScan(bool b) -{ - if(b) - startScan(); - else - stopScan(); -} - -void ScanButtonController::startScan() -{ - cs->start(2000); - btn->setChecked(true); -} - -void ScanButtonController::stopScan() -{ - cs->stop(); - btn->setChecked(false); -} - -#include "moc_scanbuttoncontroller.cpp" diff --git a/core/src/scannediiocontextcollector.cpp b/core/src/scannediiocontextcollector.cpp deleted file mode 100644 index 934fe0ad88..0000000000 --- a/core/src/scannediiocontextcollector.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "scannediiocontextcollector.h" - -#include -#include - -Q_LOGGING_CATEGORY(CAT_SCANCTXCOLLECTOR, "ScannedIIOContextCollector") - -using namespace scopy; -ScannedIIOContextCollector::ScannedIIOContextCollector(QObject *parent) - : QObject{parent} -{ - qDebug(CAT_SCANCTXCOLLECTOR) << "ctor"; -} - -ScannedIIOContextCollector::~ScannedIIOContextCollector() { qDebug(CAT_SCANCTXCOLLECTOR) << "dtor"; } - -void ScannedIIOContextCollector::update(QStringList list) -{ - // Do we need to map Device* to uri in this class ? - - QSet updatedUris = QSet(list.begin(), list.end()); - updatedUris = updatedUris + lockedUris; - - auto newUris = updatedUris - uris; - auto deletedUris = uris - updatedUris; - - qDebug(CAT_SCANCTXCOLLECTOR) << "cached uris:" << uris; - for(const auto &uri : newUris) { - qInfo(CAT_SCANCTXCOLLECTOR) << "new device found: " << uri; - // if(!lockedUris.contains(uri)) - Q_EMIT foundDevice("iio", uri); - } - - for(const auto &uri : deletedUris) { - qInfo(CAT_SCANCTXCOLLECTOR) << "to delete device: " << uri; - // if(!lockedUris.contains(uri)) - Q_EMIT lostDevice("iio", uri); - } - uris = updatedUris; -} - -void ScannedIIOContextCollector::removeDevice(QString id, Device *d) { uris.remove(d->param()); } - -void ScannedIIOContextCollector::lock(QString uri, Device *d) -{ - - if(uris.contains(d->param())) - lockedUris.insert(d->param()); -} - -void ScannedIIOContextCollector::unlock(QString uri, Device *d) -{ - if(uris.contains(d->param())) - lockedUris.remove(d->param()); -} - -void ScannedIIOContextCollector::clearCache() { uris.clear(); } - -#include "moc_scannediiocontextcollector.cpp" diff --git a/core/src/scopyaboutpage.cpp b/core/src/scopyaboutpage.cpp deleted file mode 100644 index 3e0cd179ad..0000000000 --- a/core/src/scopyaboutpage.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "scopyaboutpage.h" - -#include "widgets/hoverwidget.h" -#include "widgets/pagenavigationwidget.h" - -#include -#include -#include -#include - -#include - -using namespace scopy; -ScopyAboutPage::ScopyAboutPage(QWidget *parent) - : QWidget(parent) - , tabWidget(new QTabWidget(this)) - , layout(new QVBoxLayout(this)) -{ - initUI(); - addHorizontalTab(buildPage(QString("qrc:/about.html")), "Scopy"); -} - -void ScopyAboutPage::initUI() -{ - layout->setMargin(0); - layout->setSpacing(0); - this->setLayout(layout); - layout->addWidget(tabWidget); - - StyleHelper::TabWidgetEastMenu(tabWidget, "aboutPageTable"); -} - -QWidget *ScopyAboutPage::buildPage(QString src) -{ - QWidget *page = new QWidget(this); - QVBoxLayout *lay = new QVBoxLayout(page); - QTextBrowser *browser = new QTextBrowser(page); - - lay->addWidget(browser); - lay->setMargin(0); - initNavigationWidget(browser); - - if(QFile::exists(QString(src).replace("qrc:/", ":/"))) { - browser->setSource(src); - } else { - browser->setMarkdown(src); - } - - return page; -} - -void ScopyAboutPage::initNavigationWidget(QTextBrowser *browser) -{ - PageNavigationWidget *navWidget = new PageNavigationWidget(true, false, this); - QPushButton *homeButton = navWidget->getHomeBtn(); - connect(homeButton, SIGNAL(clicked()), browser, SLOT(home())); - - QPushButton *backwardButton = navWidget->getBackwardBtn(); - backwardButton->setEnabled(false); - connect(backwardButton, SIGNAL(clicked()), browser, SLOT(backward())); - connect(browser, &QTextBrowser::backwardAvailable, backwardButton, - [=](bool available) { backwardButton->setEnabled(available); }); - - QPushButton *forwardButton = navWidget->getForwardBtn(); - forwardButton->setEnabled(false); - connect(forwardButton, SIGNAL(clicked()), browser, SLOT(forward())); - connect(browser, &QTextBrowser::forwardAvailable, forwardButton, - [=](bool available) { forwardButton->setEnabled(available); }); - - HoverWidget *hover = new HoverWidget(navWidget, browser, browser); - hover->setAnchorPos(HoverPosition::HP_TOPRIGHT); - hover->setContentPos(HoverPosition::HP_BOTTOMLEFT); - hover->setAnchorOffset(QPoint(-10, 0)); - hover->show(); -} - -void ScopyAboutPage::addHorizontalTab(QWidget *w, QString text) -{ - // Hackish - so we don't override paint event - tabWidget->addTab(w, ""); - QLabel *lbl1 = new QLabel(); - lbl1->setText(text); - StyleHelper::TabWidgetLabel(lbl1, "tabWidgetLabel"); - QTabBar *tabbar = tabWidget->tabBar(); - tabbar->setTabButton(tabbar->count() - 1, QTabBar::RightSide, lbl1); -} - -ScopyAboutPage::~ScopyAboutPage() {} - -#include "moc_scopyaboutpage.cpp" diff --git a/core/src/scopyhomeaddpage.cpp b/core/src/scopyhomeaddpage.cpp deleted file mode 100644 index 67f16fe127..0000000000 --- a/core/src/scopyhomeaddpage.cpp +++ /dev/null @@ -1,254 +0,0 @@ -#include "scopyhomeaddpage.h" -#include "devicefactory.h" -#include "deviceloader.h" - -#include -#include -#include -#include - -Q_LOGGING_CATEGORY(CAT_HOME_ADD_PAGE, "ScopyHomeAddPage") - -using namespace scopy; - -ScopyHomeAddPage::ScopyHomeAddPage(QWidget *parent, PluginManager *pm) - : QWidget(parent) - , m_pluginManager(pm) - , m_deviceImpl(nullptr) -{ - StyleHelper::BackgroundAddPage(this, "add"); - setProperty("device_page", true); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); - - m_stackedWidget = new QStackedWidget(this); - m_tabWidget = createTabWidget(m_stackedWidget); - m_addPage = createAddPage(m_stackedWidget); - m_stackedWidget->addWidget(m_tabWidget); - m_stackedWidget->addWidget(m_addPage); - m_stackedWidget->setCurrentWidget(m_tabWidget); - - layout->addWidget(m_stackedWidget); - m_pendingUri = ""; - - connect(m_addBtn, &QPushButton::clicked, this, &ScopyHomeAddPage::addBtnClicked); - connect(m_backBtn, &QPushButton::clicked, this, &ScopyHomeAddPage::backBtnClicked); - - // verify iio device - m_fw = new QFutureWatcher(this); - connect(m_fw, &QFutureWatcher::finished, this, &ScopyHomeAddPage::onVerifyFinished, Qt::QueuedConnection); - connect(this, &ScopyHomeAddPage::verifyFinished, m_iioTabWidget, &IioTabWidget::onVerifyFinished); - connect(m_iioTabWidget, &IioTabWidget::startVerify, this, &ScopyHomeAddPage::futureVerify); - - connect(m_emuWidget, &EmuWidget::emuDeviceAvailable, this, &ScopyHomeAddPage::onEmuDeviceAvailable); - - connect(m_stackedWidget, &QStackedWidget::currentChanged, this, [=]() { - if(m_stackedWidget->currentWidget() == m_addPage) { - m_addBtn->setFocus(); - } - }); -} - -ScopyHomeAddPage::~ScopyHomeAddPage() -{ - if(m_deviceImpl) { - delete m_deviceImpl; - m_deviceImpl = nullptr; - } -} - -void ScopyHomeAddPage::futureVerify(QString uri, QString cat) -{ - removePluginsCheckBoxes(); - m_deviceInfoPage->clear(); - m_deviceImpl = DeviceFactory::build(uri, m_pluginManager, cat); - QFuture f = QtConcurrent::run(std::bind(&DeviceImpl::verify, m_deviceImpl)); - m_fw->setFuture(f); -} - -void ScopyHomeAddPage::onVerifyFinished() -{ - bool result = m_fw->result(); - if(result) { - loadDeviceInfoPage(); - initializeDevice(); - } else { - if(m_deviceImpl) { - delete m_deviceImpl; - m_deviceImpl = nullptr; - } - Q_EMIT verifyFinished(result); - } -} - -void ScopyHomeAddPage::loadDeviceInfoPage() -{ - QMap deviceInfoMap = m_deviceImpl->readDeviceInfo(); - foreach(const QString &key, deviceInfoMap.keys()) { - m_deviceInfoPage->update(key, deviceInfoMap[key]); - } -} - -void ScopyHomeAddPage::initializeDevice() -{ - if(m_deviceImpl) { - DeviceLoader *dl = new DeviceLoader(m_deviceImpl, this); - dl->init(); - connect(dl, &DeviceLoader::initialized, this, &ScopyHomeAddPage::deviceLoaderInitialized); - connect(dl, &DeviceLoader::initialized, dl, - &QObject::deleteLater); // don't forget to delete loader once we're done - } -} - -void ScopyHomeAddPage::deviceLoaderInitialized() -{ - QList plugins = m_deviceImpl->plugins(); - for(Plugin *p : qAsConst(plugins)) { - PluginEnableWidget *pluginDescription = new PluginEnableWidget(m_pluginBrowserSection); - pluginDescription->setDescription(p->description()); - pluginDescription->checkBox()->setText(p->name()); - pluginDescription->checkBox()->setChecked(p->enabled()); - m_pluginBrowserSection->contentLayout()->addWidget(pluginDescription); - m_pluginDescriptionList.push_back(pluginDescription); - connect(pluginDescription->checkBox(), &QCheckBox::toggled, this, [=](bool en) { p->setEnabled(en); }); - } - m_stackedWidget->setCurrentWidget(m_addPage); - Q_EMIT verifyFinished(true); -} - -void ScopyHomeAddPage::addBtnClicked() -{ - bool connection = m_deviceImpl->verify(); - if(!connection) { - m_connLostLabel->setText("Connection with " + m_deviceImpl->param() + " has been lost!"); - return; - } - m_pendingUri = m_deviceImpl->param(); - m_connLostLabel->clear(); - Q_EMIT newDeviceAvailable(m_deviceImpl); -} - -void ScopyHomeAddPage::deviceAddedToUi(QString id) -{ - if(!m_pendingUri.isEmpty()) { - m_deviceImpl = nullptr; - m_iioTabWidget->updateUri(""); - m_stackedWidget->setCurrentWidget(m_tabWidget); - Q_EMIT requestDevice(id); - m_pendingUri = ""; - } -} - -void ScopyHomeAddPage::backBtnClicked() -{ - if(m_deviceImpl) { - delete m_deviceImpl; - m_deviceImpl = nullptr; - } - m_connLostLabel->clear(); - m_stackedWidget->setCurrentWidget(m_tabWidget); -} - -void ScopyHomeAddPage::onEmuDeviceAvailable(QString uri) -{ - m_tabWidget->setCurrentWidget(m_iioTabWidget); - m_iioTabWidget->updateUri(uri); -} - -void ScopyHomeAddPage::removePluginsCheckBoxes() -{ - qDeleteAll(m_pluginDescriptionList); - m_pluginDescriptionList.clear(); -} - -QTabWidget *ScopyHomeAddPage::createTabWidget(QWidget *parent) -{ - QTabWidget *tabWidget = new QTabWidget(parent); - m_iioTabWidget = new IioTabWidget(tabWidget); - tabWidget->addTab(m_iioTabWidget, "IIO"); - m_emuWidget = new EmuWidget(tabWidget); - tabWidget->addTab(m_emuWidget, "EMU"); - tabWidget->setCurrentWidget(m_iioTabWidget); - return tabWidget; -} - -QWidget *ScopyHomeAddPage::createInfoSection(QWidget *parent) -{ - QScrollArea *infoScrollArea = new QScrollArea(parent); - QWidget *infoSection = new QWidget(infoScrollArea); - infoSection->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - QVBoxLayout *layInfoSection = new QVBoxLayout(infoSection); - layInfoSection->setSpacing(10); - layInfoSection->setMargin(0); - infoSection->setLayout(layInfoSection); - - infoScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - infoScrollArea->setWidgetResizable(true); - infoScrollArea->setWidget(infoSection); - - MenuCollapseSection *deviceInfoSection = - new MenuCollapseSection("Device info", MenuCollapseSection::MHCW_ONOFF, infoSection); - deviceInfoSection->contentLayout()->setSpacing(10); - deviceInfoSection->contentLayout()->setMargin(0); - - m_deviceInfoPage = new InfoPage(deviceInfoSection); - m_deviceInfoPage->setAdvancedMode(false); - m_deviceInfoPage->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - deviceInfoSection->contentLayout()->addWidget(m_deviceInfoPage); - - m_pluginBrowserSection = - new MenuCollapseSection("Compatible plugins", MenuCollapseSection::MHCW_ONOFF, infoSection); - m_pluginBrowserSection->contentLayout()->setSpacing(10); - m_pluginBrowserSection->contentLayout()->setMargin(0); - - layInfoSection->addWidget(deviceInfoSection); - layInfoSection->addWidget(m_pluginBrowserSection); - layInfoSection->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - return infoScrollArea; -} - -QWidget *ScopyHomeAddPage::createBtnsWidget(QWidget *parent) -{ - QWidget *btnsWidget = new QWidget(parent); - QHBoxLayout *btnsLay = new QHBoxLayout(btnsWidget); - btnsLay->setMargin(0); - btnsLay->setAlignment(Qt::AlignRight); - - m_backBtn = new QPushButton(btnsWidget); - m_backBtn->setText("BACK"); - StyleHelper::BlueButton(m_backBtn); - m_backBtn->setFixedWidth(128); - - m_addBtn = new QPushButton(btnsWidget); - m_addBtn->setText("ADD DEVICE"); - m_addBtn->setAutoDefault(true); - StyleHelper::BlueButton(m_addBtn); - m_addBtn->setFixedWidth(128); - - btnsLay->addWidget(m_backBtn); - btnsLay->addWidget(m_addBtn); - return btnsWidget; -} - -QWidget *ScopyHomeAddPage::createAddPage(QWidget *parent) -{ - QWidget *addPage = new QWidget(parent); - addPage->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - QVBoxLayout *addPageLay = new QVBoxLayout(addPage); - addPageLay->setSpacing(10); - addPage->setLayout(addPageLay); - - QWidget *infoSection = createInfoSection(addPage); - QWidget *buttons = createBtnsWidget(addPage); - m_connLostLabel = new QLabel(parent); - m_connLostLabel->setText(""); - - addPageLay->addItem(new QSpacerItem(20, 40, QSizePolicy::Preferred, QSizePolicy::Preferred)); - addPageLay->addWidget(infoSection); - addPageLay->addWidget(m_connLostLabel); - addPageLay->addWidget(buttons); - return addPage; -} - -#include "moc_scopyhomeaddpage.cpp" diff --git a/core/src/scopyhomeinfopage.cpp b/core/src/scopyhomeinfopage.cpp deleted file mode 100644 index e48e729b0f..0000000000 --- a/core/src/scopyhomeinfopage.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "scopyhomeinfopage.h" - -#include "ui_scopyhomeinfopage.h" - -#include - -#include - -using namespace scopy; - -ScopyHomeInfoPage::ScopyHomeInfoPage(QWidget *parent) - : QWidget(parent) - , ui(new Ui::ScopyHomeInfoPage) -{ - ui->setupUi(this); - // initReportButton(); -} - -ScopyHomeInfoPage::~ScopyHomeInfoPage() { delete ui; } - -void ScopyHomeInfoPage::initReportButton() -{ - auto reportButton = new QPushButton("Report a bug"); - StyleHelper::BlueButton(reportButton, "reportButton"); - reportButton->setFixedSize(100, 40); - - auto reportBtnHoverWidget = new HoverWidget(reportButton, ui->textBrowser, this); - reportBtnHoverWidget->setContentPos(HP_TOPLEFT); - reportBtnHoverWidget->setAnchorPos(HP_BOTTOMRIGHT); - reportBtnHoverWidget->setAnchorOffset(QPoint(-10, -10)); - reportBtnHoverWidget->setVisible(true); - reportBtnHoverWidget->raise(); - - connect(reportButton, &QPushButton::clicked, []() { - const QUrl url("https://wiki.analog.com/university/tools/m2k/scopy/report"); - QDesktopServices::openUrl(url); - }); -} - -#include "moc_scopyhomeinfopage.cpp" diff --git a/core/src/scopyhomepage.cpp b/core/src/scopyhomepage.cpp deleted file mode 100644 index e48af187fe..0000000000 --- a/core/src/scopyhomepage.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "scopyhomepage.h" - -#include "scopyhomeinfopage.h" - -#include "ui_scopyhomepage.h" - -#include - -#include - -using namespace scopy; -ScopyHomePage::ScopyHomePage(QWidget *parent, PluginManager *pm) - : QWidget(parent) - , ui(new Ui::ScopyHomePage) -{ - ui->setupUi(this); - auto &&is = ui->wInfoPageStack; - auto &&hc = is->getHomepageControls(); - auto &&db = ui->wDeviceBrowser; - add = new ScopyHomeAddPage(this, pm); - - is->add("home", new ScopyHomeInfoPage()); - is->add("add", add); - - // addDevice("dev1","dev1","descr1",new QPushButton("abc"),new QLabel("page1")); - connect(hc, SIGNAL(goLeft()), db, SLOT(prevDevice())); - connect(hc, SIGNAL(goRight()), db, SLOT(nextDevice())); - connect(db, SIGNAL(requestDevice(QString, int)), is, SLOT(slideInKey(QString, int))); - connect(db, SIGNAL(requestDevice(QString, int)), this, SIGNAL(requestDevice(QString))); - connect(this, SIGNAL(deviceAddedToUi(QString)), add, SLOT(deviceAddedToUi(QString))); - - connect(add, SIGNAL(requestAddDevice(QString, QString)), this, SIGNAL(requestAddDevice(QString, QString))); - connect(add, &ScopyHomeAddPage::requestDevice, this, [=](QString id) { Q_EMIT db->requestDevice(id, -1); }); - connect(add, &ScopyHomeAddPage::newDeviceAvailable, this, [=](DeviceImpl *d) { Q_EMIT newDeviceAvailable(d); }); -} - -ScopyHomePage::~ScopyHomePage() { delete ui; } - -void ScopyHomePage::addDevice(QString id, Device *d) -{ - auto &&is = ui->wInfoPageStack; - auto &&db = ui->wDeviceBrowser; - db->addDevice(id, d); - is->add(id, d); - Q_EMIT deviceAddedToUi(id); -} - -void ScopyHomePage::removeDevice(QString id) -{ - auto &&is = ui->wInfoPageStack; - auto &&db = ui->wDeviceBrowser; - db->removeDevice(id); - is->remove(id); -} - -void ScopyHomePage::viewDevice(QString id) -{ - auto &&db = ui->wDeviceBrowser; - Q_EMIT db->requestDevice(id, -1); -} - -void ScopyHomePage::connectDevice(QString id) -{ - auto &&db = ui->wDeviceBrowser; - db->connectDevice(id); -} -void ScopyHomePage::disconnectDevice(QString id) -{ - auto &&db = ui->wDeviceBrowser; - db->disconnectDevice(id); -} - -QPushButton *ScopyHomePage::scanControlBtn() { return ui->btnScan; } - -#include "moc_scopyhomepage.cpp" diff --git a/core/src/scopymainwindow.cpp b/core/src/scopymainwindow.cpp deleted file mode 100644 index e54b982a29..0000000000 --- a/core/src/scopymainwindow.cpp +++ /dev/null @@ -1,539 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "logging_categories.h" -#include "qmessagebox.h" -#include "scopymainwindow.h" -#include "animationmanager.h" - -#include "scanbuttoncontroller.h" -#include "ui_scopymainwindow.h" -#include "scopyhomepage.h" -#include "scopyaboutpage.h" -#include "scopypreferencespage.h" -#include "device.h" - -#include -#include "application_restarter.h" -#include "pluginbase/preferences.h" -#include "pluginbase/scopyjs.h" -#include "iioutil/connectionprovider.h" -#include "pluginbase/messagebroker.h" -#include "scopy-core_config.h" -#include "pluginbase/statusbarmanager.h" -#include "scopytitlemanager.h" -#include -#include -#include -#include -#include -#include -#include - -using namespace scopy; -using namespace scopy::gui; - -Q_LOGGING_CATEGORY(CAT_SCOPY, "Scopy") - -ScopyMainWindow::ScopyMainWindow(QWidget *parent) - : QMainWindow(parent) - , ui(new Ui::ScopyMainWindow) - , m_glLoader(nullptr) -{ - QElapsedTimer timer; - timer.start(); - ui->setupUi(this); - - ScopyTitleManager::setMainWindow(this); - ScopyTitleManager::setApplicationName("Scopy"); - ScopyTitleManager::setScopyVersion("v" + QString(scopy::config::version())); - ScopyTitleManager::setGitHash(QString(SCOPY_VERSION_GIT)); - - StyleHelper::GetInstance()->initColorMap(); - IIOUnitsManager::GetInstance(); - setAttribute(Qt::WA_QuitOnClose, true); - initPythonWIN32(); - initStatusBar(); - initPreferences(); - - ConnectionProvider::GetInstance(); - MessageBroker::GetInstance(); - - // get the version document - auto vc = VersionChecker::GetInstance(); // get VersionCache instance - vc->subscribe(this, - &ScopyMainWindow::receiveVersionDocument); // 'subscribe' to receive the version QJsonDocument - - auto tb = ui->wToolBrowser; - auto ts = ui->wsToolStack; - auto tm = tb->getToolMenu(); - - scanTask = new IIOScanTask(this); - scanTask->setScanParams("usb"); - scanCycle = new CyclicalTask(scanTask, this); - scc = new ScannedIIOContextCollector(this); - pr = new PluginRepository(this); - loadPluginsFromRepository(pr); - - PluginManager *pm = pr->getPluginManager(); - - initAboutPage(pm); - initPreferencesPage(pm); - initTranslations(); - - hp = new ScopyHomePage(this, pm); - ScanButtonController *sbc = new ScanButtonController(scanCycle, hp->scanControlBtn(), this); - - dm = new DeviceManager(pm, this); - dm->setExclusive(true); - - dtm = new DetachedToolWindowManager(this); - toolman = new ToolManager(tm, ts, dtm, this); - toolman->addToolList("home", {}); - toolman->addToolList("add", {}); - - connect(tm, &ToolMenu::toggleAttach, toolman, &ToolManager::toggleAttach); - connect(tb, &ToolBrowser::collapsed, [=](bool coll) { - ui->animHolder->setAnimMin(50); - ui->animHolder->toggleMenu(!coll); - }); - connect(tb, &ToolBrowser::requestTool, ts, &ToolStack::show); - connect(tb, &ToolBrowser::requestTool, dtm, &DetachedToolWindowManager::show); - - ts->add("home", hp); - ts->add("about", about); - ts->add("preferences", prefPage); - - connect(scanTask, SIGNAL(scanFinished(QStringList)), scc, SLOT(update(QStringList))); - - connect(scc, SIGNAL(foundDevice(QString, QString)), dm, SLOT(createDevice(QString, QString))); - connect(scc, SIGNAL(lostDevice(QString, QString)), dm, SLOT(removeDevice(QString, QString))); - - connect(hp, SIGNAL(requestDevice(QString)), this, SLOT(requestTools(QString))); - - connect(hp, SIGNAL(requestAddDevice(QString, QString)), dm, SLOT(createDevice(QString, QString))); - connect(dm, SIGNAL(deviceAdded(QString, Device *)), this, SLOT(addDeviceToUi(QString, Device *))); - - connect(dm, SIGNAL(deviceRemoveStarted(QString, Device *)), scc, SLOT(removeDevice(QString, Device *))); - connect(dm, SIGNAL(deviceRemoveStarted(QString, Device *)), this, SLOT(removeDeviceFromUi(QString))); - - if(dm->getExclusive()) { - // only for device manager exclusive mode - stop scan on connect - connect(dm, SIGNAL(deviceConnected(QString, Device *)), sbc, SLOT(stopScan())); - connect(dm, SIGNAL(deviceDisconnected(QString, Device *)), sbc, SLOT(startScan())); - } - - connect(dm, SIGNAL(deviceConnected(QString, Device *)), scc, SLOT(lock(QString, Device *))); - connect(dm, SIGNAL(deviceConnected(QString, Device *)), toolman, SLOT(lockToolList(QString))); - connect(dm, SIGNAL(deviceConnected(QString, Device *)), hp, SLOT(connectDevice(QString))); - connect(dm, SIGNAL(deviceDisconnected(QString, Device *)), scc, SLOT(unlock(QString, Device *))); - connect(dm, SIGNAL(deviceDisconnected(QString, Device *)), toolman, SLOT(unlockToolList(QString))); - connect(dm, SIGNAL(deviceDisconnected(QString, Device *)), hp, SLOT(disconnectDevice(QString))); - - connect(dm, SIGNAL(requestDevice(QString)), hp, SLOT(viewDevice(QString))); - connect(dm, SIGNAL(requestTool(QString)), toolman, SLOT(showTool(QString))); - - connect(dm, SIGNAL(deviceChangedToolList(QString, QList)), toolman, - SLOT(changeToolListContents(QString, QList))); - sbc->startScan(); - - connect(tb, SIGNAL(requestSave()), this, SLOT(save())); - connect(tb, SIGNAL(requestLoad()), this, SLOT(load())); - - connect(hp, &ScopyHomePage::newDeviceAvailable, dm, &DeviceManager::addDevice); - - initApi(); -#ifdef SCOPY_DEV_MODE - // this is an example of how autoconnect is done - -// auto id = api->addDevice("m2k","ip:127.0.0.1"); -// auto id = api->addDevice("iio","ip:10.48.65.163"); -// auto id = api->addDevice("iio","ip:192.168.2.1"); -// auto id = api->addDevice("test",""); - -// api->connectDevice(id); -// api->switchTool(id, "Oscilloscope"); -#endif - - qInfo(CAT_BENCHMARK) << "ScopyMainWindow constructor took: " << timer.elapsed() << "ms"; -} - -void ScopyMainWindow::initStatusBar() -{ - // clear all margin, except the bottom one, to make room the status bar - statusBar = new ScopyStatusBar(this); - ui->mainWidget->layout()->addWidget(statusBar); -} - -void ScopyMainWindow::save() -{ - QString selectedFilter; - QString fileName = QFileDialog::getSaveFileName(this, tr("Save"), "", "", &selectedFilter); - save(fileName); - ScopyTitleManager::setIniFileName(fileName); -} - -void ScopyMainWindow::load() -{ - QString selectedFilter; - QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), "", "", &selectedFilter); - load(fileName); - ScopyTitleManager::setIniFileName(fileName); -} - -void ScopyMainWindow::save(QString file) -{ - QSettings s(file, QSettings::Format::IniFormat); - dm->save(s); - ScopyTitleManager::setIniFileName(file); -} - -void ScopyMainWindow::load(QString file) -{ - QSettings s(file, QSettings::Format::IniFormat); - dm->load(s); - ScopyTitleManager::setIniFileName(file); -} - -void ScopyMainWindow::closeEvent(QCloseEvent *event) { dm->disconnectAll(); } - -void ScopyMainWindow::requestTools(QString id) { toolman->showToolList(id); } - -ScopyMainWindow::~ScopyMainWindow() -{ - - scanCycle->stop(); - delete ui; -} - -void ScopyMainWindow::initAboutPage(PluginManager *pm) -{ - QElapsedTimer timer; - timer.start(); - about = new ScopyAboutPage(this); - if(!pm) - return; - QList plugin = pm->getOriginalPlugins(); - for(Plugin *p : plugin) { - QString content = p->about(); - if(!content.isEmpty()) { - about->addHorizontalTab(about->buildPage(content), p->name()); - } - } - qInfo(CAT_BENCHMARK) << " Init about page took: " << timer.elapsed() << "ms"; -} - -void ScopyMainWindow::initPreferencesPage(PluginManager *pm) -{ - prefPage = new ScopyPreferencesPage(this); - if(!pm) - return; - - QList plugin = pm->getOriginalPlugins(); - for(Plugin *p : plugin) { - p->initPreferences(); - if(p->loadPreferencesPage()) { - prefPage->addHorizontalTab(p->preferencesPage(), p->name()); - } - } -} - -void ScopyMainWindow::initTranslations() -{ - TranslationsRepository *t = TranslationsRepository::GetInstance(); - t->loadTranslations(Preferences::GetInstance()->get("general_language").toString()); -} - -void ScopyMainWindow::initPreferences() -{ - QElapsedTimer timer; - timer.start(); - QString preferencesPath = scopy::config::preferencesFolderPath() + "/preferences.ini"; - Preferences *p = Preferences::GetInstance(); - p->setPreferencesFilename(preferencesPath); - p->load(); - p->init("general_first_run", true); - p->init("general_save_session", true); - p->init("general_save_attached", true); - p->init("general_doubleclick_attach", true); -#if defined(__arm__) - p->init("general_use_opengl", false); -#else - p->init("general_use_opengl", true); -#endif - p->init("general_use_animations", true); - p->init("general_theme", "default"); - p->init("general_language", "en"); - p->init("show_grid", true); - p->init("show_graticule", false); - p->init("iiowidgets_use_lazy_loading", true); - p->init("general_plot_target_fps", "60"); - p->init("general_show_plot_fps", true); - p->init("general_use_native_dialogs", true); - p->init("general_additional_plugin_path", ""); - p->init("general_load_decoders", true); - p->init("general_doubleclick_ctrl_opens_menu", true); - p->init("general_check_online_version", false); - p->init("general_show_status_bar", true); - - connect(p, SIGNAL(preferenceChanged(QString, QVariant)), this, SLOT(handlePreferences(QString, QVariant))); - - if(p->get("general_use_opengl").toBool()) { - m_glLoader = new QOpenGLWidget(this); - } - if(p->get("general_load_decoders").toBool()) { - loadDecoders(); - } - if(p->get("general_show_status_bar").toBool()) { - StatusBarManager::GetInstance()->setEnabled(true); - } - if(p->get("general_first_run").toBool()) { - license = new LicenseOverlay(this); - auto versionCheckInfo = new VersionCheckMessage(this); - - StatusBarManager::pushWidget(versionCheckInfo, "Should Scopy check for online versions?"); - - QMetaObject::invokeMethod(license, &LicenseOverlay::showOverlay, Qt::QueuedConnection); - } - QString theme = p->get("general_theme").toString(); - QString themeName = "scopy-" + theme; - QIcon::setThemeName(themeName); - QIcon::setThemeSearchPaths({":/gui/icons/" + themeName}); - qInfo(CAT_BENCHMARK) << "Init preferences took: " << timer.elapsed() << "ms"; -} - -void ScopyMainWindow::loadOpenGL() -{ - bool disablePref = false; - QOpenGLContext *ct = QOpenGLContext::currentContext(); - if(ct) { - QOpenGLFunctions *glFuncs = ct->functions(); - bool glCtxValid = ct->isValid(); - QString glVersion = QString((const char *)(glFuncs->glGetString(GL_VERSION))); - qInfo(CAT_BENCHMARK) << "GL_VENDOR " << reinterpret_cast(glFuncs->glGetString(GL_VENDOR)); - qInfo(CAT_BENCHMARK) << "GL_RENDERER " - << reinterpret_cast(glFuncs->glGetString(GL_RENDERER)); - qInfo(CAT_BENCHMARK) << "GL_VERSION " << glVersion; - qInfo(CAT_BENCHMARK) << "GL_EXTENSIONS " - << reinterpret_cast(glFuncs->glGetString(GL_EXTENSIONS)); - qInfo(CAT_BENCHMARK) << "QOpenGlContext valid: " << glCtxValid; - if(!glCtxValid || glVersion.compare("2.0.0", Qt::CaseInsensitive) < 0) { - disablePref = true; - } - } else { - qInfo(CAT_BENCHMARK) << "QOpenGlContext is invalid"; - disablePref = true; - } - - qInfo(CAT_BENCHMARK) << "OpenGL load status: " << !disablePref; - if(disablePref) { - Preferences::GetInstance()->set("general_use_opengl", false); - Preferences::GetInstance()->save(); - RestartDialog *restarter = new RestartDialog(this); - restarter->setDescription( - "Scopy uses OpenGL for high performance plot rendering. Valid OpenGL context (>v2.0.0) not " - "detected.\n" - "Restarting will set Scopy rendering mode to software. This option can be changed from the " - "Preferences " - "menu.\n" - "Please visit the Wiki " - "Analog page for troubleshooting."); - connect(restarter, &RestartDialog::restartButtonClicked, [=] { - ApplicationRestarter::triggerRestart(); - restarter->deleteLater(); - }); - QMetaObject::invokeMethod(restarter, &RestartDialog::showDialog, Qt::QueuedConnection); - } - - delete m_glLoader; - m_glLoader = nullptr; -} - -void ScopyMainWindow::loadPluginsFromRepository(PluginRepository *pr) -{ - - QElapsedTimer timer; - timer.start(); - // Check the local build plugins folder first - // Check if directory exists and it's not empty - QDir pathDir(scopy::config::localPluginFolderPath()); - - if(pathDir.exists() && pathDir.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries).count() != 0) { - pr->init(scopy::config::localPluginFolderPath()); - } else { - pr->init(scopy::config::defaultPluginFolderPath()); - } - -#ifndef Q_OS_ANDROID - QString pluginAdditionalPath = Preferences::GetInstance()->get("general_additional_plugin_path").toString(); - if(!pluginAdditionalPath.isEmpty()) { - pr->init(pluginAdditionalPath); - } -#endif - - qInfo(CAT_BENCHMARK) << "Loading the plugins from the repository took: " << timer.elapsed() << "ms"; -} - -void ScopyMainWindow::showEvent(QShowEvent *event) -{ - QWidget::showEvent(event); - Preferences *p = Preferences::GetInstance(); - if(p->get("general_use_opengl").toBool() && m_glLoader) { - loadOpenGL(); - } -} - -void ScopyMainWindow::handlePreferences(QString str, QVariant val) -{ - Preferences *p = Preferences::GetInstance(); - - if(str == "general_use_opengl") { - Q_EMIT p->restartRequired(); - - } else if(str == "general_use_animations") { - AnimationManager::getInstance().toggleAnimations(val.toBool()); - - } else if(str == "general_theme") { - Q_EMIT p->restartRequired(); - - } else if(str == "general_language") { - Q_EMIT p->restartRequired(); - } else if(str == "general_show_status_bar") { - StatusBarManager::GetInstance()->setEnabled(val.toBool()); - } -} - -void ScopyMainWindow::initPythonWIN32() -{ -#ifdef WIN32 - QString pythonhome; - QString pythonpath; - - pythonpath += QCoreApplication::applicationDirPath() + "\\" + PYTHON_VERSION + ";"; - pythonpath += QCoreApplication::applicationDirPath() + "\\" + PYTHON_VERSION + "\\plat-win;"; - pythonpath += QCoreApplication::applicationDirPath() + "\\" + PYTHON_VERSION + "\\lib-dynload;"; - pythonpath += QCoreApplication::applicationDirPath() + "\\" + PYTHON_VERSION + "\\site-packages;"; - QString scopypythonpath = qgetenv("SCOPY_PYTHONPATH"); - pythonpath += scopypythonpath; - -#ifdef SCOPY_DEV_MODE - pythonhome += QString(BUILD_PYTHON_LIBRARY_DIRS) + ";"; - pythonpath += QString(BUILD_PYTHON_LIBRARY_DIRS) + ";"; - pythonpath += QString(BUILD_PYTHON_LIBRARY_DIRS) + "\\plat-win;"; - pythonpath += QString(BUILD_PYTHON_LIBRARY_DIRS) + "\\lib-dynload;"; - pythonpath += QString(BUILD_PYTHON_LIBRARY_DIRS) + "\\site-packages;"; -#endif - - qputenv("PYTHONHOME", pythonhome.toLocal8Bit()); - qputenv("PYTHONPATH", pythonpath.toLocal8Bit()); - - qInfo(CAT_SCOPY) << "SCOPY_PYTHONPATH: " << scopypythonpath; - qInfo(CAT_SCOPY) << "PYTHONHOME: " << qgetenv("PYTHONHOME"); - qInfo(CAT_SCOPY) << "PYTHONPATH: " << qgetenv("PYTHONPATH"); -#endif -} - -void ScopyMainWindow::loadDecoders() -{ - QElapsedTimer timer; - timer.start(); -#if defined(WITH_SIGROK) && defined(WITH_PYTHON) -#if defined __APPLE__ - QString path = QCoreApplication::applicationDirPath() + "/decoders"; -#elif defined(__appimage__) - QString path = QCoreApplication::applicationDirPath() + "/../lib/decoders"; -#else - QString path = "decoders"; -#endif - - bool success = true; - static bool srd_loaded = false; - if(srd_loaded) { - srd_exit(); - } - - if(srd_init(path.toStdString().c_str()) != SRD_OK) { - qInfo(CAT_SCOPY) << "ERROR: libsigrokdecode init failed."; - success = false; - } else { - srd_loaded = true; - /* Load the protocol decoders */ - srd_decoder_load_all(); - auto decoder = srd_decoder_get_by_id("parallel"); - - if(decoder == nullptr) { - success = false; - qInfo(CAT_SCOPY) << "ERROR: libsigrokdecode load the protocol decoders failed."; - } - } - - if(!success) { - QMessageBox error(this); - error.setText( - tr("ERROR: There was a problem initializing libsigrokdecode. Some features may be missing")); - error.exec(); - } -#else - qInfo(CAT_SCOPY) << "Python or libsigrokdecode are disabled, can't load decoders"; -#endif - qInfo(CAT_BENCHMARK) << "Loading the decoders took: " << timer.elapsed() << "ms"; -} - -void ScopyMainWindow::initApi() -{ - api = new ScopyMainWindow_API(this); - ScopyJS *js = ScopyJS::GetInstance(); - api->setObjectName("scopy"); - js->registerApi(api); -} - -void ScopyMainWindow::addDeviceToUi(QString id, Device *d) -{ - toolman->addToolList(id, d->toolList()); - hp->addDevice(id, d); -} - -void ScopyMainWindow::removeDeviceFromUi(QString id) -{ - toolman->removeToolList(id); - hp->removeDevice(id); -} - -void ScopyMainWindow::receiveVersionDocument(QJsonDocument document) -{ - QJsonValue scopyJson = document["scopy"]; - if(scopyJson.isNull()) { - qWarning(CAT_SCOPY) << "Could not find the entry \"scopy\" in the json document"; - return; - } - - QJsonValue scopyVersion = scopyJson["version"]; - if(scopyVersion.isNull()) { - qWarning(CAT_SCOPY) - << R"(Could not find the entry "version" in the "scopy" entry of the json document)"; - return; - } - - QVersionNumber currentScopyVersion = QVersionNumber::fromString(SCOPY_VERSION).normalized(); - QVersionNumber upstreamScopyVersion = - QVersionNumber::fromString(scopyVersion.toString().remove(0, 1)).normalized(); - - if(upstreamScopyVersion > currentScopyVersion) { - StatusBarManager::pushMessage( - "Your Scopy version of outdated. Please consider updating it. The newest version is " + - upstreamScopyVersion.toString(), - 10000); // 10 sec - } - - qInfo(CAT_SCOPY) << "The upstream scopy version is" << upstreamScopyVersion << "and the current one is" - << currentScopyVersion; -} - -#include "moc_scopymainwindow.cpp" diff --git a/core/src/scopymainwindow_api.cpp b/core/src/scopymainwindow_api.cpp deleted file mode 100644 index 8406fe819f..0000000000 --- a/core/src/scopymainwindow_api.cpp +++ /dev/null @@ -1,199 +0,0 @@ -#include "scopymainwindow_api.h" - -#include "qapplication.h" - -#include -using namespace scopy; - -Q_LOGGING_CATEGORY(CAT_SCOPY_API, "Scopy_API") - -ScopyMainWindow_API::ScopyMainWindow_API(ScopyMainWindow *w) - : ApiObject() - , m_w(w) -{} - -ScopyMainWindow_API::~ScopyMainWindow_API() {} - -void ScopyMainWindow_API::acceptLicense() -{ - if(m_w->license) { - Q_EMIT m_w->license->getContinueBtn()->clicked(); - } - - if(m_w->checkUpdate) { - Q_EMIT m_w->checkUpdate->setCheckVersion(false); - } -} - -QString ScopyMainWindow_API::addDevice(QString cat, QString uri) -{ - Q_ASSERT(m_w->dm != nullptr); - QString devID = ""; - devID = m_w->dm->createDevice(cat, uri, false); - qInfo(CAT_SCOPY_API) << "Device with id " << devID << " has been created!"; - return devID; -} - -bool ScopyMainWindow_API::connectDevice(int idx) -{ - Q_ASSERT(m_w->dm != nullptr); - Device *dev = nullptr; - bool isConnected = false; - bool successfulConnection = false; - QList mapKeys = m_w->dm->map.keys(); - std::sort(mapKeys.begin(), mapKeys.end(), sortByUUID); - if(idx < mapKeys.size()) { - dev = m_w->dm->map[mapKeys[idx]]; - } - if(dev) { - isConnected = m_w->dm->connectedDev.contains(dev->id()); - if(!isConnected) { - dev->connectDev(); - successfulConnection = true; - } else { - qWarning(CAT_SCOPY_API) << "The device is already connected!"; - } - } else { - qWarning(CAT_SCOPY_API) << "The device is not available!"; - } - return successfulConnection; -} - -bool ScopyMainWindow_API::connectDevice(QString devID) -{ - Q_ASSERT(m_w->dm != nullptr); - Device *dev = m_w->dm->getDevice(devID); - bool successfulConnection = false; - if(dev) { - bool isConnected = m_w->dm->connectedDev.contains(dev->id()); - if(!isConnected) { - dev->connectDev(); - successfulConnection = true; - } else { - qWarning(CAT_SCOPY_API) << "The device is already connected!"; - } - } else { - qWarning(CAT_SCOPY_API) << "The device is not available!"; - } - return successfulConnection; -} - -bool ScopyMainWindow_API::disconnectDevice(QString devID) -{ - Q_ASSERT(m_w->dm != nullptr); - Device *dev = m_w->dm->getDevice(devID); - if(dev) { - dev->disconnectDev(); - } else { - qWarning(CAT_SCOPY_API) << "Device with id " << devID << " is not available!"; - return false; - } - return true; -} - -bool ScopyMainWindow_API::disconnectDevice() -{ - Q_ASSERT(m_w->dm != nullptr); - QString devID = ""; - if(!m_w->dm->connectedDev.isEmpty()) { - devID = m_w->dm->connectedDev.back(); - } - Device *dev = m_w->dm->getDevice(devID); - if(dev) { - dev->disconnectDev(); - } else { - qWarning(CAT_SCOPY_API) << "Device with id " << devID << " is not available!"; - return false; - } - return true; -} - -void ScopyMainWindow_API::switchTool(QString devID, QString toolName) -{ - Q_ASSERT(m_w->dm != nullptr); - Device *dev = m_w->dm->getDevice(devID); - if(dev) { - ToolMenuEntry *tool = ToolMenuEntry::findToolMenuEntryByName(dev->toolList(), toolName); - if(!tool) { - qWarning(CAT_SCOPY_API) << "Tool " << toolName << " doesn't exist for " << dev->displayName(); - return; - } - Q_EMIT m_w->dm->requestTool(tool->uuid()); - } else { - qWarning(CAT_SCOPY_API) << "Device with id " << devID << " is not available!"; - } -} - -void ScopyMainWindow_API::switchTool(QString toolName) -{ - Q_ASSERT(m_w->dm != nullptr); - QString devID = ""; - if(!m_w->dm->connectedDev.isEmpty()) { - devID = m_w->dm->connectedDev.back(); - } - Device *dev = m_w->dm->getDevice(devID); - if(dev) { - ToolMenuEntry *tool = ToolMenuEntry::findToolMenuEntryByName(dev->toolList(), toolName); - if(!tool) { - qWarning(CAT_SCOPY_API) << "Tool " << toolName << " doesn't exist for " << dev->displayName(); - return; - } - Q_EMIT m_w->dm->requestTool(tool->uuid()); - } else { - qWarning(CAT_SCOPY_API) << "Device with id " << devID << " is not available!"; - } -} - -void ScopyMainWindow_API::runScript(QString scriptPath, bool exitApp) -{ - QFile file(scriptPath); - if(!file.open(QFile::ReadOnly)) { - qCritical(CAT_SCOPY_API) << "Unable to open the script file: " << scriptPath; - return; - } - const QString scriptContent = getScriptContent(&file); - QJSValue val = ScopyJS::GetInstance()->engine()->evaluate(scriptContent, scriptPath); - int ret = EXIT_SUCCESS; - if(val.isError()) { - qWarning(CAT_SCOPY_API) << "Exception:" << val.toString(); - ret = EXIT_FAILURE; - } else if(!val.isUndefined()) { - qWarning(CAT_SCOPY_API) << val.toString(); - } - - qInfo(CAT_SCOPY_API) << "Script finished with status" << ret; - /* Exit application */ - if(exitApp) - qApp->exit(ret); -} - -void ScopyMainWindow_API::runScriptList(QStringList scriptPathList, bool exitApp) -{ - foreach(QString scriptPath, scriptPathList) { - runScript(scriptPath, false); - } - - if(exitApp) { - int ret = EXIT_SUCCESS; - qApp->exit(ret); - } -} - -const QString ScopyMainWindow_API::getScriptContent(QFile *file) -{ - QTextStream stream(file); - QString firstLine = stream.readLine(); - if(!firstLine.startsWith("#!")) - stream.seek(0); - - QString content = stream.readAll(); - file->close(); - return content; -} - -bool ScopyMainWindow_API::sortByUUID(const QString &k1, const QString &k2) -{ - return k1.split("_").last() < k2.split("_").last(); -} - -#include "moc_scopymainwindow_api.cpp" diff --git a/core/src/scopypreferencespage.cpp b/core/src/scopypreferencespage.cpp deleted file mode 100644 index 8dec85d1bf..0000000000 --- a/core/src/scopypreferencespage.cpp +++ /dev/null @@ -1,237 +0,0 @@ -#include "scopypreferencespage.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "gui/preferenceshelper.h" -#include "application_restarter.h" -#include -#include -#include -#include -#include -#include -#include - -Q_LOGGING_CATEGORY(CAT_PREFERENCESPAGE, "ScopyPreferencesPage"); - -using namespace scopy; -ScopyPreferencesPage::ScopyPreferencesPage(QWidget *parent) - : QWidget(parent) - , tabWidget(new QTabWidget(this)) - , layout(new QVBoxLayout(this)) -{ - initUI(); - initRestartWidget(); - - addHorizontalTab(buildGeneralPreferencesPage(), "General"); -} - -void ScopyPreferencesPage::initUI() -{ - layout->setMargin(0); - layout->setSpacing(0); - this->setLayout(layout); - layout->addWidget(tabWidget); - - StyleHelper::BackgroundPage(tabWidget, "preferencesTable"); - StyleHelper::TabWidgetEastMenu(tabWidget, "preferencesTable"); -} - -void ScopyPreferencesPage::addHorizontalTab(QWidget *w, QString text) -{ - w->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - - QWidget *pane = new QWidget(); - QHBoxLayout *lay = new QHBoxLayout(); - lay->setMargin(10); - pane->setLayout(lay); - - QScrollArea *scrollArea = new QScrollArea(); - scrollArea->setWidget(w); - scrollArea->setWidgetResizable(true); - scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - lay->addWidget(scrollArea); - - // Hackish - so we don't override paint event - tabWidget->addTab(pane, ""); - QLabel *lbl1 = new QLabel(); - StyleHelper::TabWidgetLabel(lbl1, "tabWidgetLabel"); - lbl1->setText(text); - QTabBar *tabbar = tabWidget->tabBar(); - tabbar->setTabButton(tabbar->count() - 1, QTabBar::RightSide, lbl1); -} - -ScopyPreferencesPage::~ScopyPreferencesPage() {} - -void ScopyPreferencesPage::initRestartWidget() -{ - restartWidget = new QWidget(); - QHBoxLayout *lay = new QHBoxLayout(); - lay->setSpacing(0); - lay->setMargin(10); - restartWidget->setLayout(lay); - restartWidget->setVisible(false); - QLabel *lab = new QLabel("An application restart is required for these settings to take effect. "); - QSpacerItem *space1 = new QSpacerItem(6, 20, QSizePolicy::Expanding, QSizePolicy::Fixed); - QSpacerItem *space2 = new QSpacerItem(6, 20, QSizePolicy::Preferred, QSizePolicy::Fixed); - QPushButton *btn = new QPushButton("Restart"); - StyleHelper::BlueButton(btn, "RestartBtn"); - StyleHelper::BackgroundWidget(restartWidget, "restartWidget"); - btn->setFixedWidth(100); - - lay->addWidget(btn); - lay->addSpacerItem(space2); - lay->addWidget(lab); - lay->addSpacerItem(space1); - layout->addWidget(restartWidget); - - connect(btn, &QPushButton::clicked, btn, []() { ApplicationRestarter::triggerRestart(); }); - connect(Preferences::GetInstance(), &Preferences::restartRequired, this, - [=]() { restartWidget->setVisible(true); }); -} - -QWidget *ScopyPreferencesPage::buildSaveSessionPreference() -{ - Preferences *p = Preferences::GetInstance(); - QWidget *w = new QWidget(this); - QHBoxLayout *lay = new QHBoxLayout(w); - lay->setMargin(0); - - lay->addWidget( - PreferencesHelper::addPreferenceCheckBox(p, "general_save_session", "Save/Load Scopy session", this)); - lay->addSpacerItem(new QSpacerItem(40, 40, QSizePolicy::Expanding, QSizePolicy::Fixed)); - lay->addWidget(new QLabel("Settings files location ", this)); - QPushButton *navigateBtn = new QPushButton("Open", this); - StyleHelper::BlueButton(navigateBtn, "navigateBtn"); - navigateBtn->setMaximumWidth(80); - connect(navigateBtn, &QPushButton::clicked, this, - [=]() { QDesktopServices::openUrl(scopy::config::settingsFolderPath()); }); - lay->addWidget(navigateBtn); - return w; -} - -void ScopyPreferencesPage::removeIniFiles(bool backup) -{ - QString dir = scopy::config::settingsFolderPath(); - QDir loc(dir); - QFileInfoList plugins = loc.entryInfoList(QDir::Files); - QStringList settingsFiles; - - for(const QFileInfo &p : plugins) { - if(p.suffix() == "ini") - settingsFiles.append(p.absoluteFilePath()); - } - qInfo(CAT_PREFERENCESPAGE) << "Removing ini files .. "; - for(auto &&file : settingsFiles) { - if(backup) { - QFile(file + ".bak").remove(); - QFile(file).rename(file + ".bak"); - qDebug(CAT_PREFERENCESPAGE) << "Renamed" << file << "to" << file << ".bak"; - } else { - QFile(file).remove(); - qDebug(CAT_PREFERENCESPAGE) << "Removed" << file; - } - } -} - -void ScopyPreferencesPage::resetScopyPreferences() -{ - Preferences *p = Preferences::GetInstance(); - removeIniFiles(); - p->clear(); - Q_EMIT Preferences::GetInstance()->restartRequired(); -} - -QWidget *ScopyPreferencesPage::buildResetScopyDefaultButton() -{ - QWidget *w = new QWidget(this); - QHBoxLayout *lay = new QHBoxLayout(w); - - QPushButton *resetBtn = new QPushButton("Reset", this); - StyleHelper::BlueButton(resetBtn, "resetBtn"); - resetBtn->setMaximumWidth(80); - connect(resetBtn, &QPushButton::clicked, this, &ScopyPreferencesPage::resetScopyPreferences); - lay->addWidget(resetBtn); - lay->setMargin(0); - lay->addSpacerItem(new QSpacerItem(6, 40, QSizePolicy::Preferred, QSizePolicy::Fixed)); - lay->addWidget(new QLabel("Reset to settings and plugins to default")); - lay->addSpacerItem(new QSpacerItem(40, 40, QSizePolicy::Expanding, QSizePolicy::Fixed)); - - return w; -} - -QWidget *ScopyPreferencesPage::buildGeneralPreferencesPage() -{ - QWidget *page = new QWidget(this); - QVBoxLayout *lay = new QVBoxLayout(page); - Preferences *p = Preferences::GetInstance(); - TranslationsRepository *t = scopy::TranslationsRepository::GetInstance(); - - lay->setMargin(0); - lay->setSpacing(10); - page->setLayout(lay); - - // General preferences - MenuSectionWidget *generalWidget = new MenuSectionWidget(page); - MenuCollapseSection *generalSection = - new MenuCollapseSection("General", MenuCollapseSection::MHCW_NONE, generalWidget); - generalWidget->contentLayout()->setSpacing(10); - generalWidget->contentLayout()->addWidget(generalSection); - generalSection->contentLayout()->setSpacing(10); - lay->addWidget(generalWidget); - lay->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - - generalSection->contentLayout()->addWidget(buildSaveSessionPreference()); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_save_attached", "Save/Load tool attached state", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_doubleclick_attach", "Doubleclick to attach/detach tool", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_doubleclick_ctrl_opens_menu", "Doubleclick control buttons to open menu", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_use_opengl", "Enable OpenGL plotting", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_use_animations", "Enable menu animations", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_check_online_version", "Enable automatic online check for updates.", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "general_show_status_bar", "Enable the status bar for displaying important messages.", - generalSection)); - generalSection->contentLayout()->addWidget( - PreferencesHelper::addPreferenceCheckBox(p, "show_grid", "Show Grid", generalSection)); - generalSection->contentLayout()->addWidget( - PreferencesHelper::addPreferenceCheckBox(p, "show_graticule", "Show Graticule", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCheckBox( - p, "iiowidgets_use_lazy_loading", "Use Lazy Loading", generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCombo( - p, "general_theme", "Theme", {"default", "light"}, generalSection)); - generalSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCombo( - p, "general_language", "Language", t->getLanguages(), generalSection)); - - // Debug preferences - MenuSectionWidget *debugWidget = new MenuSectionWidget(page); - MenuCollapseSection *debugSection = - new MenuCollapseSection("Debug", MenuCollapseSection::MHCW_NONE, debugWidget); - debugWidget->contentLayout()->setSpacing(10); - debugWidget->contentLayout()->addWidget(debugSection); - debugSection->contentLayout()->setSpacing(10); - lay->addWidget(debugWidget); - lay->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - - debugSection->contentLayout()->addWidget( - PreferencesHelper::addPreferenceCheckBox(p, "general_show_plot_fps", "Show plot FPS", debugSection)); - debugSection->contentLayout()->addWidget(PreferencesHelper::addPreferenceCombo( - p, "general_plot_target_fps", "Plot target FPS", {"15", "20", "30", "60"}, debugSection)); - debugSection->contentLayout()->addWidget(buildResetScopyDefaultButton()); - - return page; -} - -#include "moc_scopypreferencespage.cpp" diff --git a/core/src/scopytitlemanager.cpp b/core/src/scopytitlemanager.cpp deleted file mode 100644 index 4debfd163e..0000000000 --- a/core/src/scopytitlemanager.cpp +++ /dev/null @@ -1,152 +0,0 @@ -#include "scopytitlemanager.h" - -#include -#include -#include - -#define TITLE_SEPARATOR " - " -Q_LOGGING_CATEGORY(CAT_SCOPYTITLEMANAGER, "ScopyTitleManager") - -using namespace scopy; - -ScopyTitleManager *ScopyTitleManager::pinstance_{nullptr}; - -ScopyTitleManager::ScopyTitleManager(QObject *parent) - : QObject(parent) -{ - qDebug(CAT_SCOPYTITLEMANAGER) << "ctor"; -} - -ScopyTitleManager::~ScopyTitleManager() { qDebug(CAT_SCOPYTITLEMANAGER) << "dtor"; } - -void ScopyTitleManager::buildTitle() -{ - QString result; - bool addSeparator = false; - - if(!m_title.isEmpty()) { - result = m_title; - addSeparator = true; - } - - if(!m_version.isEmpty()) { - if(addSeparator) { - result += TITLE_SEPARATOR; - } - - result += m_version; - addSeparator = true; - } - - if(!m_hash.isEmpty()) { - if(addSeparator) { - result += TITLE_SEPARATOR; - } - - result += m_hash; - addSeparator = true; - } - - if(!m_filename.isEmpty()) { - if(addSeparator) { - result += TITLE_SEPARATOR; - } - - result += m_filename; - addSeparator = true; - } - - m_currentTitle = result; - auto instance = ScopyTitleManager::GetInstance(); - if(instance->m_mainWindow) { - instance->m_mainWindow->setWindowTitle(instance->m_currentTitle); - qDebug(CAT_SCOPYTITLEMANAGER) << "Title was built: " << m_currentTitle; - } else { - qWarning(CAT_SCOPYTITLEMANAGER) << "Cannot set title, no mainWidget was specified"; - } -} - -ScopyTitleManager *ScopyTitleManager::GetInstance() -{ - if(pinstance_ == nullptr) { - pinstance_ = new ScopyTitleManager(QApplication::instance()); // singleton has the app as parent - } else { - qDebug(CAT_SCOPYTITLEMANAGER) << "Singleton instance already created."; - } - return pinstance_; -} - -void ScopyTitleManager::setApplicationName(QString title) -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_title = title; - instance->buildTitle(); -} - -void ScopyTitleManager::clearApplicationName() -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_title.clear(); - instance->buildTitle(); -} - -void ScopyTitleManager::setScopyVersion(QString version) -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_version = version; - instance->buildTitle(); -} - -void ScopyTitleManager::clearScopyVersion() -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_version.clear(); - instance->buildTitle(); -} - -void ScopyTitleManager::setGitHash(QString hash) -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_hash = hash; - instance->buildTitle(); -} - -void ScopyTitleManager::clearGitHash() -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_hash.clear(); - instance->buildTitle(); -} - -void ScopyTitleManager::setIniFileName(QString filename) -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_filename = filename; - instance->buildTitle(); -} - -void ScopyTitleManager::clearIniFileName() -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_filename.clear(); - instance->buildTitle(); -} - -void ScopyTitleManager::clearAll() -{ - auto instance = ScopyTitleManager::GetInstance(); - instance->m_title.clear(); - instance->m_version.clear(); - instance->m_hash.clear(); - instance->m_filename.clear(); -} - -QString ScopyTitleManager::getCurrentTitle() { return ScopyTitleManager::GetInstance()->m_currentTitle; } - -void ScopyTitleManager::setMainWindow(QWidget *window) -{ - ScopyTitleManager::GetInstance()->m_mainWindow = window; - qDebug(CAT_SCOPYTITLEMANAGER) << "Main window was set."; -} - -#include "moc_scopytitlemanager.cpp" diff --git a/core/src/toolbrowser.cpp b/core/src/toolbrowser.cpp deleted file mode 100644 index fd6ee728b3..0000000000 --- a/core/src/toolbrowser.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include "toolbrowser.h" - -#include "ui_toolbrowser.h" - -#include - -#include - -using namespace scopy; - -ToolBrowser::ToolBrowser(QWidget *parent) - : QWidget(parent) - , ui(new Ui::ToolBrowser) - , m_collapsed(false) -{ - ui->setupUi(this); - - ToolMenu *tm = ui->wToolMenu; - - tm->getButtonGroup()->addButton(ui->btnPreferences); - tm->getButtonGroup()->addButton(ui->btnAbout); - - ToolMenuItem *homeTmi = tm->createTool("home", "Home", ":/gui/icons/scopy-default/icons/tool_home.svg"); - homeTmi->setSeparator(true, true); - homeTmi->getToolRunBtn()->setVisible(false); - homeTmi->setEnabled(true); - ui->homePlaceholder->layout()->addWidget(homeTmi); - Util::retainWidgetSizeWhenHidden(ui->logo); - homeTmi->setDraggable(false); - - connect(ui->btnCollapse, &QPushButton::clicked, this, &ToolBrowser::toggleCollapse); - connect(ui->btnCollapseMini, &QPushButton::clicked, this, &ToolBrowser::toggleCollapse); - connect(ui->btnPreferences, &QPushButton::clicked, this, [=]() { Q_EMIT requestTool("preferences"); }); - connect(ui->btnAbout, &QPushButton::clicked, this, [=]() { Q_EMIT requestTool("about"); }); - - connect(ui->btnSave, &QPushButton::clicked, this, [=]() { Q_EMIT requestSave(); }); - connect(ui->btnLoad, &QPushButton::clicked, this, [=]() { Q_EMIT requestLoad(); }); - - connect(tm, SIGNAL(requestToolSelect(QString)), this, SIGNAL(requestTool(QString))); -} - -ToolMenu *ToolBrowser::getToolMenu() { return ui->wToolMenu; } - -void ToolBrowser::hideMenuText(bool collapsed) -{ - ToolMenu *tm = ui->wToolMenu; - - if(collapsed) { - setMinimumWidth(50); - ui->btnLoad->setText(""); - ui->btnSave->setText(""); - ui->btnAbout->setText(""); - ui->btnPreferences->setText(""); - - } else { - setMinimumWidth(200); - ui->btnLoad->setText(tr("Load")); - ui->btnSave->setText(tr("Save")); - ui->btnAbout->setText(tr("About")); - ui->btnPreferences->setText(tr("Preferences")); - } - ui->btnCollapse->setVisible(!collapsed); - ui->logo->setVisible(!collapsed); - tm->hideMenuText(collapsed); -} - -void ToolBrowser::toggleCollapse() -{ - m_collapsed = !m_collapsed; - hideMenuText(m_collapsed); - Q_EMIT collapsed(m_collapsed); -} - -ToolBrowser::~ToolBrowser() { delete ui; } - -// TEST -/* - ts->detachTool("home"); - tm->addTool("home1","Home12",""); - tm->addTool("home2","Home2",""); - tm->addTool("home3","Home3",""); - tm->getToolMenuItemFor("home1")->setToolEnabled(true); - tm->getToolMenuItemFor("home2")->setToolEnabled(true); - tm->getToolMenuItemFor("home3")->setToolEnabled(true); - - ts->addTool("home1", new QLabel("home1")); - ts->addTool("home2", new QLabel("home2")); - ts->addTool("home3", new QLabel("home3")); -*/ - -#include "moc_toolbrowser.cpp" diff --git a/core/src/toolmanager.cpp b/core/src/toolmanager.cpp deleted file mode 100644 index beffb503a6..0000000000 --- a/core/src/toolmanager.cpp +++ /dev/null @@ -1,264 +0,0 @@ -#include "toolmanager.h" - -#include "dynamicWidget.h" -#include "pluginbase/preferences.h" - -#include -#include -#include - -#include - -Q_LOGGING_CATEGORY(CAT_TOOLMANAGER, "ToolManager") -using namespace scopy; - -ToolManager::ToolManager(ToolMenu *tm, ToolStack *ts, DetachedToolWindowManager *dwm, QObject *parent) - : QObject(parent) -{ - currentKey = ""; - this->tm = tm; - this->ts = ts; - this->dwm = dwm; - qDebug(CAT_TOOLMANAGER) << "ctor"; -} - -ToolManager::~ToolManager() { qDebug(CAT_TOOLMANAGER) << "dtor"; } - -void ToolManager::addToolList(QString s, QList sl) -{ - qDebug(CAT_TOOLMANAGER) << "added" << s << "with " << sl.length() << "entries"; - map[s] = {s, sl, false}; - if(map.count() == 1) { - qDebug(CAT_TOOLMANAGER) << "first item, currentkey = " << s; - currentKey = s; - showToolList(s); - } - for(ToolMenuEntry *tme : qAsConst(map[s].tools)) { - connect(tme, SIGNAL(updateToolAttached(bool)), this, SLOT(updateToolAttached(bool))); - connect(tme, SIGNAL(updateTool(QWidget *)), this, SLOT(updateTool(QWidget *))); - } -} - -void ToolManager::removeToolList(QString s) -{ - qDebug(CAT_TOOLMANAGER) << "removing" << s; - if(currentKey == s) { - hideToolList(s); - } - - for(ToolMenuEntry *tme : qAsConst(map[s].tools)) { - disconnect(tme, SIGNAL(updateToolAttached(bool)), this, SLOT(updateToolAttached(bool))); - disconnect(tme, SIGNAL(updateTool(QWidget *)), this, SLOT(updateTool(QWidget *))); - } - map.take(s); -} - -void ToolManager::changeToolListContents(QString s, QList sl) -{ - bool prev = map[s].lock; - qInfo(CAT_TOOLMANAGER) << "changing" << s; - removeToolList(s); - addToolList(s, sl); - if(prev == true || currentKey == s) { - showToolList(s); - } -} - -void ToolManager::showToolList(QString s) -{ - if(!map[currentKey].lock) - hideToolList(currentKey); - currentKey = s; - - qDebug(CAT_TOOLMANAGER) << "showing" << s; - for(ToolMenuEntry *tme : qAsConst(map[s].tools)) { - ToolMenuItem *m = tm->getToolMenuItemFor(tme->uuid()); - if(m == nullptr) { - m = tm->addTool(tme->uuid(), tme->name(), tme->icon()); - connect(tme, SIGNAL(updateToolEntry()), this, SLOT(updateToolEntry())); - connect(m->getToolRunBtn(), SIGNAL(toggled(bool)), tme, SIGNAL(runToggled(bool))); - connect(m->getToolRunBtn(), SIGNAL(clicked(bool)), tme, SIGNAL(runClicked(bool))); - } - updateToolEntry(tme); - } -} - -void ToolManager::hideToolList(QString s) -{ - qDebug(CAT_TOOLMANAGER) << "hiding" << s; - for(ToolMenuEntry *tme : qAsConst(map[s].tools)) { - if(tm->getToolMenuItemFor(tme->uuid()) != nullptr) { - disconnect(tme, SIGNAL(updateToolEntry()), this, SLOT(updateToolEntry())); - tm->removeTool(tme->uuid()); - } - } -} - -void ToolManager::lockToolList(QString s) -{ - map[s].lock = true; - lockedToolLists.append(s); - qDebug(CAT_TOOLMANAGER) << "locking" << s; - if(currentKey != s) { - showToolList(s); - } -} - -void ToolManager::unlockToolList(QString s) -{ - map[s].lock = false; - lockedToolLists.removeOne(s); - qDebug(CAT_TOOLMANAGER) << "unlocking" << s; - if(currentKey != s) { - hideToolList(s); - } -} - -void ToolManager::updateToolEntry(ToolMenuEntry *tme) -{ - auto m = tm->getToolMenuItemFor(tme->uuid()); - m->setVisible(tme->visible()); - m->setEnabled(tme->enabled()); - m->setName(tme->name()); - m->getToolRunBtn()->setEnabled(tme->runEnabled()); - m->getToolRunBtn()->setEnabled(tme->runBtnVisible()); - m->getToolRunBtn()->setChecked(tme->running()); - Util::retainWidgetSizeWhenHidden(m, tme->visible()); - qDebug(CAT_TOOLMANAGER) << "updating toolmenuentry for " << tme->name() << " - " << tme->uuid(); -} - -void ToolManager::updateToolEntry() -{ - ToolMenuEntry *tme = dynamic_cast(QObject::sender()); - Q_ASSERT(tme); - updateToolEntry(tme); -} - -void ToolManager::updateTool(QWidget *old) -{ - - ToolMenuEntry *tme = dynamic_cast(QObject::sender()); - Q_ASSERT(tme); - QString id = tme->uuid(); - QWidget *tool = tme->tool(); - - if(old != nullptr) { // we had a widget - saveToolAttachedState(tme); - if(ts->contains(id)) { - ts->remove(id); - } - if(dwm->contains(id)) { - dwm->remove(id); - } - } - if(tool != nullptr) { // we have a new widget - if(tme->attached()) { - ts->add(id, tool); - } else { - dwm->add(id, tme); - } - loadToolAttachedState(tme); - } - - qDebug(CAT_TOOLMANAGER) << "updating tool for " << tme->name() << " - " << id; -} - -void ToolManager::updateToolAttached(bool oldAttach) -{ - ToolMenuEntry *tme = dynamic_cast(QObject::sender()); - Q_ASSERT(tme); - QWidget *tool = tme->tool(); - QString id = tme->uuid(); - - if(tme->attached()) { - // tool is detached, it will attach to the main window - if(dwm->contains(id)) { - dwm->remove(id); - } - ts->add(id, tool); - tm->attachSuccesful(id); - } else { - // tool is attached, it will detach - if(ts->contains(id)) { - ts->remove(id); - } - dwm->add(id, tme); - tm->detachSuccesful(id); - } - - // by this time, the tool has changed it's state, either from attached to detached, or from detached to attached - saveToolAttachedState(tme); - showTool(id); - - // highlight the current tool from the main window - if(tme->attached()) { - // the selected tool just attached, so it will be at the top of the stack, therefore highlighted - auto t = tm->getToolMenuItemFor(id); - - if(t) { - t->getToolBtn()->setChecked(true); - setDynamicProperty(t, "selected", true); - } - } else { - // the top tool just detached, so we need to find the tool that is positioned at the new top of the - // stack. - auto ts_current_widget = ts->currentWidget(); - auto ts_current_widget_key = ts->getKey(ts_current_widget); - auto t = tm->getToolMenuItemFor(ts_current_widget_key); - - if(t) { - t->getToolBtn()->toggle(); - } - } -} - -void ToolManager::showTool(QString s) -{ - auto toolmenuitem = tm->getToolMenuItemFor(s); - if(toolmenuitem) - toolmenuitem->getToolBtn()->setChecked(true); - Q_EMIT tm->requestToolSelect(s); -} - -void ToolManager::toggleAttach(QString id) -{ - Preferences *p = Preferences::GetInstance(); - if(!p->get("general_doubleclick_attach").toBool()) - return; - for(auto &&toolist : map) { - for(auto &&tme : toolist.tools) { - if(tme->uuid() == id) { - tme->setAttached(!tme->attached()); - } - } - } -} - -void ToolManager::saveToolAttachedState(ToolMenuEntry *tme) -{ - Preferences *p = Preferences::GetInstance(); - if(!p->get("general_save_attached").toBool()) - return; - QString prefId; - prefId = tme->id() + "_attached"; - bool attach = tme->attached(); - p->set(prefId, attach); - qDebug(CAT_TOOLMANAGER) << "Saving " << prefId << " " << attach; -} - -void ToolManager::loadToolAttachedState(ToolMenuEntry *tme) -{ - Preferences *p = Preferences::GetInstance(); - QString prefId; - if(!p->get("general_save_attached").toBool()) - return; - // QString prefGrp = m_name; - - prefId = tme->id() + "_attached"; - p->init(prefId, tme->attached()); - bool attach = p->get(prefId).toBool(); - tme->setAttached(attach); - qDebug(CAT_TOOLMANAGER) << "Loading " << prefId << " " << attach; -} - -#include "moc_toolmanager.cpp" diff --git a/core/src/toolmenu.cpp b/core/src/toolmenu.cpp deleted file mode 100644 index d77943ba7e..0000000000 --- a/core/src/toolmenu.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2019 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "toolmenu.h" - -#include "gui/dynamicWidget.h" - -#include - -using namespace scopy; - -ToolMenu::ToolMenu(QWidget *parent) - : BaseMenu(parent) -{ - buttonGroup = new QButtonGroup(this); - - connect(this, &ToolMenu::itemMovedFromTo, this, &ToolMenu::_updateToolList); -} - -ToolMenuItem *ToolMenu::getToolMenuItemFor(QString toolId) -{ - for(auto &&tool : tools) { - if(tool->getId() == toolId) - return tool; - } - return nullptr; -} - -ToolMenuItem *ToolMenu::createTool(QString id, QString name, QString icon, int position) -{ - ToolMenuItem *t = new ToolMenuItem(id, name, icon, this); - insertMenuItem(t, position); - if(position == -1) { - tools.append(t); - } else { - tools.insert(position, t); - } - buttonGroup->addButton(t->getToolBtn()); - - connect(t->getToolBtn(), &QPushButton::clicked, this, [=]() { Q_EMIT requestToolSelect(t->getId()); }); - - connect(t, &ToolMenuItem::doubleclick, this, [=]() { Q_EMIT toggleAttach(t->getId()); }); - - connect(t->getToolBtn(), &QPushButton::toggled, this, [=](bool on) { - if(buttonGroup->id(t->getToolBtn()) != -1) { - setDynamicProperty(t, "selected", on); - } - }); - - return t; -} -ToolMenuItem *ToolMenu::addTool(QString id, QString name, QString icon, int position) -{ - ToolMenuItem *t = createTool(id, name, icon, position); - insertMenuItem(t, position); - - return t; -} - -void ToolMenu::detachSuccesful(QString tool) -{ - auto &&t = getToolMenuItemFor(tool); - if(t) { - setDynamicProperty(t, "selected", false); - buttonGroup->removeButton(t->getToolBtn()); - } -} - -void ToolMenu::attachSuccesful(QString tool) -{ - auto &&t = getToolMenuItemFor(tool); - if(t) { - buttonGroup->addButton(t->getToolBtn()); - } -} - -bool ToolMenu::removeTool(QString id) -{ - for(int i = 0; i < tools.size(); i++) { - if(tools[i]->getId() == id) { - delete tools[i]; - tools.remove(i); - return true; - } - } - return false; -} - -bool ToolMenu::removeTool(ToolMenuItem *tmi) -{ - for(int i = 0; i < tools.size(); i++) { - if(tools[i] == tmi) { - delete tools[i]; - tools.remove(i); - return true; - } - } - return false; -} - -const QVector &ToolMenu::getTools() const { return tools; } - -QButtonGroup *ToolMenu::getButtonGroup() const { return buttonGroup; } - -void ToolMenu::_updateToolList(short from, short to) -{ - if(d_items == tools.size()) { - auto toMove = tools[from]; - tools.remove(from); - tools.insert(to, toMove); - } -} - -ToolMenu::~ToolMenu() { _saveState(); } - -void ToolMenu::hideMenuText(bool val) -{ - for(auto &&tool : tools) { - tool->hideText(val); - } -} - -void ToolMenu::_saveState() -{ - // QSettings settings; - - // settings.beginWriteArray("toolMenu/pos"); - // for (int i = 0; i < d_tools.size(); ++i) { - // settings.setArrayIndex(i); - // settings.setValue("idx", QVariant(d_tools[i].second)); - // } - // settings.endArray(); -} - -void ToolMenu::_loadState() -{ - // QSettings settings; - - // int n = settings.beginReadArray("toolMenu/pos"); - // for (int i = 0; i < n; ++i) { - // settings.setArrayIndex(i); - // d_positions.push_back(settings.value("idx").value()); - // } - // settings.endArray(); -} - -#include "moc_toolmenu.cpp" diff --git a/core/src/toolmenuitem.cpp b/core/src/toolmenuitem.cpp deleted file mode 100644 index da7f4a5033..0000000000 --- a/core/src/toolmenuitem.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2019 Analog Devices Inc. - * - * This file is part of Scopy - * (see http://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "toolmenuitem.h" - -#include "gui/dynamicWidget.h" -#include "gui/utils.h" -#include "qdebug.h" - -#include -#include -#include - -using namespace scopy; -Q_LOGGING_CATEGORY(CAT_TOOLMENUITEM, "ToolMenuItem") - -ToolMenuItem::ToolMenuItem(QString id, QString name, QString iconPath, QWidget *parent) - : BaseMenuItem(parent) - , toolBtn(nullptr) - , toolRunBtn(nullptr) - , id(id) - , name(name) - , iconPath(iconPath) -{ - _buildUI(); - - // Load stylesheets - this->setStyleSheet(Util::loadStylesheetFromFile(":/gui/stylesheets/toolMenuItem.qss")); - setAttribute(Qt::WA_StyledBackground, true); -#ifdef __ANDROID__ - setDynamicProperty(this, "allowHover", false); -#else - setDynamicProperty(this, "allowHover", true); - enableDoubleClick(true); -#endif -} - -ToolMenuItem::~ToolMenuItem() {} - -QPushButton *ToolMenuItem::getToolBtn() const { return toolBtn; } - -QPushButton *ToolMenuItem::getToolRunBtn() const { return toolRunBtn; } - -// void ToolMenuItem::setToolEnabled(bool enabled) -//{ -// BaseMenuItem::setVisible(enabled); -// Util::retainWidgetSizeWhenHidden(this, enabled); -// setEnabled(enabled); -//} - -void ToolMenuItem::enableDoubleClick(bool enable) -{ - if(enable) { - toolBtn->installEventFilter(this); - } else { - toolBtn->removeEventFilter(this); - removeEventFilter(this); - } -} - -void ToolMenuItem::setSeparator(bool top, bool bot) -{ - _enableBotSeparator(bot); - _enableTopSeparator(top); -} - -bool ToolMenuItem::eventFilter(QObject *watched, QEvent *event) -{ - if(event->type() == QEvent::MouseButtonDblClick) { - QMouseEvent *mouseEvent = static_cast(event); - if(mouseEvent->button() == Qt::LeftButton) { - if(isEnabled()) { - Q_EMIT doubleclick(); - return true; - } - } - } - - return QObject::event(event); -} - -void ToolMenuItem::setName(QString str) -{ - this->name = str; - toolBtn->setText(name); -} - -void ToolMenuItem::hideText(bool hidden) -{ - if(hidden) { - toolBtn->setText(""); - } else { - toolBtn->setText(name); - } -} - -void ToolMenuItem::setDisabled(bool disabled) { BaseMenuItem::setDisabled(disabled); } - -void ToolMenuItem::mouseMoveEvent(QMouseEvent *event) -{ -#ifndef __ANDROID__ - BaseMenuItem::mouseMoveEvent(event); - setDynamicProperty(this, "allowHover", false); -#endif -} - -const QString &ToolMenuItem::getId() const { return id; } - -void ToolMenuItem::enterEvent(QEvent *event) -{ -#ifndef __ANDROID__ - setDynamicProperty(this, "allowHover", true); - event->accept(); -#endif -} - -void ToolMenuItem::leaveEvent(QEvent *event) -{ -#ifndef __ANDROID__ - setDynamicProperty(this, "allowHover", false); - event->accept(); -#endif -} - -void ToolMenuItem::dragMoveEvent(QDragMoveEvent *event) -{ -#ifndef __ANDROID__ - setDynamicProperty(this, "allowHover", false); - BaseMenuItem::dragMoveEvent(event); -#endif -} - -void ToolMenuItem::dragLeaveEvent(QDragLeaveEvent *event) -{ -#ifndef __ANDROID__ - setDynamicProperty(this, "allowHover", true); - BaseMenuItem::dragLeaveEvent(event); -#endif -} - -void ToolMenuItem::_buildUI() -{ - QWidget *main = new QWidget(this); - QVBoxLayout *mainLayout = new QVBoxLayout(main); - mainLayout->setSpacing(0); - mainLayout->setContentsMargins(0, 0, 0, 0); - - QWidget *toolOption = new QWidget(this); - QHBoxLayout *layout = new QHBoxLayout(toolOption); - layout->setSpacing(0); - layout->setContentsMargins(0, 0, 0, 0); - toolBtn = new QPushButton(name); - toolBtn->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - toolRunBtn = new CustomPushButton(this); - layout->addWidget(toolBtn); - layout->addWidget(toolRunBtn); - - setDynamicProperty(toolRunBtn, "stopButton", true); - toolRunBtn->setMaximumSize(32, 32); - toolBtn->setMinimumHeight(42); - - toolBtn->setIcon(QIcon::fromTheme(iconPath)); - toolBtn->setCheckable(true); - toolBtn->setIconSize(QSize(32, 32)); - - toolRunBtn->setCheckable(true); - toolRunBtn->setText(""); - - toolBtn->setFlat(true); - toolRunBtn->setFlat(true); - qDebug(CAT_TOOLMENUITEM) << toolRunBtn; - - mainLayout->addWidget(toolOption); - - setMaximumHeight(44); - - setEnabled(false); - setVisible(false); - - setWidget(main); -} - -#include "moc_toolmenuitem.cpp" diff --git a/core/src/toolstack.cpp b/core/src/toolstack.cpp deleted file mode 100644 index 39c01e2ccf..0000000000 --- a/core/src/toolstack.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "toolstack.h" - -#include -#include -#include - -using namespace scopy; - -Q_LOGGING_CATEGORY(CAT_TOOLSTACK, "ToolStack") - -ToolStack::ToolStack(QWidget *parent) - : MapStackedWidget(parent) -{} - -ToolStack::~ToolStack() {} - -#include "moc_toolstack.cpp" diff --git a/core/src/translationsrepository.cpp b/core/src/translationsrepository.cpp deleted file mode 100644 index 8d6ebd6858..0000000000 --- a/core/src/translationsrepository.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "translationsrepository.h" - -#include "common/scopyconfig.h" - -#include -#include -#include -#include - -#include - -Q_LOGGING_CATEGORY(CAT_TRANSLATIONREPOSITORY, "ScopyTranslations"); - -using namespace scopy; - -TranslationsRepository *TranslationsRepository::pinstance_{nullptr}; - -TranslationsRepository::TranslationsRepository(QObject *parent) - : QObject(parent) -{} - -TranslationsRepository::~TranslationsRepository() {} - -TranslationsRepository *TranslationsRepository::GetInstance() -{ - if(pinstance_ == nullptr) { - pinstance_ = new TranslationsRepository(QApplication::instance()); // singleton has the app as parent - } - return pinstance_; -} - -QString TranslationsRepository::getTranslationsPath() -{ - // Check the local plugins folder first - QDir pathDir(config::localTranslationFolderPath()); - if(pathDir.exists()) { - return config::localTranslationFolderPath(); - } - - return config::defaultTranslationFolderPath(); -} - -QStringList TranslationsRepository::getLanguages() -{ - QDir directory(TranslationsRepository::getTranslationsPath()); - QStringList languages = directory.entryList(QStringList() << "*.qm", QDir::Files).replaceInStrings(".qm", ""); - for(const QString &lang : languages) { - if(lang.contains("_")) - languages.removeOne(lang); - } - - // no languages found - if(languages.empty()) { - languages.append("default"); - } - - return languages; -} - -void TranslationsRepository::loadTranslations(QString language) -{ - if(language == "default") { - qDebug(CAT_TRANSLATIONREPOSITORY) << "No languages loaded (default)"; - return; - } - - QList translatorList = QList(); - QDir directory(TranslationsRepository::getTranslationsPath()); - QFileInfoList languages = directory.entryInfoList(QStringList() << "*.qm", QDir::Files); - - for(const QFileInfo &lang : languages) { - if(lang.fileName().endsWith("_" + language + ".qm") || lang.fileName() == language + ".qm") { - translatorList.append(new QTranslator()); - translatorList.last()->load(lang.filePath()); - QApplication::installTranslator(translatorList.last()); - - qDebug(CAT_TRANSLATIONREPOSITORY) << "Loaded:" << lang.fileName(); - } - } -} - -#include "moc_translationsrepository.cpp" diff --git a/core/src/versioncheckmessage.cpp b/core/src/versioncheckmessage.cpp deleted file mode 100644 index a8f215c3d3..0000000000 --- a/core/src/versioncheckmessage.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2023 Analog Devices Inc. - * - * This file is part of Scopy - * (see https://www.github.com/analogdevicesinc/scopy). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "versioncheckmessage.h" - -#include -#include - -using namespace scopy; -VersionCheckMessage::VersionCheckMessage(QWidget *parent) - : QWidget(parent) -{ - setLayout(new QHBoxLayout(this)); - layout()->setContentsMargins(0, 0, 0, 0); - auto textLabel = - new QLabel("

Should Scopy check for online versions?    Yes    No

", - this); - connect(textLabel, &QLabel::linkActivated, this, [this](const QString &text) { - if(text == "yes") { - setCheckVersion(true); - } else if(text == "no") { - setCheckVersion(false); - } - - delete this; - }); - textLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse); - layout()->addWidget(textLabel); - - connect(this, &VersionCheckMessage::setCheckVersion, this, &VersionCheckMessage::saveCheckVersion); -} - -VersionCheckMessage::~VersionCheckMessage() {} - -void VersionCheckMessage::saveCheckVersion(bool allowed) { Preferences::set("general_check_online_version", allowed); } - -#include "moc_versioncheckmessage.cpp" diff --git a/core/test/CMakeLists.txt b/core/test/CMakeLists.txt deleted file mode 100644 index 9a040e8f07..0000000000 --- a/core/test/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -include(ScopyTest) - -setup_scopy_tests(pluginmanager pluginrepository) - -# test_translationsrepository -if(ENABLE_TRANSLATION) - set(TEST_GENERATETRANSLATIONS ${PROJECT_NAME}_test_generatetranslations) - generate_translations() - qt_add_resources(TEST_TRANSLATIONS_REPOSITORY "${CMAKE_CURRENT_BINARY_DIR}/translations.qrc") - - if(ANDROID) - add_library(${TEST_GENERATETRANSLATIONS} SHARED ${TEST_TRANSLATIONS_REPOSITORY}) - else() - add_library(${TEST_GENERATETRANSLATIONS} ${TEST_TRANSLATIONS_REPOSITORY}) - endif() - - # move test translation files to core/tests - add_custom_command( - TARGET ${TEST_GENERATETRANSLATIONS} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/translations/test.qm - ${CMAKE_CURRENT_BINARY_DIR}/translations/test.qm - ) - add_custom_command( - TARGET ${TEST_GENERATETRANSLATIONS} POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove - ${CMAKE_BINARY_DIR}/translations/test.qm - ) - add_custom_command( - TARGET ${TEST_GENERATETRANSLATIONS} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/translations/test_test.qm - ${CMAKE_CURRENT_BINARY_DIR}/translations/test_test.qm - ) - add_custom_command( - TARGET ${TEST_GENERATETRANSLATIONS} POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove - ${CMAKE_BINARY_DIR}/translations/test_test.qm - ) - - setup_scopy_tests(translationsrepository) -endif() diff --git a/core/test/resources/translations.qrc b/core/test/resources/translations.qrc deleted file mode 100644 index 94186dd8f9..0000000000 --- a/core/test/resources/translations.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - @TRANSLATIONS@ - - diff --git a/core/test/resources/translations/test.ts b/core/test/resources/translations/test.ts deleted file mode 100644 index ab67af039b..0000000000 --- a/core/test/resources/translations/test.ts +++ /dev/null @@ -1,11 +0,0 @@ - - - - - TST_TranslationsRepository - - TEST1 - test1 - - - diff --git a/core/test/resources/translations/test_test.ts b/core/test/resources/translations/test_test.ts deleted file mode 100644 index 406ef7a65c..0000000000 --- a/core/test/resources/translations/test_test.ts +++ /dev/null @@ -1,11 +0,0 @@ - - - - - TST_TranslationsRepository - - TEST2 - test2 - - - diff --git a/core/test/testPluginExcludeLower.json b/core/test/testPluginExcludeLower.json deleted file mode 100644 index e7ae803e11..0000000000 --- a/core/test/testPluginExcludeLower.json +++ /dev/null @@ -1,14 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"], - "exclude" : ["*", "!testplugin" ] -} -} -)plugin") - diff --git a/core/test/testPluginExcludeSpecificLower.json b/core/test/testPluginExcludeSpecificLower.json deleted file mode 100644 index cb2793e447..0000000000 --- a/core/test/testPluginExcludeSpecificLower.json +++ /dev/null @@ -1,14 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"], - "exclude" : ["testplugin" ] -} -} -)plugin") - diff --git a/core/test/testPluginExcludeSpecificUpper.json b/core/test/testPluginExcludeSpecificUpper.json deleted file mode 100644 index ef38bc6ded..0000000000 --- a/core/test/testPluginExcludeSpecificUpper.json +++ /dev/null @@ -1,14 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"], - "exclude" : ["TESTPLUGIN" ] -} -} -)plugin") - diff --git a/core/test/testPluginExcludeUpper.json b/core/test/testPluginExcludeUpper.json deleted file mode 100644 index 2b1404b37b..0000000000 --- a/core/test/testPluginExcludeUpper.json +++ /dev/null @@ -1,14 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"], - "exclude" : ["*", "!TESTPLUGIN" ] -} -} -)plugin") - diff --git a/core/test/testplugin.json b/core/test/testplugin.json deleted file mode 100644 index 3372baeaae..0000000000 --- a/core/test/testplugin.json +++ /dev/null @@ -1,12 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"] -} -} -)plugin") diff --git a/core/test/testpluginexclude.json b/core/test/testpluginexclude.json deleted file mode 100644 index 4ba6a42bc4..0000000000 --- a/core/test/testpluginexclude.json +++ /dev/null @@ -1,14 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"], - "exclude" : "*" -} -} -)plugin") - diff --git a/core/test/testpluginexclude2.json b/core/test/testpluginexclude2.json deleted file mode 100644 index 8516f288d9..0000000000 --- a/core/test/testpluginexclude2.json +++ /dev/null @@ -1,14 +0,0 @@ -(R"plugin( -{ -"TestPlugin" : { - "priority":2, - "category" : ["test", "unittest"] -}, -"TestPluginIp" : { - "priority":1000, - "category" : ["test", "unittest"], - "exclude" : ["*", "!TestPlugin" ] -} -} -)plugin") - diff --git a/core/test/tst_pluginmanager.cpp b/core/test/tst_pluginmanager.cpp deleted file mode 100644 index 160ea0dc84..0000000000 --- a/core/test/tst_pluginmanager.cpp +++ /dev/null @@ -1,356 +0,0 @@ -#include "core/pluginmanager.h" - -#include -#include -#include -#include -#include -#include - -using namespace scopy; - -class TST_PluginManager : public QObject -{ - Q_OBJECT -private Q_SLOTS: - void libsFound(); - void loadLibs(); - void metadataOps(); - void exclusion(); - void exclusionSpecificLowercase(); - void exclusionSpecificUppercase(); - void exclusionExcept(); - void exclusionExceptUppercase(); - void exclusionExceptLowercase(); - -private: - void initFileList(); - QStringList libs; -}; - -#define NONPLUGIN_LIBRARY_LOCATION "../libscopycore.so" -#define PLUGIN_LOCATION "../../plugins/plugins" - -void TST_PluginManager::libsFound() -{ - initFileList(); - QVERIFY2(libs.count() > 0, "No libs not found"); -} - -void TST_PluginManager::loadLibs() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - p->clear(); - QVERIFY2(p->count() == 0, "Clear libs failed"); - - for(const auto &lib : qAsConst(libs)) { - p->add(lib); - } - QVERIFY2(p->count() > 0, "Add 1-by-1 failed"); - - QList plugins; - QList sortedplugins; - plugins = p->getPlugins(""); - - QVERIFY2(plugins.count() == p->count(), "Plugin clone failed"); - - p->sort(); - sortedplugins = p->getPlugins(""); - for(auto p : qAsConst(plugins)) { - for(auto q : qAsConst(sortedplugins)) { - if(p == q) - QFAIL("duplicates found in sortedplugins vs plugins"); - } - } - - QVERIFY2(plugins.count() == sortedplugins.count(), "Subsequent call to get plugin gives different counts"); - for(int i = 1; i < sortedplugins.count(); i++) { - if(sortedplugins[i - 1]->metadata()["priority"].toInt() < - sortedplugins[i]->metadata()["priority"].toInt()) - QFAIL("Sort by priority failed"); - } - - QList usbPlugins = p->getCompatiblePlugins("usb:", "test"); - for(auto &&p : usbPlugins) { - QVERIFY2(p->param() == "usb:", "param not set to plugin"); - } - - QList ipPlugins = p->getCompatiblePlugins("ip:", "test"); - bool found = false; - QVERIFY2(ipPlugins.count() > 0, "No ip: plugins found"); - for(auto &&p : ipPlugins) { - if(p->name() == "TestPluginIp") - found = true; - } - QVERIFY2(found, "TestPluginIp not found"); - - p->add(NONPLUGIN_LIBRARY_LOCATION); - QVERIFY2(p->count() == plugins.count(), "Added nonplugin library to manager"); - - usbPlugins.clear(); - usbPlugins = p->getCompatiblePlugins("usb:", "test"); - for(auto &&p : usbPlugins) { - QVERIFY2(p->param() == "usb:", "param not set to plugin"); - } - - delete p; -} - -void TST_PluginManager::metadataOps() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testplugin.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getPlugins("test"); - QVERIFY2(plugins.count() >= 2, "Exactly 2 unit tests not found"); - qDebug() << plugins[0]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPluginIp is not loaded with highest priority"); - QVERIFY2(plugins[0]->metadata()["priority"] == 1000, "TestPluginIp priority not overridden"); -} - -void TST_PluginManager::exclusion() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testpluginexclude.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getCompatiblePlugins("ip:", "unittest"); - QVERIFY2(plugins.count() == 2, "Only TestPluginIp plugin compatible compatible"); - qDebug() << plugins[0]->name(); - qDebug() << plugins[1]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPlugin is the first plugin"); - QVERIFY2(plugins[0]->metadata()["exclude"] == "*", "TestPluginIp excludes everything"); - QVERIFY2(plugins[1]->name() == "TestPlugin", "TestPluginIp is the second plugin"); - - QVERIFY2(plugins[0]->enabled() == true, "TestPluginIp not enabled"); - QVERIFY2(plugins[1]->enabled() == false, "TestPlugin is enabled"); -} - -void TST_PluginManager::exclusionSpecificLowercase() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testPluginExcludeSpecificLower.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getCompatiblePlugins("ip:", "unittest"); - QVERIFY2(plugins.count() == 2, "Exactly 1 unit tests not found"); - qDebug() << plugins[0]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPluginIp is the first plugin"); - QVERIFY2(plugins[0]->metadata()["exclude"].toArray()[0] == "testplugin", "TestPluginIP "); - QVERIFY2(plugins[1]->name() == "TestPlugin", "TestPlugin is the second plugin"); - - QVERIFY2(plugins[0]->enabled() == true, "TestPluginIp not enabled"); - QVERIFY2(plugins[1]->enabled() == false, "TestPlugin is enabled"); -} - -void TST_PluginManager::exclusionSpecificUppercase() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testPluginExcludeSpecificUpper.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getCompatiblePlugins("ip:", "unittest"); - QVERIFY2(plugins.count() == 2, "Exactly 1 unit tests not found"); - qDebug() << plugins[0]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPluginIp is the first plugin"); - QVERIFY2(plugins[0]->metadata()["exclude"].toArray()[0] == "TESTPLUGIN", "TestPluginIP "); - QVERIFY2(plugins[1]->name() == "TestPlugin", "TestPlugin is the second plugin"); - - QVERIFY2(plugins[0]->enabled() == true, "TestPluginIp not enabled"); - QVERIFY2(plugins[1]->enabled() == false, "TestPlugin is enabled"); -} - -void TST_PluginManager::exclusionExcept() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testpluginexclude2.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getCompatiblePlugins("ip:", "unittest"); - QVERIFY2(plugins.count() == 2, "Exactly 1 unit tests not found"); - qDebug() << plugins[0]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPluginIp is not loaded"); - QVERIFY2(plugins[0]->metadata()["exclude"].toArray()[0] == "*" && - plugins[0]->metadata()["exclude"].toArray()[1] == "!TestPlugin", - "TestPluginIP "); - QVERIFY2(plugins[1]->name() == "TestPlugin", "Second TestPlugin is not loaded"); -} - -void TST_PluginManager::exclusionExceptUppercase() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testPluginExcludeUpper.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getCompatiblePlugins("ip:", "unittest"); - QVERIFY2(plugins.count() == 2, "Exactly 1 unit tests not found"); - qDebug() << plugins[0]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPluginIp is not loaded"); - QVERIFY2(plugins[0]->metadata()["exclude"].toArray()[0] == "*" && - plugins[0]->metadata()["exclude"].toArray()[1] == "!TESTPLUGIN", - "TestPluginIP "); - QVERIFY2(plugins[1]->name() == "TestPlugin", "Second TestPlugin is not loaded"); -} - -void TST_PluginManager::exclusionExceptLowercase() -{ - PluginManager *p = new PluginManager(this); - p->add(libs); - QVERIFY2(p->count() > 0, "Load libs failed"); - - QString json = QString( -#include "testPluginExcludeLower.json" - ); - QJsonParseError err; - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8(), &err); - if(err.error != QJsonParseError::NoError) { - qCritical() << "JSON Parse error !" << err.errorString(); - qCritical() << json; - qCritical() << QString(" ").repeated(err.offset) + "^"; - } - QJsonObject obj = doc.object(); - p->clear(); - p->setMetadata(obj); - p->add(libs); - p->sort(); - QVERIFY2(p->count() > 0, "Load libs failed"); - - auto plugins = p->getCompatiblePlugins("ip:", "unittest"); - QVERIFY2(plugins.count() == 2, "Exactly 1 unit tests not found"); - qDebug() << plugins[0]->name(); - - QVERIFY2(plugins[0]->name() == "TestPluginIp", "TestPluginIp is not loaded"); - QVERIFY2(plugins[0]->metadata()["exclude"].toArray()[0] == "*" && - plugins[0]->metadata()["exclude"].toArray()[1] == "!testplugin", - "TestPluginIP "); - QVERIFY2(plugins[1]->name() == "TestPlugin", "Second TestPlugin is not loaded"); -} - -void TST_PluginManager::initFileList() -{ - QDir directory(PLUGIN_LOCATION); - QStringList files = directory.entryList(); - libs.clear(); - for(const QString &file : files) { - if(QLibrary::isLibrary(file)) { - qDebug() << "Library: " << file; - libs.append(directory.absoluteFilePath(file)); - } - } -} - -QTEST_MAIN(TST_PluginManager) - -#include "tst_pluginmanager.moc" diff --git a/core/test/tst_pluginrepository.cpp b/core/test/tst_pluginrepository.cpp deleted file mode 100644 index bef4ee58e0..0000000000 --- a/core/test/tst_pluginrepository.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "core/pluginrepository.h" - -#include -#include -#include - -using namespace scopy; - -class TST_PluginRepository : public QObject -{ - Q_OBJECT -private Q_SLOTS: - void loadLibs(); - -private: - QStringList libs; -}; - -#define NONPLUGIN_LIBRARY_LOCATION "../libscopycore.so" -#define PLUGIN_LOCATION "../../plugins/plugins" - -void TST_PluginRepository::loadLibs() -{ - PluginRepository *p = new PluginRepository(this); - PluginManager *pm = p->getPluginManager(); - QVERIFY(pm->metadata().isEmpty()); - p->init(PLUGIN_LOCATION); - // QVERIFY(!pm->metadata().isEmpty()); - - delete p; -} - -QTEST_MAIN(TST_PluginRepository) - -#include "tst_pluginrepository.moc" diff --git a/core/test/tst_translationsrepository.cpp b/core/test/tst_translationsrepository.cpp deleted file mode 100644 index da9e7b4dd0..0000000000 --- a/core/test/tst_translationsrepository.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "core/translationsrepository.h" - -#include -#include -#include - -using namespace scopy; - -class TST_TranslationsRepository : public QObject -{ - Q_OBJECT -private Q_SLOTS: - void checkPath(); - void checkGeneratedFiles(); - void loadTranslations(); - -private: - QStringList libs; -}; - -void TST_TranslationsRepository::checkPath() -{ - QDir pathDir(TranslationsRepository::GetInstance()->getTranslationsPath()); - - QVERIFY(pathDir.exists()); - QVERIFY(pathDir.entryList().contains("test.qm")); - QVERIFY(pathDir.entryList().contains("test_test.qm")); - qDebug() << "Found files:" << pathDir.entryList(); -} - -void TST_TranslationsRepository::checkGeneratedFiles() -{ - QStringList languages = TranslationsRepository::GetInstance()->getLanguages(); - qDebug() << "Found languages:" << languages; - - QVERIFY(languages.contains("test")); -} - -void TST_TranslationsRepository::loadTranslations() -{ - QVERIFY(tr("TEST1") == "TEST1"); - QVERIFY(tr("TEST2") == "TEST2"); - - TranslationsRepository::GetInstance()->loadTranslations("test"); - - // verifying if test.qm was applied - QVERIFY(tr("TEST1") == "test1"); - - // verifying if test_test.qm was applied - QVERIFY(tr("TEST2") == "test2"); -} - -QTEST_MAIN(TST_TranslationsRepository) - -#include "tst_translationsrepository.moc" diff --git a/core/ui/devicebrowser.ui b/core/ui/devicebrowser.ui deleted file mode 100644 index 74073e167f..0000000000 --- a/core/ui/devicebrowser.ui +++ /dev/null @@ -1,250 +0,0 @@ - - - DeviceBrowser - - - - 0 - 0 - 464 - 108 - - - - - 0 - 0 - - - - - 0 - 0 - - - - Form - - - - 0 - - - 10 - - - 0 - - - 0 - - - 0 - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 9 - - - 9 - - - - - - 40 - 40 - - - - QPushButton {height: 40px;width: 40px;border-width: 0px;} - - - - - - - :/gui/icons/launcher_home.svg - - - - - 40 - 40 - - - - true - - - false - - - true - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 9 - - - 9 - - - - - - 40 - 40 - - - - QPushButton {height: 40px;width: 40px;border-width: 0px;} - - - - - - - :/gui/icons/launcher_add.svg - - - - - 40 - 40 - - - - true - - - true - - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 0 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - diff --git a/core/ui/devicebutton.ui b/core/ui/devicebutton.ui deleted file mode 100644 index 2efe2d9545..0000000000 --- a/core/ui/devicebutton.ui +++ /dev/null @@ -1,275 +0,0 @@ - - - DeviceButton - - - - 0 - 0 - 140 - 200 - - - - - 0 - 0 - - - - - 0 - 160 - - - - - 16777215 - 200 - - - - Form - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 140 - 120 - - - - - 140 - 160 - - - - QLabel { -qproperty-alignment: AlignCenter; -} - - - false - - - true - - - - 3 - - - 20 - - - 0 - - - 20 - - - 10 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - 0 - 0 - - - - - 100 - 100 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 0 - 5 - - - - - - - - - - - - 1 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 0 - 2 - - - - - 16777215 - 2 - - - - QFrame#line { - border: 2px solid transparent; -} - -QFrame#line[connected=true] { - border: 2px solid green; -} - -QFrame#line[failed=true] { - border: 2px solid red; -} - - - QFrame::Sunken - - - 2 - - - Qt::Horizontal - - - false - - - false - - - - - - - - - - - diff --git a/core/ui/devicepage.ui b/core/ui/devicepage.ui deleted file mode 100644 index bb76ef56da..0000000000 --- a/core/ui/devicepage.ui +++ /dev/null @@ -1,101 +0,0 @@ - - - DevicePage - - - - 0 - 0 - 400 - 300 - - - - - 0 - 0 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 5 - - - 20 - - - 5 - - - 20 - - - 5 - - - - - - - true - - - - - 0 - 0 - 398 - 288 - - - - - 0 - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - diff --git a/core/ui/scopyhomeinfopage.ui b/core/ui/scopyhomeinfopage.ui deleted file mode 100644 index 281410e853..0000000000 --- a/core/ui/scopyhomeinfopage.ui +++ /dev/null @@ -1,48 +0,0 @@ - - - ScopyHomeInfoPage - - - - 0 - 0 - 400 - 300 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - qrc:/scopy_home.html - - - - true - - - - - - - - diff --git a/core/ui/scopyhomepage.ui b/core/ui/scopyhomepage.ui deleted file mode 100644 index e189e24989..0000000000 --- a/core/ui/scopyhomepage.ui +++ /dev/null @@ -1,128 +0,0 @@ - - - ScopyHomePage - - - - 0 - 0 - 400 - 300 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - - - - 0 - 0 - - - - - - - - QLayout::SetMaximumSize - - - 0 - - - 0 - - - - - Scan - - - - - - - - - - true - - - false - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 0 - 0 - - - - - - - - - scopy::DeviceBrowser - QWidget -
devicebrowser.h
- 1 -
- - scopy::InfoPageStack - QStackedWidget -
infopagestack.h
- 1 -
- - scopy::SmallOnOffSwitch - QPushButton -
gui/smallOnOffSwitch.h
-
-
- - -
diff --git a/core/ui/scopymainwindow.ui b/core/ui/scopymainwindow.ui deleted file mode 100644 index d64146de56..0000000000 --- a/core/ui/scopymainwindow.ui +++ /dev/null @@ -1,162 +0,0 @@ - - - ScopyMainWindow - - - - 0 - 0 - 1280 - 720 - - - - - 0 - 0 - - - - - 1280 - 720 - - - - MainWindow - - - - - 0 - 0 - - - - - 1024 - 720 - - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - 0 - 0 - - - - - 200 - 0 - - - - - 200 - 16777215 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - - - - - - - scopy::ToolBrowser - QWidget -
toolbrowser.h
- 1 -
- - scopy::ToolStack - QStackedWidget -
toolstack.h
- 1 -
- - scopy::MenuHAnim - QWidget -
gui/menu_anim.hpp
- 1 -
-
- - -
diff --git a/core/ui/toolbrowser.ui b/core/ui/toolbrowser.ui deleted file mode 100644 index bb33b6108b..0000000000 --- a/core/ui/toolbrowser.ui +++ /dev/null @@ -1,302 +0,0 @@ - - - ToolBrowser - - - - 0 - 0 - 233 - 459 - - - - - 0 - 0 - - - - - 200 - 0 - - - - Form - - - #btnSave,#btnLoad,#btnPreferences,#btnAbout { - text-align:center; - height: 25px; - background-color: none; - border:none; -} - -#btnSave:hover, -#btnLoad:hover, -#btnPreferences:hover, -#btnAbout:hover, -#btnCollapse_2:hover{ - background-color: rgba(0, 0, 0, 60); - border: 1px solid rgba(0, 0, 0, 30); - border-radius:5px; -} - - -#btnSave { - qproperty-icon: url(":/gui/icons/scopy-default/icons/save.svg"); -} -#btnLoad { - qproperty-icon: url(":/gui/icons/scopy-default/icons/load.svg"); -} -#btnPreferences { - qproperty-icon: url(":/gui/icons/scopy-default/icons/preferences.svg"); -} -#btnAbout { - qproperty-icon: url(":/gui/icons/scopy-default/icons/info.svg"); -} -#logo { -background-image: url(:/gui/icons/scopy-default/icons/logo_analog.svg); -background-repeat: no-repeat; -background-position: center center; -background-repeat: no-repeat; -min-height:36px; -} - -#btnCollapseMini { - height:40px; - width:40px; - background-image: url(:/gui/icons/scopy-default/icons/menu.svg); - background-repeat: no-repeat; - background-position: center center; -} - -#btnCollapse { - height:40px; - background-image: url(:/gui/icons/scopy-default/icons/logo.svg); - background-repeat: no-repeat; - background-position: center center; -} - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - true - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustIgnored - - - true - - - - - 0 - 0 - 231 - 16 - - - - - 0 - 0 - - - - - - - - - true - - - - 16777215 - 1 - - - - Qt::Horizontal - - - true - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Save - - - - - - - Load - - - - - - - - - - Preferences - - - true - - - false - - - - - - - About - - - true - - - - - - - true - - - - 0 - 0 - - - - - 0 - 36 - - - - - - - - - scopy::ToolMenu - QWidget -
toolmenu.h
- 1 -
-
- - -
diff --git a/doc/Doxyfile b/doc/Doxyfile deleted file mode 100644 index 3b7f402413..0000000000 --- a/doc/Doxyfile +++ /dev/null @@ -1,2613 +0,0 @@ -# Doxyfile 1.9.1 - -# 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 = "Scopy" - -# 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 = "Scripting library for Scopy" - -# 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 - -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - -# 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 = NO - -# 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 = YES - -# 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 = YES - -# 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:\n" -# 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:". You can 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 = NO - -# 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++, 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 = YES - -# 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 = NO - -# 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 = NO - -# 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 efficively 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 = YES - -# 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 = NO - -# 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_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 = YES - -# 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 = YES - -# 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 = YES - -# 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= YES - -# 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 = YES - -# 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 = YES - -# 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 = YES - -# 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. -# -# 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 = YES - -# 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 not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = 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 or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. -# 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 = /home/adi/tmp/tool_launcher/ - -# 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++, *.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 = *.cpp \ - *.hpp \ - *.h - -# 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 = YES - -# 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 = images - -# 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 = YES - -# 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 clang assisted parsing is enabled 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. - -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 = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# 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 = html - -# 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 colorwheel, 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 grayscales 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 -# (see: -# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. -# -# 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 = NO - -# 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. 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 - -# 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 = svg - -# 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 - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) 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: https://cdn.jsdelivr.net/npm/mathjax@2. -# 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 -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# 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 -# , /