Sha256: ce794e321797d0655583b51bb17a66d8e05d1a5e71ca6a6d4b20de38b13dc29a

Contents?: true

Size: 1.55 KB

Versions: 23

Compression:

Stored size: 1.55 KB

Contents

program testproject;

uses
  Classes, SysUtils, Types
  {$IFDEF LIBS}
  , LibUnit
  {$ENDIF LIBS}
  {$IFDEF INDY}
  , IdURI
  {$ENDIF INDY}
  {$IFDEF EXPLICIT_LIBS}
  , ExplicitLibUnit
  {$ENDIF}
  ;

{$APPTYPE CONSOLE}

{$R *.res}
{$IFDEF RESOURCES}
{$R 'resources.res' 'resources.rc'}
{$ENDIF RESOURCES}
{$IFDEF ASSIGNABLE_CONSTS}
const
  TEST_CONST: string = '-=ASSIGNED CONST=-';
{$ENDIF ASSIGNABLE_CONSTS}
var
  res: TResourceStream;
  str: TStringStream;
  s: string;
begin
  {$IFDEF DEBUG}
  Write('DEBUG: ');
  {$ENDIF}
  {$IFOPT D+}
  Write('D+: ');
  {$ENDIF}
  s := EmptyStr;
  try
    res := TResourceStream.Create(HInstance, 'LOCAL_RESOURCES', RT_RCDATA);
    try
      str := TStringStream.Create(EmptyStr);
      try
        res.SaveToStream(str);
        s := str.DataString;
      finally
        FreeAndNil(str);
      end;
    finally
      FreeAndNil(res);
    end;
  except
    s := EmptyStr;
  end;
  {$IFDEF LIBS}
  s := s + LibUnit.LibUnitFunction;
  {$ENDIF LIBS}
  {$IFDEF EXPLICIT_LIBS}
  s := s + ExplicitLibUnit.ExplicitLibUnitFunction;
  {$ENDIF EXPLICIT_LIBS}
  {$IFDEF ASSIGNABLE_CONSTS}
  s := s + TEST_CONST;
  {$ENDIF ASSIGNABLE_CONSTS}
  {$IFDEF RELEASE_CFG}
  s := s + '-=RELEASE=-';
  {$ENDIF RELEASE_CFG}
  {$IFDEF CONFIG}
  s := s + '-=CONFIG=-';
  {$ENDIF CONFIG}
  {$IFDEF INDY}
  with TIdURI.Create('http://indy/path') do
    try
      s := s + Format('-=%s#%s=-', [Host, Document]);
    finally
      Free;
    end;
  {$ENDIF}
  WriteLn('testproject works', s);
end.

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rake-delphi-0.0.27 test/resources/testproject/testproject.dpr
rake-delphi-0.0.26 test/resources/testproject/testproject.dpr
rake-delphi-0.0.25 test/resources/testproject/testproject.dpr
rake-delphi-0.0.24 test/resources/testproject/testproject.dpr
rake-delphi-0.0.23 test/resources/testproject/testproject.dpr
rake-delphi-0.0.22 test/resources/testproject/testproject.dpr
rake-delphi-0.0.21 test/resources/testproject/testproject.dpr
rake-delphi-0.0.20 test/resources/testproject/testproject.dpr
rake-delphi-0.0.19 test/resources/testproject/testproject.dpr
rake-delphi-0.0.18 test/resources/testproject/testproject.dpr
rake-delphi-0.0.17 test/resources/testproject/testproject.dpr
rake-delphi-0.0.16 test/resources/testproject/testproject.dpr
rake-delphi-0.0.15 test/resources/testproject/testproject.dpr
rake-delphi-0.0.14 test/resources/testproject/testproject.dpr
rake-delphi-0.0.13 test/resources/testproject/testproject.dpr
rake-delphi-0.0.12 test/resources/testproject/testproject.dpr
rake-delphi-0.0.11 test/resources/testproject/testproject.dpr
rake-delphi-0.0.9 test/resources/testproject/testproject.dpr
rake-delphi-0.0.8 test/resources/testproject/testproject.dpr
rake-delphi-0.0.7 test/resources/testproject/testproject.dpr