Getting Started/Build/KDE4.1: Difference between revisions

From KDE TechBase
(New page: ==Objectives== You probably want to keep your current KDE-3.5.x installation till you feel that KDE-4.x.y meets your needs for actual day to day use of your computer. Yet, you want to be...)
 
Line 12: Line 12:
===Create the User Account===
===Create the User Account===


Use whatever method you wish to create a new user account.  Mine is called: "KDE4".  Then edit or create the user specific login script (.bash_profile for Linux).  There is a lot that goes into this:
Use whatever method you wish to create a new user account.  Mine is called: "KDE4".  Then edit or create the user specific login script (.bash_profile for Linux).  There is a lot that goes into this.  Note that this presumes that USER was correctly set by the system login script.


<nowiki>------8<------8<------8<------8<------8<------8<------8<------</nowiki>




Use what
<nowiki>#</nowiki> Redundant setting of HOME as work around for Bash bug
 
HOME=/home/KDE4
PATH=$HOME/bin:$PATH
 
export PATH HOME
 
XDG_DATA_HOME="$HOME/.local/share"
XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME XDG_CONFIG_HOME
 
KDEDIR=/usr/local/KDE-4.0
KDEHOME=$HOME/.kde4
KDETMP=/tmp/$USER-kde4
mkdir -p $KDETMP
KDEVARTMP=/var/tmp/$USER-kde4
mkdir -p $KDEVARTMP
KDEDIRS=$KDEDIR
PKG_CONFIG_PATH=/usr/local/KDE-4.0/lib/pkgconfig:$PKG_CONFIG_PATH
export KDEDIR KDEHOME KDETMP KDEVARTMP KDEDIRS PKG_CONFIG_PATH
 
QTDIR=/usr/local/Trolltech/Qt-4
QT_PLUGIN_PATH=$KDEDIR/lib/kde4/plugins:$QT_PLUGIN_PATH
PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH
export QTDIR QT_PLUGIN_PATH PKG_CONFIG_PATH
 
PATH=$QTDIR/bin:$KDEDIR/bin:$PATH
export PATH
 
XDG_CONFIG_DIRS=/usr/local/KDE-4.0/etc/xdg
XDG_DATA_DIRS=$KDEDIR/share
 
export XDG_CONFIG_DIRS XDG_DATA_DIRS
 
LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib
export LD_LIBRARY_PATH
 
LIBXCB_ALLOW_SLOPPY_LOCK="true"
export LIBXCB_ALLOW_SLOPPY_LOCK
 
 
<nowiki>------8<------8<------8<------8<------8<------8<------8<------</nowiki>
 
This is in addition to other things that you need in the script which would probably go at the beginning -- this large block of junk is to be added at the end.  The XDG directories might need to be modified for your system.

Revision as of 10:45, 19 March 2008

Objectives

You probably want to keep your current KDE-3.5.x installation till you feel that KDE-4.x.y meets your needs for actual day to day use of your computer. Yet, you want to be able to change over with a minimum of work when the time comes to make the switch.

Method

The best way to accomplish this is to install the needed libraries on your system in the usual manner. Convention is that these should be installed in the /usr/local/ directory. By default, Troll Tech installs Qt in: /usr/local/Trolltech/Qt-4/. The current KDE-4.0 release branch should be built against Qt-4.3.x (the latest in this branch is 4.3.3 which should be used unless there are reasons not to use it). It is best to install KDE-4.x.y in its own directory so that the directory can be deleted if some large problem occurs. I will be using /usr/local/KDE-4.0/ but you can call it whatever you want.

We will keep configurations straight by using a separate user for accessing KDE-4.x.y. This user account will contain your configurations and will have a script to set the environment variables (.bash_profile if using Linux).

Installation

Create the User Account

Use whatever method you wish to create a new user account. Mine is called: "KDE4". Then edit or create the user specific login script (.bash_profile for Linux). There is a lot that goes into this. Note that this presumes that USER was correctly set by the system login script.

------8<------8<------8<------8<------8<------8<------8<------


# Redundant setting of HOME as work around for Bash bug

HOME=/home/KDE4 PATH=$HOME/bin:$PATH

export PATH HOME

XDG_DATA_HOME="$HOME/.local/share" XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME XDG_CONFIG_HOME

KDEDIR=/usr/local/KDE-4.0 KDEHOME=$HOME/.kde4 KDETMP=/tmp/$USER-kde4 mkdir -p $KDETMP KDEVARTMP=/var/tmp/$USER-kde4 mkdir -p $KDEVARTMP KDEDIRS=$KDEDIR PKG_CONFIG_PATH=/usr/local/KDE-4.0/lib/pkgconfig:$PKG_CONFIG_PATH export KDEDIR KDEHOME KDETMP KDEVARTMP KDEDIRS PKG_CONFIG_PATH

QTDIR=/usr/local/Trolltech/Qt-4 QT_PLUGIN_PATH=$KDEDIR/lib/kde4/plugins:$QT_PLUGIN_PATH PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH export QTDIR QT_PLUGIN_PATH PKG_CONFIG_PATH

PATH=$QTDIR/bin:$KDEDIR/bin:$PATH export PATH

XDG_CONFIG_DIRS=/usr/local/KDE-4.0/etc/xdg XDG_DATA_DIRS=$KDEDIR/share

export XDG_CONFIG_DIRS XDG_DATA_DIRS

LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib export LD_LIBRARY_PATH

LIBXCB_ALLOW_SLOPPY_LOCK="true" export LIBXCB_ALLOW_SLOPPY_LOCK


------8<------8<------8<------8<------8<------8<------8<------

This is in addition to other things that you need in the script which would probably go at the beginning -- this large block of junk is to be added at the end. The XDG directories might need to be modified for your system.