diff options
author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-19 18:04:51 +0000 |
---|---|---|
committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-19 18:04:51 +0000 |
commit | 4880adb3346faa91feea9d8ecfecc4ef499bf7fc (patch) | |
tree | 8b8e1247c6b3d825727cf567fc1883a1a8036064 | |
parent | 5e30856836aa02569377f43f6f62af7badb1cee7 (diff) | |
download | chromium_src-4880adb3346faa91feea9d8ecfecc4ef499bf7fc.zip chromium_src-4880adb3346faa91feea9d8ecfecc4ef499bf7fc.tar.gz chromium_src-4880adb3346faa91feea9d8ecfecc4ef499bf7fc.tar.bz2 |
Refactor localized strings used in installer for Chromium/Google Chrome separation (see other change out for review - chromium_1).
- Rename resources files as util_strings.* as they will be used by classes in util project.
- Instead of directly accessing resource, chrome.dll and setup.exe will get the resource from helper class in util project. Remove references to header file from projects.
- The resources still need be bundled in the binary so directly include util_strings.rc in resource file.
- Add another string "Google Inc" in resource file to use as Publisher name.
- Remove uninstall URL from resource file. This URL is not going to be localized, we are manually appending language parameter to it.
BUG=1296800
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1044 0039d316-1c4b-4281-b951-d872f2087c98
19 files changed, 90 insertions, 148 deletions
diff --git a/chrome/app/chrome_dll.rc b/chrome/app/chrome_dll.rc index fd6cd47..4d25159 100644 --- a/chrome/app/chrome_dll.rc +++ b/chrome/app/chrome_dll.rc @@ -202,6 +202,7 @@ END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// +#include "installer_util_strings.rc" #ifndef APSTUDIO_INVOKED diff --git a/chrome/app/chrome_dll.vcproj b/chrome/app/chrome_dll.vcproj index f525a6e..1ce83f9 100644 --- a/chrome/app/chrome_dll.vcproj +++ b/chrome/app/chrome_dll.vcproj @@ -21,7 +21,7 @@ <Configuration Name="Debug|Win32" ConfigurationType="2" - InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops;.\chrome_dll.vsprops;..\installer\util\prebuild\util_prebuild.vsprops" + InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops;.\chrome_dll.vsprops;..\installer\util\using_util.vsprops" > <Tool Name="VCPreBuildEventTool" @@ -87,7 +87,7 @@ <Configuration Name="Release|Win32" ConfigurationType="2" - InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops;.\chrome_dll.vsprops;..\installer\util\prebuild\util_prebuild.vsprops" + InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops;.\chrome_dll.vsprops;..\installer\util\using_util.vsprops" > <Tool Name="VCPreBuildEventTool" @@ -218,14 +218,6 @@ > </File> <File - RelativePath="$(IntDir)\..\util_prebuild\setup_strings.h" - > - </File> - <File - RelativePath="$(IntDir)\..\util_prebuild\setup_strings.rc" - > - </File> - <File RelativePath="..\..\webkit\glue\resources\vertical_text.cur" > </File> diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc index 57efed4..8d6f044 100644 --- a/chrome/installer/setup/install.cc +++ b/chrome/installer/setup/install.cc @@ -49,7 +49,7 @@ #include "chrome/installer/util/version.h" #include "chrome/installer/util/work_item_list.h" -#include "setup_strings.h" +#include "installer_util_strings.h" namespace { std::wstring AppendPath(const std::wstring parent_path, @@ -214,10 +214,10 @@ bool installer::InstallNewVersion(const std::wstring& exe_path, // add shortcut in Control Panel->Add/Remove Programs. AddInstallerCopyTasks(exe_path, archive_path, temp_dir, install_path, new_version.GetString(), install_list.get()); - const std::wstring& product_name = - installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE); - AddUninstallShortcutWorkItems(reg_root, exe_path, install_path, product_name, - new_version.GetString(), install_list.get()); + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + std::wstring product_name = dist->GetApplicationName(); + AddUninstallShortcutWorkItems(reg_root, exe_path, install_path, + product_name, new_version.GetString(), install_list.get()); // Delete any old_chrome.exe if present. install_list->AddDeleteTreeWorkItem( @@ -225,7 +225,6 @@ bool installer::InstallNewVersion(const std::wstring& exe_path, // Create Version key (if not already present) and set the new Chrome // version as last step. - BrowserDistribution* dist = BrowserDistribution::GetDistribution(); std::wstring version_key = dist->GetVersionKey(); install_list->AddCreateRegKeyWorkItem(reg_root, version_key); install_list->AddSetRegValueWorkItem(reg_root, version_key, diff --git a/chrome/installer/setup/setup.cc b/chrome/installer/setup/setup.cc index d82018b..6258282 100644 --- a/chrome/installer/setup/setup.cc +++ b/chrome/installer/setup/setup.cc @@ -37,6 +37,7 @@ #include "base/string_util.h" #include "chrome/common/chrome_constants.h" #include "chrome/installer/setup/setup_constants.h" +#include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/create_reg_key_work_item.h" #include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/logging_installer.h" @@ -46,7 +47,7 @@ #include "chrome/installer/util/version.h" #include "chrome/installer/util/work_item_list.h" -#include "setup_strings.h" +#include "installer_util_strings.h" namespace { @@ -108,8 +109,8 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path, } // The location of Start->Programs->Google Chrome folder - const std::wstring& product_name = - installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE); + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + const std::wstring& product_name = dist->GetApplicationName(); file_util::AppendToPath(&shortcut_path, product_name); // Create/update Chrome link (points to chrome.exe) & Uninstall Chrome link @@ -141,9 +142,8 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path, // Create/update uninstall link bool ret2 = true; std::wstring uninstall_link(shortcut_path); // Uninstall Chrome link - file_util::AppendToPath(&uninstall_link, - installer_util::GetLocalizedString(IDS_UNINSTALL_CHROME_BASE) + L".lnk"); + dist->GetUninstallLinkName() + L".lnk"); if ((install_status == installer_util::FIRST_INSTALL_SUCCESS) || (install_status == installer_util::INSTALL_REPAIRED) || (file_util::PathExists(uninstall_link))) { diff --git a/chrome/installer/setup/setup.rc b/chrome/installer/setup/setup.rc index 2423a76..f844d43 100644 --- a/chrome/installer/setup/setup.rc +++ b/chrome/installer/setup/setup.rc @@ -62,11 +62,7 @@ IDI_SETUP ICON "setup.ico" // // String Table // - -STRINGTABLE -BEGIN - IDS_UNINSTALL_SURVEY_URL "http://go/chromeuninstall?hl=$1&contact_type=uninstall" -END +#include "installer_util_strings.rc" #ifndef APSTUDIO_INVOKED diff --git a/chrome/installer/setup/setup.vcproj b/chrome/installer/setup/setup.vcproj index 5c468c8..72cdcad 100644 --- a/chrome/installer/setup/setup.vcproj +++ b/chrome/installer/setup/setup.vcproj @@ -21,7 +21,7 @@ <Configuration Name="Debug|Win32" ConfigurationType="1" - InheritedPropertySheets=".\setup_debug.vsprops;..\util\prebuild\util_prebuild.vsprops" + InheritedPropertySheets=".\setup_debug.vsprops;$(SolutionDir)installer\util\using_util.vsprops" > <Tool Name="Version" @@ -42,7 +42,7 @@ <Configuration Name="Release|Win32" ConfigurationType="1" - InheritedPropertySheets=".\setup_release.vsprops;..\util\prebuild\util_prebuild.vsprops" + InheritedPropertySheets=".\setup_release.vsprops;$(SolutionDir)installer\util\using_util.vsprops" > <Tool Name="Version" @@ -83,14 +83,6 @@ RelativePath=".\setup_resource.h" > </File> - <File - RelativePath="$(IntDir)\..\util_prebuild\setup_strings.h" - > - </File> - <File - RelativePath="$(IntDir)\..\util_prebuild\setup_strings.rc" - > - </File> </Filter> <File RelativePath=".\install.cc" diff --git a/chrome/installer/setup/setup_resource.h b/chrome/installer/setup/setup_resource.h index 6915d21..7a24c58 100644 --- a/chrome/installer/setup/setup_resource.h +++ b/chrome/installer/setup/setup_resource.h @@ -3,7 +3,6 @@ // Used by setup.rc // #define IDI_SETUP 101 -#define IDS_UNINSTALL_SURVEY_URL 102 // Next default values for new objects // diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc index 92466b2..ba992e0 100644 --- a/chrome/installer/setup/uninstall.cc +++ b/chrome/installer/setup/uninstall.cc @@ -57,8 +57,7 @@ #include "chrome/installer/util/util_constants.h" #include "chrome/installer/util/version.h" -#include "setup_resource.h" -#include "setup_strings.h" +#include "installer_util_strings.h" namespace { @@ -75,8 +74,8 @@ void DeleteChromeShortcut(bool system_uninstall) { if (shortcut_path.empty()) { LOG(ERROR) << "Failed to get location for shortcut."; } else { - file_util::AppendToPath(&shortcut_path, - installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE)); + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + file_util::AppendToPath(&shortcut_path, dist->GetApplicationName()); LOG(INFO) << "Deleting shortcut " << shortcut_path; if (!file_util::Delete(shortcut_path, true)) LOG(ERROR) << "Failed to delete folder: " << shortcut_path; @@ -148,81 +147,6 @@ installer_util::InstallStatus IsChromeActiveOrUserCancelled( return installer_util::UNINSTALL_FAILED; } - -#if defined(GOOGLE_CHROME_BUILD) -// Uninstall Chrome specific Gears. First we find Gears MSI ProductId (that -// changes with every new version of Gears) using Gears MSI UpgradeCode (that -// does not change) and then uninstall Gears using API. -void UninstallGears() { - wchar_t product[39]; // GUID + '\0' - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); // Don't show any UI to user. - for (int i = 0; MsiEnumRelatedProducts(google_update::kGearsUpgradeCode, 0, i, - product) != ERROR_NO_MORE_ITEMS; ++i) { - LOG(INFO) << "Uninstalling Gears - " << product; - unsigned int ret = MsiConfigureProduct(product, INSTALLLEVEL_MAXIMUM, - INSTALLSTATE_ABSENT); - if (ret != ERROR_SUCCESS) - LOG(ERROR) << "Failed to uninstall Gears " << product << ": " << ret; - } -} - -// Read the URL from the resource file and substitute the locale parameter -// with whatever Google Update tells us is the locale. In case we fail to find -// the locale, we use US English. -std::wstring GetUninstallSurveyUrl() { - const ATLSTRINGRESOURCEIMAGE* image = AtlGetStringResourceImage( - _AtlBaseModule.GetModuleInstance(), IDS_UNINSTALL_SURVEY_URL); - DCHECK(image); - std::wstring url = std::wstring(image->achString, image->nLength); - DCHECK(!url.empty()); - - std::wstring language; - if (!GoogleUpdateSettings::GetLanguage(&language)) - language = L"en-US"; // Default to US English. - - return ReplaceStringPlaceholders(url.c_str(), language.c_str(), NULL); -} - -// This method launches an uninstall survey and is called at the end of -// uninstall process. We are not doing any error checking here as it is -// not critical to have this survey. If we fail to launch it, we just -// ignore it silently. -void LaunchUninstallSurvey(const installer::Version& installed_version) { - // Send the Chrome version and OS version as params to the form. - // It would be nice to send the locale, too, but I don't see an - // easy way to get that in the existing code. It's something we - // can add later, if needed. - // We depend on installed_version.GetString() not having spaces or other - // characters that need escaping: 0.2.13.4. Should that change, we will - // need to escape the string before using it in a URL. - const std::wstring kVersionParam = L"crversion"; - const std::wstring kVersion = installed_version.GetString(); - const std::wstring kOSParam = L"os"; - std::wstring os_version = L"na"; - OSVERSIONINFO version_info; - version_info.dwOSVersionInfoSize = sizeof version_info; - if (GetVersionEx(&version_info)) { - os_version = StringPrintf(L"%d.%d.%d", - version_info.dwMajorVersion, - version_info.dwMinorVersion, - version_info.dwBuildNumber); - } - - std::wstring iexplore; - if (!PathService::Get(base::DIR_PROGRAM_FILES, &iexplore)) - return; - - file_util::AppendToPath(&iexplore, L"Internet Explorer"); - file_util::AppendToPath(&iexplore, L"iexplore.exe"); - - std::wstring command = iexplore + L" " + GetUninstallSurveyUrl() + L"&" + - kVersionParam + L"=" + kVersion + L"&" + kOSParam + L"=" + os_version; - int pid = 0; - WMIProcessUtil::Launch(command, &pid); -} - -#endif - } // namespace @@ -237,7 +161,17 @@ installer_util::InstallStatus installer_setup::UninstallChrome( BrowserDistribution* dist = BrowserDistribution::GetDistribution(); dist->DoPreUninstallOperations(); #if defined(GOOGLE_CHROME_BUILD) - UninstallGears(); + // TODO(rahulk): This should be done by DoPreUninstallOperations call above + wchar_t product[39]; // GUID + '\0' + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); // Don't show any UI to user. + for (int i = 0; MsiEnumRelatedProducts(google_update::kGearsUpgradeCode, 0, i, + product) != ERROR_NO_MORE_ITEMS; ++i) { + LOG(INFO) << "Uninstalling Gears - " << product; + unsigned int ret = MsiConfigureProduct(product, INSTALLLEVEL_MAXIMUM, + INSTALLSTATE_ABSENT); + if (ret != ERROR_SUCCESS) + LOG(ERROR) << "Failed to uninstall Gears " << product << ": " << ret; + } #endif // Chrome is not in use so lets uninstall Chrome by deleting various files @@ -309,8 +243,5 @@ installer_util::InstallStatus installer_setup::UninstallChrome( LOG(INFO) << "Uninstallation complete. Launching Uninstall survey."; dist->DoPostUninstallOperations(installed_version); -#if defined(GOOGLE_CHROME_BUILD) - LaunchUninstallSurvey(installed_version); -#endif return installer_util::UNINSTALL_SUCCESSFUL; } diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc index 3c02cb0..2566591 100644 --- a/chrome/installer/util/browser_distribution.cc +++ b/chrome/installer/util/browser_distribution.cc @@ -71,6 +71,10 @@ int BrowserDistribution::GetInstallReturnCode( return install_status; } +std::wstring BrowserDistribution::GetUninstallLinkName() { + return L"Uninstall Chromium"; +} + std::wstring BrowserDistribution::GetUninstallRegPath() { return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Chromium"; } diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h index 3ede388..d1a2c62 100644 --- a/chrome/installer/util/browser_distribution.h +++ b/chrome/installer/util/browser_distribution.h @@ -55,6 +55,8 @@ class BrowserDistribution { virtual int GetInstallReturnCode( installer_util::InstallStatus install_status); + virtual std::wstring GetUninstallLinkName(); + virtual std::wstring GetUninstallRegPath(); virtual std::wstring GetVersionKey(); diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 2623b36..8a7a1e6 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -42,28 +42,25 @@ #include "base/string_util.h" #include "base/wmi_util.h" #include "chrome/installer/util/install_util.h" +#include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/google_update_constants.h" +#include "chrome/installer/util/google_update_settings.h" #include "chrome/installer/util/logging_installer.h" +#include "installer_util_strings.h" + namespace { +// Substitute the locale parameter in uninstall URL with whatever +// Google Update tells us is the locale. In case we fail to find +// the locale, we use US English. std::wstring GetUninstallSurveyUrl() { - /* TODO(rahulk): Make this work (requires some serious refactoring of - resources and GoogleUpdateSettings class) and get rid of #ifdef from - uninstall.cc. - const ATLSTRINGRESOURCEIMAGE* image = AtlGetStringResourceImage( - _AtlBaseModule.GetModuleInstance(), IDS_UNINSTALL_SURVEY_URL); - DCHECK(image); - std::wstring url = std::wstring(image->achString, image->nLength); - DCHECK(!url.empty()); + std::wstring kSurveyUrl = L"http://www.google.com/support/chrome/bin/request.py?hl=$1&contact_type=uninstall"; std::wstring language; if (!GoogleUpdateSettings::GetLanguage(&language)) language = L"en-US"; // Default to US English. - return ReplaceStringPlaceholders(url.c_str(), language.c_str(), NULL); - */ - return L""; - + return ReplaceStringPlaceholders(kSurveyUrl.c_str(), language.c_str(), NULL); } } @@ -121,7 +118,9 @@ void GoogleChromeDistribution::DoPreUninstallOperations() { } std::wstring GoogleChromeDistribution::GetApplicationName() { - return L"Google Chrome"; + const std::wstring& product_name = + installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE); + return product_name; } std::wstring GoogleChromeDistribution::GetInstallSubDir() { @@ -154,7 +153,9 @@ std::wstring GoogleChromeDistribution::GetNewGoogleUpdateApKey(bool diff_install } std::wstring GoogleChromeDistribution::GetPublisherName() { - return L"Google"; + const std::wstring& publisher_name = + installer_util::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); + return publisher_name; } int GoogleChromeDistribution::GetInstallReturnCode( @@ -170,6 +171,12 @@ int GoogleChromeDistribution::GetInstallReturnCode( } } +std::wstring GoogleChromeDistribution::GetUninstallLinkName() { + const std::wstring& link_name = + installer_util::GetLocalizedString(IDS_UNINSTALL_CHROME_BASE); + return link_name; +} + std::wstring GoogleChromeDistribution::GetUninstallRegPath() { return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome"; } diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h index f1d6af9..2b2336d 100644 --- a/chrome/installer/util/google_chrome_distribution.h +++ b/chrome/installer/util/google_chrome_distribution.h @@ -66,6 +66,8 @@ class GoogleChromeDistribution : public BrowserDistribution { virtual int GetInstallReturnCode( installer_util::InstallStatus install_status); + virtual std::wstring GetUninstallLinkName(); + virtual std::wstring GetUninstallRegPath(); virtual std::wstring GetVersionKey(); diff --git a/chrome/installer/util/l10n_string_util.cc b/chrome/installer/util/l10n_string_util.cc index 97c9d76..dba8459 100644 --- a/chrome/installer/util/l10n_string_util.cc +++ b/chrome/installer/util/l10n_string_util.cc @@ -5,7 +5,7 @@ #include "base/logging.h" #include "base/string_util.h" -#include "setup_strings.h" +#include "installer_util_strings.h" namespace { diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py index ca4fd09..3eb56e4 100644 --- a/chrome/installer/util/prebuild/create_string_rc.py +++ b/chrome/installer/util/prebuild/create_string_rc.py @@ -38,6 +38,7 @@ import FP kStringIds = [ 'IDS_PRODUCT_NAME', 'IDS_UNINSTALL_CHROME', + 'IDS_ABOUT_VERSION_COMPANY_NAME', ] # The ID of the first resource string. @@ -116,10 +117,10 @@ def WriteRCFile(translated_strings, out_filename): """Writes a resource (rc) file with all the language strings provided in |translated_strings|.""" kHeaderText = ( - u'#include "setup_strings.h"\n\n' + u'#include "%s.h"\n\n' u'STRINGTABLE\n' u'BEGIN\n' - ) + ) % os.path.basename(out_filename) kFooterText = ( u'END\n' ) @@ -128,7 +129,7 @@ def WriteRCFile(translated_strings, out_filename): lines.append(u' %s "%s"\n' % (translation_struct.resource_id_str, translation_struct.translation)) lines.append(kFooterText) - outfile = open(out_filename, 'wb') + outfile = open(out_filename + '.rc', 'wb') outfile.write(''.join(lines).encode('utf-16')) outfile.close() @@ -162,16 +163,16 @@ def WriteHeaderFile(translated_strings, out_filename): string_id, translated_strings[0].language)) - outfile = open(out_filename, 'wb') + outfile = open(out_filename + '.h', 'wb') outfile.write('\n'.join(lines)) outfile.write('\n') # .rc files must end in a new line outfile.close() def main(argv): translated_strings = CollectTranslatedStrings() - kFilebase = os.path.join(argv[1], 'setup_strings') - WriteRCFile(translated_strings, kFilebase + '.rc') - WriteHeaderFile(translated_strings, kFilebase + '.h') + kFilebase = os.path.join(argv[1], 'installer_util_strings') + WriteRCFile(translated_strings, kFilebase) + WriteHeaderFile(translated_strings, kFilebase) if '__main__' == __name__: if len(sys.argv) < 2: diff --git a/chrome/installer/util/prebuild/util_prebuild.vsprops b/chrome/installer/util/prebuild/using_util_prebuild.vsprops index 2fa7bc5..2fa7bc5 100644 --- a/chrome/installer/util/prebuild/util_prebuild.vsprops +++ b/chrome/installer/util/prebuild/using_util_prebuild.vsprops diff --git a/chrome/installer/util/prebuild/util_prebuild.vcproj b/chrome/installer/util/prebuild/util_prebuild.vcproj index d3efe6d..6432f2c 100644 --- a/chrome/installer/util/prebuild/util_prebuild.vcproj +++ b/chrome/installer/util/prebuild/util_prebuild.vcproj @@ -26,7 +26,7 @@ Name="VCCustomBuildTool" CommandLine="create_string_rc.bat $(IntDir)" AdditionalDependencies="create_string_rc.py;$(SolutionDir)\app\generated_resources.grd" - Outputs="$(IntDir)\setup_strings.rc;$(IntDir)\setup_strings.h" + Outputs="$(IntDir)\installer_util_strings.rc;$(IntDir)\installer_util_strings.h" /> <Tool Name="VCMIDLTool" @@ -47,7 +47,7 @@ Name="VCCustomBuildTool" CommandLine="create_string_rc.bat $(IntDir)" AdditionalDependencies="create_string_rc.py;$(SolutionDir)\app\generated_resources.grd" - Outputs="$(IntDir)\setup_strings.rc;$(IntDir)\setup_strings.h" + Outputs="$(IntDir)\installer_util_strings.rc;$(IntDir)\installer_util_strings.h" /> <Tool Name="VCMIDLTool" diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index bc8b882..144a811 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -54,7 +54,7 @@ #include "chrome/installer/util/util_constants.h" #include "chrome/installer/util/work_item.h" -#include "setup_strings.h" +#include "installer_util_strings.h" namespace { @@ -333,7 +333,8 @@ bool ShellUtil::GetChromeIcon(std::wstring& chrome_icon) { } bool ShellUtil::GetChromeShortcutName(std::wstring* shortcut) { - shortcut->assign(installer_util::GetLocalizedString(IDS_PRODUCT_NAME_BASE)); + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + shortcut->assign(dist->GetApplicationName()); shortcut->append(L".lnk"); return true; } diff --git a/chrome/installer/util/using_util.vsprops b/chrome/installer/util/using_util.vsprops new file mode 100644 index 0000000..ba65543 --- /dev/null +++ b/chrome/installer/util/using_util.vsprops @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioPropertySheet + ProjectType="Visual C++" + Version="8.00" + Name="using_util" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="$(IntDir)\..\util_prebuild\" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="$(IntDir)\..\util_prebuild\" + /> +</VisualStudioPropertySheet> diff --git a/chrome/installer/util/util.vcproj b/chrome/installer/util/util.vcproj index 8fcb759..c57ff78 100644 --- a/chrome/installer/util/util.vcproj +++ b/chrome/installer/util/util.vcproj @@ -17,7 +17,7 @@ <Configuration Name="Debug|Win32" ConfigurationType="4" - InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)common\common.vsprops;$(SolutionDir)..\third_party\lzma_sdk\using_lzma_sdk.vsprops;prebuild\util_prebuild.vsprops" + InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)common\common.vsprops;$(SolutionDir)installer\util\using_util.vsprops;$(SolutionDir)..\third_party\lzma_sdk\using_lzma_sdk.vsprops" > <Tool Name="VCCLCompilerTool" @@ -29,7 +29,7 @@ <Configuration Name="Release|Win32" ConfigurationType="4" - InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops;$(SolutionDir)common\common.vsprops;$(SolutionDir)..\third_party\lzma_sdk\using_lzma_sdk.vsprops;prebuild\util_prebuild.vsprops" + InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops;$(SolutionDir)common\common.vsprops;$(SolutionDir)installer\util\using_util.vsprops;$(SolutionDir)..\third_party\lzma_sdk\using_lzma_sdk.vsprops" > <Tool Name="VCCLCompilerTool" |