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..0d8574c 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -16,9 +16,11 @@ description: | . 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: 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 parts: rabbitcommon: # see: https://snapcraft.io/docs/supported-plugins @@ -44,60 +46,74 @@ parts: source: . build-packages: - cmark - - libqt6serialport6-dev - - qt6-webengine-dev - - qt6-webengine-dev-tools - libcrypt-dev - libopengl-dev - libglu1-mesa-dev + - libpulse-mainloop-glib0 - qt6-tools-dev - qt6-tools-dev-tools - qt6-base-dev - qt6-base-dev-tools - qt6-qpa-plugins - libqt6svg6-dev + - libqt6serialport6-dev - qt6-l10n-tools - qt6-translations-l10n - qt6-scxml-dev - qt6-webengine-dev - qt6-webengine-dev-tools - - libpulse-mainloop-glib0 stage-packages: - libqt6core6 - libqt6gui6 - - libqt6multimedia6 - libqt6network6 - - libqt6printsupport6 - libqt6statemachine6 - libqt6webenginewidgets6 - libqt6widgets6 - libqt6xml6 + - libqt6serialport6 - 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 +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: + - gnome + # See: https://snapcraft.io/docs/supported-interfaces + plugs: + - network + - network-bind + - network-status + - serial-port + - desktop + - desktop-legacy + - wayland + - x11 + - opengl + - home