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 begin
if FileExistsUTF8(BackupFileName) then if FileExistsUTF8(BackupFileName) then
if not DeleteFileUTF8(BackupFileName) then begin 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); mtError, [mbOK], 0);
Result := mrAbort; Result := mrAbort;
exit; exit;
end; end;
if not RenameFileUTF8(CurFilename, BackupFileName) then begin 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); mtError, [mbOK], 0);
Result := mrAbort; Result := mrAbort;
exit; exit;
end; end;
end; end;
if not RenameFileUTF8(NewFileName, CurFilename) then begin 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); mtError, [mbOK], 0);
Result := mrAbort; Result := mrAbort;
exit; exit;

View File

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