Posts: 1,839
Joined: Jul 2012
Reputation:
68
Over the years I have built full versions of Kodi in linux for speed and also built and debugged in Windows because it was so easy to run portable mode and have many versions installed at the same time. Is linux portable mode always configured to point to the compiled install folder or can I easily change this without using symlinks?
Another question debugging Kodi and pvr addons on Windows is very wasy in Visual Studio but I have never found gdb to be as easy. Does anyone who has used both found away to improve the linux experience and maybe offer me some tips.
Thanks.
Martin
Posts: 1,839
Joined: Jul 2012
Reputation:
68
Ok so I guess symlinks with scripts seems to be the solution.
I am not a fan of Eclipse either but I can continue with VS code The issue for me is finding documentation on how to compile both kodi and pvr-nextpvr for debugging and load them into Eclipse so I can trace the addon execution with breakpoints. Visual Studio does this so well and so easily.
Martin
Posts: 3,901
Joined: Sep 2013
Reputation:
358
Hmmm, lots of instances of Kodi installs might not be trivial to achieve on Ubuntu. I have two, a system-wide normal install and a portable version in the build directory. My build commands include the stuff needed for Eclipse and are as follows :-
Configure release version - cmake ../xbmc -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DX11_RENDER_SYSTEM=gl
Note that on Ubuntu, if you configure and build for a system wide install (-DCMAKE_INSTALL_PREFIX=/usr) Kodi will not run in portable mode. If you try, it will fail with an error regarding logging. This is because of permissions problems.
Configure debug version which includes all the Eclipse stuff necessary (executable will be much larger as it contains all the debug symbols) - cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE ../xbmc -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DX11_RENDER_SYSTEM=gl -DENABLE_MARIADBCLIENT=ON
- obviously, mariadb is a personal setting that you probably don't need.
Build Kodi according to how you have configured the build Build release version - [inline]time cmake --build . -- VERBOSE=1 -j5
- There is no need for timing it unless you want to and you can adjust how many cores to build on with the number after -j
It's been a while since I last built an addon from source, and that was TVHeadend when I moved my main install to v19. I seem to remember that I had no issues with building it by following the github instructions, but I have a feeling that it installed into the wrong place and that I had to copy it somewhere else. Certainly, I remember it not working initially and still picking up the old version.
Learning Linux the hard way !!