Skip to content

Commit

Permalink
Script: add --deploy-deps-only=${INSTALL_APP_DIR}/plugins/Client in b…
Browse files Browse the repository at this point in the history
…uild_appimage.sh
  • Loading branch information
KangLin committed Feb 21, 2025
1 parent 6e9bada commit 6c889e5
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-installed
with:
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
BUILD_TYPE: [Release]
qt_arch: [android_arm64_v8a, android_x86_64]
qt_version: [6.8.2]
qt_version: [6.9.0]
include:
- qt_arch: android_arm64_v8a
VCPKG_TARGET_TRIPLET: arm64-android
Expand All @@ -33,7 +33,7 @@ jobs:

env:
RabbitRemoteControl_VERSION: v0.0.32
VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2
VCPKGGITCOMMITID: d5ec528843d29e3a52d745a64b469f810b2cedbf
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
sudo apt install -y -q ninja-build nasm
- name: Cache installed
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-installed
with:
path: |
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Install Qt of linux_gcc_64
uses: jurplel/install-qt-action@v4
if: ${{ matrix.qt_version == '6.8.2' }}
if: ${{ matrix.qt_version == '6.9.0' }}
with:
dir: '${{env.TOOLS_DIR}}/qt' # optional
version: '${{matrix.qt_version}}'
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ jobs:
strategy:
matrix:
BUILD_TYPE: [Release]
qt_version: [6.8.2]
os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04-arm]
qt_version: [6.9.0]
os: [ubuntu-24.04, ubuntu-24.04-arm]
include:
- os: ubuntu-24.04
qt_arch: "linux_gcc_64"
- os: ubuntu-24.04-arm
qt_arch: "linux_gcc_arm64"
- os: ubuntu-22.04-arm
qt_arch: "linux_gcc_arm64"

# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
# 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)
Expand All @@ -37,9 +35,9 @@ jobs:
BUILD_DIR: ${{github.workspace}}/build
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOLS_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}
RabbitRemoteControl_VERSION: v0.0.32
artifact_name: build_appimage_${{matrix.os}}
artifact_name: build_appimage
qt_modules: 'qtscxml qtmultimedia qtimageformats qtserialport qt5compat'

# Map the job outputs to step outputs
Expand All @@ -60,13 +58,14 @@ jobs:
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
${{env.TOOLS_DIR}}/linuxdeploy-*
key: install_ubuntu
${{env.TOOLS_DIR}}/qt_*
key: install_appimage

- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand All @@ -81,12 +80,10 @@ jobs:
--source ${{env.SOURCE_DIR}} \
--tools ${{env.TOOLS_DIR}} \
--build ${{env.BUILD_DIR}}
if [ "ubuntu-22.04-arm" != ${{matrix.os}} ]; then
sudo apt install -y -q qt6-5compat-dev
fi
- name: Install Qt
uses: jurplel/install-qt-action@v3
#if: false
with:
dir: '${{env.TOOLS_DIR}}/qt'
version: ${{matrix.qt_version}}
Expand All @@ -97,7 +94,6 @@ jobs:
cache: true
cache-key-prefix: cached-qt_${{matrix.qt_arch}}


- name: build appimage
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
Expand All @@ -113,8 +109,11 @@ jobs:
BUILD_FREERDP: ON
PcapPlusPlus_DIR: ${{env.INSTALL_DIR}}/lib/cmake/pcapplusplus
run: |
#export QMAKE=$QT_ROOT_DIR/bin/qmake6
export QMAKE=$Qt6_DIR/bin/qmake6
export QMAKE=$QT_ROOT_DIR/bin/qmake6
#export QT_ROOT=${{env.TOOLS_DIR}}/qt_`uname -m`
#export Qt6_DIR=$QT_ROOT
#export QMAKE=$QT_ROOT/bin/qmake
#export LD_LIBRARY_PATH=$QT_ROOT/lib
${{github.workspace}}/Script/build_appimage.sh
md5sum RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage > RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage.md5sum
Expand Down Expand Up @@ -142,7 +141,7 @@ jobs:
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
name: ${{ env.artifact_name }}_${{matrix.os}}
path: |
${{github.workspace}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_*.AppImage
${{github.workspace}}/update_appimage_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json
12 changes: 6 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: [Release, Debug]
qt_version: [6.8.2, 5.15.2, 5.12.12]
qt_version: [6.9.0, 5.15.2, 5.12.12]
qt_arch: [clang_64]
VCPKG_TARGET_TRIPLET: [x64-osx]
include:
- qt_version: 6.8.2
- qt_version: 6.9.0
qt_modules: qtscxml qtmultimedia qtserialport qt5compat

- qt_version: 5.15.2
Expand All @@ -41,7 +41,7 @@ jobs:
TOOLS_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install
qt_modules: ${{matrix.qt_modules}}
VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2
VCPKGGITCOMMITID: d5ec528843d29e3a52d745a64b469f810b2cedbf
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_MANIFEST_FEATURES: "freerdp;vnc;wol"
Expand All @@ -67,7 +67,7 @@ jobs:
cmake -E make_directory ${{env.INSTALL_DIR}}_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}
- name: Cache installed
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-installed
with:
path: |
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
7z a RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip ./install/*
- name: Update configure file
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }}
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }}
working-directory: ${{github.workspace}}/build
run: |
${{env.SOURCE_DIR}}/RabbitCommon/Install/GenerateJsonFile.sh \
Expand All @@ -301,7 +301,7 @@ jobs:
"https://github.com/KangLin/RabbitRemoteControl/releases/download/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip;https://sourceforge.net/projects/rabbitRabbitRemoteControl/files/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip"
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }}
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-installed
with:
path: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
strategy:
matrix:
BUILD_TYPE: [Release, Debug]
qt_version: [6.8.1, 5.15.2, 5.12.12]
qt_version: [6.9.0, 5.15.2, 5.12.12]
include:
- qt_version: 6.8.1
- qt_version: 6.9.0
qt_arch: win64_msvc2022_64
qt_modules: qtscxml qtmultimedia qtimageformats qtserialport qt5compat
CMAKE_GENERATOR_PLATFORM: x64
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
SOURCE_DIR: ${{github.workspace}}\.cache\source
TOOLS_DIR: ${{github.workspace}}\.cache\tools
INSTALL_DIR: ${{github.workspace}}\.cache\install
VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2
VCPKGGITCOMMITID: d5ec528843d29e3a52d745a64b469f810b2cedbf
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-installed
with:
path: |
Expand Down Expand Up @@ -313,7 +313,7 @@ jobs:
run: git clone https://github.com/KangLin/RabbitCommon.git

- name: Build RabbitRemoteControl with cmake preset
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' && startsWith(github.ref, 'refs/heads/master')}}
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' && startsWith(github.ref, 'refs/heads/master')}}
working-directory: ${{github.workspace}}
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:
${{github.workspace}}\build\update_msvc_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json
- name: Update artifact update_windows.xml
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' }}
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}_xml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
TOOLS_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.BUILD_TYPE}}
RabbitRemoteControl_VERSION: 0.0.32
artifact_name: build_${{matrix.os}}
artifact_name: build_ubuntu

# Map the job outputs to step outputs
outputs:
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-installed
with:
path: |
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
name: ${{ env.artifact_name }}_${{matrix.os}}
path: |
${{github.workspace}}/rabbitremotecontrol_*.deb
${{github.workspace}}/update_ubuntu.json
Expand Down
18 changes: 15 additions & 3 deletions Script/build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ fi
pushd "${TOOLS_DIR}"
if [ ! -f linuxdeploy-`uname -m`.AppImage ]; then
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-`uname -m`.AppImage
chmod u+x linuxdeploy-`uname -m`.AppImage
chmod u+x linuxdeploy-`uname -m`.AppImage
fi
if [ ! -f linuxdeploy-plugin-qt-`uname -m`.AppImage ]; then
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-`uname -m`.AppImage
chmod u+x linuxdeploy-plugin-qt-`uname -m`.AppImage
fi
popd

echo "Compile RabbitRemoteControl ......"
INSTALL_APP_DIR=AppDir/usr
cmake "$REPO_ROOT" \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand All @@ -94,14 +95,25 @@ cmake --install . --config Release --component Runtime --prefix ${INSTALL_APP_DI
cmake --install . --config Release --component Application --prefix ${INSTALL_APP_DIR}
cmake --install . --config Release --component Plugin --prefix ${INSTALL_APP_DIR}

echo "Build AppImage ......"
# See: https://github.com/linuxdeploy/linuxdeploy-plugin-qt
#export QMAKE=$Qt6_DIR/bin/qmake6
export EXTRA_PLATFORM_PLUGINS="libqxcb.so"
# Icons from theme are not displayed in QtWidgets Application: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/17
export EXTRA_QT_MODULES="svg"
${TOOLS_DIR}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir -v0 \
echo "QT_ROOT: $QT_ROOT"
echo "Qt6_DIR: $Qt6_DIR"
echo "QMAKE: $QMAKE"
echo "EXTRA_PLATFORM_PLUGINS: $EXTRA_PLATFORM_PLUGINS"
echo "EXTRA_QT_MODULES: $EXTRA_QT_MODULES"
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
echo "QT_PLUGIN_PATH: $QT_PLUGIN_PATH"
echo "PATH: $PATH"
$QMAKE --version
${TOOLS_DIR}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir \
--plugin qt \
--output appimage
--output appimage \
--deploy-deps-only=${INSTALL_APP_DIR}/plugins/Client

chmod a+x Rabbit_Remote_Control-`uname -m`.AppImage

Expand Down
36 changes: 21 additions & 15 deletions Script/build_depend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ APT_UPDATE=0
BASE_LIBS=0
DEFAULT_LIBS=0
QT=0
QT_VERSION=6.9.0
FREERDP=0
TIGERVNC=0
PCAPPLUSPLUS=0
Expand All @@ -19,7 +20,7 @@ libdatachannel=0
QtService=0

usage_long() {
echo "$0 [--install=<install directory>] [--source=<source directory>] [--tools=<tools directory>] [--build=<build directory>] [--apt=<'lib1 lib2 ...'>] [--apt_update=[0|1]] [--base[=0|1]] [--default[=0|1]] [--qt[=0|1]] [--rabbitcommon[=0|1]] [--freerdp[=0|1]] [--tigervnc[=0|1]] [--pcapplusplus[=0|1]] [--libdatachannel=[0|1]] [--QtService[0|1]]"
echo "$0 [--install=<install directory>] [--source=<source directory>] [--tools=<tools directory>] [--build=<build directory>] [--apt=<'lib1 lib2 ...'>] [--apt_update=[0|1]] [--base[=0|1]] [--default[=0|1]] [--qt[=0|1|version]] [--rabbitcommon[=0|1]] [--freerdp[=0|1]] [--tigervnc[=0|1]] [--pcapplusplus[=0|1]] [--libdatachannel=[0|1]] [--QtService[0|1]]"
echo "Directory:"
echo " --install: Set install directory"
echo " --source: Set source directory"
Expand Down Expand Up @@ -137,8 +138,12 @@ if command -V getopt >/dev/null; then
case $2 in
"")
QT=1;;
1 | 0)
QT=$2
;;
*)
QT=$2;;
QT=1
QT_VERSION=$2;;
esac
shift 2
;;
Expand Down Expand Up @@ -321,7 +326,7 @@ if [ $BASE_LIBS -eq 1 ]; then
# FFmpeg
apt install -y -q libavcodec-dev libavformat-dev libresample1-dev libswscale-dev
# AppImage
apt install -y -q fuse
#apt install -y -q libfuse-dev libfuse3-dev
# Other
apt install -y -q libvncserver-dev
fi
Expand All @@ -339,17 +344,18 @@ fi
if [ $QT -eq 1 ]; then
echo "Install qt ......"
pushd "$TOOLS_DIR"
# See: https://ddalcino.github.io/aqt-list-server/
apt install -y -q python3-pip python3-pip-whl python3-pipdeptree cpio
#pip install -U pip
pip install aqtinstall
export QTVERSION=6.8.2
if [ "`uname -m`" == "x86_64" ]; then
aqt install-qt linux desktop ${QTVERSION} linux_gcc_64 -m qt5compat qtgraphs qtimageformats qtmultimedia qtscxml qtserialport
mv ${QTVERSION}/gcc_64 qt
elif [ "`uname -m`" == "aarch64" ]; then
aqt install-qt linux_arm64 desktop ${QTVERSION} linux_gcc_arm64 -m qt5compat qtgraphs qtimageformats qtmultimedia qtscxml qtserialport
mv ${QTVERSION}/gcc_arm64 qt
if [ ! -d qt_`uname -m` ]; then
# See: https://ddalcino.github.io/aqt-list-server/
apt install -y -q python3-pip python3-pip-whl python3-pipdeptree cpio
#pip install -U pip
pip install aqtinstall
if [ "`uname -m`" == "x86_64" ]; then
aqt install-qt linux desktop ${QT_VERSION} linux_gcc_64 -m qtscxml qtmultimedia qtimageformats qtserialport qt5compat
mv ${QT_VERSION}/gcc_64 qt_`uname -m`
elif [ "`uname -m`" == "aarch64" ]; then
aqt install-qt linux_arm64 desktop ${QT_VERSION} linux_gcc_arm64 -m qtscxml qtmultimedia qtimageformats qtserialport qt5compat
mv ${QT_VERSION}/gcc_arm64 qt_`uname -m`
fi
fi
popd
fi
Expand All @@ -366,7 +372,7 @@ if [ $FREERDP -eq 1 ]; then
echo "Install FreeRDP ......"
pushd "$SOURCE_DIR"
if [ ! -d ${INSTALL_DIR}/lib/cmake/FreeRDP3 ]; then
git clone -b 3.11.1 https://github.com/FreeRDP/FreeRDP.git
git clone -b 3.12.0 https://github.com/FreeRDP/FreeRDP.git
cd FreeRDP
git submodule update --init --recursive
cmake -E make_directory build
Expand Down
Loading

0 comments on commit 6c889e5

Please sign in to comment.