Added license info

Now license can be viewed in applications
This commit is contained in:
binarymaster
2014-11-20 16:36:04 +03:00
parent 6b4dadcde5
commit 64b3bf8bc1
14 changed files with 172 additions and 15 deletions

View File

@ -573,6 +573,23 @@ begin
ResStream.Free;
end;
function ExtractResText(ResName: String): String;
var
ResStream: TResourceStream;
Str: TStringList;
begin
ResStream := TResourceStream.Create(HInstance, ResName, RT_RCDATA);
Str := TStringList.Create;
try
Str.LoadFromStream(ResStream);
except
end;
ResStream.Free;
Result := Str.Text;
Str.Free;
end;
procedure ExtractFiles;
begin
if not DirectoryExists(ExtractFilePath(ExpandPath(WrapPath))) then
@ -904,14 +921,16 @@ begin
if (ParamCount < 1)
or (
(ParamStr(1) <> '-i')
(ParamStr(1) <> '-l')
and (ParamStr(1) <> '-i')
and (ParamStr(1) <> '-u')
and (ParamStr(1) <> '-r')
) then
begin
Writeln('USAGE:');
Writeln('RDPWInst.exe [-i[-s]|-u|-r]');
Writeln('RDPWInst.exe [-l|-i[-s]|-u|-r]');
Writeln('');
Writeln('-l display the license agreement');
Writeln('-i install wrapper to Program Files folder (default)');
Writeln('-i -s install wrapper to System32 folder');
Writeln('-u uninstall wrapper');
@ -919,6 +938,12 @@ begin
Exit;
end;
if ParamStr(1) = '-l' then
begin
Writeln(ExtractResText('LICENSE'));
Exit;
end;
if not SupportedArchitecture then
begin
Writeln('[-] Unsupported processor architecture.');
@ -934,6 +959,13 @@ begin
Writeln('[*] RDP Wrapper Library is already installed.');
Halt(ERROR_INVALID_FUNCTION);
end;
Writeln('[*] Notice to user:');
Writeln(' - By using all or any portion of this software, you are agreeing');
Writeln(' to be bound by all the terms and conditions of the license agreement.');
Writeln(' - To read the license agreement, run the installer with -l parameter.');
Writeln(' - If you do not agree to any terms of the license agreement,');
Writeln(' do not use the software.');
Writeln('[*] Installing...');
if ParamStr(2) = '-s' then
WrapPath := '%SystemRoot%\system32\rdpwrap.dll'

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>2013.12.07 17:17:05.152.dproj,C:\Users\user\Documents\RAD Studio\Projects\Project1.dproj=C:\Users\user\Documents\Delphi Projects (local)\RDPWrapInst\RDPInstall.dproj</Transaction>
<Transaction>2013.12.07 19:48:57.905.dproj,C:\Users\user\Documents\Delphi Projects (local)\RDPWrapInst\RDPInstall.dproj=C:\Users\user\Documents\Delphi Projects (local)\RDPWrapInst\RDPWInst.dproj</Transaction>
<Transaction>2013.12.08 01:45:08.501.dproj,C:\Users\user\Documents\Delphi Projects (local)\RDPWrapInst\RDPWInst.dproj=C:\Users\user\Documents\Delphi Projects (local)\RDPWrap\devel\installer2.0-binarymaster\RDPWInst.dproj</Transaction>
</Transactions>
</BorlandProject>

Binary file not shown.

Binary file not shown.