gui: introduce ui element for dpi scale factor #322
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nightly packages | |
# based on the same for darktable-org/darktable | |
# i suppose that makes it GPLv3. | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
AppImage: | |
if: github.repository == 'hanatos/vkdt' | |
name: nightly appimage | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
glfw: | |
- { package: pentablet } | |
- { package: glfw3.4 } | |
raw: | |
- { backend: rawler } | |
- { backend: rawspeed } | |
compiler: | |
- { compiler: clang, CC: clang-17, CXX: clang++-17, packages: clang-17 libomp-17-dev } | |
env: | |
CC: ${{ matrix.compiler.CC }} | |
CXX: ${{ matrix.compiler.CXX }} | |
VKDT_CLI: ${{ github.workspace }}/AppDir/usr/bin/vkdt-cli | |
BRANCH: master | |
GLFW: ${{ matrix.glfw.package }} | |
RAW: ${{ matrix.raw.backend }} | |
steps: | |
- name: update apt and install clang | |
run: | | |
# Remove azure mirror because it is unreliable and sometimes unpredictably leads to failed CI | |
sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | |
sudo add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-17 main" | |
sudo apt-get update | |
sudo apt-get -y install \ | |
${{ matrix.compiler.packages }} | |
- name: install base dependencies | |
run: | | |
sudo apt-get -y install \ | |
build-essential \ | |
appstream-util \ | |
git \ | |
glslang-tools \ | |
libvulkan-dev \ | |
libjpeg-dev \ | |
zlib1g-dev \ | |
libasound2-dev \ | |
libavformat-dev \ | |
libavcodec-dev \ | |
libxkbcommon-dev \ | |
libxinerama-dev \ | |
libxcursor-dev \ | |
libxi-dev \ | |
libfuse2 \ | |
appstream; | |
- name: install extra deps for rawler | |
if: matrix.raw.backend == 'rawler' | |
run: | | |
sudo apt-get -y install \ | |
rustc \ | |
cargo | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
- name: install extra deps for rawspeed | |
if: matrix.raw.backend == 'rawspeed' | |
run: | | |
sudo apt-get -y install \ | |
libpugixml-dev \ | |
libexiv2-dev | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.BRANCH }} | |
# We have to fetch the entire history to correctly generate the version for the AppImage filename | |
fetch-depth: 0 | |
- name: configure for local glfw | |
run: | | |
echo "VKDT_GLFW_CFLAGS=-I${{ github.workspace }}/glfw/include" >> bin/config.mk | |
echo "VKDT_GLFW_LDFLAGS=-I${{ github.workspace }}/glfw/build/src -lglfw3" >> bin/config.mk | |
echo "export VKDT_GLFW_CFLAGS VKDT_GLFW_LDFLAGS" >> bin/config.mk | |
- name: build new glfw without pentablet support | |
if: matrix.glfw.package != 'pentablet' | |
run: | | |
sudo apt-get -y install libglfw3-dev libxrandr-dev | |
git clone --branch master https://github.com/glfw/glfw glfw | |
cd glfw | |
git checkout 3.4 | |
cmake -S . -B build -DGLFW_BUILD_WAYLAND=1 -DGLFW_BUILD_X11=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | |
cmake --build build | |
sudo cmake --install build | |
cd .. | |
- name: build glfw with pentablet support | |
if: matrix.glfw.package == 'pentablet' | |
run: | | |
sudo apt-get -y install libglfw3-dev libxrandr-dev | |
git clone --branch master --depth 1 https://github.com/hanatos/glfw glfw | |
cd glfw | |
cmake -S . -B build -DGLFW_BUILD_WAYLAND=1 -DGLFW_BUILD_X11=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | |
cmake --build build | |
sudo cmake --install build | |
cd .. | |
echo "VKDT_USE_PENTABLET=1" >> bin/config.mk | |
echo "export VKDT_USE_PENTABLET" >> bin/config.mk | |
- name: update config.mk for rawspeed | |
if: matrix.raw.backend == 'rawspeed' | |
run: | | |
cat >> bin/config.mk << 'EOF' | |
VKDT_USE_RAWINPUT=1 | |
export VKDT_USE_RAWINPUT | |
VKDT_PUGIXML_CFLAGS=$(eval VKDT_PUGIXML_CFLAGS := $$(shell pkg-config --cflags pugixml))$(VKDT_PUGIXML_CFLAGS) | |
VKDT_PUGIXML_LDFLAGS=$(eval VKDT_PUGIXML_LDFLAGS := $$(shell pkg-config --libs pugixml))$(VKDT_PUGIXML_LDFLAGS) | |
export VKDT_PUGIXML_CFLAGS VKDT_PUGIXML_LDFLAGS | |
VKDT_USE_EXIV2=1 | |
export VKDT_USE_EXIV2 | |
VKDT_EXIV2_CFLAGS=$(eval VKDT_EXIV2_CFLAGS := $$(shell pkg-config --cflags exiv2))$(VKDT_EXIV2_CFLAGS) | |
VKDT_EXIV2_LDFLAGS=$(eval VKDT_EXIV2_LDFLAGS := $$(shell pkg-config --libs exiv2))$(VKDT_EXIV2_LDFLAGS) | |
export VKDT_EXIV2_CFLAGS VKDT_EXIV2_LDFLAGS | |
CC=clang-17 | |
CXX=clang++-17 | |
export CC CXX | |
EOF | |
- name: build and install | |
run: | | |
bash bin/mkappimg.sh | |
mv vkdt-*.AppImage $(echo vkdt-*.AppImage | sed "s/vkdt-/vkdt-${{ env.RAW }}-${{ env.GLFW }}-/") | |
- name: check if it runs | |
run: | | |
./vkdt-*.AppImage --version | |
# *sigh* we'd like to do this but the github runners don't have a gpu: | |
# sudo apt-get -y remove \ | |
# git \ | |
# glslang-tools \ | |
# libvulkan-dev \ | |
# libjpeg-dev \ | |
# libglfw3-dev \ | |
# zlib1g-dev \ | |
# libpugixml-dev \ | |
# libfreetype-dev \ | |
# libexiv2-dev \ | |
# libasound2-dev \ | |
# libavformat-dev \ | |
# libavcodec-dev \ | |
# libxkbcommon-dev \ | |
# libxinerama-dev \ | |
# libxcursor-dev \ | |
# libxi-dev | |
# ./vkdt-*.AppImage cli -g bin/examples/spheres.cfg --config frames:1 | |
- name: package upload | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
path: vkdt-*.AppImage* | |
name: artifact-appimage-${{ env.RAW }}-${{ env.GLFW }} | |
retention-days: 1 | |
WindowsRawler: | |
if: github.repository == 'hanatos/vkdt' | |
name: nightly vkdt windows with rawler backend | |
runs-on: windows-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
msystem: | |
- UCRT64 | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
SRC_DIR: ${{ github.workspace }}/src | |
INSTALL_PREFIX: ${{ github.workspace }}/install | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.msystem }} | |
install: >- | |
git | |
rsync | |
make | |
zip | |
unzip | |
wget | |
vim | |
pacboy: >- | |
cc:p | |
gcc-libs:p | |
dlfcn:p | |
glfw:p | |
freetype:p | |
ffmpeg:p | |
vulkan-devel:p | |
glslang:p | |
libjpeg-turbo:p | |
zlib:p | |
omp:p | |
cmake:p | |
pugixml:p | |
update: false | |
- run: git config --global core.autocrlf input | |
shell: bash | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
path: src | |
- name: install rust | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
- name: install rust for msys2 | |
run: | | |
/c/Users/runneradmin/.cargo/bin/rustup toolchain install stable-x86_64-pc-windows-gnu | |
/c/Users/runneradmin/.cargo/bin/rustup default stable-x86_64-pc-windows-gnu | |
- name: build and install | |
run: | | |
export PATH=/c/Users/runneradmin/.cargo/bin/:$PATH | |
echo "VKDT_USE_RAWINPUT=2" >> ${SRC_DIR}/bin/config.mk | |
echo "export VKDT_USE_RAWINPUT" >> ${SRC_DIR}/bin/config.mk | |
echo "VKDT_USE_EXIV2=0" >> ${SRC_DIR}/bin/config.mk | |
echo "export VKDT_USE_EXIV2" >> ${SRC_DIR}/bin/config.mk | |
make -C ${SRC_DIR} | |
make DESTDIR=${INSTALL_PREFIX} -C ${SRC_DIR} install | |
- name: bundle exiftool | |
run: | | |
wget https://exiftool.org/exiftool-12.76.zip | |
unzip exiftool-12.76.zip | |
mv exiftool*exe ${INSTALL_PREFIX}/usr/lib/vkdt/exiftool.exe | |
- name: check if it runs | |
run: | | |
${INSTALL_PREFIX}/usr/lib/vkdt/vkdt.exe --version | |
- name: get version info | |
run: | | |
cd ${SRC_DIR} | |
echo "VERSION=$(git describe)" >> $GITHUB_ENV | |
([[ ${MSYSTEM_CARCH} == x86_64 ]] && echo "SYSTEM=win64" || echo "SYSTEM=woa64") >> $GITHUB_ENV | |
- name: create zip package | |
run: | | |
cd ${INSTALL_PREFIX}/usr/lib | |
# find and copy required libraries | |
ldd vkdt/vkdt.exe | grep '/ucrt64/bin/' | awk '{print($1)}' > dllhell | |
find vkdt/ -name "*lib*.so" -exec ldd {} \; | grep '/ucrt64/bin/' | awk '{print($1)}' | sort | uniq >> dllhell | |
for i in $(cat dllhell); do cp /ucrt64/bin/${i} vkdt/; done | |
zip -r vkdt-rawler-${{ env.VERSION }}-${{ env.SYSTEM }}.zip vkdt/ | |
- name: package upload | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.INSTALL_PREFIX}}/usr/lib/vkdt-rawler-${{ env.VERSION }}-${{ env.SYSTEM }}.zip | |
name: artifact-windows-rawler | |
retention-days: 1 | |
upload_to_release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: [AppImage, WindowsRawler] | |
steps: | |
- name: download artifacts | |
uses: actions/download-artifact@v4 | |
- name: update nightly release | |
uses: andelf/nightly-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: nightly | |
prerelease: true | |
name: 'vkdt nightly build $$' | |
body: | | |
this is an automated nightly build of vkdt. | |
it may contain pre-release quality features, use with care :) | |
appimage | |
=================================================== | |
the appimage compiles in a lot of features | |
(mlv, v4l, asound, i-vid, o-vid, exiv2, freetype) | |
but not all | |
(no quake). | |
you also currently need the `exiftool` binary installed on your | |
host system to enable all features (metadata handling). | |
appimage with rawler | |
==================== | |
use this for CR3 raws (newer canon cameras) and for older ubuntu | |
that don't have a recent libstdc++, uses the rust-based backend | |
instead of the c++-based rawspeed which does not have CR3 support. | |
also it builds a custom glfw with pentablet/wacom support | |
appimage with rawspeed | |
====================== | |
these are currently temporarily disabled due to some dynaming linking error | |
when running the appimage. | |
appimage with pentablet | |
======================= | |
links against a custom version of glfw, enabling drawing of masks via pentablet/wacom device. | |
only available in xorg version currently. | |
windows with rawler | |
=================== | |
the windows version is pre-alpha and has known issues, see https://github.com/hanatos/vkdt/issues/103 . | |
it compiles less features | |
(freetype mlv, i-vid, o-vid) | |
and leaves out many | |
(no v4l, no sound, no quake, no pentablet support). | |
you can help by reporting more issues (or maybe even fixing, if you can ;) ). | |
files: | | |
artifact-appimage-rawler-glfw3.4/* | |
artifact-appimage-rawler-pentablet/* | |
artifact-windows-rawler/* |