KDE 4.x.x i Qt 4.4.0

Rasprave u vezi Linux aplikacija.

Moderator/ica: Moderatori/ce

Odgovori
Avatar
Tux Slave
Postovi: 519
Pridružen/a: 25 ožu 2008, 14:47
Spol: M
OS: Fedora 10 - KDE 4.2.x
Lokacija: Nova Gradiska
Kontakt:

KDE 4.x.x i Qt 4.4.0

Post Postao/la Tux Slave »

Posto nema foruma vezanog uz programiranje evo ovdje cu postat.

Ovako radim si build enviorment za KDE 4.x.x i sve potrebne libraryie sam skinuo, ali imam problema sa Qt. Posto za KDE 4.1(svn trunk) treba Qt 4.4.0 minimalno fetchiro sam sa kdeovog svna qt-copy(zadnja verzija Qt malo modificiranog za KDE) i pri konfiguriranju sam odabrao lokaciju instalacije /home/iggi/svn/KDE/Qt. Sve super zavrsilo kod kompajliranja i instalacije(da koristio sam prefix da odaberem proslo napisani direktorij kao instalacijski). E sad pocinju problemi. cmake(da, u KDE 4.x.x se on koristi) mi nemoze naci instalaciju Qt 4.4.0 - pronadje instalaciju Qt 4.3.2 ali to mi je mala verzija. Ovako napravio sam novog usera kde-dev sa istim ovlastima kao ja i napravio mu posebni .bashrc file u kojemu sam naveo kao qt PATH variablu /home/iggi/svn/KDE/Qt. Isti vrag se desava sa njim kad pokusam buildati kdelibs. Pa osto sam bez pameti. Do hebenih 4 sata sam se zajebavo s ovim i nisam rijesio. Evo vam taj .bashrc file. Odmah da napomenem da nisam ja pisao ovaj file nego je to sa KDEove stranice jer uvelike pomaze kod buildanja KDEa 4.x.x iz sourcea. File je velik, jako velik.

Kod: Označi sve

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    ;;
*)
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    ;;
esac

# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
#    . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi




## A script to setup some needed variables and functions for KDE 4 development.
## This should normally go in the ~/.bashrc file of your kde-devel user, so
## that it is executed when a session for that user is started.
##
## If you don't use a separate user, the first section with the 
## environment variables should go into a separate script.
 
prepend() { [ -d "$2" ] && eval $1=\"$2\$\{$1:+':'\$$1\}\" && export $1 ; } 
 
# Other
# you might want to set a full value for PATH rather than prepend'ing, to make
# sure the your kde3 path isn't in here.
PATH /home/iggi/svn/KDE/Qt/include
 
# Qt
# only set Qt related variables if you compiled Qt on your own
# (which is discouraged). if you use the distro provided Qt, skip
# this section. Comment it if necessary.
export QTDIR=/home/iggi/svn/KDE/Qt
prepend PATH $QTDIR/bin
prepend LD_LIBRARY_PATH $QTDIR/lib
prepend PKG_CONFIG_PATH $QTDIR/lib/pkgconfig
 
 
# KDE
export KDEDIR=$HOME/kde
export KDEHOME=$HOME/.kde4
export KDETMP=/tmp/$USER-kde4
mkdir -p $KDETMP
export KDEDIRS=$KDEDIR
prepend PATH $KDEDIR/bin
prepend LD_LIBRARY_PATH $KDEDIR/lib
prepend PKG_CONFIG_PATH $KDEDIR/lib/pkgconfig
prepend QT_PLUGIN_PATH $KDEDIR/lib/kde4/plugins
 
# CMake
# Make sure CMake searches the right places.
prepend CMAKE_LIBRARY_PATH $KDEDIR/lib
prepend CMAKE_INCLUDE_PATH $KDEDIR/include
 
# DBus
# only set DBUS related variables if you compiled dbus on your own
# (which is really discouraged). if you use the distro provided dbus,
# skip this variable. Uncomment it if necessary.
#export DBUSDIR=$KDEDIR
#prepend PKG_CONFIG_PATH $DBUSDIR/lib/pkgconfig
 
# only needed on some strange systems for compiling Qt. do not set
# it unless you have to.
#export YACC='byacc -d'
 
# XDG
unset XDG_DATA_DIRS # to avoid seeing kde3 files from /usr
unset XDG_CONFIG_DIRS
 
# you might want to change these:
export KDE_BUILD=/home/iggi/svn/KDE/build
export KDE_SRC=/home/iggi/svn/KDE/
 
# make the debug output prettier
export KDE_COLOR_DEBUG=1
export QTEST_COLORED=1
 
# Make
# Tell many scripts how to switch from source dir to build dir:
export OBJ_REPLACEMENT="s#$KDE_SRC#$KDE_BUILD#"
# Use makeobj instead of make, to automatically switch to the build dir.
# If you don't have makeobj, install the package named kdesdk-scripts or 
# kdesdk, or check out kdesdk/scripts from svn.
#----------------__!!!!!!!!!!!!!!!!!!_______!!!!!!!!!!!!!____ maybe need this later
alias make=makeobj
 
# Uncomment the following lines if DBus does not work. DBus is not
# working if, when you run `dbus-uuidgen --ensure && qdbus`, you get an error.
#
 alias dbusstart="eval `PATH=$DBUSDIR/bin \
  $DBUSDIR/bin/dbus-launch --auto-syntax`"
 
# A function to easily build the current directory of KDE.
#
# This builds only the sources in the current ~/{src,build}/KDE subdirectory.
# Usage: cs KDE/kdebase && cmakekde
#   will build/rebuild the sources in ~/src/KDE/kdebase
function cmakekde {
	if test -n "$1"; then
		# srcFolder is defined via command line argument
		srcFolder="$1"
	else
		# get srcFolder for current dir
		srcFolder=`pwd | sed -e s,$KDE_BUILD,$KDE_SRC,`
	fi
	# we are in the src folder, change to build directory
	# Alternatively, we could just use makeobj in the commands below...
	current=`pwd`
	if [ "$srcFolder" = "$current" ]; then
		cb
	fi
	# to enable tests, add -DKDE4_BUILD_TESTS=TRUE to the next line.
	# you can also change "debugfull" to "debug" to save disk space.
	cmake "$srcFolder" -DCMAKE_INSTALL_PREFIX=$KDEDIR \
		-DCMAKE_BUILD_TYPE=debugfull
 
        # uncomment the following two lines to make builds wait after
        # configuration step, so that the user can check configure output
        #echo "Press <ENTER> to continue..."
        #read userinput
 
        # Note: To speed up compiling, change 'make -j2' to 'make -jx',
        #   where x is your number of processors +1
        nice make -j2 && \
        make install;
}
 
# for the lazy ones, add/comment other directories 
function cmakekdeall {
        cs kdesupport && svn up && cmakekde
        cs KDE/kdelibs && svn up && cmakekde
        cs KDE/kdepimlibs && svn up && cmakekde
        cs KDE/kdebase && svn up && cmakekde
        cs KDE/kdepim && svn up && cmakekde
        cs KDE/kdegraphics && svn up && cmakekde
        cs KDE/kdemultimedia && svn up && cmakekde
        cs KDE/kdenetwork && svn up && cmakekde
        cs KDE/kdeutils && svn up && cmakekde
}
 
# A function to easily change to the build directory.
# Usage: cb KDE/kdebase
#   will change to $KDE_BUILD/KDE/kdebase
# Usage: cb
#   will simply go to the build folder if you are currently in a src folder
#   Example:
#     $ pwd
#     /home/user/src/KDE/kdebase
#     $ cb && pwd
#     /home/user/build/KDE/kdebase
function cb {
	# Make sure build directory exists.
	mkdir -p "$KDE_BUILD"
 
	# command line argument
	if test -n "$1"; then
		cd "$KDE_BUILD/$1"
		return
	fi
	# substitute src dir with build dir
	dest=`pwd | sed -e s,$KDE_SRC,$KDE_BUILD,`
	if test ! -d "$dest"; then
		# build directory does not exist, create
		mkdir -p "$dest"
	fi
	cd "$dest"
}
 
# Change to the source directory.  Same as cb, except this
# switches to $KDE_SRC instead of $KDE_BUILD.
# Usage: cs KDE/kdebase
#	will change to $KDE_SRC/KDE/kdebase
# Usage: cs
#   will simply go to the source folder if you are currently in a build folder
#   Example:
#     $ pwd
#     /home/user/build/KDE/kdebase
#     $ cs && pwd
#     /home/user/src/KDE/kdebase
function cs {
	# Make sure source directory exists.
	mkdir -p "$KDE_SRC"
 
	# command line argument
	if test -n "$1"; then
		cd "$KDE_SRC/$1"
	else
		# substitute build dir with src dir
		dest=`pwd | sed -e s,$KDE_BUILD,$KDE_SRC,`
		current=`pwd`
		if [ "$dest" = "$current" ]; then
			cd "$KDE_SRC"
		else
			cd "$dest"
		fi
	fi
}
 
# Add autocompletion to cs function
function _cs_scandir
{
	base=$1
	ext=$2
	if [ -d $base ]; then
		for d in `ls $base`; do
			if [ -d $base/$d ]; then
				dirs="$dirs $ext$d/"
			fi
		done
	fi
}
 
function _cs()
{
	local cur dirs
	_cs_scandir "$KDE_SRC"
	_cs_scandir "$KDE_SRC/KDE" "KDE/"
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	COMPREPLY=( $(compgen -W "${dirs}" -- ${cur}) )
}
 
# Remove comment on next line to enable cs autocompletion
#complete -F _cs cs
 
function start3app {
  mkdir -p /tmp/$USER-kde
  export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games 
  export LD_LIBRARY_PATH= 
  export KDETMP=/tmp/$USER-kde 
  export KDEVARTMP=/var/tmp/$USER-kde 
  export KDEHOME=$HOME/.kde 
  export KDEDIR=/usr 
  export KDEDIRS=$KDEDIR 
  export DISPLAY=:0 
  eval "$@"
  source $HOME/.bashrc   #Reset environment variables again
}
Svaka pomoc dobrodosla. :)
Avatar
Tux Slave
Postovi: 519
Pridružen/a: 25 ožu 2008, 14:47
Spol: M
OS: Fedora 10 - KDE 4.2.x
Lokacija: Nova Gradiska
Kontakt:

Re: KDE 4.x.x i Qt 4.4.0

Post Postao/la Tux Slave »

Koji banalan problem. Evo opisa. U /etc/bash.bashrc mi je bila druga QT PATH variabla te mi je cmake trazio stalno preko nje. Kad sam to sredio dosao je novi problem. Svaki put kad pokrenem "cmakekde"(funkcija-pogledaj u .bashrc sta sam postao) nije mi mogao naci novi Qt sto sam ja kompajlirao. Problem je bio u tome sto je cmake trazio /home/iggi/kde/Qt/ a meni je ime foldera bilo /home/iggi/KDE/Qt.

Ono, mogao sam traziti stoljecima da nisam letao po mumble i ispitivao ostale Linuxase. Evo upravo sad buildam kdelibs od 4.1(to se nalazi u svn trunku) te cu poslje toga ostatak.
Avatar
kaiwan
Postovi: 934
Pridružen/a: 04 pro 2007, 21:59
Spol: M
OS: OpenSUSE 11.2, KDE 4.4.3
Lokacija: jastrebarsko

Re: KDE 4.x.x i Qt 4.4.0

Post Postao/la kaiwan »

Sto je to mumble ?
Neki chat servis ?
Be the change you want to see in the world! Dalai Lama.
Avatar
Tux Slave
Postovi: 519
Pridružen/a: 25 ožu 2008, 14:47
Spol: M
OS: Fedora 10 - KDE 4.2.x
Lokacija: Nova Gradiska
Kontakt:

Re: KDE 4.x.x i Qt 4.4.0

Post Postao/la Tux Slave »

kaiwan je napisao/la:Sto je to mumble ?
Neki chat servis ?
VoIP(Voice over IP) program, besplatan, open source, razgovori kriptirani. Odlican program - ja ga koristim vec godinu mozda nesto vise. Dosta Linuxasa se moze naci, pa se lijepo za sve probleme mogu naci odgovori.

Nesto kao TeamSpeak i Ventrilo.

http://mumble.sourceforge.net/
Odgovori