ProjectDefinition.st
branchjv
changeset 20579 9add81aadb7a
parent 20578 39641ba8d6e0
parent 20564 c9f47a3f5e9c
child 20580 bb4e5c4f84ef
--- a/ProjectDefinition.st	Mon Oct 03 12:44:41 2016 +0100
+++ b/ProjectDefinition.st	Sun Oct 09 21:28:18 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
@@ -17,9 +15,9 @@
 
 Object subclass:#ProjectDefinition
 	instanceVariableNames:''
-	classVariableNames:'LibraryType GUIApplicationType NonGUIApplicationType
-		PackagesBeingLoaded Verbose AbbrevDictionary AccessLock
-		FolderForSubApplicationsType'
+	classVariableNames:'AbbrevDictionary AccessLock FolderForSubApplicationsType
+		GUIApplicationType LibraryType NonGUIApplicationType
+		PackagesBeingLoaded Verbose'
 	poolDictionaries:''
 	category:'System-Support-Projects'
 !
@@ -1858,6 +1856,7 @@
     |preRequisites|
 
     preRequisites := self searchForPreRequisites first.
+    preRequisites removeAllKeys:self excludedFromMandatoryPreRequisites ifAbsent:[].
     preRequisites removeAllKeys:self excludedFromPreRequisites ifAbsent:[].
 
     ^ String streamContents:[:s |
@@ -1870,7 +1869,7 @@
 
             s spaces:8.
             eachPackageID asSymbol storeOn:s.
-            reason := preRequisites at:eachPackageID ifAbsent:nil.
+            reason := preRequisites at:eachPackageID ifAbsent:[nil].
             reason notEmptyOrNil ifTrue:[
                 s nextPutAll:'    "'; nextPutAll:reason anElement; nextPut:$".
             ].
@@ -1945,6 +1944,7 @@
     preRequisites := preRequisitesColl second.
     preRequisites
         removeAllKeys:self excludedFromPreRequisites ifAbsent:[];
+        removeAllKeys:self excludedFromRequiredPreRequisites ifAbsent:[];
         removeAllKeys:preRequisitesColl first keys ifAbsent:[].  "remove the mandatory prerequisites"
 
     ^ String streamContents:[:s |
@@ -1957,7 +1957,7 @@
 
             s spaces:8.
             eachPackageID asSymbol storeOn:s.
-            reason := preRequisites at:eachPackageID ifAbsent:nil.
+            reason := preRequisites at:eachPackageID ifAbsent:[nil].
             reason notEmptyOrNil ifTrue:[
                 s nextPutAll:'    "'; nextPutAll:reason anElement; nextPut:$".
             ].
@@ -2103,9 +2103,32 @@
 
 !ProjectDefinition class methodsFor:'description'!
 
-excludedFromPreRequisites
+excludedFromMandatoryPreRequisites
     "list packages which are to be explicitely excluded from the automatic constructed
-     prerequisites list. If empty, everything that is found along the inheritance of any of
+     mandatory prerequisites list. 
+     If empty, everything that is found along the inheritance of any of
+     my classes is considered to be a prerequisite package."
+
+    ^ #()
+!
+
+excludedFromPreRequisites
+    "obsolete; temporarily, this is still called for, but will eventually vanish.
+    
+     List packages which are to be explicitely excluded from the automatic constructed
+     prerequisites lists (both). 
+     If empty, everything that is found along the inheritance of any of
+     my classes is considered to be a prerequisite package."
+
+    ^ #()
+
+    "Modified: / 17-08-2006 / 19:48:59 / cg"
+!
+
+excludedFromRequiredPreRequisites
+    "list packages which are to be explicitely excluded from the automatic constructed
+     required prerequisites list. 
+     If empty, everything that is found along the inheritance of any of
      my classes is considered to be a prerequisite package."
 
     ^ #()
@@ -2154,7 +2177,8 @@
 !
 
 preRequisites
-    "list packages which are required as a prerequisite."
+    "list packages which are required as a prerequisite (both mandatory and referenced).
+     This is used to build dependency chains in makefiles"
 
     "use an OrderedSet here, so that mandatory prerequisites come first"
 
@@ -2788,7 +2812,8 @@
 
 companyName
     "Returns a company string which will appear in <lib>.rc.
-     Under win32, this is placed into the dlls file-info"
+     Under win32, this is placed into the dll's file-info.
+     Other systems may put it elsewhere, or ignore it."
 
     (
       #(
@@ -2942,7 +2967,8 @@
 
 legalCopyright
     "Returns a copyright string which will appear in <lib>.rc.
-     Under win32, this is placed into the dlls file-info"
+     Under win32, this is placed into the dll's file-info.
+     Other systems may put it elsewhere, or ignore it."
 
     self module = 'stx' ifTrue:[
         "hardwired-default"
@@ -3009,13 +3035,16 @@
 !
 
 productFilename
-    "Returns a filename which be used as linkname, product file name etc."
+    "Returns a filename which will be used as linkname, product file name etc.
+     The final deployable will be named like this (<fn>.dmg / <fn>Setup.ex / <fn>Install.pkg etc.)"
 
     ^ self productNameAsValidFilename
 
     "
      stx_projects_smalltalk productName
      stx_projects_smalltalk productFilename
+     stx_libbasic productFilename
+     stx_doc_coding_demoConsoleApp productFilename
     "
 
     "Created: / 01-03-2007 / 19:33:06 / cg"
@@ -3061,7 +3090,7 @@
 
 productName
     "Returns a product name which will appear in <lib>.rc.
-     Under win32, this is placed into the dlls file-info.
+     Under win32, this is placed into the dll's file-info.
      This method is usually redefined in a concrete application definition"
 
     |m nm|
@@ -3098,16 +3127,18 @@
 !
 
 productNameAsValidFilename
-    "Returns a product name which will appear in <lib>.rc.
-     Under win32, this is placed into the dlls file-info"
+    "Returns a filename generated from the product name.
+     This will be the name of the deployable package (i.e. <fn>.dmg, <fn>Setup.exe, etc.)"
 
     |nm|
 
     nm := self productName.
-    ^ nm copy replaceAny:'/\:;.,' with:$_
+    ^ nm copy replaceAny:'/\:;., ' with:$_
 
     "
      'Smalltalk/X' replaceAny:'/\:;.,' with:nil
+     stx_doc_coding_demoConsoleApp productName
+     stx_doc_coding_demoConsoleApp productNameAsValidFilename
     "
 
     "Created: / 01-03-2007 / 19:19:21 / cg"
@@ -3814,6 +3845,7 @@
         at: 'TOP' put: (self pathToTopWithSeparator:'/');                 "/ unix here
 "/        at: 'MODULE_PATH' put: ( self moduleDirectory );        "/ unix here
         at: 'DESCRIPTION' put: (self description);
+        at: 'PRODUCT_NAME' put: (self productName);
         at: 'PRODUCT_VERSION' put: (self productVersion);
         at: 'PRODUCT_DATE' put: (self productDate);
         at: 'PRODUCT_PUBLISHER' put: (self productPublisher);
@@ -3822,8 +3854,13 @@
         at: 'PRODUCT_TYPE' put: (self productType);
         at: 'PRODUCT_LICENSE' put: (self productLicense);
         at: 'PRODUCT_DESCRIPTION' put: (self productDescription);
+        at: 'PRODUCT_CPU_VERSIONS' put: 'x86';
+        at: 'PRODUCT_ROOT_NAME' put: (self productName);
         at: 'MAINTAINER' put: (self productMaintainer);
         at: 'PACKAGER' put: (self productPublisher);
+        at: 'ADDITIONAL_SOURCE_DIRS' put: '';
+        at: 'ADDITIONAL_COPYFILES' put: '';
+        at: 'ADDITIONAL_INSTALL' put: '';
         yourself.
 
 
@@ -4862,12 +4899,12 @@
 ShortName: %(APPLICATION)
 SoftwareVersion: %(PRODUCT_VERSION)
 DisplayName: %(DESCRIPTION)
-RootName: @exept.de/expecco:$SOFTWAREVERSION
+RootName: %(PRODUCT_ROOT_NAME)
 Summary: %(DESCRIPTION)
 Maintainer: %(MAINTAINER)
 Packager: %(PACKAGER)
 PackageVersion: 1
-CPUArchitectures: x86
+CPUArchitectures: %(PRODUCT_CPU_VERSIONS)
 AutopackageTarget: 1.0
 Type: %(PRODUCT_TYPE)
 License: %(PRODUCT_LICENSE)
@@ -4898,18 +4935,7 @@
 [Imports]
 import <<EOF
 $source_dir/%(APPLICATION)
-$source_dir/resources
-$source_dir/keyboard.rc
-$source_dir/keyboardMacros.rc
-$source_dir/display.rc
-$source_dir/host.rc
-$source_dir/../doc
-$source_dir/../testsuites/webedition
-$source_dir/../projects/libraries
-$source_dir/../reportGenerator/tools
-$source_dir/../../pdf/afm
-$source_dir/../plugin/selenium/libexept_expecco_plugin_selenium.so
-$source_dir/../externalTools
+%(ADDITIONAL_SOURCE_DIRS)
 EOF
 
 for i in $source_dir/*.so
@@ -4925,22 +4951,12 @@
 
 find . -type d \( -name CVS -or -name ''not_*'' \) -print | xargs rm -rf
 mkdir -p $MYPREFIX
-copyFiles expecco *.rc resources        $MYPREFIX/bin
-copyFiles *.so                          $MYPREFIX/lib
-copyFiles doc externalTools             $MYPREFIX/packages/exept/expecco
-copyFiles webedition/projects libraries $MYPREFIX/testsuites
-copyFiles tools                         $MYPREFIX/packages/exept/expecco/reportGenerator
-copyFiles afm                           $MYPREFIX/packages/exept/pdf
-copyFiles libexept_expecco_plugin_selenium.so   $MYPREFIX/plugin
-
-#installExe expecco
+copyFiles %(PRODUCT_NAME) *.rc resources        $MYPREFIX/bin
+%(ADDITIONAL_COPYFILES)
+
+#installExe %(PRODUCT_NAME)
 #installLib *.so
-#installData resources
-#installData keyboard.rc
-#installData keyboardMacros.rc
-#installData host.rc
-#installData display.rc
-#installData doc
+%(ADDITIONAL_INSTALL)
 
 [Uninstall]
 # Leaving this at the default is safe unless you use custom commands in
@@ -7227,6 +7243,7 @@
         ^ OrderedSet new
             addAll:self mandatoryPreRequisites;
             "/ addAll:self includedInPreRequisites;
+            removeAllFoundIn:self excludedFromMandatoryPreRequisites;
             removeAllFoundIn:self excludedFromPreRequisites;
             yourself.
     ].
@@ -7235,6 +7252,7 @@
     ^ Set new
         addAll:self preRequisites;
         addAll:self includedInPreRequisites;
+        removeAllFoundIn:self excludedFromMandatoryPreRequisites;
         removeAllFoundIn:self excludedFromPreRequisites;
         remove:self package ifAbsent:[];
         yourself.
@@ -7244,8 +7262,7 @@
     "get the preRequisites, that are not excluded.
      This method appears to be obsolete, because its functionality
      is now included in #preRequisites.
-     But is to be kept for backward compatibilty with old
-     existing subclasses."
+     But is to be kept for backward compatibilty with old existing subclasses."
 
     self mandatoryPreRequisites notEmpty ifTrue:[
         "this is a new subclass - avoid overhead"