feat/packaging #1

Merged
agj merged 7 commits from feat/packaging into master 2026-10-11 10:00:45 +00:00
Contributor
No description provided.
The install is divided into two components: runtime (the editor, graphedit-cli,
the standard plugin, the desktop integration) and development (the headers and
the cmake package for plugins). cpack makes them the Debian packages graphedit
and graphedit-dev, with what Debian expects of packages: a copyright file, a
changelog, manual pages (help2man), a shlibs file for the libraries and an
ldconfig trigger instead of ldconfig calls. lintian finds nothing else than
the library policy, which is meant for libraries that programs share.

Packages are versioned by git: the release version for its tag, and otherwise
the commits since the tag (2.1.0+15.g9d8252a6), so that builds between
releases are newer than the release to package managers.

- scripts/build-deb.sh builds, tests and packages on the distribution that the
  packages are for (dpkg-shlibdeps determines their dependencies)
- scripts/package-dist.sh ubuntu-24.10 does that in a chroot of Ubuntu 24.10 on
  any Linux system, without root or containers (user namespaces with the
  subordinate ids of the user), then installs the packages in a clean Ubuntu
  24.10 and tests them there. Ubuntu 24.10 has reached the end of its life: its
  packages come from old-releases.ubuntu.com.
- scripts/smoke-test.sh checks an installation (also for scripts/package.sh):
  graphedit-cli with the LTS language server, and the editor (offscreen)
  opening and debugging a project

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
What the build for Windows (llvm-mingw: clang 17 and libc++) found:
- the formatters of QByteArray, QString and QUuid take any format context,
  as the standard asks: libc++ checks format strings with a context of its
  own
- `breakpoint.element = {}` is ambiguous for QUuid with clang
- the signal `event` of agent_session hid QObject::event (-Woverloaded-virtual
  in clang); it is called event_received now
- a test initialized a QJsonArray with braces from one QJsonArray, which clang
  copies and gcc puts into the new array

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
A cross build on Linux with llvm-mingw and Qt for llvm-mingw
(cmake/toolchains/windows-llvm-mingw.cmake):
- the classes of graphedit-core and graphedit-gui are imported from their
  DLLs by their users (GRAPHEDIT_CORE_EXPORT, GRAPHEDIT_GUI_EXPORT), so that
  the pointers to their signals are the same everywhere; classes that are
  defined in their headers alone are not
- the installation contains the libraries and plugins of Qt and the C++
  runtime of the compiler (cmake/graphedit_windows.cmake)
- ctest runs the tests with Wine: the paths of the build have the drive of
  Wine, the variables of Qt reach the tests as WINEQT_*, the libraries are
  found through WINEPATH, and the offscreen platform gets fonts
- tests copy static constexpr members of exported classes before comparing
  them (the members cannot be bound to references outside of their DLL)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
- JSON-RPC over standard input and output (language servers, graphedit-cli
  serve and mcp) uses binary streams on Windows: text streams turned "\n"
  into "\r\n" and the content lengths no longer fit
- run targets that run as shell commands use cmd.exe (/d /s /c, which gets
  the command as it is written) instead of /bin/sh
- programs of plugins (language servers) are started with the directory of
  graphedit on the PATH, where Windows looks for their libraries
- executables can be given with the separators of Windows

The tests use the shell and the absolute paths of the platform, and a run
target test checks the command line of shell commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
Windows does not delete a library that is loaded, so the plugins panel could
not uninstall a plugin there (it stays loaded until the editor restarts). The
library is renamed instead (to <library>.uninstalled, which is no library),
and the plugins panel deletes such libraries when it is created, once they
are no longer loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
- graphedit and graphedit-cli have the icon of graphedit and its version
  (resources/app/graphedit.rc.in; the icon is rendered from the logo with
  scripts/windows-icon.py)
- the editor, a program without a console of its own on Windows, writes to
  the console of the command line that started it (help, version, errors)
- on Windows, the offscreen platform of Qt (agents and tests) takes its fonts
  from a directory, which is the font directory of Windows unless
  QT_QPA_FONTDIR says otherwise

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
scripts/package-dist.sh windows builds the packages for Windows on Linux,
in a chroot of Ubuntu 24.10 with llvm-mingw 20231128 (checked against its
checksum) and Qt 6.10.3 for llvm-mingw and for Linux (aqtinstall):
- scripts/build-windows.sh configures and builds the cross build, runs its
  tests with Wine and creates an installer (NSIS, a 64 bit program like
  graphedit: start menu, optional desktop shortcut, PATH and development
  files, removes an installed version first) and a ZIP archive, both with
  Qt and the C++ runtime
- scripts/test-windows-package.sh installs the installer in a new Wine
  prefix without Qt or llvm-mingw, runs the smoke test there and on the
  unpacked archive (with a screenshot of the editor), builds the example
  plugin against the development files of the archive and uses it with its
  graphedit-cli, and uninstalls graphedit again

scripts/example_plugin.sh can use an installation, a toolchain and a runner
for that, and the smoke test reads the output of graphedit-cli with the line
endings of Windows. The documentation describes the packages, the cross
build and what keeps the code working on Windows (AGENTS.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ynJUDgFh1Rc8HZ9YsSo1L
Author
Contributor

Just some very minor things like the copyright year being 2023? I will manually fix that later

Just some very minor things like the copyright year being 2023? I will manually fix that later
agj merged commit 49be2c4e97 into master 2026-10-11 10:00:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gtz-agent/graphedit-qt!1
No description provided.