This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kdevupload.rc path

Tags: None
(comma "," separated)
schnere
Registered Member
Posts
6
Karma
0
OS

kdevupload.rc path

Wed Aug 02, 2017 6:31 pm
Hi,

I've installed kdev-upload. However it didn't work with kdevelop 5.1.1.
The following message was in the output:
Code: Select all
cannot find .rc file "kdevupload.rc" for component "uploadplugin"


As defined in CMakeLists.txt the file gets copied to ${DATA_INSTALL_DIR} . So it is located in /usr/share/kdevupload/kdevupload.rc .
After a lot of debugging I found out, that it works when copied to the following location: /usr/share/kdevupload.rc . This works, but I get the following message:
Code: Select all
KXMLGUI file found at deprecated location ("/usr/share/kdevupload.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.


So I've tried to change CMakeLists.txt to ${KXMLGUI_INSTALL_DIR} which results in the same message which I had first:
Code: Select all
cannot find .rc file "kdevupload.rc" for component "uploadplugin"


I'm on Manjaro Linux with Plasma 5.10.4, Frameworks 5.36.0 , QT 5.9.1 , kdevelop 5.1.1
Code: Select all
$XDG_DATA_DIRS="/usr/share:/usr/share:/usr/local/share"


It works when copying the rc file manually to /usr/share/kdevupload.rc , but I'm interested in a common solution.
I took a look at github kdev modules to find out how other modules do this.
The most common solutions seems to be /usr/share/kxmlgui5/kdevupload/kdevupload.rc . But this doesn't work either.

I also searched for some documentation on kdevelop plugin development, but didn't find anything helpful.

Best regards
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: kdevupload.rc path

Wed Aug 02, 2017 9:36 pm
One common way to do it nowadays seems to be to put it into a .qrc file which is compiled into the executable. I don't know how to install it properly, sorry -- if I were to find out, I'd look for a different application doing that.


I'm working on the KDevelop IDE.
User avatar
kfunk
KDE Developer
Posts
53
Karma
0
OS

Re: kdevupload.rc path  Topic is solved

Thu Aug 03, 2017 10:55 am
As Sven said: putting the .rc into a resource is how it's done nowadays.

Please check out the following review, and just make kdev-upload do the same:
https://phabricator.kde.org/D528#0b38f892 (changes in plugins/documentview/ could be used as a template)

We'd happily accept a patch of yours on our Phabricator instance. To get started how to contribute, please read through:
https://www.kdevelop.org/contribute-kdevelop

Thanks!
schnere
Registered Member
Posts
6
Karma
0
OS

Re: kdevupload.rc path

Fri Aug 04, 2017 3:59 pm
Thanks for your replies!

So, this is what I've tried:
* added kdevupload.qrc https://pastebin.com/epuNcqme
* editet CMakeLists.txt https://pastebin.com/zNcEPYyF

Then I compile:

Code: Select all
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr . && make -j8 && sudo make install


Which results in

Code: Select all
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/lib/qt/plugins/kdevplatform/27/kdevupload.so
-- Up-to-date: /usr/lib/qt/plugins/libkcm_kdev_upload.so
-- Up-to-date: /usr/share/kservices5/kcm_kdev_upload.desktop


And no output for
Code: Select all
sudo updatedb && locate kdevupload.rc | grep -v home

And still getting

Code: Select all
cannot find .rc file "kdevupload.rc" for component "uploadplugin"


As I understand the qrc includes the "kdevupload.rc" in the plugin, so it's not copied on the filesystem?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: kdevupload.rc path

Fri Aug 04, 2017 6:44 pm
Maybe you need to use :/kdevupload.rc for the file name? Look at how the others do it maybe.

Qt resource files are not installed as files -- they are compiled into the binary and loaded from there. They don't exist as actual files.


I'm working on the KDevelop IDE.
schnere
Registered Member
Posts
6
Karma
0
OS

Re: kdevupload.rc path

Fri Aug 04, 2017 8:42 pm
Unfortunately this does not work either:
Code: Select all
No such XML file ":/kdevupload.rc"

I already took a look at other modules, which all do the same: https://github.com/KDE/kdevplatform/blo ... in.cpp#L93 .

Furthermore the method setXMLFile checks automatically if it's a qrc resource: https://github.com/KDE/kxmlgui/blob/mas ... t.cpp#L240

So I've printed out a list of all resource files and found:

Code: Select all
":/kxmlgui5/kdevupload"
":/kxmlgui5/kdevupload/kdevupload.rc"


And now I have the solution :) : https://github.com/KDE/kxmlgui/blob/mas ... t.cpp#L234
The component name was "uploadproject", but needs to be "kdevupload".

The context menu still does not work, but this might be caused by the following changes in kdevplatform:
https://github.com/KDE/kdevplatform/com ... eb39d8311f

I'm on kdevplatform 5.1.1 and the commit came later...

Thanks for your help!
schnere
Registered Member
Posts
6
Karma
0
OS

Re: kdevupload.rc path

Sat Aug 05, 2017 8:06 am
So, now I've fixed the context menu, too. I had to create a different branch for kdevplatform 5.1.1 (which I've installed). The "broken-features" branch should work for kdevplatform > 5.1.1 .

I've read https://www.kdevelop.org/contribute-kdevelop which led me to https://phabricator.kde.org/dashboard/view/8/ which led me to https://community.kde.org/Infrastructure/Phabricator . I have to "Log in to Phab and enter Code Review (a.k.a Differential).". But I have no Phabricator account and can't find out how to register. So, I've pushed everything to github: https://github.com/schnere/kdev-upload .
User avatar
kfunk
KDE Developer
Posts
53
Karma
0
OS

Re: kdevupload.rc path

Sat Aug 05, 2017 8:59 am
Note: Instructions how to sign up are here: https://community.kde.org/Infrastructur ... Logging_in
schnere
Registered Member
Posts
6
Karma
0
OS

Re: kdevupload.rc path

Sat Aug 05, 2017 9:27 am
Ah, again - thanks for your help!

https://phabricator.kde.org/differential/diff/17743/
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: kdevupload.rc path

Sun Aug 06, 2017 6:37 am
You need to click continue once more to actually create a request. ;)


I'm working on the KDevelop IDE.
schnere
Registered Member
Posts
6
Karma
0
OS

Re: kdevupload.rc path

Mon Aug 07, 2017 9:10 am
@scummos : thanks for the hint!
@kfunk: thanks for merging!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]