added GetAppConfigDirUTF8

git-svn-id: trunk@16286 -
This commit is contained in:
mattias 2008-08-28 18:50:04 +00:00
parent dd76d864f1
commit 3d4746734c
5 changed files with 16 additions and 6 deletions

View File

@ -669,6 +669,9 @@ resourcestring
lisInfoBuildBuild = 'Build';
lisInfoBuildComplile = 'Compiling...';
lisInfoBuildError = 'Error...';
lisCreateDirectory = 'Create directory?';
lisTheOutputDirectoryIsMissing = 'The output directory %s%s%s is missing.';
lisCreateIt = 'Create it';
lisInfoBuildSuccess = 'Success...';
lisInfoBuildAbort = 'Aborted...';
lisInfoBuildCaption = 'Compile Project';

View File

@ -9327,9 +9327,10 @@ begin
UnitOutputDirectory:=Project1.CompilerOptions.GetUnitOutPath(false);
if not DirPathExistsCached(UnitOutputDirectory) then begin
if not FileIsInPath(UnitOutputDirectory,WorkingDir) then begin
Result:=IDEQuestionDialog('Create directory?',
'The output directory "'+UnitOutputDirectory+'" is missing.',
mtConfirmation,[mrYes,'Create it',mrCancel],'');
Result:=IDEQuestionDialog(lisCreateDirectory,
Format(lisTheOutputDirectoryIsMissing, ['"', UnitOutputDirectory, '"']
),
mtConfirmation, [mrYes, lisCreateIt, mrCancel], '');
if Result<>mrYes then exit;
end;
Result:=ForceDirectoryInteractive(UnitOutputDirectory,[mbRetry]);

View File

@ -200,8 +200,9 @@ function ForceDirectoriesUTF8(const Dir: string): Boolean;
// environment
function ParamStrUTF8(Param: Integer): string;
function GetEnvironmentStringUTF8(Index : Integer): String;
function GetEnvironmentVariableUTF8(const EnvVar: String): String;
function GetEnvironmentStringUTF8(Index: Integer): string;
function GetEnvironmentVariableUTF8(const EnvVar: string): String;
function GetAppConfigDirUTF8(Global: Boolean): string;
implementation

View File

@ -209,6 +209,11 @@ begin
Result:=SysToUTF8(SysUtils.GetEnvironmentVariable(UTF8ToSys(EnvVar)));
end;
function GetAppConfigDirUTF8(Global: Boolean): string;
begin
Result:=SysToUTF8(SysUtils.GetAppConfigDir(Global));
end;
{------------------------------------------------------------------------------
DirPathExists
------------------------------------------------------------------------------}

View File

@ -305,7 +305,7 @@ begin
RegisterStdFormats;
FRecentDicts:=TRecentDataDicts.Create(TRecentDataDict);
FRecentConnections:=TRecentConnections.Create(TRecentConnection);
FN:=GetAppConfigDir(False);
FN:=GetAppConfigDirUTF8(False);
ForceDirectoriesUTF8(FN);
FN:=GetAppConfigFile(False);
FRecentDicts.LoadFromFile(UTF8ToSys(FN,'RecentDicts'));