Login  Register

Re: Select by Entity Type

Posted by Rallaz on Jul 04, 2015; 8:21am
URL: https://forum.librecad.org/Select-by-Entity-Type-tp5711784p5711796.html

Howto compile the attached plugin source code in linux:

Ubuntu:
1. Install devel tools & dependencies
sudo apt-get install g++ gcc make libqt4-dev qt4-qmake qt4-dev-tools
2. Install latest Librecad package
https://launchpad.net/~librecad-dev/+archive/ubuntu/librecad-daily/+packages
3. Development headers for LibreCAD plugins are not installed, download it from github
and save it in (p.e.) ~/devel/lc-devel
https://github.com/LibreCAD/LibreCAD/raw/master/librecad/src/plugins/document_interface.h
https://github.com/LibreCAD/LibreCAD/raw/master/librecad/src/plugins/qc_plugininterface.h
4. Dowload an unpack the plugin source code (p.e.) ~/devel/lc-devel/matchtext
5. Edit "matchtext.pro" and change line 18
INCLUDEPATH    += ../../librecad/src/plugins  => INCLUDEPATH    += ~/devel/lc-devel
delete line 15 include(../../common.pri) =>
6. cd to plugin source code directory
cd ~/devel/lc-devel/matchtext
7. build
qmake & make

If all are ok you have a file called libmatchtext.so in ~/devel/lc-devel/unix/resources/plugins/
8. move or copy the file to ~/.librecad/plugins/  (note the point, is mandatory)
9. start LibreCAD and work.

For OpenSuse and Fedora:
The diferences are:
1. development packages are libqt4-devel instead of libqt4-dev
2. install latest LibreCAD from http://download.opensuse.org/repositories/home:/Rallaz/
3. Install librecad-devel  from http://download.opensuse.org/repositories/home:/Rallaz/
5. Only delete line 15
6-9 all are equal

Note, in Fedora can be "qmake" or "qmake-qt4"

Cheers,
Rallaz