Loading cck/ib/comp.cpp +10 −9 Original line number Diff line number Diff line Loading @@ -11,7 +11,8 @@ extern CString configPath; extern CString workspacePath; extern CString cdPath; extern CString tempPath; extern CString iniPath; extern CString iniSrcPath; extern CString iniDstPath; extern CString scriptPath; extern CString nscpxpiPath; Loading @@ -19,7 +20,7 @@ extern COMPONENT Components[100]; extern int numComponents; extern "C" __declspec(dllexport) int BuildComponentList(COMPONENT *comps, int *compNum) int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath) { *compNum = 0; Loading @@ -30,15 +31,15 @@ int BuildComponentList(COMPONENT *comps, int *compNum) char desc[MAX_SIZE]; char attr[MAX_SIZE]; component.Format("Component%d", *compNum); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniPath); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniSrcPath); while (*archive) { GetPrivateProfileString(component, "Description Short", "", name, MAX_SIZE, iniPath); name, MAX_SIZE, iniSrcPath); GetPrivateProfileString(component, "Description Long", "", desc, MAX_SIZE, iniPath); desc, MAX_SIZE, iniSrcPath); GetPrivateProfileString(component, "Attributes", "", attr, MAX_SIZE, iniPath); attr, MAX_SIZE, iniSrcPath); comps[*compNum].archive = CString(archive); comps[*compNum].compname = component; Loading @@ -50,7 +51,7 @@ int BuildComponentList(COMPONENT *comps, int *compNum) (*compNum)++; component.Format("Component%d", *compNum); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniPath); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniSrcPath); } Loading @@ -69,9 +70,9 @@ int GenerateComponentList(CString parms, WIDGET *curWidget) nscpxpiPath = workspacePath + "\\NSCPXPI"; else nscpxpiPath = rootPath + "NSCPXPI"; iniPath = nscpxpiPath + "\\config.ini"; iniSrcPath = nscpxpiPath + "\\config.ini"; BuildComponentList(Components, &numComponents); BuildComponentList(Components, &numComponents, iniSrcPath); int i; CString WidgetValue(""); Loading cck/ib/comp.h +2 −1 Original line number Diff line number Diff line Loading @@ -8,4 +8,5 @@ typedef struct s_component { BOOL launchapp; } COMPONENT; extern "C" __declspec(dllexport) int BuildComponentList(COMPONENT *comps, int *compNum); extern "C" __declspec(dllexport) int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath); cck/ib/ib.cpp +10 −9 Original line number Diff line number Diff line Loading @@ -15,7 +15,8 @@ CString configPath; CString workspacePath; CString cdPath; CString tempPath; CString iniPath; CString iniDstPath; CString iniSrcPath; CString scriptPath; CString nscpxpiPath; Loading Loading @@ -191,8 +192,7 @@ int interpret(char *cmd) } if (!section || !key || !newvalue) return FALSE; CString iniSrc = nscpxpiPath + "\\config.ini"; if (!CopyFile(iniSrc, iniPath, TRUE)) if (!CopyFile(iniSrcPath, iniDstPath, TRUE)) DWORD e = GetLastError(); if (strcmp(key, "Program Folder Name") == 0) { Loading @@ -200,7 +200,7 @@ int interpret(char *cmd) strcat(temp, newvalue); newvalue = temp; } WritePrivateProfileString(section, key, newvalue, iniPath); WritePrivateProfileString(section, key, newvalue, iniDstPath); } else if (strcmp(cmdname, "replaceXPI") == 0) { Loading Loading @@ -260,11 +260,11 @@ void init_components() { int i; WIDGET *w = findWidget("SelectedComponents"); BuildComponentList(Components, &numComponents); BuildComponentList(Components, &numComponents, iniSrcPath); // Turn off components that aren't selected for (i=0; i<numComponents; i++) if (strstr(Components[i].name, w->value) == NULL) if (strstr(w->value, Components[i].name) == NULL) Components[i].selected = FALSE; } Loading @@ -281,13 +281,14 @@ int StartIB(CString parms, WIDGET *curWidget) configPath = rootPath + "Configs\\" + configName; cdPath = configPath + "\\CD"; tempPath = configPath + "\\Temp"; iniPath = cdPath + "\\config.ini"; iniDstPath = cdPath + "\\config.ini"; scriptPath = rootPath + "\\script.ib"; workspacePath = configPath + "\\Workspace"; if (SearchPath(workspacePath, "NSCPXPI", NULL, 0, NULL, NULL)) nscpxpiPath = workspacePath + "\\NSCPXPI"; else nscpxpiPath = rootPath + "NSCPXPI"; iniSrcPath = nscpxpiPath + "\\config.ini"; init_components(); Loading Loading @@ -344,8 +345,8 @@ int StartIB(CString parms, WIDGET *curWidget) for (int i=0; i<numComponents; i++) { if (Components[i].selected) CopyFile(nscpxpiPath + Components[i].archive, cdPath + Components[i].archive, FALSE); CopyFile(nscpxpiPath + "\\" + Components[i].archive, cdPath + "\\" + Components[i].archive, TRUE); } // Didn't work... Loading Loading
cck/ib/comp.cpp +10 −9 Original line number Diff line number Diff line Loading @@ -11,7 +11,8 @@ extern CString configPath; extern CString workspacePath; extern CString cdPath; extern CString tempPath; extern CString iniPath; extern CString iniSrcPath; extern CString iniDstPath; extern CString scriptPath; extern CString nscpxpiPath; Loading @@ -19,7 +20,7 @@ extern COMPONENT Components[100]; extern int numComponents; extern "C" __declspec(dllexport) int BuildComponentList(COMPONENT *comps, int *compNum) int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath) { *compNum = 0; Loading @@ -30,15 +31,15 @@ int BuildComponentList(COMPONENT *comps, int *compNum) char desc[MAX_SIZE]; char attr[MAX_SIZE]; component.Format("Component%d", *compNum); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniPath); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniSrcPath); while (*archive) { GetPrivateProfileString(component, "Description Short", "", name, MAX_SIZE, iniPath); name, MAX_SIZE, iniSrcPath); GetPrivateProfileString(component, "Description Long", "", desc, MAX_SIZE, iniPath); desc, MAX_SIZE, iniSrcPath); GetPrivateProfileString(component, "Attributes", "", attr, MAX_SIZE, iniPath); attr, MAX_SIZE, iniSrcPath); comps[*compNum].archive = CString(archive); comps[*compNum].compname = component; Loading @@ -50,7 +51,7 @@ int BuildComponentList(COMPONENT *comps, int *compNum) (*compNum)++; component.Format("Component%d", *compNum); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniPath); GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, iniSrcPath); } Loading @@ -69,9 +70,9 @@ int GenerateComponentList(CString parms, WIDGET *curWidget) nscpxpiPath = workspacePath + "\\NSCPXPI"; else nscpxpiPath = rootPath + "NSCPXPI"; iniPath = nscpxpiPath + "\\config.ini"; iniSrcPath = nscpxpiPath + "\\config.ini"; BuildComponentList(Components, &numComponents); BuildComponentList(Components, &numComponents, iniSrcPath); int i; CString WidgetValue(""); Loading
cck/ib/comp.h +2 −1 Original line number Diff line number Diff line Loading @@ -8,4 +8,5 @@ typedef struct s_component { BOOL launchapp; } COMPONENT; extern "C" __declspec(dllexport) int BuildComponentList(COMPONENT *comps, int *compNum); extern "C" __declspec(dllexport) int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath);
cck/ib/ib.cpp +10 −9 Original line number Diff line number Diff line Loading @@ -15,7 +15,8 @@ CString configPath; CString workspacePath; CString cdPath; CString tempPath; CString iniPath; CString iniDstPath; CString iniSrcPath; CString scriptPath; CString nscpxpiPath; Loading Loading @@ -191,8 +192,7 @@ int interpret(char *cmd) } if (!section || !key || !newvalue) return FALSE; CString iniSrc = nscpxpiPath + "\\config.ini"; if (!CopyFile(iniSrc, iniPath, TRUE)) if (!CopyFile(iniSrcPath, iniDstPath, TRUE)) DWORD e = GetLastError(); if (strcmp(key, "Program Folder Name") == 0) { Loading @@ -200,7 +200,7 @@ int interpret(char *cmd) strcat(temp, newvalue); newvalue = temp; } WritePrivateProfileString(section, key, newvalue, iniPath); WritePrivateProfileString(section, key, newvalue, iniDstPath); } else if (strcmp(cmdname, "replaceXPI") == 0) { Loading Loading @@ -260,11 +260,11 @@ void init_components() { int i; WIDGET *w = findWidget("SelectedComponents"); BuildComponentList(Components, &numComponents); BuildComponentList(Components, &numComponents, iniSrcPath); // Turn off components that aren't selected for (i=0; i<numComponents; i++) if (strstr(Components[i].name, w->value) == NULL) if (strstr(w->value, Components[i].name) == NULL) Components[i].selected = FALSE; } Loading @@ -281,13 +281,14 @@ int StartIB(CString parms, WIDGET *curWidget) configPath = rootPath + "Configs\\" + configName; cdPath = configPath + "\\CD"; tempPath = configPath + "\\Temp"; iniPath = cdPath + "\\config.ini"; iniDstPath = cdPath + "\\config.ini"; scriptPath = rootPath + "\\script.ib"; workspacePath = configPath + "\\Workspace"; if (SearchPath(workspacePath, "NSCPXPI", NULL, 0, NULL, NULL)) nscpxpiPath = workspacePath + "\\NSCPXPI"; else nscpxpiPath = rootPath + "NSCPXPI"; iniSrcPath = nscpxpiPath + "\\config.ini"; init_components(); Loading Loading @@ -344,8 +345,8 @@ int StartIB(CString parms, WIDGET *curWidget) for (int i=0; i<numComponents; i++) { if (Components[i].selected) CopyFile(nscpxpiPath + Components[i].archive, cdPath + Components[i].archive, FALSE); CopyFile(nscpxpiPath + "\\" + Components[i].archive, cdPath + "\\" + Components[i].archive, TRUE); } // Didn't work... Loading