ryzomcore icon indicating copy to clipboard operation
ryzomcore copied to clipboard

Remap R: paths to the project root at NeL level

Open kaetemi opened this issue 3 years ago • 3 comments

As a continuation of ryzom/ryzomcore#649. (Specifying the project root by placing a .nel folder inside. Where the root directory is the one which contains the code, leveldesign, graphics, sound, ... folders.)

For cross-platform improvement, and simplifying development and leveldesign processes, remap the "R:" path to the project root at runtime at the NeL tool level.

This will allow us to specify paths relative to the project root in a cross-platform manner without requiring a mapped drive to exist, and simplify working on different projects or branches.

The use case to specify paths relative to the project root, is that files may be reorganized into different folders. Relative paths between asset files easily break.

kaetemi avatar Feb 09 '22 18:02 kaetemi

Alternatively, propose a specific path prefix as project root. This avoids collision with any actual R: drive.

Rationale to use the existing R:, rather than a dedicated prefix, is to keep compatibility with the existing 3ds Max toolchain and assets. This affects primarily XRefs in 3ds Max asset files. For 3ds Max, the project root may be mounted to R: during the build pipeline run; or we may let the plugins re-mount the drive dynamically as needed. Assets were previously remapped from the separate W:\database to the R:\graphics path (a binary change with the same string length).

kaetemi avatar Feb 09 '22 18:02 kaetemi

Optionally, add a build flag to enable or disable the behaviour. A production game client may want to disable this. Alternatively, a runtime flag that the game client can set at startup to disable the behaviour.

kaetemi avatar Feb 09 '22 18:02 kaetemi

Optionally, fallback to actual R: drive if no project root was found. Alternatively, disable access to any actual R: drive to avoid conflicts.

kaetemi avatar Feb 09 '22 20:02 kaetemi