update uwproj

Fri, 18 Apr 2025 11:48:11 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 18 Apr 2025 11:48:11 +0200
changeset 573
2360c1696a34
parent 572
e655587695c0
child 574
19de5292f08f

update uwproj

configure file | annotate | diff | comparison | revisions
make/configure.vm file | annotate | diff | comparison | revisions
make/toolchain.sh file | annotate | diff | comparison | revisions
make/uwproj.xsd file | annotate | diff | comparison | revisions
ui/qt/toolbar.cpp file | annotate | diff | comparison | revisions
ui/qt/toolbar.h file | annotate | diff | comparison | revisions
--- a/configure	Fri Apr 18 10:43:09 2025 +0200
+++ b/configure	Fri Apr 18 11:48:11 2025 +0200
@@ -1,5 +1,121 @@
 #!/bin/sh
 
+
+# some utility functions
+isplatform()
+{
+    for p in $PLATFORM
+    do
+        if [ "$p" = "$1" ]; then
+            return 0
+        fi
+    done
+    return 1
+}
+notisplatform()
+{
+    for p in $PLATFORM
+    do
+        if [ "$p" = "$1" ]; then
+            return 1
+        fi
+    done
+    return 0
+}
+istoolchain()
+{
+    for t in $TOOLCHAIN
+    do
+        if [ "$t" = "$1" ]; then
+            return 0
+        fi
+    done
+    return 1
+}
+notistoolchain()
+{
+    for t in $TOOLCHAIN
+    do
+        if [ "$t" = "$1" ]; then
+            return 1
+        fi
+    done
+    return 0
+}
+
+# clean abort
+abort_configure()
+{
+    rm -Rf "$TEMP_DIR"
+    exit 1
+}
+
+# Test for availability of pkg-config
+PKG_CONFIG=`command -v pkg-config`
+: ${PKG_CONFIG:="false"}
+
+# Simple uname based platform detection
+# $PLATFORM is used for platform dependent dependency selection
+OS=`uname -s`
+OS_VERSION=`uname -r`
+printf "detect platform... "
+if [ "$OS" = "SunOS" ]; then
+    PLATFORM="solaris sunos unix svr4"
+elif [ "$OS" = "Linux" ]; then
+    PLATFORM="linux unix"
+elif [ "$OS" = "FreeBSD" ]; then
+    PLATFORM="freebsd bsd unix"
+elif [ "$OS" = "OpenBSD" ]; then
+    PLATFORM="openbsd bsd unix"
+elif [ "$OS" = "NetBSD" ]; then
+    PLATFORM="netbsd bsd unix"
+elif [ "$OS" = "Darwin" ]; then
+    PLATFORM="macos osx bsd unix"
+elif echo "$OS" | grep -i "MINGW" > /dev/null; then
+    PLATFORM="windows mingw"
+fi
+: ${PLATFORM:="unix"}
+
+PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
+echo "$PLATFORM_NAME"
+
+
+# help text
+printhelp()
+{
+    echo "Usage: $0 [OPTIONS]..."
+    cat << __EOF__
+Installation directories:
+  --prefix=PREFIX         path prefix for architecture-independent files
+                          [$prefix]
+  --exec-prefix=EPREFIX   path prefix for architecture-dependent files
+                          [PREFIX]
+
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        system configuration files [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+
+Build Types:
+  --debug                 add extra compile flags for debug builds
+  --release               add extra compile flags for release builds
+
+Options:
+  --toolkit=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|cocoa|motif)
+
+__EOF__
+}
+
 # create temporary directory
 TEMP_DIR=".tmp-`uname -n`"
 rm -Rf "$TEMP_DIR"
@@ -36,47 +152,6 @@
 
 # features
 
-# clean abort
-abort_configure()
-{
-    rm -Rf "$TEMP_DIR"
-    exit 1
-}
-
-# help text
-printhelp()
-{
-    echo "Usage: $0 [OPTIONS]..."
-    cat << __EOF__
-Installation directories:
-  --prefix=PREFIX         path prefix for architecture-independent files
-                          [/usr]
-  --exec-prefix=EPREFIX   path prefix for architecture-dependent files
-                          [PREFIX]
-
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        system configuration files [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-
-Options:
-  --debug                 add extra compile flags for debug builds
-  --release               add extra compile flags for release builds
-  --toolkit=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|cocoa|motif)
-
-__EOF__
-}
-
 #
 # parse arguments
 #
@@ -99,10 +174,11 @@
         "--infodir="*)        infodir=${ARG#--infodir=} ;;
         "--mandir"*)          mandir=${ARG#--mandir} ;;
         "--localedir"*)       localedir=${ARG#--localedir} ;;
-        "--help"*) printhelp; abort_configure ;;
-        "--debug")           BUILD_TYPE="debug" ;;
-        "--release")         BUILD_TYPE="release" ;;
+        "--help"*)            printhelp; abort_configure ;;
+        "--debug")            BUILD_TYPE="debug" ;;
+        "--release")          BUILD_TYPE="release" ;;
         "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;;
+        "--toolkit")  echo "option '$ARG' needs a value:"; echo "  $ARG=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|cocoa|motif)"; abort_configure ;;
         "-"*) echo "unknown option: $ARG"; abort_configure ;;
     esac
 done
@@ -144,76 +220,6 @@
     echo ok
 fi
 
-# Test for availability of pkg-config
-PKG_CONFIG=`command -v pkg-config`
-: ${PKG_CONFIG:="false"}
-
-# Simple uname based platform detection
-# $PLATFORM is used for platform dependent dependency selection
-OS=`uname -s`
-OS_VERSION=`uname -r`
-printf "detect platform... "
-if [ "$OS" = "SunOS" ]; then
-    PLATFORM="solaris sunos unix svr4"
-elif [ "$OS" = "Linux" ]; then
-    PLATFORM="linux unix"
-elif [ "$OS" = "FreeBSD" ]; then
-    PLATFORM="freebsd bsd unix"
-elif [ "$OS" = "OpenBSD" ]; then
-    PLATFORM="openbsd bsd unix"
-elif [ "$OS" = "NetBSD" ]; then
-    PLATFORM="netbsd bsd unix"
-elif [ "$OS" = "Darwin" ]; then
-    PLATFORM="macos osx bsd unix"
-elif echo "$OS" | grep -i "MINGW" > /dev/null; then
-    PLATFORM="windows mingw"
-fi
-: ${PLATFORM:="unix"}
-
-PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
-echo "$PLATFORM_NAME"
-
-isplatform()
-{
-    for p in $PLATFORM
-    do
-        if [ "$p" = "$1" ]; then
-            return 0
-        fi
-    done
-    return 1
-}
-notisplatform()
-{
-    for p in $PLATFORM
-    do
-        if [ "$p" = "$1" ]; then
-            return 1
-        fi
-    done
-    return 0
-}
-istoolchain()
-{
-    for t in $TOOLCHAIN
-    do
-        if [ "$t" = "$1" ]; then
-            return 0
-        fi
-    done
-    return 1
-}
-notistoolchain()
-{
-    for t in $TOOLCHAIN
-    do
-        if [ "$t" = "$1" ]; then
-            return 1
-        fi
-    done
-    return 0
-}
-
 
 # generate vars.mk
 cat > "$TEMP_DIR/vars.mk" << __EOF__
@@ -609,9 +615,9 @@
 DEPENDENCIES_FAILED=
 ERROR=0
 # unnamed dependencies
-TEMP_CFLAGS=
-TEMP_CXXFLAGS=
-TEMP_LDFLAGS=
+TEMP_CFLAGS="$CFLAGS"
+TEMP_CXXFLAGS="$CXXFLAGS"
+TEMP_LDFLAGS="$LDFLAGS"
 while true
 do
     while true
@@ -682,6 +688,16 @@
     break
 done
 
+# build type
+if [ "$BUILD_TYPE" = "debug" ]; then
+    TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS"
+    TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+if [ "$BUILD_TYPE" = "release" ]; then
+    TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS"
+    TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+
 # add general dependency flags to flags.mk
 echo "# general flags" >> "$TEMP_DIR/flags.mk"
 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
@@ -985,6 +1001,11 @@
             ERROR=1
             DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
         fi
+    else
+        echo
+        echo "Invalid option value - usage:"
+        echo "  --toolkit=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|cocoa|motif)"
+        abort_configure
     fi
 fi
 
@@ -994,22 +1015,6 @@
 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
     echo "TK_CXXFLAGS  += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
-if [ "$BUILD_TYPE" = "debug" ]; then
-    if [ -n "$lang_c" ]; then
-        echo 'TK_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo 'TK_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
-if [ "$BUILD_TYPE" = "release" ]; then
-    if [ -n "$lang_c" ]; then
-        echo 'TK_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo 'TK_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
 if [ -n "${TEMP_LDFLAGS}" ]; then
     echo "TK_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
@@ -1033,12 +1038,15 @@
 echo
 
 # generate the config.mk file
+pwd=`pwd`
 cat > "$TEMP_DIR/config.mk" << __EOF__
 #
-# config.mk generated by configure
+# config.mk generated by:
+# pwd: $pwd
+# $0 $@
 #
 
 __EOF__
 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
-cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
+cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
 rm -Rf "$TEMP_DIR"
--- a/make/configure.vm	Fri Apr 18 10:43:09 2025 +0200
+++ b/make/configure.vm	Fri Apr 18 11:48:11 2025 +0200
@@ -1,5 +1,133 @@
 #!/bin/sh
 
+#set( $D = '$' )
+#[[
+# some utility functions
+isplatform()
+{
+    for p in $PLATFORM
+    do
+        if [ "$p" = "$1" ]; then
+            return 0
+        fi
+    done
+    return 1
+}
+notisplatform()
+{
+    for p in $PLATFORM
+    do
+        if [ "$p" = "$1" ]; then
+            return 1
+        fi
+    done
+    return 0
+}
+istoolchain()
+{
+    for t in $TOOLCHAIN
+    do
+        if [ "$t" = "$1" ]; then
+            return 0
+        fi
+    done
+    return 1
+}
+notistoolchain()
+{
+    for t in $TOOLCHAIN
+    do
+        if [ "$t" = "$1" ]; then
+            return 1
+        fi
+    done
+    return 0
+}
+
+# clean abort
+abort_configure()
+{
+    rm -Rf "$TEMP_DIR"
+    exit 1
+}
+
+# Test for availability of pkg-config
+PKG_CONFIG=`command -v pkg-config`
+: ${PKG_CONFIG:="false"}
+
+# Simple uname based platform detection
+# $PLATFORM is used for platform dependent dependency selection
+OS=`uname -s`
+OS_VERSION=`uname -r`
+printf "detect platform... "
+if [ "$OS" = "SunOS" ]; then
+    PLATFORM="solaris sunos unix svr4"
+elif [ "$OS" = "Linux" ]; then
+    PLATFORM="linux unix"
+elif [ "$OS" = "FreeBSD" ]; then
+    PLATFORM="freebsd bsd unix"
+elif [ "$OS" = "OpenBSD" ]; then
+    PLATFORM="openbsd bsd unix"
+elif [ "$OS" = "NetBSD" ]; then
+    PLATFORM="netbsd bsd unix"
+elif [ "$OS" = "Darwin" ]; then
+    PLATFORM="macos osx bsd unix"
+elif echo "$OS" | grep -i "MINGW" > /dev/null; then
+    PLATFORM="windows mingw"
+fi
+: ${PLATFORM:="unix"}
+
+PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
+echo "$PLATFORM_NAME"
+]]#
+
+# help text
+printhelp()
+{
+    echo "Usage: $0 [OPTIONS]..."
+    cat << __EOF__
+Installation directories:
+  --prefix=PREFIX         path prefix for architecture-independent files
+                          [${D}prefix]
+  --exec-prefix=EPREFIX   path prefix for architecture-dependent files
+                          [PREFIX]
+
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        system configuration files [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+
+Build Types:
+  --debug                 add extra compile flags for debug builds
+  --release               add extra compile flags for release builds
+#if( $options.size() > 0 )
+
+Options:
+#foreach( $opt in $options )
+  --${opt.argument}=${opt.valuesString}
+#end
+#end
+#if( $features.size() > 0 )
+
+Optional Features:
+#foreach( $feature in $features )
+${feature.helpText}
+#end
+#end
+
+__EOF__
+}
+
 # create temporary directory
 TEMP_DIR=".tmp-`uname -n`"
 rm -Rf "$TEMP_DIR"
@@ -33,12 +161,23 @@
 mandir=
 
 # custom variables
-#foreach( $var in $vars )
-#if( $var.exec )
-${var.varName}=`${var.value}`
-#else
-${var.varName}="${var.value}"
+#foreach( $cfg in $config )
+if true \
+#if( $cfg.platform )
+    && isplatform "${cfg.platform}" \
+#end
+#foreach( $np in $cfg.notList )
+      && notisplatform "${np}" \
 #end
+      ; then
+    #foreach( $var in $cfg.vars )
+    #if( $var.exec )
+    ${var.varName}=`${var.value}`
+    #else
+    ${var.varName}="${var.value}"
+    #end
+    #end
+fi
 #end
 
 # features
@@ -48,63 +187,10 @@
 #end
 #end
 
-# clean abort
-abort_configure()
-{
-    rm -Rf "$TEMP_DIR"
-    exit 1
-}
-
-# help text
-printhelp()
-{
-    echo "Usage: $0 [OPTIONS]..."
-    cat << __EOF__
-Installation directories:
-  --prefix=PREFIX         path prefix for architecture-independent files
-                          [/usr]
-  --exec-prefix=EPREFIX   path prefix for architecture-dependent files
-                          [PREFIX]
-
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        system configuration files [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-
-#if( $options.size() > 0 )
-Options:
-  --debug                 add extra compile flags for debug builds
-  --release               add extra compile flags for release builds
-#foreach( $opt in $options )
-  --${opt.argument}=${opt.valuesString}
-#end
-
-#end
-#if( $features.size() > 0 )
-Optional Features:
-#foreach( $feature in $features )
-${feature.helpText}
-#end
-
-#end
-__EOF__
-}
-
 #
 # parse arguments
 #
 BUILD_TYPE="default"
-#set( $D = '$' )
 for ARG in "$@"
 do
     case "$ARG" in
@@ -123,11 +209,12 @@
         "--infodir="*)        infodir=${D}{ARG#--infodir=} ;;
         "--mandir"*)          mandir=${D}{ARG#--mandir} ;;
         "--localedir"*)       localedir=${D}{ARG#--localedir} ;;
-        "--help"*) printhelp; abort_configure ;;
-        "--debug")           BUILD_TYPE="debug" ;;
-        "--release")         BUILD_TYPE="release" ;;
+        "--help"*)            printhelp; abort_configure ;;
+        "--debug")            BUILD_TYPE="debug" ;;
+        "--release")          BUILD_TYPE="release" ;;
     #foreach( $opt in $options )
         "--${opt.argument}="*) ${opt.varName}=${D}{ARG#--${opt.argument}=} ;;
+        "--${opt.argument}")  echo "option '$ARG' needs a value:"; echo "  $ARG=${opt.valuesString}"; abort_configure ;;
     #end
     #foreach( $feature in $features )
         "--enable-${feature.arg}") ${feature.varName}=on ;;
@@ -174,76 +261,6 @@
     . "$prefix/etc/config.site"
     echo ok
 fi
-
-# Test for availability of pkg-config
-PKG_CONFIG=`command -v pkg-config`
-: ${PKG_CONFIG:="false"}
-
-# Simple uname based platform detection
-# $PLATFORM is used for platform dependent dependency selection
-OS=`uname -s`
-OS_VERSION=`uname -r`
-printf "detect platform... "
-if [ "$OS" = "SunOS" ]; then
-    PLATFORM="solaris sunos unix svr4"
-elif [ "$OS" = "Linux" ]; then
-    PLATFORM="linux unix"
-elif [ "$OS" = "FreeBSD" ]; then
-    PLATFORM="freebsd bsd unix"
-elif [ "$OS" = "OpenBSD" ]; then
-    PLATFORM="openbsd bsd unix"
-elif [ "$OS" = "NetBSD" ]; then
-    PLATFORM="netbsd bsd unix"
-elif [ "$OS" = "Darwin" ]; then
-    PLATFORM="macos osx bsd unix"
-elif echo "$OS" | grep -i "MINGW" > /dev/null; then
-    PLATFORM="windows mingw"
-fi
-: ${PLATFORM:="unix"}
-
-PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
-echo "$PLATFORM_NAME"
-
-isplatform()
-{
-    for p in $PLATFORM
-    do
-        if [ "$p" = "$1" ]; then
-            return 0
-        fi
-    done
-    return 1
-}
-notisplatform()
-{
-    for p in $PLATFORM
-    do
-        if [ "$p" = "$1" ]; then
-            return 1
-        fi
-    done
-    return 0
-}
-istoolchain()
-{
-    for t in $TOOLCHAIN
-    do
-        if [ "$t" = "$1" ]; then
-            return 0
-        fi
-    done
-    return 1
-}
-notistoolchain()
-{
-    for t in $TOOLCHAIN
-    do
-        if [ "$t" = "$1" ]; then
-            return 1
-        fi
-    done
-    return 0
-}
 ]]#
 ## End of unparsed content **
 
@@ -394,9 +411,9 @@
 ERROR=0
 #if( $dependencies.size() > 0 )
 # unnamed dependencies
-TEMP_CFLAGS=
-TEMP_CXXFLAGS=
-TEMP_LDFLAGS=
+TEMP_CFLAGS="$CFLAGS"
+TEMP_CXXFLAGS="$CXXFLAGS"
+TEMP_LDFLAGS="$LDFLAGS"
 #foreach( $dependency in $dependencies )
 while true
 do
@@ -468,6 +485,16 @@
 done
 #end
 
+# build type
+if [ "$BUILD_TYPE" = "debug" ]; then
+    TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS"
+    TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+if [ "$BUILD_TYPE" = "release" ]; then
+    TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS"
+    TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+
 # add general dependency flags to flags.mk
 echo "# general flags" >> "$TEMP_DIR/flags.mk"
 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
@@ -554,6 +581,35 @@
         unset ${feature.varName}
     fi
 fi
+if [ -n "${D}${feature.varName}" ]; then
+    :
+#foreach( $def in $feature.defines )
+    TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
+    TEMP_CXXFLAGS="$TEMP_CXXFLAGS ${def.toFlags()}"
+#end
+#if( $feature.hasMake() )
+    cat >> "$TEMP_DIR/make.mk" << __EOF__
+$feature.make
+__EOF__
+#end
+else
+    :
+#foreach( $def in $feature.disabled.defines )
+    TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
+    TEMP_CXXFLAGS="$TEMP_CXXFLAGS ${def.toFlags()}"
+#end
+#if( $feature.disabled.hasMake() )
+    cat >> "$TEMP_DIR/make.mk" << __EOF__
+$feature.disabled.make
+__EOF__
+#end
+#foreach( $dependency in $feature.disabled.dependencies )
+    if dependency_error_$dependency ; then
+        DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
+        ERROR=1
+    fi
+#end
+fi
 #end
 
 #foreach( $opt in $target.options )
@@ -600,6 +656,11 @@
             DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED"
         fi
     #end
+    else
+        echo
+        echo "Invalid option value - usage:"
+        echo "  --${opt.argument}=${opt.valuesString}"
+        abort_configure
     fi
 fi
 #end
@@ -610,22 +671,6 @@
 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
     echo "${target.cxxFlags}  += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
-if [ "$BUILD_TYPE" = "debug" ]; then
-    if [ -n "$lang_c" ]; then
-        echo '${target.cFlags} += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo '${target.cxxFlags} += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
-if [ "$BUILD_TYPE" = "release" ]; then
-    if [ -n "$lang_c" ]; then
-        echo '${target.cFlags} += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo '${target.cxxFlags} += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
 if [ -n "${TEMP_LDFLAGS}" ]; then
     echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
@@ -662,12 +707,15 @@
 echo
 
 # generate the config.mk file
+pwd=`pwd`
 cat > "$TEMP_DIR/config.mk" << __EOF__
 #
-# config.mk generated by configure
+# config.mk generated by:
+# pwd: $pwd
+# $0 $@
 #
 
 __EOF__
 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
-cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
+cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
 rm -Rf "$TEMP_DIR"
--- a/make/toolchain.sh	Fri Apr 18 10:43:09 2025 +0200
+++ b/make/toolchain.sh	Fri Apr 18 11:48:11 2025 +0200
@@ -17,20 +17,28 @@
 
 check_c_compiler()
 {
+  command -v $1 2>&1 >/dev/null
+  if [ $? -ne 0 ]; then
+    return 1
+  fi
   cat > "$TEMP_DIR/test.c" << __EOF__
 /* test file */
 #include <stdio.h>
 int main(int argc, char **argv) {
 #if defined(_MSC_VER)
-  printf("msc\n");
+  printf("toolchain:msc\n");
 #elif defined(__clang__)
-  printf("clang gnuc\n");
+  printf("toolchain:clang gnuc\n");
 #elif defined(__GNUC__)
-  printf("gcc gnuc\n");
+  printf("toolchain:gcc gnuc\n");
 #elif defined(__sun)
-  printf("suncc\n");
+  printf("toolchain:suncc\n");
 #else
-  printf("unknown\n");
+  printf("toolchain:unknown\n");
+#endif
+  printf("wsize:%d\n", (int)sizeof(void*)*8);
+#ifdef __STDC_VERSION__
+  printf("stdcversion:%d\n", __STDC_VERSION__);
 #endif
   return 0;
 }
@@ -41,21 +49,26 @@
 
 check_cpp_compiler()
 {
+  command -v $1 2>&1 >/dev/null
+  if [ $? -ne 0 ]; then
+    return 1
+  fi
   cat > "$TEMP_DIR/test.cpp" << __EOF__
 /* test file */
 #include <iostream>
 int main(int argc, char **argv) {
 #if defined(_MSC_VER)
-  std::cout << "msc" << std::endl;
+  std::cout << "toolchain:msc" << std::endl;
 #elif defined(__clang__)
-  std::cout << "clang gnuc" << std::endl;
+  std::cout << "toolchain:clang gnuc" << std::endl;
 #elif defined(__GNUC__)
-  std::cout << "gcc gnuc" << std::endl;
+  std::cout << "toolchain:gcc gnuc" << std::endl;
 #elif defined(__sun)
-  std::cout << "suncc" << std::endl;
+  std::cout << "toolchain:suncc" << std::endl;
 #else
-  std::cout << "cc" << std::endl;
+  std::cout << "toolchain:unknown" << std::endl;
 #endif
+  std:cout << "wsize:" << sizeof(void*)*8 << std::endl;
   return 0;
 }
 __EOF__
@@ -122,8 +135,11 @@
   if [ -n "$CC" ]; then
     if check_c_compiler "$CC"; then
       TOOLCHAIN_CC=$CC
-      TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+      "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
+      TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11`
       TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
+      TOOLCHAIN_WSIZE=`grep '^wsize:' "$TEMP_DIR/checkcc_out" | tail -c +7`
+      TOOLCHAIN_CSTD=`grep '^stdcversion:' "$TEMP_DIR/checkcc_out" | tail -c +13`
       echo "$CC"
       return 0
     else
@@ -135,8 +151,11 @@
     do
       if check_c_compiler "$COMP"; then
         TOOLCHAIN_CC=$COMP
-        TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+        "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
+        TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11`
         TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
+        TOOLCHAIN_WSIZE=`grep '^wsize:' "$TEMP_DIR/checkcc_out" | tail -c +7`
+        TOOLCHAIN_CSTD=`grep '^stdcversion:' "$TEMP_DIR/checkcc_out" | tail -c +13`
         echo "$COMP"
         return 0
       fi
@@ -156,7 +175,8 @@
   if [ -n "$CXX" ]; then
     if check_cpp_compiler "$CXX"; then
       TOOLCHAIN_CXX=$CXX
-      TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+      "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
+      TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11`
       TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
       echo "$CXX"
       return 0
@@ -169,7 +189,8 @@
     do
       if check_cpp_compiler "$COMP"; then
         TOOLCHAIN_CXX=$COMP
-        TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+        "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
+        TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11`
         TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
         echo "$COMP"
         return 0
--- a/make/uwproj.xsd	Fri Apr 18 10:43:09 2025 +0200
+++ b/make/uwproj.xsd	Fri Apr 18 11:48:11 2025 +0200
@@ -3,7 +3,7 @@
            xmlns="http://unixwork.de/uwproj"
            targetNamespace="http://unixwork.de/uwproj"
            elementFormDefault="qualified"
-           version="0.2"
+           version="0.3"
 >
     <xs:element name="project" type="ProjectType"/>
 
@@ -17,22 +17,33 @@
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
-            <xs:element name="config" type="ConfigType" minOccurs="0"/>
+            <xs:element name="config" type="ConfigType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="target" type="TargetType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
+        <xs:attribute name="version" type="xs:string" use="required" />
     </xs:complexType>
 
     <xs:complexType name="ConfigType">
         <xs:annotation>
             <xs:documentation>
-                The configuration section.
-                Consists of an arbitrary number of <code>var</code> elements.
+                <p>
+                    The configuration section.
+                    Consists of an arbitrary number of <code>var</code> elements.
+                </p>
+                <p>
+                    The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and
+                    the optional <code>not</code> attribute may specify a comma-separated list of platform identifiers.
+                    The configure script shall skip this config declaration if the detected platform is not matching
+                    the filter specification of these attributes.
+                </p>
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
+        <xs:attribute name="platform" type="xs:string"/>
+        <xs:attribute name="not" type="xs:string"/>
     </xs:complexType>
 
     <xs:complexType name="ConfigVarType">
@@ -185,6 +196,9 @@
                 <code>dependencies</code> are satisfied.
                 If a feature is enabled, all <code>define</code> and <code>make</code> definitions are
                 supposed to be applied to the config file.
+                If a feature is disabled, an optional <code>disabled</code> element may specify which
+                <code>define</code> and <code>make</code> definitions are supposed to be applied.
+                There might also be <code>dependencies</code> when the feature is disabled (e.g. specifying a fallback).
                 In case the optional <code>default</code> attribute is set to true, the feature is enabled by default
                 and is supposed to be automatically disabled (without error) when the dependencies are not satisfied.
                 The name that is supposed to be used for the --enable and --disable arguments can be optionally
@@ -195,11 +209,18 @@
         </xs:annotation>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:group ref="TargetDataGroup"/>
+            <xs:element name="desc" type="xs:string"/>
+            <xs:element name="disabled">
+                <xs:complexType>
+                    <xs:choice minOccurs="0" maxOccurs="unbounded">
+                        <xs:group ref="TargetDataGroup"/>
+                    </xs:choice>
+                </xs:complexType>
+            </xs:element>
         </xs:choice>
         <xs:attribute name="name" type="xs:string" use="required"/>
         <xs:attribute name="arg" type="xs:string"/>
         <xs:attribute name="default" type="xs:boolean" default="false"/>
-        <xs:element name="desc" type="xs:string"/>
     </xs:complexType>
 
     <xs:complexType name="OptionType">
--- a/ui/qt/toolbar.cpp	Fri Apr 18 10:43:09 2025 +0200
+++ b/ui/qt/toolbar.cpp	Fri Apr 18 11:48:11 2025 +0200
@@ -32,3 +32,18 @@
 #include "menu.h"
 #include "stock.h"
 
+QToolBar* ui_create_toolbar(UiObject *obj) {
+    CxMap *items = uic_get_toolbar_items();
+    CxList *left_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_LEFT);
+    CxList *center_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_CENTER);
+    CxList *right_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_RIGHT);
+    
+    if(!items || cxMapSize(items) == 0) {
+        return nullptr;
+    }
+    
+    QToolBar *toolbar = new QToolBar();
+    
+    
+    return toolbar;
+}
--- a/ui/qt/toolbar.h	Fri Apr 18 10:43:09 2025 +0200
+++ b/ui/qt/toolbar.h	Fri Apr 18 11:48:11 2025 +0200
@@ -31,9 +31,10 @@
 
 #include "toolkit.h"
 #include "../ui/toolbar.h"
+#include "../common/toolbar.h"
 #include <QToolBar>
 
-
+QToolBar* ui_create_toolbar(UiObject *obj);
 
 
 #endif	/* TOOLBAR_H */

mercurial