I am aware that
ring-lang-bin exists, but here is full source build. Took me the full day to do it.
## Why Qt6
I'm on CachyOS, which tracks Arch's current packages — and Arch is
retiring the Qt5 module packages (qt5-charts, qt5-datavis3d and others
are already gone or going). On such systems a RingQt linked against
Qt5 simply cannot be built anymore. Qt 6.11 + qt6-5compat turned out
to be a viable target: after the patch set below, all three libraries
(core/light/full) build and run, and RingNotepad launches and edits
files on a current Qt6 stack.
## What the Qt6 port required (patch bundle available)
- Module moves: QAction, QKeyEvent, QMouseEvent, QShortcut (include-path
shadowing by the Qt3D include dirs), QOpenGLWidget -> QtOpenGLWidgets,
QGraphicsSvgItem/QSvgWidget -> QtSvgWidgets, QRegExp/QStringRef/
QTextCodec -> Qt5Compat (now only forward-declared in QtCore).
- The QtCharts namespace is gone in Qt6 — the generated qualifiers
(QtCharts::) must be dropped.
- ~20 Qt5 classes removed from Qt6 needed inert stub headers:
QBluetoothTransfer*, the bearer API (QNetworkConfiguration*), the
QMediaObject/QMediaRecorder session-plumbing family, QAudioRecorder,
QAudioDeviceInfo, QCameraViewfinder, QCameraImageCapture (renamed
QImageCapture), the encoder-settings classes, QAudioProbe/QVideoProbe.
- ~90 method-level changes in the generated bindings (removed methods
stubbed at runtime, QStringRef -> QStringView in the XML stream
getters, QLocale QChar -> QString, float* color getters, scoped-enum
int casts, QWheelEvent position() migration, ...).
- The full-build gencode stage must run on the build platform (it
already filters Windows-only classes such as the ActiveX section) —
the checked-in ring_qt.cpp is the Windows flavor and cannot compile
on Linux as-is.
## Linux state-path issues (the part I'd most like to propose upstream)
On Linux, /usr is read-only (FHS). Two tools currently write state into
the install tree and fail there:
1. ringpm — its registry/packages state under the install folder.
I redirected it to ~/.ringpm in the package (a ~4-line change using
sysget("HOME")); after that, ringpm works beautifully — refresh,
search, install, run.
2. RingNotepad — the settings file path is stored in a cSettingsFile
attribute (set during RNoteSettings initialization in
tools/ringnotepad/src/rnotesettings.ring; used by
SaveSettingsToFile(), line 24: write(cSettingsFile, cSettings)).
On Linux the resolved path lands in the read-only install tree
(/usr/lib/ring/...), producing an R35 error on every close. The
same settings file also seeds the Save/Open dialog's startup
folder, so redirecting fixes both the close-time error and the
dialog defaulting into a read-only directory. Prefixing the path
with sysget("HOME")+"/.ringnotepad/" (or an equivalent) would fix
it in one place.
Proposal: have tools resolve writable state from sysget("HOME") (e.g.
~/.ringnotepad/, ~/.ringpm/), or honor an env var like RING_USERDATA.
This would remove the need for distro patches entirely and matches how
users expect Linux applications to behave.
Two smaller items while I have your ear:
- rnotefilemenu.ring's WriteFile() uses the fopen() result without
checking for NULL, so an unwritable path surfaces as a confusing
"NULL pointer in fwrite" instead of a clean message.
- The ring_qt515*.pro files link /usr/lib/libring.so by absolute path,
which only works if a previous Ring install already exists; a
relative -l:libring.so (plus an rpath) builds cleanly on a fresh
machine.
The full PKGBUILD with all patch scripts (the Qt6
battery runs to a few hundred lines, all fail-loud-guarded) is attached.
Best regards,
Savi G.
Ring 1.27 AUR package maintainer (ring-lang) — Arch Linux / CachyOS