summaryrefslogtreecommitdiffstats
path: root/win/tools
diff options
context:
space:
mode:
Diffstat (limited to 'win/tools')
-rwxr-xr-xwin/tools/.build_kdelibs_comon14
-rwxr-xr-xwin/tools/.check_kde_env22
-rwxr-xr-xwin/tools/.copy_missing_headers25
-rw-r--r--win/tools/README.tools6
-rw-r--r--win/tools/build_kdelibs_dbg82
-rw-r--r--win/tools/build_kdelibs_rel73
-rwxr-xr-xwin/tools/collect_kdelibs_pro_files22
-rwxr-xr-xwin/tools/kdcopidl25
-rwxr-xr-xwin/tools/kde_env29
-rwxr-xr-xwin/tools/kde_env_custom.template15
-rwxr-xr-xwin/tools/kmoc19
-rwxr-xr-xwin/tools/mkrel11
-rwxr-xr-xwin/tools/update_kdelibs_pro_files30
13 files changed, 373 insertions, 0 deletions
diff --git a/win/tools/.build_kdelibs_comon b/win/tools/.build_kdelibs_comon
new file mode 100755
index 000000000..5ed09f724
--- /dev/null
+++ b/win/tools/.build_kdelibs_comon
@@ -0,0 +1,14 @@
+#!/bin/bash
+# compile entire kdelibs/win32 : common part for dbg and release target
+# (c) 2005, Jaroslaw Staniek, js@iidea.pl
+
+pwd=`pwd`
+if [ -n "$MSVC" ] ; then
+ make='nmake -nologo'
+elif [ -n "$BCB" ] ; then
+ #sometimes this could bmake (see qt3/free bootstrap)
+ make='make'
+else
+ echo "No compiler detected (MSVC or other)"
+ exit 1
+fi
diff --git a/win/tools/.check_kde_env b/win/tools/.check_kde_env
new file mode 100755
index 000000000..d22cf13e6
--- /dev/null
+++ b/win/tools/.check_kde_env
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# checks current environment
+
+if [ -z "$KDEWIN" ] ; then
+ echo `basename $0`": \$KDEWIN environment variable is not set. Set it to absolute path of kdelibs/win32 source code, e.g. C:\\kdelibs"
+ exit 1
+fi
+
+if [ -z "$KDEDIR" ] ; then
+ echo `basename $0`": \$KDEDIR environment variable is not set. Set it to absolute path of kdelibs/win32 binaries, e.g. C:\\kde"
+ exit 1
+fi
+
+if [ -z "$KDELIBS" -o "$KDEWIN\\kdelibs" != "$KDELIBS" ] ; then
+ echo `basename $0`": \$KDELIBS = \"$KDELIBS\" but \$KDEWIN = \"$KDEWIN\""
+ echo "\$KDELIBS environment variable is not properly set. Set it to absolute path of kdelibs/win32 source code. It needs to be equal to \"\$KDEWIN\\kdelibs\", e.g. C:\\kdewin32\\kdelibs".
+ echo "You may need to run:"
+ echo " source kde_env"
+ exit 1
+fi
+
diff --git a/win/tools/.copy_missing_headers b/win/tools/.copy_missing_headers
new file mode 100755
index 000000000..9ac1e3906
--- /dev/null
+++ b/win/tools/.copy_missing_headers
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# copies missing compiler headers
+
+.check_kde_env || exit 1
+
+if [ -n "$MSVC" ] ; then
+ dir="$MSVC/vc7/include"
+ mkdir -p "$KDELIBS/win/msvc/" || exit 1
+ mkdir -p "$KDELIBS/win/sys/msvc/" || exit 1
+ cp "$dir/ctype.h" "$dir/signal.h" "$dir/stdlib.h" "$dir/string.h" "$KDELIBS/win/msvc/" || exit 1
+ cp "$dir/fcntl.h" "$dir/sys/stat.h" "$dir/sys/types.h" "$KDELIBS/win/sys/msvc/" || exit 1
+
+elif [ -n "$BCB" ] ; then
+ dir="$BCB/include"
+ mkdir -p "$KDELIBS/win/bcc/" || exit 1
+ mkdir -p "$KDELIBS/win/sys/bcc/" || exit 1
+ cp "$dir/ctype.h" "$dir/signal.h" "$dir/stdlib.h" "$dir/string.h" "$KDELIBS/win/bcc/" || exit 1
+ cp "$dir/fcntl.h" "$dir/sys/stat.h" "$dir/sys/types.h" "$KDELIBS/win/sys/bcc/" || exit 1
+
+else
+ echo "No compiler detected (MSVC or other)"
+ exit 1
+fi
+
diff --git a/win/tools/README.tools b/win/tools/README.tools
new file mode 100644
index 000000000..35b3a5264
--- /dev/null
+++ b/win/tools/README.tools
@@ -0,0 +1,6 @@
+kdelibs/win32 build tools
+
+(c) 2003-2005, Jaroslaw Staniek
+
+Add this directory to your PATH.
+Cygwin (or other bash replacement) required.
diff --git a/win/tools/build_kdelibs_dbg b/win/tools/build_kdelibs_dbg
new file mode 100644
index 000000000..6b9aaed38
--- /dev/null
+++ b/win/tools/build_kdelibs_dbg
@@ -0,0 +1,82 @@
+#!/bin/bash
+# compile entire kdelibs/win32 in debug mode
+# (c) 2003-2005, Jaroslaw Staniek, js@iidea.pl
+
+if [ "$1" == "noclean" ] ; then
+ noclean=1
+fi
+
+update_kdelibs_pro_files || exit 1
+.copy_missing_headers || exit 1
+source .build_kdelibs_comon || exit 1
+
+cd "$KDELIBS"
+
+echo "-------------------------------------------------"
+echo "Building Debug Version of KDElibs/win32"
+echo "Source directory: \$KDELIBS = $KDELIBS"
+echo "Version: $KDE_VER_MAJ.$KDE_VER_MIN.$KDE_VER_PAT"
+echo "Destination directory: \$KDEDIR = $KDEDIR"
+if [ -n $noclean ] ; then
+ echo "Options: noclean"
+fi
+echo "-------------------------------------------------"
+echo
+
+# special
+cd win/9x && $make || exit 1
+cd "$pwd"
+
+if [ -d "kstyles/thinkeramik/widget-engine" ] ; then
+ additional="kstyles/thinkeramik/widget-engine/genembed kstyles/thinkeramik/widget-engine "
+fi
+
+# all
+for d in \
+win \
+libltdl \
+dcop/KDE-ICE \
+dcop \
+dcop/dcopidl \
+dcop/dcopidl2cpp \
+dcop/dcopserver \
+dcop/dcopserver_shutdown \
+dcop/iceauth \
+kdefx \
+$additional \
+kdecore \
+kdeui \
+kio \
+kresources \
+kabc/vcard \
+kabc \
+kutils \
+kparts \
+kmdi \
+kioslave/gzip \
+kioslave/bzip2 \
+interfaces/ktexteditor \
+kate/interfaces \
+kate/part \
+ ; do
+ echo ================== $d =================
+ cd $d || exit 1
+ if [ -z $noclean ] ; then
+ $make clean
+ fi
+ qmake && $make || exit 1
+ cd $pwd
+done
+
+cd kdewidgets
+qmake makekdewidgets.pro && $make clean && $make || exit 1
+qmake && $make clean && $make || exit 1
+
+# copy kdewidgets plugin for Qt Designer
+cp $KDEDIR/lib/kde3/plugins/designer/kdewidgets.dll $QTDIR/plugins/designer/
+
+cd $pwd
+
+cd kded
+./makeall.sh || exit 1
+cd $pwd
diff --git a/win/tools/build_kdelibs_rel b/win/tools/build_kdelibs_rel
new file mode 100644
index 000000000..54221f333
--- /dev/null
+++ b/win/tools/build_kdelibs_rel
@@ -0,0 +1,73 @@
+#!/bin/bash
+# compile entire kdelibs/win32 in release mode
+# (c) 2003-2005, Jaroslaw Staniek, js@iidea.pl
+
+if [ "$1" == "noclean" ] ; then
+ noclean=1
+fi
+
+update_kdelibs_pro_files || exit 1
+.copy_missing_headers || exit 1
+source .build_kdelibs_comon || exit 1
+
+cd "$KDELIBS"
+
+echo "-------------------------------------------------"
+echo "Building Release Version of KDElibs/win32"
+echo "Source directory: \$KDELIBS = $KDELIBS"
+echo "Version: $KDE_VER_MAJ.$KDE_VER_MIN.$KDE_VER_PAT"
+echo "Destination directory: \$KDEDIR = $KDEDIR"
+if [ -n $noclean ] ; then
+ echo "Options: noclean"
+fi
+echo "-------------------------------------------------"
+echo
+
+# special
+cd win/9x || exit 1
+if [ "$1" != "noclean" ] ; then
+ $make -f Makefile.rel clean
+fi
+$make -f Makefile.rel || exit 1
+cd $pwd
+
+# all
+for d in \
+win \
+libltdl \
+dcop/KDE-ICE \
+dcop \
+dcop/dcopidl \
+dcop/dcopidl2cpp \
+dcop/dcopserver \
+dcop/dcopserver_shutdown \
+dcop/iceauth \
+kdefx \
+kdecore \
+kdeui \
+kstyles/thinkeramik/widget-engine \
+kio \
+kresources \
+kabc/vcard \
+kabc \
+kutils \
+kparts \
+kmdi \
+kioslave/gzip \
+kioslave/bzip2 \
+interfaces/ktexteditor \
+kate/interfaces \
+kate/part \
+ ; do
+ echo ================== $d =================
+ cd $d || exit 1
+ if [ -z $noclean ] ; then
+ $make -f Makefile.release clean
+ fi
+ mkrel || exit 1
+ cd $pwd
+done
+
+cd kded
+./makeall_rel.sh || exit 1
+cd $pwd
diff --git a/win/tools/collect_kdelibs_pro_files b/win/tools/collect_kdelibs_pro_files
new file mode 100755
index 000000000..ea2466ef2
--- /dev/null
+++ b/win/tools/collect_kdelibs_pro_files
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Copies all used .pro (and a few shell) files kdelibs/ to kdelibs/win/pro_files/
+# what makes it easier to commit that to KDE CVS
+# (c) 2005, Jaroslaw Staniek
+
+dest=win/pro_files
+mkdir -p $dest
+
+.check_kde_env || exit 1
+
+cd "$KDELIBS"
+
+for pro in `find . -name \*.pro | grep -v "\/\.\|^\.\/win/"` kded/makeall.sh kded/makeall_rel.sh ; do
+ dir=`dirname "$pro"`
+ mkdir -p "$dest/$dir"
+ if [ "$pro" -nt "$dest/$pro" ] ; then
+ cp -p "$pro" "$dest/$pro"
+ echo "$pro"
+ fi
+done
+
diff --git a/win/tools/kdcopidl b/win/tools/kdcopidl
new file mode 100755
index 000000000..f695659d7
--- /dev/null
+++ b/win/tools/kdcopidl
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# runs kdcopidl for current dir
+# or for $1 dir, (and $2, $3, $4, $5), whatever is provided
+
+if [ -n "$1" ] ; then
+ dir="$1"
+else
+ dir="."
+fi
+
+find $dir -maxdepth 1 -name \*.h | while read ; do
+ grep K_DCOP $REPLY > /dev/null || continue
+ name=`echo $REPLY | sed -e "s/\\.h//"`
+ if [ $name".kidl" -ot $REPLY -o ! -f $name".kidl" -o ! -f $name"_skel.cpp" -o ! -f $name"_stub.cpp" ] ; then
+ echo DCOPIDL for $REPLY...
+ dcopidl $REPLY > $name".kidl"
+ dcopidl2cpp $name".kidl"
+ fi
+done
+
+[ -n "$2" ] && kdcopidl $2
+[ -n "$3" ] && kdcopidl $3
+[ -n "$4" ] && kdcopidl $4
+[ -n "$5" ] && kdcopidl $5
diff --git a/win/tools/kde_env b/win/tools/kde_env
new file mode 100755
index 000000000..5920eae99
--- /dev/null
+++ b/win/tools/kde_env
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# KDElibs/win32 Build Environment
+#
+
+# Copy kde_env_custom.template to kde_env_custom and this it's paths if needed:
+
+source "kde_env_custom" || exit 1
+
+if [ -n "$MSVC" ] ; then
+ export PATH="$MSVC\\bin;$PATH" #to avoid conflict with, say, GNU link
+ export INCLUDE="$MSVC\\include;$INCLUDE"
+fi
+
+# Generic settings
+export KDELIBS=$KDEWIN\\kdelibs # KDElibs/win32 source directory
+export INCLUDE="$KDELIBS\\win;$KDELIBS;$KDELIBS\\kdecore;$KDELIBS\\kdefx;$KDELIBS\\kdeprint;$KDELIBS\\kdeui;$KDELIBS\\kmdi;$KDELIBS\\dcop;$KDELIBS\\kio;$KDELIBS\\kio\\kio;$KDELIBS\\kio\\kfile;$INCLUDE"
+
+# Version information for binaries
+# We're changing this from time to time
+
+export KDE_VER_MAJ=3
+export KDE_VER_MIN=5
+export KDE_VER_PAT=0
+export KDE_VER=$KDE_VER_MAJ$KDE_VER_MIN$KDE_VER_PAT
+
+# Utils
+
+export MAKE="nmake /NOLOGO"
diff --git a/win/tools/kde_env_custom.template b/win/tools/kde_env_custom.template
new file mode 100755
index 000000000..a498805e9
--- /dev/null
+++ b/win/tools/kde_env_custom.template
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Copy this file as kde_env_custom and alter it
+
+
+ # MSVC instalation directory, please change, or comment it out if not using msvc compiler
+ MSVC="c:\\vs7"
+
+# Top KDE Directory - target of your compilation, please change
+export KDEDIR="c:\\kde"
+
+# KDElibs/win32 top source directory, please change
+KDEWIN="c:\\kdewin32"
+
+export MSVC KDEWIN INCLUDE
diff --git a/win/tools/kmoc b/win/tools/kmoc
new file mode 100755
index 000000000..2fef8ea60
--- /dev/null
+++ b/win/tools/kmoc
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Creates KDE-compatible .moc files out of .h files in current directory
+# .moc files are saved to moc/ subdirectory.
+# Any additional arguments are directories - kmoc will be called for each of them.
+
+mkdir -p moc
+find . -maxdepth 1 -name \*.h | while read ; do
+ grep Q_OBJECT $REPLY > /dev/null || continue
+ moc=moc/`echo $REPLY | sed -e "s/\\.h/\\.moc/;s/\\.\\///"`
+ if [ $moc -ot $REPLY ] ; then echo mocing $REPLY... ; moc $REPLY -o $moc ; fi
+done
+
+pwd=`pwd`
+while [ $# -gt 0 ] ; do
+ cd $pwd/$1 && kmoc
+ cd $pwd
+ shift
+done
diff --git a/win/tools/mkrel b/win/tools/mkrel
new file mode 100755
index 000000000..34b9644ea
--- /dev/null
+++ b/win/tools/mkrel
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# make relese version of lib/app in the cwd
+
+mkdir -p obj_rel
+
+if [ $# -eq 0 ] ; then
+ qmake KW_CONFIG=release -o Makefile.release || exit 1
+fi
+
+nmake -nologo -f Makefile.release $*
diff --git a/win/tools/update_kdelibs_pro_files b/win/tools/update_kdelibs_pro_files
new file mode 100755
index 000000000..15f745cf8
--- /dev/null
+++ b/win/tools/update_kdelibs_pro_files
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Copies all used .pro (and a few shell) files from kdelibs/win/pro_files/ to kdelibs/
+# so they can be used to build kdelibs.
+# Note: only newer files are copied over older.
+# (c) 2005, Jaroslaw Staniek, js@iidea.pl
+
+.check_kde_env || exit 1
+
+src=win/pro_files
+dest=../..
+
+cd "$KDELIBS/$src"
+
+for pro in `find . -name \*.pro -o -name \*.sh` ; do
+ dir=`dirname "$pro"`
+ if [ ! -d "$KDELIBS/$dir" ] ; then
+ echo "no \$KDELIBS/$dir directory: creating it"
+ mkdir -p "$KDELIBS/$dir"
+ fi
+
+ if [ ! "$pro" -nt "$dest/$pro" ] ; then
+ true
+# echo "*SKIPPED* $pro is not newer than destination in $KDELIBS"
+ else
+ echo "UPDATING \$KDELIBS/$pro"
+ cp $pro $dest/$pro
+ fi
+done
+