cubicibo / SUPer

HDMV PGS (BD SUP) subtitle encoder compatible with typesetting effects.
GNU General Public License v3.0
21 stars 4 forks source link

hello, Is it possible to convert to a static library in C++ #10

Closed mojie126 closed 1 year ago

mojie126 commented 1 year ago

Is it possible to convert to a static library in C++? For example, the .a file under mingw32

cubicibo commented 1 year ago

Hi, Unfortunately, SUPer is exclusively Python code. I don't think it is possible to build that as a static library. The released executable runs Python code that is packed with a portable Python dll and all dependencies. Furthermore, there are DLL dependencies in the package that prevent to build it as a static library in any case.

I recommend to build supercli.py as an .exe with PyInstaller and call it from you C++ program as a subprocess. It should be good enough. You can reduce the exe file by removing optional dependencies like guizero and tqdm. You may further drop cv2 if you do some code change in optim.py to only use PILIQ as the quantization mode.

mojie126 commented 1 year ago

Okay, I understand