generalizing /USE to a sequence of directories

All except GUI problems
Post Reply
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

generalizing /USE to a sequence of directories

Post by Josef Templ »

Has anybody ever considered the generalization of BlackBox's two-step
file lookup strategy (1st: /USE dir, 2nd; startup dir) to an arbitrary sequence of
lookups (1st: /USE dir1, 2nd: /USE dir2, 3rd: /USE dir3, ... nth: startup dir)?

The advantage would be that it allows to keep the installation directory clean
of any private changes such as additional packages, additional language packs,
modified files (menus) of the standard distribution, etc.
A new release could then be installed by simply replacing the old installation by
the new installation and every private change would remain where it is.

A possible approach that is 100% compatible with the current solution would be to specify
in the /USE option not only a single directory but a semicolon separated sequence
of directories.

- Josef
User avatar
Robert
Posts: 177
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: generalizing /USE to a sequence of directories

Post by Robert »

An interesting idea, and I shall give it more thought. But some initial reactions are:

- I definitely think there is a problem with Menu maintenance (and Strings, and System/Config, and System/Startup, & ...).

- This is the first idea I've seen that feels like it might be a good solution to the Menu problem.

- When you create a standalone .exe, that alters the search strategy to look in the packed file first. How does that process interact with the /Use search strategy?

To be honest I don't understand the current \Use process (is it well explained?). The BlackBox documentation talks about <BlackBoxDir> & <WorkDir>. The Windows shortcut has three ideas: "Target path", "Use path", & "Start in path". Are "Use" & "Start in" the same idea, and would both need to be generalised to a sequence of paths?

- Would this have efficiency implications - lots of searching for files in empty directories?
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: generalizing /USE to a sequence of directories

Post by Josef Templ »

I also havn't looked into the details yet.

> To be honest I don't understand the current \Use process

The "start dir" in the shortcut only affects the "files open" dialog.
It sets the start directory to be used for that dialog.
This is always a single directory and not used by BlackBox, as far as I know.

The generalization only applies to the /USE option, which is unknown to Windows
but known to BlackBox.
The current semantics are simple: If there is a /USE look up files with relative paths first there
and only if not found also look into the .exe startup dir. Also use /USE, if it exists, to store files
with relative paths.

The generalization /USE dir1;dir2;dir3 would mean to look up files in dir1 first, dir2 next, etc. until
the end and then to look up files in the .exe startup dir.
Files would be stored in dir1.

> - Would this have efficiency implications - lots of searching for files in empty directories?

The longer the dir list gets the longer will a file lookup take.
This also applies to a two step lookup, which is slower than a one step lookup.
With current CPUs and disks it will not make a noticeable difference for most
situations. For most lookups a missing directory will be detected, not
an empty one.

> - I definitely think there is a problem with Menu maintenance (and Strings, and System/Config, and System/Startup, & ...).

The generalization of the /USE option will not solve all problems related to menu
configuration but some. The unsolved problem is that it is still not possible
to add a menu item to an existing standard menu, for example an additional command
to the Dev menu. But it would solve the problem of overwriting files of the
standard installation because it allows one to keep separate files for the original
and for the private modifications.

- Josef
User avatar
a.mcintosh
Posts: 7
Joined: Tue Sep 17, 2013 12:52 am
Location: Austin, TX

Re: generalizing /USE to a sequence of directories

Post by a.mcintosh »

Josef Templ wrote:Has anybody ever considered the generalization of BlackBox's two-step
file lookup strategy (1st: /USE dir, 2nd; startup dir) to an arbitrary sequence of
lookups (1st: /USE dir1, 2nd: /USE dir2, 3rd: /USE dir3, ... nth: startup dir)?
I have frequently thought of 3 sets of directories, 1) the official distribution, 2) Local shop modifications, and 3) current project or student modifications.

I am frequently frustrated by poor version control, and keeping the distribution unchanged helps me manage a little better.
Post Reply