Browse Source

- FPC version is not initialized to 2.0.4 by default but takes the
FPCVERSION include
- Fixed TPackage.GetFileName when no version is set

git-svn-id: trunk@8287 -

peter 18 years ago
parent
commit
78c364db94
1 changed files with 7 additions and 8 deletions
  1. 7 8
      packages/fpmkunit/src/fpmkunit.pp

+ 7 - 8
packages/fpmkunit/src/fpmkunit.pp

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal Makefile Package
     This file is part of the Free Pascal Makefile Package
 
 
     Implementation of fpmake classes and functions
     Implementation of fpmake classes and functions
-    
+
     Copyright (c) 2007 by the freepascal team
     Copyright (c) 2007 by the freepascal team
 
 
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
@@ -1496,7 +1496,7 @@ begin
   if OS=osNone then
   if OS=osNone then
     OS:=StringToOS({$I %FPCTARGETOS%});
     OS:=StringToOS({$I %FPCTARGETOS%});
   if FCompilerVersion='' then
   if FCompilerVersion='' then
-    FCompilerVersion:='2.0.4';
+    FCompilerVersion:={$I %FPCVERSION%};
 end;
 end;
 
 
 procedure TCustomDefaults.LoadFromFile(Const AFileName: String);
 procedure TCustomDefaults.LoadFromFile(Const AFileName: String);
@@ -1765,8 +1765,6 @@ end;
 
 
 
 
 Procedure TPackage.GetManifest(Manifest : TStrings);
 Procedure TPackage.GetManifest(Manifest : TStrings);
-
-
 Var
 Var
   S : String;
   S : String;
   Release,Minor,Major : Word;
   Release,Minor,Major : Word;
@@ -1779,6 +1777,7 @@ begin
     Add(Format('<version release="%d" major="%d" minor="%d" suffix="%s"/>',[Release,Minor,Major,QuoteXMl(S)]));
     Add(Format('<version release="%d" major="%d" minor="%d" suffix="%s"/>',[Release,Minor,Major,QuoteXMl(S)]));
     Add(Format('<filename>%s</filename>',[QuoteXml(FileName)]));
     Add(Format('<filename>%s</filename>',[QuoteXml(FileName)]));
     Add(Format('<author>%s</author>',[QuoteXml(Author)]));
     Add(Format('<author>%s</author>',[QuoteXml(Author)]));
+    Add(Format('<license>%s</license>',[QuoteXml(License)]));
     if ExternalURL<>'' then
     if ExternalURL<>'' then
       Add(Format('<externalurl>%s</externalurl>',[QuoteXml(ExternalURL)]));
       Add(Format('<externalurl>%s</externalurl>',[QuoteXml(ExternalURL)]));
     Add(Format('<email>%s</email>',[QuoteXMl(Email)]));
     Add(Format('<email>%s</email>',[QuoteXMl(Email)]));
@@ -1972,7 +1971,10 @@ begin
   If (FFileName<>'') then
   If (FFileName<>'') then
     Result:=FFileName
     Result:=FFileName
   else
   else
-    Result:=Name+'-'+Version+'.zip';
+    if Version <> '' then
+      Result := Name + '-' + Version + '.zip'
+    else
+      Result := Name + '.zip';
 end;
 end;
 
 
 
 
@@ -2019,11 +2021,8 @@ begin
 end;
 end;
 
 
 Function TCustomInstaller.GetPackageString(Index : Integer) : String;
 Function TCustomInstaller.GetPackageString(Index : Integer) : String;
-
 Var
 Var
   P : TPackage;
   P : TPackage;
-
-
 begin
 begin
   CheckDefaultPackage;
   CheckDefaultPackage;
   P:=DefaultPackage;
   P:=DefaultPackage;