mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:39:17 +02:00
rpm: using relativ paths for desktop menu item
git-svn-id: trunk@10772 -
This commit is contained in:
parent
95fbdd6309
commit
94552293bc
@ -1,24 +1,23 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="/"/>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
<General>
|
<General>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<IconPath Value=".\"/>
|
<IconPath Value="./"/>
|
||||||
<TargetFileExt Value=""/>
|
<TargetFileExt Value=""/>
|
||||||
</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>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<local>
|
||||||
<FormatVersion Value="1"/>
|
<FormatVersion Value="1"/>
|
||||||
<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="3">
|
<RequiredPackages Count="3">
|
||||||
@ -58,7 +57,6 @@
|
|||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
<PathDelim Value="\"/>
|
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
<Generate Value="Faster"/>
|
<Generate Value="Faster"/>
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Lazarus
|
Name=Lazarus
|
||||||
Comment=Lazarus IDE
|
Comment=Lazarus IDE
|
||||||
Exec=/usr/bin/startlazarus %f
|
Exec=startlazarus %f
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=lazarus.png
|
Icon=lazarus.png
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
- restoring layout: pages
|
- restoring layout: pages
|
||||||
- restoring layout: move form after inserting a control
|
- restoring layout: move form after inserting a control
|
||||||
- restoring layout: spiral splitter
|
- restoring layout: spiral splitter
|
||||||
- save TLazDockConfigNode to stream
|
- save TLazDockConfigNode to stream (atm only xml implemented)
|
||||||
- load TLazDockConfigNode from stream
|
- load TLazDockConfigNode from stream (atm only xml implemented)
|
||||||
}
|
}
|
||||||
unit LDockCtrl;
|
unit LDockCtrl;
|
||||||
|
|
||||||
@ -724,6 +724,8 @@ end;
|
|||||||
|
|
||||||
function TCustomLazControlDocker.DockAsPage(Layout: TLazDockConfigNode
|
function TCustomLazControlDocker.DockAsPage(Layout: TLazDockConfigNode
|
||||||
): boolean;
|
): boolean;
|
||||||
|
// dock as page like in Layout
|
||||||
|
// Requirements: Parent in Layout is a ldcntPage and a parent control exists.
|
||||||
var
|
var
|
||||||
SelfNode: TLazDockConfigNode;
|
SelfNode: TLazDockConfigNode;
|
||||||
PageNode: TLazDockConfigNode;
|
PageNode: TLazDockConfigNode;
|
||||||
@ -739,6 +741,7 @@ var
|
|||||||
PageIndex: LongInt;
|
PageIndex: LongInt;
|
||||||
NeighbourList: TFPList;
|
NeighbourList: TFPList;
|
||||||
AnchorControls: TAnchorControls;
|
AnchorControls: TAnchorControls;
|
||||||
|
TopFormBounds: TRect;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
DebugLn(['TCustomLazControlDocker.DockAsPage DockerName="',DockerName,'"']);
|
DebugLn(['TCustomLazControlDocker.DockAsPage DockerName="',DockerName,'"']);
|
||||||
@ -757,7 +760,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if PageNode.ChildCount<>1 then begin
|
if PageNode.ChildCount<>1 then begin
|
||||||
DebugLn(['TCustomLazControlDocker.DockAsPage SelfNode.Parent.TheType<>ldcntPage DockerName="',DockerName,'"']);
|
DebugLn(['TCustomLazControlDocker.DockAsPage PageNode.ChildCount<>1 DockerName="',DockerName,'"']);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -769,15 +772,18 @@ begin
|
|||||||
NeighbourNode:=PagesNode.Childs[PageNodeIndex+1].Childs[0];
|
NeighbourNode:=PagesNode.Childs[PageNodeIndex+1].Childs[0];
|
||||||
NeighbourControl:=Manager.FindControlByDockerName(NeighbourNode.Name);
|
NeighbourControl:=Manager.FindControlByDockerName(NeighbourNode.Name);
|
||||||
if NeighbourControl=nil then begin
|
if NeighbourControl=nil then begin
|
||||||
DebugLn(['TCustomLazControlDocker.CreateFormAndDockWithSplitter NeighbourControl not found "',NeighbourNode.Name,'"']);
|
DebugLn(['TCustomLazControlDocker.DockAsPage NeighbourControl not found "',NeighbourNode.Name,'"']);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if NeighbourControl.Parent=nil then begin
|
if NeighbourControl.Parent=nil then begin
|
||||||
// NeighbourControl is a single top level control
|
// NeighbourControl is a top level control (no parents, no neighbours)
|
||||||
// => create a TLazDockForm with a TLazDockPages and two TLazDockPage
|
// => create a TLazDockForm with a TLazDockPages and two TLazDockPage
|
||||||
TopForm:=TLazDockForm.Create(nil);
|
TopForm:=TLazDockForm.Create(nil);
|
||||||
// TODO: resize TopForm
|
TopFormBounds:=PagesNode.Bounds;
|
||||||
|
// TODO: shrink TopFormBounds
|
||||||
|
TopForm.BoundsRect:=TopFormBounds;
|
||||||
|
|
||||||
Pages:=TLazDockPages.Create(nil);
|
Pages:=TLazDockPages.Create(nil);
|
||||||
Pages.DisableAlign;
|
Pages.DisableAlign;
|
||||||
try
|
try
|
||||||
@ -817,7 +823,7 @@ begin
|
|||||||
Page:=Pages.Page[PageIndex];
|
Page:=Pages.Page[PageIndex];
|
||||||
Control.Parent:=Page;
|
Control.Parent:=Page;
|
||||||
Control.AnchorClient(0);
|
Control.AnchorClient(0);
|
||||||
// TODO resize parents
|
// TODO enlarge parents
|
||||||
end else begin
|
end else begin
|
||||||
// NeighbourControl is a child control, but the parent is not yet a page
|
// NeighbourControl is a child control, but the parent is not yet a page
|
||||||
// => collect all neighbour controls for a page
|
// => collect all neighbour controls for a page
|
||||||
@ -1613,7 +1619,7 @@ var
|
|||||||
Result:=Manager.FindControlByDockerName(ADockerName);
|
Result:=Manager.FindControlByDockerName(ADockerName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function DockWithSpiralSpltter: boolean;
|
function DockWithSpiralSplitter: boolean;
|
||||||
begin
|
begin
|
||||||
// TODO
|
// TODO
|
||||||
Result:=false;
|
Result:=false;
|
||||||
@ -1636,7 +1642,7 @@ var
|
|||||||
and CreateFormAndDockWithSplitter(Layout,a) then
|
and CreateFormAndDockWithSplitter(Layout,a) then
|
||||||
exit(true);
|
exit(true);
|
||||||
inc(SplitterCount);
|
inc(SplitterCount);
|
||||||
if (SplitterCount=4) and DockWithSpiralSpltter then
|
if (SplitterCount=4) and DockWithSpiralSplitter then
|
||||||
exit(true);
|
exit(true);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -30,6 +30,10 @@ else
|
|||||||
svn export $SourceDir /tmp/lazarus
|
svn export $SourceDir /tmp/lazarus
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# add ide/revision.inc
|
||||||
|
Revision=$(cat /tmp/lazarus/.svn/entries | grep committed-rev= | head -n 1 | cut -d\" -f2)
|
||||||
|
echo "const RevisionStr = '$Revision';" > /tmp/lazarus/ide/revision.inc
|
||||||
|
|
||||||
cd /tmp
|
cd /tmp
|
||||||
echo "packing ..."
|
echo "packing ..."
|
||||||
tar cvzf lazarus.tgz lazarus
|
tar cvzf lazarus.tgz lazarus
|
||||||
|
@ -15,8 +15,9 @@ if [ "x$FPCRPM" = "x" ]; then
|
|||||||
echo ERROR: fpc rpm not installed
|
echo ERROR: fpc rpm not installed
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
FPCRPMVersion=`echo $FPCRPM | sed -e 's/fpc-//g'`
|
FPCRPMVersion=$(echo $FPCRPM | sed -e 's/fpc-//g')
|
||||||
echo "installed fpc version: $FPCRPMVersion"
|
echo "installed fpc version: $FPCRPMVersion"
|
||||||
|
FPCSRCRPMVersion=$(echo $FPCRPMVersion | cut -d- -f1)
|
||||||
|
|
||||||
Date=$Year$Month$Day
|
Date=$Year$Month$Day
|
||||||
LazVersion=$(./get_lazarus_version.sh)
|
LazVersion=$(./get_lazarus_version.sh)
|
||||||
@ -40,6 +41,7 @@ cat rpm/lazarus.spec.template | \
|
|||||||
-e "s/LAZSOURCE/$Src/g" \
|
-e "s/LAZSOURCE/$Src/g" \
|
||||||
-e "s/FPCBUILDVERSION/2.0.0/g" \
|
-e "s/FPCBUILDVERSION/2.0.0/g" \
|
||||||
-e "s/FPCVERSION/$FPCRPMVersion/g" \
|
-e "s/FPCVERSION/$FPCRPMVersion/g" \
|
||||||
|
-e "s/FPCSRCVERSION/$FPCSRCRPMVersion/g" \
|
||||||
> $SpecFile
|
> $SpecFile
|
||||||
|
|
||||||
# build rpm
|
# build rpm
|
||||||
|
@ -11,7 +11,7 @@ Packager: Mattias Gaertner
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
#BuildRequires:
|
#BuildRequires:
|
||||||
Requires: fpc-src = FPCVERSION, fpc = FPCVERSION, gdk-pixbuf, gtk+, glibc, gdb
|
Requires: fpc-src = FPCSRCVERSION, fpc = FPCVERSION, gdk-pixbuf, gtk+, glibc, gdb
|
||||||
# NOTE: without the symlink trick for gtk1, it requires the devel packages.
|
# NOTE: without the symlink trick for gtk1, it requires the devel packages.
|
||||||
|
|
||||||
Requires(post): desktop-file-utils
|
Requires(post): desktop-file-utils
|
||||||
|
Loading…
Reference in New Issue
Block a user