You've already forked lazarus-ccr
tappytux: Fixes utf-8 issue in the resources dir
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2034 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,7 +5,7 @@ unit tappyconfig;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Graphics;
|
Classes, SysUtils, Forms, Graphics, LCLProc, FileUtil;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ type
|
|||||||
|
|
||||||
TTappyTuxConfig = class
|
TTappyTuxConfig = class
|
||||||
public
|
public
|
||||||
function GetResourcesDir: string;
|
function GetResourcesDir: utf8string;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -38,7 +38,7 @@ const
|
|||||||
|
|
||||||
{ TChessConfig }
|
{ TChessConfig }
|
||||||
|
|
||||||
function TTappyTuxConfig.GetResourcesDir: string;
|
function TTappyTuxConfig.GetResourcesDir: utf8string;
|
||||||
{$ifdef Darwin}
|
{$ifdef Darwin}
|
||||||
var
|
var
|
||||||
pathRef: CFURLRef;
|
pathRef: CFURLRef;
|
||||||
@ -50,7 +50,7 @@ begin
|
|||||||
{$ifdef Darwin}
|
{$ifdef Darwin}
|
||||||
pathRef := CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
pathRef := CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||||
pathCFStr := CFURLCopyFileSystemPath(pathRef, kCFURLPOSIXPathStyle);
|
pathCFStr := CFURLCopyFileSystemPath(pathRef, kCFURLPOSIXPathStyle);
|
||||||
CFStringGetPascalString(pathCFStr, @pathStr, 255, CFStringGetSystemEncoding());
|
CFStringGetPascalString(pathCFStr, @pathStr, 255, kCFStringEncodingUTF8);
|
||||||
CFRelease(pathRef);
|
CFRelease(pathRef);
|
||||||
CFRelease(pathCFStr);
|
CFRelease(pathCFStr);
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef Windows}
|
{$ifdef Windows}
|
||||||
Result := ExtractFilePath(Application.EXEName);
|
Result := SysToUTF8(ExtractFilePath(Application.EXEName));
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user