file .so for enigam2
Re: file .so for enigam2 #41
Posted 13 October 2017 - 22:45
The lines removed, used to build a python .so plugin callable by enigma2.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: file .so for enigam2 #42
Re: file .so for enigam2 #43
Posted 14 October 2017 - 19:39
Do you know how to compile your own OpenPLi from sources?
If the answer is NO - NO there is no point for further discussions.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: file .so for enigam2 #44
Re: file .so for enigam2 #45
Posted 14 October 2017 - 19:48
Then you need to learn how to compile your image.
Revert the commit I point to you (bitrateviewer) and build image with that included.
If you succeed, then you can start making changes to that plugin, and gradually that will make your plugin, with that as a base.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: file .so for enigam2 #46
Re: file .so for enigam2 #47
Posted 15 October 2017 - 19:21
Obfuscating is futile anyway. Don't bother.
And not just for technical reasons...
You can obfuscate your code all you like at home. Just don't expect your plugin to be accepted anywhere. And if no one can download and install your plugin, it's kinda pointless to obfuscate it, right?
Re: file .so for enigam2 #48
Re: file .so for enigam2 #49
Posted 16 October 2017 - 17:19
Which is exactly what the GPL license is preventing you from doing!
You're distributing an Enigma2 extension, and thus must abide by the E2 license.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
Re: file .so for enigam2 #50
Posted 16 October 2017 - 20:53
You are thinking way too complicated ... as usual
Look at the swig Tutorial http://www.swig.org/tutorial.html
With this example and if you compile the example.c directly on the box with a locally installed Debian Jessie like I normally do (so that you don't need any x-compile magic) it takes less then 5 min to have a working so module to be imported and tested ... disbelievers may check with attached files (sources and *.so for mipsel and armhf so files natively compiled).
Off course it doesn't call any enigma2 routines, but it works nicely also when loaded from enigma2 python code
but for the thing the OP wants to achieve this approach would be more than ... sufficient ...
gutemine
Attached Files
Edited by gutemine, 16 October 2017 - 20:58.
Re: file .so for enigam2 #51
Posted 17 October 2017 - 17:10
hello, I've seen your examples and that's what I want to get
I tried to do the instructions in the guide, with the various commands in the "make" folder
in the end i get the file.so but when i go into enigma2, i have the error (i can not open the file.so)
i have Debian 9
Re: file .so for enigam2 #52
Posted 17 October 2017 - 20:35
when you load from enigma2 you have to use the correct import path starting from /usr/lib/enigma2/python with dots instead of /, something like:
from Components.Sources.StaticText import StaticText
which could mean:
from Plugins.Extensions.MyExample import example (where example is the module name specified in example.i)
If you want to avoid this you can put the so file in another path like /mypath and extend the python search patch and then use python importlib load with code like this:
if os.path.exists("/mypath/my_example.so"):
import sys
sys.path.append("/mypath")
import importlib
try:
dreamplus=importlib.import_module("example")
except:
pass
BUT all this would tell you your favourite search engine ... and keep in mind the *.so has to be compiled for mipsel or armhf depending on the box you have - an intel *.so from your PC will fail miserably to load - no mattter what you do ...
Edited by gutemine, 17 October 2017 - 20:38.
Re: file .so for enigam2 #53
Posted 19 October 2017 - 09:08
Hello, thanks for the answer, let's see if I understand it well
the file.so, should be put into enigma2 box like this:
.usr.lib.enigma2.python.Plugins.Extensions
but this is only to be done after you compile it for mipsel, cross compiler for mipsel!
otherwise if compiled simply with gcc in my pc whit debian 9 does not work
Re: file .so for enigam2 #54
Re: file .so for enigam2 #55
Re: file .so for enigam2 #56
Posted 19 October 2017 - 19:22
The devshell will make your like easy.
Also the trick by compiling things using debian mipsel will work too! I did it that once using debian mips under qemu...
But again devshell and proper recipe, build everything, it makes your like easy, once you get it.
Edited by athoik, 19 October 2017 - 19:23.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: file .so for enigam2 #57
Re: file .so for enigam2 #58
Re: file .so for enigam2 #59
Re: file .so for enigam2 #60
6 user(s) are reading this topic
0 members, 6 guests, 0 anonymous users