Skip to content

Commit

Permalink
fix: build *.deb failed
Browse files Browse the repository at this point in the history
Use lowercase package names
  • Loading branch information
XMuli committed Aug 15, 2022
1 parent 32cb674 commit ec80309
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
os: [ubuntu-20.04] # ubuntu-18.04
env:
targetName: PicShot
targetLowerName: picshot
targetOS: debian
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true

Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:

- name: Install Qt
# if: steps.cache-qt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
run: |
$systemInfo="${{ env.targetOS }}-${{ matrix.arch }}-x64"
$productVersion="${{ github.ref }}".substring("refs/tags/v".length)
$productName="${{ env.targetName }}-$productVersion-beta-$systemInfo"
$productName="${{ env.targetLowerName }}-$productVersion-beta-$systemInfo"
echo "systemInfo=$systemInfo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "productVersion=$productVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/LinuxDeb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix: # 矩阵配置
qt_ver: [5.15.2] # 参考: https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/linux_x64/desktop/qt5_51211
qt_ver: [5.15.2] # 参考: https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/linux_x64/desktop/qt5_5152
qt_target: [desktop]
qt_arch: [gcc_64]
arch: [amd64] # arm64
os: [ubuntu-20.04] # ubuntu-18.04
arch: [amd64, arm64]
os: [ubuntu-20.04]
env:
targetName: PicShot
targetLowerName: picshot
targetOS: debian

steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
set-env: true

- uses: actions/checkout@v2
with:
fetch-depth: 1
Expand All @@ -41,7 +48,7 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags/')
shell: pwsh
run: |
$systemInfo="${{ env.targetOS }}-x64"
$systemInfo="${{ env.targetOS }}-${{ matrix.arch }}-x64"
$productVersion="${{ github.ref }}".substring("refs/tags/v".length)
# $productName="${{ env.targetName }}-$productVersion-beta-$systemInfo"
$productDebName="${{ env.targetLowerName }}-$productVersion"
Expand All @@ -60,7 +67,7 @@ jobs:
run: |
sudo apt clean
sudo apt update
sudo apt install wget tar dh-make debmake lintian cmake libqt5x11extras5-dev
sudo apt install wget tar dh-make debmake lintian cmake libqt5x11extras5-dev devscripts libqt5svg5-dev
# tag 打包 .deb,无动态库
- name: DebPackage
Expand All @@ -70,6 +77,8 @@ jobs:
run: |
echo "-------------- debug 0 --------------"
pwd
echo $PATH
cd ..
cp -r ${{ env.targetName }} ${{ env.productDebName }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
qt_arch: [clang_64]
env:
targetName: PicShot
targetLowerName: picshot
targetOS: macos
steps:

Expand All @@ -38,7 +39,7 @@ jobs:

- name: Install Qt
# if: steps.cache-qt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
# cached: ${{ steps.cache-qt.outputs.cache-hit }}
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
run: |
$systemInfo="${{ env.targetOS }}"
$productVersion="${{ github.ref }}".substring("refs/tags/v".length)
$productName="${{ env.targetName }}-$productVersion-beta-$systemInfo-x64"
$productName="${{ env.targetLowerName }}-$productVersion-beta-$systemInfo-x64"
echo "systemInfo=$systemInfo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "productVersion=$productVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
qt_arch_install: msvc2019_64
env:
targetName: PicShot
targetLowerName: picshot
targetOS: windows
# 步骤
steps:
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:

- name: Install Qt
# if: steps.cache-qt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
Expand Down Expand Up @@ -109,7 +110,7 @@ jobs:
run: |
$systemInfo="${{ env.targetOS }}-${{ matrix.msvc_arch }}"
$productVersion="${{ github.ref }}".substring("refs/tags/v".length)
$productName="${{ env.targetName }}-$productVersion-beta-$systemInfo"
$productName="${{ env.targetLowerName }}-$productVersion-beta-$systemInfo"
echo "systemInfo=$systemInfo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "productVersion=$productVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand Down
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
picshot (0.3.2) UNRELEASED; urgency=medium

[ xmuli ]
* 修复 Linux 构建 *.deb 失败
* 构建包名使用小写

-- XMuli <[email protected]> Mon, 15 Aug 2022 23:13:29 +0800

picshot (0.3.1) UNRELEASED; urgency=medium

* 修复 Linux 和 MacOS 编译失败
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Build-Depends:
cmake (>= 3.13~),
debhelper (>= 11),
qtbase5-dev (>= 5.12.0~),
qt5-default,
libqt5x11extras5-dev
# qt5-default (>= 5.12.0~),
# qttools5-dev (>= 5.12.0~),
Standards-Version: 4.4.1
Homepage: https://github.com/XMuli
Expand Down

0 comments on commit ec80309

Please sign in to comment.