View Single Post
  #2  
Old 20-05-2022, 00:18
L33THAK0R's Avatar
L33THAK0R L33THAK0R is offline
Registered User
 
Join Date: Feb 2021
Location: Saudi Arabia
Posts: 406
Thanks: 137
Thanked 117 Times in 70 Posts
L33THAK0R is on a distinguished road
What'd be the best solution for being able to use a custom directory constant for a component file? I'm interested in looking into using something like the "{sd}" constant for a given component entry.

I know such functionality is supported for specifying the path of an ".ini" file under [INISettings], but I'm not too sure how to implement it.

I believe this is the section of the script I should be looking at, with the highlighted text being the value that I THINK indicates the working directory for where the file should be.

Code:
            ComponentFile := ExpandConstant('{src}\' + GetIniString('ComponentsSettings', 'Component' + IntToStr(CompIndexList[I]) + '.File', '', ExpandConstant('{tmp}\Settings.ini')));
            if (ISDoneError = False) and FileExists(ComponentFile) then
              if not ISArcExtract(0, 0, ComponentFile, ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
                ISDoneError := True;
I thought about using "{#.File}" or "{#File}", (as seen when used for "{#INIFile}") but this doesn't seem to be a valid solution, would anyone be able to suggest a method that I can look into?
Reply With Quote