mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 13:09:16 +02:00
+ ZX Spectrum internal linker: invoke the ihx2tzx to postprocess the ihx file,
produced by the internal linker (in the future, the code of this utility may be integrated into the compiler) * changed the exe extension of ZX Spectrum to '.tzx' git-svn-id: trunk@45578 -
This commit is contained in:
parent
12dce172f9
commit
84cd9e129b
@ -44,7 +44,7 @@ unit i_zxspectrum;
|
|||||||
cpu : cpu_z80;
|
cpu : cpu_z80;
|
||||||
unit_env : '';
|
unit_env : '';
|
||||||
extradefines : '';
|
extradefines : '';
|
||||||
exeext : '';
|
exeext : '.tzx';
|
||||||
defext : '.def';
|
defext : '.def';
|
||||||
scriptext : '.sh';
|
scriptext : '.sh';
|
||||||
smartext : '.sl';
|
smartext : '.sl';
|
||||||
|
@ -68,6 +68,8 @@ implementation
|
|||||||
public
|
public
|
||||||
constructor create;override;
|
constructor create;override;
|
||||||
procedure InitSysInitUnitName;override;
|
procedure InitSysInitUnitName;override;
|
||||||
|
function MakeExecutable: boolean; override;
|
||||||
|
function postprocessexecutable(const fn : string): boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -390,6 +392,38 @@ procedure TInternalLinkerZXSpectrum.InitSysInitUnitName;
|
|||||||
sysinitunit:='si_prc';
|
sysinitunit:='si_prc';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TInternalLinkerZXSpectrum.MakeExecutable: boolean;
|
||||||
|
begin
|
||||||
|
result:=inherited;
|
||||||
|
{ Post process }
|
||||||
|
if result and not(cs_link_nolink in current_settings.globalswitches) then
|
||||||
|
result:=PostProcessExecutable(current_module.exefilename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TInternalLinkerZXSpectrum.postprocessexecutable(const fn: string): boolean;
|
||||||
|
var
|
||||||
|
exitcode: longint;
|
||||||
|
FoundBin: ansistring;
|
||||||
|
Found: Boolean;
|
||||||
|
utilexe: TCmdStr;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
|
||||||
|
utilexe:=utilsprefix+'ihx2tzx';
|
||||||
|
FoundBin:='';
|
||||||
|
Found:=false;
|
||||||
|
if utilsdirectory<>'' then
|
||||||
|
Found:=FindFile(utilexe,utilsdirectory,false,Foundbin);
|
||||||
|
if (not Found) then
|
||||||
|
Found:=FindExe(utilexe,false,Foundbin);
|
||||||
|
|
||||||
|
if Found then
|
||||||
|
begin
|
||||||
|
exitcode:=RequotedExecuteProcess(foundbin,' '+fn);
|
||||||
|
result:=exitcode<>0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Initialize
|
Initialize
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
Loading…
Reference in New Issue
Block a user