mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 11:17:45 +02:00
releasecreator: copy folder
This commit is contained in:
parent
9e32e19a5c
commit
4b380c9c81
@ -39,11 +39,14 @@ type
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure WriteHelp; virtual;
|
||||
|
||||
procedure ReadVersion;
|
||||
procedure CheckForgottenWriteln;
|
||||
procedure CleanSources;
|
||||
procedure CreateBuildSourceDir(const TargetOS, TargetCPU: string);
|
||||
procedure BuildTools(const TargetOS, TargetCPU: string);
|
||||
procedure CopySourceFolders;
|
||||
|
||||
procedure RunTool(WorkDir, Exe: string; const ProcParams: TStringDynArray); overload;
|
||||
procedure RunTool(WorkDir, Exe: string; ProcParams: TStringList); overload;
|
||||
procedure ForceDir(Dir, DirTitle: string);
|
||||
@ -428,6 +431,28 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPas2jsReleaseCreator.CopySourceFolders;
|
||||
|
||||
procedure CopyFolder(const Dir: string);
|
||||
var
|
||||
SrcDir, DestDir: String;
|
||||
begin
|
||||
SrcDir:=SourceDir+Dir;
|
||||
DestDir:=BuildDir_Sources+Dir;
|
||||
if not DirectoryExists(SrcDir) then
|
||||
Err('Unable to copy missing source folder "'+SrcDir+'"');
|
||||
|
||||
// git restore SrcDir
|
||||
RunTool(SourceDir,GitFilename,['restore',SrcDir]);
|
||||
// copy
|
||||
Log(etInfo,'Copying folder "'+SrcDir+'" -> "'+DestDir+'"');
|
||||
CopyDirTree(SrcDir,DestDir,[cffCreateDestDirectory]);
|
||||
end;
|
||||
|
||||
begin
|
||||
CopyFolder('demo');
|
||||
end;
|
||||
|
||||
procedure TPas2jsReleaseCreator.RunTool(WorkDir, Exe: string;
|
||||
const ProcParams: TStringDynArray);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user