remove plan9port runtime dependency
This commit is contained in:
parent
223a8f1235
commit
5adc3b37d8
|
|
@ -120,6 +120,14 @@ to KF5; use `make kde-kf5` to force the KF5/Qt5 build.
|
|||
<img src="./doc/img/ollie.svg" alt="Ollie" width="200" height="200">
|
||||
</p>
|
||||
|
||||
## Dependencies
|
||||
|
||||
Ollie does **not** require [plan9port](https://9fans.github.io/plan9port/), either explicitly or implicitly. This was previously required by the runtime and is no longer true. Ollie includes its own Go 9P protocol implementation, clients, and namespace management. `olliesrv` creates its namespace directory and removes it only when empty.
|
||||
|
||||
plan9port provides valuable additional tools and integrations, including Acme and general-purpose 9P utilities, but those are optional. The core Ollie runtime, `ollie-9p`, `toolsrv`, and native clients do not depend on plan9port or `$PLAN9`.
|
||||
|
||||
The standard build requires Go 1.25+ and GNU Make. The optional KDE integration additionally requires CMake, Qt, and KDE Frameworks.
|
||||
|
||||
## Future work
|
||||
|
||||
### Portable toolsrv hosts
|
||||
|
|
|
|||
|
|
@ -8,19 +8,13 @@
|
|||
#include <QPushButton>
|
||||
#include <QClipboard>
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
|
||||
K_PLUGIN_CLASS_WITH_JSON(OllieRunner, "metadata.json")
|
||||
|
||||
static QString ninepBin()
|
||||
static QString ollie9pBin()
|
||||
{
|
||||
QString bin = QStandardPaths::findExecutable("9p");
|
||||
if (!bin.isEmpty()) return bin;
|
||||
QString plan9 = qEnvironmentVariable("PLAN9");
|
||||
if (!plan9.isEmpty() && QFileInfo::exists(plan9 + "/bin/9p"))
|
||||
return plan9 + "/bin/9p";
|
||||
return "9p";
|
||||
return QStandardPaths::findExecutable("ollie-9p");
|
||||
}
|
||||
|
||||
#if QT_VERSION_MAJOR >= 6
|
||||
|
|
@ -49,7 +43,7 @@ QByteArray OllieRunner::run9p(const QStringList &args)
|
|||
QProcess proc;
|
||||
QStringList fullArgs = {"-a", serverAddr()};
|
||||
fullArgs.append(args);
|
||||
proc.start(ninepBin(), fullArgs);
|
||||
proc.start(ollie9pBin(), fullArgs);
|
||||
if (!proc.waitForFinished(5000)) return {};
|
||||
return proc.readAllStandardOutput();
|
||||
}
|
||||
|
|
@ -57,7 +51,7 @@ QByteArray OllieRunner::run9p(const QStringList &args)
|
|||
void OllieRunner::write9p(const QString &path, const QByteArray &data)
|
||||
{
|
||||
QProcess proc;
|
||||
proc.start(ninepBin(), {"-a", serverAddr(), "write", path});
|
||||
proc.start(ollie9pBin(), {"-a", serverAddr(), "write", path});
|
||||
proc.waitForStarted(3000);
|
||||
proc.write(data);
|
||||
proc.closeWriteChannel();
|
||||
|
|
@ -160,7 +154,7 @@ void OllieRunner::run(const RunnerNS::RunnerContext &context, const RunnerNS::Qu
|
|||
QString prompt = data.mid(7);
|
||||
// Use the generate rdwr file for one-shot
|
||||
QProcess proc;
|
||||
proc.start(ninepBin(), {"-a", serverAddr(), "rdwr", "generate"});
|
||||
proc.start(ollie9pBin(), {"-a", serverAddr(), "rdwr", "generate"});
|
||||
proc.waitForStarted(3000);
|
||||
proc.write(prompt.toUtf8());
|
||||
proc.closeWriteChannel();
|
||||
|
|
|
|||
Loading…
Reference in New Issue