File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ interface
3434
3535type
3636 TPyEnvironmentPath = class
37+ public const
38+ DEPLOY_PATH = ' $(DEPLOY_PATH)' ;
39+ public
3740 // / <summary>
3841 // / This function might resolve path variables, relative paths and whatever regarding paths
3942 // / </summary>
@@ -48,16 +51,16 @@ implementation
4851{ TPyEnvironmentPath }
4952
5053class function TPyEnvironmentPath.ResolvePath (const APath: string): string;
51- var
52- LFilePath: string;
5354begin
54- if (APath <> ExpandFileName(APath)) then begin
55+ if (APath <> ExpandFileName(APath)) or (APath = DEPLOY_PATH) then begin
5556 { $IFDEF ANDROID}
56- LFilePath := TPath.GetDocumentsPath();
57+ Result := TPath.GetDocumentsPath();
5758 { $ELSE}
58- LFilePath := TPath.GetDirectoryName(GetModuleName(HInstance));
59+ Result := TPath.GetDirectoryName(GetModuleName(HInstance));
5960 { $ENDIF}
60- Result := TPath.Combine(LFilePath, APath);
61+
62+ if (APath <> DEPLOY_PATH) then
63+ Result := TPath.Combine(Result, APath);
6164 end else
6265 Result := APath;
6366end ;
You can’t perform that action at this time.
0 commit comments