Changeset 6a75065 in tol
- Timestamp:
- Jul 9, 2010, 10:06:05 AM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 0813b41
- Parents:
- 670a2e9
- File:
-
- 1 edited
-
tol/stdlib/general/TolPackage/builder.tol (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/general/TolPackage/builder.tol
r670a2e9 r6a75065 10 10 ////////////////////////////////////////////////////////////////////////////// 11 11 12 Text _.url; //A unique address with remote or local protocol13 Text _.name; //A unique name14 Text _.type; //Private, Public15 Text _.description; //Purpose of repository16 Text _.sourceRoot; //Root directory of package's TOL code 17 Set _.p ackageList; //Set of names of packages18 Text _.root; //Local server-side installing directory19 Text _.register; //Local server-side register directory20 Text _.index; //Local server-side index prefix12 Text _.url; //A unique address with remote or local protocol 13 Text _.name; //A unique name 14 Text _.type; //Private, Public 15 Text _.description; //Purpose of repository 16 Set _.packageList; //Set of names of packages 17 Set _.pkgSourcePath; //Set of paths of packages 18 Text _.root; //Local server-side installing directory 19 Text _.register; //Local server-side register directory 20 Text _.index; //Local server-side index prefix 21 21 22 22 … … 28 28 Text description, 29 29 Text sourceRoot, 30 Set packageList )30 Set packageList_) 31 31 ////////////////////////////////////////////////////////////////////////////// 32 32 { 33 33 Text root = TolPackage::Server::_.localRoot+name+"/"; 34 Set pkgSourcePath = If(sourceRoot=="", 35 { 36 EvalSet(packageList_,GetFilePath) 37 }, 38 { 39 NCopy(Card(packageList_),sourceRoot) 40 }); 41 Set packageList = If(sourceRoot=="", 42 { 43 EvalSet(packageList_,GetFilePrefix) 44 }, 45 { 46 DeepCopy(packageList_) 47 }); 34 48 @Builder new = [[ 35 49 Text _.url = url; … … 37 51 Text _.type = type; 38 52 Text _.description = description; 39 Text _.sourceRoot = sourceRoot;40 53 Set _.packageList = packageList; 54 Set _.pkgSourcePath = pkgSourcePath; 41 55 Text _.root = root; 42 56 Text _.register = root+"register/"; … … 45 59 Real OSDirMake(new::_.root); 46 60 Real OSDirMake(new::_.register); 61 47 62 Real new::Build.All(0); 48 63 new … … 131 146 132 147 ////////////////////////////////////////////////////////////////////////////// 133 Text Build.PackageInfo.Version(Text name, Real specificVersion)148 Text Build.PackageInfo.Version(Text sourcePath, Text name, Real specificVersion) 134 149 ////////////////////////////////////////////////////////////////////////////// 135 150 { 136 151 Set aux = IncludeText("NameBlock "+name+";"); 137 152 NameBlock pkg = aux[1]; 153 Text sourceRoot = sourcePath+"/"+name; 138 154 Text pkgName = TolPackage::GetCurrentNameVersion(name,specificVersion); 139 155 Set dependencies = TolPackage::GetDeepDependencies(name, specificVersion); … … 168 184 Set EvalSet(selResources, Real(Text resource) 169 185 { 170 Text orig = _.sourceRoot+name+"/"+resource;186 Text orig = sourceRoot+"/"+resource; 171 187 Text dest = ppRoot+"/"+resource; 172 188 Real OSDirMake(dest); … … 187 203 188 204 ////////////////////////////////////////////////////////////////////////////// 189 Text Build.PackageInfo(Text name)190 ////////////////////////////////////////////////////////////////////////////// 191 { 192 Build.PackageInfo.Version( name,True)+193 Build.PackageInfo.Version( name,False)205 Text Build.PackageInfo(Text sourcePath, Text name) 206 ////////////////////////////////////////////////////////////////////////////// 207 { 208 Build.PackageInfo.Version(sourcePath, name,True)+ 209 Build.PackageInfo.Version(sourcePath, name,False) 194 210 }; 195 211 … … 200 216 { 201 217 Real Initialize(void); 202 Set EvalSet(_.packageList, Real(Text pkgName) 203 { 204 Text AppendFile(_.index+".csv", Build.PackageInfo(pkgName)); 218 Set For(1,Card(_.packageList), Real(Real k) 219 { 220 Text pkgName = _.packageList[k]; 221 Text sourcePath = _.pkgSourcePath[k]; 222 Text AppendFile(_.index+".csv", Build.PackageInfo(sourcePath, pkgName)); 205 223 //Text AppendFile(_.index+".wiki", index.wiki); 206 224 //Text AppendFile(_.index+".html", index.html); … … 212 230 213 231 ////////////////////////////////////////////////////////////////////////////// 214 Real Rebuild.One(Text pkgName)232 Real Rebuild.One(Text sourcePath, Text pkgName) 215 233 ////////////////////////////////////////////////////////////////////////////// 216 234 { 217 235 Real Initialize(void); 218 Text Build.PackageInfo( pkgName);236 Text Build.PackageInfo(sourcePath,pkgName); 219 237 Set pkgLst = Sort(GetDir(_.register)[2], Real(Text a, Text b) 220 238 {
Note: See TracChangeset
for help on using the changeset viewer.
