From 42381ac4b628dba57dbd4a73eca8ad341b76068f Mon Sep 17 00:00:00 2001 From: "shannond%netscape.com" Date: Mon, 17 Dec 2001 23:07:47 +0000 Subject: [PATCH] Bug 113818 - CCK UI and backend need to be separated. Merging CCK_IB_BRANCH into trunk reviewed by smeredith@netscape.com, shrutiv@netscape.com git-svn-id: svn://10.0.0.236/trunk@110652 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cck/cckwiz/iniFiles/build_page1.ini | 4 +- mozilla/cck/driver/WizardMachine.cpp | 18 -- mozilla/cck/driver/WizardMachine.h | 1 - mozilla/cck/driver/interpret.cpp | 33 +++- mozilla/cck/globals/comp.cpp | 198 ++++++++++++++++++++ mozilla/cck/globals/comp.h | 20 ++ mozilla/cck/globals/globals.cpp | 40 ++++ mozilla/cck/globals/globals.h | 2 + mozilla/cck/globals/makefile.win | 6 +- mozilla/cck/ib/engine.cpp | 91 +++++++++ mozilla/cck/ib/ib.cpp | 101 +++++----- mozilla/cck/ib/ib.h | 4 + mozilla/cck/ib/makefile.win | 20 +- 13 files changed, 458 insertions(+), 80 deletions(-) create mode 100644 mozilla/cck/globals/comp.cpp create mode 100644 mozilla/cck/globals/comp.h create mode 100644 mozilla/cck/ib/engine.cpp diff --git a/mozilla/cck/cckwiz/iniFiles/build_page1.ini b/mozilla/cck/cckwiz/iniFiles/build_page1.ini index 1b98d31e9bd..d6dcece2cc3 100644 --- a/mozilla/cck/cckwiz/iniFiles/build_page1.ini +++ b/mozilla/cck/cckwiz/iniFiles/build_page1.ini @@ -50,7 +50,7 @@ Help=Online;%Root%CCKHelp\buildpage1.html [Navigation Controls] -onNext=Message(Are you ready to build your customized installer? [Yes]/[No]);IBEngine.StartIB();Msg(Installer creation is complete. The build is in %Root%Configs\%CustomizationList%\Output) +onNext=Message(Are you ready to build your customized installer? [Yes]/[No]);RunIB();Msg(Installer creation is complete. The build is in %Root%Configs\%CustomizationList%\Output) Help=InstallerHelp.ini [Image 1] @@ -93,7 +93,7 @@ target=CheckListDescription ;opt7=Description of the Import Utility ;opt8=Description of the Internet Setup ;opt9=Description of the RealPlayer 5.0 -onInit=IBEngine.GenerateComponentList() +onInit=globals.GenerateComponentList() [Widget 2] Type=GlobalText diff --git a/mozilla/cck/driver/WizardMachine.cpp b/mozilla/cck/driver/WizardMachine.cpp index 9ddb8c10110..e8dffd9888d 100644 --- a/mozilla/cck/driver/WizardMachine.cpp +++ b/mozilla/cck/driver/WizardMachine.cpp @@ -1266,24 +1266,6 @@ BOOL CWizardMachineApp::IsFirstNode(NODE* treeNode) return firstNode; } -CString CWizardMachineApp::GetModulePath() -{ - char currPath[MID_SIZE]; - int i,numBytes; - - // Get the path of the file that was executed - numBytes = GetModuleFileName(m_hInstance, currPath, MIN_SIZE); - - // get the cmd path - // Remove the filename from the path - for (i=numBytes-1;i >= 0 && currPath[i] != '\\';i--); - // Terminate command line with 0 - if (i >= 0) - currPath[i+1]= '\0'; - - return CString(currPath); -} - CString CWizardMachineApp::GetGlobalOptions(CString theName) { CString temp=""; diff --git a/mozilla/cck/driver/WizardMachine.h b/mozilla/cck/driver/WizardMachine.h index 20412732371..d0a115ff66e 100644 --- a/mozilla/cck/driver/WizardMachine.h +++ b/mozilla/cck/driver/WizardMachine.h @@ -69,7 +69,6 @@ public: void CreateNewCache(); BOOL IsLastNode(NODE* treeNode); BOOL IsFirstNode(NODE* treeNode); - CString GetModulePath(); CString GetGlobalOptions(CString theName); void BuildWidget(WIDGET* aWidget, CString iniSection, CString iniFile, int pageBaseIndex, BOOL readValue); // void BuildHelpWidget(WIDGET* aWidget, CString iniSection, CString iniFile, int pageBaseIndex); diff --git a/mozilla/cck/driver/interpret.cpp b/mozilla/cck/driver/interpret.cpp index 0ef53fbd94b..5463fb98abd 100644 --- a/mozilla/cck/driver/interpret.cpp +++ b/mozilla/cck/driver/interpret.cpp @@ -612,6 +612,9 @@ BOOL CInterpret::interpret(char *cmds, WIDGET *curWidget) BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget) { + + CString quotes = "\""; + // Make modifiable copy of string's buffer char buf[MAX_SIZE]; strcpy(buf, (char *)(LPCTSTR) cmds); @@ -874,7 +877,7 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget) CString outputPath = rootPath + "Configs\\" + configName + "\\Output"; char deletePath[MAX_SIZE]; strcpy(deletePath, outputPath); - CallDLL("IBEngine", "EraseDirectory", deletePath, w); + EraseDirectory(deletePath); } } // change pre-set CD autorun option @@ -888,7 +891,7 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget) CString outputPath = rootPath + "Configs\\" + configName + "\\Output"; char deletePath[MAX_SIZE]; strcpy(deletePath, outputPath); - CallDLL("IBEngine", "EraseDirectory", deletePath, w); + EraseDirectory(deletePath); } } else if (strcmp(pcmd, "WriteCache") ==0) @@ -1203,6 +1206,32 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget) } } } + else if (strcmp(pcmd, "RunIB") == 0) + { + //Make sure _NewConfigName is defined + if(GetGlobal("_NewConfigName") != GetGlobal("CustomizationList")) + SetGlobal("_NewConfigName", GetGlobal("CustomizationList")); + + //Create an updated .che + theApp.CreateNewCache(); + + CString exec_command = "ibengine.exe -c " + quotes + + CachePath + quotes; + + CNewDialog newprog; + newprog.Create(IDD_NEW_DIALOG,NULL ); + newprog.ShowWindow(SW_SHOW); + CWnd * dlg; + CRect tmpRect = CRect(7,7,173,13); + dlg = newprog.GetDlgItem(IDC_BASE_TEXT); + CWnd* pwnd = newprog.GetDlgItem(IDD_NEW_DIALOG); + newprog.SetWindowText("Progress"); + dlg->SetWindowText(" Customization is in Progress ... "); + + ExecuteCommand((char *)(LPCTSTR) exec_command, SW_HIDE, INFINITE); + + newprog.DestroyWindow(); + } else if (strcmp(pcmd, "ShowSection") == 0) { // ShowSection is a way to use a listbox to choose a subset of widgets to display. diff --git a/mozilla/cck/globals/comp.cpp b/mozilla/cck/globals/comp.cpp new file mode 100644 index 00000000000..6eaa487f287 --- /dev/null +++ b/mozilla/cck/globals/comp.cpp @@ -0,0 +1,198 @@ +#include "stdafx.h" +#include "globals.h" +#include "comp.h" +#include + +#define MAX_SIZE 1024 + +CString rootPath; +CString configName; +CString configPath; +CString workspacePath; +CString cdPath; +CString tempPath; +CString iniSrcPath; +CString iniDstPath; +CString scriptPath; +CString nscpxpiPath; + +CString linuxOption; +CString linuxblobPath; +CString linuxDir; +CString nsinstPath; +CString xpiDir; +CString tarfile; +CString quotes; + +COMPONENT Components[100]; +int numComponents; + +extern "C" __declspec(dllexport) +int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath, + int invisibleCount) +{ + *compNum = 0; + int invNum = *compNum; + CString componentstr; + + // Get all the component info from each component section + char component[MAX_SIZE]; + char archive[MAX_SIZE]; + char name[MAX_SIZE]; + char desc[MAX_SIZE]; + char attr[MAX_SIZE]; + char tempcomponentstr[MAX_SIZE]; + + componentstr.Format("C%d", *compNum); + strcpy(tempcomponentstr, componentstr); + GetPrivateProfileString("Setup Type2", tempcomponentstr, "", component, + MAX_SIZE, iniSrcPath); + + GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, + iniSrcPath); + while (*archive) + { + GetPrivateProfileString(component, "Description Short", "", + name, MAX_SIZE, iniSrcPath); + GetPrivateProfileString(component, "Description Long", "", + desc, MAX_SIZE, iniSrcPath); + GetPrivateProfileString(component, "Attributes", "", + attr, MAX_SIZE, iniSrcPath); + + if (strcmp(component, "Component AOD") == 0) + strcpy(attr, "SELECTED"); + + comps[*compNum].archive = CString(archive); + comps[*compNum].compname = component; + comps[*compNum].name = CString(name); + comps[*compNum].desc = CString(desc); + comps[*compNum].selected = (strstr(attr, "SELECTED") != NULL); + comps[*compNum].invisible = (strstr(attr, "INVISIBLE") != NULL); + 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].downloadonly = (strstr(attr, "DOWNLOAD_ONLY") != NULL); + comps[*compNum].unselected = (strstr(attr, "UNSELECTED") != NULL); + comps[*compNum].empty = strcmp(attr, ""); + + if (!(comps[*compNum].selected && comps[*compNum].invisible && + invisibleCount)) + { + (*compNum)++; + invNum++; + componentstr.Format("C%d", invNum); + strcpy(tempcomponentstr, componentstr); + GetPrivateProfileString("Setup Type2", tempcomponentstr, "", + component, MAX_SIZE, iniSrcPath); + } + else + { + invNum++; + componentstr.Format("C%d", invNum); + strcpy(tempcomponentstr, componentstr); + GetPrivateProfileString("Setup Type2", tempcomponentstr, "", + component, MAX_SIZE, iniSrcPath); + } + GetPrivateProfileString(component, "Archive", "", archive, MAX_SIZE, + iniSrcPath); + } + + + return TRUE; +} + +extern "C" __declspec(dllexport) +int GenerateComponentList(CString parms, WIDGET *curWidget) +{ + rootPath = GetGlobal("Root"); + configName = GetGlobal("CustomizationList"); + 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 + { + if (SearchPath(workspacePath, "NSCPXPI", NULL, 0, NULL, NULL)) + nscpxpiPath = workspacePath + "\\NSCPXPI"; + else + nscpxpiPath = rootPath + "NSCPXPI"; + } + iniSrcPath = nscpxpiPath + "\\config.ini"; + + BuildComponentList(Components, &numComponents, iniSrcPath, 1); + + int i; + CString WidgetValue(""); + for (i=0; ioptions.name[i] = new char[strlen(Components[i].compname)+1]; + strcpy(curWidget->options.name[i], Components[i].compname); + + curWidget->options.value[i] = new char[strlen(Components[i].name)+1]; + strcpy(curWidget->options.value[i], Components[i].name); + + curWidget->optDesc.name[i] = new char[strlen(Components[i].compname)+1]; + strcpy(curWidget->optDesc.name[i], Components[i].compname); + + curWidget->optDesc.value[i] = new char[strlen(Components[i].desc)+1]; + strcpy(curWidget->optDesc.value[i], Components[i].desc); + + // INVISIBLE just means not selected, let user decide whether to + // include them again. SELECTED components get checkmarks. + if (Components[i].selected) + { + WidgetValue += ","; + WidgetValue += Components[i].name; + } + } + + curWidget->numOfOptions = numComponents; + curWidget->numOfOptDesc = numComponents; + + if (curWidget->value.IsEmpty()) + curWidget->value = WidgetValue; + + return TRUE; +} diff --git a/mozilla/cck/globals/comp.h b/mozilla/cck/globals/comp.h new file mode 100644 index 00000000000..5382fabbc35 --- /dev/null +++ b/mozilla/cck/globals/comp.h @@ -0,0 +1,20 @@ +typedef struct s_component { + CString archive; + CString compname; + CString name; + CString desc; + BOOL selected; + BOOL invisible; + BOOL launchapp; + BOOL additional; + BOOL disabled; + BOOL forceupgrade; + BOOL uncompress; + BOOL downloadonly; + BOOL unselected; + BOOL empty; + + } COMPONENT; + +extern "C" __declspec(dllexport) +int BuildComponentList(COMPONENT *comps, int *compNum, CString iniSrcPath,int invisibleCount); diff --git a/mozilla/cck/globals/globals.cpp b/mozilla/cck/globals/globals.cpp index 52759cfd19e..961d73d2684 100644 --- a/mozilla/cck/globals/globals.cpp +++ b/mozilla/cck/globals/globals.cpp @@ -137,3 +137,43 @@ void ExecuteCommand(char *command, int showflag, DWORD wait) WaitForSingleObject(processInfo.hProcess, wait); } +extern "C" __declspec(dllexport) +void EraseDirectory(CString sPath) +{ + CFileFind finder; + CString sFullPath = sPath + "\\*.*"; + + BOOL bWorking = finder.FindFile(sFullPath); + while (bWorking) + { + bWorking = finder.FindNextFile(); + if (finder.IsDots()) continue; + if (finder.IsDirectory()) + { + CString dirPath = finder.GetFilePath(); + EraseDirectory(dirPath); + _rmdir(finder.GetFilePath()); + continue; + } + _unlink( finder.GetFilePath() ); + } +} + +__declspec(dllexport) +CString GetModulePath() +{ + char currPath[MID_SIZE]; + int i,numBytes; + + // Get the path of the file that was executed + numBytes = GetModuleFileName(NULL, currPath, MIN_SIZE); + + // get the cmd path + // Remove the filename from the path + for (i=numBytes-1;i >= 0 && currPath[i] != '\\';i--); + // Terminate command line with 0 + if (i >= 0) + currPath[i+1]= '\0'; + + return CString(currPath); +} diff --git a/mozilla/cck/globals/globals.h b/mozilla/cck/globals/globals.h index c6a01b7aa52..0749d67e631 100644 --- a/mozilla/cck/globals/globals.h +++ b/mozilla/cck/globals/globals.h @@ -12,3 +12,5 @@ extern "C" __declspec(dllimport) WIDGET* findWidget(CString theName); extern "C" __declspec(dllimport) void CopyDir(CString from, CString to, LPCTSTR extension, int overwrite); extern "C" __declspec(dllexport) void ExecuteCommand(char *command, int showflag, DWORD wait); extern "C" __declspec(dllimport) int GetAttrib(CString theValue, char* attribArray[]); +extern "C" __declspec(dllimport) void EraseDirectory(CString sPath); +__declspec(dllimport) CString GetModulePath(); diff --git a/mozilla/cck/globals/makefile.win b/mozilla/cck/globals/makefile.win index dea3d80696e..7ed979ffba2 100644 --- a/mozilla/cck/globals/makefile.win +++ b/mozilla/cck/globals/makefile.win @@ -31,6 +31,7 @@ IS_COMPONENT = 1 OBJS= \ .\$(OBJDIR)\globals.obj \ + .\$(OBJDIR)\comp.obj \ $(NULL) LINCS= $(LINCS) \ @@ -70,8 +71,9 @@ include <$(DEPTH)\config\rules.mak> include <$(DEPTH)\cck\InitDist.win> -export:: $(DLLNAME).h - $(MAKE_INSTALL) $(DLLNAME).h ..\include +export:: + $(MAKE_INSTALL) globals.h ..\include + $(MAKE_INSTALL) comp.h ..\include libs:: $(DLL) $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib ..\lib diff --git a/mozilla/cck/ib/engine.cpp b/mozilla/cck/ib/engine.cpp new file mode 100644 index 00000000000..ce124bedd87 --- /dev/null +++ b/mozilla/cck/ib/engine.cpp @@ -0,0 +1,91 @@ +#include "stdafx.h" +#include +#include +#include +#include "ib.h" +#include "globals.h" +#include "fstream.h" +#include +#include +#include "resource.h" +#include "NewDialog.h" + +int main(int argc, char *argv[]) +{ + CString configPath; + CString rootPath; + CString templateDir; + CString configname; + CString configpath; + CString che_path; + CString che_file; + + + if(argc == 3) + { + configPath = argv[2]; + FillGlobalWidgetArray(configPath); + + if(!strcmp(argv[1], "-c")) + { + //The option "-c" means that ibengine.exe + //was called from wizardmachine.exe + + StartIB(); + } + else if(!strcmp(argv[1], "-u")) + { + //The option "-u" means that the user is + //running ibengine.exe via command line + + rootPath = GetModulePath(); + templateDir = rootPath + "WSTemplate"; + configname = GetGlobal("_NewConfigName"); + configpath = rootPath + "Configs\\" + configname; + + //Grab exact name of the .che file from configPath + che_file = configPath; + int extractposition = che_file.ReverseFind('\\'); + extractposition++; + extractposition = (che_file.GetLength()) - extractposition; + che_file = che_file.Right(extractposition); + + //These are some commands that we only want to run if + //ibengine.exe is run at command line + + //Create the config path + _mkdir(configpath); + + //Copy files and directories from WSTemplate + //to new config directory + CopyDir(templateDir, configpath, NULL, FALSE); + + //Copy the .che file given on command line to the + //appropriate directory + che_path = configpath + "\\" + che_file; + CopyFile(configPath, che_path, FALSE); + + StartIB(); + + printf("\nInstaller creation is complete. The build is " + "in %sConfigs\\%s\\Output\n", rootPath, configname); + + } + else + { + printf("\nYou have supplied incorrect command line options. \n" + "Please, run either \"WizardMachine.exe\" " + "or \"ibengine.exe -u \"\n"); + return 1; + } + } + else + { + printf("\nYou have supplied incorrect command line options. \n" + "Please, run either \"WizardMachine.exe\" " + "or \"ibengine.exe -u \"\n"); + return 1; + } + + return 0; +} diff --git a/mozilla/cck/ib/ib.cpp b/mozilla/cck/ib/ib.cpp index 7e04b6670f4..b8ce8f162bb 100644 --- a/mozilla/cck/ib/ib.cpp +++ b/mozilla/cck/ib/ib.cpp @@ -1239,28 +1239,6 @@ CString GetBrowser(void) return retflag; } -extern "C" __declspec(dllexport) -void EraseDirectory(CString sPath) -{ - CFileFind finder; - CString sFullPath = sPath + "\\*.*"; - - BOOL bWorking = finder.FindFile(sFullPath); - while (bWorking) - { - bWorking = finder.FindNextFile(); - if (finder.IsDots()) continue; - if (finder.IsDirectory()) - { - CString dirPath = finder.GetFilePath(); - EraseDirectory(dirPath); - _rmdir(finder.GetFilePath()); - continue; - } - _unlink( finder.GetFilePath() ); - } -} - void CopyDirectory(CString source, CString dest, BOOL subdir) // Copy files in subdirectories if the subdir flag is set (equal to 1). { @@ -1390,15 +1368,60 @@ void DiskSpaceAlert(ULONGLONG required, ULONGLONG available) AfxMessageBox("Not enough disk space. Required: "+requiredSpace+" bytes. Available: "+availableSpace+" bytes.", MB_OK); } -extern "C" __declspec(dllexport) -int StartIB(CString parms, WIDGET *curWidget) + + +BOOL FillGlobalWidgetArray(CString file) +{ + char buffer[MAX_SIZE] = {'\0'}; + CString name = ""; + CString value = ""; + + FILE *globs = fopen(file, "r"); + if (!globs) + return FALSE; + + while(!feof(globs)) + { + while(fgets(buffer, MAX_SIZE, globs)) + { + if (strstr(buffer, "=")) + { + name = CString(strtok(buffer,"=")); + value = CString(strtok(NULL,"=")); + value.TrimRight(); + if (value.Find("%") >= 0) { + //We should never enter this condition via wizardmachine.exe + AfxMessageBox("The current .che file called: "+file+" contains some unfilled parameters." + "These parameters will appear between two percent (%) signs such as %Root%" + "Please replace these parameters with their appropriate values and restart" + "the program", MB_OK); + // value=theInterpreter->replaceVars((char *) (LPCSTR) value,NULL); + } + + WIDGET* w = SetGlobal(name, value); + if (w) + w->cached = TRUE; + } + } + } + + fclose(globs); + + return TRUE; +} + + + +int StartIB(/*CString parms, WIDGET *curWidget*/) { char *fgetsrv; int rv = TRUE; char olddir[1024]; componentOrder =0; - rootPath = GetGlobal("Root"); - configName = GetGlobal("CustomizationList"); + rootPath = GetModulePath(); + SetGlobal("Root", rootPath); + configName = GetGlobal("_NewConfigName"); + SetGlobal("CustomizationList", configName); configPath = rootPath + "Configs\\" + configName; outputPath = configPath + "\\Output"; cdPath = configPath + "\\Output\\Core"; @@ -1448,7 +1471,11 @@ int StartIB(CString parms, WIDGET *curWidget) CopyFile(nscpxpiPath+"\\recommended.end", templinuxPath+"\\xpi\\recommended.end", FALSE); } + + + iniSrcPath = nscpxpiPath + "\\config.ini"; + //Check for disk space before continuing ULARGE_INTEGER nTotalBytes, nTotalFreeBytes, nTotalAvailable; @@ -1570,16 +1597,6 @@ int StartIB(CString parms, WIDGET *curWidget) iniDstPath = outputPath + "\\config.ini"; xpiDstPath = outputPath; } - CNewDialog newprog; - newprog.Create(IDD_NEW_DIALOG,NULL ); - newprog.ShowWindow(SW_SHOW); -///////////////////////////// - CWnd * dlg; - CRect tmpRect = CRect(7,7,173,13); - dlg = newprog.GetDlgItem(IDC_BASE_TEXT); - CWnd* pwnd = newprog.GetDlgItem(IDD_NEW_DIALOG); - dlg->SetWindowText(" Customization is in Progress"); - ///////////////////////////// _mkdir((char *)(LPCTSTR) tempPath); _mkdir((char *)(LPCTSTR) workspacePath); @@ -1627,16 +1644,13 @@ int StartIB(CString parms, WIDGET *curWidget) fclose(f); } - dlg->SetWindowText(" Customization is in Progress \n |||||||||"); // Put all the extracted files back into their new XPI homes ReplaceJARFiles(); - dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||"); ReplaceXPIFiles(); - dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||"); // Copy remaining default installer files into config // preserving any existing files that we created already @@ -1705,30 +1719,23 @@ int StartIB(CString parms, WIDGET *curWidget) } // Didn't work... - dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||"); if (linuxOption == "Linux") { LinuxInvisible(); - dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||"); AddThirdParty(); - dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||||||||||||||||||||"); CreateLinuxInstaller(); - dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||||||||||||||||||||"); } else { invisible(); - dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||"); AddThirdParty(); - dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||||||||||||||||||||"); ReplaceINIFile(); - dlg->SetWindowText(" Customization is in Progress \n ||||||||||||||||||||||||||||||||||||||||||||||||||||||"); } SetCurrentDirectory(olddir); CString TargetDir = GetGlobal("Root"); @@ -1736,8 +1743,6 @@ int StartIB(CString parms, WIDGET *curWidget) CString MozBrowser = GetBrowser(); // CreateShortcut(MozBrowser, TargetFile, "HelpLink", TargetDir, FALSE); - dlg->SetWindowText(" Customization is in Progress \n |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"); - newprog.DestroyWindow(); EraseDirectory(tempPath); _chdir(configPath); _rmdir("Temp"); diff --git a/mozilla/cck/ib/ib.h b/mozilla/cck/ib/ib.h index 8d67cc92ba9..3b599130e0f 100644 --- a/mozilla/cck/ib/ib.h +++ b/mozilla/cck/ib/ib.h @@ -1,3 +1,5 @@ +#define MID_SIZE 512 + typedef struct s_xpi { CString xpiname; CString filename; @@ -7,6 +9,8 @@ typedef struct s_jar { CString filename; } JAR; +int StartIB(void); +BOOL FillGlobalWidgetArray(CString); void CreateRshell(void); void CreateHelpMenu(void); void CreateBuddyList(void); diff --git a/mozilla/cck/ib/makefile.win b/mozilla/cck/ib/makefile.win index 243caf44578..90fe72305b4 100644 --- a/mozilla/cck/ib/makefile.win +++ b/mozilla/cck/ib/makefile.win @@ -35,9 +35,9 @@ OBJS= \ .\$(OBJDIR)\NewDialog.obj \ .\$(OBJDIR)\wizshell.obj \ .\$(OBJDIR)\ib.obj \ - .\$(OBJDIR)\comp.obj \ .\$(OBJDIR)\Helpmenu.obj \ .\$(OBJDIR)\buddylist.obj \ + .\$(OBJDIR)\engine.obj \ $(NULL) # -I$(DEPTH)\xpinstall\wizard\windows\setup \ @@ -47,9 +47,13 @@ LINCS= $(LINCS) \ -I$(DIST)\$(OBJDIR)\include \ $(NULL) -MAKE_OBJ_TYPE = DLL -DLLNAME = ibengine -DLL=.\$(OBJDIR)\$(DLLNAME).dll +MAKE_OBJ_TYPE = EXE +EXENAME = ibengine +MAPFILE = ib.map +RESFILE = ib.res +PDBFILE = $(EXENAME) + +PROGRAM=.\$(OBJDIR)\$(EXENAME).exe CFLAGS = \ -W3 \ @@ -80,15 +84,17 @@ include <$(DEPTH)\config\rules.mak> include <$(DEPTH)\cck\InitDist.win> -libs:: $(DLL) - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(CCKDIST)\CCKTool - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib ..\lib +libs:: $(PROGRAM) + $(MAKE_INSTALL) $(PROGRAM) $(CCKDIST)\CCKTool + $(MAKE_INSTALL) .\$(OBJDIR)\$(EXENAME).lib ..\lib export:: $(MAKE_INSTALL) script.ib $(CCKDIST)\CCKTool $(MAKE_INSTALL) help1.txt $(CCKDIST)\CCKTool $(MAKE_INSTALL) help2.txt $(CCKDIST)\CCKTool +$(PROGRAM):: $(OBJDIR) $(OBJS) $(RESFILE) + #clobber:: # rm -f $(DIST)\bin\$(DLLNAME).dll # rm -f $(DIST)\lib\$(DLLNAME).lib