Skip to content

Commit

Permalink
Installer: Allow to install INI from current directory (fix #300)
Browse files Browse the repository at this point in the history
  • Loading branch information
binarymaster committed Dec 27, 2017
1 parent 51b3421 commit 180f411
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src-installer/RDPWInst.dpr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
Copyright 2016 Stas'M Corp.
Copyright 2017 Stas'M Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -670,7 +670,19 @@ begin
OnlineINI.Free;
end;
if not Online then
ExtractRes('config', ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini');
begin
S := ExtractFilePath(ParamStr(0)) + 'rdpwrap.ini';
if FileExists(S) then
begin
OnlineINI := TStringList.Create;
OnlineINI.LoadFromFile(S);
S := ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini';
OnlineINI.SaveToFile(S);
Writeln('[+] Current INI file -> ', S);
OnlineINI.Free;
end else
ExtractRes('config', ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini');
end;

RDPClipRes := '';
case Arch of
Expand Down

0 comments on commit 180f411

Please sign in to comment.