Changes

From Studiosg
Jump to navigationJump to search
Added page about the TDE 14.0.0 base packages build procedure
Welcome to Simone Giustetti's wiki pages.


Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_14.0.0_pacchetti_base Italiano]

----

== '''Base Packages''' ==
[[En/trinity_desktop_environment_14.0.0]]

You built and installed '''TDE prerequisites''' packages it's now time to move on to the real '''desktop environment'''. Being a huge and complex environment its source code is split among several packages, around thirty, depending on its scope and the functions it provides. All main daemons and bulk applications are grouped among two packages only labeled '''base packages''': '''tdelibs''' and '''tdebase'''. The two packages together make up the '''Trinity Desktop Environment''' skeleton and should be installed first. After installing both packages it will be possible to start the desktop environment and test some basic functionality like creating and moving a window, starting an application, but not much more. All of the programs and configuration tools making TDE useful and productive won't be available.

=== Build System ===

In accordance to the Trinity project goals, '''both packages were successfully migrated to [http://www.cmake.org/ cmake]''' a tool that can be used to configure and build the source code.

=== Common Build Script Structure ===

Code written for the prerequisite packages build scripts was reused as much as possible to maintain a certain degree of homogeneity. Please check the corresponding page for better details: [[TDE_14.0.0_prerequisites#Common_Build_Script_Structure]].

=== Generic Options ===

Generic options used for both packages uniform to the ones detailed in the [http://www.cmake.org/ cmake] section of the TDE prerequisites page. You are again welcome to check the related page for further details: [[TDE_14.0.0_prerequisites#Generic_Options]].

=== Custom Options ===

Building both '''tdebase''' and '''tedelibs''' obviously required for some custom options. The former of the two in greater part, due to its targeted goal, required quite a lot of customization. Package specific options are detailed below together with links to download each SlackBuild script. Scripts are provided in order to help whoever wishes to build working packages from the source code archives.

==== TDEBASE ====

'''Tdebase is the Trinity Desktop Environment main package'''. It contains base libraries, files, configuration tools and all of the applications needed to run the environment. Together with tdelibs, tdebase makes up a minimal desktop environment which other TDE packages grow and expand adding functionality and tools. Tdebase includes some general purpose applications such as the file manager and the configuration programs. Among the many included programs are:
* The control center ('''kcontrol''').
* The desktop log-in manager ('''tdm''').
* TDE integrated manual ('''khelpcenter''').
* TDE panel ('''kicker''').
* TDE web browser and integrated file manager ('''konqueror''').
* The terminal emulator ('''konsole''').
* The window manager ('''twin''').
* The desktop environment start-up script ('''starttde''').

The tdebase package includes some '''window managers''': programs that draw application windows on screen. A new window manager was introduced in TDE 14.0.0: '''[https://github.com/chjj/compton Compton]''' that replaces the old,
out of support, no more in development '''Kompmgr composition manager''' which once shipped with '''KDE 3'''. Sadly the TDE distributed version of Compton is afflicted by some compile issues making it impossible to build a working binary file. As a temporary work around '''the SlackBuild script removes the Compton dependency''':
( '''cd''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC}; '''sed''' ''-i'' "twin/CMakeLists.txt" ''-e'' "/compton-tde/ s/^/#/" )
Therefore the window manager '''won't be built'''.

It is worth mentioning that the standard Compton version, unlike the one shipped with TDE, presents no issue. Were You interested in testing the window manager Your best bet consists of building the standard package recurring to the build scripts available from the project [http://slackbuilds.org slackbuilds.org] web page.

To configure and build the package recurring to [http://www.cmake.org/ cmake] a lot of parameters are required. A likely command line should look something like:
'''cmake''' ${TMP}/tmp''-${PRGNAM}/${DIR_SRC} \
''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
''-DCMAKE_INSTALL_PREFIX=''${PREFIX} \
''-DCMAKE_SKIP_RPATH=''"OFF" \
''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
''-DMAN_INSTALL_DIR=''${MANDIR} \
''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
''-DBUILD_CRASHTEST=''ON \
''-DWITH_ARTS=''ON \
''-DWITH_HAL=''OFF \
''-DWITH_LDAP=''ON \
''-DWITH_LIBRAW1394=''ON \
''-DWITH_OPENEXR=''ON \
''-DWITH_PAM=''OFF \
''-DWITH_GCC_VISIBILITY=''OFF \
''-DWITH_SAMBA=''ON \
''-DWITH_SASL=''ON \
''-DWITH_SHADOW=''ON \
''-DWITH_TDEHWLIB=''ON \
''-DWITH_USBIDS=''"/usr/share/hwdata/usb.ids" \
''-DWITH_XCOMPOSITE=''ON \
''-DWITH_XCURSOR=''ON \
''-DWITH_XDAMAGE=''ON \
''-DWITH_XDMCP=''ON \
''-DWITH_XEXT=''ON \
''-DWITH_XFIXES=''ON \
''-DWITH_XINERAMA=''ON \
''-DWITH_XRANDR=''ON \
''-DWITH_XRENDER=''ON \
''-DWITH_XTEST=''ON \
''-DBUILD_ALL=''ON

After compiling the source code and installing the obtained binary files some tasks need taking care of: adding scripts, configuration files and some more stuff needed by the environment to work flawlessly:
# Add some configuration files / scripts needed by TDE.
mkdir -p ${PKG}/etc/trinity
mkdir -p ${PKG}/etc/rc.d
mv ${PKG}/${PREFIX}/share/config/tdm ${PKG}/etc/trinity/tdm
( cd ${PKG}/${PREFIX}/share/config ; ln -sf /etc/trinity/tdm tdm )

# Set sane permissions for the include files.
if [ -d ${PKG}/${PREFIX}/include ]; then
find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
fi

# Ensure correct login manager session file is available.
mkdir -p ${PKG}/usr/share/apps/tdm/sessions
cp ${PKG}/${PREFIX}/share/apps/tdm/sessions/tde.desktop ${PKG}/usr/share/apps/tdm/sessions/

cat ${SRCDIR}/rc.4 | sed "s|PREFIX/|${PREFIX}/|g" > ${PKG}/etc/rc.d/rc.4.new

# In the old days these files were copied over existing ones. Folks who
# customized these files got smacked. Now they are created as *.new files.
# The doinst.sh install script will either remove the .new extension or leave
# things be for the user to decide.
mkdir -p ${PKG}/etc/X11/xinit ${PKG}/etc/profile.d
cat ${SRCDIR}/xinit/xinitrc.trinity | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/X11/xinit/xinitrc.trinity.new
cat ${SRCDIR}/profile.d/trinity.sh | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.sh.new
cat ${SRCDIR}/profile.d/trinity.csh | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.csh.new
# Assign some sane permissions to the scripts.
chmod 755 ${PKG}/etc/X11/xinit/xinitrc.*.new ${PKG}/etc/profile.d/*.*.new

# Copy desktop environment start script.
if [[ -f ${PKG}/${PREFIX}/bin/starttde ]]; then
mkdir -p ${PKG}/usr/bin
cp ${PKG}/${PREFIX}/bin/starttde ${PKG}/usr/bin/starttde.new
fi
mkdir -p ${PKG}/usr/bin
cat ${SRCDIR}/xinit/xwmconfig > ${PKG}/usr/bin/xwmconfig.new
chmod +x ${PKG}/usr/bin/xwmconfig.new

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tdebase.tar.gz link].

==== TDELIBS ====

Package '''tdelibs''' includes a set of libraries serving as foundation for the Trinity Desktop Environment. Tdelibs were built upon the '''TQt3''' framework with the intent to ease application writing while maintaining consistency in look and base functionality. Among other functionality tdelibs provides:
* Classes for inter process communication handling ('''dcop''').
* Shared access to the TDE address book ('''tdeabc''').
* Standard widgets for application interfaces design adding to the QT provided ones ('''tdedeui''').
* Feature rich '''HTML and Javascript engines''' ('''tdehtml''' and '''kjs''').
* A program to start the environment ('''tdeinit''').
* Low level access to input / output network data streams ('''tdeio''').
* A standard way to reuse parts of an application in another one ('''tdeparts''').
* Printing process control functions ('''tdeprint''').
* OpenSSL integration ('''kssl''').
* High level reusable functions as "Find and Replace" ('''tdeutils''').
* A '''MIDI''' management library ('''libtdemid''').

To configure the source code, please run [http://www.cmake.org/ cmake] passing it the '''-DCMAKE_SKIP_RPATH''' option and some other useful parameters:
'''cmake''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
''-DCMAKE_INSTALL_PREFIX=''${PREFIX} \
''-DCMAKE_SKIP_RPATH=''"OFF" \
''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
''-DMAN_INSTALL_DIR=''${MANDIR} \
''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
''-DBUILD_ALL=''ON
Then run the '''make''' command.

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tdelibs.tar.gz link].

=== Conclusions ===

This paper presented and discussed the procedure to build '''Base''' packages for the '''Trinity Desktop Environment'''. Options specific to each package were discussed and a copy of all the used '''SlackBuild''' scripts were provided in the hope for them to be useful to '''Slackware Linux''' users wishing to give a try at building the desktop environment from scratch.


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


External links

----

* [http://www.trinitydesktop.org/ TDE home page]
* [http://www.slackware.com Slackware home page]
* [http://slackbuilds.org SlackBuilds.org home page]
* [https://github.com/chjj/compton Compton home page]

----

Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_14.0.0_pacchetti_base Italiano]

Navigation menu