You've already forked lazarus-ccr
* Scan for .xib-resources (from the iOSDesigner package) and convert them to .nib files
* When the project is not saved yet, use project1 for the bundle-name git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2626 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -107,14 +107,18 @@ var
|
|||||||
Space : WideString;
|
Space : WideString;
|
||||||
RealSpace : WideString;
|
RealSpace : WideString;
|
||||||
Info : TiPhoneBundleInfo;
|
Info : TiPhoneBundleInfo;
|
||||||
|
AProjectFile: TLazProjectFile;
|
||||||
|
|
||||||
xiblist : TStringList;
|
xiblist : TStringList;
|
||||||
i : Integer;
|
i : Integer;
|
||||||
|
s : string;
|
||||||
begin
|
begin
|
||||||
Space:=ProjOptions.SpaceName; // LazarusIDE.ActiveProject.CustomData.;
|
Space:=ProjOptions.SpaceName; // LazarusIDE.ActiveProject.CustomData.;
|
||||||
|
|
||||||
bundleName:=ExtractFileName(LazarusIDE.ActiveProject.ProjectInfoFile);
|
bundleName:=ExtractFileName(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||||
bundleName:=Copy(bundleName, 1, length(bundleName)-length(ExtractFileExt(bundleName)));
|
bundleName:=Copy(bundleName, 1, length(bundleName)-length(ExtractFileExt(bundleName)));
|
||||||
|
if bundlename='' then
|
||||||
|
bundlename:='project1';
|
||||||
|
|
||||||
nm:=GetProjectExeName(LazarusIDE.ActiveProject);
|
nm:=GetProjectExeName(LazarusIDE.ActiveProject);
|
||||||
|
|
||||||
@ -139,6 +143,15 @@ begin
|
|||||||
|
|
||||||
xiblist := TStringList.Create;
|
xiblist := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
// Scan for resource-files in the .xib file-format, which are
|
||||||
|
// used by the iOSDesigner package
|
||||||
|
for i := 0 to LazarusIDE.ActiveProject.FileCount-1 do
|
||||||
|
begin
|
||||||
|
AProjectFile := LazarusIDE.ActiveProject.Files[i];
|
||||||
|
s := ChangeFileExt(AProjectFile.filename,'.xib');
|
||||||
|
if (AProjectFile.IsPartOfProject) and FileExistsUTF8(s) then
|
||||||
|
xiblist.add(s);
|
||||||
|
end;
|
||||||
EnumFilesAtDir(ResolveProjectPath(ProjOptions.ResourceDir), '*.xib', xiblist);
|
EnumFilesAtDir(ResolveProjectPath(ProjOptions.ResourceDir), '*.xib', xiblist);
|
||||||
for i:=0 to xiblist.Count-1 do begin
|
for i:=0 to xiblist.Count-1 do begin
|
||||||
dstpath:=IncludeTrailingPathDelimiter(bundlepath)+ChangeFileExt(ExtractFileName(xiblist[i]), '.nib');
|
dstpath:=IncludeTrailingPathDelimiter(bundlepath)+ChangeFileExt(ExtractFileName(xiblist[i]), '.nib');
|
||||||
|
Reference in New Issue
Block a user