Bug #322628 --> Palm Sync Build changes to support palm sync as a proper install.rdf based

extension for Thunderbid.

This extension code is NPOTB.

sr=bienvenu
a=mscott for thunderbird 2.0.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@188070 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org
2006-01-24 00:35:49 +00:00
parent 4c90859475
commit 2d04351e68
15 changed files with 251 additions and 682 deletions

View File

@@ -253,7 +253,7 @@ int LoadConduitManagerDll(HINSTANCE* hCondMgrDll, const TCHAR * szPalmDesktopDir
// Load the Conduit Manager library from the Palm Desktop directory
if( (*hCondMgrDll=LoadLibrary(szPDCondMgrPath)) != NULL )
// Successfully loaded CondMgr Library from Palm Desktop Directory
return 0;
return 0;
return IDS_ERR_LOADING_CONDMGR;
}
@@ -486,7 +486,7 @@ int InstallConduit(HINSTANCE hInstance, TCHAR *installDir)
// Load the Conduit Manager DLL.
HINSTANCE hConduitManagerDLL;
if( (dwReturnCode=GetPalmDesktopInstallDirectory(szPalmDesktopDir, &desktopSize)) == 0 )
if( (dwReturnCode = GetPalmDesktopInstallDirectory(szPalmDesktopDir, &desktopSize)) == 0 )
{
// need to switch current working directory to directory with palm dlls
// because of a bug in Palm Desktop 6.01
@@ -495,13 +495,10 @@ int InstallConduit(HINSTANCE hInstance, TCHAR *installDir)
SetCurrentDirectory(szPalmDesktopDir);
if( (dwReturnCode = LoadConduitManagerDll(&hConduitManagerDLL, szPalmDesktopDir)) != 0 )
// load it from local dir if present by any chance
if( (dwReturnCode = LoadConduitManagerDll(&hConduitManagerDLL, ".")) != 0 )
return(dwReturnCode);
return dwReturnCode;
}
else // if registery key not load it from local dir if present by any chance
if( (dwReturnCode = LoadConduitManagerDll(&hConduitManagerDLL, ".")) != 0 )
return(dwReturnCode);
else
return IDS_ERR_CONDUIT_NOT_FOUND;
// Prepare to install the conduit using Conduit Manager functions
CmInstallCreatorPtr lpfnCmInstallCreator;
@@ -574,9 +571,7 @@ int InstallConduit(HINSTANCE hInstance, TCHAR *installDir)
// Load the HSAPI DLL.
HINSTANCE hHsapiDLL;
if( (dwReturnCode = LoadHsapiDll(&hHsapiDLL, szPalmDesktopDir)) != 0 )
// load it from local dir if present by any chance
if( (dwReturnCode = LoadHsapiDll(&hHsapiDLL, ".")) != 0 )
return(dwReturnCode);
return dwReturnCode;
// Shutdown the HotSync Process if it is running
if( (bHotSyncRunning=IsHotSyncRunning(hHsapiDLL)) )
@@ -645,13 +640,11 @@ int UninstallConduit()
if( (dwReturnCode=GetPalmDesktopInstallDirectory(szPalmDesktopDir, &desktopSize)) == 0 )
{
if( (dwReturnCode = LoadConduitManagerDll(&hConduitManagerDLL, szPalmDesktopDir)) != 0 )
// load it from local dir if present by any chance
if( (dwReturnCode = LoadConduitManagerDll(&hConduitManagerDLL, ".")) != 0 )
return(dwReturnCode);
}
// if registery key not load it from local dir if present by any chance
else if( (dwReturnCode = LoadConduitManagerDll(&hConduitManagerDLL, ".")) != 0 )
return(dwReturnCode);
else
return(dwReturnCode);
// need to switch current working directory to directory with palm dlls
// because of a bug in Palm Desktop 6.01
@@ -664,7 +657,7 @@ int UninstallConduit()
lpfnCmRemoveConduitByCreatorID = (CmRemoveConduitByCreatorIDPtr) GetProcAddress(hConduitManagerDLL, "CmRemoveConduitByCreatorID");
if( (lpfnCmRemoveConduitByCreatorID == NULL) )
return(IDS_ERR_LOADING_CONDMGR);
CmSetCorePathPtr lpfnCmSetCorePath = (CmSetCorePathPtr) GetProcAddress(hConduitManagerDLL, "CmSetCorePath");
CmSetCorePathPtr lpfnCmSetCorePath = (CmSetCorePathPtr) GetProcAddress(hConduitManagerDLL, "CmSetCorePath");
CmSetHotSyncExePathPtr lpfnCmSetHotSyncExePath = (CmSetHotSyncExePathPtr) GetProcAddress(hConduitManagerDLL, "CmSetHotSyncExecPath");
CmRestoreHotSyncSettingsPtr lpfnCmRestoreHotSyncSettings;
lpfnCmRestoreHotSyncSettings = (CmRestoreHotSyncSettingsPtr) GetProcAddress(hConduitManagerDLL, "CmRestoreHotSyncSettings");
@@ -689,8 +682,6 @@ int UninstallConduit()
// Load the HSAPI DLL.
HINSTANCE hHsapiDLL;
if( (dwReturnCode = LoadHsapiDll(&hHsapiDLL, szPalmDesktopDir)) != 0 )
// load it from local dir if present by any chance
if( (dwReturnCode = LoadHsapiDll(&hHsapiDLL, ".")) != 0 )
return(dwReturnCode);
// Shutdown the HotSync Process if it is running