├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md └── workflows │ ├── android.yml │ ├── appimage.yml │ ├── build.yml │ ├── codespell.yml │ ├── docker.yml │ ├── flatpak.yml │ ├── macos.yml │ ├── mingw.yml │ ├── msvc.yml │ ├── snap.yml │ └── ubuntu.yml ├── .gitignore ├── 3th_lib └── Control │ ├── lightbutton.cpp │ └── lightbutton.h ├── App ├── AppIcon.rc ├── CMakeLists.txt ├── Common │ ├── Tool.cpp │ └── Tool.h ├── Global │ ├── Global.cpp │ └── Global.h ├── Main.cpp ├── MainWindow.cpp ├── MainWindow.h ├── MainWindow.ui ├── Resource │ ├── Resource.qrc │ ├── Translations │ │ ├── RabbitCommon_zh_CN.ts │ │ ├── RabbitCommon_zh_TW.ts │ │ ├── SerialPortAssistant_ar.ts │ │ ├── SerialPortAssistant_ca.ts │ │ ├── SerialPortAssistant_cs.ts │ │ ├── SerialPortAssistant_da.ts │ │ ├── SerialPortAssistant_de.ts │ │ ├── SerialPortAssistant_el.ts │ │ ├── SerialPortAssistant_en.ts │ │ ├── SerialPortAssistant_en_GB.ts │ │ ├── SerialPortAssistant_es.ts │ │ ├── SerialPortAssistant_et.ts │ │ ├── SerialPortAssistant_fi.ts │ │ ├── SerialPortAssistant_fr.ts │ │ ├── SerialPortAssistant_gd.ts │ │ ├── SerialPortAssistant_gl.ts │ │ ├── SerialPortAssistant_hu.ts │ │ ├── SerialPortAssistant_it.ts │ │ ├── SerialPortAssistant_ja.ts │ │ ├── SerialPortAssistant_ko.ts │ │ ├── SerialPortAssistant_nb.ts │ │ ├── SerialPortAssistant_ne.ts │ │ ├── SerialPortAssistant_nl.ts │ │ ├── SerialPortAssistant_nn.ts │ │ ├── SerialPortAssistant_oc.ts │ │ ├── SerialPortAssistant_pl.ts │ │ ├── SerialPortAssistant_pt_BR.ts │ │ ├── SerialPortAssistant_pt_PT.ts │ │ ├── SerialPortAssistant_ro.ts │ │ ├── SerialPortAssistant_ru.ts │ │ ├── SerialPortAssistant_sk.ts │ │ ├── SerialPortAssistant_sl.ts │ │ ├── SerialPortAssistant_sv.ts │ │ ├── SerialPortAssistant_th.ts │ │ ├── SerialPortAssistant_tr.ts │ │ ├── SerialPortAssistant_uk.ts │ │ ├── SerialPortAssistant_zh.ts │ │ ├── SerialPortAssistant_zh_CN.ts │ │ └── SerialPortAssistant_zh_TW.ts │ ├── png │ │ ├── China.png │ │ ├── Clear.png │ │ ├── English.png │ │ ├── Language.jpg │ │ ├── Save.png │ │ ├── SerialPortAssistant.png │ │ ├── arrow-down-filling.png │ │ ├── arrow-down.png │ │ ├── arrow-right-filling.png │ │ ├── arrow-right.png │ │ ├── close.png │ │ ├── log.png │ │ ├── open-file.png │ │ ├── pause.png │ │ ├── refresh.png │ │ ├── send.png │ │ ├── settings16x16.png │ │ ├── start256.png │ │ ├── stop-red256.png │ │ ├── style.png │ │ ├── weixinpay20.png │ │ ├── zhifubao.png │ │ └── zhifubao20.png │ └── sink │ │ ├── Style_Blue.qss │ │ ├── Style_Gray.qss │ │ ├── blue.qss │ │ └── dark │ │ ├── rc │ │ ├── Hmovetoolbar.png │ │ ├── Hsepartoolbar.png │ │ ├── Vmovetoolbar.png │ │ ├── Vsepartoolbar.png │ │ ├── branch_closed-on.png │ │ ├── branch_closed.png │ │ ├── branch_open-on.png │ │ ├── branch_open.png │ │ ├── checkbox.png │ │ ├── close.png │ │ ├── down_arrow.png │ │ ├── down_arrow_disabled.png │ │ ├── left_arrow.png │ │ ├── left_arrow_disabled.png │ │ ├── right_arrow.png │ │ ├── right_arrow_disabled.png │ │ ├── sizegrip.png │ │ ├── stylesheet-branch-end.png │ │ ├── stylesheet-branch-more.png │ │ ├── stylesheet-vline.png │ │ ├── transparent.png │ │ ├── undock.png │ │ ├── up_arrow.png │ │ └── up_arrow_disabled.png │ │ ├── style.qrc │ │ └── style.qss ├── SendFile.cpp ├── SendFile.h ├── SerialPortAssistant.ico ├── android │ ├── AndroidManifest.xml │ └── res │ │ ├── drawable-hdpi │ │ └── icon.png │ │ ├── drawable-ldpi │ │ └── icon.png │ │ ├── drawable-mdpi │ │ └── icon.png │ │ ├── drawable-xhdpi │ │ └── icon.png │ │ ├── drawable-xxhdpi │ │ └── icon.png │ │ ├── drawable-xxxhdpi │ │ └── icon.png │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values-zh-rHK │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ └── strings.xml │ │ └── values │ │ └── strings.xml └── resource.qrc ├── Authors.md ├── Authors_zh_CN.md ├── CMakeLists.txt ├── ChangeLog.md ├── ChangeLog_zh_CN.md ├── Docs ├── bitcoin.png ├── ui-en.jpg └── ui-zh.jpg ├── Install ├── Install.nsi └── install.sh ├── License.md ├── Package ├── Flatpak │ └── io.github.KangLin.SerialPortAssistant.json └── rpm │ └── serialportassistant.spec ├── README.md ├── README_zh_CN.md ├── Script ├── build_appimage.sh ├── build_debpackage.sh ├── build_depend.sh ├── build_linux.sh ├── build_rpm_package.sh └── test_linux.sh ├── SerialPortAssistant.keystore ├── Update ├── update.json ├── update.xml ├── update_android.xml ├── update_linux.xml └── update_windows.xml ├── appveyor.yml ├── debian ├── changelog ├── control ├── copyright ├── postinst ├── postrm ├── preinst ├── prerm ├── rules ├── source │ └── format └── watch ├── deploy.sh ├── etc └── SerialPortAssistant_logqt.ini ├── share ├── SerialPortAssistant.sh ├── applications │ └── io.github.KangLin.SerialPortAssistant.desktop.in └── metainfo │ └── io.github.KangLin.SerialPortAssistant.metainfo.xml.in ├── snap └── snapcraft.yaml ├── vcpkg.json └── vcpkg └── manifests └── vcpkg.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | 14 | - https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 15 | - https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 16 | - https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | 29 | **Smartphone (please complete the following information):** 30 | - Device: [e.g. iPhone6] 31 | - OS: [e.g. iOS8.1] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | # Author:Kang Lin 2 | 3 | name: android 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_android.outputs.name }} 11 | 12 | jobs: 13 | build_android: 14 | strategy: 15 | matrix: 16 | BUILD_TYPE: [Release] 17 | qt_arch: [android_arm64_v8a, android_x86_64] 18 | qt_version: [6.8.2] 19 | include: 20 | - qt_arch: android_arm64_v8a 21 | VCPKG_TARGET_TRIPLET: arm64-android 22 | ANDROID_ABI: arm64-v8a 23 | 24 | - qt_arch: android_x86_64 25 | VCPKG_TARGET_TRIPLET: x64-android 26 | ANDROID_ABI: x86_64 27 | 28 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 29 | # See: https://github.com/actions/runner-images/ 30 | runs-on: ubuntu-24.04 31 | 32 | env: 33 | artifact_name: build_android 34 | BUILD_DIR: ${{github.workspace}}/build 35 | SOURCE_DIR: ${{github.workspace}}/.cache/source 36 | TOOLS_DIR: ${{github.workspace}}/.cache/tools 37 | INSTALL_DIR: ${{github.workspace}}/.cache/install 38 | VCPKGGITCOMMITID: 59aeb8fe8fe1c980de6bd5ba634cf21024522d81 39 | VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} 40 | VCPKG_DEFAULT_HOST_TRIPLET: x64-linux 41 | ANDROID_ABI: ${{matrix.ANDROID_ABI}} 42 | ANDROID_PLATFORM: android-35 43 | ANDROID_NATIVE_API_LEVEL: 35 44 | qt_modules: 'qtscxml qtserialport' 45 | SerialPortAssistant_VERSION: v0.5.31 46 | 47 | # Map the job outputs to step outputs 48 | outputs: 49 | name: ${{ env.artifact_name }} 50 | 51 | steps: 52 | - name: Checkout Repository 53 | uses: actions/checkout@v3 54 | with: 55 | submodules: recursive 56 | fetch-depth: 0 57 | 58 | - name: make directory 59 | run: | 60 | cmake -E make_directory ${{env.SOURCE_DIR}} 61 | cmake -E make_directory ${{env.TOOLS_DIR}} 62 | cmake -E make_directory ${{env.INSTALL_DIR}} 63 | cmake -E make_directory ${{env.BUILD_DIR}} 64 | 65 | - name: Cache installed 66 | #if: false 67 | uses: actions/cache@v4 68 | id: cache-installed 69 | with: 70 | path: | 71 | ${{env.INSTALL_DIR}} 72 | key: installed-qt${{matrix.qt_version}}-${{matrix.qt_arch}}-${{matrix.VCPKG_TARGET_TRIPLET}} 73 | 74 | - name: Install Qt of gcc_64 75 | uses: jurplel/install-qt-action@v3 76 | with: 77 | dir: '${{env.TOOLS_DIR}}' # optional 78 | version: '${{matrix.qt_version}}' 79 | host: 'linux' 80 | target: 'desktop' 81 | arch: 'linux_gcc_64' 82 | set-env: false 83 | cache: true 84 | cache-key-prefix: cached_qt 85 | 86 | - name: Install Qt of android 87 | uses: jurplel/install-qt-action@v3 88 | with: 89 | # Directory to install Qt 90 | dir: '${{env.TOOLS_DIR}}' # optional 91 | # Version of Qt to install 92 | version: '${{matrix.qt_version}}' 93 | # Host platform 94 | #host: linux # optional 95 | # Target platform for build 96 | target: 'android' # optional, default is desktop 97 | # Architecture for Windows/Android 98 | arch: '${{matrix.qt_arch}}' # optional 99 | # Additional Qt modules to install 100 | modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ 101 | # Whether or not to actually download Qt 102 | cache: true 103 | cache-key-prefix: cached_qt 104 | 105 | - name: run vcpkg 106 | uses: lukka/run-vcpkg@v11 107 | with: 108 | # Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port. 109 | #setupOnly: # optional 110 | #vcpkgGitURL: https://github.com/KangLin/vcpkg.git 111 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 112 | vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ 113 | 114 | - name: git clone RabbitCommon 115 | working-directory: ${{env.SOURCE_DIR}} 116 | run: | 117 | git clone https://github.com/KangLin/RabbitCommon.git 118 | 119 | - name: build SerialPortAssistant 120 | working-directory: ${{github.workspace}}/build 121 | env: 122 | RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon 123 | QT_ANDROID_KEYSTORE_PATH: ${{env.SOURCE_DIR}}/RabbitCommon/RabbitCommon.keystore 124 | QT_ANDROID_KEYSTORE_ALIAS: rabbitcommon 125 | QT_ANDROID_KEYSTORE_STORE_PASS: ${{secrets.STOREPASS}} 126 | run: | 127 | sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake 128 | ${Qt6_DIR}/bin/qt-cmake .. \ 129 | -DCMARK_SHARED=OFF \ 130 | -DCMARK_TESTS=OFF \ 131 | -DCMARK_STATIC=ON \ 132 | -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \ 133 | -DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \ 134 | -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \ 135 | -DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \ 136 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \ 137 | -DVCPKG_APPLOCAL_DEPS=ON \ 138 | -DRABBIT_ENABLE_INSTALL_QT=ON \ 139 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=ON \ 140 | -DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \ 141 | -DQT_ANDROID_SIGN_APK=ON \ 142 | -DQT_ENABLE_VERBOSE_DEPLOYMENT=ON \ 143 | -DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \ 144 | -DCMAKE_INSTALL_PREFIX=`pwd`/install 145 | cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target all 146 | APK_FILE=`find . -name "android-*.apk"` 147 | cp $APK_FILE SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk 148 | 149 | - name: Update configure file 150 | working-directory: ${{github.workspace}}/build 151 | run: | 152 | ${{env.SOURCE_DIR}}/RabbitCommon/Install/GenerateJsonFile.sh \ 153 | update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json \ 154 | SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk \ 155 | android ${{matrix.ANDROID_ABI}} \ 156 | "https://github.com/KangLin/SerialPortAssistant/releases/download/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk,https://sourceforge.net/projects/SerialPortAssistant/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk?viasf=1" 157 | 158 | - name: update 159 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 160 | uses: actions/upload-artifact@v4 161 | with: 162 | name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} 163 | path: | 164 | ${{github.workspace}}/build/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk 165 | ${{github.workspace}}/build/update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json 166 | -------------------------------------------------------------------------------- /.github/workflows/appimage.yml: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | 3 | name: appimage 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_appimage.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 14 | 15 | jobs: 16 | build_appimage: 17 | strategy: 18 | matrix: 19 | BUILD_TYPE: [Release] 20 | qt_version: [6.8.2] 21 | os: [ubuntu-24.04, ubuntu-24.04-arm] 22 | include: 23 | - os: ubuntu-24.04 24 | qt_arch: "linux_gcc_64" 25 | - os: ubuntu-24.04-arm 26 | qt_arch: "linux_gcc_arm64" 27 | 28 | # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) 29 | # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) 30 | # See: https://github.com/actions/runner-images/ 31 | runs-on: ${{matrix.os}} 32 | 33 | env: 34 | BUILD_TYPE: ${{matrix.BUILD_TYPE}} 35 | BUILD_DIR: ${{github.workspace}}/build 36 | SOURCE_DIR: ${{github.workspace}}/.cache/source 37 | TOOLS_DIR: ${{github.workspace}}/.cache/tools 38 | INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} 39 | artifact_name: build_appimage 40 | qt_modules: 'qtscxml' 41 | SerialPortAssistant_VERSION: v0.5.31 42 | 43 | # Map the job outputs to step outputs 44 | outputs: 45 | name: ${{ env.artifact_name }} 46 | 47 | steps: 48 | - name: Checkout Repository 49 | uses: actions/checkout@v3 50 | with: 51 | submodules: recursive 52 | fetch-depth: 0 53 | 54 | - name: Make directories 55 | run: | 56 | cmake -E make_directory ${{env.BUILD_DIR}} 57 | cmake -E make_directory ${{env.SOURCE_DIR}} 58 | cmake -E make_directory ${{env.TOOLS_DIR}} 59 | cmake -E make_directory ${{env.INSTALL_DIR}} 60 | 61 | - name: Cache installed 62 | uses: actions/cache@v3 63 | id: cache-installed 64 | with: 65 | path: | 66 | ${{env.INSTALL_DIR}} 67 | ${{env.TOOLS_DIR}}/linuxdeploy-* 68 | key: install_appimage 69 | 70 | - name: git clone RabbitCommon 71 | working-directory: ${{env.SOURCE_DIR}} 72 | run: | 73 | git clone https://github.com/KangLin/RabbitCommon.git 74 | 75 | - name: Install base dependency libraries 76 | run: | 77 | sudo ./Script/build_depend.sh --apt_update --base --default \ 78 | --install ${{env.INSTALL_DIR}} \ 79 | --source ${{env.SOURCE_DIR}} \ 80 | --tools ${{env.TOOLS_DIR}} \ 81 | --build ${{env.BUILD_DIR}} 82 | 83 | - name: Install Qt 84 | uses: jurplel/install-qt-action@v3 85 | if: false 86 | with: 87 | dir: '${{env.TOOLS_DIR}}/qt' 88 | version: ${{matrix.qt_version}} 89 | target: 'desktop' 90 | arch: ${{matrix.qt_arch}} 91 | # See: https://ddalcino.github.io/aqt-list-server/ 92 | modules: ${{env.qt_modules}} 93 | cache: true 94 | cache-key-prefix: cached-qt_${{matrix.qt_arch}} 95 | 96 | - name: build appimage 97 | env: 98 | RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon 99 | run: | 100 | export QMAKE=/usr/bin/qmake6 101 | ${{github.workspace}}/Script/build_appimage.sh 102 | md5sum SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_`uname -m`.AppImage > SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_`uname -m`.AppImage.md5sum 103 | 104 | - name: core dump infomations 105 | if: false 106 | run: | 107 | echo "# ulimit -a" 108 | ulimit -a 109 | echo "# cat /proc/sys/kernel/core_pattern" 110 | cat /proc/sys/kernel/core_pattern 111 | echo "# ulimit -c unlimited" 112 | ulimit -c unlimited 113 | echo "# sudo sysctl -w kernel.core_pattern=core" 114 | sudo sysctl -w kernel.core_pattern=${{github.workspace}}/core 115 | echo "# ulimit -a" 116 | ulimit -a 117 | echo "# cat /proc/sys/kernel/core_pattern" 118 | cat /proc/sys/kernel/core_pattern 119 | 120 | # See: https://www.cnblogs.com/cong-wang/p/15026524.html 121 | # Naming of core dump files 122 | # By default, a core dump file is named core, but the /proc/sys/kernel/core_pattern file (since Linux 2.6 and 123 | # 2.4.21) can be set to define a template that is used to name core dump files. The template can contain % 124 | # specifiers which are substituted by the following values when a core file is created: 125 | # 126 | # %% a single % character 127 | # %c core file size soft resource limit of crashing process (since Linux 2.6.24) 128 | # %d dump mode—same as value returned by prctl(2) PR_GET_DUMPABLE (since Linux 3.7) 129 | # %e executable filename (without path prefix) 130 | # %E pathname of executable, with slashes ('/') replaced by exclamation marks ('!') (since Linux 3.0). 131 | # %g (numeric) real GID of dumped process 132 | # %h hostname (same as nodename returned by uname(2)) 133 | # %i TID of thread that triggered core dump, as seen in the PID namespace in which the thread resides 134 | # (since Linux 3.18) 135 | # %I TID of thread that triggered core dump, as seen in the initial PID namespace (since Linux 3.18) 136 | # %p PID of dumped process, as seen in the PID namespace in which the process resides 137 | # %P PID of dumped process, as seen in the initial PID namespace (since Linux 3.12) 138 | # %s number of signal causing dump 139 | # %t time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC) 140 | # %u (numeric) real UID of dumped process 141 | 142 | - name: update configure file 143 | if: ${{ matrix.BUILD_TYPE == 'Release'}} 144 | continue-on-error: true 145 | run: | 146 | #sudo apt update -y -qq 147 | #sudo apt-get install -y -qq xvfb xpra 148 | sudo Xvfb :96 -ac -screen 0 1200x900x24 & 149 | export DISPLAY=:96.0 150 | 151 | #echo "Enable core dump ......" 152 | #sudo apt install gdb -y -qq 153 | #ulimit -c unlimited 154 | #echo "# sudo sysctl -w kernel.core_pattern=core" 155 | #sudo sysctl -w kernel.core_pattern=${{github.workspace}}/core 156 | #echo "# cat /proc/sys/kernel/core_pattern" 157 | #cat /proc/sys/kernel/core_pattern 158 | 159 | echo "Update update_linux.json ......" 160 | export QT_XCB_GL_INTEGRATION=none 161 | #export QT_DEBUG_PLUGINS=1 162 | ARCH=`uname -m` 163 | MD5SUM=`cat SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage.md5sum|awk '{print $1}'` 164 | echo "MD5SUM SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage: ${MD5SUM}" 165 | echo "Generate update configure file ......" 166 | ./SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage \ 167 | -f "${{github.workspace}}/update_appimage_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json" \ 168 | --foc 1 \ 169 | --file-name SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage \ 170 | -u "https://github.com/KangLin/SerialPortAssistant/releases/download/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${ARCH}.AppImage;https://sourceforge.net/projects/SerialPortAssistant/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${ARCH}.AppImage?viasf=1" \ 171 | --md5 "${MD5SUM}" \ 172 | -m "v${{env.SerialPortAssistant_VERSION}}" 173 | 174 | #if [ -f core ]; then 175 | # echo "Dump core ......" 176 | # gdb ./SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_$ARCH.AppImage core 177 | #fi 178 | 179 | - name: Update artifact 180 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 181 | uses: actions/upload-artifact@v4 182 | with: 183 | name: ${{ env.artifact_name }}_${{matrix.os}} 184 | path: | 185 | ${{github.workspace}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_*.AppImage 186 | ${{github.workspace}}/update_appimage_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json 187 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Author:Kang Lin 2 | 3 | name: build 4 | 5 | env: 6 | artifact_path: artifact_path 7 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 8 | SerialPortAssistant_VERSION: v0.5.31 9 | 10 | on: 11 | push: 12 | pull_request: 13 | 14 | jobs: 15 | ubuntu: 16 | uses: ./.github/workflows/ubuntu.yml 17 | 18 | docker: 19 | uses: ./.github/workflows/docker.yml 20 | secrets: inherit 21 | 22 | appimage: 23 | uses: ./.github/workflows/appimage.yml 24 | 25 | flatpak: 26 | uses: ./.github/workflows/flatpak.yml 27 | secrets: inherit 28 | 29 | msvc: 30 | uses: ./.github/workflows/msvc.yml 31 | 32 | mingw: 33 | if: true 34 | uses: ./.github/workflows/mingw.yml 35 | 36 | macos: 37 | uses: ./.github/workflows/macos.yml 38 | 39 | android: 40 | uses: ./.github/workflows/android.yml 41 | secrets: inherit 42 | 43 | deploy: 44 | #if: ${{ startsWith(github.ref, 'refs/tags/') }} 45 | runs-on: ubuntu-latest 46 | needs: [ubuntu, appimage, msvc, android, macos] 47 | steps: 48 | - name: Checkout Repository 49 | uses: actions/checkout@v3 50 | with: 51 | submodules: true 52 | 53 | - name: clean test tag 54 | if: ${{ startsWith(github.ref, 'refs/heads/master') }} 55 | continue-on-error: true 56 | run: | 57 | gh release delete test_${{ github.ref_name }} -y --cleanup-tag 58 | 59 | - name: Download ubuntu 60 | uses: actions/download-artifact@v4 61 | with: 62 | pattern: ${{ needs.ubuntu.outputs.name }}* 63 | path: ${{ env.artifact_path }} 64 | merge-multiple: true 65 | 66 | - name: Download docker 67 | uses: actions/download-artifact@v4 68 | with: 69 | pattern: ${{ needs.docker.outputs.name }}* 70 | path: ${{ env.artifact_path }} 71 | merge-multiple: true 72 | 73 | - name: Download appimage 74 | uses: actions/download-artifact@v4 75 | with: 76 | pattern: ${{ needs.appimage.outputs.name }}* 77 | path: ${{ env.artifact_path }} 78 | merge-multiple: true 79 | 80 | - name: Download flatpak 81 | uses: actions/download-artifact@v4 82 | with: 83 | pattern: ${{ needs.flatpak.outputs.name }}* 84 | path: ${{ env.artifact_path }} 85 | merge-multiple: true 86 | 87 | - name: Download msvc 88 | uses: actions/download-artifact@v4 89 | with: 90 | pattern: ${{ needs.msvc.outputs.name }}_* 91 | path: ${{ env.artifact_path }} 92 | merge-multiple: true 93 | 94 | - name: Download android 95 | uses: actions/download-artifact@v4 96 | with: 97 | pattern: ${{ needs.android.outputs.name }}_* 98 | path: ${{ env.artifact_path }} 99 | merge-multiple: true 100 | 101 | - name: Download macos 102 | uses: actions/download-artifact@v4 103 | with: 104 | pattern: ${{ needs.macos.outputs.name }}_* 105 | path: ${{ env.artifact_path }} 106 | merge-multiple: true 107 | 108 | - name: Process configure file 109 | run: | 110 | git clone https://github.com/KangLin/RabbitCommon.git 111 | ./RabbitCommon/Install/MergeJsonFile.sh \ 112 | "${{ github.workspace }}/update.json" \ 113 | "${{ env.artifact_path }}" "${{ env.artifact_path }}/version.json" 114 | rm ${{ env.artifact_path }}/*.json 115 | 116 | - name: Add test comment in Release.md file 117 | if: ${{ ! startsWith(github.ref, 'refs/tags/') }} 118 | run: | 119 | echo "**This release is for development and testing purposes only!**" >> ${{github.workspace}}/Release.md 120 | echo "Commit: [${{github.sha}}](https://github.com/KangLin/SerialPortAssistant/commit/${{github.sha}})" >> ${{github.workspace}}/Release.md 121 | echo "" >> ${{github.workspace}}/Release.md 122 | echo "[:us: Change log](ChangeLog.md)" >> ${{github.workspace}}/Release.md 123 | echo "" >> ${{github.workspace}}/Release.md 124 | echo "[Instructions for installing the package](README.md#Instructions-for-installing-the-package)" >> ${{github.workspace}}/Release.md 125 | 126 | - name: Make relase file 127 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 128 | run: | 129 | echo "[:cn: 修改日志](https://github.com/KangLin/SerialPortAssistant/blob/${{env.SerialPortAssistant_VERSION}}/ChangeLog_zh_CN.md)" > ${{github.workspace}}/Release.md 130 | echo "[:us: Change log](https://github.com/KangLin/SerialPortAssistant/blob/${{env.SerialPortAssistant_VERSION}}/ChangeLog.md)" >> ${{github.workspace}}/Release.md 131 | echo "" >> ${{github.workspace}}/Release.md 132 | echo "[Instructions for installing the package](https://github.com/KangLin/SerialPortAssistant/blob/${{env.SerialPortAssistant_VERSION}}/README.md#Instructions-for-installing-the-package)" >> ${{github.workspace}}/Release.md 133 | echo "[安装包说明](https://github.com/KangLin/SerialPortAssistant/blob/${{env.SerialPortAssistant_VERSION}}/README_zh_CN.md#安装包说明)" >> ${{github.workspace}}/Release.md 134 | 135 | - name: md5 136 | run: | 137 | echo "" >> ${{github.workspace}}/Release.md 138 | echo "File checksum:" >> ${{github.workspace}}/Release.md 139 | echo "|File|Checksum(md5)|" >> ${{github.workspace}}/Release.md 140 | echo "| :- | :- |" >> ${{github.workspace}}/Release.md 141 | 142 | cd ${{ env.artifact_path }} 143 | for file in * 144 | do 145 | echo "$file" 146 | if [ -f $file ]; then 147 | if [ "${file##*.}" != "xml" ] && [ "${file##*.}" != "json" ]; then 148 | md5sum $file > $file.md5sum 149 | awk '{print "|", $2, "|", $1, "|"}' ${file}.md5sum >> ${{github.workspace}}/Release.md 150 | fi 151 | else 152 | rm -fr $file 153 | fi 154 | done 155 | 156 | - name: Add flathub download 157 | run: | 158 | echo "" >> ${{github.workspace}}/Release.md 159 | echo "[![Download from Flathub](https://flathub.org/api/badge?locale=en)](https://flathub.org/apps/io.github.KangLin.SerialPortAssistant)" >> ${{github.workspace}}/Release.md 160 | 161 | - name: Create github Release 162 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 163 | continue-on-error: true 164 | run: | 165 | gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Release.md 166 | 167 | - name: Upload To Github Release 168 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 169 | run: | 170 | gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{env.artifact_path}}/* ${{github.workspace}}/Release.md ${{ github.workspace }}/update.json 171 | 172 | - name: Upload test tag To Github Release 173 | if: ${{ startsWith(github.ref, 'refs/heads/master') }} 174 | run: | 175 | gh release create test_${{ github.ref_name }} --prerelease --latest=false --title "Recently developed build - ${{ github.ref_name }}" --notes-file ${{github.workspace}}/Release.md 176 | gh release upload test_${{ github.ref_name }} --clobber ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Release.md ${{github.workspace}}/update.json --clobber 177 | 178 | -------------------------------------------------------------------------------- /.github/workflows/codespell.yml: -------------------------------------------------------------------------------- 1 | # Author:Kang Lin 2 | 3 | name: Codespell 4 | 5 | on: 6 | push: 7 | pull_request: 8 | 9 | jobs: 10 | codespell: 11 | name: Check for spelling errors 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout Repository 15 | uses: actions/checkout@v3 16 | with: 17 | submodules: true 18 | 19 | - uses: codespell-project/actions-codespell@master 20 | with: 21 | check_filenames: true 22 | path: ${{github.workspace}} 23 | skip: "*.lua,*.ui,codespell.yml" 24 | ignore_words_list: "doubleclick,msdos,rabits,eArch" 25 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | 3 | name: docker 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_docker.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 14 | 15 | jobs: 16 | build_docker: 17 | strategy: 18 | matrix: 19 | variant: 20 | - PACKAGE: deb 21 | image: ubuntu 22 | os: ubuntu-24.04 23 | - PACKAGE: deb 24 | image: ubuntu 25 | os: ubuntu-24.04-arm 26 | - PACKAGE: rpm 27 | image: fedora 28 | os: ubuntu-24.04 29 | - PACKAGE: rpm 30 | image: "fedora" 31 | os: ubuntu-24.04-arm 32 | 33 | # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) 34 | # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) 35 | # See: https://github.com/actions/runner-images/ 36 | runs-on: ${{matrix.variant.os}} 37 | 38 | env: 39 | SerialPortAssistant_VERSION: 0.0.32 40 | artifact_name: build_docker 41 | 42 | # Map the job outputs to step outputs 43 | outputs: 44 | name: ${{ env.artifact_name }} 45 | 46 | steps: 47 | - name: Checkout Repository 48 | uses: actions/checkout@v4 49 | with: 50 | submodules: true 51 | fetch-depth: 0 52 | - name: run docker 53 | run: | 54 | ./Script/build_linux.sh --docker --docker-image="${{matrix.variant.image}}" --${{matrix.variant.PACKAGE}} 55 | - name: Update artifact 56 | if: ${{matrix.variant.PACKAGE == 'rpm'}} 57 | uses: actions/upload-artifact@v4 58 | with: 59 | name: ${{ env.artifact_name }}_${{matrix.variant.PACKAGE}}_${{matrix.variant.image}}_${{matrix.variant.os}} 60 | path: | 61 | ${{github.workspace}}/build_linux/serialportassistant*.rpm 62 | -------------------------------------------------------------------------------- /.github/workflows/flatpak.yml: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | name: flatpak 3 | 4 | on: 5 | workflow_call: 6 | outputs: 7 | name: 8 | description: "The artifact name" 9 | value: ${{ jobs.build_android.outputs.name }} 10 | 11 | jobs: 12 | build_flatpak: 13 | strategy: 14 | matrix: 15 | variant: 16 | - arch: x86_64 17 | os: ubuntu-24.04 18 | - arch: aarch64 19 | os: ubuntu-24.04-arm 20 | 21 | env: 22 | artifact_name: SerialPortAssistant 23 | SerialPortAssistant_VERSION: v0.0.32 24 | 25 | # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) 26 | # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) 27 | # See: https://github.com/actions/runner-images/ 28 | runs-on: ${{ matrix.variant.os }} 29 | container: 30 | image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-44 31 | options: --privileged 32 | 33 | # Map the job outputs to step outputs 34 | outputs: 35 | name: ${{ env.artifact_name }} 36 | 37 | steps: 38 | - name: Checkout Repository 39 | uses: actions/checkout@v4 40 | with: 41 | submodules: recursive 42 | fetch-depth: 0 43 | 44 | - name: Flatpak build 45 | uses: flathub-infra/flatpak-github-actions/flatpak-builder@master 46 | with: 47 | bundle: SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_${{ matrix.variant.arch }}.flatpak 48 | manifest-path: Package/Flatpak/io.github.KangLin.SerialPortAssistant.json 49 | cache-key: flatpak-builder-${{ github.sha }} 50 | arch: ${{ matrix.variant.arch }} 51 | verbose: true 52 | -------------------------------------------------------------------------------- /.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | # Author:Kang Lin 2 | 3 | name: build_macos 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_macos.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | 15 | jobs: 16 | build_macos: 17 | strategy: 18 | matrix: 19 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) 20 | BUILD_TYPE: [Release, Debug] 21 | qt_version: [6.8.2, 5.15.2, 5.12.12] 22 | qt_arch: [clang_64] 23 | config_arch: [x86_64] 24 | VCPKG_TARGET_TRIPLET: [x64-osx] 25 | include: 26 | - qt_version: 6.8.2 27 | qt_modules: qtscxml qtserialport 28 | 29 | - qt_version: 5.15.2 30 | 31 | - qt_version: 5.12.12 32 | 33 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 34 | # See: https://github.com/actions/runner-images/ 35 | runs-on: macos-13 36 | 37 | env: 38 | BUILD_TYPE: ${{ matrix.BUILD_TYPE }} 39 | BUILD_DIR: ${{github.workspace}}/build 40 | SOURCE_DIR: ${{github.workspace}}/.cache/source 41 | TOOLS_DIR: ${{github.workspace}}/.cache/tools 42 | INSTALL_DIR: ${{github.workspace}}/.cache/install_macos 43 | qt_modules: ${{matrix.qt_modules}} 44 | artifact_name: build_macos 45 | VCPKGGITCOMMITID: 59aeb8fe8fe1c980de6bd5ba634cf21024522d81 46 | SerialPortAssistant_VERSION: 0.5.31 47 | 48 | # Map the job outputs to step outputs 49 | outputs: 50 | name: ${{ env.artifact_name }} 51 | 52 | steps: 53 | - name: Checkout Repository 54 | uses: actions/checkout@v3 55 | with: 56 | submodules: true 57 | fetch-depth: 0 58 | 59 | - name: Make directories 60 | run: | 61 | cmake -E make_directory ${{env.SOURCE_DIR}} 62 | cmake -E make_directory ${{env.TOOLS_DIR}} 63 | cmake -E make_directory ${{env.INSTALL_DIR}} 64 | cmake -E make_directory ${{env.BUILD_DIR}} 65 | 66 | - name: Cache installed 67 | uses: actions/cache@v3 68 | id: cache-installed 69 | with: 70 | path: | 71 | ${{env.INSTALL_DIR}} 72 | key: Cache-installed-macos_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} 73 | 74 | - name: run vcpkg 75 | uses: lukka/run-vcpkg@v11 76 | with: 77 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 78 | vcpkgDirectory: ${{runner.workspace}}/vcpkg/ 79 | 80 | - name: Install Qt 81 | uses: jurplel/install-qt-action@v3 82 | with: 83 | dir: '${{env.TOOLS_DIR}}/qt' # optional 84 | version: '${{matrix.qt_version}}' # optional, default is 5.15.2 85 | arch: '${{matrix.qt_arch}}' # optional 86 | modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ 87 | cache: true 88 | cache-key-prefix: cached_qt 89 | 90 | - name: git clone RabbitCommon 91 | working-directory: ${{env.SOURCE_DIR}} 92 | run: | 93 | git clone https://github.com/KangLin/RabbitCommon.git 94 | 95 | - name: build SerialPortAssistant 96 | working-directory: ${{github.workspace}}/build 97 | env: 98 | RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon 99 | run: | 100 | cmake ${{github.workspace}} \ 101 | -DCMARK_SHARED=OFF \ 102 | -DCMARK_TESTS=OFF \ 103 | -DCMARK_STATIC=ON \ 104 | -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \ 105 | -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \ 106 | -DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake \ 107 | -DVCPKG_VERBOSE=ON \ 108 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \ 109 | -DVCPKG_APPLOCAL_DEPS=ON \ 110 | -DINSTALL_QT=ON \ 111 | -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake 112 | cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install 113 | 7z a SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_macos_qt${{matrix.qt_version}}.zip install/. 114 | 115 | - name: test run 116 | if: false # ${{ matrix.BUILD_TYPE == 'Release' }} 117 | working-directory: ${{github.workspace}}/build 118 | run: | 119 | ./install/bin/SerialPortAssistant 120 | 121 | - name: Update configure file 122 | if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }} 123 | working-directory: ${{github.workspace}}/build 124 | run: | 125 | ${{env.SOURCE_DIR}}/RabbitCommon/Install/GenerateJsonFile.sh \ 126 | "${{github.workspace}}/build/update_macos_${{matrix.qt_version}}.json" \ 127 | "SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_macos_qt${{matrix.qt_version}}.zip" \ 128 | macos ${{matrix.config_arch}} \ 129 | "https://github.com/KangLin/SerialPortAssistant/releases/download/v${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_macos_qt${{matrix.qt_version}}.zip,https://sourceforge.net/projects/rabbitSerialPortAssistant/v${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_macos_qt${{matrix.qt_version}}.zip?viasf=1" 130 | 131 | - name: Update artifact 132 | if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }} 133 | uses: actions/upload-artifact@v4 134 | with: 135 | name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} 136 | path: | 137 | ${{github.workspace}}/build/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_macos_qt${{matrix.qt_version}}.zip 138 | ${{github.workspace}}/build/update_macos_${{matrix.qt_version}}.json 139 | -------------------------------------------------------------------------------- /.github/workflows/mingw.yml: -------------------------------------------------------------------------------- 1 | # Author:Kang Lin 2 | 3 | name: build_mingw 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_mingw.outputs.name }} 11 | 12 | jobs: 13 | build_mingw: 14 | name: build mingw 15 | 16 | strategy: 17 | matrix: 18 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) 19 | BUILD_TYPE: [Release, Debug] 20 | 21 | defaults: 22 | run: 23 | shell: cmd 24 | 25 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 26 | # See: https://github.com/actions/runner-images/ 27 | runs-on: windows-latest 28 | 29 | env: 30 | SOURCE_DIR: ${{github.workspace}}\.cache\source 31 | TOOLS_DIR: ${{github.workspace}}\.cache\tools 32 | INSTALL_DIR: ${{github.workspace}}\.cache\install_mingw 33 | SerialPortAssistant_VERSION: v0.5.31 34 | artifact_name: build_mingw 35 | 36 | # Map the job outputs to step outputs 37 | outputs: 38 | name: ${{ env.artifact_name }} 39 | 40 | steps: 41 | - name: Checkout Repository 42 | uses: actions/checkout@v3 43 | with: 44 | submodules: true 45 | fetch-depth: 0 46 | 47 | - name: Make directories 48 | run: | 49 | cmake -E make_directory ${{env.SOURCE_DIR}} 50 | cmake -E make_directory ${{env.TOOLS_DIR}} 51 | cmake -E make_directory ${{env.INSTALL_DIR}} 52 | cmake -E make_directory ${{github.workspace}}/build 53 | 54 | - name: pacman 55 | env: 56 | PATH: C:\msys64\usr\bin 57 | run: | 58 | C:\msys64\usr\bin\pacman.exe -Syu --noconfirm 59 | C:\msys64\usr\bin\pacman.exe -S --noconfirm ^ 60 | mingw-w64-x86_64-cmake ^ 61 | mingw-w64-x86_64-make ^ 62 | mingw-w64-x86_64-nsis ^ 63 | mingw-w64-x86_64-gcc ^ 64 | mingw-w64-x86_64-qt6 ^ 65 | mingw-w64-x86_64-cmark ^ 66 | mingw-w64-x86_64-zlib ^ 67 | mingw-w64-x86_64-openssl ^ 68 | git base-devel 69 | 70 | - name: Cache installed 71 | uses: actions/cache@v3 72 | id: cache-installed 73 | with: 74 | path: | 75 | ${{env.INSTALL_DIR}} 76 | key: cache-installed-mingw 77 | 78 | - name: git clone RabbitCommon 79 | working-directory: ${{env.SOURCE_DIR}} 80 | run: | 81 | git clone https://github.com/KangLin/RabbitCommon.git 82 | 83 | - name: build SerialPortAssistant 84 | working-directory: ${{github.workspace}}\build 85 | env: 86 | RabbitCommon_ROOT: ${{env.SOURCE_DIR}}\RabbitCommon 87 | MSYSTEM: MINGW64 88 | PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin 89 | PKG_CONFIG_PATH: ${{env.INSTALL_DIR}}/lib/pkgconfig 90 | run: | 91 | cmake .. -G"MinGW Makefiles" ^ 92 | -DCMARK_SHARED=OFF ^ 93 | -DCMARK_TESTS=OFF ^ 94 | -DCMARK_STATIC=ON ^ 95 | -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^ 96 | -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install ^ 97 | -DRABBIT_ENABLE_INSTALL_DEPENDENT=OFF ^ 98 | -DRABBIT_ENABLE_INSTALL_QT=OFF ^ 99 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF ^ 100 | -DBUILD_FREERDP=ON ^ 101 | -DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}} 102 | cmake --build . --config ${{ matrix.BUILD_TYPE }} 103 | cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install 104 | copy /Y C:\msys64\mingw64\bin\*.dll install\bin 105 | copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin 106 | copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin 107 | makensis ${{github.workspace}}\build\Install.nsi 108 | 109 | - name: update artifact 110 | if: false # ${{ matrix.BUILD_TYPE == 'Release' }} 111 | uses: actions/upload-artifact@v4 112 | with: 113 | name: ${{ env.artifact_name }} 114 | path: | 115 | ${{github.workspace}}\build\SerialPortAssistant_Setup_${{env.SerialPortAssistant_VERSION}}.exe 116 | -------------------------------------------------------------------------------- /.github/workflows/msvc.yml: -------------------------------------------------------------------------------- 1 | # Author:Kang Lin 2 | 3 | name: build_msvc 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_msvc.outputs.name }} 11 | 12 | jobs: 13 | build_msvc: 14 | strategy: 15 | matrix: 16 | BUILD_TYPE: [Release, Debug] 17 | qt_version: [6.8.2, 5.15.2, 5.12.12] 18 | include: 19 | - qt_version: 6.8.2 20 | VCPKG_TARGET_TRIPLET: x64-windows 21 | VCPKG_PLATFORM_TOOLSET: v143 22 | qt_arch: win64_msvc2022_64 23 | CMAKE_GENERATOR_PLATFORM: x64 24 | qt_modules: qtscxml qtserialport 25 | 26 | - qt_version: 5.15.2 27 | VCPKG_TARGET_TRIPLET: x64-windows 28 | VCPKG_PLATFORM_TOOLSET: v143 29 | qt_arch: win64_msvc2019_64 30 | CMAKE_GENERATOR_PLATFORM: x64 31 | VCPKG_MANIFEST_DIR: "\\vcpkg\\manifests" 32 | 33 | - qt_version: 5.12.12 34 | VCPKG_TARGET_TRIPLET: x86-windows 35 | VCPKG_PLATFORM_TOOLSET: v143 36 | qt_arch: win32_msvc2017 37 | CMAKE_GENERATOR_PLATFORM: Win32 38 | VCPKG_MANIFEST_DIR: "\\vcpkg\\manifests" 39 | 40 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 41 | # See: https://github.com/actions/runner-images/ 42 | runs-on: windows-latest 43 | 44 | env: 45 | SerialPortAssistant_VERSION: v0.5.31 46 | BUILD_DIR: ${{github.workspace}}/build 47 | SOURCE_DIR: ${{github.workspace}}\.cache\source 48 | TOOLS_DIR: ${{github.workspace}}\.cache\tools 49 | INSTALL_DIR: ${{github.workspace}}\.cache\install_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} 50 | CMAKE_GENERATOR: "Visual Studio 17 2022" 51 | CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}} 52 | VCPKGGITCOMMITID: 59aeb8fe8fe1c980de6bd5ba634cf21024522d81 53 | VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} 54 | VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}} 55 | VCPKG_MANIFEST_DIR: "${{github.workspace}}${{matrix.VCPKG_MANIFEST_DIR}}" 56 | qt_modules: ${{matrix.qt_modules}} 57 | artifact_name: build_msvc 58 | 59 | # Map the job outputs to step outputs 60 | outputs: 61 | name: ${{ env.artifact_name }} 62 | 63 | defaults: 64 | run: 65 | shell: cmd 66 | 67 | steps: 68 | - name: Checkout Repository 69 | uses: actions/checkout@v3 70 | with: 71 | submodules: recursive 72 | fetch-depth: 0 73 | 74 | - name: Make directories 75 | run: | 76 | cmake -E make_directory ${{env.BUILD_DIR}} 77 | cmake -E make_directory ${{env.SOURCE_DIR}} 78 | cmake -E make_directory ${{env.TOOLS_DIR}} 79 | cmake -E make_directory ${{env.INSTALL_DIR}} 80 | 81 | - name: Cache installed 82 | uses: actions/cache@v3 83 | id: cache-installed 84 | with: 85 | path: | 86 | ${{env.INSTALL_DIR}} 87 | key: cache-installed-msvc-${{matrix.qt_arch}} 88 | 89 | - name: run-vcpkg 90 | uses: lukka/run-vcpkg@v11 91 | with: 92 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 93 | vcpkgDirectory: ${{runner.workspace}}/vcpkg/ 94 | 95 | - name: Install Qt 96 | uses: jurplel/install-qt-action@v3 97 | with: 98 | dir: '${{env.TOOLS_DIR}}/qt' # optional 99 | version: '${{matrix.qt_version}}' # optional, default is 5.15.2 100 | arch: '${{matrix.qt_arch}}' # optional 101 | modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ 102 | cache: true 103 | cache-key-prefix: cached_qt 104 | 105 | - name: git clone RabbitCommon 106 | working-directory: ${{env.SOURCE_DIR}} 107 | run: | 108 | git clone https://github.com/KangLin/RabbitCommon.git 109 | 110 | - name: build SerialPortAssistant 111 | working-directory: ${{github.workspace}}/build 112 | env: 113 | RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon 114 | run: | 115 | cmake ${{github.workspace}} ^ 116 | -A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^ 117 | -T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^ 118 | -DCMARK_SHARED=OFF ^ 119 | -DCMARK_TESTS=OFF ^ 120 | -DCMARK_STATIC=ON ^ 121 | -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^ 122 | -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install ^ 123 | -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ^ 124 | -DVCPKG_MANIFEST_DIR=${{env.VCPKG_MANIFEST_DIR}} ^ 125 | -DVCPKG_VERBOSE=ON ^ 126 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^ 127 | -DVCPKG_APPLOCAL_DEPS=ON ^ 128 | -DRABBIT_ENABLE_INSTALL_DEPENDENT=ON ^ 129 | -DRABBIT_ENABLE_INSTALL_QT=ON ^ 130 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF 131 | cmake --build . --config ${{matrix.BUILD_TYPE}} 132 | 133 | - name: Package 134 | working-directory: ${{github.workspace}}/build 135 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 136 | run: | 137 | cmake --install . --config ${{matrix.BUILD_TYPE}} --component=Application 138 | cmake --install . --config ${{matrix.BUILD_TYPE}} --component=Runtime 139 | cmake --install . --config ${{matrix.BUILD_TYPE}} --component=DependLibraries 140 | copy /Y vcpkg_installed\${{matrix.VCPKG_TARGET_TRIPLET}}\bin\*.dll install\bin 141 | copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin 142 | copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin 143 | makensis Install.nsi 144 | copy /Y SerialPortAssistant_Setup_${{env.SerialPortAssistant_VERSION}}.exe SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe 145 | 146 | - name: Update configure file 147 | if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }} 148 | working-directory: ${{github.workspace}}\build 149 | run: | 150 | .\install\bin\SerialPortAssistant.exe ^ 151 | -f "${{github.workspace}}\build\update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json" ^ 152 | --foc 1 ^ 153 | -p ${{github.workspace}}\build\SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{ matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe ^ 154 | -m "${{env.SerialPortAssistant_VERSION}}" ^ 155 | -u "https://github.com/KangLin/SerialPortAssistant/releases/download/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{ matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe ;https://sourceforge.net/projects/rabbitSerialPortAssistant/${{env.SerialPortAssistant_VERSION}}/SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{ matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe?viasf=1" 156 | 157 | - name: Update artifact 158 | if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version != '5.15.2' }} 159 | uses: actions/upload-artifact@v4 160 | with: 161 | name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} 162 | path: | 163 | ${{github.workspace}}\build\SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_${{ matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe 164 | ${{github.workspace}}\build\update_${{matrix.qt_arch}}_${{matrix.qt_version}}.json 165 | 166 | # - name: Upload To Github Release 167 | # if: ${{ matrix.BUILD_TYPE == 'Release' && '5.12.12' == matrix.qt_version && startsWith(github.ref, 'refs/tags/') }} 168 | # uses: softprops/action-gh-release@v1 169 | # env: 170 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 171 | # with: 172 | # prerelease: true 173 | ## body: | 174 | ## [:cn: 修改日志](ChangeLog_zh_CN.md) [:us: Change log](ChangeLog.md) 175 | # files: | 176 | # ${{github.workspace}}\build\SerialPortAssistant_Setup_${{env.SerialPortAssistant_VERSION}}.exe 177 | # ${{github.workspace}}\build\update_windows.xml 178 | # 179 | -------------------------------------------------------------------------------- /.github/workflows/snap.yml: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | name: snap 3 | 4 | on: 5 | workflow_call: 6 | outputs: 7 | name: 8 | description: "The artifact name" 9 | value: ${{ jobs.build_android.outputs.name }} 10 | 11 | jobs: 12 | build_snap: 13 | strategy: 14 | matrix: 15 | variant: 16 | - arch: x86_64 17 | os: ubuntu-24.04 18 | - arch: aarch64 19 | os: ubuntu-24.04-arm 20 | 21 | env: 22 | artifact_name: SerialPortAssistant 23 | SerialPortAssistant_VERSION: v0.0.32 24 | 25 | # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) 26 | # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) 27 | # See: https://github.com/actions/runner-images/ 28 | runs-on: ${{ matrix.variant.os }} 29 | container: 30 | image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-44 31 | options: --privileged 32 | 33 | # Map the job outputs to step outputs 34 | outputs: 35 | name: ${{ env.artifact_name }} 36 | 37 | steps: 38 | - name: Checkout Repository 39 | uses: actions/checkout@v4 40 | with: 41 | submodules: recursive 42 | fetch-depth: 0 43 | 44 | - name: Flatpak build 45 | uses: flathub-infra/flatpak-github-actions/flatpak-builder@master 46 | with: 47 | bundle: SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_${{ matrix.variant.arch }}.flatpak 48 | manifest-path: Package/Flatpak/io.github.KangLin.SerialPortAssistant.json 49 | cache-key: flatpak-builder-${{ github.sha }} 50 | arch: ${{ matrix.variant.arch }} 51 | verbose: true 52 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | 3 | name: build_ubuntu 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_ubuntu.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | 15 | jobs: 16 | build_ubuntu: 17 | strategy: 18 | matrix: 19 | BUILD_TYPE: [Release, Debug] 20 | os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04-arm] 21 | 22 | # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) 23 | # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) 24 | # See: https://github.com/actions/runner-images/ 25 | runs-on: ${{matrix.os}} 26 | 27 | env: 28 | BUILD_DIR: ${{github.workspace}}/build 29 | SOURCE_DIR: ${{github.workspace}}/.cache/source 30 | TOOLS_DIR: ${{github.workspace}}/.cache/tools 31 | INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.BUILD_TYPE}} 32 | artifact_name: build_ubuntu 33 | SerialPortAssistant_VERSION: 0.5.31 34 | 35 | # Map the job outputs to step outputs 36 | outputs: 37 | name: ${{ env.artifact_name }} 38 | 39 | steps: 40 | - name: Checkout Repository 41 | uses: actions/checkout@v3 42 | with: 43 | submodules: recursive 44 | fetch-depth: 0 45 | 46 | - name: Make directories 47 | run: | 48 | cmake -E make_directory ${{env.BUILD_DIR}} 49 | cmake -E make_directory ${{env.SOURCE_DIR}} 50 | cmake -E make_directory ${{env.TOOLS_DIR}} 51 | cmake -E make_directory ${{env.INSTALL_DIR}} 52 | 53 | - name: Install dependency libraries 54 | run: | 55 | sudo ./Script/build_depend.sh --apt_update --base --default \ 56 | --install ${{env.INSTALL_DIR}} \ 57 | --source ${{env.SOURCE_DIR}} \ 58 | --tools ${{env.TOOLS_DIR}} \ 59 | --build ${{env.BUILD_DIR}} 60 | if [ "ubuntu-22.04-arm" != ${{matrix.os}} ]; then 61 | sudo apt install -y -q qt6-5compat-dev 62 | fi 63 | 64 | - name: Cache installed 65 | uses: actions/cache@v3 66 | id: cache-installed 67 | with: 68 | path: | 69 | ${{env.INSTALL_DIR}} 70 | key: install_ubuntu_${{matrix.os}}_${{matrix.BUILD_TYPE}} 71 | 72 | - name: git clone RabbitCommon 73 | working-directory: ${{env.SOURCE_DIR}} 74 | run: | 75 | git clone https://github.com/KangLin/RabbitCommon.git 76 | 77 | - name: build_debpackage.sh 78 | working-directory: ${{github.workspace}} 79 | env: 80 | RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon 81 | run: | 82 | ./Script/build_debpackage.sh 83 | 84 | - name: Update configure file 85 | working-directory: ${{github.workspace}} 86 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 87 | run: | 88 | sudo Xvfb :97 -ac -screen 0 1200x900x24 & 89 | export DISPLAY=:97.0 90 | export ARCH=`dpkg --print-architecture` 91 | export OS_NAME="ubuntu-`lsb_release -s -r`" 92 | cp ../serialportassistant_${{env.SerialPortAssistant_VERSION}}_${ARCH}.deb serialportassistant_${{env.SerialPortAssistant_VERSION}}_${OS_NAME}_${ARCH}.deb 93 | sudo apt install ./serialportassistant_${{env.SerialPortAssistant_VERSION}}_${OS_NAME}_${ARCH}.deb 94 | echo "test ......" 95 | ./Script/test_linux.sh 96 | echo "Update configure file ......" 97 | MD5=`md5sum serialportassistant_${{env.SerialPortAssistant_VERSION}}_${OS_NAME}_${ARCH}.deb | awk '{print $1}'` 98 | export QT_XCB_GL_INTEGRATION=none 99 | ulimit -c unlimited 100 | echo "# sudo sysctl -w kernel.core_pattern=core" 101 | sudo sysctl -w kernel.core_pattern=${{github.workspace}}/core 102 | /opt/SerialPortAssistant/bin/SerialPortAssistant.sh \ 103 | -f "`pwd`/update_ubuntu_${OS_NAME}_${ARCH}.json" \ 104 | --foc 1 \ 105 | --md5 ${MD5} \ 106 | -m "${{env.SerialPortAssistant_VERSION}}" \ 107 | -p serialportassistant_${{env.SerialPortAssistant_VERSION}}_${OS_NAME}_${ARCH}.deb \ 108 | -u "https://github.com/KangLin/SerialPortAssistant/releases/download/v${{env.SerialPortAssistant_VERSION}}/serialportassistant_${{env.SerialPortAssistant_VERSION}}_${OS_NAME}_${ARCH}.deb;https://sourceforge.net/projects/SerialPortAssistant/v${{env.SerialPortAssistant_VERSION}}/serialportassistant_${{env.SerialPortAssistant_VERSION}}_${OS_NAME}_${ARCH}.deb?viasf=1" 109 | 110 | - name: Update version configure file 111 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 112 | working-directory: ${{github.workspace}} 113 | run: | 114 | sudo Xvfb :98 -ac & 115 | export DISPLAY=:98.0 116 | /opt/SerialPortAssistant/bin/SerialPortAssistant.sh \ 117 | -f "${{github.workspace}}/version.json" \ 118 | --foc 0 \ 119 | --pv ${{env.SerialPortAssistant_VERSION}} 120 | 121 | - name: Update artifact 122 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 123 | uses: actions/upload-artifact@v4 124 | with: 125 | name: ${{ env.artifact_name }}_${{matrix.os}} 126 | path: | 127 | ${{github.workspace}}/serialportassistant_${{env.SerialPortAssistant_VERSION}}*.deb 128 | ${{github.workspace}}/update_*.json 129 | ${{github.workspace}}/version.json 130 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | debian/files 2 | .flatpak-builder/ 3 | *.AppImage 4 | *.snap 5 | *.substvars 6 | debian/.debhelper/ 7 | debian/debhelper-build-stamp 8 | debian/serialportassistant/ 9 | debian/patches/ 10 | .pc/ 11 | CMakeLists.txt.user* 12 | .qmake.stash 13 | Translations.qrc 14 | Plugin/PluginStatic.cpp 15 | Plugin/PluginStatic.pri 16 | Plugin/build-Lbs*/ 17 | Makefile.Debug 18 | Makefile.Release 19 | Version.h 20 | Update/Update_*.xml 21 | *.log 22 | *.bak 23 | *~ 24 | *.autosave 25 | *.qm 26 | *.user 27 | test.xml 28 | .CCodec.h.kate-swp 29 | .kdev4/ 30 | .kdev_include_paths 31 | build*/ 32 | RabbitIm/ 33 | *.ncb 34 | .metadata/ 35 | *~ 36 | debug/ 37 | bin/ 38 | *.class 39 | .deps/ 40 | Makefile.in 41 | aclocal.m4 42 | config.guess 43 | config.h 44 | config.h.in 45 | config.h.in~ 46 | config.log 47 | config.status 48 | config.sub 49 | configure 50 | depcomp 51 | install-sh 52 | libtool 53 | ltmain.sh 54 | missing 55 | reachmonitor 56 | stamp-h1 57 | .deps/ 58 | Makefile.in 59 | aclocal.m4 60 | config.guess 61 | config.h 62 | config.h.in 63 | config.h.in~ 64 | config.log 65 | config.status 66 | config.sub 67 | configure 68 | depcomp 69 | install-sh 70 | libtool 71 | ltmain.sh 72 | missing 73 | stamp-h1 74 | *.bak 75 | *.bs 76 | *.la 77 | *.lo 78 | *.ft 79 | *.ft.1 80 | *.made 81 | *.o 82 | *.obj 83 | *.old 84 | *.orig 85 | *.out 86 | *.pdb 87 | *.rej 88 | .libs/ 89 | Makefile 90 | *.cdf 91 | *.cache 92 | *.obj 93 | *.ilk 94 | *.resources 95 | *.tlb 96 | *.tli 97 | *.tlh 98 | *.tmp 99 | *.rsp 100 | *.pgc 101 | *.pgd 102 | *.meta 103 | *.tlog 104 | *.manifest 105 | *.res 106 | *.pch 107 | *.exp 108 | *.idb 109 | *.rep 110 | *.xdc 111 | *.pdb 112 | *_manifest.rc 113 | *.bsc 114 | *.sbr 115 | *.opensdf 116 | *.sdf 117 | *.suo 118 | Debug/ 119 | release/ 120 | Release/ 121 | ipch/ 122 | IncludeLocalDatabase.txt 123 | ThirdLibrary/unix_mingw/ 124 | ThirdLibrary/unix/ 125 | ThirdLibrary/unix_static/ 126 | ThirdLibrary/android/ 127 | ThirdLibrary/android_static/ 128 | ThirdLibrary/windows_msvc/ 129 | ThirdLibrary/windows_mingw/ 130 | ThirdLibrary/src/ 131 | ThirdLibrary/windows_mingw_static/ 132 | ThirdLibrary/windows_msvc_static/ 133 | rabbitim.kdev4 134 | *.pro.user.* 135 | Doxygen/ 136 | Doxyfile 137 | -------------------------------------------------------------------------------- /3th_lib/Control/lightbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef LIGHTBUTTON_H 2 | #define LIGHTBUTTON_H 3 | 4 | /** 5 | * 高亮发光按钮控件 作者:feiyangqingyun(QQ:517216493) 2016-10-16 6 | * 1. 可设置文本,居中显示 7 | * 2. 可设置文本颜色 8 | * 3. 可设置外边框渐变颜色 9 | * 4. 可设置里边框渐变颜色 10 | * 5. 可设置背景色 11 | * 6. 可直接调用内置的设置 绿色/红色/黄色/黑色/蓝色 等公有槽函数 12 | * 7. 可设置是否在容器中可移动,当成一个对象使用 13 | * 8. 可设置是否显示矩形 14 | * 9. 可设置报警颜色+非报警颜色 15 | * 10. 可控制启动报警和停止报警,报警时闪烁 16 | */ 17 | 18 | #include 19 | 20 | #ifdef quc 21 | class Q_DECL_EXPORT LightButton : public QWidget 22 | #else 23 | class LightButton : public QWidget 24 | #endif 25 | 26 | { 27 | Q_OBJECT 28 | Q_PROPERTY(QString text READ getText WRITE setText) 29 | Q_PROPERTY(QColor textColor READ getTextColor WRITE setTextColor) 30 | Q_PROPERTY(QColor alarmColor READ getAlarmColor WRITE setAlarmColor) 31 | Q_PROPERTY(QColor normalColor READ getNormalColor WRITE setNormalColor) 32 | 33 | Q_PROPERTY(QColor borderOutColorStart READ getBorderOutColorStart WRITE setBorderOutColorStart) 34 | Q_PROPERTY(QColor borderOutColorEnd READ getBorderOutColorEnd WRITE setBorderOutColorEnd) 35 | Q_PROPERTY(QColor borderInColorStart READ getBorderInColorStart WRITE setBorderInColorStart) 36 | Q_PROPERTY(QColor borderInColorEnd READ getBorderInColorEnd WRITE setBorderInColorEnd) 37 | Q_PROPERTY(QColor bgColor READ getBgColor WRITE setBgColor) 38 | 39 | Q_PROPERTY(bool canMove READ getCanMove WRITE setCanMove) 40 | Q_PROPERTY(bool showRect READ getShowRect WRITE setShowRect) 41 | Q_PROPERTY(bool showOverlay READ getShowOverlay WRITE setShowOverlay) 42 | Q_PROPERTY(QColor overlayColor READ getOverlayColor WRITE setOverlayColor) 43 | 44 | public: 45 | explicit LightButton(QWidget *parent = 0); 46 | 47 | protected: 48 | bool eventFilter(QObject *watched, QEvent *event); 49 | void paintEvent(QPaintEvent *); 50 | void drawBorderOut(QPainter *painter); 51 | void drawBorderIn(QPainter *painter); 52 | void drawBg(QPainter *painter); 53 | void drawText(QPainter *painter); 54 | void drawOverlay(QPainter *painter); 55 | 56 | private: 57 | QString text; //文本 58 | QColor textColor; //文字颜色 59 | QColor alarmColor; //报警颜色 60 | QColor normalColor; //正常颜色 61 | 62 | QColor borderOutColorStart; //外边框渐变开始颜色 63 | QColor borderOutColorEnd; //外边框渐变结束颜色 64 | QColor borderInColorStart; //里边框渐变开始颜色 65 | QColor borderInColorEnd; //里边框渐变结束颜色 66 | QColor bgColor; //背景颜色 67 | 68 | bool showRect; //显示成矩形 69 | bool canMove; //是否能够移动 70 | bool showOverlay; //是否显示遮罩层 71 | QColor overlayColor; //遮罩层颜色 72 | 73 | bool isAlarm; //是否报警 74 | QTimer *timerAlarm; //定时器切换颜色 75 | 76 | public: 77 | QString getText() const; 78 | QColor getTextColor() const; 79 | QColor getAlarmColor() const; 80 | QColor getNormalColor() const; 81 | 82 | QColor getBorderOutColorStart() const; 83 | QColor getBorderOutColorEnd() const; 84 | QColor getBorderInColorStart() const; 85 | QColor getBorderInColorEnd() const; 86 | QColor getBgColor() const; 87 | 88 | bool getCanMove() const; 89 | bool getShowRect() const; 90 | bool getShowOverlay() const; 91 | QColor getOverlayColor() const; 92 | 93 | QSize sizeHint() const; 94 | QSize minimumSizeHint() const; 95 | 96 | public Q_SLOTS: 97 | //设置文本 98 | void setText(const QString &text); 99 | //设置文本颜色 100 | void setTextColor(const QColor &textColor); 101 | 102 | //设置报警颜色+正常颜色 103 | void setAlarmColor(const QColor &alarmColor); 104 | void setNormalColor(const QColor &normalColor); 105 | 106 | //设置外边框渐变颜色 107 | void setBorderOutColorStart(const QColor &borderOutColorStart); 108 | void setBorderOutColorEnd(const QColor &borderOutColorEnd); 109 | 110 | //设置里边框渐变颜色 111 | void setBorderInColorStart(const QColor &borderInColorStart); 112 | void setBorderInColorEnd(const QColor &borderInColorEnd); 113 | 114 | //设置背景色 115 | void setBgColor(const QColor &bgColor); 116 | 117 | //设置是否可移动 118 | void setCanMove(bool canMove); 119 | //设置是否显示矩形 120 | void setShowRect(bool showRect); 121 | //设置是否显示遮罩层 122 | void setShowOverlay(bool showOverlay); 123 | //设置遮罩层颜色 124 | void setOverlayColor(const QColor &overlayColor); 125 | 126 | //设置为绿色 127 | void setGreen(); 128 | //设置为红色 129 | void setRed(); 130 | //设置为黄色 131 | void setYellow(); 132 | //设置为黑色 133 | void setBlack(); 134 | //设置为灰色 135 | void setGray(); 136 | //设置为蓝色 137 | void setBlue(); 138 | //设置为淡蓝色 139 | void setLightBlue(); 140 | //设置为淡红色 141 | void setLightRed(); 142 | //设置为淡绿色 143 | void setLightGreen(); 144 | 145 | //设置报警闪烁 146 | void startAlarm(); 147 | void stopAlarm(); 148 | void alarm(); 149 | }; 150 | 151 | #endif // LIGHTBUTTON_H 152 | -------------------------------------------------------------------------------- /App/AppIcon.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "SerialPortAssistant.ico" 2 | -------------------------------------------------------------------------------- /App/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | 3 | project(SerialPortAssistant) 4 | 5 | set(HEADER_FILES 6 | MainWindow.h 7 | Global/Global.h 8 | Common/Tool.h 9 | SendFile.h 10 | ${CMAKE_SOURCE_DIR}/3th_lib/Control/lightbutton.h 11 | ) 12 | set(SOURCE_FILES 13 | MainWindow.cpp 14 | Main.cpp 15 | Global/Global.cpp 16 | Common/Tool.cpp 17 | SendFile.cpp 18 | ${CMAKE_SOURCE_DIR}/3th_lib/Control/lightbutton.cpp 19 | ) 20 | set(SOURCE_UI_FILES 21 | MainWindow.ui 22 | ) 23 | set(RESOURCE_FILES Resource/Resource.qrc) 24 | if(WIN32) 25 | list(APPEND RESOURCE_FILES AppIcon.rc) 26 | endif() 27 | 28 | GET_VERSION(OUT_VERSION SerialPortAssistant_VERSION 29 | OUT_REVISION SerialPortAssistant_Revision 30 | OUT_TAG SerialPortAssistantTAG) 31 | IF(NOT SerialPortAssistant_VERSION) 32 | SET(SerialPortAssistant_VERSION "0.5.31") 33 | ENDIF() 34 | IF(NOT SerialPortAssistantTAG) 35 | SET(SerialPortAssistantTAG "0.5.31") 36 | ENDIF() 37 | message("SerialPortAssistant_VERSION:${SerialPortAssistant_VERSION};Revision:${SerialPortAssistant_Revision};Tag:${SerialPortAssistantTAG}") 38 | 39 | set(APP_QT_COMPONENTS Core Gui Widgets Network Svg Xml) 40 | if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) 41 | list(APPEND APP_QT_COMPONENTS StateMachine) 42 | endif() 43 | find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${APP_QT_COMPONENTS}) 44 | if(Qt${QT_VERSION_MAJOR}_FOUND) 45 | FOREACH(_COMPONENT ${APP_QT_COMPONENTS}) 46 | list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::${_COMPONENT}) 47 | ENDFOREACH() 48 | else() 49 | message(FATAL_ERROR "Qt${QT_VERSION_MAJOR} don't found") 50 | endif() 51 | 52 | ADD_TARGET(NAME ${PROJECT_NAME} 53 | ISEXE 54 | ISWINDOWS 55 | SOURCE_FILES ${SOURCE_FILES} ${SOURCE_UI_FILES} ${HEADER_FILES} ${RESOURCE_FILES} 56 | INCLUDE_DIRS 57 | $ # See: http://www.it1352.com/478094.html 58 | $ 59 | $ 60 | $ 61 | PRIVATE_LIBS RabbitCommon ${QT_LIBRARIES} 62 | PRIVATE_DEFINITIONS SerialPortAssistant_VERSION="${SerialPortAssistant_VERSION}" 63 | SerialPortAssistant_Revision="${SerialPortAssistant_Revision}" 64 | RABBITCOMMON 65 | VERSION ${SerialPortAssistant_VERSION} 66 | ) 67 | 68 | INSTALL_FILE(SOURCES ${CMAKE_SOURCE_DIR}/etc/SerialPortAssistant_logqt.ini 69 | DESTINATION etc 70 | COMPONENT Application) 71 | 72 | iF(WIN32) 73 | # 替换 Install.nsi 中的 CMAKE_INSTALL_PREFIX 等 74 | configure_file(${CMAKE_SOURCE_DIR}/Install/Install.nsi 75 | ${CMAKE_BINARY_DIR}/Install.nsi @ONLY) 76 | endif() 77 | 78 | # Install other files 79 | set(OTHER_FILES 80 | ${CMAKE_SOURCE_DIR}/License.md 81 | ${CMAKE_SOURCE_DIR}/Authors.md 82 | ${CMAKE_SOURCE_DIR}/ChangeLog.md 83 | ${CMAKE_SOURCE_DIR}/Authors_zh_CN.md 84 | ${CMAKE_SOURCE_DIR}/ChangeLog_zh_CN.md) 85 | INSTALL_FILE(SOURCES ${OTHER_FILES} 86 | DESTINATION ${CMAKE_INSTALL_DOCDIR} 87 | COMPONENT Application) 88 | 89 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/App/SerialPortAssistant.ico 90 | DESTINATION "." 91 | COMPONENT Application) 92 | 93 | if(UNIX AND NOT ANDROID) 94 | set(APP_ID io.github.KangLin.SerialPortAssistant) 95 | configure_file(${CMAKE_SOURCE_DIR}/share/applications/${APP_ID}.desktop.in 96 | ${CMAKE_BINARY_DIR}/${APP_ID}.desktop @ONLY) 97 | INSTALL(FILES ${CMAKE_BINARY_DIR}/${APP_ID}.desktop 98 | DESTINATION "${CMAKE_INSTALL_DATADIR}/applications" 99 | COMPONENT Application) 100 | INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/share/SerialPortAssistant.sh 101 | DESTINATION "${CMAKE_INSTALL_BINDIR}" 102 | COMPONENT Application) 103 | # Icon path 104 | # The freedesktop.org standard specifies in which order and directories programs should look for icons: 105 | # 106 | # $HOME/.icons (for backwards compatibility) 107 | # $XDG_DATA_DIRS/icons 108 | # /usr/share/pixmaps 109 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/App/Resource/png/SerialPortAssistant.png 110 | DESTINATION share/pixmaps 111 | COMPONENT Application 112 | RENAME ${APP_ID}.png) 113 | # Flatpak: https://docs.flatpak.org/en/latest/conventions.html#application-icons 114 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/App/Resource/png/SerialPortAssistant.png 115 | DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps" 116 | COMPONENT Application 117 | RENAME ${APP_ID}.png) 118 | string(TIMESTAMP BUILD_DATE "%Y-%m-%d") 119 | configure_file(${CMAKE_SOURCE_DIR}/share/metainfo/${APP_ID}.metainfo.xml.in 120 | ${CMAKE_BINARY_DIR}/${APP_ID}.metainfo.xml @ONLY) 121 | INSTALL(FILES ${CMAKE_BINARY_DIR}/${APP_ID}.metainfo.xml 122 | DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo" 123 | COMPONENT Application) 124 | endif() 125 | -------------------------------------------------------------------------------- /App/Common/Tool.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | Copyright (c) Kang Lin studio, All Rights Reserved 3 | 4 | Author: 5 | Kang Lin(kl222@126.com) 6 | 7 | Module Name: 8 | 9 | Tool.h 10 | 11 | Abstract: 12 | 13 | This file contains tool define. 14 | */ 15 | 16 | #ifndef TOOL_H 17 | #define TOOL_H 18 | 19 | //#if defined(_MSC_VER) && (_MSC_VER >= 1600) 20 | //#pragma execution_character_set("utf-8") 21 | //#endif 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | #include "Global/Global.h" 30 | 31 | /** 32 | * @defgroup RABBITGIS_TOOL 工具类模块 33 | */ 34 | 35 | /** 36 | * @brief 工具类。提供一此工具函数 37 | * @ingroup RABBITGIS_TOOL 38 | */ 39 | class CTool : public QObject 40 | { 41 | Q_OBJECT 42 | public: 43 | explicit CTool(QObject *parent = 0); 44 | ~CTool(); 45 | 46 | public: 47 | 48 | /** 49 | * @brief 删除指定的目录 50 | * 51 | * @param dirName 要删除的目录名 52 | * @return bool 成功返回 true,否则返回 false 53 | */ 54 | static bool removeDirectory(QString dirName); 55 | 56 | /** 57 | * @brief 调整窗口的位置,手机上,让窗口全屏,在pc上,把窗口调整到屏幕中间 58 | * 59 | * @fn SetWindowsGeometry 60 | * @param pWindow 61 | * @return int 62 | */ 63 | static int SetWindowsGeometry(QWidget* pWindow); 64 | 65 | static QString FileDialog(QWidget* pParent, const QString &szDir, 66 | const QString &szFilter, 67 | const QString &szTilte = tr("Open file"), const QFileDialog::AcceptMode mode = QFileDialog::AcceptOpen); 68 | static std::string DoubleToString(double d); 69 | /** 70 | * 得到文件的校验和 71 | */ 72 | static QByteArray GetFileMd5Sum(QString filePath); 73 | static QString GetFileMd5SumString(QString filePath); 74 | 75 | static QPixmap ComposePixmap(const QString& szFile1, 76 | const QString& szFile2); 77 | static int ComposePixmap(QPixmap &src1, const QPixmap &src2); 78 | static int ComposeAvatarStatus(QPixmap &src1, const QPixmap& src2); 79 | 80 | static QImage ConvertToGray(QImage image); 81 | 82 | /** 83 | * @brief 禁用锁屏 84 | * @param bWake:true,禁用锁屏,false,允许锁屏 85 | * @return 成功返回 true,否则返回 false 86 | */ 87 | static bool EnableWake(bool bWake = true); 88 | 89 | signals: 90 | 91 | public slots: 92 | 93 | }; 94 | 95 | #endif // TOOL_H 96 | -------------------------------------------------------------------------------- /App/Global/Global.cpp: -------------------------------------------------------------------------------- 1 | /*++ 2 | Copyright (c) Kang Lin studio, All Rights Reserved 3 | 4 | Author: 5 | Kang Lin(kl222@126.com) 6 | 7 | Module Name: 8 | 9 | Global.cpp 10 | 11 | Abstract: 12 | 13 | This file contains global variable implement. 14 | */ 15 | 16 | #include "Global.h" 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | Q_LOGGING_CATEGORY(log, "Global") 23 | 24 | CGlobal::CGlobal(QObject *parent) : 25 | QObject(parent) 26 | { 27 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 28 | QSettings::IniFormat); 29 | m_StatusbarVisible = conf.value("UI/Visible/Statusbar", "true").toBool(); 30 | m_ToolbarVisible = conf.value("UI/Visible/Toolbar", "true").toBool(); 31 | m_bSendLoop = conf.value("Settings/Send/Loop", "false").toBool(); 32 | m_nSendLoopTime = conf.value("Settings/Send/LoopTime", 1000).toInt(); 33 | m_SendRN = (CGlobal::SEND_R_N)conf.value("Settings/Send/SendRN", 0).toInt(); 34 | m_bReceiveDisplayTime = conf.value("Settings/Receive/DisplayTime", "false").toBool(); 35 | m_bReceiveDisplaySend = conf.value("Settings/Receive/DisplaySend", "false").toBool(); 36 | m_bSaveFile = conf.value("Settings/Receive/SaveFile", "false").toBool(); 37 | m_ReceiveDisplayCode = (ENCODE)conf.value("Settings/Receive/DisplayReceiveCode", 0).toInt(); 38 | m_SendDisplayCode = (ENCODE)conf.value("Settings/Receive/DisplaySendCode", 0).toInt(); 39 | } 40 | 41 | CGlobal::~CGlobal() 42 | { 43 | } 44 | 45 | CGlobal* CGlobal::Instance() 46 | { 47 | static CGlobal* p = NULL; 48 | if(!p) 49 | p = new CGlobal; 50 | return p; 51 | } 52 | 53 | bool CGlobal::GetStatusbarVisible() 54 | { 55 | return m_StatusbarVisible; 56 | } 57 | 58 | int CGlobal::SetStatusbarVisible(bool bVisible) 59 | { 60 | m_StatusbarVisible = bVisible; 61 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 62 | QSettings::IniFormat); 63 | conf.setValue("UI/Visible/Statusbar", m_StatusbarVisible); 64 | return 0; 65 | } 66 | 67 | bool CGlobal::GetToolbarVisible() 68 | { 69 | return m_ToolbarVisible; 70 | } 71 | 72 | int CGlobal::SetToolbarVisible(bool bVisible) 73 | { 74 | m_ToolbarVisible = bVisible; 75 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 76 | QSettings::IniFormat); 77 | conf.setValue("UI/Visible/Toolbar", m_ToolbarVisible); 78 | return 0; 79 | } 80 | 81 | bool CGlobal::GetSendLoop() 82 | { 83 | return m_bSendLoop; 84 | } 85 | 86 | int CGlobal::SetSendLoop(bool bLoop) 87 | { 88 | m_bSendLoop = bLoop; 89 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 90 | QSettings::IniFormat); 91 | conf.setValue("Settings/Send/Loop", m_bSendLoop); 92 | return 0; 93 | } 94 | 95 | int CGlobal::GetSendLoopTime() 96 | { 97 | return m_nSendLoopTime; 98 | } 99 | 100 | int CGlobal::SetSendLoopTime(int nTime) 101 | { 102 | m_nSendLoopTime = nTime; 103 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 104 | QSettings::IniFormat); 105 | conf.setValue("Settings/Send/LoopTime", m_nSendLoopTime); 106 | return 0; 107 | } 108 | 109 | CGlobal::SEND_R_N CGlobal::GetSendRN() 110 | { 111 | return m_SendRN; 112 | } 113 | 114 | int CGlobal::SetSendRN(SEND_R_N v) 115 | { 116 | m_SendRN = v; 117 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 118 | QSettings::IniFormat); 119 | conf.setValue("Settings/Send/SendRN", m_SendRN); 120 | return 0; 121 | } 122 | 123 | bool CGlobal::GetReceiveDisplayTime() 124 | { 125 | return m_bReceiveDisplayTime; 126 | } 127 | 128 | int CGlobal::SetReceiveDisplayTime(bool bDisplay) 129 | { 130 | m_bReceiveDisplayTime = bDisplay; 131 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 132 | QSettings::IniFormat); 133 | conf.setValue("Settings/Receive/DisplayTime", m_bReceiveDisplayTime); 134 | return 0; 135 | } 136 | 137 | bool CGlobal::GetReceiveDisplaySend() 138 | { 139 | return m_bReceiveDisplaySend; 140 | } 141 | 142 | int CGlobal::SetReceiveDisplaySend(bool bDisplay) 143 | { 144 | m_bReceiveDisplaySend = bDisplay; 145 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 146 | QSettings::IniFormat); 147 | conf.setValue("Settings/Receive/DisplaySend", m_bReceiveDisplaySend); 148 | return 0; 149 | } 150 | 151 | bool CGlobal::GetSaveFile() 152 | { 153 | return m_bSaveFile; 154 | } 155 | 156 | int CGlobal::SetSaveFile(bool bSaveFile) 157 | { 158 | m_bSaveFile = bSaveFile; 159 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 160 | QSettings::IniFormat); 161 | conf.setValue("Settings/Receive/SaveFile", m_bSaveFile); 162 | return 0; 163 | } 164 | 165 | CGlobal::ENCODE CGlobal::GetReceiveEncode() 166 | { 167 | return m_ReceiveDisplayCode; 168 | } 169 | 170 | int CGlobal::SetReceiveEncode(ENCODE code) 171 | { 172 | m_ReceiveDisplayCode = code; 173 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 174 | QSettings::IniFormat); 175 | conf.setValue("Settings/Receive/DisplayReceiveCode", m_ReceiveDisplayCode); 176 | return 0; 177 | } 178 | 179 | CGlobal::ENCODE CGlobal::GetSendEncode() 180 | { 181 | return m_SendDisplayCode; 182 | } 183 | 184 | int CGlobal::SetSendEncode(ENCODE code) 185 | { 186 | m_SendDisplayCode = code; 187 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 188 | QSettings::IniFormat); 189 | conf.setValue("Settings/Receive/DisplaySendCode", m_SendDisplayCode); 190 | return 0; 191 | } 192 | 193 | int CGlobal::SaveSerialPort(const QSerialPort &port, int nIndex) 194 | { 195 | if(-1 == nIndex) 196 | return -1; 197 | QSerialPortInfo info = QSerialPortInfo::availablePorts().at(nIndex); 198 | if(info.portName() != port.portName()) 199 | { 200 | qCritical(log) << "The port name is different:" 201 | << info.portName() << "!=" << port.portName(); 202 | return -2; 203 | } 204 | 205 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 206 | QSettings::IniFormat); 207 | conf.setValue("SerialPort/Name", port.portName()); 208 | conf.setValue("SerialPort/Default", port.portName()); 209 | conf.beginGroup("SerialPort/" + port.portName()); 210 | conf.setValue("BaudRate", port.baudRate()); 211 | conf.setValue("DataBit", port.dataBits()); 212 | conf.setValue("Parity", port.parity()); 213 | conf.setValue("StopBits", port.stopBits()); 214 | conf.setValue("FlowControl", port.flowControl()); 215 | conf.endGroup(); 216 | return 0; 217 | } 218 | 219 | int CGlobal::LoadSerialPort(Para ¶, int nIndex) 220 | { 221 | QSettings conf(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), 222 | QSettings::IniFormat); 223 | QSerialPort port; 224 | QString szName; 225 | 226 | if(-1 == nIndex) 227 | { 228 | szName = conf.value("SerialPort/Default").toString(); 229 | } else { 230 | if(QSerialPortInfo::availablePorts().count() <= 0) { 231 | qCritical(log) << "There are not serial port"; 232 | return -1; 233 | } 234 | QSerialPortInfo info = QSerialPortInfo::availablePorts().at(nIndex); 235 | szName = info.portName(); 236 | port.setPort(info); 237 | } 238 | 239 | if(szName.isEmpty()) { 240 | qWarning(log) << "No default port in configure file:" 241 | << RabbitCommon::CDir::Instance()->GetFileUserConfigure(); 242 | return -2; 243 | } 244 | 245 | para.name = szName; 246 | conf.beginGroup("SerialPort/" + szName); 247 | para.baudRate = conf.value("BaudRate", port.baudRate()).toInt(); 248 | para.dataBit = (QSerialPort::DataBits)conf.value("DataBit", port.dataBits()).toInt(); 249 | para.parity = (QSerialPort::Parity)conf.value("Parity", port.parity()).toInt(); 250 | para.stopBits = (QSerialPort::StopBits)conf.value("StopBits", port.stopBits()).toInt(); 251 | para.flowControl = (QSerialPort::FlowControl)conf.value("FlowControl", port.flowControl()).toInt(); 252 | conf.endGroup(); 253 | return 0; 254 | } 255 | -------------------------------------------------------------------------------- /App/Global/Global.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | Copyright (c) Kang Lin studio, All Rights Reserved 3 | 4 | Author: 5 | Kang Lin 6 | 7 | Module Name: 8 | 9 | Global.h 10 | 11 | Abstract: 12 | 13 | This file contains global variable define. 14 | */ 15 | 16 | #ifndef GLOBAL_H 17 | #define GLOBAL_H 18 | 19 | #include "RabbitCommonDir.h" 20 | 21 | #include 22 | #include 23 | 24 | /** 25 | * @mainpage 26 | * 27 | * 28 | */ 29 | 30 | /** 31 | * @defgroup RABBITGIS_GLOBAL 全局变量类模块 32 | * @brief 全局变量模块 33 | */ 34 | 35 | /** 36 | * @brief The CGlobal class 37 | * @ingroup RABBITGIS_GLOBAL 38 | */ 39 | class CGlobal : public QObject 40 | { 41 | Q_OBJECT 42 | 43 | private: 44 | explicit CGlobal(QObject *parent = nullptr); 45 | virtual ~CGlobal(); 46 | 47 | public: 48 | static CGlobal* Instance(); 49 | int SaveSerialPort(const QSerialPort &port, int nIndex = -1); 50 | struct Para { 51 | QString name; 52 | qint32 baudRate; 53 | QSerialPort::DataBits dataBit; 54 | QSerialPort::Parity parity; 55 | QSerialPort::StopBits stopBits; 56 | QSerialPort::FlowControl flowControl; 57 | }; 58 | int LoadSerialPort(Para ¶, int nIndex = -1); 59 | 60 | public: 61 | bool GetStatusbarVisible(); 62 | int SetStatusbarVisible(bool bVisible); 63 | private: 64 | bool m_StatusbarVisible; 65 | 66 | public: 67 | bool GetToolbarVisible(); 68 | int SetToolbarVisible(bool bVisible); 69 | private: 70 | bool m_ToolbarVisible; 71 | 72 | public: 73 | bool GetSendLoop(); 74 | int SetSendLoop(bool bLoop); 75 | private: 76 | bool m_bSendLoop; 77 | 78 | public: 79 | int GetSendLoopTime(); 80 | int SetSendLoopTime(int nTime); 81 | private: 82 | int m_nSendLoopTime; 83 | 84 | public: 85 | bool GetSaveFile(); 86 | int SetSaveFile(bool bSaveFile); 87 | private: 88 | bool m_bSaveFile; 89 | 90 | public: 91 | enum SEND_R_N{ 92 | R = 0x1, 93 | N = 0x2, 94 | RN = 0x3 95 | }; 96 | 97 | SEND_R_N GetSendRN(); 98 | int SetSendRN(SEND_R_N v); 99 | private: 100 | SEND_R_N m_SendRN; 101 | 102 | public: 103 | bool GetReceiveDisplayTime(); 104 | int SetReceiveDisplayTime(bool bDisplay); 105 | private: 106 | bool m_bReceiveDisplayTime; 107 | 108 | public: 109 | bool GetReceiveDisplaySend(); 110 | int SetReceiveDisplaySend(bool bDisplay); 111 | private: 112 | bool m_bReceiveDisplaySend; 113 | 114 | public: 115 | enum ENCODE{ 116 | ASCII = 0, 117 | HEX, 118 | UTF8, 119 | HEX_ASCII 120 | }; 121 | Q_ENUM(ENCODE) 122 | ENCODE GetReceiveEncode(); 123 | int SetReceiveEncode(ENCODE code); 124 | private: 125 | ENCODE m_ReceiveDisplayCode; 126 | 127 | public: 128 | ENCODE GetSendEncode(); 129 | int SetSendEncode(ENCODE code); 130 | private: 131 | ENCODE m_SendDisplayCode; 132 | 133 | signals: 134 | 135 | public slots: 136 | }; 137 | #endif // GLOBAL_H 138 | -------------------------------------------------------------------------------- /App/Main.cpp: -------------------------------------------------------------------------------- 1 | /*++ 2 | Copyright (c) Kang Lin studio, All Rights Reserved 3 | 4 | Author: 5 | Kang Lin(kl222@126.com) 6 | 7 | Module Name: 8 | 9 | main.cpp 10 | 11 | Abstract: 12 | 13 | This file contains main implement. 14 | */ 15 | 16 | #ifdef RABBITCOMMON 17 | #include "RabbitCommonTools.h" 18 | #include "FrmUpdater.h" 19 | #endif 20 | #include "MainWindow.h" 21 | #include 22 | #include 23 | #include "Global/Global.h" 24 | #if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 25 | #include 26 | #endif 27 | #ifdef BUILD_QUIWidget 28 | #include "QUIWidget/QUIWidget.h" 29 | #endif 30 | 31 | #include 32 | static Q_LOGGING_CATEGORY(log, "main") 33 | 34 | int main(int argc, char *argv[]) 35 | { 36 | #if defined (_DEBUG) 37 | Q_INIT_RESOURCE(translations_SerialPortAssistant); 38 | #endif 39 | 40 | QApplication a(argc, argv); 41 | a.setApplicationName("SerialPortAssistant"); 42 | #ifdef SerialPortAssistant_VERSION 43 | a.setApplicationVersion(SerialPortAssistant_VERSION); 44 | #endif 45 | 46 | #ifdef RABBITCOMMON 47 | RabbitCommon::CTools::Instance()->Init(); 48 | RabbitCommon::CTools::Instance()->InstallTranslator("SerialPortAssistant"); 49 | #endif 50 | qInfo(log) << QObject::tr("SerialPortAssistant version: %1 ").arg(a.applicationVersion()) 51 | #ifdef SerialPortAssistant_Revision 52 | + QObject::tr("(Revision:") 53 | + " [" + SerialPortAssistant_Revision 54 | + "](http://github.com/KangLin/RabbitCommon/tree/" 55 | + SerialPortAssistant_Revision + ")" 56 | #endif 57 | + "); " 58 | + QObject::tr("RabbitCommon") + RabbitCommon::CTools::Version(); 59 | 60 | CMainWindow *w = new CMainWindow(); 61 | if(!w) 62 | { 63 | qCritical(log) << "new CMainWindow fail"; 64 | return -1; 65 | } 66 | a.setApplicationDisplayName(w->windowTitle()); 67 | 68 | #ifdef RABBITCOMMON 69 | CFrmUpdater *pUpdater = new CFrmUpdater(); 70 | if(pUpdater) { 71 | pUpdater->SetTitle(QImage(":/icon/AppIcon")); 72 | if(a.arguments().length() > 1) { 73 | pUpdater->GenerateUpdateJson(); 74 | pUpdater->GenerateUpdateXml(); 75 | return 0; 76 | } 77 | } 78 | #endif 79 | 80 | #if defined(BUILD_QUIWidget) && !defined(Q_OS_ANDROID) 81 | QUIWidget* quiwidget = new QUIWidget(nullptr, true); 82 | quiwidget->setMainWidget(w); 83 | //quiwidget->setPixmap(QUIWidget::Lab_Ico, ":/icon/AppIcon"); 84 | //quiwidget.setTitle(a.applicationDisplayName()); 85 | quiwidget->show(); 86 | #else 87 | w->show(); 88 | #endif 89 | 90 | int nRet = a.exec(); 91 | 92 | #ifndef BUILD_QUIWidget 93 | delete w; 94 | #endif 95 | 96 | #ifdef RABBITCOMMON 97 | if(pUpdater) 98 | delete pUpdater; 99 | RabbitCommon::CTools::Instance()->Clean(); 100 | #endif 101 | #if defined (_DEBUG) 102 | Q_CLEANUP_RESOURCE(translations_SerialPortAssistant); 103 | #endif 104 | return nRet; 105 | } 106 | -------------------------------------------------------------------------------- /App/MainWindow.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | Copyright (c) Kang Lin studio, All Rights Reserved 3 | 4 | Author: 5 | Kang Lin(kl222@126.com) 6 | 7 | Module Name: 8 | 9 | MainWindow.h 10 | 11 | Abstract: 12 | 13 | This file contains main windows define. 14 | */ 15 | 16 | #ifndef MAINWINDOW_H 17 | #define MAINWINDOW_H 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include "SendFile.h" 34 | #include 35 | #include "Global/Global.h" 36 | 37 | namespace Ui { 38 | class CMainWindow; 39 | } 40 | 41 | class CMainWindow : public QMainWindow 42 | { 43 | Q_OBJECT 44 | 45 | public: 46 | explicit CMainWindow(QWidget *parent = 0); 47 | ~CMainWindow(); 48 | 49 | private Q_SLOTS: 50 | void changeEvent(QEvent *e); 51 | void slotRead(); 52 | void slotTimeOut(); 53 | void slotReadChannelFinished(); 54 | void slotQTextEditMaxLength(); 55 | void on_pbOpen_clicked(); 56 | void on_pbSend_clicked(); 57 | void on_cmbPort_currentIndexChanged(int index); 58 | void on_cmbRecent_currentIndexChanged(const QString &szText); 59 | void on_gpSendLoop_clicked(); 60 | void on_actionClear_triggered(); 61 | void on_actionOpen_triggered(); 62 | void on_actionExit_triggered(); 63 | void on_actionClear_Send_History_triggered(); 64 | void on_actionAbout_A_triggered(); 65 | void on_actionToolBar_T_triggered(); 66 | void on_actionStatusBar_S_triggered(); 67 | void on_sbLoopTime_valueChanged(int v); 68 | void on_cbr_clicked(bool checked); 69 | void on_cbn_clicked(bool checked); 70 | void on_cbDisplaySend_clicked(bool checked); 71 | void on_cbDisplayTime_clicked(bool checked); 72 | void on_cbSaveToFile_clicked(bool checked); 73 | void on_cmbBoudRate_currentTextChanged(const QString &szText); 74 | void on_cmbDataBit_currentIndexChanged(int index); 75 | void on_cmbParity_currentIndexChanged(int index); 76 | void on_cmbStopBit_currentIndexChanged(int index); 77 | void on_cmbFlowControl_currentIndexChanged(int index); 78 | void on_cmbRecent_activated(const QString &szText); 79 | void on_actionLoad_File_F_triggered(); 80 | void on_actionOpen_send_file_triggered(); 81 | void on_actionOpen_save_file_triggered(); 82 | void on_actionUpdate_U_triggered(); 83 | void on_actionRefresh_R_triggered(); 84 | void on_cbReceiveEncoded_currentIndexChanged(int index); 85 | void on_cbSendEncode_currentIndexChanged(int index); 86 | void on_pbBrowseSend_clicked(); 87 | void on_pbBrowseSave_clicked(); 88 | void on_tbSendSettings_currentChanged(int index); 89 | void on_pbPortSeetings_clicked(); 90 | void on_pbReceiveSettings_clicked(); 91 | void on_pbSendSettings_clicked(); 92 | 93 | private: 94 | int InitStatusBar(); 95 | int InitToolBar(); 96 | int InitLeftBar(); 97 | int SetSaveFileName(); 98 | bool isExistSaveFileName(const QString &szFile); 99 | int InitEncodeComboBox(QComboBox *comboBox); 100 | void AddReceive(const QString &szText, bool bReceive = false); 101 | int SetStatusInfo(QString szText, QColor color = QPalette().color(QPalette::WindowText)); 102 | QString GetSerialPortSettingInfo(); 103 | bool CheckHexChar(QChar c); 104 | int SendHexChar(QString szText, int &nLength); 105 | int RefreshSerialPorts(); 106 | int InitSerialPortPara(CGlobal::Para& para); 107 | /** 108 | * @brief SendInput 109 | * @return int: Returns the number of bytes sent. 110 | * if < 0, is error. 111 | */ 112 | int SendInput(); 113 | 114 | int SendFile(); 115 | int CloseSendFile(); 116 | private Q_SLOTS: 117 | void slotSendFile(qint64 bytes); 118 | 119 | void slotDataTerminalReadyChanged(bool set); 120 | void slotRequestToSendChanged(bool set); 121 | 122 | private: 123 | int InitPinout(); 124 | int setPinoutStatus(); 125 | 126 | private: 127 | Ui::CMainWindow *ui; 128 | QDockWidget* m_dockLeft; 129 | 130 | QSerialPort m_SerialPort; 131 | qint64 m_nSend, m_nReceive, m_nDrop; 132 | int m_cmbPortIndex; 133 | QTimer m_Timer; 134 | int m_nLoopNumber; 135 | int m_nTransmissions; //已发送次数 136 | 137 | QLabel m_statusInfo; 138 | QLabel m_statusRx, m_statusTx, m_statusDrop; 139 | 140 | bool m_bInitEncodeCombox; 141 | 142 | CSendFile m_SendFile; 143 | 144 | // QWidget interface 145 | protected: 146 | virtual void closeEvent(QCloseEvent *event) override; 147 | }; 148 | 149 | #endif // MAINWINDOW_H 150 | -------------------------------------------------------------------------------- /App/Resource/Resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | png/Language.jpg 4 | png/English.png 5 | png/settings16x16.png 6 | png/close.png 7 | png/style.png 8 | png/China.png 9 | png/open-file.png 10 | png/Save.png 11 | png/Clear.png 12 | png/start256.png 13 | png/stop-red256.png 14 | png/send.png 15 | png/pause.png 16 | png/log.png 17 | png/SerialPortAssistant.png 18 | png/refresh.png 19 | png/arrow-down-filling.png 20 | png/arrow-right-filling.png 21 | 22 | 23 | sink/blue.qss 24 | sink/dark/style.qss 25 | sink/Style_Gray.qss 26 | sink/Style_Blue.qss 27 | 28 | 29 | -------------------------------------------------------------------------------- /App/Resource/png/China.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/China.png -------------------------------------------------------------------------------- /App/Resource/png/Clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/Clear.png -------------------------------------------------------------------------------- /App/Resource/png/English.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/English.png -------------------------------------------------------------------------------- /App/Resource/png/Language.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/Language.jpg -------------------------------------------------------------------------------- /App/Resource/png/Save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/Save.png -------------------------------------------------------------------------------- /App/Resource/png/SerialPortAssistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/SerialPortAssistant.png -------------------------------------------------------------------------------- /App/Resource/png/arrow-down-filling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/arrow-down-filling.png -------------------------------------------------------------------------------- /App/Resource/png/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/arrow-down.png -------------------------------------------------------------------------------- /App/Resource/png/arrow-right-filling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/arrow-right-filling.png -------------------------------------------------------------------------------- /App/Resource/png/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/arrow-right.png -------------------------------------------------------------------------------- /App/Resource/png/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/close.png -------------------------------------------------------------------------------- /App/Resource/png/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/log.png -------------------------------------------------------------------------------- /App/Resource/png/open-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/open-file.png -------------------------------------------------------------------------------- /App/Resource/png/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/pause.png -------------------------------------------------------------------------------- /App/Resource/png/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/refresh.png -------------------------------------------------------------------------------- /App/Resource/png/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/send.png -------------------------------------------------------------------------------- /App/Resource/png/settings16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/settings16x16.png -------------------------------------------------------------------------------- /App/Resource/png/start256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/start256.png -------------------------------------------------------------------------------- /App/Resource/png/stop-red256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/stop-red256.png -------------------------------------------------------------------------------- /App/Resource/png/style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/style.png -------------------------------------------------------------------------------- /App/Resource/png/weixinpay20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/weixinpay20.png -------------------------------------------------------------------------------- /App/Resource/png/zhifubao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/zhifubao.png -------------------------------------------------------------------------------- /App/Resource/png/zhifubao20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/png/zhifubao20.png -------------------------------------------------------------------------------- /App/Resource/sink/blue.qss: -------------------------------------------------------------------------------- 1 | QMainWindow, QFrame, QDialog, QMessageBox, QMenu, QToolTip, QTabBar::tab{ 2 | background: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0, 3 | stop: 0 rgba(180, 255, 255, 100%), 4 | stop: 1 rgba(10, 144, 255, 100%)); 5 | } 6 | 7 | QWebView{ 8 | background-color: transparent; 9 | } 10 | 11 | QMenu::item:checked { 12 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 13 | stop: 0 #fafafa, stop: 0.4 #f4f4f4, 14 | stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); 15 | } 16 | 17 | QMenu::icon:checked { /* appearance of a 'checked' icon */ 18 | background: gray; 19 | border: 1px inset gray; 20 | position: absolute; 21 | top: 1px; 22 | right: 1px; 23 | bottom: 1px; 24 | left: 1px; 25 | } 26 | 27 | QMenuBar { 28 | background-color: transparent; 29 | border-bottom: 1px solid rgba(255, 255, 255, 80%); 30 | } 31 | 32 | QMenuBar::item { 33 | border: 2px solid rgba(255, 255, 255, 80%); 34 | border-bottom: 0px solid white; 35 | background: transparent; 36 | border-top-left-radius: 5px; 37 | border-top-right-radius: 5px; 38 | } 39 | 40 | QMenuBar::item:selected { /* when selected using mouse or keyboard */ 41 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 42 | stop: 0 #fafafa, stop: 0.4 #f4f4f4, 43 | stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); 44 | } 45 | 46 | QMenuBar::item:pressed { 47 | } 48 | 49 | QLabel { 50 | background-color: transparent 51 | } 52 | 53 | QToolButton { /* all types of tool button */ 54 | border: 2px solid rgba(255, 255, 255, 80%); 55 | border-radius: 5px; 56 | background-color: transparent; 57 | text-align: center; 58 | } 59 | 60 | QToolButton::hover{ 61 | background-color: transparent; 62 | border-width: 2px; 63 | border-style: solid; 64 | border-color: gray; /*rgba(255, 255, 255, 80%);*/ 65 | border-radius: 5px; 66 | min-width: 80px; 67 | } 68 | 69 | QToolButton:pressed { 70 | background-color: transparent; 71 | border: 2px solid rgba(0, 0, 0, 80%); 72 | } 73 | 74 | QToolButton[popupMode="1"] { /* only for MenuButtonPopup */ 75 | padding-right: 20px; /* make way for the popup button */ 76 | } 77 | 78 | /* the subcontrols below are used only in the MenuButtonPopup mode */ 79 | QToolButton::menu-button { 80 | border: 2px solid rgba(255, 255, 255, 80%); 81 | border-top-right-radius: 5px; 82 | border-bottom-right-radius: 5px; 83 | /* 16px width + 4px for border = 20px allocated above */ 84 | width: 16px; 85 | } 86 | 87 | /* the subcontrols below are used only in the MenuButtonPopup mode */ 88 | QToolButton::menu-button:hover { 89 | border: 2px solid gray; 90 | border-top-right-radius: 5px; 91 | border-bottom-right-radius: 5px; 92 | /* 16px width + 4px for border = 20px allocated above */ 93 | width: 16px; 94 | } 95 | 96 | QToolButton::menu-button:pressed { 97 | border: 2px solid rgba(0, 0, 0, 80%); 98 | border-top-right-radius: 5px; 99 | border-bottom-right-radius: 5px; 100 | /* 16px width + 4px for border = 20px allocated above */ 101 | width: 16px; 102 | } 103 | 104 | QToolButton::menu-arrow:open { 105 | top: 1px; left: 1px; /* shift it a bit */ 106 | } 107 | 108 | QPushButton { 109 | background-color: transparent; 110 | border-width: 2px; 111 | border-style: outset; 112 | border-color: rgba(255, 255, 255, 80%); 113 | border-radius: 5px; 114 | min-width: 80px; 115 | } 116 | 117 | QPushButton::hover{ 118 | background-color: transparent; 119 | border-width: 2px; 120 | border-style: solid; 121 | border-color: gray; /*rgba(255, 255, 255, 80%);*/ 122 | border-radius: 5px; 123 | min-width: 80px; 124 | } 125 | QPushButton::pressed{ 126 | background-color: transparent; 127 | border-width: 2px; 128 | border-style: inset; 129 | border-color: rgba(0, 0, 0, 80%); 130 | border-radius: 5px; 131 | min-width: 80px; 132 | } 133 | 134 | QTextEdit, QListView, QTreeView { 135 | background-color: transparent; 136 | border-width: 2px; 137 | border-style: solid; 138 | border-color: rgba(255, 255, 255, 80%); 139 | } 140 | 141 | QTreeView::item { 142 | border: 0px solid #d9d9d9; 143 | border-top-color: transparent; 144 | border-bottom-color: transparent; 145 | background:transparent; 146 | } 147 | 148 | QTreeView::item:hover { 149 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1); 150 | border: 0px solid #bfcde4; 151 | } 152 | 153 | QTreeView::item:selected { 154 | border: 0px solid #567dbc; 155 | } 156 | 157 | QTreeView::item:selected:active{ 158 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc); 159 | } 160 | 161 | QTreeView::item:selected:!active { 162 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6b9be8, stop: 1 #577fbf); 163 | } 164 | 165 | QComboBox { 166 | border: 1px solid rgba(255, 255, 255, 80%); 167 | padding: 1px 18px 1px 3px; 168 | min-width: 6em; 169 | } 170 | 171 | QComboBox:editable { 172 | background: white; 173 | } 174 | 175 | QComboBox::drop-down { 176 | background: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0, 177 | stop: 0 rgba(180, 255, 255, 100%), 178 | stop: 1 rgba(10, 144, 255, 100%)); 179 | } 180 | 181 | QComboBox:on { /* shift the text when the popup opens */ 182 | padding-top: 3px; 183 | padding-left: 4px; 184 | } 185 | 186 | QComboBox::down-arrow { /* 下拉箭头 */ 187 | image: url(":/icon/DownArrow"); 188 | } 189 | 190 | QTabBar::tab { 191 | border: 2px solid rgba(255, 255, 255, 80%); 192 | border-bottom-color: #C2C7CB; /* same as the pane color */ 193 | border-top-left-radius: 5px; 194 | border-top-right-radius: 5px; 195 | min-width: 8ex; 196 | padding: 2px; 197 | } 198 | 199 | QTabBar::tab:hover { 200 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 201 | stop: 0 #fafafa, stop: 0.4 #f4f4f4, 202 | stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); 203 | } 204 | 205 | QTabBar::tab:!selected { 206 | margin-top: 2px; /* make non-selected tabs look smaller */ 207 | border-color: #9B9B9B; 208 | border-bottom-color: #C2C7CB; /* same as pane color */ 209 | } 210 | 211 | QTabWidget { 212 | border-width: 2px; 213 | background-color: transparent; 214 | } 215 | -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/Hmovetoolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/Hmovetoolbar.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/Hsepartoolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/Hsepartoolbar.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/Vmovetoolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/Vmovetoolbar.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/Vsepartoolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/Vsepartoolbar.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/branch_closed-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/branch_closed-on.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/branch_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/branch_closed.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/branch_open-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/branch_open-on.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/branch_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/branch_open.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/checkbox.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/close.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/down_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/down_arrow.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/down_arrow_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/down_arrow_disabled.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/left_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/left_arrow.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/left_arrow_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/left_arrow_disabled.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/right_arrow.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/right_arrow_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/right_arrow_disabled.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/sizegrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/sizegrip.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/stylesheet-branch-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/stylesheet-branch-end.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/stylesheet-branch-more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/stylesheet-branch-more.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/stylesheet-vline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/stylesheet-vline.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/transparent.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/undock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/undock.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/up_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/up_arrow.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/rc/up_arrow_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/Resource/sink/dark/rc/up_arrow_disabled.png -------------------------------------------------------------------------------- /App/Resource/sink/dark/style.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | rc/up_arrow_disabled.png 4 | rc/Hmovetoolbar.png 5 | rc/stylesheet-branch-end.png 6 | rc/branch_closed-on.png 7 | rc/stylesheet-vline.png 8 | rc/branch_closed.png 9 | rc/branch_open-on.png 10 | rc/transparent.png 11 | rc/right_arrow_disabled.png 12 | rc/sizegrip.png 13 | rc/close.png 14 | rc/down_arrow.png 15 | rc/Vmovetoolbar.png 16 | rc/left_arrow.png 17 | rc/stylesheet-branch-more.png 18 | rc/up_arrow.png 19 | rc/right_arrow.png 20 | rc/left_arrow_disabled.png 21 | rc/Hsepartoolbar.png 22 | rc/checkbox.png 23 | rc/branch_open.png 24 | rc/Vsepartoolbar.png 25 | rc/down_arrow_disabled.png 26 | rc/undock.png 27 | 28 | 29 | style.qss 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /App/SendFile.cpp: -------------------------------------------------------------------------------- 1 | #include "SendFile.h" 2 | #include 3 | 4 | Q_LOGGING_CATEGORY(logSendFile, "SendFile") 5 | 6 | CSendFile::CSendFile(const QString &szFile, QObject *parent) : QObject(parent) 7 | { 8 | Open(szFile); 9 | } 10 | 11 | int CSendFile::Open(const QString &szFile) 12 | { 13 | Close(); 14 | 15 | m_nSend = 0; 16 | m_nBuffLen = BUFFER_SIZE; 17 | m_nBuffStart = 0; 18 | m_nTotal = 0; 19 | 20 | if(!szFile.isEmpty()) 21 | { 22 | m_File.setFileName(szFile); 23 | if(!m_File.open(QFile::ReadOnly)) 24 | { 25 | qCritical(logSendFile) << "Open file fail:" 26 | << szFile.toStdString().c_str(); 27 | return -1; 28 | } 29 | m_nTotal = m_File.size(); 30 | } 31 | 32 | return 0; 33 | } 34 | 35 | int CSendFile::Close() 36 | { 37 | if(m_File.isOpen()) 38 | m_File.close(); 39 | 40 | m_nSend = 0; 41 | m_nBuffLen = BUFFER_SIZE; 42 | m_nBuffStart = 0; 43 | m_nTotal = 0; 44 | return 0; 45 | } 46 | 47 | bool CSendFile::isOpen() 48 | { 49 | return m_File.isOpen() && !m_File.atEnd(); 50 | } 51 | 52 | qint64 CSendFile::Write(QIODevice *device) 53 | { 54 | qint64 nRet = 0; 55 | qint64 nLen = 0; 56 | 57 | if(0 == m_nBuffStart) 58 | { 59 | if(!m_File.isOpen()) 60 | { 61 | qCritical(logSendFile) << "Read file isn't open"; 62 | return -1; 63 | } 64 | 65 | if(m_File.atEnd()) 66 | { 67 | Close(); 68 | return 0; 69 | } 70 | 71 | // Read data from file 72 | nLen = m_File.read(buf, m_nBuffLen); 73 | if(nLen < 0) 74 | { 75 | qCritical(logSendFile) << "Read file fail: %s" << m_File.errorString().toStdString().c_str(); 76 | return nLen; 77 | } 78 | } 79 | 80 | // Write data to device 81 | nRet = device->write(buf + m_nBuffStart, nLen); 82 | if(nRet < 0) 83 | { 84 | qCritical(logSendFile) << "Write file fail: %s" << device->errorString().toStdString().c_str(); 85 | return nRet; 86 | } 87 | 88 | m_nSend += nRet; 89 | 90 | if(nRet < m_nBuffLen) 91 | { 92 | m_nBuffStart = m_nBuffStart + nRet; 93 | m_nBuffLen -= nRet; 94 | } else { 95 | m_nBuffLen = BUFFER_SIZE; 96 | m_nBuffStart = 0; 97 | } 98 | 99 | return nRet; 100 | } 101 | -------------------------------------------------------------------------------- /App/SendFile.h: -------------------------------------------------------------------------------- 1 | #ifndef SENDFILE_H 2 | #define SENDFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define BUFFER_SIZE 512 9 | class CSendFile : public QObject 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit CSendFile(const QString &szFile = QString(), QObject *parent = nullptr); 14 | 15 | int Open(const QString &szFile); 16 | bool isOpen(); 17 | int Close(); 18 | qint64 Write(QIODevice *device); 19 | 20 | private: 21 | QFile m_File; 22 | 23 | qint64 m_nTotal; 24 | qint64 m_nSend; 25 | int m_nBuffLen; 26 | int m_nBuffStart; 27 | char buf[BUFFER_SIZE]; 28 | }; 29 | 30 | #endif // SENDFILE_H 31 | -------------------------------------------------------------------------------- /App/SerialPortAssistant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/SerialPortAssistant.ico -------------------------------------------------------------------------------- /App/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /App/android/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/android/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/android/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/android/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/android/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/android/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/App/android/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 串口助手 4 | 5 | -------------------------------------------------------------------------------- /App/android/res/values-zh-rHK/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 串口助手 4 | 5 | -------------------------------------------------------------------------------- /App/android/res/values-zh-rTW/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 串口助手 4 | 5 | -------------------------------------------------------------------------------- /App/android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Serial port assistant 4 | 5 | -------------------------------------------------------------------------------- /App/resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | AppIcon.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /Authors.md: -------------------------------------------------------------------------------- 1 | Kang Lin 2 | 3 | The third project: 4 | 5 | Qt (LGPL v2.1) 6 | http://qt.io/ 7 | -------------------------------------------------------------------------------- /Authors_zh_CN.md: -------------------------------------------------------------------------------- 1 | 康林 2 | 3 | 第三方库: 4 | 5 | Qt (LGPL v2.1) 6 | http://qt.io/ 7 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Author: Kang Lin 2 | 3 | cmake_minimum_required(VERSION 3.21) 4 | MESSAGE(STATUS "Found CMake ${CMAKE_VERSION}") 5 | 6 | project(SerialPortAssistant) 7 | 8 | set(CMAKE_CXX_STANDARD 17) 9 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 10 | set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "verbose") 11 | # Need qt components 12 | if(CMAKE_VERSION VERSION_LESS "3.7.0") 13 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 14 | endif() 15 | 16 | include(GNUInstallDirs) 17 | 18 | IF(MSVC) 19 | # This option is to enable the /MP switch for Visual Studio 2005 and above compilers 20 | OPTION(WIN32_USE_MP "Set to ON to build with the /MP option (Visual Studio 2005 and above)." ON) 21 | MARK_AS_ADVANCED(WIN32_USE_MP) 22 | IF(WIN32_USE_MP) 23 | #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") 24 | add_compile_options(/MP) 25 | ENDIF(WIN32_USE_MP) 26 | add_compile_options("$<$:/utf-8>") 27 | add_compile_options("$<$:/utf-8>") 28 | ENDIF(MSVC) 29 | 30 | SET(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libs") 31 | if (BUILD_SHARED_LIBS) 32 | add_definitions(-DBUILD_SHARED_LIBS) 33 | if (CMAKE_COMPILER_IS_GNUCXX AND NOT MINGW) 34 | # Just setting CMAKE_POSITION_INDEPENDENT_CODE should be enough to set 35 | # -fPIC for GCC but sometimes it still doesn't get set, so make sure it 36 | # does. 37 | add_compile_options("-fPIC") 38 | endif() 39 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 40 | endif() 41 | 42 | # Open qt build tool 43 | SET(CMAKE_AUTOUIC ON) 44 | SET(CMAKE_AUTOMOC ON) 45 | SET(CMAKE_AUTORCC ON) 46 | 47 | # Need qt components 48 | find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) 49 | SET(QT_COMPONENTS Core Gui Widgets SerialPort Network) 50 | find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${QT_COMPONENTS}) 51 | message("QT_VERSION:${Qt${QT_VERSION_MAJOR}_VERSION}") 52 | if(Qt${QT_VERSION_MAJOR}_FOUND) 53 | FOREACH(_COMPONENT ${QT_COMPONENTS}) 54 | list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::${_COMPONENT}) 55 | ENDFOREACH() 56 | endif() 57 | get_filename_component(QT_INSTALL_DIR "${Qt${QT_VERSION_MAJOR}_DIR}/../../.." ABSOLUTE) 58 | message("QT_ROOT:${QT_ROOT}") 59 | message("Qt${QT_VERSION_MAJOR}_ROOT:${Qt${QT_VERSION_MAJOR}_ROOT}") 60 | message("Qt${QT_VERSION_MAJOR}_DIR:${Qt${QT_VERSION_MAJOR}_DIR}") 61 | message("QT_INSTALL_DIR:${QT_INSTALL_DIR}") 62 | message("QT_LIBRARIES:${QT_LIBRARIES}") 63 | 64 | message("CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") 65 | message("CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") 66 | message("CMAKE_FIND_USE_CMAKE_SYSTEM_PATH:${CMAKE_FIND_USE_CMAKE_SYSTEM_PATH}; NO_CMAKE_SYSTEM_PATH:${NO_CMAKE_SYSTEM_PATH}") 67 | message("CMAKE_SYSTEM_PREFIX_PATH:${CMAKE_SYSTEM_PREFIX_PATH}") 68 | if(NOT RabbitCommon_ROOT) 69 | set(RabbitCommon_ROOT $ENV{RabbitCommon_ROOT}) 70 | if(NOT RabbitCommon_ROOT) 71 | set(RabbitCommon_ROOT ${CMAKE_SOURCE_DIR}/../RabbitCommon) 72 | endif() 73 | endif() 74 | if(RabbitCommon_ROOT AND EXISTS ${RabbitCommon_ROOT}/Src/CMakeLists.txt) 75 | message("Use RabbitCommon source code") 76 | add_subdirectory(${RabbitCommon_ROOT}/Src ${CMAKE_BINARY_DIR}/RabbitCommon) 77 | else() 78 | find_package(RabbitCommon) 79 | if(NOT RabbitCommon_FOUND) 80 | message("RabbitCommon_ROOT is not found. Please use one of the following ways to set it:") 81 | message("1. Set RabbitCommon_ROOT to the install prefix of RabbitCommon.") 82 | message("2. Set RabbitCommon_ROOT to source code root of RabbitCommon.") 83 | message("2.1 Please download the source code of RabbitCommon from https://github.com/KangLin/RabbitCommon") 84 | message(" ag:") 85 | message(" git clone https://github.com/KangLin/RabbitCommon.git") 86 | message("2.2 Then set cmake variable or environment variable RabbitCommon_ROOT to download root directory.") 87 | message(" ag:") 88 | message(" cmake -DRabbitCommon_ROOT= ") 89 | message(FATAL_ERROR "RabbitCommon_ROOT isn't set.") 90 | endif() 91 | endif() 92 | 93 | add_subdirectory(App) 94 | -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | ## Change log 2 | 3 | ### Version: v0.5.32 4 | - Deploy rpm package 5 | - Modify metainfo 6 | 7 | ### Version: v0.5.31 8 | - Package 9 | - Add Flatpak 10 | - Add rpm 11 | - Rename org.Rabbit.SerialPortAssistant to io.github.KangLin.SerialPortAssistant 12 | 13 | ### Version: v0.5.30 14 | - Remove donate bitcoin 15 | - Add build script 16 | - Release 17 | - Add arm64 18 | - App AppImage 19 | 20 | ### Version: v0.5.29 21 | - Use [RabbitCommon v2.3.2](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.2) 22 | - build AppImage 23 | 24 | ### Version: v0.5.28 25 | - Use [RabbitCommon v2.3.1](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.1) 26 | 27 | ### Version: v0.5.27 28 | - Add snap 29 | - Greater than Android 9 30 | - Use [RabbitCommon v2.3.0](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.0) 31 | 32 | ### Version: v0.5.26 33 | - Modify SetStatusInfo the default color 34 | - Modify debian 35 | - CI: fix version bug 36 | - Use [RabbitCommon v2.2.5](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.5) 37 | 38 | ### Version: v0.5.25 39 | - Use [RabbitCommon v2.2.4](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.4) 40 | - Rename share/SerialPortAssistant.desktop -> share/org.Rabbit.SerialPortAssistant.desktop 41 | - Modify version 42 | 43 | ### Version: v0.5.24 44 | - Fix about typo. See: https://github.com/KangLin/RabbitCommon/tree/25e00a2d98488fa2d63f54b34ac9628603cab448 45 | - Modify save windows state 46 | - Modify find RabbitCommon 47 | 48 | ### Version: v0.5.23 49 | - Added left bar dockwidget 50 | - Add save settings: 51 | - Data bit 52 | - Parity 53 | - Stop bit 54 | - Flow control 55 | 56 | ### Version: v0.5.22 57 | - Use VCPKG_MANIFEST_DIR overlay openssl 1.1 58 | - Use [RabbitCommon v2.2.1](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.1) 59 | 60 | ### Version: v0.5.21 61 | - Fix deploy.sh bug 62 | - CI: copy openssl dll in windows. See: https://github.com/KangLin/RabbitCommon/commit/673aa9198ec1f88eb1f9f265d0b85f613ee86418 63 | - Fix android resource 64 | - MacOS can now be successfully compiled in CI. 65 | but the loading dynamic library path is not set correctly. 66 | Please help you set it. 67 | - Use RabbitCommon v2.1.0 68 | - Add version output log 69 | 70 | ### Version: v0.5.20 71 | - Modify deploy.sh 72 | 73 | ### Version: v0.5.19 74 | - Modify ci to windows xp 75 | 76 | ### Version: v0.5.18 77 | - Modify UI 78 | 79 | ### Version: v0.5.17 80 | - Modify MimeType in org.Rabbit.Calendar.desktop 81 | - Modify debian package 82 | - Remove pro 83 | - Use the update of RabbitCommon v2.0.0 84 | 85 | ### Version: v0.5.16 86 | - FIX: DockDebugLog core dump. See: https://github.com/KangLin/RabbitCommon/commit/af2e434e39af35876113436ead2a946efcf74199 87 | 88 | ### Version: v0.5.15 89 | - Use RabbitCommon v2 90 | - Add CMakeLists.txt 91 | 92 | ### Version: v0.5.14 93 | - Fix: log output file 94 | 95 | ### Version: v0.5.13 96 | - Fix: Fixed a bug where the correct dependency library could not be loaded 97 | when there were different versions of the dependency library under Linux. 98 | - Add save and restore main window state 99 | 100 | ### Version: v0.5.12 101 | - Fix typos 102 | - github actions: 103 | - msvc.yml works 104 | - About window: add revisioin, and be opened from main repository 105 | 106 | ### Version: v0.5.11 107 | - Update the code of RabbitCommon 108 | - Support Qt6 109 | - Modify github actions 110 | - Rename tag.sh to deploy.sh 111 | 112 | ### Version: v0.5.10 113 | - FIX: divide by 0 crash. Affects all previous releases. 114 | See https://github.com/KangLin/RabbitCommon/commit/7ed300a206d8a36c30003b6c19ad181682d0ff5f 115 | 116 | ### Version: v0.5.9 117 | - Add mirror repository 118 | - Modify ci 119 | - Add github actions 120 | 121 | ### Version: v0.5.8 122 | - Use update RabbitCommon::CStyle 123 | 124 | ### Version: v0.5.7 125 | - Modify style use RabbitCommon::CStyle 126 | - Add QUIWidget 127 | 128 | ### Version: v0.5.6 129 | - Modify UI: Add push button 130 | - Add outpin status 131 | - CI: Add github actions 132 | 133 | ### Version: v0.5.5 134 | - Modify same things 135 | 136 | ### Version: v0.5.4 137 | - Modify same bugs 138 | - Add open save file and open send file 139 | 140 | ### Version: v0.5.3 141 | - Modify UI 142 | - Add scrollarea 143 | - Modify ui for encode 144 | - Modify SendHexChar 145 | - Modify send file 146 | 147 | ### Version: v0.5.2 148 | - Modify install 149 | 150 | ### Version: v0.5.1 151 | - Modify ci 152 | - Update RabbitCommon interface 153 | - Modify updater 154 | - Add android sign 155 | 156 | ### Version: v0.5.0 157 | - Modify donation 158 | 159 | ### Version: v0.4.9 160 | - Modify documents 161 | 162 | ### Version: v0.4.8 163 | - Modify build 164 | 165 | ### Version: v0.4.7 166 | - Modify pro file 167 | 168 | ### Version: v0.4.6 169 | - Modify ci appimage 170 | 171 | ### Version: v0.4.5 172 | - Modify language BUG 173 | 174 | ### Version: v0.4.4 175 | - Modify ci BUG 176 | - Modify style 177 | 178 | ### Version: v0.4.3 179 | - Modify the project file, RabbitCommon is added to the main project file in library project mode. 180 | - Increase the refresh serial port tool. See: Issues #3 181 | 182 | ### Version: v0.4.2 183 | - Modify linux CI dependency library error 184 | - Modify the install file 185 | 186 | ### Version: v0.4.1 187 | - Using RabbitCommon v1.0.0 188 | - Use RabbitCommon to translate 189 | 190 | ### Version: v0.4.0 191 | - Modify Install.sh 192 | 193 | ### Version: v0.3.9 194 | - Only do the update test under linux 195 | 196 | ### Version: v0.3.8 197 | - Modify tar package content 198 | 199 | ### Version: v0.3.7 200 | - Increase update_linux_appimage.xml 201 | 202 | ### Version: v0.3.6 203 | - Test new version number update 204 | 205 | ### Version: v0.3.5 206 | - Reuse version number vX.X.X 207 | 208 | ### Version: 0.3.7 209 | - Modify donation 210 | 211 | ### Version: 0.3.6 212 | - Modify download updates 213 | 214 | ### Version: 0.3.5 215 | - Increase LINUX distribution 216 | 217 | ### Version: v0.3.4 218 | - Use GlobalDir in the RabbitCommon library 219 | 220 | ### Version: v0.3.3 221 | - Modify the send code BUG 222 | - Add online updates 223 | - Add DEB package 224 | 225 | ### Version: v0.3.2 226 | - Increase load file 227 | - Increase log file 228 | - Increase receive save to file 229 | - Increase the number of loops sent 230 | - Modify installation 231 | 232 | ### Version: v0.3.1 233 | - Modify tag.sh 234 | 235 | ### Version: v0.3.0 236 | - Modify automated compilation 237 | 238 | ### Version: v0.2.0 239 | - Automatic ci upload changed to qt5.7, because windowsxp is no longer supported after qt5.8 240 | 241 | ### Version: v0.1.0 242 | - Modifying the open serial port (not starting with COM) failed 243 | 244 | ### Version: v0.0.9 245 | - Modify the version number generation 246 | - Modify the sending statistics 247 | - Limit the length of QTextEdit 248 | - Modify automatic compilation 249 | 250 | ### Version: v0.0.8 251 | - Increase style 252 | 253 | ### Version: v0.0.7 254 | - Modify the installation file 255 | - Modify automatic compilation 256 | 257 | ### Version: v0.0.6 258 | - Modify about dialog 259 | - Modify the code display 260 | - Modify language menu 261 | - Edit copyright information 262 | 263 | ### Version: v0.0.5 264 | - Modify app recently sent 265 | - Send failure LOG 266 | - Modify display time format 267 | 268 | ### Version: v0.0.4 269 | - Modify the installation package garbled error (Install.nsi must be UTF8-[utf8 BOM] encoding) 270 | 271 | ### Version: v0.0.3 272 | - Save Settings 273 | - Add English README 274 | - Modify some bugs 275 | - Add tag script, modify version number, Install.nsi 276 | 277 | ### Version: v0.0.2 278 | - Perfect user interface 279 | 280 | ### Version:0.0.1 281 | - Complete basic serial port function 282 | 283 | -------------------------------------------------------------------------------- /ChangeLog_zh_CN.md: -------------------------------------------------------------------------------- 1 | ## 修改日志 2 | 3 | ### 版本: v0.5.32 4 | - 分发 rpm 包 5 | - 修改元文件 6 | 7 | ### 版本: v0.5.31 8 | - 打包 9 | - 增加 Flatpak 10 | - 增加 RPM 11 | - 重命名 org.Rabbit.SerialPortAssistant 为 io.github.KangLin.SerialPortAssistant 12 | 13 | ### 版本: v0.5.30 14 | - 移除捐赠比特币 15 | - 增加编译脚本 16 | - 增加 arm64(aarch4) 17 | 18 | ### 版本: v0.5.29 19 | - 使用 [RabbitCommon v2.3.2](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.2) 20 | - 建立 AppImage 21 | 22 | ### 版本: v0.5.28 23 | - 使用 [RabbitCommon v2.3.1](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.1) 24 | 25 | ### 版本: v0.5.27 26 | - 增加 snap 27 | - 大于 Android 9 28 | - 使用 [RabbitCommon v2.3.0](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.0) 29 | 30 | ### 版本: v0.5.26 31 | - 修改 SetStatusInfo 默认颜色 32 | - 修改 debian 33 | - 修复版本号错误 34 | - 使用 [RabbitCommon v2.2.5](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.5) 35 | 36 | ### 版本: v0.5.25 37 | - 使用 [RabbitCommon v2.2.4](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.4) 38 | - 重命名 share/SerialPortAssistant.desktop -> share/org.Rabbit.SerialPortAssistant.desktop 39 | - 修改版本号 40 | 41 | ### 版本: v0.5.24 42 | - 修改关于对话框拼写错误。详见: https://github.com/KangLin/RabbitCommon/tree/25e00a2d98488fa2d63f54b34ac9628603cab448 43 | - 修改保存窗口状态 44 | - 修改发现 RabbitCommon 包 45 | 46 | ### 版本: v0.5.23 47 | - 增加左栏停泊条 48 | - 增加保存设置 49 | - 数据位 50 | - 校验位 51 | - 停止位 52 | - 流控 53 | 54 | ### 版本: v0.5.22 55 | - 使用 VCPKG_MANIFEST_DIR 重载 openssl 1.1 56 | - 使用 [RabbitCommon v2.2.1](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.1) 57 | 58 | ### 版本: v0.5.21 59 | - 修复 deploy.sh 错误 60 | - 修复在 windows 下复制 openssl 库错误。详见:https://github.com/KangLin/RabbitCommon/commit/673aa9198ec1f88eb1f9f265d0b85f613ee86418 61 | - 修复 android 资源错误 62 | - 当前在自动化编译中能成功编译 macos 。但是未能正确设置动态库的加载路径。请会的朋友帮助我设置。 63 | - 使用 RabbitCommon v2.1.0 64 | - 增加版本输出到日志 65 | 66 | ### 版本: v0.5.20 67 | - 修改 deploy.sh 68 | 69 | ### 版本: v0.5.19 70 | - 修改自动化编译生成 windows xp 版本 71 | 72 | ### 版本: v0.5.18 73 | - 修改界面 74 | 75 | ### 版本: v0.5.17 76 | - 在 SerialPortAssistant.desktop 中修改 MimeType 的值 77 | - 修改 debian 打包 78 | - 删除 pro 79 | - 使用 RabbitCommon v2.0.0 新的更新 80 | 81 | ### 版本: v0.5.16 82 | - 修复 DockDebugLog 崩溃. 详见: https://github.com/KangLin/RabbitCommon/commit/af2e434e39af35876113436ead2a946efcf74199 83 | 84 | ### 版本: v0.5.15 85 | - 使用 RabbitCommon v2 86 | - 使用 CMake 管理工程 87 | 88 | ### 版本: v0.5.14 89 | - 修复日志输出到文件 90 | 91 | ### 版本: v0.5.13 92 | - 修复在 LINUX 下有不同版本依赖库时,不能加载正确的依赖库 93 | - 增加关闭窗口时,保存窗口状态 94 | 95 | ### 版本: v0.5.12 96 | - 修复拼写错误 97 | - github actions: 98 | - msvc.yml 能够工作 99 | - 关于对话框中增加校订版本,并能直接从主库中打开. 100 | 101 | ### 版本: v0.5.11 102 | - 更新与 RabbitCommon 相关的代码 103 | - 支持 Qt6 104 | - 修改 github actions 105 | - 重命名 tag.sh 到 deploy.sh 106 | 107 | ### 版本: v0.5.10 108 | - 修复除 0 引起的崩溃。影响前面所有发行版本。此错误是 RabbitCommon 引起的。 109 | 详见: https://github.com/KangLin/RabbitCommon/commit/7ed300a206d8a36c30003b6c19ad181682d0ff5f 110 | 111 | ### 版本: v0.5.9 112 | - 增加镜像库 113 | - 修改自动化编译 114 | - 增加 github actions 115 | 116 | ### 版本: v0.5.8 117 | - 用更新后的 RabbitCommon::CStyle 118 | 119 | ### 版本: v0.5.7 120 | - 修改样式实现,用RabbitCommon::CStyle 121 | - 增加 QUIWidget 实现窗口 122 | 123 | ### 版本: v0.5.6 124 | - 修改界面:增加收缩按钮 125 | - 增加状态指示 126 | - 自动化编译: 增加 github actions 127 | 128 | ### 版本: v0.5.5 129 | - 修改一些杂项 130 | 131 | ### 版本: v0.5.4 132 | - 修改一些 BUG 133 | - 增加打开保存文件和打开发送文件 134 | 135 | ### 版本: v0.5.3 136 | - 修改界面 137 | - 增加流动界面 138 | - 修改编码 139 | - 修改十六进制发送 140 | - 修改发送文件 141 | 142 | ### 版本: v0.5.2 143 | - 修改安装 144 | 145 | ### 版本: v0.5.1 146 | - 修改自动化编译 147 | - 更新 RabbitCommon 接口 148 | - 修改更新 149 | - 增加 android 签名 150 | 151 | ### 版本: v0.5.0 152 | - 修改捐赠 153 | 154 | ### 版本: v0.4.9 155 | - 修改文档 156 | 157 | ### 版本: v0.4.8 158 | - 修改 build 159 | 160 | ### 版本: v0.4.7 161 | - 修改工程结构 162 | 163 | ### 版本: v0.4.6 164 | - 修改 ci appimage 165 | 166 | ### 版本: v0.4.5 167 | - 修改 RabbitCommon 语言 BUG 168 | 169 | * 版本: v0.4.4 170 | - 修改 CI 错误 171 | - 修改样式 172 | 173 | * 版本: v0.4.3 174 | - 修改工程文件,RabbitCommon以库工程方式加入到主工程文件中 175 | - 增加刷新串口工具。详见:Issues #3 176 | 177 | * 版本: v0.4.2 178 | - 修改 linux CI 依赖库错误 179 | - 修改 install 文件 180 | 181 | * 版本: v0.4.1 182 | - 使用 RabbitCommon v1.0.0 183 | - 使用 RabbitCommon 翻译 184 | 185 | * 版本: v0.4.0 186 | - 修改 Install.sh 187 | 188 | * 版本: v0.3.9 189 | - 只做 linux 下安装更新测试 190 | 191 | * 版本: v0.3.8 192 | - 修改 tar 打包内容 193 | 194 | * 版本: v0.3.7 195 | - 增加 update_linux_appimage.xml 196 | 197 | * 版本: v0.3.6 198 | - 测试新版本号更新 199 | 200 | * 版本: v0.3.5 201 | - 重新使用版本号 vX.X.X 202 | 203 | * 版本: 0.3.7 204 | - 修改捐赠 205 | 206 | * 版本: 0.3.6 207 | - 修改下载更新 208 | 209 | * 版本: 0.3.5 210 | - 增加 LINUX 分发 211 | 212 | * 版本: v0.3.4 213 | - 使用RabbitCommon库中的GlobalDir 214 | 215 | * 版本: v0.3.3 216 | - 修改发送编码BUG 217 | - 增加在线更新 218 | - 增加 DEB 包 219 | 220 | * 版本: v0.3.2 221 | - 增加加载文件 222 | - 增加日志文件 223 | - 增加接收保存到文件 224 | - 增加循环发送次数 225 | - 修改安装 226 | 227 | * 版本: v0.3.1 228 | - 修改tag.sh 229 | 230 | * 版本: v0.3.0 231 | - 修改自动化编译 232 | 233 | * 版本: v0.2.0 234 | - 自动ci上传改为qt5.7,因为qt5.8后不再支持windowsxp 235 | 236 | * 版本: v0.1.0 237 | - 修改打开串口(非COM开头)失败 238 | 239 | * 版本: v0.0.9 240 | - 修改版本号的产生 241 | - 修改发送统计数 242 | - 限定QTextEdit的长度 243 | - 修改自动编译 244 | 245 | * 版本: v0.0.8 246 | - 增加样式 247 | 248 | * 版本: v0.0.7 249 | - 修改安装文件 250 | - 修改自动编译 251 | 252 | * 版本: v0.0.6 253 | - 修改关于对话框 254 | - 修改编码显示 255 | - 修改语言菜单 256 | - 修改版权信息 257 | 258 | * 版本: v0.0.5 259 | - 修改应用最近发送 260 | - 发送失败LOG 261 | - 修改显示时间格式 262 | 263 | * 版本: v0.0.4 264 | - 修改安装包乱码错误(Install.nsi 必须是UTF8-[utf8 BOM]编码) 265 | 266 | * 版本: v0.0.3 267 | - 保存设置 268 | - 增加英文 README 269 | - 修改一些 BUG 270 | - 增加tag脚本,修改版本号,Install.nsi 271 | 272 | * 版本: v0.0.2 273 | - 完善界面 274 | 275 | * 版本: 0.0.1 276 | - 完成基本串口功能 277 | -------------------------------------------------------------------------------- /Docs/bitcoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/Docs/bitcoin.png -------------------------------------------------------------------------------- /Docs/ui-en.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/Docs/ui-en.jpg -------------------------------------------------------------------------------- /Docs/ui-zh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/Docs/ui-zh.jpg -------------------------------------------------------------------------------- /Install/Install.nsi: -------------------------------------------------------------------------------- 1 | ; Script generated by the HM NIS Edit Script Wizard. 2 | 3 | ; HM NIS Edit Wizard helper defines 4 | !define PRODUCT_NAME "SerialPortAssistant" 5 | !define PRODUCT_VERSION "v0.5.31" 6 | !define PRODUCT_PUBLISHER "KangLin studio" 7 | !define PRODUCT_WEB_SITE "https://github.com/KangLin/${PRODUCT_NAME}" 8 | !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}.exe" 9 | !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 10 | !define PRODUCT_UNINST_ROOT_KEY "HKCU" 11 | 12 | SetCompressor lzma 13 | 14 | ; MUI 1.67 compatible ------ 15 | !include "MUI2.nsh" 16 | !include "x64.nsh" 17 | 18 | ; MUI Settings 19 | !define MUI_ABORTWARNING 20 | !define MUI_ICON "install/SerialPortAssistant.ico" 21 | !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" 22 | 23 | ; Language Selection Dialog Settings 24 | !define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" 25 | !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" 26 | !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" 27 | 28 | ; Welcome page 29 | !insertmacro MUI_PAGE_WELCOME 30 | ; License page 31 | !insertmacro MUI_PAGE_LICENSE "@CMAKE_INSTALL_PREFIX@\share\doc\SerialPortAssistant\License.md" 32 | ; Components page 33 | !insertmacro MUI_PAGE_COMPONENTS 34 | ; Directory page 35 | !insertmacro MUI_PAGE_DIRECTORY 36 | ; Instfiles page 37 | !insertmacro MUI_PAGE_INSTFILES 38 | ; Finish page 39 | !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\${PRODUCT_NAME}.exe" 40 | !define MUI_FINISHPAGE_SHOWREADME 41 | !define MUI_FINISHPAGE_SHOWREADME_Function OpenReadme 42 | !insertmacro MUI_PAGE_FINISH 43 | 44 | ; Uninstaller pages 45 | !insertmacro MUI_UNPAGE_INSTFILES 46 | 47 | ; Language files 48 | !insertmacro MUI_LANGUAGE "English" 49 | !insertmacro MUI_LANGUAGE "SimpChinese" 50 | 51 | LangString LANG_PRODUCT_NAME ${LANG_ENGLISH} "SerialPortAssistant" 52 | LangString LANG_PRODUCT_NAME ${LANG_SIMPCHINESE} "串口助手" 53 | 54 | LangString LANG_UNINSTALL_CONFIRM ${LANG_ENGLISH} "Thank you very much! $(^Name) has been successfully removed." 55 | LangString LANG_UNINSTALL_CONFIRM ${LANG_SIMPCHINESE} "非常感谢您的使用! $(^Name) 已成功地从您的计算机中移除。" 56 | 57 | LangString LANG_REMOVE_COMPONENT ${LANG_ENGLISH} "You sure you want to completely remove $ (^ Name), and all of its components?" 58 | LangString LANG_REMOVE_COMPONENT ${LANG_SIMPCHINESE} "你确实要完全移除 $(^Name) ,其及所有的组件?" 59 | 60 | ; MUI end ------ 61 | 62 | Name "$(LANG_PRODUCT_NAME) ${PRODUCT_VERSION}" 63 | Caption "$(LANG_PRODUCT_NAME) ${PRODUCT_VERSION}" 64 | OutFile "${PRODUCT_NAME}_Setup_${PRODUCT_VERSION}.exe" 65 | InstallDir "$LOCALAPPDATA\${PRODUCT_NAME}" 66 | ;InstallDirRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "" 67 | 68 | ShowInstDetails show 69 | ShowUnInstDetails show 70 | #RequestExecutionLevel user 71 | 72 | ; Install vc runtime 73 | Function InstallVC 74 | Push $R0 75 | ClearErrors 76 | ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" 77 | 78 | ; check register 79 | IfErrors 0 VSRedistInstalled 80 | Exec "$INSTDIR\bin\vcredist_x86.exe /q /norestart" 81 | StrCpy $R0 "-1" 82 | 83 | VSRedistInstalled: 84 | ;MessageBox MB_OK "Installed" 85 | Exch $R0 86 | Delete "$INSTDIR\bin\vcredist_x86.exe" 87 | FunctionEnd 88 | 89 | Function InstallVC64 90 | Push $R0 91 | ClearErrors 92 | ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" 93 | 94 | ; check register 95 | IfErrors 0 VSRedistInstalled 96 | Exec "$INSTDIR\bin\vcredist_x64.exe /q /norestart" 97 | StrCpy $R0 "-1" 98 | 99 | VSRedistInstalled: 100 | ;MessageBox MB_OK "Installed" 101 | Exch $R0 102 | Delete "$INSTDIR\bin\vcredist_x64.exe" 103 | FunctionEnd 104 | 105 | Function InstallRuntime 106 | IfFileExists "$INSTDIR\bin\vcredist_x64.exe" 0 +2 107 | call InstallVC64 108 | IfFileExists "$INSTDIR\bin\vcredist_x86.exe" 0 +2 109 | call InstallVC 110 | FunctionEnd 111 | 112 | Function DirectoryPermissionErrorBox 113 | StrCpy $1 "${LANG_DIRECTORY_PERMISSION}" 114 | MessageBox MB_ICONSTOP $1 115 | Abort 116 | FunctionEnd 117 | 118 | Var UNINSTALL_PROG 119 | Var OLD_PATH 120 | Function .onInit 121 | !insertmacro MUI_LANGDLL_DISPLAY 122 | ClearErrors 123 | ReadRegStr $UNINSTALL_PROG ${PRODUCT_UNINST_ROOT_KEY} ${PRODUCT_UNINST_KEY} "UninstallString" 124 | IfErrors done 125 | 126 | ;https://blog.csdn.net/u012896330/article/details/55517461 127 | CopyFiles $UNINSTALL_PROG $TEMP 128 | StrCpy $OLD_PATH $UNINSTALL_PROG -10 129 | ExecWait '"$TEMP/uninst.exe" /S _?=$OLD_PATH' $0 130 | DetailPrint "uninst.exe returned $0" 131 | Delete "$TEMP/uninst.exe" 132 | 133 | done: 134 | FunctionEnd 135 | 136 | Section "${PRODUCT_NAME}" SEC01 137 | SetOutPath "$INSTDIR" 138 | IfFileExists "$INSTDIR\*.*" +2 0 139 | call DirectoryPermissionErrorBox 140 | SetOverwrite ifnewer 141 | File /r "install\*" 142 | ;SetShellVarContext all 143 | 144 | ;SetShellVarContext current 145 | call InstallRuntime 146 | SectionEnd 147 | 148 | Section -AdditionalIcons 149 | CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" 150 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\$(LANG_PRODUCT_NAME).lnk" "$INSTDIR\bin\${PRODUCT_NAME}.exe" 151 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe" 152 | CreateShortCut "$DESKTOP\$(LANG_PRODUCT_NAME).lnk" "$INSTDIR\bin\${PRODUCT_NAME}.exe" 153 | 154 | WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" 155 | ;SetShellVarContext all 156 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" 157 | ;SetShellVarContext current 158 | SectionEnd 159 | 160 | Section -Post 161 | WriteUninstaller "$INSTDIR\uninst.exe" 162 | ;WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\${PRODUCT_APP_NAME}.exe" 163 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\${PRODUCT_NAME}.exe" 164 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "Path" "$INSTDIR\" 165 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" 166 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" 167 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\${PRODUCT_NAME}.exe" 168 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 169 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" 170 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" 171 | SectionEnd 172 | 173 | ; Section descriptions 174 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 175 | !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "$(LANG_PRODUCT_NAME)" 176 | !insertmacro MUI_FUNCTION_DESCRIPTION_END 177 | 178 | Function un.onUninstSuccess 179 | HideWindow 180 | MessageBox MB_ICONINFORMATION|MB_OK "$(LANG_UNINSTALL_CONFIRM)" 181 | FunctionEnd 182 | 183 | Function un.onInit 184 | !insertmacro MUI_UNGETLANGUAGE 185 | MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(LANG_REMOVE_COMPONENT)" IDYES +2 186 | Abort 187 | FunctionEnd 188 | 189 | Function OpenReadme 190 | ExecShell "open" "https://github.com/KangLin/SerialPortAssistant/" 191 | FunctionEnd 192 | 193 | Section Uninstall 194 | ;SetShellVarContext all 195 | RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}" 196 | Delete "$DESKTOP\$(LANG_PRODUCT_NAME).lnk" 197 | SetOutPath "$SMPROGRAMS" 198 | ;SetShellVarContext current 199 | RMDir /r "$INSTDIR" 200 | 201 | DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" 202 | ;DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" 203 | DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" 204 | 205 | SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" 206 | SetAutoClose true 207 | SectionEnd 208 | -------------------------------------------------------------------------------- /Install/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Use to install appimage in linux 4 | 5 | case "$1" in 6 | remove) 7 | echo "remove ..." 8 | rm -f /usr/share/applications/SerialPortAssistant.desktop 9 | rm -f /usr/share/pixmaps/SerialPortAssistant.png 10 | ;; 11 | 12 | install|*) 13 | echo "install ..." 14 | if [ -f /usr/share/applications/SerialPortAssistant.desktop ]; then 15 | rm -f /usr/share/applications/SerialPortAssistant.desktop 16 | fi 17 | ln -s `pwd`/share/applications/SerialPortAssistant.desktop /usr/share/applications/SerialPortAssistant.desktop 18 | sed -i "s/Exec=.*//g" `pwd`/share/applications/SerialPortAssistant.desktop 19 | echo "Exec=`pwd`/SerialPortAssistant-x86_64.AppImage" >> `pwd`/share/applications/SerialPortAssistant.desktop 20 | 21 | if [ -f /usr/share/pixmaps/SerialPortAssistant.png ]; then 22 | rm -f /usr/share/pixmaps/SerialPortAssistant.png 23 | fi 24 | if [ ! -d /usr/share/pixmaps ]; then 25 | mkdir -p /usr/share/pixmaps 26 | fi 27 | ln -s `pwd`/share/pixmaps/SerialPortAssistant.png /usr/share/pixmaps/SerialPortAssistant.png 28 | ;; 29 | esac 30 | -------------------------------------------------------------------------------- /Package/Flatpak/io.github.KangLin.SerialPortAssistant.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "io.github.KangLin.SerialPortAssistant", 3 | "runtime": "org.kde.Platform", 4 | "runtime-version": "6.8", 5 | "sdk": "org.kde.Sdk", 6 | "command": "SerialPortAssistant", 7 | "build-options": { 8 | "env": { 9 | "V": "1" 10 | } 11 | }, 12 | "modules": [ 13 | { 14 | "name": "cmark", 15 | "disabled": false, 16 | "sources": [ 17 | { 18 | "type": "archive", 19 | "url": "https://github.com/commonmark/cmark/archive/refs/tags/0.31.1.tar.gz", 20 | "sha256": "3da93db5469c30588cfeb283d9d62edfc6ded9eb0edc10a4f5bbfb7d722ea802" 21 | } 22 | ], 23 | "buildsystem": "cmake-ninja", 24 | "builddir": true, 25 | "config-opts": [ 26 | "-DBUILD_TESTING=OFF" 27 | ], 28 | "cleanup": [ 29 | "/bin", 30 | "/share/man" 31 | ] 32 | }, 33 | { 34 | "name": "RabbitCommon", 35 | "sources": [ 36 | { 37 | "type": "git", 38 | "url": "https://github.com/KangLin/RabbitCommon.git", 39 | "branch": "master" 40 | } 41 | ], 42 | "buildsystem": "cmake-ninja", 43 | "builddir": true, 44 | "config-opts": [ 45 | "-DCMAKE_BUILD_TYPE=Release", 46 | "-DBUILD_MimeTypeBrowser=OFF", 47 | "-DBUILD_APP=OFF", 48 | "-DBUILD_TEST=OFF" 49 | ], 50 | "cleanup": [ 51 | "/bin", 52 | "/etc", 53 | "/share/applications", 54 | "/share/doc" 55 | ] 56 | }, 57 | { 58 | "name": "SerialPortAssistant", 59 | "disabled": false, 60 | "sources": [ 61 | { 62 | "type": "dir", 63 | "path": "../.." 64 | } 65 | ], 66 | "buildsystem": "cmake-ninja", 67 | "builddir": true, 68 | "config-opts": [ 69 | "-DCMAKE_BUILD_TYPE=Release" 70 | ], 71 | "build-options": { 72 | "env": { 73 | } 74 | }, 75 | "post-install": [ 76 | "desktop-file-edit --set-key=Path --set-value=/bin /app/share/applications/io.github.KangLin.SerialPortAssistant.desktop" 77 | ], 78 | "cleanup": [ 79 | ] 80 | } 81 | ], 82 | "cleanup": [ 83 | "*.la", 84 | "*.a", 85 | "/include", 86 | "/lib/cmake", 87 | "/lib/pkgconfig" 88 | ], 89 | "cleanup-commands": [ 90 | ], 91 | "finish-args": [ 92 | "--share=ipc", 93 | "--share=network", 94 | "--socket=x11", 95 | "--device=all", 96 | "--filesystem=xdg-documents" 97 | ] 98 | } 99 | -------------------------------------------------------------------------------- /Package/rpm/serialportassistant.spec: -------------------------------------------------------------------------------- 1 | # See: https://rpm-software-management.github.io/rpm/manual/spec.html 2 | 3 | Name: serialportassistant 4 | Version: 0.0.32 5 | Release: 1%{?dist} 6 | Summary: Serial port assistant 7 | 8 | License: GPL-3.0 9 | URL: https://github.com/KangLin/SerialPortAssistant 10 | Source0: SerialPortAssistant.tar.gz 11 | 12 | Vendor: Kang Lin 13 | 14 | BuildRequires: make git rpm-build rpmdevtools 15 | BuildRequires: gcc-c++ 16 | BuildRequires: automake autoconf libtool gettext gettext-autopoint 17 | BuildRequires: cmake desktop-file-utils appstream 18 | BuildRequires: curl wget cmark-devel 19 | 20 | # Qt6 21 | BuildRequires: qt6-qttools-devel qt6-qtbase-devel qt6-qtmultimedia-devel 22 | BuildRequires: qt6-qt5compat-devel qt6-qtmultimedia-devel qt6-qtscxml-devel 23 | BuildRequires: qt6-qtserialport-devel qt6-qtsvg-devel 24 | 25 | BuildRequires: openssl-devel 26 | 27 | Requires: openssl cmark 28 | 29 | Requires: qt6-qtbase qt6-qtmultimedia qt6-qt5compat qt6-qtscxml 30 | Requires: qt6-qtserialport qt6-qtsvg 31 | 32 | %description 33 | Serial port assistant 34 | Author: Kang Lin 35 | Donation: 36 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 37 | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 38 | https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 39 | 40 | # 预备参数,通常为 %setup -q 41 | %prep 42 | %setup -q -n SerialPortAssistant 43 | 44 | %generate_buildrequires 45 | 46 | %build 47 | echo "-- RPM_BUILD_DIR: $RPM_BUILD_DIR" 48 | echo "-- RPM_BUILD_ROOT: $RPM_BUILD_ROOT" 49 | echo "-- RPM_SOURCE_DIR: $RPM_SOURCE_DIR" 50 | echo "-- RPM_SPECPARTS_DIR: $RPM_SPECPARTS_DIR" 51 | echo "-- pwd: `pwd`" 52 | 53 | cmake . -B $RPM_BUILD_DIR \ 54 | -DCMAKE_INSTALL_PREFIX=/opt/SerialPortAssistant -DCMAKE_BUILD_TYPE=Release \ 55 | -DRabbitCommon_ROOT=${RabbitCommon_ROOT} \ 56 | -DBUILD_FREERDP=OFF \ 57 | -DBUILD_LibVNCServer=OFF 58 | cmake --build $RPM_BUILD_DIR --config Release --parallel $(nproc) 59 | 60 | %install 61 | cmake --install $RPM_BUILD_DIR --config Release \ 62 | --component DependLibraries \ 63 | --prefix ${RPM_BUILD_ROOT}/opt/SerialPortAssistant 64 | cmake --install $RPM_BUILD_DIR --config Release \ 65 | --component Runtime \ 66 | --prefix ${RPM_BUILD_ROOT}/opt/SerialPortAssistant 67 | cmake --install $RPM_BUILD_DIR --config Release \ 68 | --component Application \ 69 | --prefix ${RPM_BUILD_ROOT}/opt/SerialPortAssistant 70 | cmake --install $RPM_BUILD_DIR --config Release \ 71 | --component Plugin \ 72 | --prefix ${RPM_BUILD_ROOT}/opt/SerialPortAssistant 73 | 74 | # 安装前需要做的任务,如:创建用户 75 | %pre 76 | 77 | # 安装后需要做的任务 如:自动启动的任务 78 | %post 79 | INSTALL_ROOT=/opt/SerialPortAssistant 80 | chmod -R a+w $INSTALL_ROOT/etc 81 | 82 | if [ ! -f /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop ]; then 83 | ln -s ${INSTALL_ROOT}/share/applications/io.github.KangLin.SerialPortAssistant.desktop /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop 84 | fi 85 | if [ ! -f /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png ]; then 86 | if [ ! -d /usr/share/pixmaps ]; then 87 | mkdir -p /usr/share/pixmaps 88 | fi 89 | ln -s ${INSTALL_ROOT}/share/icons/hicolor/128x128/apps/io.github.KangLin.SerialPortAssistant.png /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png 90 | fi 91 | if [ ! -f /usr/bin/serialportassistant ]; then 92 | ln -s $INSTALL_ROOT/bin/SerialPortAssistant /usr/bin/serialportassistant 93 | fi 94 | 95 | # 卸载前需要做的任务 如:停止任务 96 | %preun 97 | INSTALL_ROOT=/opt/SerialPortAssistant 98 | rm -fr /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop 99 | rm -fr /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png 100 | rm -f /usr/bin/serialportassistant 101 | 102 | # 卸载后需要做的任务 如:删除用户,删除/备份业务数据 103 | %postun 104 | 105 | # 设置文件属性,包含编译文件需要生成的目录、文件以及分配所对应的权限 106 | %files 107 | /opt/SerialPortAssistant/* 108 | 109 | # 清除上次编译生成的临时文件 110 | %clean 111 | 112 | # 修改历史 113 | %changelog 114 | * Fri Jan 01 2025 Kang Lin - 0.0.32-1 115 | - Initial RPM package 116 | -------------------------------------------------------------------------------- /README_zh_CN.md: -------------------------------------------------------------------------------- 1 | # 串口助手 2 | 3 | 作者:康林(kl222@126.com) 4 | 5 | -------------------------------- 6 | 7 | [:us: English](README.md) 8 | 9 | [![GitHub 点赞量](https://img.shields.io/github/stars/KangLin/SerialPortAssistant?label=Github%20点赞量)](https://star-history.com/#KangLin/SerialPortAssistant&Date) 10 | [![star](https://gitee.com/kl222/SerialPortAssistant/badge/star.svg?theme=dark)](https://gitee.com/kl222/SerialPortAssistant/stargazers) 11 | 12 | [![GitHub forks](https://img.shields.io/github/forks/KangLin/SerialPortAssistant)](https://github.com/KangLin/SerialPortAssistant/forks) 13 | [![GitHub issues](https://img.shields.io/github/issues/KangLin/SerialPortAssistant)](https://github.com/KangLin/SerialPortAssistant/issues) 14 | 15 | [![github 最后发行版本下载](https://img.shields.io/github/release/KangLin/SerialPortAssistant?label=Github%20最后发行版本下载)](https://github.com/KangLin/SerialPortAssistant/releases/latest) 16 | [![sourceforge 最后发行版本下载](https://a.fsdn.com/con/app/sf-download-button)](https://sourceforge.net/projects/serialportassistant/files/latest/download) 17 | 18 | [![github 下载量](https://img.shields.io/github/downloads/KangLin/SerialPortAssistant/total?label=Github%20下载量)](http://gra.caldis.me/?user=KangLin&repo=SerialPortAssistant) 19 | [![Download SerialPortAssistant](https://img.shields.io/sourceforge/dt/serialportassistant.svg?label=Sourceforge%20下载量)](https://sourceforge.net/projects/serialportassistant/files/latest/download) 20 | 21 | [![build](https://github.com/KangLin/SerialPortAssistant/actions/workflows/build.yml/badge.svg)](https://github.com/KangLin/SerialPortAssistant/actions/workflows/build.yml) 22 | [![Build status](https://ci.appveyor.com/api/projects/status/y77e828ysqc79r9o?svg=true)](https://ci.appveyor.com/project/KangLin/serialportassistant) 23 | 24 | -------------------------------- 25 | 26 | ### 简介 27 | - 项目位置: 28 | + 主库: https://github.com/KangLin/SerialPortAssistant 29 | + 镜像库: 30 | - 中国: https://gitee.com/kl222/SerialPortAssistant 31 | - https://gitlab.com/kl222/SerialPortAssistant 32 | - https://sourceforge.net/projects/serialportassistant/ 33 | - https://bitbucket.org/kl222/serialportassistant 34 | - [项目主页](http://kanglin.github.io/SerialPortAssistant) 35 | - 本项目是一个跨平台的串口助手。 36 | 它能运行在: 37 | + [x] WINDOWS 38 | + [x] Linux 39 | + [x] Android 40 | + [x] mac、os 41 | - 本人没有mac设备,请有设备的朋友自行编译和测试 42 | - 当前可以成功编译,但是没有正确设置加载动态库路径。请会设置的朋友帮助设置。 43 | 44 | 详见:[Qt5 支持平台](https://doc.qt.io/qt-5/supported-platforms.html)、[Qt6 支持平台](https://doc.qt.io/qt-6/supported-platforms.html)。 45 | - 程序截屏 46 | + 多语言 47 | - 中文 48 | ![中文](Docs/ui-zh.jpg "中文") 49 | - 英语 50 | ![英文](Docs/ui-en.jpg "英文") 51 | - 多样式 52 | 53 | ### 下载 54 | 55 | ### 安装包说明 56 | 57 | - Windows: 扩展名为 .exe 58 | - Linux: 59 | - deb 包:用于 Debian、Ubuntu 等 60 | - rpm 包:用于 RedHat、Fedora、CentOs 等 61 | - AppImage 包:用于所有 Linux 系统 62 | - Snap 包: 用于所有支持 Snap 的 Linux 系统。Ubuntu 默认使用此安装包。 63 | - Flatpak 包:用于所有支持 Flatpak 的 Linux 系统。Fedora 默认使用此安装包。 64 | - Android: 扩展名为 .apk 65 | - 苹果操作系统: SerialPortAssistant_0.5.31_macos_qt6.8.2.zip 66 | 由于没有相关设备,所以没有进行测试。希望有兴趣的朋友参与开发和测试。 67 | 68 | ### 下载位置: 69 | 70 | - [![github 最后发行版本下载](https://img.shields.io/github/release/KangLin/SerialPortAssistant?label=Github%20最后发行版本下载)](https://github.com/KangLin/SerialPortAssistant/releases/latest) 71 | - [![从 Sourceforge 下载](https://a.fsdn.com/con/app/sf-download-button)](https://sourceforge.net/projects/serialportassistant/files/latest/download) 72 | - [![从 Flathub 下载](https://flathub.org/api/badge?locale=zh-Hans)](https://flathub.org/apps/io.github.KangLin.SerialPortAssistant) 73 | 74 | ### 安装说明: 75 | - ubuntu、debian 76 | - [serialportassistant_0.5.31_ubuntu-24.04_amd64.deb](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/serialportassistant_0.5.31_ubuntu-24.04_amd64.deb) 77 | 78 | sudo apt install ./serialportassistant_0.5.31_ubuntu-24.04_amd64.deb 79 | # 如果你是老的 Linux 发行系统。你需要用下列命令替换: 80 | # sudo dpkg -i serialportassistant_0.5.31_ubuntu-24.04_amd64.deb 81 | # sudo apt-get install -f # Install dependencies 82 | 83 | - 其它 linux(AppImage) 84 | - [SerialPortAssistant_v0.5.31_Linux_x86_64.AppImage](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/SerialPortAssistant_v0.5.31_Linux_x86_64.AppImage) 85 | 86 | sudo chmod a+x SerialPortAssistant_v0.5.31_Linux_x86_64.AppImage 87 | sudo ./SerialPortAssistant_v0.5.31_Linux_x86_64.AppImage 88 | 89 | - Windows 90 | - Windows xp 91 | - [SerialPortAssistant_v0.5.31_windows_xp_x86_Setup.exe](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/SerialPortAssistant_v0.5.31_windows_xp_x86_Setup.exe) 92 | - Windows 7 及以后 93 | - [SerialPortAssistant_v0.5.31_win32_msvc2017_qt5.12.12_Setup.exe](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/SerialPortAssistant_v0.5.31_win32_msvc2017_qt5.12.12_Setup.exe) 94 | - Windows 10 (1809 及以后) 95 | - [SerialPortAssistant_v0.5.31_win64_msvc2022_64_qt6.8.2_Setup.exe](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/SerialPortAssistant_v0.5.31_win64_msvc2022_64_qt6.8.2_Setup.exe) 96 | 97 | - Android 9 及以后 98 | - [SerialPortAssistant_v0.5.31_android_arm64_v8a_qt6.8.2_Release.apk](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/SerialPortAssistant_v0.5.31_android_arm64_v8a_qt6.8.2_Release.apk) 99 | - [SerialPortAssistant_v0.5.31_android_x86_64_qt6.8.2_Release.apk](https://github.com/KangLin/SerialPortAssistant/releases/download/v0.5.31/SerialPortAssistant_v0.5.31_android_x86_64_qt6.8.2_Release.apk) 100 | 101 | ### 捐赠 102 | 如果你用得满意,可以对本人进行捐赠 103 | 104 | [![捐赠](https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute_zh_CN.png "捐赠")](https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute_zh_CN.png "捐赠") 105 | 106 | 如果不能显示,请打开: 107 | - https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 108 | - https://sourceforge.net/p/rabbitcommon/code/ci/master/tree/Src/Resource/image/Contribute.png 109 | 110 | ### 开发 111 | #### 依赖 112 | 113 | - [Qt (LGPL v2.1)](http://qt.io/) 114 | - RabbitCommon: https://github.com/KangLin/RabbitCommon 115 | RabbitCommon 下载到与本项目同级目录中。如果不在同级目录,则需要指定环境变量: `RabbitCommon_ROOT` 116 | 117 | git clone https://github.com/KangLin/RabbitCommon.git 118 | 119 | #### 编译 120 | 121 | - 下载源码 122 | 123 | git clone https://github.com/KangLin/SerialPortAssistant.git 124 | 125 | - 下载 RabbitCommon 126 | 127 | git clone https://github.com/KangLin/RabbitCommon.git 128 | 129 | - 用 QtCreator 编译 130 | * 直接用 QtCreator 打开工程文件 [CMakeLists.txt](CMakeLists.txt) 131 | * 如果 RabbitCommon 不在本项目同级目录中,设置参数 `RabbitCommon_ROOT` 指定其位置。 132 | * 直接编译就可以生成程序 133 | - 用命令行编译 134 | * 在同一目录中下载源码与依赖 135 | 136 | git clone https://github.com/KangLin/RabbitCommon.git 137 | git clone https://github.com/KangLin/SerialPortAssistant.git 138 | 139 | * 在项目根目录下建立 build 目录 140 | 141 | cd SerialPortAssistant 142 | mkdir build 143 | cd build 144 | # cmake 配置 145 | cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install [-DRabbitCommon_ROOT=...] 146 | # 编译 147 | cmake --build . --config Release --target install 148 | cd install # 程序安装在 install/bin 目录下 149 | 150 | #### 脚本 151 | 152 | - build_debpackage.sh 153 | + 此脚本是 linux 下生成 deb 包的。使用前,请确保安装了下面程序 154 | 155 | sudo apt-get install debhelper fakeroot build-essential cmake 156 | 157 | + 用系统自带的 QT 158 | - qt6 159 | 160 | sudo apt-get install \ 161 | qt6-tools-dev qt6-tools-dev-tools qt6-base-dev qt6-base-dev-tools \ 162 | qt6-l10n-tools qt6-translations-l10n qt6-scxml-dev \ 163 | qt6-webengine-dev qt6-webengine-dev-tools libqt6serialport6-dev 164 | 165 | 详见: [ubuntu.yml](.github/workflows/ubuntu.yml) 166 | - qt5 167 | 168 | sudo apt-get install qttools5-dev qttools5-dev-tools \ 169 | qtbase5-dev qtbase5-dev-tools qttranslations5-l10n \ 170 | libqt5scxml5-dev libqt5svg5-dev libqt5serialport5-dev \ 171 | qtwebengine5-dev qtwebengine5-dev-tools qtwebengine5-private-dev 172 | 173 | - build_appimage.sh 174 | 175 | 此脚本生成 AppImage 可执行文件。 详见:https://github.com/linuxdeploy/linuxdeploy/ 176 | 177 | - deploy.sh: 此脚本用于产生新的发行版本号和标签。仅程序发布者使用。 178 | -------------------------------------------------------------------------------- /Script/build_appimage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Kang Lin 3 | 4 | # See: - https://docs.appimage.org/packaging-guide/from-source/native-binaries.html#examples 5 | # - https://luyuhuang.tech/2024/04/19/appimage.html 6 | 7 | #See: https://blog.csdn.net/alwaysbefine/article/details/114187380 8 | #set -x 9 | set -e 10 | #set -v 11 | 12 | ## building in temporary directory to keep system clean 13 | ## use RAM disk if possible (as in: not building on CI system like Travis, and RAM disk is available) 14 | #if [ "$CI" == "" ] && [ -d /dev/shm ]; then 15 | # TEMP_BASE=/dev/shm 16 | #else 17 | # TEMP_BASE=/tmp 18 | #fi 19 | #BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" SerialPortAssistant-appimage-build-XXXXXX) 20 | ## make sure to clean up build dir, even if errors occur 21 | 22 | # store repo root as variable 23 | REPO_ROOT=$(readlink -f $(dirname $(dirname $(readlink -f $0)))) 24 | OLD_CWD=$(readlink -f .) 25 | 26 | pushd "$REPO_ROOT" 27 | 28 | if [ -z "$BUILD_DIR" ]; then 29 | BUILD_DIR=build_appimage 30 | fi 31 | BUILD_DIR=$(readlink -f ${BUILD_DIR}) 32 | mkdir -p $BUILD_DIR 33 | pushd "$BUILD_DIR" 34 | 35 | if [ -z "$TOOLS_DIR" ]; then 36 | TOOLS_DIR=Tools 37 | fi 38 | if [ -z "$SOURCE_DIR" ]; then 39 | SOURCE_DIR=Source 40 | fi 41 | if [ -z "$INSTALL_DIR" ]; then 42 | INSTALL_DIR=Install 43 | fi 44 | 45 | TOOLS_DIR=$(readlink -f ${TOOLS_DIR}) 46 | mkdir -p $TOOLS_DIR 47 | SOURCE_DIR=$(readlink -f ${SOURCE_DIR}) 48 | mkdir -p $SOURCE_DIR 49 | INSTALL_DIR=$(readlink -f ${INSTALL_DIR}) 50 | mkdir -p $INSTALL_DIR 51 | 52 | echo "Repo folder: $REPO_ROOT" 53 | echo "Old folder: $OLD_CWD" 54 | echo "Current folder: `pwd`" 55 | echo "BUILD_DIR: $BUILD_DIR" 56 | echo "TOOLS_DIR: $TOOLS_DIR" 57 | echo "SOURCE_DIR: $SOURCE_DIR" 58 | echo "INSTALL_DIR: $INSTALL_DIR" 59 | 60 | cleanup () { 61 | if [ -d "${BUILD_DIR}" ]; then 62 | rm -rf "${BUILD_DIR}" 63 | fi 64 | } 65 | if [ "$CI" != "" ]; then 66 | trap cleanup EXIT 67 | fi 68 | 69 | pushd "${TOOLS_DIR}" 70 | if [ ! -f linuxdeploy-`uname -m`.AppImage ]; then 71 | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-`uname -m`.AppImage 72 | chmod u+x linuxdeploy-`uname -m`.AppImage 73 | fi 74 | if [ ! -f linuxdeploy-plugin-qt-`uname -m`.AppImage ]; then 75 | wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-`uname -m`.AppImage 76 | chmod u+x linuxdeploy-plugin-qt-`uname -m`.AppImage 77 | fi 78 | popd 79 | 80 | INSTALL_APP_DIR=AppDir/usr 81 | cmake "$REPO_ROOT" \ 82 | -DCMAKE_INSTALL_PREFIX=/usr \ 83 | -DCMARK_SHARED=OFF \ 84 | -DCMARK_TESTS=OFF \ 85 | -DCMARK_STATIC=ON \ 86 | -DQT_DEBUG_FIND_PACKAGE=ON \ 87 | -DCMAKE_BUILD_TYPE=Release 88 | cmake --build . --parallel $(nproc) 89 | cmake --install . --config Release --component DependLibraries --prefix ${INSTALL_APP_DIR} 90 | cmake --install . --config Release --component Runtime --prefix ${INSTALL_APP_DIR} 91 | cmake --install . --config Release --component Application --prefix ${INSTALL_APP_DIR} 92 | 93 | # See: https://github.com/linuxdeploy/linuxdeploy-plugin-qt 94 | #export QMAKE=$Qt6_DIR/bin/qmake6 95 | export EXTRA_PLATFORM_PLUGINS="libqxcb.so" 96 | # Icons from theme are not displayed in QtWidgets Application: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/17 97 | export EXTRA_QT_MODULES="svg" 98 | ${TOOLS_DIR}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir -v0 \ 99 | --plugin qt \ 100 | --output appimage 101 | 102 | chmod a+x Serial_Port_Assistant-`uname -m`.AppImage 103 | 104 | if [ -z "$SerialPortAssistant_VERSION" ]; then 105 | cp Serial_Port_Assistant-`uname -m`.AppImage $REPO_ROOT 106 | else 107 | mv Serial_Port_Assistant-`uname -m`.AppImage ../SerialPortAssistant_${SerialPortAssistant_VERSION}_Linux_`uname -m`.AppImage 108 | fi 109 | 110 | popd 111 | popd 112 | -------------------------------------------------------------------------------- /Script/build_debpackage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Kang Lin 3 | 4 | #See: https://blog.csdn.net/alwaysbefine/article/details/114187380 5 | set -x 6 | set -e 7 | #set -v 8 | 9 | # store repo root as variable 10 | REPO_ROOT=$(readlink -f $(dirname $(dirname $(readlink -f $0)))) 11 | OLD_CWD=$(readlink -f .) 12 | 13 | pushd "$REPO_ROOT" 14 | 15 | function usage() 16 | { 17 | echo "Usage: $0 RabbitCommon_ROOT" 18 | } 19 | 20 | if [ -n "$2" -a -z "$RabbitCommon_ROOT" ]; then 21 | RabbitCommon_ROOT=$1 22 | fi 23 | 24 | if [ -z "$RabbitCommon_ROOT" ]; then 25 | RabbitCommon_ROOT=`pwd`/../RabbitCommon 26 | fi 27 | 28 | if [ -d "$RabbitCommon_ROOT" ]; then 29 | export RabbitCommon_ROOT=$RabbitCommon_ROOT 30 | fi 31 | 32 | if [ ! -d "$RabbitCommon_ROOT" ]; then 33 | usage 34 | exit -1 35 | fi 36 | 37 | #fakeroot debian/rules binary 38 | 39 | # -p, --sign-command=sign-command 40 | # When dpkg-buildpackage needs to execute GPG to sign a source 41 | # control (.dsc) file or a .changes file it will run sign-command 42 | # (searching the PATH if necessary) instead of gpg (long option since 43 | # dpkg 1.18.8). sign-command will get all the arguments that gpg 44 | # would have gotten. sign-command should not contain spaces or any 45 | # other shell metacharacters. 46 | 47 | # -k, --sign-key=key-id 48 | # Specify a key-ID to use when signing packages (long option since 49 | # dpkg 1.18.8). 50 | 51 | # -us, --unsigned-source 52 | # Do not sign the source package (long option since dpkg 1.18.8). 53 | 54 | # -ui, --unsigned-buildinfo 55 | # Do not sign the .buildinfo file (since dpkg 1.18.19). 56 | 57 | # -uc, --unsigned-changes 58 | # Do not sign the .buildinfo and .changes files (long option since 59 | # dpkg 1.18.8). 60 | 61 | # -b Equivalent to --build=binary or --build=any,all. 62 | # -S Equivalent to --build=source 63 | # -d, --no-check-builddeps do not check build dependencies and conflicts. 64 | # --ignore-builtin-builddeps 65 | # do not check builtin build dependencies. 66 | 67 | #The -us -uc tell it there is no need to GPG sign the package. the -b is build binary 68 | dpkg-buildpackage -us -uc -b -d 69 | 70 | #The -us -uc tell it there is no need to GPG sign the package. the -S is build source package 71 | #dpkg-buildpackage -us -uc -S 72 | 73 | #dpkg-buildpackage -S 74 | 75 | # build source and binary package 76 | #dpkg-buildpackage -us -uc 77 | 78 | #dpkg-buildpackage 79 | -------------------------------------------------------------------------------- /Script/build_rpm_package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Kang Lin 3 | 4 | #See: https://blog.csdn.net/alwaysbefine/article/details/114187380 5 | #set -x 6 | set -e 7 | #set -v 8 | 9 | if [ -z "$BUILD_VERBOSE" ]; then 10 | BUILD_VERBOSE=OFF 11 | fi 12 | SerialPortAssistant_VERSION=0.0.32 13 | 14 | usage_long() { 15 | echo "$0 [-h|--help] [-v|--verbose[=0|1]] [--install=]" 16 | echo " --help|-h: Show help" 17 | echo " -v|--verbose: Show build verbose" 18 | echo "Directory:" 19 | echo " --install: Set depend libraries install directory" 20 | echo " --source: Set source directory" 21 | echo " --tools: Set tools directory" 22 | } 23 | 24 | # [如何使用getopt和getopts命令解析命令行选项和参数](https://zhuanlan.zhihu.com/p/673908518) 25 | # [【Linux】Shell命令 getopts/getopt用法详解](https://blog.csdn.net/arpospf/article/details/103381621) 26 | if command -V getopt >/dev/null; then 27 | echo "getopt is exits" 28 | #echo "original parameters=[$@]" 29 | # -o 或 --options 选项后面是可接受的短选项,如 ab:c:: ,表示可接受的短选项为 -a -b -c , 30 | # 其中 -a 选项不接参数,-b 选项后必须接参数,-c 选项的参数为可选的 31 | # 后面没有冒号表示没有参数。后跟有一个冒号表示有参数。跟两个冒号表示有可选参数。 32 | # -l 或 --long 选项后面是可接受的长选项,用逗号分开,冒号的意义同短选项。 33 | # -n 选项后接选项解析错误时提示的脚本名字 34 | OPTS=help,verbose::,install:,source:,tools: 35 | ARGS=`getopt -o h,v:: -l $OPTS -n $(basename $0) -- "$@"` 36 | if [ $? != 0 ]; then 37 | echo "exec getopt fail: $?" 38 | exit 1 39 | fi 40 | #echo "ARGS=[$ARGS]" 41 | #将规范化后的命令行参数分配至位置参数($1,$2,......) 42 | eval set -- "${ARGS}" 43 | #echo "formatted parameters=[$@]" 44 | 45 | while [ $1 ] 46 | do 47 | #echo "\$1: $1" 48 | #echo "\$2: $2" 49 | case $1 in 50 | --install) 51 | INSTALL_DIR=$2 52 | shift 2 53 | ;; 54 | --source) 55 | SOURCE_DIR=$2 56 | shift 2 57 | ;; 58 | --tools) 59 | TOOLS_DIR=$2 60 | shift 2 61 | ;; 62 | -v |--verbose) 63 | case $2 in 64 | "") 65 | BUILD_VERBOSE=ON;; 66 | *) 67 | BUILD_VERBOSE=$2;; 68 | esac 69 | shift 2 70 | ;; 71 | --) # 当解析到“选项和参数“与“non-option parameters“的分隔符时终止 72 | shift 73 | break 74 | ;; 75 | -h | -help) 76 | usage_long 77 | shift 78 | ;; 79 | *) 80 | usage_long 81 | break 82 | ;; 83 | esac 84 | done 85 | fi 86 | 87 | # store repo root as variable 88 | SCRIPT_DIR=$(dirname $(readlink -f $0)) 89 | REPO_ROOT=$(readlink -f $(dirname $(dirname $(readlink -f $0)))) 90 | OLD_CWD=$(readlink -f .) 91 | 92 | if [ -z "$BUILD_RPM_DIR" ]; then 93 | BUILD_RPM_DIR=${REPO_ROOT}/build_rpm 94 | fi 95 | if [ -z "$SOURCE_DIR" ]; then 96 | SOURCE_DIR=${BUILD_RPM_DIR}/source 97 | fi 98 | if [ -z "$TOOLS_DIR" ]; then 99 | TOOLS_DIR=${BUILD_RPM_DIR}/tools 100 | fi 101 | if [ -z "$INSTALL_DIR" ]; then 102 | INSTALL_DIR=${BUILD_RPM_DIR}/install 103 | fi 104 | 105 | mkdir -p $(readlink -f $BUILD_RPM_DIR) 106 | TOOLS_DIR=$(readlink -f ${TOOLS_DIR}) 107 | mkdir -p $TOOLS_DIR 108 | SOURCE_DIR=$(readlink -f ${SOURCE_DIR}) 109 | mkdir -p $SOURCE_DIR 110 | INSTALL_DIR=$(readlink -f ${INSTALL_DIR}) 111 | mkdir -p $INSTALL_DIR 112 | 113 | echo "Repo folder: $REPO_ROOT" 114 | echo "Script folder: $SCRIPT_DIR" 115 | echo "Old folder: $OLD_CWD" 116 | echo "Current folder: `pwd`" 117 | echo "TOOLS_DIR: $TOOLS_DIR" 118 | echo "SOURCE_DIR: $SOURCE_DIR" 119 | echo "INSTALL_DIR: $INSTALL_DIR" 120 | 121 | pushd $REPO_ROOT 122 | 123 | if [ ! -f ~/rpmbuild/SOURCES/SerialPortAssistant.tar.gz ]; then 124 | mkdir -p ~/rpmbuild/SOURCES/ 125 | if [ -d $REPO_ROOT/.git ]; then 126 | git archive --format=tar.gz --prefix=SerialPortAssistant/ -o ~/rpmbuild/SOURCES/SerialPortAssistant.tar.gz HEAD 127 | fi 128 | fi 129 | 130 | export RabbitCommon_ROOT=${SOURCE_DIR}/RabbitCommon 131 | #dnf builddep -y ${REPO_ROOT}/Package/rpm/serialportassistant.spec 132 | rpmbuild --nodebuginfo -bb Package/rpm/serialportassistant.spec 133 | 134 | popd 135 | -------------------------------------------------------------------------------- /Script/test_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Kang Lin 3 | 4 | #See: https://blog.csdn.net/alwaysbefine/article/details/114187380 5 | set -x 6 | set -e 7 | #set -v 8 | 9 | EXIT_CODE=0 10 | PROJECT_NAME="SerialPortAssistant" 11 | 12 | if [ -n "$1" ]; then 13 | echo "$PROJECT_NAME" 14 | PROJECT_NAME=$1 15 | fi 16 | 17 | if [ ! -f /opt/${PROJECT_NAME}/share/applications/io.github.KangLin.SerialPortAssistant.desktop ]; then 18 | echo "There are not /opt/share/applications/io.github.KangLin.SerialPortAssistant.desktop" 19 | EXIT_CODE=$[EXIT_CODE+1] 20 | fi 21 | 22 | if [ ! -f /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop ]; then 23 | echo "There are not /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop" 24 | EXIT_CODE=$[EXIT_CODE+1] 25 | fi 26 | 27 | if [ ! -f /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png ]; then 28 | echo "There are not /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png" 29 | EXIT_CODE=$[EXIT_CODE+1] 30 | fi 31 | 32 | exit $EXIT_CODE 33 | -------------------------------------------------------------------------------- /SerialPortAssistant.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/SerialPortAssistant/3868daad25a2676eedc2aa9f62891995c3a90600/SerialPortAssistant.keystore -------------------------------------------------------------------------------- /Update/update.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirect": [ 3 | { 4 | "version":"v0.5.31" 5 | } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /Update/update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | v0.5.17 4 | 5 | -------------------------------------------------------------------------------- /Update/update_android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0 7 | android 8 | android 9 | armv7 10 | 11 | 12 | https://github.com/KangLin/SerialPortAssistant 13 | v0.5.1 14 | 15 | -------------------------------------------------------------------------------- /Update/update_linux.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.3.6 4 | 5 | SerialPort Assistant 0.3.6 6 | 0 7 | Linux 8 | x86_64 9 | x86 10 | ed217556eb8af3b78127f559c51b67b8 11 | https://github.com/KangLin/SerialPortAssistant/releases/download/0.3.6/serialportassistant_0.3.6_amd64.deb 12 | 0.0.1 13 | 14 | -------------------------------------------------------------------------------- /Update/update_windows.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.3.5 4 | 5 | SerialPort Assistant 0.3.5 6 | 0 7 | Windows 8 | 0.3.5 9 | x86 10 | a03066e4d6779b2c9efb57ef4c905321 11 | https://github.com/KangLin/SerialPortAssistant/releases/download/0.3.5/SerialPortAssistant-Setup-0.3.5.exe 12 | 0.0.1 13 | 14 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 'v0.5.31.{build}' 2 | 3 | cache: 4 | - ..\other_source 5 | # Clean cached 6 | # https://www.appveyor.com/docs/build-cache/#cleaning-up-cache 7 | 8 | environment: 9 | SerialPortAssistant_VERSION: "v0.5.31" 10 | STOREPASS: 11 | secure: l9BZEU39F1a4vSkhwl0CHR+yh6CD1c7byGzMv+1NUa4= 12 | QT_USER: 13 | secure: EoBPaPuJ6u9UDYpQWjKhUg== 14 | QT_PASSWORD: 15 | secure: ejAYGgB+3sBispRxUSr0xw== 16 | 17 | matrix: 18 | ##### msvc 2015 ######## 19 | - GENERATORS: "Visual Studio 14 2015" 20 | TOOLCHAIN_VERSION: 14 21 | QT_ROOT: C:\Qt\5.6\msvc2015 22 | BUILD_ARCH: x86 23 | 24 | - GENERATORS: "Visual Studio 14 2015 Win64" 25 | TOOLCHAIN_VERSION: 14 26 | QT_ROOT: C:\Qt\5.6\msvc2015_64 27 | BUILD_ARCH: x64 28 | 29 | matrix: 30 | fast_finish: false 31 | 32 | init: 33 | - set varch=%BUILD_ARCH% 34 | - if "%BUILD_ARCH%" == "x64" set varch=amd64 35 | - if %TOOLCHAIN_VERSION% LSS 15 (call "C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN_VERSION%.0\VC\vcvarsall.bat" %varch%) else (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %varch%) 36 | - echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS% 37 | - echo PROCESSOR_IDENTIFIER=%PROCESSOR_IDENTIFIER% 38 | - if NOT "%QT_ROOT%" == "NO" for /f "delims=" %%i in ('%QT_ROOT%/bin/qmake -query QT_VERSION') do (set QT_VERSION=%%i) 39 | - echo QT_ROOT=%QT_ROOT% 40 | - echo QT_VERSION=%QT_VERSION% 41 | 42 | install: 43 | - cd %APPVEYOR_BUILD_FOLDER% 44 | - git submodule update --init --recursive 45 | - git clone https://github.com/KangLin/RabbitCommon.git 46 | - set RabbitCommon_ROOT=%APPVEYOR_BUILD_FOLDER%/RabbitCommon 47 | 48 | - set OTHER_SOURCE=%APPVEYOR_BUILD_FOLDER%\..\other_source 49 | - set INSTALL_DIR=%OTHER_SOURCE%\install_dir 50 | - if not exist "%OTHER_SOURCE%" ( mkdir "%OTHER_SOURCE%" ) 51 | - if not exist "%INSTALL_DIR%" (mkdir "%INSTALL_DIR%") 52 | 53 | - cd %OTHER_SOURCE% 54 | - set CMAKE_VERSION=3.28.3 55 | - if not exist cmake-%CMAKE_VERSION%-windows-i386 (curl -fsSL -o cmake-%CMAKE_VERSION%-windows-i386.zip https://github.com/Kitware/CMake/releases/download/v%CMAKE_VERSION%/cmake-%CMAKE_VERSION%-windows-i386.zip && 7z x cmake-%CMAKE_VERSION%-windows-i386.zip) 56 | - cd cmake-%CMAKE_VERSION%-windows-i386 57 | - set PATH="%CD%/bin";%PATH% 58 | 59 | - cd %OTHER_SOURCE% 60 | - set VCPKG_ROOT=%OTHER_SOURCE%\vcpkg 61 | - if not exist %VCPKG_ROOT% (git clone "https://github.com/microsoft/vcpkg.git" && cd "%VCPKG_ROOT%" && git checkout -b 995451296a8237ff0ea4213b9deda73bb3f5229a 995451296a8237ff0ea4213b9deda73bb3f5229a && bootstrap-vcpkg.bat) 62 | 63 | before_build: 64 | 65 | build_script: 66 | - cd %APPVEYOR_BUILD_FOLDER% 67 | - mkdir build 68 | - cd build 69 | - cmake %APPVEYOR_BUILD_FOLDER% ^ 70 | -G"%GENERATORS%" ^ 71 | -DCMARK_SHARED=OFF ^ 72 | -DCMARK_TESTS=OFF ^ 73 | -DCMARK_STATIC=ON ^ 74 | -DCMAKE_BUILD_TYPE=Release ^ 75 | -DCMAKE_INSTALL_PREFIX=%CD%/install ^ 76 | -DBUILD_QUIWidget=OFF ^ 77 | -DRABBIT_ENABLE_INSTALL_DEPENDENT=ON ^ 78 | -DRABBIT_ENABLE_INSTALL_QT=ON ^ 79 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF ^ 80 | -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" ^ 81 | -DVCPKG_MANIFEST_DIR="%APPVEYOR_BUILD_FOLDER%/vcpkg/manifests" ^ 82 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^ 83 | -DVCPKG_APPLOCAL_DEPS=ON ^ 84 | -DQT_DIR=%QT_ROOT%/lib/cmake/qt5 ^ 85 | -DQt5_DIR=%QT_ROOT%/lib/cmake/qt5 86 | - cmake --build . --config Release 87 | - cmake --build . --config Release --target install 88 | - if "%BUILD_ARCH%" == "x86" (copy /Y c:\OpenSSL-Win32\bin\ssleay32.dll install\bin && copy /Y c:\OpenSSL-Win32\bin\libeay32.dll install\bin) 89 | - if "%BUILD_ARCH%" == "x64" (copy /Y c:\OpenSSL-Win64\bin\ssleay32.dll install\bin && copy /Y c:\OpenSSL-Win64\bin\libeay32.dll install\bin) 90 | - makensis Install.nsi 91 | - copy /Y SerialPortAssistant_Setup_%SerialPortAssistant_VERSION%.exe SerialPortAssistant_%SerialPortAssistant_VERSION%_windows_xp_%BUILD_ARCH%_Setup.exe 92 | - md5sum SerialPortAssistant_%SerialPortAssistant_VERSION%_windows_xp_%BUILD_ARCH%_Setup.exe > SerialPortAssistant_%SerialPortAssistant_VERSION%_windows_xp_%BUILD_ARCH%_Setup.exe.md5sum 93 | 94 | artifacts: 95 | - path: build/SerialPortAssistant_%SerialPortAssistant_VERSION%_windows_xp_%BUILD_ARCH%_Setup.exe 96 | - path: build/SerialPortAssistant_%SerialPortAssistant_VERSION%_windows_xp_%BUILD_ARCH%_Setup.exe.md5sum 97 | 98 | test: off 99 | 100 | # See: https://www.appveyor.com/docs/deployment/github/ 101 | deploy: 102 | - provider: GitHub 103 | #tag: $(SerialPortAssistant_VERSION)_windows_xp 104 | #release: $(SerialPortAssistant_VERSION)_windows_xp 105 | #description: 'Release SerialPortAssistant-$(APPVEYOR_REPO_TAG_NAME) on windows' 106 | #token: https://github.com/settings/tokens 107 | #password encrypt: https://ci.appveyor.com/tools/encrypt 108 | auth_token: 109 | secure: uuBaDAE/gzmEF9G4r9IwPf75qjC93JfzDcSElphUXRg0N2+emQ1Wc1ZRs2oZiw3E 110 | #artifact: SerialPortAssistant-$(BUILD_TARGERT)$(TOOLCHAIN_VERSION)_$(BUILD_ARCH)_$(QT_VERSION)_$(SerialPortAssistant_VERSION) 111 | #draft: true 112 | #prerelease: true 113 | force_update: true 114 | on: 115 | TOOLCHAIN_VERSION: 14 116 | QT_VERSION: 5.6.3 117 | BUILD_ARCH: x86 118 | appveyor_repo_tag: true # deploy on tag push only 119 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | serialportassistant (0.5.31) stable; urgency=medium 2 | 3 | * Add keyword in .desktop 4 | * Modify README 5 | * Release v0.5.31 6 | * Modify change log 7 | * Update io.github.KangLin.SerialPortAssistant.metainfo.xml.in 8 | * RPM: modify Package/rpm/serialportassistant.spec 9 | * Flatpak: add metainfo file 10 | * RPM: disable debug information 11 | * Modify Package/Flatpak/io.github.KangLin.SerialPortAssistant.json 12 | * Add rpm package 13 | * Modify desktop icon 14 | * Modify test_linux.sh 15 | * Add flatpak 16 | * CI: update actions/cache@v4 17 | * CI: modify macos.yml 18 | 19 | -- Kang Lin Sun, 23 Mar 2025 22:31:38 +0800 20 | 21 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | # https://www.debian.org/doc/manuals/maint-guide/dreq.zh-cn.html#control 2 | # https://www.debian.org/doc/debian-policy/ch-controlfields.html 3 | 4 | Source: serialportassistant 5 | Section: main 6 | Priority: optional 7 | Maintainer: Kang Lin 8 | Build-Depends: cmake, debhelper (>=13~), debhelper-compat (=13), fakeroot, 9 | libssl-dev, libcmark-dev, rabbitcommon-dev (>=2.3.2), 10 | qt6-tools-dev, qt6-tools-dev-tools, qt6-base-dev, qt6-base-dev-tools, 11 | qt6-l10n-tools, qt6-translations-l10n, qt6-scxml-dev, libqt6serialport6-dev 12 | Standards-Version: 4.6.2 13 | Homepage: https://github.com/KangLin/SerialPortAssistant 14 | Vcs-Git: https://github.com/KangLin/SerialPortAssistant.git 15 | Vcs-Browser: https://github.com/KangLin/SerialPortAssistant 16 | Rules-Requires-Root: no 17 | 18 | Package: serialportassistant 19 | Section: utils 20 | Architecture: any 21 | #Pre-Depends: ${misc:Pre-Depends} 22 | Depends: ${shlibs:Depends}, ${misc:Depends} 23 | Description: Serial Port Assistant 24 | Serial port assistant 25 | . 26 | Author: Kang Lin 27 | . 28 | Donation: 29 | . 30 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 31 | . 32 | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 33 | . 34 | https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 35 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: serialportassistant 3 | Upstream-Contact: Kang Lin 4 | Source: https://github.com/KangLin/SerialPortAssistant 5 | 6 | Files: * 7 | Copyright: 2019 Kang Lin 8 | License: GPL-3.0+ 9 | 10 | Files: debian/* 11 | Copyright: 2024 Kang Lin 12 | License: GPL-3.0+ 13 | 14 | License: GPL-3.0+ 15 | This program is free software: you can redistribute it and/or modify 16 | it under the terms of the GNU General Public License as published by 17 | the Free Software Foundation, either version 3 of the License, or 18 | (at your option) any later version. 19 | . 20 | This package is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU General Public License for more details. 24 | . 25 | You should have received a copy of the GNU General Public License 26 | along with this program. If not, see . 27 | . 28 | On Debian systems, the complete text of the GNU General 29 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 30 | -------------------------------------------------------------------------------- /debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for serialportassistant 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see https://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | INSTALL_ROOT=/opt/SerialPortAssistant 21 | 22 | function_config() 23 | { 24 | chmod -R a+w $INSTALL_ROOT/etc 25 | 26 | if [ ! -f /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop ]; then 27 | ln -s ${INSTALL_ROOT}/share/applications/io.github.KangLin.SerialPortAssistant.desktop /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop 28 | fi 29 | if [ ! -f /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png ]; then 30 | if [ ! -d /usr/share/pixmaps ]; then 31 | mkdir -p /usr/share/pixmaps 32 | fi 33 | ln -s ${INSTALL_ROOT}/share/icons/hicolor/128x128/apps/io.github.KangLin.SerialPortAssistant.png /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png 34 | fi 35 | if [ ! -f /usr/bin/serialportassistant ]; then 36 | ln -s $INSTALL_ROOT/bin/SerialPortAssistant /usr/bin/serialportassistant 37 | fi 38 | 39 | #echo "${INSTALL_ROOT}/lib" > /etc/ld.so.conf.d/SerialPortAssistant.conf 40 | #echo "${INSTALL_ROOT}/bin" >> /etc/ld.so.conf.d/SerialPortAssistant.conf 41 | #export QT_VERSION_DIR= 42 | #if [ -n "${QT_VERSION_DIR}" ]; then 43 | # echo "/opt/qt${QT_VERSION_DIR}/lib" >> /etc/ld.so.conf.d/SerialPortAssistant.conf 44 | #fi 45 | #ldconfig 46 | } 47 | 48 | case "$1" in 49 | configure) 50 | if [ -d ${INSTALL_ROOT} ]; then 51 | function_config 52 | fi 53 | ;; 54 | 55 | abort-upgrade|abort-remove|abort-deconfigure) 56 | rm -fr /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop 57 | rm -fr /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png 58 | rm -f /usr/bin/serialportassistant 59 | #rm -fr /etc/ld.so.conf.d/SerialPortAssistant.conf 60 | ;; 61 | 62 | *) 63 | echo "postinst called with unknown argument \`$1'" >&2 64 | exit 1 65 | ;; 66 | esac 67 | 68 | # dh_installdeb will replace this with shell code automatically 69 | # generated by other debhelper scripts. 70 | 71 | #DEBHELPER# 72 | 73 | exit 0 74 | -------------------------------------------------------------------------------- /debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for serialportassistant 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see https://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | INSTALL_ROOT=/opt/SerialPortAssistant 22 | 23 | case "$1" in 24 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 25 | rm -fr $INSTALL_ROOT/log $INSTALL_ROOT/bin/log 26 | rm -fr /usr/share/applications/io.github.KangLin.SerialPortAssistant.desktop 27 | rm -fr /usr/share/pixmaps/io.github.KangLin.SerialPortAssistant.png 28 | rm -fr /usr/bin/serialportassistant 29 | #rm -fr /etc/ld.so.conf.d/SerialPortAssistant.conf 30 | #ldconfig 31 | ;; 32 | 33 | *) 34 | echo "postrm called with unknown argument \`$1'" >&2 35 | exit 1 36 | ;; 37 | esac 38 | 39 | # dh_installdeb will replace this with shell code automatically 40 | # generated by other debhelper scripts. 41 | 42 | #DEBHELPER# 43 | 44 | exit 0 45 | -------------------------------------------------------------------------------- /debian/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for serialportassistant 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see https://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | case "$1" in 17 | install|upgrade) 18 | export QT_VERSION= 19 | if [ -n "${QT_VERSION}" ]; then 20 | sudo add-apt-repository -y ppa:beineri/opt-qt-${QT_VERSION}-`lsb_release -c|awk '{print $2}'` 21 | sudo apt-get update 22 | fi 23 | ;; 24 | 25 | abort-upgrade) 26 | ;; 27 | 28 | *) 29 | echo "preinst called with unknown argument \`$1'" >&2 30 | exit 1 31 | ;; 32 | esac 33 | 34 | # dh_installdeb will replace this with shell code automatically 35 | # generated by other debhelper scripts. 36 | 37 | #DEBHELPER# 38 | 39 | exit 0 40 | -------------------------------------------------------------------------------- /debian/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for serialportassistant 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see https://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | # export DH_VERBOSE = 1 5 | 6 | # see FEATURE AREAS in dpkg-buildflags(1) 7 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all 8 | 9 | # see ENVIRONMENT in dpkg-buildflags(1) 10 | # package maintainers to append CFLAGS 11 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic 12 | # package maintainers to append LDFLAGS 13 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 14 | 15 | #export QT_SELECT=qt5 16 | 17 | %: 18 | dh $@ 19 | 20 | DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) 21 | BUILD_DIR = "build_$(DEB_HOST_MULTIARCH)" 22 | PACKAGE_DIR = "debian/serialportassistant" 23 | 24 | # Debian 维护者指南: https://www.debian.org/doc/manuals/debmake-doc/index.zh-cn.html 25 | # Debian 新维护者手册: https://www.debian.org/doc/manuals/maint-guide/dreq.zh-cn.html#rules 26 | # See: man debhelper 27 | # This is example for Cmake ( See https://bugs.debian.org/641051 ) 28 | override_dh_auto_configure: 29 | # See: man dh_auto_configure an debhelper 30 | dh_auto_configure -B$(BUILD_DIR) -- \ 31 | -DCMAKE_INSTALL_PREFIX=/opt/SerialPortAssistant \ 32 | -DRabbitCommon_ROOT=${RabbitCommon_ROOT} \ 33 | -DCMAKE_BUILD_TYPE=Release \ 34 | -DCMARK_SHARED=OFF \ 35 | -DCMARK_TESTS=OFF \ 36 | -DCMARK_STATIC=ON \ 37 | ${PARAS} 38 | 39 | override_dh_auto_build: 40 | cmake --build $(BUILD_DIR) --config Release --parallel $(nproc) 41 | 42 | override_dh_auto_install: 43 | cmake --install $(BUILD_DIR) --config Release \ 44 | --component Runtime \ 45 | --prefix $(PACKAGE_DIR)/opt/SerialPortAssistant 46 | cmake --install $(BUILD_DIR) --config Release \ 47 | --component Application \ 48 | --prefix $(PACKAGE_DIR)/opt/SerialPortAssistant 49 | 50 | override_dh_builddeb: 51 | dh_builddeb --package=serialportassistant -P$(PACKAGE_DIR) 52 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | # https://www.debian.org/doc/debian-policy/ch-source.html#upstream-source-location-debian-watch 2 | # Compulsory line, this is a version 4 file 3 | version=4 4 | 5 | opts="searchmode=html" \ 6 | https://github.com/KangLin/SerialPortAssistant/tags \ 7 | https://github.com/KangLin/SerialPortAssistant/archive/refs/tags/v?(\d+.\d+.\d+)\.tar\.gz 8 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Kang Lin 3 | 4 | set -e 5 | 6 | SOURCE_DIR=`pwd` 7 | PRE_TAG=`git tag --sort=-creatordate | head -n 1` 8 | 9 | if [ -n "$1" ]; then 10 | VERSION=`git describe --tags` 11 | if [ -z "$VERSION" ]; then 12 | VERSION=`git rev-parse HEAD` 13 | fi 14 | 15 | if [ -n "$2" ]; then 16 | MESSAGE="Release $1 $2" 17 | else 18 | MESSAGE="Release $1" 19 | fi 20 | 21 | PRE_TAG=`git tag --sort=-taggerdate | head -n 1` 22 | echo "Current version: $VERSION, current tag: $PRE_TAG. The version to will be set tag version: $1 message: $MESSAGE" 23 | echo "Please check the follow list:" 24 | echo " - Test is ok ?" 25 | echo " - Translation is ok ?" 26 | echo " - Change log is ok ?" 27 | 28 | read -t 30 -p "Be sure to input Y, not input N: " INPUT 29 | if [ "$INPUT" != "Y" -a "$INPUT" != "y" ]; then 30 | exit 0 31 | fi 32 | git tag -a $1 -m "Release $1 ${MESSAGE}" 33 | else 34 | echo "Usage: $0 release_version [release_message]" 35 | echo " release_version format: [v][0-9].[0-9].[0-9]" 36 | exit -1 37 | fi 38 | 39 | VERSION=`git describe --tags` 40 | if [ -z "$VERSION" ]; then 41 | VERSION=`git rev-parse --short HEAD` 42 | fi 43 | 44 | sed -i "s/ \"version\":[[:blank:]]*\"v\?[0-9]\+\.[0-9]\+\.[0-9]\+\"/ \"version\":\"${VERSION}\"/g" ${SOURCE_DIR}/Update/update.json 45 | sed -i "s/^\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"${VERSION}\"/g" ${SOURCE_DIR}/Install/Install.nsi 46 | 47 | APPVERYOR_VERSION="version: '${VERSION}.{build}'" 48 | sed -i "s/^version: '.*{build}'/${APPVERYOR_VERSION}/g" ${SOURCE_DIR}/appveyor.yml 49 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: \"${VERSION}\"/g" ${SOURCE_DIR}/appveyor.yml 50 | #sed -i "s/export VERSION=.*/export VERSION=\"${VERSION}\"/g" ${SOURCE_DIR}/.travis.yml 51 | #sed -i "s/^\ - export VERSION=.*/\ - export VERSION=\"${VERSION}\"/g" ${SOURCE_DIR}/.travis.yml 52 | 53 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/build.yml 54 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/appimage.yml 55 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/msvc.yml 56 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/mingw.yml 57 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${VERSION}/g" ${SOURCE_DIR}/.github/workflows/android.yml 58 | sed -i "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/${VERSION}/g" ${SOURCE_DIR}/README*.md 59 | 60 | DEBIAN_VERSION=`echo ${VERSION}|cut -d "v" -f 2` 61 | 62 | sed -i "s/ SET(SerialPortAssistant_VERSION .*)/ SET(SerialPortAssistant_VERSION \"${DEBIAN_VERSION}\")/g" ${SOURCE_DIR}/App/CMakeLists.txt 63 | sed -i "s/ SET(SerialPortAssistantTAG .*)/ SET(SerialPortAssistantTAG \"${DEBIAN_VERSION}\")/g" ${SOURCE_DIR}/App/CMakeLists.txt 64 | sed -i "s/version:.*'[0-9]\+\.[0-9]\+\.[0-9]\+'/version: '${DEBIAN_VERSION}'/g" ${SOURCE_DIR}/snap/snapcraft.yaml 65 | sed -i "s/Version:.*'[0-9]\+\.[0-9]\+\.[0-9]\+'/Version: '${DEBIAN_VERSION}'/g" ${SOURCE_DIR}/Package/rpm/serialportassistant.spec 66 | sed -i "s/serialportassistant_[0-9]\+\.[0-9]\+\.[0-9]\+/serialportassistant_${DEBIAN_VERSION}/g" ${SOURCE_DIR}/README*.md 67 | sed -i "s/serialportassistant (.*)/serialportassistant (${DEBIAN_VERSION})/g" ${SOURCE_DIR}/debian/changelog 68 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${DEBIAN_VERSION}/g" ${SOURCE_DIR}/.github/workflows/ubuntu.yml 69 | sed -i "s/SerialPortAssistant_VERSION:.*/SerialPortAssistant_VERSION: ${DEBIAN_VERSION}/g" ${SOURCE_DIR}/.github/workflows/macos.yml 70 | if [ -f ${SOURCE_DIR}/vcpkg.json ]; then 71 | sed -i "s/ \"version-string\":.*\"[0-9]\+\.[0-9]\+\.[0-9]\+\",/ \"version-string\": \"${DEBIAN_VERSION}\",/g" ${SOURCE_DIR}/vcpkg.json 72 | fi 73 | 74 | MAJOR_VERSION=`echo ${DEBIAN_VERSION}|cut -d "." -f 1` 75 | sed -i "s/android:versionCode=.*android/android:versionCode=\"${MAJOR_VERSION}\" android/g" ${SOURCE_DIR}/App/android/AndroidManifest.xml 76 | sed -i "s/android:versionName=.*>/android:versionName=\"${DEBIAN_VERSION}\" >/g" ${SOURCE_DIR}/App/android/AndroidManifest.xml 77 | 78 | CHANGLOG_TMP=${SOURCE_DIR}/debian/changelog.tmp 79 | CHANGLOG_FILE=${SOURCE_DIR}/debian/changelog 80 | echo "serialportassistant (${DEBIAN_VERSION}) stable; urgency=medium" > ${CHANGLOG_FILE} 81 | echo "" >> ${CHANGLOG_FILE} 82 | echo "`git log --pretty=format:' * %s' ${PRE_TAG}..HEAD`" >> ${CHANGLOG_FILE} 83 | echo "" >> ${CHANGLOG_FILE} 84 | echo " -- `git log --pretty=format:'%an <%ae>' HEAD^..HEAD` `date --rfc-email`" >> ${CHANGLOG_FILE} 85 | echo "" >> ${CHANGLOG_FILE} 86 | 87 | #CHANGLOG_EXIST="`grep "serialportassistant (${DEBIAN_VERSION})" ${CHANGLOG_FILE}`" 88 | #if [ -z "$CHANGLOG_EXIST" ]; then 89 | # echo "serialportassistant (${DEBIAN_VERSION}) unstable; urgency=medium" > ${CHANGLOG_TMP} 90 | # echo "" >> ${CHANGLOG_TMP} 91 | # echo "`git log --pretty=format:' * %s (%an <%ae>)' ${PRE_TAG}..HEAD`" >> ${CHANGLOG_TMP} 92 | # echo "" >> ${CHANGLOG_TMP} 93 | # echo " -- `git log --pretty=format:'%an <%ae>' HEAD^..HEAD` `date --rfc-email`" >> ${CHANGLOG_TMP} 94 | # echo "" >> ${CHANGLOG_TMP} 95 | # cat ${CHANGLOG_FILE} >> ${CHANGLOG_TMP} 96 | # rm ${CHANGLOG_FILE} 97 | # mv ${CHANGLOG_TMP} ${CHANGLOG_FILE} 98 | #fi 99 | 100 | if [ -n "$1" ]; then 101 | git add . 102 | git commit -m "Release $1" 103 | git push 104 | git tag -d $1 105 | git tag -a $1 -m "Release $1" 106 | #git push origin :refs/tags/$1 # Remove remote tag 107 | git push origin $1 #Push tag 108 | fi 109 | -------------------------------------------------------------------------------- /etc/SerialPortAssistant_logqt.ini: -------------------------------------------------------------------------------- 1 | [Log] 2 | ;; Log file path. 3 | ;Path=log 4 | ;; Log file name prefix 5 | DateFormat="yyyy-MM-dd" 6 | ;; Message format pattern. See: https://doc.qt.io/qt-6/qtlogging.html#qSetMessagePattern 7 | Pattern="[%{time hh:mm:ss.zzz} %{pid}|%{threadid} %{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}E%{endif}%{if-fatal}F%{endif}] %{category} - %{message}" 8 | ;[%{file}:%{line}, %{function}]" 9 | ;; Log file length 10 | ;Length=100M 11 | ;; Log file count 12 | ;Count=10 13 | ;; Write log file interval 14 | ;Interval=1 15 | 16 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 17 | ;; Log rules 18 | ;; Please see QLoggingCategory documents: https://doc.qt.io/qt-6/qloggingcategory.html#logging-rules 19 | ;; Format: 20 | ;; [.] = true|false 21 | [Rules] 22 | ;*=false 23 | *.debug=false 24 | ;*.warning=false 25 | 26 | ;RabbitCommon*=false 27 | ;RabbitCommon.Updater=true 28 | -------------------------------------------------------------------------------- /share/SerialPortAssistant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #获取运行的程序名 6 | PRONAME=`basename $0` 7 | #获取文件运行的当前目录 8 | current_dir=$(cd "$(dirname "$0")"; pwd) 9 | 10 | export LD_LIBRARY_PATH=$current_dir:$current_dir/../lib:$current_dir/../lib/`uname -m`-linux-gnu:$LD_LIBRARY_PATH 11 | /opt/SerialPortAssistant/bin/SerialPortAssistant $* 12 | -------------------------------------------------------------------------------- /share/applications/io.github.KangLin.SerialPortAssistant.desktop.in: -------------------------------------------------------------------------------- 1 | # https://specifications.freedesktop.org/menu-spec/latest/index.html 2 | 3 | # https://specifications.freedesktop.org/desktop-entry-spec/latest/ 4 | # https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html 5 | [Desktop Entry] 6 | Type=Application 7 | 8 | Icon=io.github.KangLin.SerialPortAssistant 9 | Exec=SerialPortAssistant 10 | Path=@CMAKE_INSTALL_PREFIX@/bin 11 | Terminal=false 12 | StartupNotify=true 13 | 14 | # https://specifications.freedesktop.org/menu-spec/latest/apa.html 15 | Categories=Utility;Development;Debugger 16 | Keywords=Serial Port Assistant; Serial; 串口助手; 串口 17 | 18 | # https://www.freedesktop.org/wiki/Specifications/mime-apps-spec/ 19 | # https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/ 20 | MimeType=application/octet-stream;text/plain; 21 | 22 | Name=Serial Port Assistant 23 | GenericName=Serial Port Assistant 24 | Comment=A cross-platform serial communication tool 25 | 26 | Name[zh_CN]=串口助手 27 | GenericName[zh_CN]=串口助手 28 | Comment[zh_CN]=跨平台串口通信工具 29 | 30 | Name[zh_TW]=串口助手 31 | GenericName[zh_TW]=串口助手 32 | Comment[zh_TW]=跨平台串口通訊工具 33 | -------------------------------------------------------------------------------- /share/metainfo/io.github.KangLin.SerialPortAssistant.metainfo.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | io.github.KangLin.SerialPortAssistant 4 | io.github.KangLin.SerialPortAssistant.desktop 5 | 6 | Serial Port Assistant 7 | 串口助手 8 | 串口助手 9 | 10 | Serial port tool 11 | 跨平台的串口工具 12 | 跨平臺的串口工具 13 | 14 | 15 |

Serial Port Assistant provides a cross-platform GUI for interacting with serial devices.

16 |

串口助手提供跨平台的图形界面,用于与串口设备通信。

17 |

串口助手提供跨平臺的圖形界面,用於與串口設備通信。

18 |
19 | 20 | 21 | 22 | https://raw.githubusercontent.com/KangLin/SerialPortAssistant/refs/heads/master/Docs/ui-en.jpg 23 | Interface 24 | https://raw.githubusercontent.com/KangLin/SerialPortAssistant/refs/heads/master/Docs/ui-zh.jpg 25 | 界面 26 | https://raw.githubusercontent.com/KangLin/SerialPortAssistant/refs/heads/master/Docs/ui-zh.jpg 27 | 界面 28 | 29 | 30 | 31 | 32 | KangLin 33 | 康林 34 | 康林 35 | 36 | 37 | CC0-1.0 38 | GPL-3.0 39 | 40 | 41 | https://github.com/KangLin/SerialPortAssistant 42 | https://github.com/KangLin/SerialPortAssistant/issues 43 | https://github.com/KangLin/SerialPortAssistant/pull 44 | https://github.com/KangLin/SerialPortAssistant/discussions 45 | https://github.com/KangLin/SerialPortAssistant 46 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 47 | 48 | 49 | #99c1f1 50 | #a599a5 51 | 52 | 53 | 54 | 55 | https://github.com/KangLin/SerialPortAssistant/blob/@SerialPortAssistant_Revision@/ChangeLog.md 56 | 57 | 58 | 59 |
60 | -------------------------------------------------------------------------------- /snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | # How Snapcraft builds snaps: https://snapcraft.io/docs/how-snapcraft-builds 2 | # Snapcraft.yaml schema: https://snapcraft.io/docs/snapcraft-yaml-schema 3 | # Debug snaps with snap try: https://snapcraft.io/docs/snap-try 4 | # Debugging snaps: https://snapcraft.io/docs/debug-snaps 5 | name: serialportassistant 6 | base: core22 # the base snap is the execution environment for this snap 7 | version: '0.5.31' 8 | type: app 9 | license: GPL-3.0+ 10 | contact: kl222@126.com 11 | donation: 12 | - https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 13 | issues: https://github.com/KangLin/SerialPortAssistant/issues 14 | summary: Serial Port Assistant # 79 char long summary 15 | description: | 16 | Serial port assistant 17 | . 18 | Author: Kang Lin 19 | . 20 | Donation: 21 | . 22 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 23 | . 24 | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 25 | . 26 | https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 27 | 28 | # - devel 29 | # - stable 30 | grade: stable # must be 'stable' to release into candidate/stable channels 31 | # Confinement levels: https://snapcraft.io/docs/classic-confinement#heading--levels 32 | # Classic confinement: https://snapcraft.io/docs/classic-confinement 33 | # - devmode 34 | # - strict 35 | confinement: strict # use 'strict' once you have the right plugs and slots 36 | 37 | # lifecycle: https://snapcraft.io/docs/parts-lifecycle 38 | # Iterating over a build: https://snapcraft.io/docs/iterating-over-a-build 39 | # Part directives: https://snapcraft.io/docs/snapcraft-yaml-schema#part-directives 40 | parts: 41 | rabbitcommon: 42 | # see: https://snapcraft.io/docs/supported-plugins 43 | # See 'snapcraft plugins' 44 | plugin: dump # See: https://snapcraft.io/docs/dump-plugin 45 | source: https://github.com/KangLin/RabbitCommon.git 46 | source-type: git 47 | source-branch: master 48 | source-depth: 1 49 | organize: 50 | '*': RabbitCommon/ 51 | prime: 52 | - -* 53 | 54 | serialportassistant: 55 | # see: https://snapcraft.io/docs/supported-plugins 56 | # See 'snapcraft plugins' 57 | plugin: cmake # See: https://snapcraft.io/docs/cmake-plugin 58 | source: . 59 | after: 60 | - rabbitcommon 61 | build-packages: 62 | - libcmark-dev 63 | - cmark 64 | - libssl-dev 65 | - libcrypt-dev 66 | stage-packages: 67 | - libcmark0.30.2 68 | - libopengl0 69 | - libgl1 70 | - libglx0 71 | - libglu1-mesa 72 | - libssl3 73 | - libcrypt1 74 | - libc6 75 | - libgcc-s1 76 | - libstdc++6 77 | - zlib1g 78 | cmake-parameters: 79 | # See: https://snapcraft.io/docs/parts-environment-variables 80 | - -DRabbitCommon_ROOT=$CRAFT_STAGE/RabbitCommon/ 81 | - -DCMAKE_BUILD_TYPE=Release 82 | - -DCMAKE_INSTALL_PREFIX=/opt/SerialPortAssistant 83 | # See: https://snapcraft.io/docs/overrides 84 | override-stage: | 85 | cd $CRAFT_PART_INSTALL/opt/SerialPortAssistant/bin 86 | # if [ ! -f serialportassistant ]; then 87 | # ln -s SerialPortAssistant serialportassistant 88 | # fi 89 | sed -i 's|Icon=io\.github\.KangLin\.SerialPortAssistant|Icon=/opt/SerialPortAssistant/share/pixmaps/io\.github\.KangLin\.SerialPortAssistant\.png|' $CRAFT_PART_INSTALL/opt/SerialPortAssistant/share/applications/io.github.KangLin.SerialPortAssistant.desktop 90 | sed -i 's|Path=/opt/SerialPortAssistant/bin|Path=\$\{SNAP\}/opt/SerialPortAssistant/bin|' $CRAFT_PART_INSTALL/opt/SerialPortAssistant/share/applications/io.github.KangLin.SerialPortAssistant.desktop 91 | snapcraftctl stage 92 | prime: 93 | - -usr/bin/cmark 94 | - -opt/SerialPortAssistant/bin/cmark 95 | - -opt/SerialPortAssistant/include 96 | - -opt/SerialPortAssistant/lib/cmake 97 | - -opt/SerialPortAssistant/lib/pkgconfig 98 | - -opt/SerialPortAssistant/lib/*.a 99 | 100 | # App directives: https://snapcraft.io/docs/snapcraft-yaml-schema#app-directives 101 | apps: 102 | serialportassistant: 103 | command: opt/SerialPortAssistant/bin/SerialPortAssistant 104 | # See: https://snapcraft.io/docs/desktop-menu-support#heading--desktop-key 105 | desktop: opt/SerialPortAssistant/share/applications/io.github.KangLin.SerialPortAssistant.desktop 106 | environment: 107 | LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/opt/SerialPortAssistant/lib 108 | #QT_PLUGIN_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/qt6/plugins/ 109 | PATH: $SNAP/opt/SerialPortAssistant/bin:$PATH 110 | # List extensions, run `snapcraft extensions` 111 | extensions: 112 | - kde-neon-6 113 | # See: https://snapcraft.io/docs/supported-interfaces 114 | plugs: 115 | - network 116 | - network-status 117 | - network-control 118 | - network-bind 119 | - network-manager 120 | - opengl 121 | - serial-port 122 | - home 123 | - ssh-keys 124 | - ssh-public-keys 125 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "serialportassistant", 3 | "version-string": "0.5.31", 4 | "license": "GPL-3.0", 5 | "homepage": "https://github.com/KangLin/SerialPortAssistant", 6 | 7 | "dependencies": [ 8 | "openssl", 9 | "cmark" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /vcpkg/manifests/vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "serialportassistant", 3 | "version-string": "0.5.21", 4 | "license": "GPL-3.0", 5 | "homepage": "https://github.com/KangLin/SerialPortAssistant", 6 | 7 | "dependencies": [ 8 | "openssl" 9 | ], 10 | 11 | "builtin-baseline": "9259a0719d94c402aae2ab7975bc096afdec15df", 12 | "overrides": [ 13 | { "name": "openssl", "version-string": "1.1.1n" }, 14 | { "name": "cmark", "version-string": "0.30.1" } 15 | ] 16 | 17 | } 18 | --------------------------------------------------------------------------------