[fpc-pascal] Unknown usage of function FixPath

Peter Vreman peter at freepascal.org
Tue Aug 14 11:09:57 CEST 2007


>
>
> On Tue, 14 Aug 2007, dhkblaszyk at zeelandnet.nl wrote:
>
>> >> 1) why is the colon converted to a slash which yields invalid paths (at
>> >> least
>> >> on windows)
>> >> 2) although fpmake initially was developed to be a make tool for FPC, it
>> >> can
>> >> (and will be) used for other projects. Therefore I would propose not to
>> >> initialize FBaseInstallDir with the FPC directory. But rather raise an
>> >> exception if the basedir is not set in fpmake.pp (when issued an install
>> >> command only ofcourse). This will make setting this variable mandatory.
>> >
>> > I suggest that we introduce a boolean property in TInstaller:
>> >   FPCProject
>> > by default set to True.
>>
>> Why would you like to initialize BaseInstallDir? It will just increases
>> the chance of installing the files in the wrong place. Consider a tool in
>> a project/FPC (which is placed somewhere higher up the tree). If you don't
>> set the BaseInstall dir it gets placed in c:\program files\whatever, but
>> the base directory should be c:\program files\projectname\whatever (or
>> c:\fpc\whatever resp c:\fpc\utils\whatever). The basedir should probably
>> be set as an env string in any case (whith more complex projects involved)
>> or just hardcoded (for simple ones). Anyway something up to the developer
>> to decide and not to fix in fpmkunit.
>
> fpmake is intended in the first place as a way to distribute FPC related
> packages, just as fpcmake was. Therefore the default behaviour should be
> to install something as a FPC package: the developer should not be
> forced to do anything at all. it should 'Just work'
>
> It can be adapted to other things as well, but that is then optional, and
> can be forced by setting properties such as BaseInstallDir.

Maybe we can make a TCustomInstaller and TInstaller where the TInstaller will default to install a
FPC package (=units) in the default location so the units work out-of-the-box for fppkg and fpc.
The TCustomInstaller can be the base for a complete custom installation of independent projects.

Peter





More information about the fpc-pascal mailing list