Skip to content

Conversation

@hysw
Copy link
Collaborator

@hysw hysw commented Nov 27, 2025

No description provided.

@hysw hysw marked this pull request as draft November 27, 2025 23:00
@hysw hysw force-pushed the dpkg branch 4 times, most recently from 85bd214 to ccee0ab Compare November 28, 2025 01:01
- Exclude third_party from all targets.
  - Not having additional install target.
  - Faster build.
- Remove CMAKE_INSTALL_PREFIX from install(...).
  - Now `cmake --install build --prefix install_prefix` works
@hysw hysw force-pushed the dpkg branch 2 times, most recently from eae670e to 27bf71f Compare December 12, 2025 00:00
@hysw hysw marked this pull request as ready for review December 12, 2025 00:01
@hysw
Copy link
Collaborator Author

hysw commented Dec 12, 2025

This is a partial solution to automated linux packaging.


mkdir -p build/package_linux/device
mkdir -p build/package_linux/host
# /home/runner/work/dive/Qt
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# /home/runner/work/dive/Qt

set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/dive-profiler")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, any reason to prefer /opt over the normal /usr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • /usr: there's a filesystem hierarchy, which we don't follow.
  • /opt: it's basically C:\Program Files so cross platform layout is a bit easier

@@ -0,0 +1,56 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider marking this script as executable

mkdir -p build/package_linux/host
# /home/runner/work/dive/Qt
pushd build/package_linux/device
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRY. consider invoking build_android.sh instead to reduce the number of copies and improve maintainability

cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DDIVE_ANDROID_PREBUILT="`pwd`/../device/install" \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-19 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to prefer clang-19?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang - It's default for google c++.
Clang-19 - It's what we are running in CI.

-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-19 \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-19 \
${DIVE_ROOT} || exit 1
cmake --build . --config Release --target all || exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: --target all is the default so specifying it is redundant

Suggested change
cmake --build . --config Release --target all || exit 1
cmake --build . --config Release || exit 1

Comment on lines +470 to +490
- name: Install dependency
run: |
sudo apt-get update --yes
sudo apt-get install --yes cmake ninja-build
sudo apt-get install python3-mako --yes
sudo apt-get install libxcb-glx0-dev
sudo apt-get install qtbase5-dev --yes
- name: Install Qt dependencies (including xcb)
run: |
sudo apt-get update
sudo apt-get install -y libxcb-xinerama0 libxcb-xinerama0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxkbcommon-x11-0 libxcb1 libx11-xcb1
- name: Install dependency
run: |
sudo apt-get install --yes \
cmake clang-19 \
libsystemd-dev \
libbsd-dev \
ninja-build \
python3-mako \
libxcb-glx0-dev
which clang-19
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: All apt-get install invocations could be collapsed into one line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qtbase5-dev probably already pulls in most of the dependencies, just need to figure out which one is still needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants