Opened 14 years ago
Closed 14 years ago
#1378 closed doubt (fixed)
ExportPackage?
| Reported by: | Jorge | Owned by: | Víctor de Buen Remiro |
|---|---|---|---|
| Priority: | high | Milestone: | Mantainance |
| Component: | Kernel | Version: | head |
| Severity: | critical | Keywords: | |
| Cc: |
Description
Is there any function to export a locally installed package to a zip file? This is usefull to move packages from one machine to other.
If this function is not available it is requested the implementation of one with the followinf prototype:
Real TolPackage::Client::ExportPackage( Text pkg.ver, Text dir.dest );
pkg.ver must be installed locally, dir.dest is a directory where the resulting zip will be copied.
Change History (3)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Tested on Linux, it creates a zip file with this content:
BysPrior.2.1.oza info.oza
It was also verified the instalation with LocalInstallPackage

Could you test if this code makes that?
Text pkg.ver = "BysPrior.2.1"; Text dir.dest = "c:/tmp/"; Text dir.loc = ReplaceSlash(TolPackage::Client::_.localRoot); Text pkg.loc = dir.loc+pkg.ver; Text zip.loc = pkg.loc+".zip"; Text zip.dest = dir.dest+pkg.ver+".zip"; //Ensures that local.oza is locally created Real TolPackage::Client::LocalInfo(pkg.ver); //Compacts the package as a ZIP file Real PackArchive::PackFull("ZipArchive", pkg.loc, False); //Moves the ZIP file to destination directory Real OSFilMove(zip.loc, zip.dest);