diff --git a/cck/ib/comp.cpp b/cck/ib/comp.cpp index 5278ac2c4a8..6daba8b59d5 100644 --- a/cck/ib/comp.cpp +++ b/cck/ib/comp.cpp @@ -23,7 +23,8 @@ extern CString linuxDir; extern CString nsinstPath; extern CString xpiDir; extern CString tarfile; - +extern CString tarfile1; + extern COMPONENT Components[100]; extern int numComponents; @@ -121,9 +122,12 @@ int GenerateComponentList(CString parms, WIDGET *curWidget) pos += 1; CString linuxinstDirPath = linuxblobPath.Left(pos); tarfile = linuxblobPath.Right(pathlen-pos); + pos = tarfile.ReverseFind('.'); + tarfile1 = tarfile.Left(pos); int direxist = GetFileAttributes(nscpxpilinuxPath); - if (direxist == -1) // nscpxpiLinux directory does not exist + if ((direxist == -1) && (linuxblobPath != "")) + // nscpxpiLinux directory does not exist { char currentdir[_MAX_PATH]; _getcwd(currentdir, _MAX_PATH); @@ -131,8 +135,14 @@ int GenerateComponentList(CString parms, WIDGET *curWidget) _mkdir(linuxDir); _chdir(linuxinstDirPath); tnscpxpilinuxPath.Replace("\\","/"); - CString command = "tar -zxvf " + tarfile + " -C " + tnscpxpilinuxPath; + + CString command = "gzip -d " + tarfile; ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE); + command = "tar -xvf " + tarfile1 + " -C " + tnscpxpilinuxPath; + ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE); + command = "gzip " + tarfile1; + ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE); + nscpxpiPath = nscpxpilinuxPath + nsinstPath; CString tempxpiPath = nscpxpiPath; tempxpiPath.Replace(xpiDir,""); diff --git a/cck/ib/ib.cpp b/cck/ib/ib.cpp index 481f0b084bb..dc392386830 100644 --- a/cck/ib/ib.cpp +++ b/cck/ib/ib.cpp @@ -38,6 +38,7 @@ CString nsinstallerDir; CString xpiDir; CString templinuxDir; CString tarfile; +CString tarfile1; WIDGET *tempWidget; char buffer[50000]; @@ -986,13 +987,17 @@ void CreateLinuxInstaller() char currentdir[_MAX_PATH]; _getcwd(currentdir,_MAX_PATH); CopyDirectory(xpiDstPath, templinuxPath + xpiDir); - remove(templinuxPath + xpiDir + "\\N6Setup.exe"); + DeleteFile(templinuxPath + xpiDir + "\\N6Setup.exe"); CopyFile(xpiDstPath+"\\Config.ini", templinuxPath+"\\Config.ini",FALSE); - remove(templinuxPath + xpiDir + "\\Config.ini"); + DeleteFile(templinuxPath + xpiDir + "\\Config.ini"); _chdir(outputPath); templinuxPath = tempPath; templinuxPath.Replace("\\", "/"); - CString command = "tar -zcvf " + tarfile + " -C " + templinuxPath + "/" + templinuxDir + spaces + nsinstallerDir; + DeleteFile(tarfile1); + DeleteFile(tarfile); + CString command = "tar -cvf " + tarfile1 + " -C " + templinuxPath + "/" + templinuxDir + spaces + nsinstallerDir; + ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE); + command = "gzip " + tarfile1; ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE); _chdir(currentdir); } @@ -1027,6 +1032,7 @@ int StartIB(CString parms, WIDGET *curWidget) xpiDir = "\\xpi"; templinuxDir = "tempLinux"; tarfile = "netscape-i686-pc-linux-gnu-sea.tar.gz"; + tarfile1 = "netscape-i686-pc-linux-gnu-sea.tar"; if (SearchPath(workspacePath, "NSCPXPI", NULL, 0, NULL, NULL)) nscpxpiPath = workspacePath + "\\NSCPXPI";