{"id":16156427,"url":"https://github.com/kanglin/rabbitcommon","last_synced_at":"2025-03-18T20:30:37.986Z","repository":{"id":37619516,"uuid":"180713957","full_name":"KangLin/RabbitCommon","owner":"KangLin","description":"Qt common library","archived":false,"fork":false,"pushed_at":"2024-10-21T08:31:08.000Z","size":5350,"stargazers_count":13,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-22T14:55:12.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KangLin.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":".github/FUNDING.yml","license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"Authors.md","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png","https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png","https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png"]}},"created_at":"2019-04-11T04:25:56.000Z","updated_at":"2024-10-21T08:31:12.000Z","dependencies_parsed_at":"2024-02-04T02:30:59.222Z","dependency_job_id":"d1ee16ef-47d2-4458-9129-dd1cc618323d","html_url":"https://github.com/KangLin/RabbitCommon","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KangLin%2FRabbitCommon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KangLin%2FRabbitCommon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KangLin%2FRabbitCommon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KangLin%2FRabbitCommon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KangLin","download_url":"https://codeload.github.com/KangLin/RabbitCommon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243949777,"owners_count":20373651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T01:44:53.424Z","updated_at":"2025-03-18T20:30:37.980Z","avatar_url":"https://github.com/KangLin.png","language":"C++","funding_links":["https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png","https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png","https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png"],"categories":[],"sub_categories":[],"readme":"## Qt common library\n\n================================================\n\nAuthor：Kang Lin（kl222@126.com)\n\n[![master status](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml)\n[![develop status](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml)\n[![Build status](https://ci.appveyor.com/api/projects/status/cy6jwbbysuj7t1wp?svg=true)](https://ci.appveyor.com/project/KangLin/rabbitcommon)\n\n[:cn: Chinese](README_zh_CN.md)\n\n- Project home site: https://github.com/KangLin/RabbitCommon\n- Mirror:\n  - https://sourceforge.net/projects/rabbitcommon/\n  - https://launchpad.net/rabbitcommon\n  - https://gitlab.com/kl222/RabbitCommon\n  - https://invent.kde.org/kanglin/RabbitCommon\n  - https://gitee.com/kl222/RabbitCommon\n  - https://bitbucket.org/kl222/rabbitcommon\n### Developer documents\n\n[Online developer documents](https://kanglin.github.io/RabbitCommon/English/html/index.html)\n\n### Latest release\n\n- [Latest release](https://github.com/KangLin/RabbitCommon/releases/latest)\n- See:\n  - Semantic Versioning: https://semver.org/\n  \n### Functions\n\n[API](https://kanglin.github.io/RabbitCommon/English/html/group__API.html)\n\nQt common library. include follow functions:\n\n- [x] GUI\n  - [x] [About](#About)\n    + [cmark](https://github.com/commonmark/cmark): support MarkDown\n  - [x] [Updater](#Updater)\n  - [x] [Style (include icon theme)](Src/FrmStyle/FrmStyle.h)\n  - [x] [Recent open menu](Src/RabbitRecentMenu.h)\n  - [x] [Title bar](Src/TitleBar.h)\n  - [x] [Folder browser](Src/FolderBrowser/FolderBrowser.h)\n- [x] [Download the same file from multiple URLs](Src/DownloadFile.h)\n- [x] [Directory functions](Src/RabbitCommonDir.h)\n- [x] [Encrypt](Src/RabbitCommonEncrypt.h)\n- [x] [Register](Src/RabbitCommonRegister.h)\n- [x] Tools\n  + [x] [Execute the program with administrator privileges](#execute-the-program-with-administrator-privileges)\n  + [x] [The program starts automatically](#the-program-starts-automatically)\n  + [x] [Directory functions](Src/RabbitCommonDir.h)\n  + [x] [Get system information](#Get-system-information)\n    - [x] [Get current login user name](#Get-current-login-user-name)\n- [x] cmake functions\n  + [x] Translations\n  + [x] Add target, plugin target\n  + [x] Generate pkg-config configure file\n  + [x] Generate cmake configure file\n  + [x] Add uninstall target\n- [x] Cross-platform, support multiple operating systems\n  - [x] Windows\n  - [x] Linux、Unix\n  - [x] Android\n  - [ ] Mac os\n  - [ ] IOS\n  \n  Mac os and IOS, I don't have the corresponding equipment,\n  please compile and test the students with the corresponding equipment.\n\n  See: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html), [Qt6](https://doc.qt.io/qt-6/supported-platforms.html)\n\n### Compile\n- Create and entry build directory\n\n        git clone --recursive https://github.com/KangLin/RabbitCommon.git\n        cd RabbitCommon\n        mkdir build\n\n- Compile\n  + Use cmake\n\n        cd build\n        cmake ..  -DCMAKE_BUILD_TYPE=Release\n            -DQT_DIR=... \\\n            -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5\n        cmake --build .\n\n    * Parameter\n      - CMAKE_BUILD_TYPE: build type(MUST)\n      - QT_DIR: Qt install position\n      - BUILD_DOCS: build doxygen documents\n      - BUILD_APP: build app\n      - BUILD_ABOUT: build about\n      - BUILD_UPDATE: build updater\n      - BUILD_ADMINAUTHORISER: build admin authoriser\n\n    **NOTE**: If you use MSVC, you need to add -DCMAKE_BUILD_TYPE=Debug,\n              otherwise the following error will occur when compiling Debug:\n\n          RabbitCommonTools.obj : error LNK2019: An external symbol that cannot be resolved \"int __cdecl qInitResources_translations_RabbitCommon(void)\" (?qInitResources_translations_RabbitCommon@@YAHXZ)，该符号在函数 \"void __cdecl g_RabbitCommon_InitResource(void)\" (?g_RabbitCommon_InitResource@@YAXXZ) 中被引用\n          RabbitCommonTools.obj : error LNK2019: An external symbol that cannot be resolved \"int __cdecl qCleanupResources_translations_RabbitCommon(void)\" (?qCleanupResources_translations_RabbitCommon@@YAHXZ)，该符号在函数 \"void __cdecl g_RabbitCommon_CleanResource(void)\" (?g_RabbitCommon_CleanResource@@YAXXZ) 中被引用\n\n    - linux\n  \n          cd build\n          cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/install \\\n               -DCMAKE_BUILD_TYPE=Release \\\n               -DQT_DIR=... \\\n               -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5\n          cmake --build . --config Release --target install\n      \n    - windows\n  \n          cd build\n          cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/install ^\n                 -DCMAKE_BUILD_TYPE=Release ^\n                 -DQT_DIR=... ^\n                 -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5\n          cmake --build . --config Release --target install\n  \n    - Android\n      - Qt6 or laster\n\n            cd build\n            ${Qt6_DIR}/bin/qt-cmake .. -DCMAKE_BUILD_TYPE=Release\n            cmake --build . --config Release\n        \n        Or:\n        \n            cmake .. -DCMAKE_BUILD_TYPE=Release \\\n                -DCMAKE_INSTALL_PREFIX=`pwd`/android-build \\\n                -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake\n            cmake --build . --config Release\n      \n      - The host is linux\n      \n            cd build\n            cmake .. -DCMAKE_BUILD_TYPE=Release \\\n                   -DCMAKE_INSTALL_PREFIX=`pwd`/android-build \\\n                   -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \\\n                   -DANDROID_ABI=\"armeabi-v7a with NEON\" \\\n                   -DANDROID_PLATFORM=android-18 \\\n                   -DQT_DIR=... \\\n                   -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5\n            cmake --build . --config Release --target all\n      \n      - The host is windows\n      \n            cd build\n            cmake .. -G\"Unix Makefiles\" ^\n                 -DCMAKE_BUILD_TYPE=Release ^\n                 -DCMAKE_INSTALL_PREFIX=`pwd`/android-build ^\n                 -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake ^\n                 -DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}/prebuilt/windows-x86_64/bin/make.exe ^\n                 -DANDROID_PLATFORM=android-18 ^\n                 -DANDROID_ABI=arm64-v8a ^\n                 -DANDROID_ARM_NEON=ON ^\n                 -DQT_DIR=... \\\n                 -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5\n            cmake --build . --config Release --target all\n  \n      - Parameter Description: https://developer.android.google.cn/ndk/guides/cmake\n        + ANDROID_ABI: The following values can be taken:\n           Goal ABI. If the target ABI is not specified, CMake uses armeabi-v7a by default.\n           Valid ABI are:\n          - armeabi：CPU with software floating point arithmetic based on ARMv5TE\n          - armeabi-v7a：ARMv7-based device with hardware FPU instructions (VFP v3 D16)\n          - armeabi-v7a with NEON：Same as armeabi-v7a, but with NEON floating point instructions enabled. This is equivalent to setting -DANDROID_ABI=armeabi-v7a and -DANDROID_ARM_NEON=ON.\n          - arm64-v8a：ARMv8 AArch64 Instruction Set\n          - x86：IA-32 Instruction Set\n          - x86_64 - x86-64 Instruction Set\n        + ANDROID_NDK \u003cpath\u003e The path of installed ndk in host\n        + ANDROID_PLATFORM: For a full list of platform names and corresponding Android system images, see the [Android NDK Native API] (https://developer.android.google.com/ndk/guides/stable_apis.html)\n        + ANDROID_ARM_MODE\n        + ANDROID_ARM_NEON\n        + ANDROID_STL: Specifies the STL that CMake should use. \n          - c++_shared: The shared library variant of libc++.\n          - c++_static: The static library variant of libc++.\n          - none: No C++ standard library support.\n          - system: The system STL\n      \n      - Install apk to devices\n      \n             adb install android-build-debug.apk \n\n      - Qt6 and later\n\n        cd build\n        ${Qt6_DIR}/bin/qt-cmake .. -DCMAKE_BUILD_TYPE=Release\n        cmake --build . --config Release\n        \n        Or:\n        \n        cmake .. -DCMAKE_BUILD_TYPE=Release \\\n            -DCMAKE_INSTALL_PREFIX=`pwd`/android-build \\\n            -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake\n        cmake --build . --config Release\n            \n  + Use qmake. (Deprecated, please use CMake for new programs)\n\n        cd build\n        qmake ../RabbitCommon.pro\n        make install\n\n    * Parameter\n      - BUILD_DOCS: build doxygen documents\n      - BUILD_ABOUT=OFF: Off build about\n      - BUILD_UPDATE=OFF: Off build updater\n      - BUILD_ADMINAUTHORISER＝OFF: Off admin authoriser\n\n- Compilation notes:\n    Use Qtcreate compile for android in windows\n    - qmake. It may appear that the dependent library could not be found. (Deprecated, please use CMake for new programs)\n\n       Don't find D:\\Source\\build-RabbitCommon-Android_for_armeabi_v7a_Clang_Qt_5_12_4_for_Android_ARMv7-Debug\\bin\\libRabbitCommon.so\n       move libRabbitCommon.so ..\\bin\\libRabbitCommon.so\n       process_begin: CreateProcess(NULL, move libRabbitCommon.so ..\\bin\\libRabbitCommon.so, ...) failed.\n       make (e=2): The system can not find the file specified。\n       make[1]: [..\\bin\\libRabbitCommon.so] Error 2 (ignored)\n\n    The reason is that the make program under windows cannot convert the \\ in the path.\n    Solution: Use a make program that recognizes the \\ in the path, for example: mingw32-make.exe.\n\n   - cmake\n\n     - Set Generator to \"Unix Makefiles\"\n     - Set CMAKE_MAKE_PROGRAM to ${ANDROID_NDK}/prebuilt/windows-x86_64/bin/make.exe\n\n- Install notes:  \n    + windows   \n       If you build app. Qt does not provide openssl dynamic library for copyright reasons, so you must copy the dynamic library of openssl to the installation directory.\n        - If it is 32, you can find the dynamic library of openssl (libeay32.dll, ssleay32.dll) in the Qt installer Tools\\QtCreator\\bin directory.\n        - If it is 64-bit, you will need to download the binary installation package for openssl yourself.\n\n    + linux\n\n     ```\n     sudo apt-get install libssl1.1\n     ```\n\n### Other application use the project\n\n    if(NOT RabbitCommon_ROOT)\n        set(RabbitCommon_ROOT $ENV{RabbitCommon_ROOT})\n        if(NOT RabbitCommon_ROOT)\n            set(RabbitCommon_ROOT ${CMAKE_SOURCE_DIR}/../RabbitCommon)\n        endif()\n    endif()\n    if(RabbitCommon_ROOT AND EXISTS ${RabbitCommon_ROOT}/Src)\n        message(\"Use RabbitCommon source code\")\n        add_subdirectory(${RabbitCommon_ROOT}/Src ${CMAKE_BINARY_DIR}/RabbitCommon)\n    else()\n        find_package(RabbitCommon)\n        if(NOT RabbitCommon_FOUND)\n            message(\"RabbitCommon_ROOT is not found. Please use one of the following ways to set it:\")\n            message(\"1. Set RabbitCommon_ROOT to the install prefix of RabbitCommon.\")\n            message(\"2. Set RabbitCommon_ROOT to source code root of RabbitCommon.\")\n            message(\"2.1 Please download the source code of RabbitCommon from https://github.com/KangLin/RabbitCommon\")\n            message(\"   ag:\")\n            message(\"       git clone https://github.com/KangLin/RabbitCommon.git ${CMAKE_SOURCE_DIR}/..\")\n            message(\"2.2 Then set cmake variable or environment variable RabbitCommon_ROOT to download root directory.\")\n            message(\"   ag:\")\n            message(\"       cmake -DRabbitCommon_ROOT=${CMAKE_SOURCE_DIR}/.. \")\n            message(FATAL_ERROR \"RabbitCommon_ROOT isn't set.\")\n        endif()\n    endif()\n    \n- Use in library mode\n  + cmake\n\n    Set RabbitCommon_ROOT to specify the root directory of the installed RabbitCommon\n\n        find_package(RabbitCommon)\n\n- Use the source code directly\n  + cmake\n    - Submodule\n\n          add_subdirectory(3th_libs/RabbitCommon/Src)\n\n    - No submodule\n      + Download RabbitCommon to the same directory of the application\n\n            git clone https://github.com/KangLin/RabbitCommon.git\n              \n      + Introduced to add_subdirectory this directory\n\n              if(NOT RabbitCommon_ROOT)\n                  set(RabbitCommon_ROOT $ENV{RabbitCommon_ROOT})\n                  if(NOT RabbitCommon_ROOT)\n                      set(RabbitCommon_ROOT ${CMAKE_SOURCE_DIR}/../RabbitCommon)\n                  endif()\n              endif()\n              if(RabbitCommon_ROOT AND EXISTS ${RabbitCommon_ROOT}/Src)\n                  message(\"Use RabbitCommon source code\")\n                  add_subdirectory(${RabbitCommon_ROOT}/Src ${CMAKE_BINARY_DIR}/RabbitCommon)\n              else()\n                  find_package(RabbitCommon)\n                  if(NOT RabbitCommon_FOUND)\n                      message(\"RabbitCommon_ROOT is not found. Please use one of the following ways to set it:\")\n                      message(\"1. Set RabbitCommon_ROOT to the install prefix of RabbitCommon.\")\n                      message(\"2. Set RabbitCommon_ROOT to source code root of RabbitCommon.\")\n                      message(\"2.1 Please download the source code of RabbitCommon from https://github.com/KangLin/RabbitCommon\")\n                      message(\"   ag:\")\n                      message(\"       git clone https://github.com/KangLin/RabbitCommon.git ${CMAKE_SOURCE_DIR}/..\")\n                      message(\"2.2 Then set cmake variable or environment variable RabbitCommon_ROOT to download root directory.\")\n                      message(\"   ag:\")\n                      message(\"       cmake -DRabbitCommon_ROOT=${CMAKE_SOURCE_DIR}/.. \")\n                      message(FATAL_ERROR \"RabbitCommon_ROOT isn't set.\")\n                  endif()\n              endif()\n\n      + Add the following code to the CMakeLists.txt file of the project\n\n              target_link_libraries(${PROJECT_NAME} RabbitCommon)\n\n    - Static library\n\n          target_compile_definitions(${PROJECT_NAME} PRIVATE RABBITCOMMON_STATIC_DEFINE)\n\n- Initialization functions is called at the beginning of main() of the program\n  and after QApplication\n\n        int main(int argc, char* argv[])\n        {\n            QApplication a(argc, argv);\n            a.setApplicationName(......);\n            // Because it depend on QApplication::applicationName()\n            RabbitCommon::CTools::Instance()-\u003eInit();\n            \n            ......\n        }\n\n### Functions\n\n[Online developer documents](https://kanglin.github.io/RabbitCommon/English/html/group__API.html)\n\n#### [About](Src/DlgAbout/DlgAbout.h)\n\n- Install Authors、 License、 ChangeLog files.  \n  File name naming rules:  \n  Authors.md、License.md、ChangeLog.md is the default file.  \n  The local file naming rule is to add the local name after the default file name.  \n  For example: Chinese file:  \n  Authors_zh_CN.md、License_zh_CN.md、ChangeLog_zh_CN.md\n\n        SET(OTHER_FILES\n            ${CMAKE_SOURCE_DIR}/License.md\n            ${CMAKE_SOURCE_DIR}/Authors.md\n            ${CMAKE_SOURCE_DIR}/Authors_zh_CN.md\n            ${CMAKE_SOURCE_DIR}/ChangeLog.md\n            )\n        INSTALL_FILE(SOURCES ${OTHER_FILES} DESTINATION \".\" COMPONENT Runtime)\n            \n - Used in code\n\n        QApplication a(argc, argv);\n        a.setApplicationVersion(RabbitCommon_VERSION);\n        a.setApplicationName(\"SerialPortAssistant\");\n        a.setApplicationDisplayName(QObject::tr(\"SerialPortAssistant\"));\n\n        #ifdef RABBITCOMMON\n            CDlgAbout about(this);\n            about.m_AppIcon = QImage(\":/icon/SerialPortAssistant\");\n            about.m_szHomePage = \"https://github.com/KangLin/SerialPortAssistant\";\n            #if defined (Q_OS_ANDROID)\n                about.showMaximized();\n                about.exec();\n            #else\n                about.exec();\n            #endif\n        #endif\n            \n- See: https://github.com/KangLin/SerialPortAssistant\n\n![About](documents/image/about_en.png \"About\")\n\n#### Updater\n\nSee: [FrmUpdater.h](Src/FrmUpdater/FrmUpdater.h)\n\n  ```\n  #ifdef RABBITCOMMON\n      CFrmUpdater *fu = new CFrmUpdater();\n      fu-\u003eSetTitle(QImage(\":/image/SerialPortAssistant\"), qApp-\u003eapplicationDisplayName());\n      #if defined (Q_OS_ANDROID)\n          fu-\u003eshowMaximized();\n      #else\n          fu-\u003eshow();\n      #endif\n  #endif\n  ```\n  \n- Use CFrmUpdater::GenerateUpdateXml() to generate update xml file, use --help look up parameter\n\n      ./TasksApp --help\n      Usage: ./TasksApp [options]\n\n      Options:\n          -h, --help                       Displays this help.\n          -v, --version                    Displays version information.\n          -f, --file \u003cxml file name\u003e       xml file name\n          --pv \u003cPackage version\u003e           Package version\n          -t, --time \u003cTime\u003e                Time\n          -i, --info \u003cInformation\u003e         Information\n          -s, --system \u003cOperating system\u003e  Operating system\n          -p, --platform \u003cPlatform\u003e        Platform\n          -a, --arch \u003cArchitecture\u003e        Architecture\n          -c, --md5 \u003cMD5 checksum\u003e         MD5 checksum\n          -u, --url \u003cDownload url\u003e         Package download url\n          --home \u003cProject home url\u003e        Project home url\n          -m, --min \u003cMin update version\u003e   Min update version\n\n- Add Update/update.xml in project source root directory, then add the url to CFrmUpdater::DownloadFile.\n\n      \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n          \u003cREDIRECT\u003e\n              \u003cVERSION\u003ev2.3.2\u003c/VERSION\u003e\n              \u003cWINDOWS\u003e\n                  \u003cURL\u003eurl\u003c/URL\u003e\n              \u003c/WINDOWS\u003e\n              \u003cLINUX\u003e\n                  \u003cURL\u003eurl\u003c/URL\u003e\n              \u003c/LINUX\u003e\n              \u003cLINUX_APPIMAGE\u003e\n                  \u003cURL\u003eurl\u003c/URL\u003e\n              \u003c/LINUX_APPIMAGE\u003e\n              \u003cANDROID\u003e\n                  \u003cURL\u003eurl\u003c/URL\u003e\n              \u003c/ANDROID\u003e   \n      \u003c/REDIRECT\u003e\n  \n- See: https://github.com/KangLin/SerialPortAssistant\n  \n![Updater](documents/image/updater_en.png \"Updater\")\n\n#### Execute the program with administrator privileges\n\n[adminauthoriser.h](Src/AdminAuthoriser/adminauthoriser.h)\n\n- Internal implementation\n\n      QString szCmd = \"mkdir\";\n      QStringList paras;\n      paras \u003c\u003c \"-p\" \u003c\u003c \"/opt/RabbitCommonAdminAuthoriseTest\";\n      qDebug() \u003c\u003c \"RabbitCommon::AdminAuthoriser::Instance()-\u003eexecute(szCmd, paras):\"\n               \u003c\u003c RabbitCommon::AdminAuthoriser::Instance()-\u003eexecute(szCmd, paras);\n\n- Public interface:\n\n      RabbitCommon::CTools::executeByRoot(\"regedit\", QStringList());\n\n#### The program starts automatically\n\n[The program starts automatically](Src/RabbitCommonTools.h)\n\n      static int InstallStartRun(const QString \u0026szName = QString(),\n                               const QString \u0026szPath = QString(),\n                               bool bAllUser = false);\n      static int RemoveStartRun(const QString \u0026szName = QString(),\n                           bool bAllUser = false);\n      static bool IsStartRun(const QString \u0026szName = QString(),\n                           bool bAllUser = false);\n\n#### Get system information\n- Get current login user name:\n\n      RabbitCommon::CTools::GetCurrentUser();\n\n- Get host name:\n\n      RabbitCommon::CTools::GetHostName();\n\n### Other projects using this project\n\n- [Rabbit remote control](https://github.com/KangLin/RabbitRemoteControl)\n- [Rabbit IM](https://github.com/KangLin/RabbitCommon)\n- [Calendar](https://github.com/KangLin/Calendar)\n- [LunarCalendar](https://github.com/KangLin/LunarCalendar)\n- [SerialPortAssistant](https://github.com/KangLin/SerialPortAssistant)\n- [FaceRecognizer](https://github.com/KangLin/FaceRecognizer)\n- [TransformCoordinate](https://github.com/KangLin/TransformCoordinate)\n- [Chinese chess control](https://github.com/KangLin/ChineseChessControl)\n\n### Donation\n\n![Donation](Src/Resource/image/Contribute_en.png \"Donation\")\n\n### License\n\n[License](License.md \"License.md\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanglin%2Frabbitcommon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanglin%2Frabbitcommon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanglin%2Frabbitcommon/lists"}