зеркало из https://github.com/mozilla/pjs.git
Removing extra CR's
This commit is contained in:
Родитель
c7ad8bda1e
Коммит
87c0bbc15f
130
cck/ib/comp.cpp
130
cck/ib/comp.cpp
|
@ -1,8 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
#include "globals.h"
|
||||
#include "ib.h"
|
||||
#include "comp.h"
|
||||
#include <direct.h>
|
||||
#include "comp.h"
|
||||
#include <direct.h>
|
||||
|
||||
#define MAX_SIZE 1024
|
||||
|
||||
|
@ -15,21 +15,21 @@ extern CString tempPath;
|
|||
extern CString iniSrcPath;
|
||||
extern CString iniDstPath;
|
||||
extern CString scriptPath;
|
||||
extern CString nscpxpiPath;
|
||||
|
||||
extern CString linuxOption;
|
||||
extern CString linuxblobPath;
|
||||
extern CString linuxDir;
|
||||
extern CString nsinstPath;
|
||||
extern CString xpiDir;
|
||||
extern CString nscpxpiPath;
|
||||
|
||||
extern CString linuxOption;
|
||||
extern CString linuxblobPath;
|
||||
extern CString linuxDir;
|
||||
extern CString nsinstPath;
|
||||
extern CString xpiDir;
|
||||
extern CString tarfile;
|
||||
extern CString quotes;
|
||||
|
||||
extern CString quotes;
|
||||
|
||||
extern COMPONENT Components[100];
|
||||
extern int numComponents;
|
||||
|
||||
extern "C" __declspec(dllexport)
|
||||
int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
||||
int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
||||
int invisibleCount)
|
||||
{
|
||||
*compNum = 0;
|
||||
|
@ -46,10 +46,10 @@ int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
|||
|
||||
componentstr.Format("C%d", *compNum);
|
||||
strcpy(tempcomponentstr, componentstr);
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "", component,
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "", component,
|
||||
MAX_SIZE, iniSrcPath);
|
||||
|
||||
GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE,
|
||||
GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE,
|
||||
iniSrcPath);
|
||||
while (*archive)
|
||||
{
|
||||
|
@ -69,20 +69,20 @@ int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
|||
comps[*compNum].launchapp = (strstr(attr, "LAUNCHAPP") != NULL);
|
||||
comps[*compNum].additional = (strstr(attr, "ADDITIONAL") != NULL);
|
||||
comps[*compNum].disabled = (strstr(attr, "DISABLED") != NULL);
|
||||
comps[*compNum].forceupgrade = (strstr(attr, "FORCE_UPGRADE") != NULL);
|
||||
comps[*compNum].uncompress = (strstr(attr, "UNCOMPRESS") != NULL);
|
||||
comps[*compNum].forceupgrade = (strstr(attr, "FORCE_UPGRADE") != NULL);
|
||||
comps[*compNum].uncompress = (strstr(attr, "UNCOMPRESS") != NULL);
|
||||
comps[*compNum].downloadonly = (strstr(attr, "DOWNLOAD_ONLY") != NULL);
|
||||
comps[*compNum].unselected = (strstr(attr, "UNSELECTED") != NULL);
|
||||
comps[*compNum].unselected = (strstr(attr, "UNSELECTED") != NULL);
|
||||
comps[*compNum].empty = strcmp(attr, "");
|
||||
|
||||
if (!(comps[*compNum].selected && comps[*compNum].invisible &&
|
||||
if (!(comps[*compNum].selected && comps[*compNum].invisible &&
|
||||
invisibleCount))
|
||||
{
|
||||
(*compNum)++;
|
||||
invNum++;
|
||||
componentstr.Format("C%d", invNum);
|
||||
strcpy(tempcomponentstr, componentstr);
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "",
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "",
|
||||
component, MAX_SIZE, iniSrcPath);
|
||||
}
|
||||
else
|
||||
|
@ -90,10 +90,10 @@ int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,
|
|||
invNum++;
|
||||
componentstr.Format("C%d", invNum);
|
||||
strcpy(tempcomponentstr, componentstr);
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "",
|
||||
GetPrivateProfileString("Setup Type2", tempcomponentstr, "",
|
||||
component, MAX_SIZE, iniSrcPath);
|
||||
}
|
||||
GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE,
|
||||
GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE,
|
||||
iniSrcPath);
|
||||
}
|
||||
|
||||
|
@ -109,54 +109,54 @@ int GenerateComponentList(CString parms, WIDGET *curWidget)
|
|||
configPath = rootPath + "Configs\\" + configName;
|
||||
workspacePath = configPath + "\\Workspace";
|
||||
nscpxpiPath;
|
||||
|
||||
linuxOption = GetGlobal("lPlatform");
|
||||
if (linuxOption == "Linux")
|
||||
{
|
||||
linuxblobPath = GetGlobal("LinuxPath");
|
||||
linuxDir = "nscpxpiLinux";
|
||||
nsinstPath = "\\netscape-installer\\xpi";
|
||||
xpiDir = "\\xpi";
|
||||
CString tnscpxpilinuxPath = rootPath + linuxDir;
|
||||
CString nscpxpilinuxPath = tnscpxpilinuxPath;
|
||||
int pathlen = linuxblobPath.GetLength();
|
||||
int pos = linuxblobPath.ReverseFind('\\');
|
||||
pos += 1;
|
||||
CString linuxinstDirPath = linuxblobPath.Left(pos);
|
||||
tarfile = linuxblobPath.Right(pathlen-pos);
|
||||
|
||||
int direxist = GetFileAttributes(nscpxpilinuxPath);
|
||||
if ((direxist == -1) && (linuxblobPath != ""))
|
||||
// nscpxpiLinux directory does not exist
|
||||
{
|
||||
quotes = "\"";
|
||||
char currentdir[_MAX_PATH];
|
||||
_getcwd(currentdir, _MAX_PATH);
|
||||
_chdir(rootPath);
|
||||
_mkdir(linuxDir);
|
||||
_chdir(linuxinstDirPath);
|
||||
tnscpxpilinuxPath.Replace("\\","/");
|
||||
tnscpxpilinuxPath.Replace(":","");
|
||||
tnscpxpilinuxPath.Insert(0,"/cygdrive/");
|
||||
CString command = "tar -zxvf " + tarfile + " -C " + quotes + tnscpxpilinuxPath + quotes;
|
||||
ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE);
|
||||
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
CString tempxpiPath = nscpxpiPath;
|
||||
tempxpiPath.Replace(xpiDir,"");
|
||||
CopyFile(tempxpiPath+"\\Config.ini", nscpxpiPath+"\\Config.ini",
|
||||
FALSE);
|
||||
_chdir(currentdir);
|
||||
}
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
linuxOption = GetGlobal("lPlatform");
|
||||
if (linuxOption == "Linux")
|
||||
{
|
||||
linuxblobPath = GetGlobal("LinuxPath");
|
||||
linuxDir = "nscpxpiLinux";
|
||||
nsinstPath = "\\netscape-installer\\xpi";
|
||||
xpiDir = "\\xpi";
|
||||
CString tnscpxpilinuxPath = rootPath + linuxDir;
|
||||
CString nscpxpilinuxPath = tnscpxpilinuxPath;
|
||||
int pathlen = linuxblobPath.GetLength();
|
||||
int pos = linuxblobPath.ReverseFind('\\');
|
||||
pos += 1;
|
||||
CString linuxinstDirPath = linuxblobPath.Left(pos);
|
||||
tarfile = linuxblobPath.Right(pathlen-pos);
|
||||
|
||||
int direxist = GetFileAttributes(nscpxpilinuxPath);
|
||||
if ((direxist == -1) && (linuxblobPath != ""))
|
||||
// nscpxpiLinux directory does not exist
|
||||
{
|
||||
quotes = "\"";
|
||||
char currentdir[_MAX_PATH];
|
||||
_getcwd(currentdir, _MAX_PATH);
|
||||
_chdir(rootPath);
|
||||
_mkdir(linuxDir);
|
||||
_chdir(linuxinstDirPath);
|
||||
tnscpxpilinuxPath.Replace("\\","/");
|
||||
tnscpxpilinuxPath.Replace(":","");
|
||||
tnscpxpilinuxPath.Insert(0,"/cygdrive/");
|
||||
CString command = "tar -zxvf " + tarfile + " -C " + quotes + tnscpxpilinuxPath + quotes;
|
||||
ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE);
|
||||
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
CString tempxpiPath = nscpxpiPath;
|
||||
tempxpiPath.Replace(xpiDir,"");
|
||||
CopyFile(tempxpiPath+"\\Config.ini", nscpxpiPath+"\\Config.ini",
|
||||
FALSE);
|
||||
_chdir(currentdir);
|
||||
}
|
||||
nscpxpiPath = nscpxpilinuxPath + nsinstPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SearchPath(workspacePath, "NSCPXPI", NULL, 0, NULL, NULL))
|
||||
nscpxpiPath = workspacePath + "\\NSCPXPI";
|
||||
else
|
||||
nscpxpiPath = rootPath + "NSCPXPI";
|
||||
}
|
||||
}
|
||||
iniSrcPath = nscpxpiPath + "\\config.ini";
|
||||
|
||||
BuildComponentList(Components, &numComponents, iniSrcPath, 1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче