Skip to content

Commit

Permalink
Updated snap to use core24. This makes it easy to meet the cmake min …
Browse files Browse the repository at this point in the history
…version (3.24) requirement. Easiest is to just upgrade build machine to Ubuntu (or Kubuntu) 24.04 which gets a newer version of snapcraft (8.3.2) that supports core24. Now also fetching a specific version of Tacent in prep for release.
  • Loading branch information
bluescan committed Aug 24, 2024
1 parent 2352a4c commit 39f5b20
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ endif()
FetchContent_Declare(
tacent
GIT_REPOSITORY https://github.com/bluescan/tacent.git
# GIT_TAG e29b6fc040c46bbae7c3a7bd9d5e2de47b83735a
GIT_TAG 3694dff1ad3659f9f0eaea3c145539cda63440e6
# GIT_TAG v0.8.17
FIND_PACKAGE_ARGS NAMES tacent
)
Expand Down
36 changes: 20 additions & 16 deletions Linux/snapcraft/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: tacentview
base: core20
base: core24
# The version is parsed from Version.cmake.h using adopt-info partname.
# version takes a format like: '1.0.11'
adopt-info: tacentview
summary: An immediate mode GUI image viewer.
description: |
An image and texture viewer for tga, png, apng, exr, dds, pvr, ktx, ktx2, astc, pkm, qoi, gif, hdr,
jpg, tif, ico, webp, and bmp files. Uses Dear ImGui and the Tacent library. It displays alpha channels
correctly and can inspect the colour of individual pixels. There is basic editing functionality, batch
resizing, and the ability to generate contact sheets for FX etc.
jpg, tif, ico, webp, and bmp files. Uses Dear ImGui and the Tacent library. Features correct handling
of alpha channels, basic editing, colour quantization, flip-book generation, levels, raw data import,
cropping, scaling/resizing, channel masking, cube/mip-map display, creation of animated images and a
full-featured command-line interface for batch processing.
grade: stable # Use either devel or stable.
confinement: strict # Use either devmode or strict.
architectures:
- build-on: amd64
platforms:
amd64:
# environment:
# LIBGL_DRIVERS_PATH: $SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri
apps:
tacentview:
# environment:
Expand All @@ -27,9 +30,11 @@ apps:
parts:
tacentview:
stage-packages:
- libgl1
- libgl1-mesa-dri
- libglu1-mesa
- libx11-6
# - libglx0
plugin: cmake
source: https://github.com/bluescan/tacentview.git
# Handy for iterating src changes locally.
Expand All @@ -40,27 +45,26 @@ parts:
- -DCMAKE_BUILD_TYPE=Release
- -DPACKAGE_SNAP=True
build-packages:
#- g++10
- clang-12
#- g++13
#- clang-12
- make
- cmake
# - libx11-6
- libx11-dev
override-pull: |
echo OverridePullTacentView
snapcraftctl pull
craftctl default
VER=`grep -o '".*"' Src/Version.cmake.h | sed 's/"//g' | sed 's/[^.0-9]//g' # | sed 's/.*/\"&\"/g'`
echo Parsed version string: $VER
snapcraftctl set-version $VER
craftctl set version=$VER
override-prime: |
echo OverridePrimeTacentView
snapcraftctl prime
craftctl default
cp ../stage/root/parts/tacentview/build/ViewerInstall/tacentview tacentview
mkdir -p Assets
cp ../stage/root/parts/tacentview/build/ViewerInstall/Assets/* Assets/
# override-build: |
# export CC=clang-12
# export CXX=clang++-12
# override-build: |
# export CC=clang-12
# export CXX=clang++-12
after:
- desktop-glib-only

Expand All @@ -74,5 +78,5 @@ parts:
- libglib2.0-bin
override-prime: |
echo OverridePrimeDesktop
snapcraftctl prime
craftctl default
cp ../stage/bin/desktop-launch desktop-launch
2 changes: 1 addition & 1 deletion Src/TacentView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ bool Viewer::SetCurrentImage(const tString& currFilename, bool forceReload)
if (!currFilename.IsEmpty())
tPrintf("Could not display [%s].\n", tSystem::tGetFileName(currFilename).Chr());
if (CurrImage && !CurrImage->Filename.IsEmpty())
tPrintf("Displaying [%s] instead.\n", tSystem::tGetFileName(CurrImage->Filename).Chr());
tPrintf("First image [%s].\n", tSystem::tGetFileName(CurrImage->Filename).Chr());
}

if (CurrImage)
Expand Down

0 comments on commit 39f5b20

Please sign in to comment.