* Use Lazarus resources instead of Windows resources

* Added script to build resource file

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@169 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2007-05-26 02:05:17 +00:00
parent 9d6a33dbe9
commit c81ad25465
10 changed files with 1750 additions and 1731 deletions

View File

@ -9,8 +9,6 @@ unit Main;
interface
{.$include Compilers.inc}
{$ifdef COMPILER_7_UP}
// For some things to work we need code, which is classified as being unsafe for .NET.
{$warn UNSAFE_TYPE off}
@ -92,19 +90,23 @@ end;
//----------------------------------------------------------------------------------------------------------------------
procedure LoadUnicodeStrings(Name: string; var Strings: array of WideString);
// Loads the Unicode strings from the resource.
var
Stream: TResourceStream;
Res: TLResource;
Head, Tail: PWideChar;
I: Integer;
begin
Stream := TResourceStream.Create(0, Name, 'Unicode');
try
Head := Stream.Memory;
//Stream := TResourceStream.Create(0, Name, 'Unicode');
Res := LazarusResources.Find(Name);
if (Res <> nil) and (Res.Value <> '') then
begin
//Head := Stream.Memory;
Head := PWideChar(Res.Value);
// Skip byte order mark.
Inc(Head);
Tail := Head;
@ -117,8 +119,6 @@ begin
// Skip carriage return and linefeed.
Inc(Tail, 2);
end;
finally
Stream.Free;
end;
end;
@ -212,6 +212,7 @@ end;
initialization
{$i Main.lrs}
{$i unicode.lrs}
end.