Skip to content

Commit

Permalink
Merge branch 'master' into msvc-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Afforix committed Dec 15, 2024
2 parents 38dbd10 + 546b95f commit 8e2c583
Show file tree
Hide file tree
Showing 119 changed files with 1,912 additions and 2,202 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
sudo apt -qq update
sudo apt install -y ${{ matrix.pkgs }} texlive-binaries texlive-metapost libproj-dev libshp-dev survex imagemagick ghostscript ninja-build clang-tidy gettext libfmt-dev
- name: install additional texlive languages
if: matrix.toolchain == 'clang-sanitizers.cmake'
if: matrix.os == 'ubuntu-24.04'
run: sudo apt install -y texlive-lang-czechslovak texlive-lang-cyrillic
- name: Configure CMake
run: |
Expand All @@ -31,10 +31,10 @@ jobs:
- run: cmake --build build
- run: cmake --build build -t test
- name: Run samples
if: matrix.toolchain == 'clang-sanitizers.cmake'
run: cmake --build build -t samples-verify-crc
if: matrix.os == 'ubuntu-24.04'
run: cmake --build build -t samples-verify-crc -- -j 4
- uses: actions/upload-artifact@v4
if: matrix.toolchain == 'clang-sanitizers.cmake' && always()
if: matrix.os == 'ubuntu-24.04' && always()
with:
name: samples-${{ matrix.os }}-${{ matrix.toolchain }}
path: build/samples/
Expand All @@ -45,15 +45,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14]
os: [macos-13, macos-14, macos-15]
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print
brew unlink python && brew link --overwrite python
brew update # try to comment out in case of package problems
brew install wxwidgets vtk proj xquartz ninja basictex fmt catch2
brew install wxwidgets vtk proj xquartz ninja basictex fmt catch2 imagemagick
- name: Configure CMake
run: |
mkdir build && cd build && cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/sanitizers.cmake -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DOPENGL_gl_LIBRARY:FILEPATH=/opt/X11/lib/libGL.dylib -DOPENGL_glu_LIBRARY:FILEPATH=/opt/X11/lib/libGLU.dylib -DBUILD_THBOOK=OFF ..
Expand All @@ -65,7 +65,7 @@ jobs:
sudo tlmgr update --self
sudo tlmgr install collection-langcyrillic
sudo tlmgr install collection-langczechslovak
cmake --build build -t samples-build
cmake --build build -t samples-verify-crc -- -j 4
- uses: actions/upload-artifact@v4
if: always()
with:
Expand All @@ -79,7 +79,7 @@ jobs:
strategy:
matrix:
config:
- { msystem: MINGW64, arch: x86_64, args: "-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror" }
- { msystem: UCRT64, arch: ucrt-x86_64, args: "" }
- { msystem: CLANG64, arch: clang-x86_64, args: "-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/sanitizers.cmake -DENABLE_PROJ_CMAKE=ON" }
defaults:
run:
Expand All @@ -94,15 +94,16 @@ jobs:
msystem: ${{ matrix.config.msystem }}
update: true
install: make git python mingw-w64-${{ matrix.config.arch }}-freetype mingw-w64-${{ matrix.config.arch }}-cmake mingw-w64-${{ matrix.config.arch }}-proj mingw-w64-${{ matrix.config.arch }}-shapelib mingw-w64-${{ matrix.config.arch }}-vtk mingw-w64-${{ matrix.config.arch }}-wxWidgets3.2 mingw-w64-${{ matrix.config.arch }}-gcc mingw-w64-${{ matrix.config.arch }}-make mingw-w64-${{ matrix.config.arch }}-bwidget mingw-w64-${{ matrix.config.arch }}-fmt mingw-w64-${{ matrix.config.arch }}-catch
- run: mkdir build && cd build && cmake -G "MSYS Makefiles" -DBUILD_THBOOK=OFF ${{ matrix.config.args }} ..
- run: mkdir build && cd build && cmake -G "MSYS Makefiles" -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_THBOOK=OFF ${{ matrix.config.args }} ..
- run: cmake --build build -t therion loch utest -- -j 4
- name: Build samples
- name: Set up the batteries
run: |
mkdir -p $HOME/.therion
echo -e "mpost-path ${THDIR}/therion-batteries/bin/windows/mpost.exe\npdftex-path ${THDIR}/therion-batteries/bin/windows/pdftex.exe\nidentify-path ${THDIR}/therion-batteries/bin/identify.exe\nconvert-path ${THDIR}/therion-batteries/bin/convert.exe\n" > $HOME/.therion/therion.ini
wget -qO - https://github.com/therion/therion-batteries/archive/master.tar.gz | tar -xzf - && mv therion-batteries-master ../therion-batteries
mkdir -p ../proj-lib && cp -r ../therion-batteries/_proj/{proj-$(awk -F "=" '/version/{print $2}' build/innosetup.ini),proj-datumgrid}/. ../proj-lib
cmake --build build -t samples-build -- -j 4
- run: cmake --build build -t test
- run: cmake --build build -t samples-verify-crc -- -j 4
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
matrix:
config:
- { msystem: MINGW64, arch: x86_64 }
- { msystem: UCRT64, arch: ucrt-x86_64 }
defaults:
run:
shell: msys2 {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/make.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
make tests
sudo make install
./therion --print-symbols
- name: make samples
run: make samples
# - name: make samples
# run: make samples
# mac:
# runs-on: macos-latest
# steps:
Expand Down
78 changes: 77 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,81 @@
Therion 6.2.2 (in progress):
Therion 6.3.2 (in progress):

therion:
* bugs fixed:
- Proj can't find files in the user-writable directory on Windows

Windows installer:
* fixed shortcuts to thbook.pdf and CHANGES.txt

--------------------------------------------------------------------------------

Therion 6.3.1 (2024-11-22):

xtherion:
* revert the change introduced in 6.3.0 to allow spaces in the thconfig
filename [#590] to fix file opening issues on Windows

--------------------------------------------------------------------------------

Therion 6.3.0 (2024-11-20):

therion:
* REMOVED proj-auto initialization file option;
remove it from your ini files if you use it
* support for Geospatial PDF maps added (custom georeferencing used in versions
5.3-6.2.1 is not included in PDF maps any more)
* new layout option: geospatial on/off
* projection (*.prj) files associated with shapefiles are generated by Proj
for all output projections;
it's not possible to specify them in thcsdata.tcl any more
* use precise grid transformation for built-in OSGB:XY coordinate systems
* import splays from 3d files [#599]
* new 'require <version>' command [#598]
* thbook updates
* REMOVED Proj v4 and v5 compatibility; minimum supported Proj version is 6.3.1
* updated Survex img library [#567]
* old MetaPost output to PDF conversion functions removed from sources
(they were unused since 6.0.0 release)
* bug fixes:
- fix symbol-hide special (scale-bar|north-arrow) in XHTML output [#558]
- fix order of layout copy commands [#563]
- don't reset symbol-hide with symbol-set [#561]
- improve th2 export [#573, #588]
- import .3d shots with their correct survey name [#585]
- KML entrance label: comment or name [#574]
- fix import filter: exclude filtered stations [#583]
- fix NaN coordinates if Z is undefined in Proj 9.2.0+
- fix thcsdata.cxx generation
- fix PROJ_LIB path handling
- use linux line-ends in text outputs (TXT, SVG, HTML, XHTML, KML, SQL, CSV,
XVI, TH2, PLT, VRML, 3DMF, BBOX) to ensure cross-platform uniformity
- various smaller fixes [#559, #586]
* code refactoring [#576, #579, #580] and cleanup

xtherion:
* remove check for Img package [#566]
* allow space in thconfig filename [#590]

loch:
* bug fixes:
- fix missing surface texture on Windows [#587] (thanks to switching to ucrt)

Windows installer:
* build environment changed from MSYS2/mingw64 to a more modern MSYS2/ucrt64;
for Windows 7 and 8 users this may require to install UCRT libraries
(https://learn.microsoft.com/en-us/cpp/windows/universal-crt-deployment)
to run Therion, unless already installed by system updates

infrastructure:
* CI environments fixes and updates [#568, #575, #578, #589, #593]
* Windows CI: run unit tests; verify samples; enforce warnings [#600]
* drop make workflows on MacOSX and Windows CI
* Makefile fixes for fmtlib and VTK
* updates in test_proj.sh testing script
* Catch2 testing suite fixes [#595] and updates
* add SVG and XHTML samples; make sure that Proj needs proj.db in samples

Thanks to Matěj Plch and Thomas Holder for many contributions to this release.

--------------------------------------------------------------------------------

Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,10 @@ if (BUILD_THERION)
COMPONENT th-runtime)

# unit tests
add_executable(utest utest-proj.cxx utest-icase.cxx utest-thdouble.cxx)
add_executable(utest utest-main.cxx utest-proj.cxx utest-icase.cxx utest-thdouble.cxx)
target_link_libraries(utest PUBLIC therion-common catch2-interface)
enable_testing()
if (NOT WIN32)
add_test(NAME utest COMMAND $<TARGET_FILE:utest> WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endif()
add_test(NAME utest COMMAND $<TARGET_FILE:utest> WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

# updates thlibrarydata.cxx
add_custom_target(library
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ https://therion.speleo.sk/wiki/doku.php

Web page: https://therion.speleo.sk

Copyright (c) 1999–2021 Stacho Mudrak, Martin Budaj
Copyright (c) 1999–2024 Stacho Mudrak, Martin Budaj

Distributed free under the GNU General Public License
9 changes: 3 additions & 6 deletions cmake/Catch2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ add_library(catch2-interface INTERFACE)

if (USE_BUNDLED_CATCH2)
target_include_directories(catch2-interface INTERFACE ${CMAKE_SOURCE_DIR}/extern)
target_sources(catch2-interface INTERFACE ${CMAKE_SOURCE_DIR}/utest-main.cxx)
return()
endif()

find_package(Catch2 REQUIRED)
if (Catch2_VERSION_MAJOR LESS 3)
target_link_libraries(catch2-interface INTERFACE Catch2::Catch2)
target_sources(catch2-interface INTERFACE ${CMAKE_SOURCE_DIR}/utest-main.cxx)
else()
target_link_libraries(catch2-interface INTERFACE Catch2::Catch2WithMain)

target_link_libraries(catch2-interface INTERFACE Catch2::Catch2)
if (Catch2_VERSION_MAJOR GREATER_EQUAL 3)
target_compile_definitions(catch2-interface INTERFACE CATCH2_V3)
endif()
15 changes: 9 additions & 6 deletions cmake/Deploy.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Find all DLL dependencies to deploy on Windows.
include(GetPrerequisites)
get_prerequisites(${THERION} DLLS 1 1 "" "")
get_prerequisites(${LOCH} DLLS 1 1 "" "")
file(GET_RUNTIME_DEPENDENCIES
EXECUTABLES ${THERION} ${LOCH}
RESOLVED_DEPENDENCIES_VAR DLLS
PRE_EXCLUDE_REGEXES "^api-ms-" "^ext-ms-"
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"
DIRECTORIES $ENV{PATH}
)

file(MAKE_DIRECTORY ${DLLS_DIR})

foreach(DLL ${DLLS})
gp_resolve_item("" ${DLL} "" "" RESOLVED)
message("Copying dependency: ${RESOLVED}")
file(COPY ${RESOLVED} DESTINATION ${DLLS_DIR})
message("Copying dependency: ${DLL}")
file(COPY ${DLL} DESTINATION ${DLLS_DIR})
endforeach()
4 changes: 2 additions & 2 deletions cmake/PROJ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ endif()

string(FIND ${PROJ_VERSION} "." MVER_SEP)
string(SUBSTRING ${PROJ_VERSION} 0 ${MVER_SEP} PROJ_MVER)
set(PROJ_UNSUPPORTED 5.0.0 5.0.1 6.0.0 6.1.0 6.1.1 6.2.0)
if (PROJ_VERSION IN_LIST PROJ_UNSUPPORTED) # check if proj version is unsupported
set(PROJ_UNSUPPORTED 7.0.0)
if (PROJ_VERSION IN_LIST PROJ_UNSUPPORTED OR PROJ_VERSION VERSION_LESS 6.3.1) # check if proj version is unsupported
message(FATAL_ERROR "Unsupported proj version: ${PROJ_VERSION}")
endif()
target_compile_definitions(proj-interface INTERFACE PROJ_VER=${PROJ_MVER})
Loading

0 comments on commit 8e2c583

Please sign in to comment.