From dec4d7bdaee9f1f140ecdf3cbc723f019be863de Mon Sep 17 00:00:00 2001 From: "ssu%netscape.com" Date: Wed, 26 Apr 2000 05:04:21 +0000 Subject: [PATCH] fixing bug #7478. We now have an uninstaller for the installer on the Windows platform. r=dveditz git-svn-id: svn://10.0.0.236/trunk@67197 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xpinstall/packager/windows/browser.jst | 1 + mozilla/xpinstall/packager/windows/makeall.pl | 25 +++-- mozilla/xpinstall/packager/windows/xpcom.jst | 3 +- .../res/locale/en-US/xpinstall.properties | 12 ++ mozilla/xpinstall/src/Makefile.in | 1 + mozilla/xpinstall/src/makefile.win | 3 +- mozilla/xpinstall/src/nsInstall.h | 4 +- mozilla/xpinstall/src/nsInstallFile.cpp | 103 ++++++++++++++---- mozilla/xpinstall/src/nsInstallFile.h | 2 + mozilla/xpinstall/src/nsInstallFileOpItem.cpp | 30 +++-- mozilla/xpinstall/src/nsInstallResources.cpp | 12 ++ .../xpinstall/wizard/windows/builder/build.pl | 2 +- .../xpinstall/wizard/windows/setup/dialogs.c | 4 +- .../xpinstall/wizard/windows/setup/extra.c | 5 +- .../xpinstall/wizard/windows/setup/ifuncns.c | 37 ++++++- .../xpinstall/wizard/windows/setup/ifuncns.h | 3 +- .../xpinstall/wizard/windows/setup/setup.h | 3 + 17 files changed, 195 insertions(+), 55 deletions(-) diff --git a/mozilla/xpinstall/packager/windows/browser.jst b/mozilla/xpinstall/packager/windows/browser.jst index 494979d567e..f13e95206c1 100644 --- a/mozilla/xpinstall/packager/windows/browser.jst +++ b/mozilla/xpinstall/packager/windows/browser.jst @@ -119,6 +119,7 @@ function createShortcuts() File.windowsShortcut(fileExe, fFolderDesktop, scExeDesc, fCommunicator, "", fileExe, 0); File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fCommunicator, "", fileExe, 0); File.windowsShortcut(fileExe, fFolderPath, scProfileDesc, fCommunicator, scProfileDescParam, fileExe, 0); +// File.windowsShortcut(fileExe, fFolderPath, "Test Http", "", "", "http://sweetlou/products/client/temp/ssu", 0); /* set the Program Folder Path in the Mozilla key in the Windows Registry */ winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE); diff --git a/mozilla/xpinstall/packager/windows/makeall.pl b/mozilla/xpinstall/packager/windows/makeall.pl index 4eb9f27b6e1..40aa7379f4f 100644 --- a/mozilla/xpinstall/packager/windows/makeall.pl +++ b/mozilla/xpinstall/packager/windows/makeall.pl @@ -71,6 +71,15 @@ if(!(-e "$inDistPath")) mkdir ("$inDistPath",0775); } +if(-e "$inDistPath\\xpi") +{ + unlink <$inDistPath\\xpi\\*>; +} +else +{ + mkdir ("$inDistPath\\xpi",0775); +} + # Make .js files MakeJsFile("xpcom"); MakeJsFile("browser"); @@ -103,21 +112,21 @@ else } # Copy the uninstall files to the dist uninstall directory. -system("xcopy /f uninstall.ini $inDistPath\\"); -system("xcopy /f uninstall.ini $inDistPath\\uninstall\\"); -system("xcopy /f $inDistPath\\uninstall.exe $inDistPath\\uninstall\\"); +system("copy uninstall.ini $inDistPath"); +system("copy uninstall.ini $inDistPath\\uninstall"); +system("copy $inDistPath\\uninstall.exe $inDistPath\\uninstall"); # Copy the setup files to the dist setup directory. -system("xcopy /f config.ini $inDistPath\\"); -system("xcopy /f config.ini $inDistPath\\setup\\"); -system("xcopy /f $inDistPath\\setup.exe $inDistPath\\setup\\"); -system("xcopy /f $inDistPath\\setuprsc.dll $inDistPath\\setup\\"); +system("copy config.ini $inDistPath"); +system("copy config.ini $inDistPath\\setup"); +system("copy $inDistPath\\setup.exe $inDistPath\\setup"); +system("copy $inDistPath\\setuprsc.dll $inDistPath\\setup"); # build the self-extracting .exe (uninstaller) file. print "\nbuilding self-extracting uninstaller ($seuFileNameSpecific)...\n"; system("copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecific"); system("$inDistPath\\nszip.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*"); -system("xcopy /f $inDistPath\\$seuFileNameSpecific $inDistPath\\xpi\\"); +system("copy $inDistPath\\$seuFileNameSpecific $inDistPath\\xpi"); # build the self-extracting .exe (installer) file. print "\nbuilding self-extracting installer ($seiFileNameSpecific)...\n"; diff --git a/mozilla/xpinstall/packager/windows/xpcom.jst b/mozilla/xpinstall/packager/windows/xpcom.jst index 68544505dff..125314f6a1b 100644 --- a/mozilla/xpinstall/packager/windows/xpcom.jst +++ b/mozilla/xpinstall/packager/windows/xpcom.jst @@ -71,8 +71,7 @@ File.dirCreate(fUninstall); // the uninstaller. // These two files are created after installation is done, thus // are normally not logged for uninstall. -logComment("[0/0] Installing: " + fCommunicator + "component.reg"); -logComment("[0/0] Installing: " + fCommunicator + "xpcom.log"); +logComment("Installing: " + fCommunicator + "component.reg"); if(verifyDiskSpace(fCommunicator, srDest) == true) { diff --git a/mozilla/xpinstall/res/locale/en-US/xpinstall.properties b/mozilla/xpinstall/res/locale/en-US/xpinstall.properties index 49bb912563a..f9debffac7b 100644 --- a/mozilla/xpinstall/res/locale/en-US/xpinstall.properties +++ b/mozilla/xpinstall/res/locale/en-US/xpinstall.properties @@ -35,6 +35,18 @@ DeleteComponent=Deleting component: %s Execute=Executing: %s ExecuteWithArgs=Executing: %s with argument: %s +CopyFile=Copy File: %s to %s +ExecuteFile=Execute File: %s +ExecuteFileWithArgs=Execute File: %s with argument: %s +MoveFile=Move File: %s to %s +RenameFile=Rename File: %s to %s +CreateFolder=Create Folder: %s +RemoveFolder=Remove Folder: %s +RenameFolder=Rename Folder: %s to %s +WindowsShortcut=Windows Shortcut: %s +MacAlias=Mac Alias: %s +UnknownFileOpCommand=Unkown file operation command! + Patch=Patching: %s Uninstall=Uninstalling: %s diff --git a/mozilla/xpinstall/src/Makefile.in b/mozilla/xpinstall/src/Makefile.in index 1cb6a9c9fc9..25e2f7e8096 100644 --- a/mozilla/xpinstall/src/Makefile.in +++ b/mozilla/xpinstall/src/Makefile.in @@ -66,6 +66,7 @@ CPPSRCS = \ nsXPInstallManager.cpp \ nsInstallFileOpItem.cpp \ nsJSFileSpecObj.cpp \ + nsInstallLogComment.cpp \ $(NULL) LOCAL_INCLUDES = -I$(srcdir)/../public diff --git a/mozilla/xpinstall/src/makefile.win b/mozilla/xpinstall/src/makefile.win index bd1dfa9dfec..6b5f7f1a73a 100644 --- a/mozilla/xpinstall/src/makefile.win +++ b/mozilla/xpinstall/src/makefile.win @@ -86,7 +86,8 @@ OBJS = \ .\$(OBJDIR)\nsXPInstallManager.obj \ .\$(OBJDIR)\nsInstallFileOpItem.obj \ .\$(OBJDIR)\nsWinShortcut.obj \ - .\$(OBJDIR)\nsJSFileSpecObj.obj \ + .\$(OBJDIR)\nsJSFileSpecObj.obj \ + .\$(OBJDIR)\nsInstallLogComment.obj \ # .\$(OBJDIR)\nsUpdateNotification.obj \ $(NULL) diff --git a/mozilla/xpinstall/src/nsInstall.h b/mozilla/xpinstall/src/nsInstall.h index 4a67f6c729a..5aaf9dacc9a 100644 --- a/mozilla/xpinstall/src/nsInstall.h +++ b/mozilla/xpinstall/src/nsInstall.h @@ -270,6 +270,8 @@ class nsInstall PRInt32 Confirm(nsString& string, PRBool* aReturn); void InternalAbort(PRInt32 errcode); + PRInt32 ScheduleForInstall(nsInstallObject* ob); + PRInt32 SaveError(PRInt32 errcode); private: @@ -323,8 +325,6 @@ class nsInstall PRInt32 ExtractDirEntries(const nsString& directory, nsVoidArray *paths); - PRInt32 ScheduleForInstall(nsInstallObject* ob); - static void DeleteVector(nsVoidArray* vector); }; diff --git a/mozilla/xpinstall/src/nsInstallFile.cpp b/mozilla/xpinstall/src/nsInstallFile.cpp index 7ef969f0f68..c62ea04df9c 100644 --- a/mozilla/xpinstall/src/nsInstallFile.cpp +++ b/mozilla/xpinstall/src/nsInstallFile.cpp @@ -31,6 +31,7 @@ #include "nsInstall.h" #include "nsIDOMInstallVersion.h" #include "nsInstallResources.h" +#include "nsInstallLogComment.h" /* Public Methods */ @@ -67,6 +68,7 @@ nsInstallFile::nsInstallFile(nsInstall* inInstall, MOZ_COUNT_CTOR(nsInstallFile); PRBool flagExists, flagIsFile; + mFolderCreateCount = 0; if ((folderSpec == nsnull) || (inInstall == NULL)) { @@ -164,14 +166,6 @@ nsInstallFile::nsInstallFile(nsInstall* inInstall, } // else this directory already exists, so do nothing } - else - { - /* the nsFileSpecMac.cpp operator += requires "this" (the nsFileSpec) - * to be an existing dir - */ - int dirPermissions = 0755; // std default for UNIX, ignored otherwise - mFinalFile->Create(nsIFile::DIRECTORY_TYPE, dirPermissions); - } //Need to parse the inPartialPath to remove any separators PRBool finished = PR_FALSE; @@ -217,17 +211,6 @@ nsInstallFile::nsInstallFile(nsInstall* inInstall, //} mFinalFile->Exists(&mReplaceFile); - if (mReplaceFile == PR_FALSE) - { - /* although it appears that we are creating the dir _again_ it is necessary - * when inPartialPath has arbitrary levels of nested dirs before the leaf - */ - nsCOMPtr parent; - mFinalFile->GetParent(getter_AddRefs(parent)); - //nsFileSpec makeDirs(parent.GetCString(), PR_TRUE); - parent->Create(nsIFile::DIRECTORY_TYPE, 0755); - } - mVersionRegistryName = new nsString(inComponentName); mJarLocation = new nsString(inJarLocation); mVersionInfo = new nsString(inVInfo); @@ -279,17 +262,99 @@ nsInstallFile::~nsInstallFile() MOZ_COUNT_DTOR(nsInstallFile); } + + + +void nsInstallFile::CreateAllFolders(nsInstall *inInstall, nsIFile *inFolderPath, PRInt32 *error) +{ + /* the nsFileSpecMac.cpp operator += requires "this" (the nsFileSpec) + * to be an existing dir + */ + + nsCOMPtr nsfsFolderPath; + nsString nsStrFolder; + PRBool flagExists; + int result = 0; + nsInstallLogComment *ilc = nsnull; + + inFolderPath->Exists(&flagExists); + if(!flagExists) + { + char *szPath = nsnull; + + inFolderPath->GetParent(getter_AddRefs(nsfsFolderPath)); + CreateAllFolders(inInstall, nsfsFolderPath, error); + + inFolderPath->Create(nsIFile::DIRECTORY_TYPE, 0755); //nsIFileXXX: What kind of permissions are required here? + ++mFolderCreateCount; + + inFolderPath->GetPath(&szPath); + nsStrFolder = szPath; + nsAllocator::Free(szPath); + ilc = new nsInstallLogComment(inInstall, "CreateFolder", nsStrFolder, error); + if(ilc == nsnull) + *error = nsInstall::OUT_OF_MEMORY; + + if(*error == nsInstall::SUCCESS) + *error = mInstall->ScheduleForInstall(ilc); + } +} + +#ifdef XXX_SSU +void nsInstallFile::RemoveAllFolders() +{ + /* the nsFileSpecMac.cpp operator += requires "this" (the nsFileSpec) + * to be an existing dir + */ + + PRUint32 i; + nsFileSpec nsfsFolder; + nsFileSpec nsfsParentFolder; + nsString nsStrFolder; + + if(mFinalFile != nsnull) + { + mFinalFile->GetParent(nsfsFolder); + for(i = 0; i < mFolderCreateCount; i++) + { + nsfsFolder.Delete(PR_FALSE); + nsfsFolder.GetParent(nsfsParentFolder); + nsfsFolder = nsfsParentFolder; + } + } +} +#endif + + + + + + /* Prepare * Extracts file out of the JAR archive */ PRInt32 nsInstallFile::Prepare() { + PRInt32 error = nsInstall::SUCCESS; + if (mSkipInstall) return nsInstall::SUCCESS; if (mInstall == nsnull || mFinalFile == nsnull || mJarLocation == nsnull ) return nsInstall::INVALID_ARGUMENTS; + if (mReplaceFile == PR_FALSE) + { + /* although it appears that we are creating the dir _again_ it is necessary + * when inPartialPath has arbitrary levels of nested dirs before the leaf + */ + nsCOMPtr parent; + mFinalFile->GetParent(getter_AddRefs(parent)); + CreateAllFolders(mInstall, parent, &error); + if(nsInstall::SUCCESS != error) + return error; + } + return mInstall->ExtractFileFromJar(*mJarLocation, mFinalFile, getter_AddRefs(mExtractedFile)); } diff --git a/mozilla/xpinstall/src/nsInstallFile.h b/mozilla/xpinstall/src/nsInstallFile.h index 43016f8de50..219994e0018 100644 --- a/mozilla/xpinstall/src/nsInstallFile.h +++ b/mozilla/xpinstall/src/nsInstallFile.h @@ -92,12 +92,14 @@ class nsInstallFile : public nsInstallObject PRBool mChildFile; /* whether file is a child */ PRBool mUpgradeFile; /* whether file is an upgrade */ PRBool mSkipInstall; /* if true don't install this file */ + PRUint32 mFolderCreateCount; /* int to keep count of the number of folders created for a given path */ PRInt32 mMode; /* an integer used like a bitfield to control * * how a file is installed or registered */ PRInt32 CompleteFileMove(); PRInt32 RegisterInVersionRegistry(); + void CreateAllFolders(nsInstall *inInstall, nsIFile *inFolderPath, PRInt32 *error); }; diff --git a/mozilla/xpinstall/src/nsInstallFileOpItem.cpp b/mozilla/xpinstall/src/nsInstallFileOpItem.cpp index 8e95d83a72e..53f42a64189 100644 --- a/mozilla/xpinstall/src/nsInstallFileOpItem.cpp +++ b/mozilla/xpinstall/src/nsInstallFileOpItem.cpp @@ -1025,22 +1025,30 @@ nsInstallFileOpItem::NativeFileOpWindowsShortcutComplete() PRInt32 ret = nsInstall::SUCCESS; #ifdef _WINDOWS - char *cDescription = mDescription->ToNewCString(); - char *cParams = mParams->ToNewCString(); - - char *targetNativePathStr; - char *shortcutNativePathStr; - char *workingpathNativePathStr; - char *iconNativePathStr; + char *cDescription = nsnull; + char *cParams = nsnull; + char *targetNativePathStr = nsnull; + char *shortcutNativePathStr = nsnull; + char *workingpathNativePathStr = nsnull; + char *iconNativePathStr = nsnull; + + if(mDescription) + cDescription = mDescription->ToNewCString(); + if(mParams) + cParams = mParams->ToNewCString(); if((cDescription == nsnull) || (cParams == nsnull)) ret = nsInstall::OUT_OF_MEMORY; else { - mTarget->GetPath(&targetNativePathStr); - mShortcutPath->GetPath(&shortcutNativePathStr); - mWorkingPath->GetPath(&workingpathNativePathStr); - mIcon->GetPath(&iconNativePathStr); + if(mTarget) + mTarget->GetPath(&targetNativePathStr); + if(mShortcutPath) + mShortcutPath->GetPath(&shortcutNativePathStr); + if(mWorkingPath) + mWorkingPath->GetPath(&workingpathNativePathStr); + if(mIcon) + mIcon->GetPath(&iconNativePathStr); ret = CreateALink(targetNativePathStr, shortcutNativePathStr, diff --git a/mozilla/xpinstall/src/nsInstallResources.cpp b/mozilla/xpinstall/src/nsInstallResources.cpp index beb6b3136e1..6578c56a0b2 100644 --- a/mozilla/xpinstall/src/nsInstallResources.cpp +++ b/mozilla/xpinstall/src/nsInstallResources.cpp @@ -43,6 +43,18 @@ static nsXPIResourceTableItem XPIResTable[] = { "Patch", "Patching: %s" }, { "Uninstall", "Uninstalling: %s" }, + { "CopyFile", "Copy File: %s to %s" }, + { "ExecuteFile", "Execute File: %s" }, + { "ExecuteFileWithArgs", "Execute File: %s with argument: %s" }, + { "MoveFile", "Move File: %s to %s" }, + { "RenameFile", "Rename File: %s to %s" }, + { "CreateFolder", "Create Folder: %s" }, + { "RemoveFolder", "Remove Folder: %s" }, + { "RenameFolder", "Rename Folder: %s to %s" }, + { "WindowsShortcut", "Windows Shortcut: %s" }, + { "MacAlias", "Mac Alias: %s" }, + { "UnknownFileOpCommand", "Unkown file operation command!" }, + // XXX FileOp*() action strings // XXX WinReg and WinProfile action strings diff --git a/mozilla/xpinstall/wizard/windows/builder/build.pl b/mozilla/xpinstall/wizard/windows/builder/build.pl index aebae30129c..2c7a998a75e 100644 --- a/mozilla/xpinstall/wizard/windows/builder/build.pl +++ b/mozilla/xpinstall/wizard/windows/builder/build.pl @@ -69,7 +69,7 @@ chdir($cwdBuilder); # Mozilla-win32-install.exe (a self extracting file) will use the .xpi # files from its current directory as well, but it is not a requirement # that they exist because it already contains the .xpi files within itself. -system("xcopy /f $cwdDistWin\\install\\xpi\\*.* $cwdDistWin\\install"); +system("copy $cwdDistWin\\install\\xpi\\*.* $cwdDistWin\\install"); print "\n"; print "**\n"; diff --git a/mozilla/xpinstall/wizard/windows/setup/dialogs.c b/mozilla/xpinstall/wizard/windows/setup/dialogs.c index eded387a07b..41d4780043f 100644 --- a/mozilla/xpinstall/wizard/windows/setup/dialogs.c +++ b/mozilla/xpinstall/wizard/windows/setup/dialogs.c @@ -346,7 +346,7 @@ LRESULT CALLBACK BrowseHookProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if(MessageBox(hDlg, szBufTemp2, szStrCreateDirectory, MB_YESNO | MB_ICONQUESTION) == IDYES) { - if(CreateDirectoriesAll(szBuf) == FALSE) + if(CreateDirectoriesAll(szBuf, TRUE) == FALSE) { char szECreateDirectory[MAX_BUF]; @@ -647,7 +647,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara if(MessageBox(hDlg, szBufTemp2, szStrCreateDirectory, MB_YESNO | MB_ICONQUESTION) == IDYES) { - if(CreateDirectoriesAll(szBuf) == FALSE) + if(CreateDirectoriesAll(szBuf, TRUE) == FALSE) { char szECreateDirectory[MAX_BUF]; diff --git a/mozilla/xpinstall/wizard/windows/setup/extra.c b/mozilla/xpinstall/wizard/windows/setup/extra.c index ddcb4129d9c..b9d8898142e 100644 --- a/mozilla/xpinstall/wizard/windows/setup/extra.c +++ b/mozilla/xpinstall/wizard/windows/setup/extra.c @@ -301,7 +301,7 @@ HRESULT Initialize(HINSTANCE hInstance) if(!FileExists(szTempDir)) { AppendBackSlash(szTempDir, MAX_BUF); - CreateDirectoriesAll(szTempDir); + CreateDirectoriesAll(szTempDir, FALSE); if(!FileExists(szTempDir)) { char szECreateTempDir[MAX_BUF]; @@ -684,7 +684,6 @@ HRESULT ParseSetupIni() lstrcpy(szFileIniSetup, szSetupDir); AppendBackSlash(szFileIniSetup, sizeof(szFileIniSetup)); - lstrcat(szFileIniSetup, "\\"); lstrcat(szFileIniSetup, FILE_INI_SETUP); CopyFile(szFileIniSetup, szFileIdiGetConfigIni, FALSE); @@ -5030,7 +5029,7 @@ int ExtractDirEntries(char* directory, void* vZip) err = ZIP_FindNext( find, buf, sizeof(buf) ); while ( err == ZIP_OK ) { - CreateDirectoriesAll(buf); + CreateDirectoriesAll(buf, FALSE); if(buf[lstrlen(buf) - 1] != '/') // only extract if it's a file result = ZIP_ExtractFile(vZip, buf, buf); diff --git a/mozilla/xpinstall/wizard/windows/setup/ifuncns.c b/mozilla/xpinstall/wizard/windows/setup/ifuncns.c index 98121ea7361..3d1efa18aba 100644 --- a/mozilla/xpinstall/wizard/windows/setup/ifuncns.c +++ b/mozilla/xpinstall/wizard/windows/setup/ifuncns.c @@ -121,7 +121,7 @@ HRESULT FileUncompress(LPSTR szFrom, LPSTR szTo) { lstrcpy(szBuf, szTo); AppendBackSlash(szBuf, sizeof(szBuf)); - CreateDirectoriesAll(szBuf); + CreateDirectoriesAll(szBuf, FALSE); } GetCurrentDirectory(MAX_BUF, szBuf); @@ -543,12 +543,33 @@ HRESULT ProcessCopyFileSequential(DWORD dwTiming) return(FO_SUCCESS); } -HRESULT CreateDirectoriesAll(char* szPath) +void UpdateInstallLog(LPSTR szDir) +{ + FILE *fInstallLog; + char szBuf[MAX_BUF]; + char szFileInstallLog[MAX_BUF]; + + lstrcpy(szFileInstallLog, szSetupDir); + AppendBackSlash(szFileInstallLog, sizeof(szFileInstallLog)); + lstrcat(szFileInstallLog, FILE_INSTALL_LOG); + + if((fInstallLog = fopen(szFileInstallLog, "a+t")) != NULL) + { + lstrcpy(szBuf, " ** "); + lstrcat(szBuf, KEY_CREATE_FOLDER); + lstrcat(szBuf, szDir); + lstrcat(szBuf, "\n"); + fwrite(szBuf, sizeof(char), lstrlen(szBuf), fInstallLog); + fclose(fInstallLog); + } +} + +HRESULT CreateDirectoriesAll(char* szPath, BOOL bLogForUninstall) { int i; int iLen = lstrlen(szPath); char szCreatePath[MAX_BUF]; - HRESULT hrResult; + HRESULT hrResult = 0; ZeroMemory(szCreatePath, MAX_BUF); memcpy(szCreatePath, szPath, iLen); @@ -559,7 +580,13 @@ HRESULT CreateDirectoriesAll(char* szPath) (!((szPath[0] == '\\') && (i == 1)) && !((szPath[1] == ':') && (i == 2)))) { szCreatePath[i] = '\0'; - hrResult = CreateDirectory(szCreatePath, NULL); + if(FileExists(szCreatePath) == FALSE) + { + hrResult = CreateDirectory(szCreatePath, NULL); + + if(bLogForUninstall) + UpdateInstallLog(szCreatePath); + } szCreatePath[i] = szPath[i]; } } @@ -585,7 +612,7 @@ HRESULT ProcessCreateDirectory(DWORD dwTiming) { DecryptString(szDestination, szBuf); AppendBackSlash(szDestination, sizeof(szDestination)); - CreateDirectoriesAll(szDestination); + CreateDirectoriesAll(szDestination, FALSE); } ++dwIndex; diff --git a/mozilla/xpinstall/wizard/windows/setup/ifuncns.h b/mozilla/xpinstall/wizard/windows/setup/ifuncns.h index 2223e32e4f2..d7d7cfc7293 100644 --- a/mozilla/xpinstall/wizard/windows/setup/ifuncns.h +++ b/mozilla/xpinstall/wizard/windows/setup/ifuncns.h @@ -50,7 +50,7 @@ HRESULT CreateALink(LPSTR lpszPathObj, int iIcon); HRESULT ProcessProgramFolder(DWORD dwTiming); HRESULT ProcessProgramFolderShowCmd(void); -HRESULT CreateDirectoriesAll(char* szPath); +HRESULT CreateDirectoriesAll(char* szPath, BOOL bLogForUninstall); void ProcessFileOps(DWORD dwTiming); void GetWinReg(HKEY hkRootKey, LPSTR szKey, LPSTR szName, LPSTR szReturnValue, DWORD dwSize); void SetWinReg(HKEY hkRootKey, LPSTR szKey, BOOL bOverwriteKey, LPSTR szName, BOOL bOverwriteName, DWORD dwType, LPSTR szData, DWORD dwSize); @@ -60,5 +60,6 @@ BOOL WinRegKeyExists(HKEY hkRootKey, LPSTR szKey); BOOL WinRegNameExists(HKEY hkRootKey, LPSTR szKey, LPSTR szName); HRESULT FileCopySequential(LPSTR szSourcePath, LPSTR szDestPath, LPSTR szFilename); HRESULT ProcessCopyFileSequential(DWORD dwTiming); +void UpdateInstallLog(LPSTR szDir); #endif diff --git a/mozilla/xpinstall/wizard/windows/setup/setup.h b/mozilla/xpinstall/wizard/windows/setup/setup.h index f435c275fe0..1396dfbb869 100644 --- a/mozilla/xpinstall/wizard/windows/setup/setup.h +++ b/mozilla/xpinstall/wizard/windows/setup/setup.h @@ -63,6 +63,9 @@ typedef int PRInt32; #define FILE_IDI_GETREDIRECT "getredirect.idi" #define FILE_INI_REDIRECT "redirect.ini" #define WIZ_TEMP_DIR "ns_temp" +#define FILE_INSTALL_LOG "install.log" + +#define KEY_CREATE_FOLDER "create folder: " /* PP: Parse Path */ #define PP_FILENAME_ONLY 1