Browse Source

* Added ability to use macros ({AppConfigDir}, {UserDir} and {LocalRepository}) in path settings

git-svn-id: trunk@15159 -
joost 15 years ago
parent
commit
2ca892c361
2 changed files with 406 additions and 226 deletions
  1. 347 202
      utils/fppkg/fppkg.lpi
  2. 59 24
      utils/fppkg/pkgoptions.pp

+ 347 - 202
utils/fppkg/fppkg.lpi

@@ -1,23 +1,22 @@
 <?xml version="1.0"?>
 <?xml version="1.0"?>
 <CONFIG>
 <CONFIG>
   <ProjectOptions>
   <ProjectOptions>
-    <PathDelim Value="/"/>
-    <Version Value="6"/>
+    <Version Value="7"/>
     <General>
     <General>
       <Flags>
       <Flags>
         <MainUnitHasUsesSectionForAllUnits Value="False"/>
         <MainUnitHasUsesSectionForAllUnits Value="False"/>
         <MainUnitHasCreateFormStatements Value="False"/>
         <MainUnitHasCreateFormStatements Value="False"/>
         <MainUnitHasTitleStatement Value="False"/>
         <MainUnitHasTitleStatement Value="False"/>
+        <LRSInOutputDirectory Value="False"/>
       </Flags>
       </Flags>
       <MainUnit Value="0"/>
       <MainUnit Value="0"/>
-      <IconPath Value=".\"/>
       <TargetFileExt Value=""/>
       <TargetFileExt Value=""/>
-      <ActiveEditorIndexAtStart Value="4"/>
+      <ActiveWindowIndexAtStart Value="0"/>
     </General>
     </General>
     <VersionInfo>
     <VersionInfo>
-      <ProjectVersion Value=""/>
       <Language Value=""/>
       <Language Value=""/>
       <CharSet Value=""/>
       <CharSet Value=""/>
+      <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
     </VersionInfo>
     </VersionInfo>
     <PublishOptions>
     <PublishOptions>
       <Version Value="2"/>
       <Version Value="2"/>
@@ -28,344 +27,490 @@
     <RunParams>
     <RunParams>
       <local>
       <local>
         <FormatVersion Value="1"/>
         <FormatVersion Value="1"/>
-        <CommandLineParams Value="avail"/>
+        <CommandLineParams Value="list"/>
         <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>
-    <Units Count="39">
+    <Units Count="38">
       <Unit0>
       <Unit0>
         <Filename Value="fppkg.pp"/>
         <Filename Value="fppkg.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="fppkg"/>
         <UnitName Value="fppkg"/>
-        <CursorPos X="1" Y="317"/>
-        <TopLine Value="293"/>
-        <EditorIndex Value="7"/>
-        <UsageCount Value="86"/>
+        <IsVisibleTab Value="True"/>
+        <EditorIndex Value="10"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="99"/>
+        <CursorPos X="61" Y="104"/>
+        <UsageCount Value="223"/>
         <Loaded Value="True"/>
         <Loaded Value="True"/>
       </Unit0>
       </Unit0>
       <Unit1>
       <Unit1>
         <Filename Value="pkgropts.pp"/>
         <Filename Value="pkgropts.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="pkgoptions"/>
         <UnitName Value="pkgoptions"/>
-        <CursorPos X="41" Y="18"/>
         <TopLine Value="1"/>
         <TopLine Value="1"/>
-        <UsageCount Value="86"/>
+        <CursorPos X="41" Y="18"/>
+        <UsageCount Value="223"/>
       </Unit1>
       </Unit1>
       <Unit2>
       <Unit2>
         <Filename Value="fpmkcnst.inc"/>
         <Filename Value="fpmkcnst.inc"/>
-        <CursorPos X="64" Y="8"/>
         <TopLine Value="1"/>
         <TopLine Value="1"/>
-        <UsageCount Value="72"/>
+        <CursorPos X="64" Y="8"/>
+        <UsageCount Value="59"/>
       </Unit2>
       </Unit2>
       <Unit3>
       <Unit3>
         <Filename Value="fpmktype.pp"/>
         <Filename Value="fpmktype.pp"/>
         <UnitName Value="fpmktype"/>
         <UnitName Value="fpmktype"/>
-        <CursorPos X="3" Y="41"/>
         <TopLine Value="1"/>
         <TopLine Value="1"/>
-        <UsageCount Value="72"/>
+        <CursorPos X="3" Y="41"/>
+        <UsageCount Value="59"/>
       </Unit3>
       </Unit3>
       <Unit4>
       <Unit4>
         <Filename Value="fpmkunit.pp"/>
         <Filename Value="fpmkunit.pp"/>
         <UnitName Value="fpmkunit"/>
         <UnitName Value="fpmkunit"/>
-        <CursorPos X="1" Y="1"/>
         <TopLine Value="1"/>
         <TopLine Value="1"/>
-        <UsageCount Value="72"/>
+        <CursorPos X="1" Y="1"/>
+        <UsageCount Value="59"/>
       </Unit4>
       </Unit4>
       <Unit5>
       <Unit5>
         <Filename Value="fprepos.pp"/>
         <Filename Value="fprepos.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="fprepos"/>
         <UnitName Value="fprepos"/>
-        <CursorPos X="3" Y="167"/>
-        <TopLine Value="168"/>
-        <EditorIndex Value="8"/>
-        <UsageCount Value="86"/>
-        <Loaded Value="True"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="245"/>
+        <CursorPos X="3" Y="245"/>
+        <UsageCount Value="223"/>
       </Unit5>
       </Unit5>
       <Unit6>
       <Unit6>
         <Filename Value="fpxmlrep.pp"/>
         <Filename Value="fpxmlrep.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="fpxmlrep"/>
         <UnitName Value="fpxmlrep"/>
-        <CursorPos X="1" Y="43"/>
         <TopLine Value="43"/>
         <TopLine Value="43"/>
-        <UsageCount Value="86"/>
+        <CursorPos X="1" Y="43"/>
+        <UsageCount Value="223"/>
       </Unit6>
       </Unit6>
       <Unit7>
       <Unit7>
         <Filename Value="pkghandler.pp"/>
         <Filename Value="pkghandler.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="pkghandler"/>
         <UnitName Value="pkghandler"/>
-        <CursorPos X="46" Y="219"/>
-        <TopLine Value="200"/>
-        <EditorIndex Value="6"/>
-        <UsageCount Value="86"/>
+        <EditorIndex Value="9"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="182"/>
+        <CursorPos X="46" Y="212"/>
+        <UsageCount Value="223"/>
         <Loaded Value="True"/>
         <Loaded Value="True"/>
       </Unit7>
       </Unit7>
       <Unit8>
       <Unit8>
         <Filename Value="pkgmkconv.pp"/>
         <Filename Value="pkgmkconv.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="pkgmkconv"/>
         <UnitName Value="pkgmkconv"/>
-        <CursorPos X="14" Y="53"/>
         <TopLine Value="29"/>
         <TopLine Value="29"/>
-        <UsageCount Value="86"/>
+        <CursorPos X="14" Y="53"/>
+        <UsageCount Value="223"/>
       </Unit8>
       </Unit8>
       <Unit9>
       <Unit9>
         <Filename Value="pkgdownload.pp"/>
         <Filename Value="pkgdownload.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="pkgDownload"/>
         <UnitName Value="pkgDownload"/>
-        <CursorPos X="27" Y="144"/>
-        <TopLine Value="129"/>
-        <UsageCount Value="86"/>
+        <EditorIndex Value="11"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="113"/>
+        <CursorPos X="24" Y="125"/>
+        <UsageCount Value="223"/>
+        <Loaded Value="True"/>
       </Unit9>
       </Unit9>
       <Unit10>
       <Unit10>
         <Filename Value="pkgmessages.pp"/>
         <Filename Value="pkgmessages.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="pkgmessages"/>
         <UnitName Value="pkgmessages"/>
-        <CursorPos X="23" Y="36"/>
-        <TopLine Value="8"/>
         <EditorIndex Value="2"/>
         <EditorIndex Value="2"/>
-        <UsageCount Value="86"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="36"/>
+        <CursorPos X="3" Y="54"/>
+        <UsageCount Value="223"/>
         <Loaded Value="True"/>
         <Loaded Value="True"/>
       </Unit10>
       </Unit10>
       <Unit11>
       <Unit11>
-        <Filename Value="streamcoll.pp"/>
-        <UnitName Value="streamcoll"/>
-        <CursorPos X="66" Y="88"/>
-        <TopLine Value="65"/>
-        <UsageCount Value="4"/>
+        <Filename Value="../../../fpc20/rtl/objpas/classes/classesh.inc"/>
+        <TopLine Value="580"/>
+        <CursorPos X="14" Y="599"/>
+        <UsageCount Value="19"/>
       </Unit11>
       </Unit11>
       <Unit12>
       <Unit12>
-        <Filename Value="streamcoll20.pp"/>
-        <UnitName Value="streamcoll"/>
-        <CursorPos X="3" Y="15"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="4"/>
+        <Filename Value="../../../fpc20/rtl/inc/objpash.inc"/>
+        <TopLine Value="269"/>
+        <CursorPos X="38" Y="277"/>
+        <UsageCount Value="17"/>
       </Unit12>
       </Unit12>
       <Unit13>
       <Unit13>
-        <Filename Value="../../../fpc20/rtl/objpas/classes/classesh.inc"/>
-        <CursorPos X="14" Y="599"/>
-        <TopLine Value="580"/>
-        <UsageCount Value="32"/>
+        <Filename Value="contnrs20.pp"/>
+        <UnitName Value="contnrs20"/>
+        <TopLine Value="1"/>
+        <CursorPos X="1" Y="1"/>
+        <UsageCount Value="11"/>
       </Unit13>
       </Unit13>
       <Unit14>
       <Unit14>
-        <Filename Value="../../../fpc20/rtl/inc/objpash.inc"/>
-        <CursorPos X="38" Y="277"/>
-        <TopLine Value="269"/>
-        <UsageCount Value="30"/>
+        <Filename Value="pkgcommands.pp"/>
+        <UnitName Value="pkgcommands"/>
+        <EditorIndex Value="1"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="119"/>
+        <CursorPos X="70" Y="134"/>
+        <UsageCount Value="110"/>
+        <Loaded Value="True"/>
       </Unit14>
       </Unit14>
       <Unit15>
       <Unit15>
-        <Filename Value="../../../fpc20/fcl/inc/contnrs.pp"/>
-        <UnitName Value="contnrs"/>
-        <CursorPos X="1" Y="19"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="4"/>
+        <Filename Value="pkgwget.pp"/>
+        <UnitName Value="pkgwget"/>
+        <TopLine Value="15"/>
+        <CursorPos X="18" Y="25"/>
+        <UsageCount Value="15"/>
       </Unit15>
       </Unit15>
       <Unit16>
       <Unit16>
-        <Filename Value="contnrs20.pp"/>
-        <UnitName Value="contnrs20"/>
-        <CursorPos X="1" Y="1"/>
+        <Filename Value="reptest.pp"/>
+        <UnitName Value="reptest"/>
         <TopLine Value="1"/>
         <TopLine Value="1"/>
-        <UsageCount Value="24"/>
+        <CursorPos X="1" Y="1"/>
+        <UsageCount Value="8"/>
       </Unit16>
       </Unit16>
       <Unit17>
       <Unit17>
-        <Filename Value="pkgcommands.pp"/>
-        <UnitName Value="pkgcommands"/>
-        <CursorPos X="13" Y="110"/>
-        <TopLine Value="110"/>
-        <EditorIndex Value="1"/>
-        <UsageCount Value="41"/>
-        <Loaded Value="True"/>
+        <Filename Value="rep2xml.lpr"/>
+        <UnitName Value="rep2xml"/>
+        <TopLine Value="217"/>
+        <CursorPos X="40" Y="228"/>
+        <UsageCount Value="8"/>
       </Unit17>
       </Unit17>
       <Unit18>
       <Unit18>
-        <Filename Value="pkgwget.pp"/>
-        <UnitName Value="pkgwget"/>
-        <CursorPos X="18" Y="25"/>
-        <TopLine Value="15"/>
-        <UsageCount Value="28"/>
+        <Filename Value="pkgrepos.pp"/>
+        <UnitName Value="pkgrepos"/>
+        <EditorIndex Value="7"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="47"/>
+        <CursorPos X="1" Y="62"/>
+        <UsageCount Value="101"/>
+        <Loaded Value="True"/>
       </Unit18>
       </Unit18>
       <Unit19>
       <Unit19>
-        <Filename Value="pkglnet.pas"/>
-        <UnitName Value="pkglnet"/>
-        <CursorPos X="36" Y="19"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="7"/>
+        <Filename Value="zipper.pp"/>
+        <UnitName Value="zipper"/>
+        <TopLine Value="1303"/>
+        <CursorPos X="21" Y="1324"/>
+        <UsageCount Value="1"/>
       </Unit19>
       </Unit19>
       <Unit20>
       <Unit20>
-        <Filename Value="reptest.pp"/>
-        <UnitName Value="reptest"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="21"/>
+        <Filename Value="pkgfpmake.pp"/>
+        <UnitName Value="pkgfpmake"/>
+        <EditorIndex Value="0"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="264"/>
+        <CursorPos X="38" Y="280"/>
+        <UsageCount Value="91"/>
+        <Loaded Value="True"/>
       </Unit20>
       </Unit20>
       <Unit21>
       <Unit21>
-        <Filename Value="rep2xml.lpr"/>
-        <UnitName Value="rep2xml"/>
-        <CursorPos X="40" Y="228"/>
-        <TopLine Value="217"/>
-        <UsageCount Value="21"/>
+        <Filename Value="pkglnet.pp"/>
+        <UnitName Value="pkglnet"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1"/>
+        <CursorPos X="71" Y="10"/>
+        <UsageCount Value="70"/>
       </Unit21>
       </Unit21>
       <Unit22>
       <Unit22>
-        <Filename Value="pkgrepos.pp"/>
-        <UnitName Value="pkgrepos"/>
-        <CursorPos X="57" Y="242"/>
-        <TopLine Value="210"/>
-        <EditorIndex Value="4"/>
-        <UsageCount Value="32"/>
+        <Filename Value="pkgoptions.pp"/>
+        <UnitName Value="pkgoptions"/>
+        <EditorIndex Value="3"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="356"/>
+        <CursorPos X="1" Y="371"/>
+        <UsageCount Value="90"/>
+        <Bookmarks Count="2">
+          <Item0 X="1" Y="272" ID="2"/>
+          <Item1 X="1" Y="391" ID="1"/>
+        </Bookmarks>
         <Loaded Value="True"/>
         <Loaded Value="True"/>
       </Unit22>
       </Unit22>
       <Unit23>
       <Unit23>
-        <Filename Value="pkgocurl.pp"/>
-        <UnitName Value="pkgoCurl"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="7"/>
+        <Filename Value="pkgglobals.pp"/>
+        <UnitName Value="pkgglobals"/>
+        <EditorIndex Value="8"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="344"/>
+        <CursorPos X="37" Y="372"/>
+        <UsageCount Value="88"/>
+        <Loaded Value="True"/>
       </Unit23>
       </Unit23>
       <Unit24>
       <Unit24>
-        <Filename Value="pkglibcurl.pp"/>
-        <UnitName Value="pkglibcurl"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="7"/>
+        <Filename Value="../../rtl/objpas/sysutils/osutilsh.inc"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="23"/>
+        <CursorPos X="10" Y="41"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="62"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit24>
       </Unit24>
       <Unit25>
       <Unit25>
-        <Filename Value="zipper.pp"/>
-        <UnitName Value="zipper"/>
-        <CursorPos X="21" Y="1324"/>
-        <TopLine Value="1303"/>
-        <UsageCount Value="14"/>
+        <Filename Value="../../rtl/unix/sysutils.pp"/>
+        <UnitName Value="sysutils"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1349"/>
+        <CursorPos X="3" Y="1353"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="62"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit25>
       </Unit25>
       <Unit26>
       <Unit26>
-        <Filename Value="../../../fpc20/rtl/objpas/sysutils/filutilh.inc"/>
-        <CursorPos X="12" Y="53"/>
-        <TopLine Value="40"/>
-        <UsageCount Value="12"/>
+        <Filename Value="../../../lazarus/packager/packagesystem.pas"/>
+        <UnitName Value="PackageSystem"/>
+        <EditorIndex Value="5"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1296"/>
+        <CursorPos X="10" Y="1314"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="29"/>
+        <Loaded Value="True"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit26>
       </Unit26>
       <Unit27>
       <Unit27>
-        <Filename Value="../../../fpc20/rtl/inc/systemh.inc"/>
-        <CursorPos X="3" Y="214"/>
-        <TopLine Value="313"/>
-        <UsageCount Value="12"/>
+        <Filename Value="../../rtl/objpas/sysutils/finah.inc"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="7"/>
+        <CursorPos X="10" Y="39"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit27>
       </Unit27>
       <Unit28>
       <Unit28>
-        <Filename Value="../../../fpc20/rtl/objpas/sysutils/datih.inc"/>
-        <CursorPos X="16" Y="93"/>
-        <TopLine Value="86"/>
-        <UsageCount Value="12"/>
+        <Filename Value="../../../lazarus/packager/basepkgmanager.pas"/>
+        <UnitName Value="BasePkgManager"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="229"/>
+        <CursorPos X="37" Y="247"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="27"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit28>
       </Unit28>
       <Unit29>
       <Unit29>
-        <Filename Value="zstream.pp"/>
-        <UnitName Value="zstream"/>
-        <CursorPos X="38" Y="348"/>
-        <TopLine Value="330"/>
-        <UsageCount Value="10"/>
+        <Filename Value="../../../lazarus/ide/frames/files_options.pas"/>
+        <ComponentName Value="FilesOptionsFrame"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Frame"/>
+        <UnitName Value="files_options"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="297"/>
+        <CursorPos X="27" Y="319"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit29>
       </Unit29>
       <Unit30>
       <Unit30>
-        <Filename Value="../../../fpc20/packages/base/paszlib/paszlib.pas"/>
-        <UnitName Value="paszlib"/>
-        <CursorPos X="34" Y="139"/>
-        <TopLine Value="118"/>
-        <UsageCount Value="10"/>
+        <Filename Value="../../../lazarus/ide/environmentopts.pp"/>
+        <UnitName Value="EnvironmentOpts"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1460"/>
+        <CursorPos X="66" Y="1478"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit30>
       </Unit30>
       <Unit31>
       <Unit31>
-        <Filename Value="pkgfpmake.pp"/>
-        <UnitName Value="pkgfpmake"/>
-        <CursorPos X="25" Y="236"/>
-        <TopLine Value="217"/>
-        <EditorIndex Value="0"/>
-        <UsageCount Value="20"/>
+        <Filename Value="../../../lazarus/components/codetools/fileprocs.pas"/>
+        <UnitName Value="FileProcs"/>
+        <EditorIndex Value="6"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="966"/>
+        <CursorPos X="26" Y="969"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="29"/>
         <Loaded Value="True"/>
         <Loaded Value="True"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit31>
       </Unit31>
       <Unit32>
       <Unit32>
-        <Filename Value="pkglnet.pp"/>
-        <UnitName Value="pkglnet"/>
-        <CursorPos X="71" Y="10"/>
-        <TopLine Value="1"/>
-        <EditorIndex Value="9"/>
-        <UsageCount Value="17"/>
-        <Loaded Value="True"/>
+        <Filename Value="../../../lazarus/components/chmhelp/packages/idehelp/lazchmhelp.pas"/>
+        <UnitName Value="LazChmHelp"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="176"/>
+        <CursorPos X="31" Y="194"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit32>
       </Unit32>
       <Unit33>
       <Unit33>
-        <Filename Value="pkgoptions.pp"/>
-        <UnitName Value="pkgoptions"/>
-        <CursorPos X="24" Y="476"/>
-        <TopLine Value="439"/>
-        <EditorIndex Value="3"/>
-        <UsageCount Value="19"/>
-        <Loaded Value="True"/>
+        <Filename Value="../../../lazarus/test/bugs/testfileproc.pas"/>
+        <UnitName Value="testfileproc"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="19"/>
+        <CursorPos X="14" Y="45"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit33>
       </Unit33>
       <Unit34>
       <Unit34>
-        <Filename Value="pkgglobals.pp"/>
-        <UnitName Value="pkgglobals"/>
-        <CursorPos X="1" Y="20"/>
-        <TopLine Value="20"/>
-        <EditorIndex Value="5"/>
-        <UsageCount Value="17"/>
-        <Loaded Value="True"/>
+        <Filename Value="../../../lazarus/ide/transfermacros.pp"/>
+        <UnitName Value="TransferMacros"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1"/>
+        <CursorPos X="40" Y="19"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="27"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit34>
       </Unit34>
       <Unit35>
       <Unit35>
-        <Filename Value="../../../fpc20/packages/base/netdb/uriparser.pp"/>
-        <UnitName Value="URIParser"/>
-        <CursorPos X="1" Y="193"/>
-        <TopLine Value="189"/>
-        <UsageCount Value="9"/>
+        <Filename Value="../../packages/fcl-web/src/fptemplate.pp"/>
+        <UnitName Value="fpTemplate"/>
+        <EditorIndex Value="4"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="56"/>
+        <CursorPos X="1" Y="69"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="29"/>
+        <Loaded Value="True"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit35>
       </Unit35>
       <Unit36>
       <Unit36>
-        <Filename Value="pkgarchive.pp"/>
-        <UnitName Value="pkgarchive"/>
-        <CursorPos X="1" Y="74"/>
-        <TopLine Value="69"/>
-        <UsageCount Value="12"/>
+        <Filename Value="../../packages/fcl-base/src/inifiles.pp"/>
+        <UnitName Value="IniFiles"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="163"/>
+        <CursorPos X="14" Y="178"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit36>
       </Unit36>
       <Unit37>
       <Unit37>
-        <Filename Value="/tmp/testcompileroptions.pas"/>
-        <UnitName Value="testcompileroptions"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="10"/>
+        <Filename Value="../../rtl/objpas/sysutils/osutil.inc"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="66"/>
+        <CursorPos X="40" Y="75"/>
+        <SyntaxHighlighter Value="FreePascal"/>
+        <UsageCount Value="7"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
       </Unit37>
       </Unit37>
-      <Unit38>
-        <Filename Value="../../../proj/lazarus/lcl/interfaces/gtk/gtkproc.pp"/>
-        <UnitName Value="GTKProc"/>
-        <CursorPos X="11" Y="674"/>
-        <TopLine Value="655"/>
-        <UsageCount Value="10"/>
-      </Unit38>
     </Units>
     </Units>
-    <JumpHistory Count="8" HistoryIndex="7">
+    <JumpHistory Count="30" HistoryIndex="29">
       <Position1>
       <Position1>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="108" Column="17" TopLine="108"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="177" Column="16" TopLine="161"/>
       </Position1>
       </Position1>
       <Position2>
       <Position2>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="177" Column="16" TopLine="173"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="178" Column="16" TopLine="161"/>
       </Position2>
       </Position2>
       <Position3>
       <Position3>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="212" Column="77" TopLine="193"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="184" Column="16" TopLine="161"/>
       </Position3>
       </Position3>
       <Position4>
       <Position4>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="222" Column="33" TopLine="196"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="194" Column="30" TopLine="179"/>
       </Position4>
       </Position4>
       <Position5>
       <Position5>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="210" Column="1" TopLine="183"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="195" Column="30" TopLine="179"/>
       </Position5>
       </Position5>
       <Position6>
       <Position6>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="218" Column="29" TopLine="203"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="196" Column="30" TopLine="179"/>
       </Position6>
       </Position6>
       <Position7>
       <Position7>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="26" Column="28" TopLine="7"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="197" Column="30" TopLine="179"/>
       </Position7>
       </Position7>
       <Position8>
       <Position8>
-        <Filename Value="pkgrepos.pp"/>
-        <Caret Line="229" Column="1" TopLine="208"/>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="232" Column="16" TopLine="217"/>
       </Position8>
       </Position8>
+      <Position9>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="271" Column="1" TopLine="256"/>
+      </Position9>
+      <Position10>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="326" Column="1" TopLine="311"/>
+      </Position10>
+      <Position11>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="390" Column="16" TopLine="375"/>
+      </Position11>
+      <Position12>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="391" Column="16" TopLine="375"/>
+      </Position12>
+      <Position13>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="392" Column="16" TopLine="375"/>
+      </Position13>
+      <Position14>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="393" Column="16" TopLine="375"/>
+      </Position14>
+      <Position15>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="398" Column="16" TopLine="375"/>
+      </Position15>
+      <Position16>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="409" Column="30" TopLine="394"/>
+      </Position16>
+      <Position17>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="62" Column="1" TopLine="39"/>
+      </Position17>
+      <Position18>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="94" Column="15" TopLine="79"/>
+      </Position18>
+      <Position19>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="119" Column="23" TopLine="104"/>
+      </Position19>
+      <Position20>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="163" Column="40" TopLine="148"/>
+      </Position20>
+      <Position21>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="410" Column="53" TopLine="395"/>
+      </Position21>
+      <Position22>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="425" Column="19" TopLine="410"/>
+      </Position22>
+      <Position23>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="453" Column="16" TopLine="438"/>
+      </Position23>
+      <Position24>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="454" Column="23" TopLine="438"/>
+      </Position24>
+      <Position25>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="453" Column="23" TopLine="438"/>
+      </Position25>
+      <Position26>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="454" Column="23" TopLine="438"/>
+      </Position26>
+      <Position27>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="516" Column="75" TopLine="494"/>
+      </Position27>
+      <Position28>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="393" Column="1" TopLine="378"/>
+      </Position28>
+      <Position29>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="325" Column="1" TopLine="310"/>
+      </Position29>
+      <Position30>
+        <Filename Value="pkgoptions.pp"/>
+        <Caret Line="371" Column="1" TopLine="356"/>
+      </Position30>
     </JumpHistory>
     </JumpHistory>
   </ProjectOptions>
   </ProjectOptions>
   <CompilerOptions>
   <CompilerOptions>
-    <Version Value="5"/>
+    <Version Value="8"/>
     <SearchPaths>
     <SearchPaths>
       <IncludeFiles Value="lnet/sys/"/>
       <IncludeFiles Value="lnet/sys/"/>
       <OtherUnitFiles Value="lnet/"/>
       <OtherUnitFiles Value="lnet/"/>

+ 59 - 24
utils/fppkg/pkgoptions.pp

@@ -16,7 +16,7 @@ unit pkgoptions;
 
 
 interface
 interface
 
 
-uses Classes, Sysutils, Inifiles, fprepos;
+uses Classes, Sysutils, Inifiles, fprepos, fpTemplate;
 
 
 Const
 Const
   UnitConfigFileName   = 'fpunits.conf';
   UnitConfigFileName   = 'fpunits.conf';
@@ -24,7 +24,7 @@ Const
   MirrorsFileName      = 'mirrors.xml';
   MirrorsFileName      = 'mirrors.xml';
   PackagesFileName     = 'packages.xml';
   PackagesFileName     = 'packages.xml';
   VersionsFileName     = 'versions-%s.dat';
   VersionsFileName     = 'versions-%s.dat';
-  CurrentConfigVersion = 3;
+  CurrentConfigVersion = 4;
 
 
 Type
 Type
 
 
@@ -48,10 +48,13 @@ Type
     FAllowBroken,
     FAllowBroken,
     FInstallGlobal,
     FInstallGlobal,
     FRecoveryMode   : Boolean;
     FRecoveryMode   : Boolean;
+    FOptionParser: TTemplateParser;
     function  GetOptString(Index: integer): String;
     function  GetOptString(Index: integer): String;
     procedure SetOptString(Index: integer; const AValue: String);
     procedure SetOptString(Index: integer; const AValue: String);
+    procedure UpdateLocalRepositoryOption;
   Public
   Public
     Constructor Create;
     Constructor Create;
+    destructor Destroy; override;
     Procedure InitGlobalDefaults;
     Procedure InitGlobalDefaults;
     Procedure LoadGlobalFromFile(const AFileName : String);
     Procedure LoadGlobalFromFile(const AFileName : String);
     Procedure SaveGlobalToFile(const AFileName : String);
     Procedure SaveGlobalToFile(const AFileName : String);
@@ -92,12 +95,14 @@ Type
     FGlobalInstallDir : String;
     FGlobalInstallDir : String;
     FCompilerCPU: TCPU;
     FCompilerCPU: TCPU;
     FCompilerOS: TOS;
     FCompilerOS: TOS;
+    FOptionParser: TTemplateParser;
     function GetOptString(Index: integer): String;
     function GetOptString(Index: integer): String;
     procedure SetOptString(Index: integer; const AValue: String);
     procedure SetOptString(Index: integer; const AValue: String);
     procedure SetCompilerCPU(const AValue: TCPU);
     procedure SetCompilerCPU(const AValue: TCPU);
     procedure SetCompilerOS(const AValue: TOS);
     procedure SetCompilerOS(const AValue: TOS);
   Public
   Public
     Constructor Create;
     Constructor Create;
+    Destructor Destroy; override;
     Procedure InitCompilerDefaults;
     Procedure InitCompilerDefaults;
     Procedure LoadCompilerFromFile(const AFileName : String);
     Procedure LoadCompilerFromFile(const AFileName : String);
     Procedure SaveCompilerToFile(const AFileName : String);
     Procedure SaveCompilerToFile(const AFileName : String);
@@ -168,19 +173,28 @@ Const
 
 
 constructor TGlobalOptions.Create;
 constructor TGlobalOptions.Create;
 begin
 begin
+  FOptionParser := TTemplateParser.Create;
+  FOptionParser.Values['AppConfigDir'] := GetAppConfigDir(false);
+  FOptionParser.Values['UserDir'] := GetUserDir;
   InitGlobalDefaults;
   InitGlobalDefaults;
 end;
 end;
 
 
+destructor TGlobalOptions.Destroy;
+begin
+  FOptionParser.Free;
+  inherited Destroy;
+end;
+
 
 
 function TGlobalOptions.GetOptString(Index: integer): String;
 function TGlobalOptions.GetOptString(Index: integer): String;
 begin
 begin
   Case Index of
   Case Index of
     0 : Result:=FRemoteMirrorsURL;
     0 : Result:=FRemoteMirrorsURL;
     2 : Result:=FRemoteRepository;
     2 : Result:=FRemoteRepository;
-    3 : Result:=FLocalRepository;
-    4 : Result:=FBuildDir;
-    5 : Result:=FArchivesDir;
-    6 : Result:=FCompilerConfigDir;
+    3 : Result:=FOptionParser.ParseString(FLocalRepository);
+    4 : Result:=FOptionParser.ParseString(FBuildDir);
+    5 : Result:=FOptionParser.ParseString(FArchivesDir);
+    6 : Result:=FOptionParser.ParseString(FCompilerConfigDir);
     8 : Result:=FDefaultCompilerConfig;
     8 : Result:=FDefaultCompilerConfig;
     9 : Result:=FFPMakeCompilerConfig;
     9 : Result:=FFPMakeCompilerConfig;
    10 : Result:=FDownloader;
    10 : Result:=FDownloader;
@@ -196,7 +210,10 @@ begin
   Case Index of
   Case Index of
     1 : FRemoteMirrorsURL:=AValue;
     1 : FRemoteMirrorsURL:=AValue;
     2 : FRemoteRepository:=AValue;
     2 : FRemoteRepository:=AValue;
-    3 : FLocalRepository:=AValue;
+    3 : begin
+          FLocalRepository:=AValue;
+          UpdateLocalRepositoryOption;
+        end;
     4 : FBuildDir:=FixPath(AValue);
     4 : FBuildDir:=FixPath(AValue);
     5 : FArchivesDir:=FixPath(AValue);
     5 : FArchivesDir:=FixPath(AValue);
     6 : FCompilerConfigDir:=FixPath(AValue);
     6 : FCompilerConfigDir:=FixPath(AValue);
@@ -210,21 +227,27 @@ begin
 end;
 end;
 
 
 
 
+procedure TGlobalOptions.UpdateLocalRepositoryOption;
+begin
+  FOptionParser.Values['LocalRepository'] := LocalRepository;
+end;
+
+
 function TGlobalOptions.LocalPackagesFile:string;
 function TGlobalOptions.LocalPackagesFile:string;
 begin
 begin
-  Result:=FLocalRepository+PackagesFileName;
+  Result:=LocalRepository+PackagesFileName;
 end;
 end;
 
 
 
 
 function TGlobalOptions.LocalMirrorsFile:string;
 function TGlobalOptions.LocalMirrorsFile:string;
 begin
 begin
-  Result:=FLocalRepository+MirrorsFileName;
+  Result:=LocalRepository+MirrorsFileName;
 end;
 end;
 
 
 
 
 function TGlobalOptions.LocalVersionsFile(const ACompilerConfig:String):string;
 function TGlobalOptions.LocalVersionsFile(const ACompilerConfig:String):string;
 begin
 begin
-  Result:=FLocalRepository+Format(VersionsFileName,[ACompilerConfig]);
+  Result:=LocalRepository+Format(VersionsFileName,[ACompilerConfig]);
 end;
 end;
 
 
 
 
@@ -241,14 +264,15 @@ begin
         FLocalRepository:='/usr/lib/fpc/fppkg/';
         FLocalRepository:='/usr/lib/fpc/fppkg/';
     end
     end
   else
   else
-    FLocalRepository:=IncludeTrailingPathDelimiter(GetEnvironmentVariable('HOME'))+'.fppkg/';
+    FLocalRepository:='{UserDir}.fppkg/';
 {$else}
 {$else}
   FLocalRepository:=IncludeTrailingPathDelimiter(GetAppConfigDir(IsSuperUser));
   FLocalRepository:=IncludeTrailingPathDelimiter(GetAppConfigDir(IsSuperUser));
 {$endif}
 {$endif}
+  UpdateLocalRepositoryOption;
   // Directories
   // Directories
-  FBuildDir:=FLocalRepository+'build'+PathDelim;
-  FArchivesDir:=FLocalRepository+'archives'+PathDelim;
-  FCompilerConfigDir:=FLocalRepository+'config'+PathDelim;
+  FBuildDir:='{LocalRepository}build'+PathDelim;
+  FArchivesDir:='{LocalRepository}archives'+PathDelim;
+  FCompilerConfigDir:='{LocalRepository}config'+PathDelim;
   // Remote
   // Remote
   FRemoteMirrorsURL:=DefaultMirrorsURL;
   FRemoteMirrorsURL:=DefaultMirrorsURL;
   FRemoteRepository:=DefaultRemoteRepository;
   FRemoteRepository:=DefaultRemoteRepository;
@@ -299,6 +323,7 @@ begin
         FRemoteMirrorsURL:=ReadString(SDefaults,KeyRemoteMirrorsURL,FRemoteMirrorsURL);
         FRemoteMirrorsURL:=ReadString(SDefaults,KeyRemoteMirrorsURL,FRemoteMirrorsURL);
         FRemoteRepository:=ReadString(SDefaults,KeyRemoteRepository,FRemoteRepository);
         FRemoteRepository:=ReadString(SDefaults,KeyRemoteRepository,FRemoteRepository);
         FLocalRepository:=ReadString(SDefaults,KeyLocalRepository,FLocalRepository);
         FLocalRepository:=ReadString(SDefaults,KeyLocalRepository,FLocalRepository);
+        UpdateLocalRepositoryOption;
         FBuildDir:=FixPath(ReadString(SDefaults,KeyBuildDir,FBuildDir));
         FBuildDir:=FixPath(ReadString(SDefaults,KeyBuildDir,FBuildDir));
         FArchivesDir:=FixPath(ReadString(SDefaults,KeyArchivesDir,FArchivesDir));
         FArchivesDir:=FixPath(ReadString(SDefaults,KeyArchivesDir,FArchivesDir));
         FCompilerConfigDir:=FixPath(ReadString(SDefaults,KeyCompilerConfigDir,FCompilerConfigDir));
         FCompilerConfigDir:=FixPath(ReadString(SDefaults,KeyCompilerConfigDir,FCompilerConfigDir));
@@ -323,10 +348,10 @@ begin
     With Ini do
     With Ini do
       begin
       begin
         WriteInteger(SDefaults,KeyConfigVersion,CurrentConfigVersion);
         WriteInteger(SDefaults,KeyConfigVersion,CurrentConfigVersion);
+        WriteString(SDefaults,KeyLocalRepository,FLocalRepository);
         WriteString(SDefaults,KeyBuildDir,FBuildDir);
         WriteString(SDefaults,KeyBuildDir,FBuildDir);
         WriteString(SDefaults,KeyArchivesDir,FArchivesDir);
         WriteString(SDefaults,KeyArchivesDir,FArchivesDir);
         WriteString(SDefaults,KeyCompilerConfigDir,FCompilerConfigDir);
         WriteString(SDefaults,KeyCompilerConfigDir,FCompilerConfigDir);
-        WriteString(SDefaults,KeyLocalRepository,FLocalRepository);
         WriteString(SDefaults,KeyRemoteMirrorsURL,FRemoteMirrorsURL);
         WriteString(SDefaults,KeyRemoteMirrorsURL,FRemoteMirrorsURL);
         WriteString(SDefaults,KeyRemoteRepository,FRemoteRepository);
         WriteString(SDefaults,KeyRemoteRepository,FRemoteRepository);
         WriteString(SDefaults,KeyCompilerConfig,FDefaultCompilerConfig);
         WriteString(SDefaults,KeyCompilerConfig,FDefaultCompilerConfig);
@@ -346,10 +371,10 @@ begin
   Log(vlDebug,SLogGlobalCfgHeader);
   Log(vlDebug,SLogGlobalCfgHeader);
   Log(vlDebug,SLogGlobalCfgRemoteMirrorsURL,[FRemoteMirrorsURL]);
   Log(vlDebug,SLogGlobalCfgRemoteMirrorsURL,[FRemoteMirrorsURL]);
   Log(vlDebug,SLogGlobalCfgRemoteRepository,[FRemoteRepository]);
   Log(vlDebug,SLogGlobalCfgRemoteRepository,[FRemoteRepository]);
-  Log(vlDebug,SLogGlobalCfgLocalRepository,[FLocalRepository]);
-  Log(vlDebug,SLogGlobalCfgBuildDir,[FBuildDir]);
-  Log(vlDebug,SLogGlobalCfgArchivesDir,[FArchivesDir]);
-  Log(vlDebug,SLogGlobalCfgCompilerConfigDir,[FCompilerConfigDir]);
+  Log(vlDebug,SLogGlobalCfgLocalRepository,[LocalRepository]);
+  Log(vlDebug,SLogGlobalCfgBuildDir,[BuildDir]);
+  Log(vlDebug,SLogGlobalCfgArchivesDir,[ArchivesDir]);
+  Log(vlDebug,SLogGlobalCfgCompilerConfigDir,[CompilerConfigDir]);
   Log(vlDebug,SLogGlobalCfgDefaultCompilerConfig,[FDefaultCompilerConfig]);
   Log(vlDebug,SLogGlobalCfgDefaultCompilerConfig,[FDefaultCompilerConfig]);
   Log(vlDebug,SLogGlobalCfgFPMakeCompilerConfig,[FFPMakeCompilerConfig]);
   Log(vlDebug,SLogGlobalCfgFPMakeCompilerConfig,[FFPMakeCompilerConfig]);
   Log(vlDebug,SLogGlobalCfgDownloader,[FDownloader]);
   Log(vlDebug,SLogGlobalCfgDownloader,[FDownloader]);
@@ -362,6 +387,16 @@ end;
 
 
 constructor TCompilerOptions.Create;
 constructor TCompilerOptions.Create;
 begin
 begin
+  FOptionParser := TTemplateParser.Create;
+  FOptionParser.Values['AppConfigDir'] := GetAppConfigDir(false);
+  FOptionParser.Values['UserDir'] := GetUserDir;
+  FOptionParser.Values['LocalRepository'] := GlobalOptions.LocalRepository;
+end;
+
+destructor TCompilerOptions.Destroy;
+begin
+  FOptionParser.Free;
+  inherited Destroy;
 end;
 end;
 
 
 
 
@@ -371,8 +406,8 @@ begin
     1 : Result:=FCompiler;
     1 : Result:=FCompiler;
     2 : Result:=MakeTargetString(CompilerCPU,CompilerOS);
     2 : Result:=MakeTargetString(CompilerCPU,CompilerOS);
     3 : Result:=FCompilerVersion;
     3 : Result:=FCompilerVersion;
-    4 : Result:=FGlobalInstallDir;
-    5 : Result:=FLocalInstallDir;
+    4 : Result:=FOptionParser.ParseString(FGlobalInstallDir);
+    5 : Result:=FOptionParser.ParseString(FLocalInstallDir);
     else
     else
       Error('Unknown option');
       Error('Unknown option');
   end;
   end;
@@ -479,7 +514,7 @@ begin
   // User writable install directory
   // User writable install directory
   if not IsSuperUser then
   if not IsSuperUser then
     begin
     begin
-      FLocalInstallDir:=GlobalOptions.LocalRepository+'lib'+PathDelim+FCompilerVersion+PathDelim;
+      FLocalInstallDir:= '{LocalRepository}lib'+ PathDelim + FCompilerVersion+PathDelim;
       Log(vlDebug,SLogDetectedFPCDIR,['local',FLocalInstallDir]);
       Log(vlDebug,SLogDetectedFPCDIR,['local',FLocalInstallDir]);
     end;
     end;
 end;
 end;
@@ -546,8 +581,8 @@ begin
   Log(vlDebug,SLogCompilerCfgCompiler,[FCompiler]);
   Log(vlDebug,SLogCompilerCfgCompiler,[FCompiler]);
   Log(vlDebug,SLogCompilerCfgTarget,[MakeTargetString(CompilerCPU,CompilerOS)]);
   Log(vlDebug,SLogCompilerCfgTarget,[MakeTargetString(CompilerCPU,CompilerOS)]);
   Log(vlDebug,SLogCompilerCfgVersion,[FCompilerVersion]);
   Log(vlDebug,SLogCompilerCfgVersion,[FCompilerVersion]);
-  Log(vlDebug,SLogCompilerCfgGlobalInstallDir,[FGlobalInstallDir]);
-  Log(vlDebug,SLogCompilerCfgLocalInstallDir,[FLocalInstallDir]);
+  Log(vlDebug,SLogCompilerCfgGlobalInstallDir,[GlobalInstallDir]);
+  Log(vlDebug,SLogCompilerCfgLocalInstallDir,[LocalInstallDir]);
 end;
 end;