starter: use UTF8 system error message, maybe fixes issue #12185

git-svn-id: trunk@16658 -
This commit is contained in:
vincents 2008-09-19 21:19:40 +00:00
parent 46f03b20ca
commit fd0b43824d
2 changed files with 21 additions and 11 deletions

View File

@ -160,20 +160,23 @@ begin
begin
if FileExistsUTF8(BackupFileName) then
if not DeleteFileUTF8(BackupFileName) then begin
MessageDlg(format('Can''t delete "%s"'#13'%s', [BackupFileName, SysErrorMessage(GetLastOSError)]),
MessageDlg(format('Can''t delete "%s"'#13'%s',
[BackupFileName, SysErrorMessageUTF8(GetLastOSError)]),
mtError, [mbOK], 0);
Result := mrAbort;
exit;
end;
if not RenameFileUTF8(CurFilename, BackupFileName) then begin
MessageDlg(format('Can''t rename "%s" to "%s"'#13'%s', [FLazarusPath, BackupFileName, SysErrorMessage(GetLastOSError)]),
MessageDlg(format('Can''t rename "%s" to "%s"'#13'%s',
[FLazarusPath, BackupFileName, SysErrorMessageUTF8(GetLastOSError)]),
mtError, [mbOK], 0);
Result := mrAbort;
exit;
end;
end;
if not RenameFileUTF8(NewFileName, CurFilename) then begin
MessageDlg(format('Can''t rename "%s" to "%s"'#13'%s', [NewFileName, FLazarusPath, SysErrorMessage(GetLastOSError)]),
MessageDlg(format('Can''t rename "%s" to "%s"'#13'%s',
[NewFileName, FLazarusPath, SysErrorMessageUTF8(GetLastOSError)]),
mtError, [mbOK], 0);
Result := mrAbort;
exit;

View File

@ -1,16 +1,17 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<PathDelim Value="\"/>
<Version Value="6"/>
<General>
<SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<IconPath Value=".\"/>
<TargetFileExt Value=".exe"/>
</General>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
@ -18,7 +19,7 @@
<local>
<FormatVersion Value="1"/>
<CommandLineParams Value="--nsc"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="4">
@ -35,7 +36,7 @@
<PackageName Value="LCL"/>
</Item4>
</RequiredPackages>
<Units Count="2">
<Units Count="3">
<Unit0>
<Filename Value="startlazarus.lpr"/>
<IsPartOfProject Value="True"/>
@ -45,17 +46,23 @@
<IsPartOfProject Value="True"/>
<UnitName Value="LazarusManager"/>
</Unit1>
<Unit2>
<Filename Value="lremotecontrol.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="LRemoteControl"/>
</Unit2>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="../startlazarus$(ExeExt)"/>
<Filename Value="..\startlazarus$(ExeExt)"/>
</Target>
<SearchPaths>
<IncludeFiles Value="include/;include/$(TargetOS)/;include/$(SrcOS)/"/>
<OtherUnitFiles Value="../designer/;../packager/;../components/codetools/units/$(TargetCPU)-$(TargetOS)/"/>
<UnitOutputDirectory Value="../units/$(TargetCPU)-$(TargetOS)"/>
<IncludeFiles Value="include\;include\$(TargetOS)\;include\$(SrcOS)\"/>
<OtherUnitFiles Value="..\designer\;..\packager\;..\components\codetools\units\$(TargetCPU)-$(TargetOS)\"/>
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>