Hallo Fred van Stappen,

vous evrit au Thu, 27 Jan 2022 00:33:56 +0000:

> About search sequence:
> 
>    1. In the current directory.
>    2. In the directory where the compiler binary is (not under
> LINUX). // That is the problem

Why should this be a problem? Do you keep all (or just some) units
in /usr/bin or wherever on the path your fpc resides? Or do you copy
or link the compiler into your working directory?
Isn't the common way to keep executables on Unixens to put them into
a directory on the path, and put their working data somewhere else,
to not intermix or interfere with each other? (For Windows, I don't
know.)

>    3. In the parent directory of the current directory.
>    4. In the subdirectory units of the current directory
>    5. In the standard unit directory."
> 
> Imho, the 2. should not be there but at last, after all sequences.

Yes, 2. should not be there, neither on Linux NOR on Windows or
whatever.

> Re-imho it would give much more freedom to organize a project and not
> be obliged to paste the units that should be loaded first into the
> root current directory.

This DOES give that freedom - I DID try it yesterday, prepended a
specific directory to the search path by specifying it on the compiler
command line, and it DID work as expected & intended.
Prepending a path to the compiler command line isn't a real chore using
the project options settings of either mseide or your ideU, I think.
It's not even difficult using a simple script, as I did.
The script reads as follows (I named it "make", to be called as
"./make [-<switch char>]"):
----------------------
#! /bin/sh

how ()
{
    cat <<- HELP
        Aufruf: $0 [-h|-c|-t|-s|-n|-r]
        mit:
            -h  Diesen Hilfetext ausgeben
            -c  Erzeugte Zwischendateien bereinigen (clean)
            -t  dto.
            -s  Programmdatei von Symbolen bereinigen ("strippen")
            -n  Erzeugte Zwischendateien bereinigen, dann kompilieren
            -r  Kompilieren und erzeugte Zwischendateien bereinigen
                ohne Parameter nur kompilieren
            -x  Erzeugtes Programm gleich ausführen (nicht mit -r)

HELP
}

make ()
{
    local mainfile targetfile result makeopts

    targetfile=$(pwd -P); targetfile=${targetfile##*/}.prj
    [ -e $targetfile ] || targetfile=$(echo *.prj)
    targetfile=${targetfile%%.prj*}
    PROJECTNAME=$targetfile
    targetfile=$targetfile.prj
    eval $(grep -- "mainfile=" $targetfile)
    eval $(grep -- "targetfile=" $targetfile)
    [ -e makeopts ] && makeopts=$(< makeopts)
    $DEBUG \
    ppcx64 -o$targetfile $makeopts\
     -Fu/usr/lib64/msegui/lib/common/*
-Fu/usr/lib64/msegui/lib/common/kernel\
-Fi/usr/lib64/msegui/lib/common/kernel
-Fu/usr/lib64/msegui/lib/common/kernel/linux\ -l -Mobjfpc -Sh -gl\
$mainfile result=$?
    echo ""
    [ "$result" = 0 ] && [ "$1" = -x ] && $DEBUG $targetfile
}

clean ()
{
    [ "$DEBUG" ] && { echo clean; return; }
    rm -vf *.bak? > /dev/null
    rm -vf *.bak > /dev/null
    rm -vf *.o > /dev/null
    rm -vf *.ppu > /dev/null
}

tidy ()
{
    clean       # vorerst...
}

stripp ()
{
    local targetfile

    targetfile=$(pwd -P); targetfile=${targetfile##*/}.prj
    [ -e $targetfile ] || targetfile=$(echo *.prj)
    targetfile=${targetfile%%.prj*}
    PROJECTNAME=$targetfile
    targetfile=$targetfile.prj
    eval $(grep -- "targetfile=" $targetfile)
    $DEBUG strip $targetfile
}

case $1 in
    -h*) how; exit;;
    -c*) clean; exit;;
    -t*) tidy; exit;;
    -s*) stripp; exit;;
    -n*) clean;;
    -r*) make && clean; exit;;
    *)   ;;
esac
make $1
----------------------
To prepend some parameters to the compiler command line, simply put a
file named "makeopts" containing them into the project directory. It
might contain somethin like this:
----------------------
-vu -dmse_dynpo -Fu. -Fu../dialogs
----------------------
which will (also) preferentally take any unit residing in the working
directory and then from the directory "../units" as seen from the
working directory, in that order. All the other unit directories will
not be scanned for files found there.
I encourage you to give it a try, with mseide, your ideU (and possibly
the above script if you like).

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to