15 Commits

Author SHA1 Message Date
p 7d35ac5cac Improve Lua search
Alpine 3.24 Success
Arch Linux AUR Success
2026-08-21 15:06:29 +02:00
p f80498e0e0 Fix build for modern MSYS2
Arch Linux AUR Success
Alpine 3.24 Scripts failed
2026-08-21 13:34:18 +02:00
p 17d9b3cf4c Win64Depends.sh: improve compatibility
Arch Linux AUR Success
Alpine 3.19 Success
Alpine 3.20 Success
2024-04-09 19:35:41 +02:00
p 2aa0a6231c Accept Lua 5.4 specifically
Arch Linux AUR Success
2024-04-09 18:54:14 +02:00
p 56a2a58ed6 Enable cross-compiled tests
Arch Linux AUR Success
test-diagram still fails, however let's make our toolchain files
a good reference.
2024-04-09 13:02:03 +02:00
p 99834e93c0 README.adoc: update package information
Arch Linux AUR Success
2023-07-01 21:59:05 +02:00
p 266c4c7c9f CMakeLists.txt: fix RPM license field 2023-06-28 01:57:50 +02:00
p e5e42b63eb Win64Depends.sh: only extract what we need
In case the packages directory has been preloaded or symlinked.
2023-06-26 20:54:38 +02:00
p a4532ea322 Add some enlightening comments 2023-06-14 12:29:12 +02:00
p 4aeaf61c99 Synchronize cross-compilation scripts 2022-08-12 12:39:21 +02:00
p d5837555b8 Update README 2022-08-12 12:33:52 +02:00
p 9003f36ba2 Tidy up GSettings 2022-07-25 13:31:32 +02:00
p 6df51485d3 Update Windows XP vs. TLS notes 2021-12-28 04:03:54 +01:00
p 2433b9046f Eliminate a Wayland-specific warning
The handling seems to be a bit convoluted there.
2021-11-17 07:42:37 +01:00
p 93cd4dc4f9 Remove an unused marshaller
It is no longer used, since the transition to GTK+ 3.
2021-11-14 05:51:07 +01:00
13 changed files with 65 additions and 47 deletions
+13 -10
View File
@@ -9,6 +9,7 @@ option (OPTION_GTKDOC "For developers only--enable use of gtk-doc" OFF)
option (BUILD_TESTING "Build tests" OFF)
# Project information
set (project_ID "name.janouch.${PROJECT_NAME}")
set (project_URL "https://git.janouch.name/p/logdiag")
# For custom modules
@@ -40,6 +41,7 @@ if (CONVERT_EXECUTABLE AND NOT WIN32)
set (icon_svg ${icon_base}/scalable/apps/logdiag.svg)
set (icon_size_list 16x16 32x32 48x48)
# ImageMagick very oddly outperforms rsvg-convert with our specific SVG
set (icon_png_list)
set (icon_symbolic_list)
foreach (icon_size ${icon_size_list})
@@ -58,6 +60,8 @@ if (CONVERT_EXECUTABLE AND NOT WIN32)
PROPERTIES SYMBOLIC TRUE)
endforeach ()
# Symbolic targets prevent the icons from being either cleaned,
# or pointlessly regenerated slightly differently
set (icon_ico ${PROJECT_SOURCE_DIR}/share/logdiag.ico)
add_custom_target (${PROJECT_NAME}_icons
DEPENDS ${icon_symbolic_list}
@@ -70,13 +74,11 @@ find_package (PkgConfig REQUIRED)
pkg_check_modules (GTK3 REQUIRED gtk+-3.0 json-glib-1.0)
link_directories (${GTK3_LIBRARY_DIRS})
if (NOT WIN32)
pkg_search_module (Lua REQUIRED lua>=5.2 lua5.3 lua-5.3 lua5.2 lua-5.2)
link_directories (${Lua_LIBRARY_DIRS})
else ()
# For whatever reason this now seems to be required
set (LUA_INCLUDE_DIR "${WIN32_DEPENDS_PATH}/include")
pkg_search_module (Lua lua>=5.2
lua5.5 lua-5.5 lua5.4 lua-5.4 lua5.3 lua-5.3 lua5.2 lua-5.2)
link_directories (${Lua_LIBRARY_DIRS})
if (NOT Lua_FOUND)
# This module likes to go into an infinite loop on bad versions.
find_package (Lua REQUIRED)
if (LUA_VERSION_STRING VERSION_LESS "5.2")
message (FATAL_ERROR "Lua 5.2 not found")
@@ -245,7 +247,7 @@ if (NOT GLIB_COMPILE_SCHEMAS_EXECUTABLE)
endif ()
set (GSETTINGS_DIR "${PROJECT_SOURCE_DIR}/share")
set (GSETTINGS_SCHEMAS "${GSETTINGS_DIR}/org.logdiag.gschema.xml")
set (GSETTINGS_SCHEMAS "${GSETTINGS_DIR}/${PROJECT_NAME}.gschema.xml")
if (OPTION_NOINSTALL)
set (GSETTINGS_COMPILED_SCHEMA "${PROJECT_BINARY_DIR}/gschemas.compiled")
@@ -391,7 +393,8 @@ endif ()
install (DIRECTORY docs/user-guide DESTINATION share/doc/${PROJECT_NAME})
install (DIRECTORY share/library DESTINATION share/${PROJECT_NAME})
install (FILES ${GSETTINGS_SCHEMAS} DESTINATION share/glib-2.0/schemas)
install (FILES ${GSETTINGS_SCHEMAS} DESTINATION share/glib-2.0/schemas
RENAME "${project_ID}.gschema.xml")
install (CODE " # DESTDIR is not in use on Windows (WIN32 is only native here!)
if (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")
execute_process (COMMAND \"${GLIB_COMPILE_SCHEMAS_EXECUTABLE}\"
@@ -446,7 +449,7 @@ set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${project_URL}")
set (CPACK_RPM_PACKAGE_REQUIRES "gtk3 >= 3.8, json-glib >= 0.10.4, lua = 5.2")
set (CPACK_RPM_PACKAGE_GROUP "Graphics")
set (CPACK_RPM_PACKAGE_LICENSE "ISC")
set (CPACK_RPM_PACKAGE_LICENSE "0BSD")
set (CPACK_RPM_PACKAGE_URL "${project_URL}")
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
+10 -5
View File
@@ -10,8 +10,10 @@ image::docs/user-guide/logdiag-en.png[align="center"]
Packages
--------
Regular releases are sporadic. git master should be stable enough. You can get
a package with the latest development version from Archlinux's AUR.
Regular releases are sporadic. git master should be stable enough.
You can get a package with the latest development version using Arch Linux's
https://aur.archlinux.org/packages/logdiag-git[AUR],
or as a https://git.janouch.name/p/nixexprs[Nix derivation].
Windows installers can be downloaded from
https://git.janouch.name/p/logdiag/releases[the Releases page on Gitea].
@@ -66,11 +68,14 @@ FindPkgConfig.cmake module to say:
separate_arguments(_pkgconfig_invoke_result UNIX_COMMAND "${_pkgconfig_invoke_result}")
Run the following command in the directory with source files to automatically
fetch and set up all dependencies (note that Windows XP is no longer able to
download from HTTPS sources, you'll have to run this externally):
fetch and set up all dependencies:
> cmake -P Win32Depends.cmake
Note that on Windows XP, CMake will fail to download those files, even with
https://emailarchitect.net/easendmail/sdk/html/object_tls12.htm[updates].
You will have to run the script externally.
Reserve a directory for an out-of-source build and let CMake prepare the build:
> mkdir build
@@ -103,7 +108,7 @@ Just install MinGW-w64 and let automation take care of the rest.
Alternatively, for an unnecessarily bloated MSYS2-based 64-bit build:
$ sh Win64Depends.sh
$ sh -e Win64Depends.sh
$ cmake -DCMAKE_TOOLCHAIN_FILE=ToolchainCrossWin64.cmake \
-DCMAKE_BUILD_TYPE=Release -B build
$ cmake --build build -- package
+2 -3
View File
@@ -5,12 +5,11 @@ set (CMAKE_C_COMPILER "i586-mingw32msvc-gcc")
set (CMAKE_CXX_COMPILER "i586-mingw32msvc-g++")
set (CMAKE_RC_COMPILER "i586-mingw32msvc-windres")
# Not needed to crosscompile an installation package
#set (CMAKE_CROSSCOMPILING_EMULATOR "wine")
# Remember to set WINEPATH for library dependencies
set (CMAKE_CROSSCOMPILING_EMULATOR "wine")
set (CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc")
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+2 -3
View File
@@ -5,12 +5,11 @@ set (CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
set (CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
set (CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
# Not needed to crosscompile an installation package
#set (CMAKE_CROSSCOMPILING_EMULATOR "wine")
# Remember to set WINEPATH for library dependencies
set (CMAKE_CROSSCOMPILING_EMULATOR "wine")
set (CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+2 -3
View File
@@ -5,12 +5,11 @@ set (CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
set (CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
set (CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
# Not needed to crosscompile an installation package
#set (CMAKE_CROSSCOMPILING_EMULATOR "wine64")
# Remember to set WINEPATH for library dependencies
set (CMAKE_CROSSCOMPILING_EMULATOR "wine")
set (CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+22 -14
View File
@@ -1,7 +1,13 @@
#!/bin/sh -e
# Win64Depends.sh: download dependencies from MSYS2 for cross-compilation
# Dependencies: AWK, sed, sha256sum, cURL, bsdtar, wine64
repository=https://repo.msys2.org/mingw/mingw64/
# Win64Depends.sh: download dependencies from MSYS2 for cross-compilation.
# Dependencies: AWK, sed, sha256sum, cURL, bsdtar, wine
repository=https://repo.msys2.org/mingw/ucrt64/
pkg=mingw-w64-ucrt-x86_64
# Wine 11 has removed wine64, so this is only backwards compatibility.
if command -v wine64 >/dev/null
then wine() { command wine64 "$@"; }
fi
status() {
echo "$(tput bold)-- $*$(tput sgr0)"
@@ -9,7 +15,7 @@ status() {
dbsync() {
status Fetching repository DB
[ -f db.tsv ] || curl -# "$repository/mingw64.db" | bsdtar -xOf- | awk '
[ -f db.tsv ] || curl -# "$repository/ucrt64.db" | bsdtar -xOf- | awk '
function flush() { print f["%NAME%"] f["%FILENAME%"] f["%DEPENDS%"] }
NR > 1 && $0 == "%FILENAME%" { flush(); for (i in f) delete f[i] }
!/^[^%]/ { field = $0; next } { f[field] = f[field] $0 "\t" }
@@ -27,7 +33,8 @@ fetch() {
} BEGIN { while ((getline < "db.tsv") > 0) {
filenames[$1] = $2; deps[$1] = ""; for (i = 3; i <= NF; i++) {
gsub(/[<=>].*/, "", $i); deps[$1] = deps[$1] $i FS }
} for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | while IFS= read -r name
} for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | tee db.want | \
while IFS= read -r name
do
status Fetching "$name"
[ -f "packages/$name" ] || curl -#o "packages/$name" "$repository/$name"
@@ -44,31 +51,32 @@ extract() {
for subdir in *
do [ -d "$subdir" -a "$subdir" != packages ] && rm -rf -- "$subdir"
done
for i in packages/*
do bsdtar -xf "$i" --strip-components 1 mingw64
done
while IFS= read -r name
do bsdtar -xf "packages/$name" --strip-components 1
done < db.want
}
configure() {
status Configuring packages
glib-compile-schemas share/glib-2.0/schemas
wine64 bin/gdk-pixbuf-query-loaders.exe \
wine bin/gdk-pixbuf-query-loaders.exe \
> lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
# pkgconf has a command line option for this, but CMake can't pass it
sed -i "s|^prefix=/mingw64|prefix=$(pwd)|" {share,lib}/pkgconfig/*.pc
# pkgconf has a command line option for this, but CMake can't pass it.
sed -i "s|^prefix=/ucrt64|prefix=$(pwd)|" \
share/pkgconfig/*.pc lib/pkgconfig/*.pc
}
mkdir -p win32-depends
cd win32-depends
dbsync
fetch mingw-w64-x86_64-gtk3 mingw-w64-x86_64-lua \
mingw-w64-x86_64-libwinpthread-git # because we don't do "provides"?
fetch $pkg-gtk3 $pkg-lua \
$pkg-gcc-libs # Because we don't do "provides"?
verify
extract
configure
status Success
# XXX: Why is this override needed to run some GLib-based things under wine64?
# XXX: Why is this override needed to run some GLib-based things under wine?
unset XDG_DATA_DIRS
+1
View File
@@ -10,6 +10,7 @@
#define PROJECT_NAME "${PROJECT_NAME}"
#define PROJECT_VERSION "${PROJECT_VERSION}"
#define PROJECT_ID "${project_ID}"
#define PROJECT_URL "${project_URL}"
#cmakedefine OPTION_NOINSTALL
+3 -1
View File
@@ -2591,7 +2591,9 @@ on_drag_motion (GtkWidget *widget, GdkDragContext *drag_ctx,
/* Discard leftovers from any previous unsuccessful drag. */
if (self->priv->dnd_left)
{
g_object_unref (self->priv->dnd_symbol);
/* The Wayland backend does a leave-drop-leave sequence. */
if (self->priv->dnd_symbol)
g_object_unref (self->priv->dnd_symbol);
self->priv->dnd_symbol = NULL;
self->priv->dnd_left = FALSE;
}
+4
View File
@@ -189,7 +189,11 @@ ld_lua_init (LdLua *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, LD_TYPE_LUA, LdLuaPrivate);
#if LUA_VERSION_NUM >= 505
L = self->priv->L = lua_newstate (ld_lua_alloc, NULL, 0);
#else
L = self->priv->L = lua_newstate (ld_lua_alloc, NULL);
#endif
g_return_if_fail (L != NULL);
/* XXX: Might not be a bad idea to use lua_atpanic(). */
-1
View File
@@ -1,3 +1,2 @@
VOID:OBJECT,OBJECT
VOID:OBJECT,STRING
VOID:DOUBLE,DOUBLE
@@ -1,5 +1,5 @@
<schemalist>
<schema id="org.logdiag" path="/org/logdiag/" gettext-domain="logdiag">
<schema id="name.janouch.logdiag" path="/name/janouch/logdiag/" gettext-domain="logdiag">
<key name="show-main-toolbar" type="b">
<default>true</default>
<summary>Whether to show the main toolbar</summary>
@@ -14,4 +14,3 @@
</key>
</schema>
</schemalist>
+1 -1
View File
@@ -389,7 +389,7 @@ ld_window_main_init (LdWindowMain *self)
gtk_widget_show_all (GTK_WIDGET (self));
/* Set up GSettings. */
priv->settings = g_settings_new ("org." PROJECT_NAME);
priv->settings = g_settings_new (PROJECT_ID);
g_settings_bind (priv->settings, "show-main-toolbar",
gtk_action_group_get_action (priv->action_group,
+4 -4
View File
@@ -127,16 +127,16 @@ main (int argc, char *argv[])
textdomain (GETTEXT_DOMAIN);
#ifdef PROJECT_GSETTINGS_DIR
/* This is enabled when the build is set up for developing, so that the
* application can find its schema. It might also find use when
* installing the application into a location that's missing from
/* This is enabled when the build is set up for development,
* so that the application can find its schema. It might also find use
* when installing the application into a location that's missing from
* g_get_system_data_dirs(), for example /usr/local or ~/.local.
*/
g_setenv ("GSETTINGS_SCHEMA_DIR", PROJECT_GSETTINGS_DIR, 0);
#endif /* PROJECT_GSETTINGS_DIR */
#ifdef _WIN32
/* Don't be unneccessarily limited by the system ANSI codepage. */
/* Don't be unneccessarily limited by the system's ANSI codepage. */
/* g_win32_get_command_line() should replace this code for GLib >= 2.40. */
argv_overriden = get_utf8_args (&argc, &argv);
if (argv_overriden)