Skip to content

Commit 0517e14

Browse files
committed
Script: modify build appimage
1 parent 751b699 commit 0517e14

8 files changed

Lines changed: 29 additions & 33 deletions

File tree

.github/workflows/docker.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,14 @@ jobs:
117117
fi
118118
./Script/build_linux.sh --docker --docker-image="${docker_image}" --docker-platform="${{matrix.variant.platform}}" --${{matrix.variant.PACKAGE}}
119119
if [ "${{matrix.variant.PACKAGE}}" = "deb" ]; then
120+
echo "Copy deb package ......"
120121
pushd ${{github.workspace}}/build_linux/
121122
export ARCH=`dpkg --print-architecture`
122123
cp serialportassistant_*.deb serialportassistant_${{env.SerialPortAssistant_VERSION}}_${{matrix.variant.image}}_${{matrix.variant.lable}}_${ARCH}.deb
123124
popd
124125
fi
125126
if [ "${{matrix.variant.PACKAGE}}" = "appimage" ]; then
127+
echo "Package appimage ......"
126128
pushd ${{env.BUILD_DIR}}/build_linux
127129
mv install SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_${ARCH}_Setup
128130
zip SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_${ARCH}_Setup.zip SerialPortAssistant_${{env.SerialPortAssistant_VERSION}}_Linux_${ARCH}_Setup/*

Package/debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/SerialPortAssistant/Package/debian/control.ubuntu.22

Package/debian/rules

100644100755
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ PACKAGE_DIR = "debian/serialportassistant"
2828
override_dh_auto_configure:
2929
# See: man dh_auto_configure an debhelper
3030
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}
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+
-DWITH_CMARK=OFF \
38+
-DWITH_CMARK_GFM=OFF ${PARAS}
3839

3940
override_dh_auto_build:
4041
cmake --build $(BUILD_DIR) --config Release --parallel $(nproc)

Script/build_appimage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ cmake "$REPO_ROOT" \
187187
-DCMARK_TESTS=OFF \
188188
-DCMARK_STATIC=ON \
189189
-DWITH_CMARK=OFF \
190-
-DWITH_CMARK_GFM=ON \
190+
-DWITH_CMARK_GFM=OFF \
191191
-DENABLE_UPDATE_TRANSLATIONS=ON \
192192
-DCMAKE_BUILD_TYPE=Release \
193193
-DCMAKE_POLICY_VERSION_MINIMUM=3.5

Script/build_depend.sh

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,14 @@ if [ $BASE_LIBS -eq 1 ]; then
346346
# RabbitCommon dependency
347347
apt install -y -q libcmark-dev cmark
348348
# AppImage
349-
apt install -y -q libfuse-dev libfuse3-dev
349+
case "$DISTRO_VERSION" in
350+
26.*|25.*)
351+
package_install fuse3
352+
;;
353+
*)
354+
package_install fuse
355+
;;
356+
esac
350357
fi
351358

352359
if [ "$PACKAGE_TOOL" = "dnf" ]; then
@@ -360,19 +367,7 @@ if [ $DEFAULT_LIBS -eq 1 ]; then
360367
echo "Install default dependency libraries ......"
361368
if [ "$PACKAGE_TOOL" = "apt" ]; then
362369
if [ "${QT:-0}" -ne 1 ]; then
363-
# Qt6
364-
package_install qmake6 qt6-tools-dev qt6-tools-dev-tools \
365-
qt6-base-dev qt6-base-dev-tools qt6-qpa-plugins \
366-
qt6-svg-dev qt6-l10n-tools qt6-translations-l10n \
367-
qt6-scxml-dev
368-
case "${DISTRO}:${DISTRO_VERSION}" in
369-
ubuntu:26.*|ubuntu:25.*)
370-
package_install qt6-serialport-dev
371-
;;
372-
*)
373-
package_install libqt6serialport6-dev
374-
;;
375-
esac
370+
install_debian_depend $REPO_ROOT
376371
fi
377372
fi
378373
if [ "$PACKAGE_TOOL" = "dnf" ]; then

Script/build_linux.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -491,17 +491,10 @@ if [ $APPIMAGE -eq 1 ]; then
491491
git config --global --add safe.directory $REPO_ROOT
492492
fi
493493

494-
export QT_ROOT=${TOOLS_DIR}/qt_`uname -m`
495-
export Qt6_DIR=$QT_ROOT
496-
export QMAKE=$QT_ROOT/bin/qmake
497-
export PATH=$QT_ROOT/libexec:$PATH
498-
export PKG_CONFIG_PATH=$QT_ROOT/lib/pkgconfig:${INSTALL_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
499-
export LD_LIBRARY_PATH=$QT_ROOT/lib:${INSTALL_DIR}/lib:$LD_LIBRARY_PATH
500-
export QT_PLUGIN_PATH=$QT_ROOT/plugins
501-
export CMAKE_PREFIX_PATH=$QT_ROOT:${INSTALL_DIR}:${CMAKE_PREFIX_PATH}
502494
export RabbitCommon_ROOT=${SOURCE_DIR}/RabbitCommon
503-
export BUILD_FREERDP=ON
504-
apt install -y -q fuse3
495+
export PKG_CONFIG_PATH=${INSTALL_DIR}/${LIB_PATH}/pkgconfig:$PKG_CONFIG_PATH
496+
export LD_LIBRARY_PATH=${INSTALL_DIR}/${LIB_PATH}:$LD_LIBRARY_PATH
497+
export CMAKE_PREFIX_PATH=${INSTALL_DIR}:${CMAKE_PREFIX_PATH}
505498
./build_appimage.sh --install ${INSTALL_DIR} --verbose ${BUILD_VERBOSE}
506499
fi
507500

Script/common.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,13 @@ create_debian_folder() {
321321
control_source="$repo_root/Package/debian/control.deepin.23"
322322
;;
323323
*)
324-
control_source="$repo_root/Package/debian/control.default"
324+
echo_error "Don't support ${DISTRO}:${DISTRO_VERSION}"
325325
;;
326326
esac
327327
if [ -f "$control_source" ]; then
328+
if [ -f $repo_root/debian/control ]; then
329+
rm $repo_root/debian/control
330+
fi
328331
ln -s $control_source $repo_root/debian/control
329332
if [ "$BUILD_VERBOSE" = "ON" ]; then
330333
echo "ln -s $control_source $repo_root/debian/control"

debian

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/SerialPortAssistant/Package/debian

0 commit comments

Comments
 (0)