Page MenuHomeFeedback Tracker

Allow include paths to be specified on a per-mission basis.
New, WishlistPublic

Description

This is a feature request.

It would be nice if the preprocessor was more functional with respect to the includes. Currently, #include <file> and #include "file" behave identically and always search only inside the directory of the file where that include command occurs.

I assert that it would be of great benefit if this feature was extended to search through a list of directories - similar to how the C preprocessor behaves. The list of include paths could be specified by the mission for which the scripts containing the include commands belonged to. For instance, if MyMission.Stratis/ is a directory containing the files, init.sqf and libilovearma/includeme.h, then #include <includeme.h> would include the file in the libilovearma directory iff that directory were added to the include paths.

It would be nice if the #include <file> syntax did not check the current directory and the #include "file" syntax did - similar to how the C preprocessor behaves - but for backwards compatibility it seems reasonable for both variants of the syntax to check the current directory first.

(N.B.: I intentionally left out discussing this feature in the context of addons because I do not know enough about how they work and because I understand there is a way to include something relative from the root of the addon, which seems to work well enough in general)

Details

Legacy ID
3299957811
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Scripting

Event Timeline

sqwishy edited Steps To Reproduce. (Show Details)Jul 17 2014, 1:43 AM
sqwishy edited Additional Information. (Show Details)
sqwishy set Category to Scripting.
sqwishy set Reproducibility to N/A.
sqwishy set Severity to None.
sqwishy set Resolution to Open.
sqwishy set Legacy ID to 3299957811.May 7 2016, 7:01 PM