Highlight Dokumentation
Installation
Paket-Inhalt
root of highlight-x.x | |-- examples/extras # examples for highlight scripting | |-- web_plugins # plugins for various web toolkits | |-- tcl # TCL extension | `-- swig # SWIG interface and sample code |-- gui_files # supporting files for the optional GUI | |-- ext # file open filter configuration | `-- l10n # GUI translations |-- langDefs # language definitions (*.lang) |-- man # man page |-- plugins # plug-in scripts (*.lua) |-- src # source code | |-- cli # command line interface code | |-- core # highlight core code (builds the library) | | |-- astyle # Artistic Style code | | `-- Diliculum # Diliculum code | `-- gui-qt # optional GUI code | `-- include # Header files | | |-- astyle # Artistic Style headers | | `-- Diliculum # Diliculum headers `-- themes # color themes (*.theme) AUTHORS # contributors of code and patches ChangeLog # list of changes COPYING # license filetypes.conf # file type extension configuration highlight.desktop # desktop integration of optional GUI INSTALL # this file makefile # basic makefile README # user manual README_DE # German user manual README_LANGLIST # list of supported languages README_REGEX # regular expression manual TODO # just ideas, no plans
Abhängigkeiten
Zum Kompilieren werden Lua5.x (devel-Paket) und die Boost-Header benötigt.
Die optionale GUI benötigt Qt.
Kompilierung und Installation
- tar xjf highlight-x.x-x.tar.bz2
- cd highlight-x.x-x
- make help
- make
make gui (optional, zum Kompilieren der Qt GUI) - make install
(Je nach Installationsziel sind root-Rechte nötig) - make clean (optional)
Das Standard-Installationsverzeichnis von highlight ist /usr/share/highlight.
Sie können das Verzeichnis zur Kompilier- oder zur Laufzeit ändern:
- Im makefile kann per Compiler-Direktive das Installationsverzeichnis gesetzt werden (data_dir-Variable)
- Im Makefile kann ebenfalls das Konfigurationsverzeichnis angepasst werden (conf_dir-Variable)
- Siehe Abschnitt Dateisuche um den Suchpfad zur Laufzeit zu ändern
Lazy pointer - Problem unter MacOS X
Wenn das highlight Binary gestrippt wird, erscheint dieser Fehler beim Start:
dyld: lazy symbol binding failed: lazy pointer not found dyld: lazy pointer not found Trace/BPT trap
Um den Abbruch zu vermeiden, muss highlight ohne die -s (--strip) Option neu kompiliert werden (siehe src/makefile, LDFLAGS Variable).
Parse error at "std" - Problem unter Linux
Beim Kompilieren der Qt-Oberfläche erscheint dieser Fehler:
usr/include/c++/6.1.1/bits/stl_relops.:67: Parse error at "std"
Zur Behebung src/gui-qt/.qmake.stash löschen und erneut kompilieren.
Statisches Linken (um highlight als Service zu starten)
Wenn highlight nicht als Service gestartet werden kann, sollte es mit der -static Option gelinkt werden (siehe src/makefile, LDFLAGS Variable).
Linux Mint
Es gibt ein Systemskript names highlight welches in einem priorisierten Suchpfad liegt:
mintsystem provides: /usr/local/bin/highlight
highlight provides: /usr/bin/highlight
See bug tracker items: https://bugs.launchpad.net/linuxmint/+bug/593583 and
https://bugs.launchpad.net/linuxmint/+bug/815005
Installation unter Windows
Setup-Programm starten und Anweisungen folgen.
Compilation instructions for Windows
a) Install Qt Creator IDE (www.qt.io) b) Install MingW (gcc toolchain) -Download Online-Installer: -Start mingw-w64-install.exe and select default options -Add bin directory of the downloaded files to the system PATH -open cmd.exe and type "g++ --version" to check c) Compile Qt: -Download and extract package of qt.io -> qt-everywhere-opensource-src-5.6.0.tar.gz -Open cmd.exe and change into the Qt directory -Configure Qt. Use static if you do not want to ship Qt DLLs. Ignore ld.gold crash message on Win10. configure -release -opensource -confirm-license -static -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg \ -qt-freetype -no-openssl -nomake examples -opengl desktop -Compile Qt (set numbers of CPU cores after -j): mingw32-make -k -j4 d) Add compiler and Qt paths (location of qmake.exe) in QtCreator e) Install Boost -Download and extract package of boost.org (no compilation needed) f) Compile Lua -Download the source package -Open QtCreator and create a new Project ("without Qt") -Import all c files of the Lua package except lua.c and luac.c -Edit the project file like this: TEMPLATE = lib CONFIG += console CONFIG -= app_bundle CONFIG -= qt DEFINES -= UNICODE SOURCES += $$files(../lua-5.3.0/src/*.c) SOURCES -= ../lua-5.3.0/src/lua.c ../lua-5.3.0/src/luac.c -Compile the Lua library g) Install upx h) Open the pro files in src/w32-projects and src/gui-qt in QtCreator and adjust the paths of libraries and tools. Assign the kit config to the projects. Compile the lib project first. i) Ship highlight with libgcc_s_dw2-1.dll (32 bit) libgcc_s_seh-1.dll (64 bit) libstdc++-6.dll libwinpthread-1.dll (these are located in the mingw32 installation).
