> So, the question pops up - how can we tell Harbour to copy only libs to
> target folder?

I'm assembling the distro manually so far. If it matures I can probably
write a script which takes the mpkg_win.bat output .zips and transforms
these into the final layout.

>> Yes, this must be flexible to behave like a regular Windows tool,
>> so if there are any tools (like xMate) which expects some hard-wired
>> path names (in config files, registry or wherever) in order to work
>> properly, these settings must be filled at install time. I assume
>> that your extra package will have a separate installer which would
>> add the extra parts, and install time of this package is a good
>> time to do these steps.
>
> I have to dig deep how to specify such rules.

It should be relatively easy task with most Windows installers,
since many packages are (unfortunately) requiring such things,
of course it also very much depends on what exactly do you
need to configure.

[ even current mpkg_win.nsi does such things when creating
start menu objects and uninstall entry. This is an unfortunate necessity,
but on Windows there is no other way. ]

Worst case you can write a little tool which does all the heavy
lifting and you just call that from your install script. That seems
also convenient, as users can rerun the tool manually if they move
around the installation.

>> A 3rd option is to fix apps which cannot be easily relocated.
>>  From an app POV this means to detect its own location and use
>> it as a base for pure relative dirs. No absolute dirs stored
>> in config files or hard-wired in code.
>
> These is no such API provided in xMate to allow such operations.
> Moreover it provides a limited set of %VARIABLE% options but those are also
> dependant on other factors which in turn depend on xMate itself.
> For example, it provides to describe %HB_INSTALL% which in our case will be
> {drv}:\harbour-11 then all other derivatives - %HB_BIN_INSTALL%,
> %HB_LIB_INSTALL%
> %HB_INC_INSTALL% are computed from %HB_INSTALL%. And there is no way
> to modify this behvior. Under this scenario \harbour-11 folder structure
> does not help
> as "lib" is branched to subfolders.

After a quick look it seems xMate is storing compiler specific settings
in .env files, this could allow to change such lines:
%HB_LIB_INSTALL%\rtl.lib=1
to
%HB_LIB_INSTALL%\win\bcc\rtl.lib=1
where 'bcc' is replaced with compiler in question.

Maybe (for the future) we should think how to use xMate as an editor
only and combine it with hbmk2 somehow which would do the builds.

Brgds,
Viktor
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to