Line 100... |
Line 100... |
100 |
* pkgname must be at least 9 bytes long and is filled with the package name.
|
100 |
* pkgname must be at least 9 bytes long and is filled with the package name.
|
101 |
* the **zipfd pointer is updated with file descriptor of the open (to be
|
101 |
* the **zipfd pointer is updated with file descriptor of the open (to be
|
102 |
* installed) zip file.
|
102 |
* installed) zip file.
|
103 |
* the returned ziplist is guaranteed to have the APPINFO file as first node
|
103 |
* the returned ziplist is guaranteed to have the APPINFO file as first node
|
104 |
* the ziplist is also guaranteed not to contain any directory entries */
|
104 |
* the ziplist is also guaranteed not to contain any directory entries */
|
105 |
struct ziplist *pkginstall_preparepackage(char *pkgname, const char *zipfile, int flags, FILE **zipfd, const char *dosdir, const struct customdirs *dirlist, char bootdrive) {
|
105 |
struct ziplist *pkginstall_preparepackage(char *pkgname, const char *zipfile, unsigned char flags, FILE **zipfd, const char *dosdir, const struct customdirs *dirlist, char bootdrive) {
|
106 |
char fname[256];
|
106 |
char fname[256];
|
107 |
struct ziplist *appinfoptr = NULL;
|
107 |
struct ziplist *appinfoptr = NULL;
|
108 |
char *shortfile;
|
108 |
char *shortfile;
|
109 |
struct ziplist *ziplinkedlist = NULL, *curzipnode, *prevzipnode;
|
109 |
struct ziplist *ziplinkedlist = NULL, *curzipnode, *prevzipnode;
|
110 |
struct flist_t *flist = NULL;
|
110 |
struct flist_t *flist = NULL;
|
Line 308... |
Line 308... |
308 |
}
|
308 |
}
|
309 |
|
309 |
|
310 |
|
310 |
|
311 |
/* install a package that has been prepared already. returns 0 on success,
|
311 |
/* install a package that has been prepared already. returns 0 on success,
|
312 |
* or a negative value on error, or a positive value on warning */
|
312 |
* or a negative value on error, or a positive value on warning */
|
313 |
int pkginstall_installpackage(const char *pkgname, const char *dosdir, const struct customdirs *dirlist, struct ziplist *ziplinkedlist, FILE *zipfd, char bootdrive, unsigned char *buff15k) {
|
313 |
int pkginstall_installpackage(const char *pkgname, const char *dosdir, const struct customdirs *dirlist, struct ziplist *ziplinkedlist, FILE *zipfd, char bootdrive, unsigned char *buff15k, unsigned char flags) {
|
314 |
char buff[256];
|
314 |
char buff[256];
|
315 |
char fulldestfilename[256];
|
315 |
char fulldestfilename[256];
|
316 |
char *shortfile;
|
316 |
char *shortfile;
|
317 |
long filesextractedsuccess = 0, filesextractedfailure = 0;
|
317 |
long filesextractedsuccess = 0, filesextractedfailure = 0;
|
318 |
struct ziplist *curzipnode;
|
318 |
struct ziplist *curzipnode;
|
Line 393... |
Line 393... |
393 |
/* "Package %s installed: %ld errors, %ld files extracted." */
|
393 |
/* "Package %s installed: %ld errors, %ld files extracted." */
|
394 |
sprintf(buff15k, svarlang_str(3, 19), pkgname, filesextractedfailure, filesextractedsuccess);
|
394 |
sprintf(buff15k, svarlang_str(3, 19), pkgname, filesextractedfailure, filesextractedsuccess);
|
395 |
outputnl(buff15k);
|
395 |
outputnl(buff15k);
|
396 |
|
396 |
|
397 |
/* scan the LSM file for a "warn" message to display */
|
397 |
/* scan the LSM file for a "warn" message to display */
|
- |
|
398 |
if ((flags & PKGINST_HIDEWARN) == 0) {
|
398 |
display_warn_if_exists(pkgname, dosdir, buff, sizeof(buff));
|
399 |
display_warn_if_exists(pkgname, dosdir, buff, sizeof(buff));
|
- |
|
400 |
}
|
399 |
|
401 |
|
400 |
return(filesextractedfailure);
|
402 |
return(filesextractedfailure);
|
401 |
}
|
403 |
}
|