Commits

reiniero committed 16f233c

Installer: windows-only for now

Comments (0)

Files changed (5)

 Installdir=$(fpcdir)/../$(name)
 Enabled=0
 CreateInstaller1=Windows
-Uninstall=rm -Rf $(Installdir)
+Uninstall=rm -Rf $(Installdir)
+
+[FPCUPModule25]
+; lnet FPC/Lazarus package
+; lnet is a small network library, an alternative to e.g. Synapse
+; see http://wiki.lazarus.freepascal.org/lNet
+Name=lnet
+Installdir=$(fpcdir)/../extras/$(name)
+Enabled=1
+; we only want the trunk branch as otherwise we'd get all old releases
+SVNURL=http://svn.freepascal.org/svn/fpcprojects/lnet/trunk
+; compile the non-visual package
+InstallExecute1=$(lazarusdir)/lazbuild --primary-config-path=$(LazarusPrimaryConfigPath) $(Installdir)/lazaruspackage/lnetbase.lpk
+; and mark the visual package for installation:
+AddPackage1=$(Installdir)\lazaruspackage\lnetvisual.lpk
+; no idea if there are .lpks that may need to be installed. Please update if using this.
+; InstallExecute1=
+; AddPackage1=
+UnInstall=rm -Rf $(Installdir)
     <RunParams>
       <local>
         <FormatVersion Value="1"/>
-        <CommandLineParams Value="--only=installer --verbose --noconfirm"/>
+        <CommandLineParams Value="--verbose"/>
         <LaunchingApplication PathPlusParams="\usr\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
       </local>
     </RunParams>

Binary file modified.

installermanager.pas

 Sequencer.AddSequence(installerUniversal.Sequences);
 //append universal modules to the lists
 Sequencer.AddSequence(installerUniversal.GetModuleList(FConfigFile));
-installerUniversal.GetModuleEnabledList(FModuleEnabledList);
+result:=installerUniversal.GetModuleEnabledList(FModuleEnabledList);
 end;
 
 function TFPCupManager.Run: boolean;
 begin
   FParent.CrossCPU_Target:=CPU;
   ResetAllExecuted;
+  result:=true;
 end;
 
 function TSequencer.DoSetOS(OS: string): boolean;
 begin
   FParent.CrossOS_Target:=OS;
   ResetAllExecuted;
+  result:=true;
 end;
 
 function TSequencer.DoSetLCL(LCL: string): boolean;
 begin
   FParent.CrossLCL_Platform:=LCL;
   ResetAllExecuted(true);
+  result:=true;
 end;
 
 function TSequencer.DoUnInstallModule(ModuleName: string): boolean;
   Freemem(FParent.FModuleList.Objects[idx]);
   FParent.FModuleList.Delete(idx);
   end;
+result:=true;
 end;
 
 function TSequencer.Run(SequenceName: string): boolean;

installeruniversal.pas

   protected
     // Scans for and adds all packages specified in a (module's) stringlist with commands:
     function AddPackages(sl:TStringList): boolean;
+    {$IFDEF MSWINDOWS}
     // Filters (a module's) sl stringlist and creates all <Directive> installers.
     // Directive can now only be Windows/Windows32/Winx86 (synonyms)
+    // For now Windows-only; could be extended to generic cross platform installer class once this works
     function CreateInstallers(Directive:string;sl:TStringList;ModuleName:string):boolean;
+    {$ENDIF MSWINDOWS}
     function FirstSpaceAfterCommand(CommandLine: string): integer;
     function GetValue(Key:string;sl:TStringList;recursion:integer=0):string;
     // internal initialisation, called from BuildModule,CleanModule,GetModule
     end;
 end;
 
+{$IFDEF MSWINDOWS}
 function TUniversalInstaller.CreateInstallers(Directive: string; sl: TStringList;ModuleName:string): boolean;
 var
   i:integer;
         continue;
         end;
     end;
+
     if FVerbose then WritelnLog('TUniversalInstaller: running CreateInstallers for '+exec,true);
     Installer:=TWinInstaller.Create;
     try
     finally
       Installer.Free;
     end;
+
     if not result then
       break;
     end;
 end;
+{$ENDIF MSWINDOWS}
 
 function TUniversalInstaller.RunCommands(Directive: string;sl:TStringList): boolean;
 var
       sl.text,true);
     result:=RunCommands('InstallExecute',sl);
 
-    // Run all CreateInstaller<n> commands:
+    // Run all CreateInstaller<n> commands; for now Windows only
+    {$IFDEF MSWINDOWS}
     if FVerbose then WritelnLog('TUniversalInstaller: building module '+ModuleName+' running all CreateInstaller commands in: '+LineEnding+
       sl.text,true);
     result:=CreateInstallers('CreateInstaller',sl, ModuleName);
     end
+    {$ENDIF MSWINDOWS}
   else
     result:=false;
 end;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.