Difference between revisions of "En/TDE tdewebdev"

From Studiosg
Jump to navigationJump to search
(Added page about Tdewebdev, TDE and Slackware 14.0)
 
(Page updated to new template)
Line 1: Line 1:
Welcome to Simone Giustetti's wiki pages.
+
{{header_en|title=Building a Web Dev package for TDE| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring a working Web Dev package for TDE and Slackware Linux | link_page=TDE_tdewebdev}}
 
 
 
 
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_tdewebdev Italiano]
 
 
 
----
 
  
 
== TDEWEBDEV ==
 
== TDEWEBDEV ==
[[En/trinity_desktop_environment#Applications]]
+
[[En/trinity_desktop_environment#Applications | TDE - Applications]]
  
 
The '''tdewebdev''' package includes some applications written for web developpment: an editor for HTML code, a style sheet editor and some other tools aimed at easing maintenance and development of static web pages. Among the included programs some are worth mentioning:
 
The '''tdewebdev''' package includes some applications written for web developpment: an editor for HTML code, a style sheet editor and some other tools aimed at easing maintenance and development of static web pages. Among the included programs some are worth mentioning:
Line 17: Line 12:
 
* '''Quanta+''': A HTML editor. Many of the Quanta features require the previously listed programs to be installed.
 
* '''Quanta+''': A HTML editor. Many of the Quanta features require the previously listed programs to be installed.
 
'''Tdewebdev''' is an optional package aimed to web developers. Other users can use the '''Trinity Desktop Environment''' without.
 
'''Tdewebdev''' is an optional package aimed to web developers. Other users can use the '''Trinity Desktop Environment''' without.
 +
  
 
== Tdewebdev and Slackware ==
 
== Tdewebdev and Slackware ==
  
 
A package analogous to tdwebdev exists in KDE 3.5: kdewebdev. In the last couple of years TDE developers worked at converting the tdewegbdev build system to [http://www.cmake.org cmake]. This is '''still a work in progress''' and '''only Quanta and KFileReplace building works with the new system'''. Unfortunately the resulting Quanta release lacks many features needing binary files from the missing parts of the package. '''Autotools''' and an heavily updated kdewebdev SlackBuild script were used to obtain a full build of the package. The following rules were applied when compiling the package to ensure a clean build:
 
A package analogous to tdwebdev exists in KDE 3.5: kdewebdev. In the last couple of years TDE developers worked at converting the tdewegbdev build system to [http://www.cmake.org cmake]. This is '''still a work in progress''' and '''only Quanta and KFileReplace building works with the new system'''. Unfortunately the resulting Quanta release lacks many features needing binary files from the missing parts of the package. '''Autotools''' and an heavily updated kdewebdev SlackBuild script were used to obtain a full build of the package. The following rules were applied when compiling the package to ensure a clean build:
* Directory '''/opt/trinity''' was set as package root directory.
+
* Directory ''/opt/trinity'' was set as package root directory.
 
* Some missing makefiles were created running the '''make''' command from inside the main directory of the code extracted from the source archive.
 
* Some missing makefiles were created running the '''make''' command from inside the main directory of the code extracted from the source archive.
 
* The source code '''was patched''' in order to '''solve a version mismatch issue with libtool''': the source code was configured for release 2.2.6, but 2.4.2 is installed along Slackware 14.0.
 
* The source code '''was patched''' in order to '''solve a version mismatch issue with libtool''': the source code was configured for release 2.2.6, but 2.4.2 is installed along Slackware 14.0.
Line 30: Line 26:
  
 
Some configuration scripts required by the build procedure are missing from the source tarball. We create the makefiles using the make command:
 
Some configuration scripts required by the build procedure are missing from the source tarball. We create the makefiles using the make command:
 +
<syntaxhighlight lang="bash">
 
   # Prepare the package for building (Create the configure script).
 
   # Prepare the package for building (Create the configure script).
 
   echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
 
   echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
 
   make -f admin/Makefile.common \
 
   make -f admin/Makefile.common \
 
       2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 
       2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 
A patch is needed to solve a '''libtool''' package version mismatch conflict:  
 
A patch is needed to solve a '''libtool''' package version mismatch conflict:  
 +
<syntaxhighlight lang="bash">
 
   # Patch the admin/ltmain.sh script in order to solve a version mismatch.
 
   # Patch the admin/ltmain.sh script in order to solve a version mismatch.
 
   patch -p0 -i ${SRCDIR}/ltmain_version_update.patch
 
   patch -p0 -i ${SRCDIR}/ltmain_version_update.patch
 +
</syntaxhighlight>
 
'''The script specifically sets Qt libraries paths''' in order for other scripts to find them at build time:  
 
'''The script specifically sets Qt libraries paths''' in order for other scripts to find them at build time:  
 +
<syntaxhighlight lang="bash">
 
   # Add temporary paths to handle new libraries during build
 
   # Add temporary paths to handle new libraries during build
 
   export QTDIR=/opt/trinity
 
   export QTDIR=/opt/trinity
Line 44: Line 45:
 
   export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX}
 
   export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX}
 
   export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH
 
   export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH
 +
</syntaxhighlight>
 
Finally the script runs the '''./configure''' command to configure source code in accordance to the destination environment:
 
Finally the script runs the '''./configure''' command to configure source code in accordance to the destination environment:
 +
<syntaxhighlight lang="bash">
 
   # Configure the package
 
   # Configure the package
 
   LDFLAGS="${SLKLDFLAGS}" \
 
   LDFLAGS="${SLKLDFLAGS}" \
Line 60: Line 63:
 
       --enable-closure \
 
       --enable-closure \
 
       2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 
       2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 
Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.
 
Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.
  
 
After build conclusion, during the binary and configuration file installation, a partial '''doinst.sh''' file containing some links to libraries is copied in the directory meant for post install scripts:
 
After build conclusion, during the binary and configuration file installation, a partial '''doinst.sh''' file containing some links to libraries is copied in the directory meant for post install scripts:
 +
<syntaxhighlight lang="bash">
 
   # Add some links needed by Quanta to find plug-ins
 
   # Add some links needed by Quanta to find plug-ins
 
   if [ -f ${SRCDIR}/doinst.sh ]; then
 
   if [ -f ${SRCDIR}/doinst.sh ]; then
 
       cat ${SRCDIR}/doinst.sh >> ${PKG}/install/doinst.sh
 
       cat ${SRCDIR}/doinst.sh >> ${PKG}/install/doinst.sh
 
   fi
 
   fi
 +
</syntaxhighlight>
  
 
A full script can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/35132/tdewebdev.tar.gz link]. The output package can be installed using command '''installpkg''' as usual in Slackware Linux.
 
A full script can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/35132/tdewebdev.tar.gz link]. The output package can be installed using command '''installpkg''' as usual in Slackware Linux.
 +
  
 
== Quanta and its Plug-ins ==
 
== Quanta and its Plug-ins ==
Line 86: Line 93:
  
 
External Links
 
External Links
 +
 
----
 
----
 +
 
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide]
 
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide]
 
* [http://sourceforge.net/projects/xsldbg/ Xsldbg home page]
 
* [http://sourceforge.net/projects/xsldbg/ Xsldbg home page]
Line 92: Line 101:
 
----
 
----
  
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_tdewebdev Italiano]
+
{{footer_en | link_page=TDE_tdewebdev}}

Revision as of 17:40, 21 December 2016

Welcome to Simone Giustetti's wiki pages.


Languages: English - Italiano


TDEWEBDEV

TDE - Applications

The tdewebdev package includes some applications written for web developpment: an editor for HTML code, a style sheet editor and some other tools aimed at easing maintenance and development of static web pages. Among the included programs some are worth mentioning:

  • Kommander: A tool to write and execute scripts through a graphical interface that adds some features to Quanta.
  • KFileReplace: A tool to find and replace strings of text in multiple files at once.
  • KXSLDbg: A XSL script debugger.
  • KImageMapEditor: A graphical editor for image maps.
  • KLinkStatus: A tool to check status of links inside HTML pages.
  • Quanta+: A HTML editor. Many of the Quanta features require the previously listed programs to be installed.

Tdewebdev is an optional package aimed to web developers. Other users can use the Trinity Desktop Environment without.


Tdewebdev and Slackware

A package analogous to tdwebdev exists in KDE 3.5: kdewebdev. In the last couple of years TDE developers worked at converting the tdewegbdev build system to cmake. This is still a work in progress and only Quanta and KFileReplace building works with the new system. Unfortunately the resulting Quanta release lacks many features needing binary files from the missing parts of the package. Autotools and an heavily updated kdewebdev SlackBuild script were used to obtain a full build of the package. The following rules were applied when compiling the package to ensure a clean build:

  • Directory /opt/trinity was set as package root directory.
  • Some missing makefiles were created running the make command from inside the main directory of the code extracted from the source archive.
  • The source code was patched in order to solve a version mismatch issue with libtool: the source code was configured for release 2.2.6, but 2.4.2 is installed along Slackware 14.0.
  • Some static links were added to the doinst.sh install script. Links are needed by Quanta to find and enable its related plug-ins. More details can be found below.
  • No specific options were used for the configure command as the package seems not to need any.

Some script lines of code and related comments follow.

Some configuration scripts required by the build procedure are missing from the source tarball. We create the makefiles using the make command:

   # Prepare the package for building (Create the configure script).
   echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
   make -f admin/Makefile.common \
      2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log

A patch is needed to solve a libtool package version mismatch conflict:

   # Patch the admin/ltmain.sh script in order to solve a version mismatch.
   patch -p0 -i ${SRCDIR}/ltmain_version_update.patch

The script specifically sets Qt libraries paths in order for other scripts to find them at build time:

   # Add temporary paths to handle new libraries during build
   export QTDIR=/opt/trinity
   export PATH=/opt/trinity/bin:/usr/bin:$PATH
   export LIBDIR=/usr/lib${LIBDIRSUFFIX}
   export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX}
   export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH

Finally the script runs the ./configure command to configure source code in accordance to the destination environment:

   # Configure the package
   LDFLAGS="${SLKLDFLAGS}" \
   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ../${PRGNAM}-${VERSION}/configure \
      --prefix=${PREFIX} \
      --sysconfdir="/etc/trinity" \
      --libdir=${LIBDIR} \
      --mandir=${PREFIX}/man \
      --with-qt-dir=${QTDIR} \
      --with-qt-includes=${PREFIX}/include \
      --with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \
      --disable-rpath \
      --enable-closure \
      2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log

Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.

After build conclusion, during the binary and configuration file installation, a partial doinst.sh file containing some links to libraries is copied in the directory meant for post install scripts:

   # Add some links needed by Quanta to find plug-ins
   if [ -f ${SRCDIR}/doinst.sh ]; then
      cat ${SRCDIR}/doinst.sh >> ${PKG}/install/doinst.sh
   fi

A full script can be downloaded from the following link. The output package can be installed using command installpkg as usual in Slackware Linux.


Quanta and its Plug-ins

Quanta, the tdewebdev included HTML editor, uses plug-ins to enable some optional features provided by external software. Sadly Quanta does not seem to find those plug-ins in spite of them being successfully compiled and installed. Likely a path related issue that can be solved adding some lines of code in the doinst.sh script to link the libraries to the Quanta searched directory while installing the package. Quanta showing an error message at start-up and complaining for missing KFileReplace, KImageMapEditor, KLinkStatus or KXSLDbg related libraries means something went wrong. The missing links can be created running the following commands:

  ln -s /usr/lib/trinity/libklinkstatuspart.la /opt/trinity/lib/trinity/libklinkstatuspart.la
  ln -s /usr/lib/trinity/libkimagemapeditor.la /opt/trinity/lib/trinity/libkimagemapeditor.la
  ln -s /usr/lib/trinity/libkfilereplacepart.la /opt/trinity/lib/trinity/libkfilereplacepart.la
  ln -s /usr/lib/trinity/libkxsldbgpart.la /opt/trinity/lib/trinity/libkxsldbgpart.la

If no /opt/trinity/lib/trinity directory is present on the system create it running command:

  mkdir -p /opt/trinity/lib/trinity

Close then reopen Quanta for it to update the plug-ins location and to correctly enable them. It is worth mentioning that among the many Quanta configuration options there is a plug-in search path. Changing the default value to the correct one does not solve the issue: plug-ins are correctly discovered and loaded, but using them only causes an error message to be shown.


For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net


External Links





Languages: English - Italiano