Changeset 342 for trunk/NewView/StartupUnit.pas
- Timestamp:
- Jun 1, 2009, 2:42:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/StartupUnit.pas
r259 r342 19 19 const 20 20 OWN_HELP_MARKER = '[NVHELP]'; 21 HELP_FILE_DELIMITER = '+';22 21 23 22 … … 26 25 // Look for any items that are actually specifiying environment 27 26 // variables, and expand them to the contents of the variables 28 Procedure TranslateIPFEnvironmentVars(const Items: TStrings; ExpandedItems: TStrings );29 27 30 28 // Given a filename, which may or may not contain a path or extension, … … 51 49 FileUtilsUnit; 52 50 53 // Look for any items that are actually specifiying environment54 // variables, and expand them to the contents of the variables55 Procedure TranslateIPFEnvironmentVars(const Items: TStrings; ExpandedItems: TStrings );56 var57 i : longint;58 tmpItem: string;59 tmpEnvironmentVarValue: string;60 begin61 LogEvent(LogStartup, 'Translating environment vars' );62 for i := 0 to Items.Count - 1 do63 begin64 tmpItem := Items[i];65 66 tmpItem := StrTrimChars(tmpItem, [StrSingleQuote]); // remove single quotes67 tmpItem := StrTrimChars(tmpItem, [StrDoubleQuote]); // remove double quotes68 69 LogEvent(LogStartup, ' Checking for environment var: ' + tmpItem );70 tmpEnvironmentVarValue := GetEnv( Uppercase( tmpItem ) );71 if DosError = 0 then72 begin73 // environment var exists - use it's value74 LogEvent(LogStartup, ' Environment var found; translated to: ' + tmpEnvironmentVarValue);75 StrExtractStrings(ExpandedItems, tmpEnvironmentVarValue, [HELP_FILE_DELIMITER], #0);76 end77 else78 begin79 // not an environment var80 ExpandedItems.Add(tmpItem);81 end;82 end;83 end;84 51 85 52 // Given a filename, which may or may not contain a path or extension,
Note:
See TracChangeset
for help on using the changeset viewer.