Added search path relative to running binary on Windows.
In contrast to *IX it doesn't make much sense to add compile time defined search paths to Windows binaries: There's no standard path like /usr/local/bin (and there are no symbolic links to link from there to another location). On the other hand it's (again in contrast to *IX) easy for Windows binaries to determine their own paths. Therefore it's appropriate to make use of that to add run time defined default search paths.
This commit is contained in:
@@ -84,7 +84,7 @@ void InitSearchPaths (void)
|
||||
|
||||
/* Add paths relative to a main directory defined in an env. var. */
|
||||
AddSubSearchPathFromEnv (LibDefaultPath, "CC65_HOME", "lib");
|
||||
AddSubSearchPathFromEnv (ObjDefaultPath, "CC65_HOME", "obj");
|
||||
AddSubSearchPathFromEnv (ObjDefaultPath, "CC65_HOME", "lib");
|
||||
AddSubSearchPathFromEnv (CfgDefaultPath, "CC65_HOME", "cfg");
|
||||
|
||||
/* Add some compiled-in search paths if defined at compile time. */
|
||||
@@ -97,6 +97,11 @@ void InitSearchPaths (void)
|
||||
#if defined(LD65_CFG)
|
||||
AddSearchPath (CfgDefaultPath, STRINGIZE (LD65_CFG));
|
||||
#endif
|
||||
|
||||
/* Add paths relative to the parent directory of the Windows binary. */
|
||||
AddSubSearchPathFromWinBin (LibDefaultPath, "lib");
|
||||
AddSubSearchPathFromWinBin (ObjDefaultPath, "lib");
|
||||
AddSubSearchPathFromWinBin (CfgDefaultPath, "cfg");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user