alex1701c / JetBrainsRunner

A Krunner Plugin which allows you to open your recent projects
GNU Lesser General Public License v3.0
53 stars 4 forks source link

Cannot compile debug build #2

Closed thigg closed 4 years ago

thigg commented 4 years ago

For me, pycharm and intellij idea ultimate do not show up, but webstorm does. Therefore I tried to install the debug build, but running install.sh after editing CMakeLists.txt gives me the error below.

System: arch linux Using the current version from github of JetBrainsRunner


-- The following OPTIONAL packages have been found:

 * KF5Sonnet (required version >= 5.63.0)
 * KF5Auth (required version >= 5.63.0)
 * KF5Codecs (required version >= 5.63.0)
 * KF5WidgetsAddons (required version >= 5.63.0)
 * KF5Package (required version >= 5.63.0)
 * KF5Config (required version >= 5.63.0)
 * KF5CoreAddons (required version >= 5.63.0)
 * KF5WindowSystem (required version >= 5.63.0)
 * KF5Plasma (required version >= 5.63.0)

-- The following REQUIRED packages have been found:

 * Qt5Network (required version >= 5.13.1)
 * Qt5Qml (required version >= 5.13.1)
 * Qt5Quick
 * Qt5QuickWidgets
 * Qt5
 * KF5Runner
 * Gettext
 * KF5I18n (required version >= 5.63.0)
 * KF5TextWidgets
 * KF5ConfigWidgets
 * Qt5Gui (required version >= 5.11.0)
 * Qt5Xml (required version >= 5.11.0)
 * KF5Service (required version >= 5.63.0)
 * Qt5Widgets (required version >= 5.11.0)
 * ECM (required version >= 1.6.0)
 * KF5PlasmaQuick
 * KF5
 * Qt5Core

-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/JetBrainsRunner/build
[ 63%] Automatic MOC for target kcm_krunner_jetbrainsrunner
[ 63%] Built target kcm_krunner_jetbrainsrunner_autogen
[ 63%] Built target kcm_krunner_jetbrainsrunner
[ 63%] Automatic MOC for target krunner_jetbrainsrunner
[ 63%] Built target krunner_jetbrainsrunner_autogen
[ 63%] Building CXX object src/CMakeFiles/krunner_jetbrainsrunner.dir/jetbrainsrunner.cpp.o
[ 63%] Building CXX object src/CMakeFiles/krunner_jetbrainsrunner.dir/JetbrainsApplication.cpp.o
/tmp/JetBrainsRunner/src/JetbrainsApplication.cpp: In statischer Elementfunktion »static QList<JetbrainsApplication*> JetbrainsApplication::filterApps(QList<JetbrainsApplication*>&)«:
/tmp/JetBrainsRunner/src/JetbrainsApplication.cpp:121:58: Fehler: Anforderung des Elements »name« in »app«, das vom Zeigertyp »JetbrainsApplication* const« ist (vielleicht war »->« gemeint?)
  121 |             qInfo() << "Found not projects for: " << app.name;
      |                                                          ^~~~
/tmp/JetBrainsRunner/src/jetbrainsrunner.cpp: In Elementfunktion »virtual void JetbrainsRunner::init()«:
/tmp/JetBrainsRunner/src/jetbrainsrunner.cpp:22:24: Fehler: Anforderung des Elements »name« in »app«, das vom Zeigertyp »JetbrainsApplication* const« ist (vielleicht war »->« gemeint?)
   22 |         qInfo() << app.name;
      |                        ^~~~
/tmp/JetBrainsRunner/src/jetbrainsrunner.cpp:41:44: Fehler: Anforderung des Elements »name« in »i«, das vom Zeigertyp »JetbrainsApplication* const« ist (vielleicht war »->« gemeint?)
   41 |         qInfo() << "\n<------------ " << i.name << " ------------------->";
      |                                            ^~~~
/tmp/JetBrainsRunner/src/jetbrainsrunner.cpp:42:30: Fehler: Anforderung des Elements »recentlyUsed« in »i«, das vom Zeigertyp »JetbrainsApplication* const« ist (vielleicht war »->« gemeint?)
   42 |         for (const auto &d:i.recentlyUsed) {
      |                              ^~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/krunner_jetbrainsrunner.dir/build.make:89: src/CMakeFiles/krunner_jetbrainsrunner.dir/JetbrainsApplication.cpp.o] Error 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
make[2]: *** [src/CMakeFiles/krunner_jetbrainsrunner.dir/build.make:76: src/CMakeFiles/krunner_jetbrainsrunner.dir/jetbrainsrunner.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:575: src/CMakeFiles/krunner_jetbrainsrunner.dir/all] Fehler 2
make: *** [Makefile:141: all] Error 2
alex1701c commented 4 years ago

Yes, this is a bug in the debug statements of the project. It seems like I forgot to update some references after I implemented the FileWatchers.

I will fix this issue soon as I can.

Could you please tell me how is it installed (snap/toolbox/downloaded from website) and give me the content of the .desktop files of Pycharm and Intellij Idea Ultimate. It is most likely that I can identify the problem with these files.

Thank you Vielen Dank

thigg commented 4 years ago

I did try 3 install methods: git repo, ziped release, Arch user repository: aur/plasma5-runners-jetbrains-runner 1.1.1-1 .

All had the same issue. (Guess it was even the same version ;)

The IDEs are also installed via AURs:

aur/intellij-idea-ultimate-edition 2019.2.3-2 
aur/webstorm 2019.2.3b192.6817.13-1
aur/pycharm-professional 2019.2.3-1
aur/rubymine 2019.2.3-1

Regarding the strange naming of pycharm and rubymine: maybe it would be good to have a config file additionally to the autodetect, to fix stuff like this?

I was looking for that and guessed that I would need to write a runner myself. Thanks for your good work! Vielen Dank


$  tail -n +1 /home/user/.local/share/applications/jetbra*
==> /home/user/.local/share/applications/jetbrains-idea.desktop <==
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/opt/intellij-idea-ultimate-edition/bin/idea.svg
Exec="/opt/intellij-idea-ultimate-edition/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea

==> /home/user/.local/share/applications/jetbrains-webstorm.desktop <==
[Desktop Entry]
Version=1.0
Type=Application
Name=WebStorm
Icon=/opt/webstorm/bin/webstorm.svg
Exec="/opt/webstorm/bin/webstorm.sh" %f
Comment=The smartest JavaScript IDE
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-webstorm

$  cat /usr/share/applications/pycharm-professional.desktop
[Desktop Entry]
Type=Application
Name=PyCharm Professional Edition
Icon=pycharm
Comment=Python IDE for Professional Developers.
Exec=/usr/bin/pycharm %f
Terminal=false
Categories=Development;IDE;Python;
StartupNotify=true
StartupWMClass=jetbrains-pycharm

$  cat /usr/share/applications/rubymine.desktop
[Desktop Entry]
Name=RubyMine
Comment=Ruby and Rails IDE with the full stack of essential developer tools
GenericName=Ruby and Rails IDE with the full stack of essential developer tools
Exec=/usr/bin/jetbrains-rubymine
Icon=rubymine
Terminal=false
Type=Application
Categories=Development;IDE;Ruby
StartupWMClass=jetbrains-rubymine
alex1701c commented 4 years ago

It seems like the naming of the Jetbrains products has changed, please check if the latest commit fixes this problem (without the debug option).

Implementing a config file additionally to the auto detect is a great idea. I will add something like this to the config dialog as soon as I have more time.

If you have any other ideas for improvements you are more than welcome to contribute to this project ! 😃

And thanks for your quick response!

thigg commented 4 years ago

I tried with c1dc030 and restarted the runner with kquitapp5 krunner;kstart5 krunner Still no projects show up for anything else than webstorm. `

alex1701c commented 4 years ago

Another question: Does RubyMine work ?

I am not at home right now and don't have my computer with me so I can't do any in depth debugging. I will give you an update when I got a solution/further questions.

thigg commented 4 years ago

No rubymine does not work either.

Dont worry, your support is already amazing ;)

alex1701c commented 4 years ago

I found the issue: You installed the Jetbrains Products using the AUR. This way the files (except for Webstorm) do not start with jetbrains-, this is the requirement for them to be found and parsed by the plugin.

For this your idea with the config file will become extremely useful.

I will add some files manually and commit the changes soon 🙃

Edit: I have fixed the issue for some of the with the AUR installed Jetbrains IDEs by specifying the name of the config file manually.

Please give feedback if this solution works for you.

thigg commented 4 years ago

Pycharm works now, idea still doesn't

thigg commented 4 years ago

You fixed debugging in c1dc030, therefore I enabled it. Idea Ultimate is detected and the projects are displayed as well, according to debug. (Twice even)

Now that i saw it, i tried typing Intelli... instead of idea and the projects show up now. There just bound to an other keyword.

EDIT Problem is now, all projects show up 3 times, I guess there is something messed up with the desktop files. Idea 3 times, Webstorm twice.

I got desktopfiles in /usr/share/applications and in ~/.local/share/applications at least

alex1701c commented 4 years ago

Can you please send me a screenshot of the displayed options and the debug output as text ?

And is Rubymine found ?

thigg commented 4 years ago

image


                                     <-------- Read installed Jetbrains Applications ------------>
Okt 20 09:57:33 archi krunner[5058]: "IntelliJ IDEA Ultimate Edition"
Okt 20 09:57:33 archi krunner[5058]: "WebStorm"
Okt 20 09:57:33 archi krunner[5058]: "IntelliJ IDEA Ultimate Edition"
Okt 20 09:57:33 archi krunner[5058]: "WebStorm"
Okt 20 09:57:33 archi krunner[5058]: "RubyMine"
Okt 20 09:57:33 archi krunner[5058]: "PyCharm Professional Edition"
Okt 20 09:57:33 archi krunner[5058]: "Charm"
Okt 20 09:57:33 archi krunner[5058]: "IntelliJ IDEA Ultimate Edition"
Okt 20 09:57:33 archi krunner[5058]: 
                                     <-------- All possible Settings directories ------------>
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.WebStorm2019.2" "WebStorm" "2019.2"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.WebStorm2019.1" "WebStorm" "2019.1"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.RubyMine2019.1" "RubyMine" "2019.1"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.RubyMine2018.3" "RubyMine" "2018.3"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.PyCharm2019.2" "PyCharm" "2019.2"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.PyCharm2019.1" "PyCharm" "2019.1"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.PyCharm2018.3" "PyCharm" "2018.3"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.IntelliJIdea2019.2" "IntelliJIdea" "2019.2"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.IntelliJIdea2019.1" "IntelliJIdea" "2019.1"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/.IdeaIC2018.3" "IdeaIC" "2018.3"
Okt 20 09:57:33 archi krunner[5058]: 
Okt 20 09:57:33 archi krunner[5058]: Found not projects for:  "Charm"
Okt 20 09:57:33 archi krunner[5058]: <------------- Projects and their recently used project paths ----------------------->
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "IntelliJ IDEA Ultimate"  ------------------->
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/.../..."
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/.../kasse"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/.../source/portal/usermanagement"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/common"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/.../source/portal"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/..."
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/common/common-..."
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/couch/dbsyncbulldozerclient"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/couch/..."
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/private/screeps-kotlin-starter"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/private/screeps-kotlin-types"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/.../source/settings"
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "WebStorm"  ------------------->
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/eieraktie_webinterface"
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "IntelliJ IDEA Ultimate"  ------------------->
... same as above
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "WebStorm"  ------------------->
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/eieraktie_webinterface"
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "RubyMine"  ------------------->
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/vagrant-proxmox"
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "PyCharm Professional"  ------------------->
Okt 20 09:57:33 archi krunner[5058]: "/kubu/home/thi/git/...-kasse"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/PycharmProjects/untitled1"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/PycharmProjects/untitled"
Okt 20 09:57:33 archi krunner[5058]: 
                                     <------------  "IntelliJ IDEA Ultimate"  ------------------->
...same as above...
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/private/screeps-kotlin-types"
Okt 20 09:57:33 archi krunner[5058]: "/home/user/git/exoshare/source/settings"
Okt 20 09:57:33 archi krunner[5058]: 
Okt 20 09:57:34 archi krunner[5058]: 
Okt 20 09:57:35 archi krunner[5058]: 
Okt 20 09:57:35 archi krunner[5058]: 
alex1701c commented 4 years ago

It looks like the plugin has found multiple .desktop files.

Can you please change the line 23 in src/jetbrainsrunner.cpp to: qInfo() << app->name << app->desktopFilePath; And recompile your project and restart the runner ? This way we can see the .desktop file locations.

thigg commented 4 years ago

                                     <-------- Read installed Jetbrains Applications ------------>
Okt 20 10:15:05 archi krunner[5987]: "IntelliJ IDEA Ultimate Edition" "/home/user/.local/share/applications/jetbrains-idea.desktop"
Okt 20 10:15:05 archi krunner[5987]: "WebStorm" "/home/user/.local/share/applications/jetbrains-webstorm.desktop"
Okt 20 10:15:05 archi krunner[5987]: "IntelliJ IDEA Ultimate Edition" "/usr/share/applications/jetbrains-idea.desktop"
Okt 20 10:15:05 archi krunner[5987]: "WebStorm" "/usr/share/applications/jetbrains-webstorm.desktop"
Okt 20 10:15:05 archi krunner[5987]: "RubyMine" "/usr/share/applications/rubymine.desktop"
Okt 20 10:15:05 archi krunner[5987]: "PyCharm Professional Edition" "/usr/share/applications/pycharm-professional.desktop"
Okt 20 10:15:05 archi krunner[5987]: "Charm" "/usr/share/applications/charm.desktop"
Okt 20 10:15:05 archi krunner[5987]: "IntelliJ IDEA Ultimate Edition" "/usr/share/applications/jetbrains-idea.desktop"
alex1701c commented 4 years ago

It looks like you have multiple desktop files for the same application, that is why he shows some entries multiple times.

I will have to rewrite the logic which searches for the installed applications to avoid duplicates.

Edit: I have just commited a fix in 9f5d69408e0b94579236c2549baff19dacf94d73, now there should no duplicate options displayed. Please give feedback if this works 🙃. PS: The rewritten logic has currently no debug option, I am most likely going to implement this as some sort of file export in the config dialog which does not require you to recompile your project.

thigg commented 4 years ago

Ah perfekt, thanks for your work! All projects show up only once now.

The only confusing thing is now, that I cannot type 'idea', I need to type 'Intelli...'

alex1701c commented 4 years ago

No problem, I am always happy if I can improve my projects and people find it useful .

The only confusing thing is now, that I cannot type 'idea', I need to type 'Intelli...'

That is a good point, the plugin currently checks with the startsWith method for a match. I will improve this soon.

Regarding the strange naming of pycharm and rubymine: maybe it would be good to have a config file additionally to the autodetect, to fix stuff like this?

And what do you think about the current implementation of this idea in the config dialog ? Is this what you had in mind ?

thigg commented 4 years ago

Yep, the config dialog is cool. Maybe it would be nice, to add a quick hint about what to select to the README?

alex1701c commented 4 years ago

Yes, I will update it after I finish the next feature updates 😃 And tooltips will be added to the items in the config dialog.

alex1701c commented 4 years ago

The search feature has been improved: c5beaf41293c45593a8cc8d806746c4364d2daa3

intellij_jbr idea_jbr

If the name consists of two words like "IntelliJ IDEA" or "Android Studio" you can now search for both of them. But edition specifiers like "Ultimate" or "Community" are ignored

thigg commented 4 years ago

nice one!