-
Notifications
You must be signed in to change notification settings - Fork 12
Debian packaging #609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Debian packaging #609
Conversation
85bd214 to
ccee0ab
Compare
- 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
eae670e to
27bf71f
Compare
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # /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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -0,0 +1,56 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
| cmake --build . --config Release --target all || exit 1 | |
| cmake --build . --config Release || exit 1 |
| - 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
No description provided.