summaryrefslogtreecommitdiff
path: root/setup_native/source
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-04 17:57:31 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-06 13:43:35 +0100
commit50c26300e5b5ae9671f18a9e449516604d16105f (patch)
treee4f0cf83c41bbd70bbe6021f85b8e97815134f42 /setup_native/source
parente78706a8bf35d8471982e36c4543f2db8a35f1c2 (diff)
Remove lots of dead code
Diffstat (limited to 'setup_native/source')
-rw-r--r--setup_native/source/win32/customactions/patch/swappatchfiles.cxx57
-rw-r--r--setup_native/source/win32/customactions/shellextensions/layerlinks.cxx24
-rw-r--r--setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx11
-rw-r--r--setup_native/source/win32/stwrapper/stwrapper.cxx1
4 files changed, 0 insertions, 93 deletions
diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
index 2ef10553e239..db7fbeb3e5fc 100644
--- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
+++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
@@ -285,18 +285,6 @@ static bool SwapFiles( const std::_tstring& sFileName1, const std::_tstring& sFi
if (hdl == INVALID_HANDLE_VALUE)
{
fSuccess = MoveFileExImpl( sFileName2.c_str(), sFileName1.c_str(), MOVEFILE_REPLACE_EXISTING );
-
- // if ( fSuccess )
- // {
- // mystr = "Success";
- // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK );
- // }
- // else
- // {
- // char buff[256];
- // wsprintf(buff, "Failure %d", GetLastError());
- // MessageBox( NULL, buff, "Titel", MB_OK );
- // }
}
else
{
@@ -554,17 +542,11 @@ extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle )
OutputDebugStringA( "Starting Custom Action" );
- // std::_tstring mystr;
- // mystr = "Patchfile: " + sPatchFile;
- // MessageBox( NULL, mystr.c_str(), "Patchfile", MB_OK );
-
aSectionNames = getProfileSections( sPatchFile );
while ( !aSectionNames.empty() )
{
std::_tstring sSectionName = aSectionNames.front();
if ( std::_tstring(TEXT("_root")) == sSectionName ) { sSectionName = TEXT(""); }
- // mystr = "Section: " + sSectionName;
- // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK );
aKeyNames = getProfileKeys( sPatchFile, sSectionName );
while ( !aKeyNames.empty() )
@@ -584,9 +566,6 @@ extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle )
sFileName1 = sInstDir + sSectionName + sFileName1;
sFileName2 = sFileName1 + sExtension;
- // mystr = "Convert: " + sFileName1 + " to " + sFileName2;
- // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK );
-
SwapFiles( sFileName1, sFileName2 );
}
@@ -634,17 +613,11 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
std::queue< std::_tstring > aSectionNames;
std::queue< std::_tstring > aKeyNames;
- // std::_tstring mystr;
- // mystr = "Patchfile: " + sPatchFile;
- // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK );
-
aSectionNames = getProfileSections( sPatchFile );
while ( !aSectionNames.empty() )
{
std::_tstring sSectionName = aSectionNames.front();
if ( std::_tstring(TEXT("_root")) == sSectionName ) { sSectionName = TEXT(""); }
- // mystr = "Section: " + sSectionName;
- // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK );
aKeyNames = getProfileKeys( sPatchFile, sSectionName );
while( !aKeyNames.empty() )
@@ -664,9 +637,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
sFileName1 = sInstDir + sSectionName + sFileName1;
sFileName2 = sFileName1 + sExtension;
- // mystr = "Convert: " + sFileName1 + " to " + sFileName2;
- // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK );
-
SwapFiles( sFileName2, sFileName1 );
}
@@ -726,7 +696,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
// 1. Reading Product Code from setup.ini of installed Office
std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
- // MessageBox(NULL, sInstallPath.c_str(), "INSTALLLOCATION", MB_OK);
std::_tstring sSetupiniPath = sInstallPath + TEXT("program\\setup.ini");
TCHAR szProductCode[32767];
@@ -743,7 +712,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
if ( !_tcsicmp( szProductCode, TEXT("NOTFOUND") ) )
{
// No setup.ini or no "ProductCode" in setup.ini. This is an invalid directory.
- // MessageBox(NULL, "NOTFOUND set", "DEBUG", MB_OK);
return ERROR_SUCCESS;
}
@@ -752,7 +720,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
std::_tstring productCode = TEXT(szProductCode);
productCode = ConvertGuid(std::_tstring(productCode.c_str() + 1, productCode.length() - 2));
mystr = TEXT("Changed product code: ") + productCode;
- // MessageBox(NULL, mystr.c_str(), "ProductCode", MB_OK);
// 3. Setting path in the Windows registry to find installed features
@@ -764,14 +731,12 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
registryRoot = HKEY_LOCAL_MACHINE;
registryKey = TEXT("Software\\Classes\\Installer\\Features\\") + productCode;
mystr = registryKey;
- // MessageBox( NULL, mystr.c_str(), "ALLUSERS", MB_OK );
}
else
{
registryRoot = HKEY_CURRENT_USER;
registryKey = TEXT("Software\\Microsoft\\Installer\\Features\\") + productCode;
mystr = registryKey;
- // MessageBox( NULL, mystr.c_str(), "ALLUSERS", MB_OK );
}
// 4. Collecting all installed features from Windows registry
@@ -780,7 +745,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
if (RegOpenKey(registryRoot, registryKey.c_str(), &hKey) == ERROR_SUCCESS)
{
int counter = 0;
- // DWORD counter = 0;
LONG lEnumResult;
do
@@ -798,11 +762,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
std::_tstring sValueName = szValueName;
std::_tstring sValueData = szValueData;
- // mystr = sValueName;
- // MessageBox( NULL, mystr.c_str(), "ValueName", MB_OK );
- // mystr = sValueData;
- // MessageBox( NULL, mystr.c_str(), "ValueData", MB_OK );
-
// Does this feature exist in this patch?
if ( IsSetMsiProperty(handle, sValueName) )
{
@@ -810,14 +769,10 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
if ( 6 == szValueData[0] )
{
MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_ABSENT); // do not install this feature
- // mystr = TEXT("Do NOT install: ") + sValueName;
- // MessageBox( NULL, mystr.c_str(), "ValueName", MB_OK );
}
else
{
MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_LOCAL); // do install this feature
- // mystr = TEXT("Do install: ") + sValueName;
- // MessageBox( NULL, mystr.c_str(), "ValueName", MB_OK );
}
}
}
@@ -842,14 +797,10 @@ extern "C" UINT __stdcall SetNewFeatureState( MSIHANDLE handle )
if (IsSetMsiProperty(handle, TEXT("SELECT_OU_FEATURE")))
{
MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_LOCAL); // do install this feature
- // mystr = TEXT("OnlineUpdate wird installiert!");
- // MessageBox(NULL, mystr.c_str(), "INSTALLSTATE_LOCAL", MB_OK);
}
else
{
MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_ABSENT); // do not install this feature
- // mystr = TEXT("OnlineUpdate wird NICHT installiert!");
- // MessageBox(NULL, mystr.c_str(), "INSTALLSTATE_ABSENT", MB_OK);
}
return ERROR_SUCCESS;
@@ -869,10 +820,6 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle )
HANDLE hdl = FindFirstFile(sSearchFile.c_str(), &data);
if (hdl != INVALID_HANDLE_VALUE) // the file exists
{
- // std::_tstring mystr;
- // mystr = "Found file: " + sSearchFile;
- // MessageBox( NULL, mystr.c_str(), "Found file", MB_OK );
-
// And finally setting property SHOW_ONLINEUPDATE_DIALOG
// to hide this dialog
UnsetMsiProperty(handle, TEXT("SHOW_ONLINEUPDATE_DIALOG"));
@@ -886,10 +833,6 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle )
}
else
{
- // std::_tstring mystr;
- // mystr = "Did not find file: " + sSearchFile;
- // MessageBox( NULL, mystr.c_str(), "File not found", MB_OK );
-
// If the file does not exist, the Online Update dialog
// has to be shown.
SetMsiProperty(handle, TEXT("SHOW_ONLINEUPDATE_DIALOG"));
diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx
index 11c9757ff921..56885d408b77 100644
--- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx
@@ -117,11 +117,6 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle)
stripFinalBackslash(&sBasisInstallPath);
stripFinalBackslash(&sUreInstallPath);
- // string myText1 = TEXT("Creating Basis-Link: ") + sBasisLinkPath;
- // string myText2 = TEXT("Creating Ure-Link: ") + sUreLinkPath;
- // MessageBox(NULL, myText1.c_str(), "DEBUG", MB_OK);
- // MessageBox(NULL, myText2.c_str(), "DEBUG", MB_OK);
-
// creating basis-link in brand layer
HANDLE h1file = CreateFile(
@@ -151,7 +146,6 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle)
LPSTR lpPathUTF8 = new CHAR[nCharsRequired];
WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, lpPathUTF8, nCharsRequired, NULL, NULL );
- // WriteFile( h1file, sBasisInstallPath.c_str(), sBasisInstallPath.size() ,&dummy, 0 );
WriteFile( h1file, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 );
delete lpPathUTF8;
@@ -193,7 +187,6 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle)
LPSTR lpPathUTF8 = new CHAR[nCharsRequired];
WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, lpPathUTF8, nCharsRequired, NULL, NULL );
- // WriteFile( h2file, sUreInstallPath.c_str(), sUreInstallPath.size() ,&dummy, 0 );
WriteFile( h2file, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 );
delete lpPathUTF8;
@@ -221,12 +214,7 @@ extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle)
string sUreLinkPath = sBasisInstallPath + TEXT("ure-link");
string sUreDirName = sUreInstallPath + TEXT("bin");
- // string myText2 = TEXT("Deleting Ure-Link: ") + sUreLinkPath;
- // MessageBox(NULL, myText2.c_str(), "DEBUG", MB_OK);
-
// Deleting link to basis layer
- // string myText1 = TEXT("Deleting Basis-Link: ") + sBasisLinkPath;
- // MessageBox(NULL, myText1.c_str(), "DEBUG", MB_OK);
DeleteFile(sBasisLinkPath.c_str());
// Check, if URE is still installed
@@ -236,22 +224,10 @@ extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle)
if ( hFindContent == INVALID_HANDLE_VALUE ) { ureDirExists = false; }
FindClose( hFindContent );
- // if ( ureDirExists )
- // {
- // string myText3 = TEXT("URE directory still exists: ") + sUreDirName;
- // MessageBox(NULL, myText3.c_str(), "DEBUG", MB_OK);
- // string myText4 = TEXT("URE link NOT removed: ") + sUreLinkPath;
- // MessageBox(NULL, myText4.c_str(), "DEBUG", MB_OK);
- // }
-
// Deleting link to URE layer, if URE dir no longer exists
if ( ! ureDirExists )
{
- // string myText5 = TEXT("URE directory does not exist: ") + sUreDirName;
- // MessageBox(NULL, myText5.c_str(), "DEBUG", MB_OK);
DeleteFile(sUreLinkPath.c_str());
- // string myText6 = TEXT("URE link removed: ") + sUreLinkPath;
- // MessageBox(NULL, myText6.c_str(), "DEBUG", MB_OK);
}
return ERROR_SUCCESS;
diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
index 9c5e6d4eb416..6b8a85eb163f 100644
--- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
@@ -76,9 +76,6 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
{
std::_tstring sOfficeMenuFolder = GetMsiProperty( handle, TEXT("OfficeMenuFolder") );
std::_tstring sDesktopFile = sOfficeMenuFolder + TEXT("Desktop.ini");
-
- // MessageBox(NULL, sDesktopFile.c_str(), TEXT("OfficeMenuFolder"), MB_OK | MB_ICONINFORMATION);
-
std::_tstring sIconFile = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ) + TEXT("program\\soffice.exe");
OSVERSIONINFO osverinfo;
@@ -114,14 +111,6 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
TEXT("0"),
sDesktopFile.c_str() );
- /*
- WritePrivateProfileString(
- TEXT(".ShellClassInfo"),
- TEXT("InfoTip"),
- TEXT("StarOffice Productivity Suite"),
- sDesktopFile.c_str() );
- */
-
SetFileAttributes( sDesktopFile.c_str(), FILE_ATTRIBUTE_HIDDEN );
SetFileAttributes( sOfficeMenuFolder.c_str(), FILE_ATTRIBUTE_SYSTEM );
diff --git a/setup_native/source/win32/stwrapper/stwrapper.cxx b/setup_native/source/win32/stwrapper/stwrapper.cxx
index b4e22cf7afca..2376c94bf952 100644
--- a/setup_native/source/win32/stwrapper/stwrapper.cxx
+++ b/setup_native/source/win32/stwrapper/stwrapper.cxx
@@ -390,7 +390,6 @@ int WINAPI _tWinMain( HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR, int )
if ( dwSTClientExitCode == ERR_NO_RECORDS_FOUND )
{
- // output=`${STCLIENT} -a [-i "${INSTANCE_URN}"] -p "${PRODUCT_NAME}" -e "${PRODUCT_VERSION}" -t "${TARGET_URN}" -S "${PRODUCT_SOURCE}" -P "${PARENT_PRODUCT_NAME}" -m "Sun Microsystems, Inc." -A ${uname} -z global`
lpCommandLine = new TCHAR[MAXCMDLINELEN];
_tcscpy( lpCommandLine, TEXT( "\"" ));