diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index c13d1f5..c2bdb52 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -23,6 +23,8 @@ jobs: VCPKG_TARGET_TRIPLET: x64-android ANDROID_ABI: x86_64 + # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners + # See: https://github.com/actions/runner-images/ runs-on: ubuntu-latest env: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d8a12b1..1580158 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -30,7 +30,7 @@ jobs: - qt_version: 5.12.12 # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners - # See: https://github.com/actions/runner-images/tree/main + # See: https://github.com/actions/runner-images/ runs-on: macos-13 env: diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 16119f4..78ca770 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -20,6 +20,8 @@ jobs: run: shell: cmd + # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners + # See: https://github.com/actions/runner-images/ runs-on: windows-latest env: @@ -56,8 +58,7 @@ jobs: mingw-w64-x86_64-nsis ^ mingw-w64-x86_64-gcc ^ mingw-w64-x86_64-qt5 ^ - mingw-w64-x86_64-qtwebkit ^ - mingw-w64-x86_64-qt5-serialport ^ + mingw-w64-x86_64-cmark ^ mingw-w64-x86_64-zlib ^ mingw-w64-x86_64-openssl ^ git base-devel diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index 0a8ac4c..52ed544 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -35,6 +35,8 @@ jobs: CMAKE_GENERATOR_PLATFORM: Win32 VCPKG_MANIFEST_DIR: "\\vcpkg\\manifests" + # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners + # See: https://github.com/actions/runner-images/ runs-on: windows-latest env: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ede07ca..cc41dcc 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -16,6 +16,8 @@ jobs: matrix: BUILD_TYPE: [Release] + # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners + # See: https://github.com/actions/runner-images/ runs-on: ubuntu-latest env: diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index f6da640..fd6f19f 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,8 +1,16 @@ +# How Snapcraft builds snaps: https://snapcraft.io/docs/how-snapcraft-builds +# Snapcraft.yaml schema: https://snapcraft.io/docs/snapcraft-yaml-schema +# Debug snaps with snap try: https://snapcraft.io/docs/snap-try +# Debugging snaps: https://snapcraft.io/docs/debug-snaps name: serialportassistant -base: core24 # the base snap is the execution environment for this snap +base: core22 # the base snap is the execution environment for this snap version: '0.5.26' # just for humans, typically '1.2+git' or '1.3.2' -icon: snap/opt/SerialPortAssistant/share/pixmaps/SerialPortAssistant.png -summary: Serial Port Assistant +license: GPL-3.0+ +contact: kl222@126.com +donation: + - https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png +issues: https://github.com/KangLin/SerialPortAssistant/issues +summary: Serial Port Assistant # 79 char long summary description: | Serial port assistant . @@ -15,14 +23,20 @@ description: | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png . https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png - -grade: devel # must be 'stable' to release into candidate/stable channels -confinement: devmode # use 'strict' once you have the right plugs and slots +grade: stable # must be 'stable' to release into candidate/stable channels +# Confinement levels: https://snapcraft.io/docs/classic-confinement#heading--levels +# Classic confinement: https://snapcraft.io/docs/classic-confinement +confinement: strict # use 'strict' once you have the right plugs and slots + +# lifecycle: https://snapcraft.io/docs/parts-lifecycle +# Iterating over a build: https://snapcraft.io/docs/iterating-over-a-build +# Part directives: https://snapcraft.io/docs/snapcraft-yaml-schema#part-directives parts: rabbitcommon: # see: https://snapcraft.io/docs/supported-plugins - plugin: dump + # See 'snapcraft plugins' + plugin: dump # See: https://snapcraft.io/docs/dump-plugin source: https://github.com/KangLin/RabbitCommon.git source-type: git source-branch: master @@ -34,8 +48,9 @@ parts: serialportassistant: after: [rabbitcommon] + # see: https://snapcraft.io/docs/supported-plugins # See 'snapcraft plugins' - plugin: cmake + plugin: cmake # See: https://snapcraft.io/docs/cmake-plugin cmake-parameters: # See: https://snapcraft.io/docs/parts-environment-variables - -DRabbitCommon_DIR=$CRAFT_STAGE/RabbitCommon/ @@ -44,60 +59,70 @@ parts: source: . build-packages: - cmark - - libqt6serialport6-dev - - qt6-webengine-dev - - qt6-webengine-dev-tools + - libssl-dev - libcrypt-dev - libopengl-dev - libglu1-mesa-dev - - qt6-tools-dev - - qt6-tools-dev-tools - - qt6-base-dev - - qt6-base-dev-tools - - qt6-qpa-plugins - - libqt6svg6-dev - - qt6-l10n-tools - - qt6-translations-l10n - - qt6-scxml-dev - - qt6-webengine-dev - - qt6-webengine-dev-tools - libpulse-mainloop-glib0 + - qttools5-dev + - qtbase5-dev + - libqt5scxml5-dev + - libqt5serialport5-dev + - qtwebengine5-dev + - qtwebengine5-dev-tools + - libqt5svg5-dev stage-packages: - - libqt6core6 - - libqt6gui6 - - libqt6multimedia6 - - libqt6network6 - - libqt6printsupport6 - - libqt6statemachine6 - - libqt6webenginewidgets6 - - libqt6widgets6 - - libqt6xml6 + - libqt5scxml5 + - libqt5serialport5 + - libqt5webengine5 + - libqt5webengine-data + - libqt5webenginecore5 + - libqt5webenginewidgets5 + - libqt5svg5 - libc6 - libgcc-s1 - libstdc++6 - libssl3 - zlib1g - # See: https://snapcraft.io/docs/overrides + # See: https://snapcraft.io/docs/overrides override-stage: | + cd $CRAFT_PART_INSTALL/opt/SerialPortAssistant/bin + if [ ! -f serialportassistant ]; then + ln -s SerialPortAssistant serialportassistant + fi + sed -i 's|Icon=org\.Rabbit\.SerialPortAssistant|Icon=/opt/SerialPortAssistant/share/pixmaps/SerialPortAssistant\.png|' $CRAFT_PART_INSTALL/opt/SerialPortAssistant/share/applications/org.Rabbit.SerialPortAssistant.desktop snapcraftctl stage - sed -i 's|Exec=/opt/SerialPortAssistant/bin/SerialPortAssistant\.sh|Exec=$SNAP/opt/SerialPortAssistant/bin/SerialPortAssistant\.sh|' $CRAFT_STAGE/opt/SerialPortAssistant/share/applications/org.Rabbit.SerialPortAssistant.desktop - sed -i 's|Icon=org\.Rabbit\.SerialPortAssistant|Icon=/opt/SerialPortAssistant/share/pixmaps/SerialPortAssistant\.png|' $CRAFT_STAGE/opt/SerialPortAssistant/share/applications/org.Rabbit.SerialPortAssistant.desktop prime: - - usr/lib/**/*.so* - - opt/SerialPortAssistant - - -opt/SerialPortAssistant/bin/cmark - - -opt/SerialPortAssistant/include - - -opt/SerialPortAssistant/lib/cmake - - -opt/SerialPortAssistant/lib/pkgconfig - - -opt/SerialPortAssistant/lib/*.a + - -opt/SerialPortAssistant/bin/cmark + - -opt/SerialPortAssistant/include + - -opt/SerialPortAssistant/lib/cmake + - -opt/SerialPortAssistant/lib/pkgconfig + - -opt/SerialPortAssistant/lib/*.a -# apps: -# serialportassistant: -# command: desktop-launch $SNAP/opt/SerialPortAssistant/bin/SerialPortAssistant.sh -# # See: https://snapcraft.io/docs/desktop-menu-support#heading--desktop-key -# desktop: opt/SerialPortAssistant/share/applications/org.Rabbit.SerialPortAssistant.desktop -# environment: -# LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/opt/SerialPortAssistant/lib/$SNAPCRAFT_ARCH_TRIPLET -# plugs: -# - desktop -# - desktop-legacy \ No newline at end of file +# App directives: https://snapcraft.io/docs/snapcraft-yaml-schema#app-directives +apps: + serialportassistant: + command-chain: + - snap/command-chain/desktop-launch + command: opt/SerialPortAssistant/bin/serialportassistant + # See: https://snapcraft.io/docs/desktop-menu-support#heading--desktop-key + desktop: opt/SerialPortAssistant/share/applications/org.Rabbit.SerialPortAssistant.desktop + environment: + LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/opt/SerialPortAssistant/lib/$SNAPCRAFT_ARCH_TRIPLET:${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}:${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libproxy + QT_PLUGIN_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/qt6/plugins/ + PATH: $SNAP/opt/SerialPortAssistant/bin:$PATH + # List extensions, run `snapcraft extensions` + extensions: + - kde-neon + # See: https://snapcraft.io/docs/supported-interfaces + plugs: + - network + - network-bind + - network-status + - serial-port + - desktop + - desktop-legacy + - wayland + - x11 + - opengl + - home