Moved profiles to <kmeleondir>\Profiles

kmeleon10_branch
binaryc 21 years ago
parent 39f37f0036
commit 1871b36572
  1. 4
      k-meleon/KMeleon.dsp
  2. 4
      k-meleon/MfcEmbed.cpp
  3. 2
      k-meleon/StdAfx.h
  4. 46
      k-meleon/winEmbedFileLocProvider.cpp
  5. 7
      k-meleon/winEmbedFileLocProvider.h

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "/projects/mozilla/mozilla/dist/include/docshell" /I "/projects/mozilla/mozilla/dist/include/dom" /I "/projects/mozilla/mozilla/dist/include/embed_base" /I "/projects/mozilla/mozilla/dist/include/exthandler" /I "/projects/mozilla/mozilla/dist/include/find" /I "/projects/mozilla/mozilla/dist/include/gfx" /I "/projects/mozilla/mozilla/dist/include/helperAppDlg" /I "/projects/mozilla/mozilla/dist/include/intl" /I "/projects/mozilla/mozilla/dist/include/layout" /I "/projects/mozilla/mozilla/dist/include/necko" /I "/projects/mozilla/mozilla/dist/include/pref" /I "/projects/mozilla/mozilla/dist/include/profile" /I "/projects/mozilla/mozilla/dist/include/shistory" /I "/projects/mozilla/mozilla/dist/include/string" /I "/projects/mozilla/mozilla/dist/include/uriloader" /I "/projects/mozilla/mozilla/dist/include/wallet" /I "/projects/mozilla/mozilla/dist/include/webBrowser_core" /I "/projects/mozilla/mozilla/dist/include/webshell" /I "/projects/mozilla/mozilla/dist/include/widget" /I "/projects/mozilla/mozilla/dist/include/windowwatcher" /I "/projects/mozilla/mozilla/dist/include/xpcom" /I "/projects/mozilla/mozilla/dist/include/nspr" /D _WIN32_IE=0x0500 /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /Fr /Yu"stdafx.h" /FD /I /projects/mozilla/mozilla/dist/include/docshell" /I /projects/mozilla/mozilla/dist/include/dom" /I /projects/mozilla/mozilla/dist/include/embed_base" /I /projects/mozilla/mozilla/dist/include/exthandler" /I /projects/mozilla/mozilla/dist/include/find" /I /projects/mozilla/mozilla/dist/include/gfx" /I /projects/mozilla/mozilla/dist/include/helperAppDlg" /I /projects/mozilla/mozilla/dist/include/intl" /I /projects/mozilla/mozilla/dist/include/layout" /I /projects/mozilla/mozilla/dist/include/necko" /I /projects/mozilla/mozilla/dist/include/pref" /I /projects/mozilla/mozilla/dist/include/profile" /I /projects/mozilla/mozilla/dist/include/shistory" /I /projects/mozilla/mozilla/dist/include/string" /I /projects/mozilla/mozilla/dist/include/uriloader" /I /projects/mozilla/mozilla/dist/include/wallet" /I /projects/mozilla/mozilla/dist/include/webBrowser_core" /I /projects/mozilla/mozilla/dist/include/webshell" /I /projects/mozilla/mozilla/dist/include/widget" /I /projects/mozilla/mozilla/dist/include/windowwatcher" /I /projects/mozilla/mozilla/dist/include/xpcom" /I /projects/mozilla/mozilla/dist/include/docshell" /I /projects/mozilla/mozilla/dist/include/dom" /I /projects/mozilla/mozilla/dist/include/embed_base" /I /projects/mozilla/mozilla/dist/include/exthandler" /I /projects/mozilla/mozilla/dist/include/find" /I /projects/mozilla/mozilla/dist/include/gfx" /I /projects/mozilla/mozilla/dist/include/helperAppDlg" /I /projects/mozilla/mozilla/dist/include/intl" /I /projects/mozilla/mozilla/dist/include/layout" /I /projects/mozilla/mozilla/dist/include/necko" /I /projects/mozilla/mozilla/dist/include/pref" /I /projects/mozilla/mozilla/dist/include/profile" /I /projects/mozilla/mozilla/dist/include/shistory" /I /projects/mozilla/mozilla/dist/include/string" /I /projects/mozilla/mozilla/dist/include/uriloader" /I /projects/mozilla/mozilla/dist/include/wallet" /I /projects/mozilla/mozilla/dist/include/webBrowser_core" /I /projects/mozilla/mozilla/dist/include/webshell" /I /projects/mozilla/mozilla/dist/include/widget" /I /projects/mozilla/mozilla/dist/include/windowwatcher" /I /projects/mozilla/mozilla/dist/include/xpcom" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../mozilla/mozilla/dist/include/nspr" /I "../mozilla/mozilla/dist/include/docshell" /I "../mozilla/mozilla/dist/include/dom" /I "../mozilla/mozilla/dist/include/embed_base" /I "../mozilla/mozilla/dist/include/exthandler" /I "../mozilla/mozilla/dist/include/find" /I "../mozilla/mozilla/dist/include/gfx" /I "../mozilla/mozilla/dist/include/helperAppDlg" /I "../mozilla/mozilla/dist/include/intl" /I "../mozilla/mozilla/dist/include/layout" /I "../mozilla/mozilla/dist/include/necko" /I "../mozilla/mozilla/dist/include/pref" /I "../mozilla/mozilla/dist/include/profile" /I "../mozilla/mozilla/dist/include/shistory" /I "../mozilla/mozilla/dist/include/string" /I "../mozilla/mozilla/dist/include/uriloader" /I "../mozilla/mozilla/dist/include/wallet" /I "../mozilla/mozilla/dist/include/webBrowser_core" /I "../mozilla/mozilla/dist/include/webshell" /I "../mozilla/mozilla/dist/include/widget" /I "../mozilla/mozilla/dist/include/windowwatcher" /I "../mozilla/mozilla/dist/include/xpcom" /D _WIN32_IE=0x0500 /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /Fr /Yu"stdafx.h" /FD
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
@ -75,7 +75,7 @@ PostBuild_Cmds=version BUILD_NUMBER version.h
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "/projects/mozilla/mozilla/dist/include/docshell" /I "/projects/mozilla/mozilla/dist/include/dom" /I "/projects/mozilla/mozilla/dist/include/embed_base" /I "/projects/mozilla/mozilla/dist/include/exthandler" /I "/projects/mozilla/mozilla/dist/include/find" /I "/projects/mozilla/mozilla/dist/include/gfx" /I "/projects/mozilla/mozilla/dist/include/helperAppDlg" /I "/projects/mozilla/mozilla/dist/include/intl" /I "/projects/mozilla/mozilla/dist/include/layout" /I "/projects/mozilla/mozilla/dist/include/necko" /I "/projects/mozilla/mozilla/dist/include/pref" /I "/projects/mozilla/mozilla/dist/include/profile" /I "/projects/mozilla/mozilla/dist/include/shistory" /I "/projects/mozilla/mozilla/dist/include/string" /I "/projects/mozilla/mozilla/dist/include/uriloader" /I "/projects/mozilla/mozilla/dist/include/wallet" /I "/projects/mozilla/mozilla/dist/include/webBrowser_core" /I "/projects/mozilla/mozilla/dist/include/webshell" /I "/projects/mozilla/mozilla/dist/include/widget" /I "/projects/mozilla/mozilla/dist/include/windowwatcher" /I "/projects/mozilla/mozilla/dist/include/xpcom" /I "/projects/mozilla/mozilla/dist/include/nspr" /D "_DEBUG" /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /I /projects/mozilla/mozilla/dist/include/docshell" /I /projects/mozilla/mozilla/dist/include/dom" /I /projects/mozilla/mozilla/dist/include/embed_base" /I /projects/mozilla/mozilla/dist/include/exthandler" /I /projects/mozilla/mozilla/dist/include/find" /I /projects/mozilla/mozilla/dist/include/gfx" /I /projects/mozilla/mozilla/dist/include/helperAppDlg" /I /projects/mozilla/mozilla/dist/include/intl" /I /projects/mozilla/mozilla/dist/include/layout" /I /projects/mozilla/mozilla/dist/include/necko" /I /projects/mozilla/mozilla/dist/include/pref" /I /projects/mozilla/mozilla/dist/include/profile" /I /projects/mozilla/mozilla/dist/include/shistory" /I /projects/mozilla/mozilla/dist/include/string" /I /projects/mozilla/mozilla/dist/include/uriloader" /I /projects/mozilla/mozilla/dist/include/wallet" /I /projects/mozilla/mozilla/dist/include/webBrowser_core" /I /projects/mozilla/mozilla/dist/include/webshell" /I /projects/mozilla/mozilla/dist/include/widget" /I /projects/mozilla/mozilla/dist/include/windowwatcher" /I /projects/mozilla/mozilla/dist/include/xpcom" /I /projects/mozilla/mozilla/dist/include/docshell" /I /projects/mozilla/mozilla/dist/include/dom" /I /projects/mozilla/mozilla/dist/include/embed_base" /I /projects/mozilla/mozilla/dist/include/exthandler" /I /projects/mozilla/mozilla/dist/include/find" /I /projects/mozilla/mozilla/dist/include/gfx" /I /projects/mozilla/mozilla/dist/include/helperAppDlg" /I /projects/mozilla/mozilla/dist/include/intl" /I /projects/mozilla/mozilla/dist/include/layout" /I /projects/mozilla/mozilla/dist/include/necko" /I /projects/mozilla/mozilla/dist/include/pref" /I /projects/mozilla/mozilla/dist/include/profile" /I /projects/mozilla/mozilla/dist/include/shistory" /I /projects/mozilla/mozilla/dist/include/string" /I /projects/mozilla/mozilla/dist/include/uriloader" /I /projects/mozilla/mozilla/dist/include/wallet" /I /projects/mozilla/mozilla/dist/include/webBrowser_core" /I /projects/mozilla/mozilla/dist/include/webshell" /I /projects/mozilla/mozilla/dist/include/widget" /I /projects/mozilla/mozilla/dist/include/windowwatcher" /I /projects/mozilla/mozilla/dist/include/xpcom" /I /projects/mozilla/mozilla/dist/include/docshell" /I /projects/mozilla/mozilla/dist/include/dom" /I /projects/mozilla/mozilla/dist/include/embed_base" /I /projects/mozilla/mozilla/dist/include/exthandler" /I /projects/mozilla/mozilla/dist/include/find" /I /projects/mozilla/mozilla/dist/include/gfx" /I /projects/mozilla/mozilla/dist/include/helperAppDlg" /I /projects/mozilla/mozilla/dist/include/necko" /I /projects/mozilla/mozilla/dist/include/pref" /I /projects/mozilla/mozilla/dist/include/profile" /I /projects/mozilla/mozilla/dist/include/shistory" /I /projects/mozilla/mozilla/dist/include/string" /I /projects/mozilla/mozilla/dist/include/uriloader" /I /projects/mozilla/mozilla/dist/include/wallet" /I /projects/mozilla/mozilla/dist/include/webBrowser_core" /I /projects/mozilla/mozilla/dist/include/webshell" /I /projects/mozilla/mozilla/dist/include/widget" /I /projects/mozilla/mozilla/dist/include/xpcom" /GZ " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../mozilla/mozilla/dist/include/nspr" /I "../mozilla/mozilla/dist/include/docshell" /I "../mozilla/mozilla/dist/include/dom" /I "../mozilla/mozilla/dist/include/embed_base" /I "../mozilla/mozilla/dist/include/exthandler" /I "../mozilla/mozilla/dist/include/find" /I "../mozilla/mozilla/dist/include/gfx" /I "../mozilla/mozilla/dist/include/helperAppDlg" /I "../mozilla/mozilla/dist/include/intl" /I "../mozilla/mozilla/dist/include/layout" /I "../mozilla/mozilla/dist/include/necko" /I "../mozilla/mozilla/dist/include/pref" /I "../mozilla/mozilla/dist/include/profile" /I "../mozilla/mozilla/dist/include/shistory" /I "../mozilla/mozilla/dist/include/string" /I "../mozilla/mozilla/dist/include/uriloader" /I "../mozilla/mozilla/dist/include/wallet" /I "../mozilla/mozilla/dist/include/webBrowser_core" /I "../mozilla/mozilla/dist/include/webshell" /I "../mozilla/mozilla/dist/include/widget" /I "../mozilla/mozilla/dist/include/windowwatcher" /I "../mozilla/mozilla/dist/include/xpcom" /D "_DEBUG" /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /FR /Yu"stdafx.h" /FD
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"

@ -353,7 +353,7 @@ BOOL CMfcEmbedApp::InitInstance()
// http://www.mozilla.org/projects/xpcom/file_locations.html
// for more info on File Locations
winEmbedFileLocProvider *provider = new winEmbedFileLocProvider("KMeleon");
winEmbedFileLocProvider *provider = new winEmbedFileLocProvider();
if(!provider){
ASSERT(FALSE);
return FALSE;
@ -367,7 +367,7 @@ BOOL CMfcEmbedApp::InitInstance()
}
rv = OverrideComponents();
if(NS_FAILED(rv)) {
if(NS_FAILED(rv)) {
ASSERT(FALSE);
return FALSE;
}

@ -54,7 +54,7 @@
// Please don't change the line below, I have a perl script that depends on it being here :)
// - BEGIN MOZILLA INCLUDES -
// Additional include directories:
// /projects/mozilla/mozilla/dist/include/docshell, /projects/mozilla/mozilla/dist/include/dom, /projects/mozilla/mozilla/dist/include/embed_base, /projects/mozilla/mozilla/dist/include/exthandler, /projects/mozilla/mozilla/dist/include/find, /projects/mozilla/mozilla/dist/include/gfx, /projects/mozilla/mozilla/dist/include/helperAppDlg, /projects/mozilla/mozilla/dist/include/intl, /projects/mozilla/mozilla/dist/include/layout, /projects/mozilla/mozilla/dist/include/necko, /projects/mozilla/mozilla/dist/include/pref, /projects/mozilla/mozilla/dist/include/profile, /projects/mozilla/mozilla/dist/include/shistory, /projects/mozilla/mozilla/dist/include/string, /projects/mozilla/mozilla/dist/include/uriloader, /projects/mozilla/mozilla/dist/include/wallet, /projects/mozilla/mozilla/dist/include/webBrowser_core, /projects/mozilla/mozilla/dist/include/webshell, /projects/mozilla/mozilla/dist/include/widget, /projects/mozilla/mozilla/dist/include/windowwatcher, /projects/mozilla/mozilla/dist/include/xpcom,
// ../mozilla/mozilla/dist/include/nspr, ../mozilla/mozilla/dist/include/docshell, ../mozilla/mozilla/dist/include/dom, ../mozilla/mozilla/dist/include/embed_base, ../mozilla/mozilla/dist/include/exthandler, ../mozilla/mozilla/dist/include/find, ../mozilla/mozilla/dist/include/gfx, ../mozilla/mozilla/dist/include/helperAppDlg, ../mozilla/mozilla/dist/include/intl, ../mozilla/mozilla/dist/include/layout, ../mozilla/mozilla/dist/include/necko, ../mozilla/mozilla/dist/include/pref, ../mozilla/mozilla/dist/include/profile, ../mozilla/mozilla/dist/include/shistory, ../mozilla/mozilla/dist/include/string, ../mozilla/mozilla/dist/include/uriloader, ../mozilla/mozilla/dist/include/wallet, ../mozilla/mozilla/dist/include/webBrowser_core, ../mozilla/mozilla/dist/include/webshell, ../mozilla/mozilla/dist/include/widget, ../mozilla/mozilla/dist/include/windowwatcher, ../mozilla/mozilla/dist/include/xpcom,
// docshell:
#include "nsIDocShell.h"

@ -36,7 +36,7 @@
// WARNING: These hard coded names need to go away. They need to
// come from localizable resources
#define APP_REGISTRY_NAME "registry.dat"
#define APP_REGISTRY_NAME "profiles.dat"
#define PROFILE_ROOT_DIR_NAME "Profiles"
#define DEFAULTS_DIR_NAME "defaults"
@ -52,12 +52,9 @@
// winEmbedFileLocProvider::Constructor/Destructor
//*****************************************************************************
winEmbedFileLocProvider::winEmbedFileLocProvider(const char* productDirName)
winEmbedFileLocProvider::winEmbedFileLocProvider()
{
NS_INIT_ISUPPORTS();
strncpy(mProductDirName, productDirName, sizeof(mProductDirName) - 1);
mProductDirName[sizeof(mProductDirName) - 1] = '\0';
}
winEmbedFileLocProvider::~winEmbedFileLocProvider()
@ -86,11 +83,11 @@ winEmbedFileLocProvider::GetFile(const char *prop, PRBool *persistant, nsIFile *
if (nsCRT::strcmp(prop, NS_APP_APPLICATION_REGISTRY_DIR) == 0)
{
rv = GetProductDirectory(getter_AddRefs(localFile));
rv = CloneMozBinDirectory(getter_AddRefs(localFile));
}
else if (nsCRT::strcmp(prop, NS_APP_APPLICATION_REGISTRY_FILE) == 0)
{
rv = GetProductDirectory(getter_AddRefs(localFile));
rv = CloneMozBinDirectory(getter_AddRefs(localFile));
if (NS_SUCCEEDED(rv))
rv = localFile->Append(APP_REGISTRY_NAME);
}
@ -202,38 +199,7 @@ NS_METHOD winEmbedFileLocProvider::CloneMozBinDirectory(nsILocalFile **aLocalFil
//----------------------------------------------------------------------------------------
NS_METHOD winEmbedFileLocProvider::GetProductDirectory(nsILocalFile **aLocalFile)
{
NS_ENSURE_ARG_POINTER(aLocalFile);
nsresult rv;
PRBool exists;
nsCOMPtr<nsILocalFile> localDir;
nsCOMPtr<nsIProperties> directoryService =
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = directoryService->Get(NS_WIN_APPDATA_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir));
if (NS_SUCCEEDED(rv))
rv = localDir->Exists(&exists);
if (NS_FAILED(rv) || !exists)
{
// On some Win95 machines, NS_WIN_APPDATA_DIR does not exist - revert to NS_WIN_WINDOWS_DIR
localDir = nsnull;
rv = directoryService->Get(NS_WIN_WINDOWS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir));
}
if (NS_FAILED(rv)) return rv;
rv = localDir->AppendRelativePath(mProductDirName);
if (NS_FAILED(rv)) return rv;
rv = localDir->Exists(&exists);
if (NS_SUCCEEDED(rv) && !exists)
rv = localDir->Create(nsIFile::DIRECTORY_TYPE, 0775);
if (NS_FAILED(rv)) return rv;
*aLocalFile = localDir;
NS_ADDREF(*aLocalFile);
return rv;
return CloneMozBinDirectory(aLocalFile);
}
@ -250,7 +216,7 @@ NS_METHOD winEmbedFileLocProvider::GetDefaultUserProfileRoot(nsILocalFile **aLoc
PRBool exists;
nsCOMPtr<nsILocalFile> localDir;
rv = GetProductDirectory(getter_AddRefs(localDir));
rv = CloneMozBinDirectory(getter_AddRefs(localDir));
if (NS_FAILED(rv)) return rv;
// These 3 platforms share this part of the path - do them as one

@ -34,9 +34,7 @@ class nsIFile;
class winEmbedFileLocProvider : public nsIDirectoryServiceProvider
{
public:
// productDirName is the name (not path) of the dir
// in which the application registry and profiles live.
winEmbedFileLocProvider(const char* productDirName);
winEmbedFileLocProvider();
NS_DECL_ISUPPORTS
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
@ -47,7 +45,6 @@ protected:
NS_METHOD CloneMozBinDirectory(nsILocalFile **aLocalFile);
NS_METHOD GetProductDirectory(nsILocalFile **aLocalFile);
NS_METHOD GetDefaultUserProfileRoot(nsILocalFile **aLocalFile);
char mProductDirName[256];
nsCOMPtr<nsILocalFile> mMozBinDirectory;
};

Loading…
Cancel
Save