Reformat
This commit is contained in:
parent
b7bde14d75
commit
246483e3d9
8 changed files with 187 additions and 178 deletions
52
packages/wallpaper-engine-plasma6-plugin.patch
Normal file
52
packages/wallpaper-engine-plasma6-plugin.patch
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e1298ba..1c9ddec 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -9,6 +9,7 @@ set(KF_MIN_VERSION "5.68.0")
|
||||
project("WallpaperEngineKde")
|
||||
|
||||
|
||||
+add_definitions(-DQML2_CMAKE_PATH="${QML2_CMAKE_PATH}")
|
||||
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
if(NOT OpenGL_GL_PREFERENCE)
|
||||
diff --git a/plugin/contents/pyext.py b/plugin/contents/pyext.py
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
diff --git a/plugin/contents/ui/Pyext.qml b/plugin/contents/ui/Pyext.qml
|
||||
index 1a48f5e..8a9c9c9 100644
|
||||
--- a/plugin/contents/ui/Pyext.qml
|
||||
+++ b/plugin/contents/ui/Pyext.qml
|
||||
@@ -15,7 +15,8 @@ Item {
|
||||
"[ -f /usr/share/$EXT ] && WKD=/usr/share/$EXT",
|
||||
"[ -f \"$HOME/.local/share/$EXT\" ] && WKD=\"$HOME/.local/share/$EXT\"",
|
||||
"[ -f \"$XDG_DATA_HOME/$EXT\" ] && WKD=\"$XDG_DATA_HOME/$EXT\"",
|
||||
- `exec python3 "$WKD" "${ws_server.url}"`
|
||||
+ "[ -f \"NIX_STORE_PACKAGE_PATH/share/$EXT\" ] && WKD=\"NIX_STORE_PACKAGE_PATH/share/$EXT\"",
|
||||
+ `"$WKD" "${ws_server.url}"`
|
||||
].join("\n");
|
||||
return sh;
|
||||
}
|
||||
diff --git a/src/plugin.cpp b/src/plugin.cpp
|
||||
index 5e8a7e2..1709a27 100644
|
||||
--- a/src/plugin.cpp
|
||||
+++ b/src/plugin.cpp
|
||||
@@ -13,6 +13,18 @@ class Port : public QQmlExtensionPlugin {
|
||||
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
|
||||
|
||||
public:
|
||||
+ void initializeEngine(QQmlEngine *engine, const char *uri) override {
|
||||
+ if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return;
|
||||
+ if (!engine) return;
|
||||
+
|
||||
+ QString pathList = QML2_CMAKE_PATH;
|
||||
+ QStringList paths = pathList.split(':', Qt::SkipEmptyParts);
|
||||
+ for (const QString &path : paths) {
|
||||
+ engine->addImportPath(path);
|
||||
+ }
|
||||
+
|
||||
+ QQmlExtensionPlugin::initializeEngine(engine, uri);
|
||||
+ }
|
||||
void registerTypes(const char* uri) override {
|
||||
if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return;
|
||||
qmlRegisterType<wekde::PluginInfo>(uri, WPVer[0], WPVer[1], "PluginInfo");
|
||||
Loading…
Add table
Add a link
Reference in a new issue