programs/dtlaunch: Alt+space (Dtlaunch*hotkey) opens a field and a list; matches programs in $PATH, ~/.dt/snippets (keyword TAB text), the clipboard history (polled CLIPBOARD, 50 entries, memory only) and calculations (=12*(3+4)). Return starts the program or puts the text on CLIPBOARD and PRIMARY. One per display (_MCDE_DTLAUNCH); a second start opens the first. C99/POSIX + Xt/Motif, no warnings with -Wpedantic. model.c (no X) with test_model.c: make check PASS. Started in every session by config/Xsession.d/0080.dtlaunch. Tested on Xvfb: snippet and result reach the clipboard (build/mcde-shots/dtlaunch-*.png). tools/mcde-linux.sh: check mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
2.4 KiB
Bash
Executable File
72 lines
2.4 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# mcde-linux.sh -- build MCDE natively on the (Linux) build host, for development
|
|
#
|
|
# usage: tools/mcde-linux.sh [install [SUBDIR ...] | check SUBDIR ... | SUBDIR ...]
|
|
# (make mcde-linux [MCDE_DIRS="install programs/dtfile"])
|
|
#
|
|
# MCDE runs on Linux as well as on NetBSD (ext/src/mcde/AGENTS.md), so the host
|
|
# that builds Makronix can build and run it directly: fast turns for work on
|
|
# the desktop, screenshots under Xvfb. This is not how Makronix gets MCDE --
|
|
# that is pkgsrc (ext/src/mcde/pkgsrc) -- and nothing here goes into a set.
|
|
#
|
|
# The working tree of ext/src/mcde (with uncommitted edits, without pkgsrc/) is
|
|
# copied to build/mcde-linux; autogen.sh and configure run again when
|
|
# configure.ac or a Makefile.am is newer than config.status; then make, in the
|
|
# whole tree or only in the SUBDIRs given (e.g. programs/dtfile). The result
|
|
# is installed only with "install": make install into build/mcde-root/dt, so
|
|
# that the programs find their data types, icons and app-defaults when run from
|
|
# there (under Xvfb, for screenshots).
|
|
#
|
|
# The last line of the output is "mcde-linux exit=N".
|
|
|
|
set -u
|
|
|
|
TOP=$(cd "$(dirname "$0")/.." && pwd)
|
|
SRC=$TOP/ext/src/mcde
|
|
B=$TOP/build/mcde-linux
|
|
JOBS=${JOBS:-8}
|
|
|
|
finish() { echo "mcde-linux exit=$1"; exit "$1"; }
|
|
|
|
mkdir -p "$B"
|
|
rsync -a --exclude=/pkgsrc "$SRC/" "$B/" || finish 1
|
|
|
|
cd "$B" || finish 1
|
|
if [ ! -f config.status ] ||
|
|
[ -n "$(find . -name configure.ac -newer config.status -o \
|
|
-name Makefile.am -newer config.status | head -1)" ]; then
|
|
./autogen.sh || finish 1
|
|
# every system path below build/: this host may run a CDE of its own
|
|
# (/etc/pam.d/dtlogin, /etc/dt), and a development build never touches it
|
|
R=$TOP/build/mcde-root
|
|
./configure --prefix="$R/dt" --sysconfdir="$R/etc" \
|
|
--localstatedir="$R/var" --with-config-dir="$R/etc/dt" \
|
|
--with-logfiles-dir="$R/var/dt" --with-pamdir="$R/etc/pam.d" \
|
|
--with-calendar-dir="$R/var/spool/calendar" ||
|
|
finish 1
|
|
fi
|
|
|
|
if [ $# -eq 0 ]; then
|
|
nice -n 19 make -j"$JOBS" || finish $?
|
|
elif [ "$1" = install ] && [ $# -eq 1 ]; then
|
|
nice -n 19 make -j"$JOBS" || finish $?
|
|
make install || finish $?
|
|
elif [ "$1" = check ]; then
|
|
shift
|
|
for d in "$@"; do
|
|
make -C "$d" check || finish $?
|
|
done
|
|
elif [ "$1" = install ]; then
|
|
shift
|
|
for d in "$@"; do
|
|
nice -n 19 make -j"$JOBS" -C "$d" || finish $?
|
|
make -C "$d" install || finish $?
|
|
done
|
|
else
|
|
for d in "$@"; do
|
|
nice -n 19 make -j"$JOBS" -C "$d" || finish $?
|
|
done
|
|
fi
|
|
finish 0
|