OSDN Git Service

Translate strings without using MergeLang.dll
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 13 Jan 2019 17:00:24 +0000 (02:00 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 13 Jan 2019 17:00:24 +0000 (02:00 +0900)
--HG--
branch : stable

18 files changed:
BuildArc.cmd
BuildBin.vs2015.cmd
BuildBin.vs2017.cmd
BuildBin.vs2019.cmd
Installer/InnoSetup/WinMerge.iss
Installer/InnoSetup/WinMergeX64.iss
Src/Common/LanguageSelect.cpp
Src/Common/LanguageSelect.h
Src/ConfigLog.cpp
Src/MergeLang.vcxproj [deleted file]
Src/MergeLang.vs2015.vcxproj
Src/MergeLang.vs2015.vcxproj.filters
Src/MergeLang.vs2017.vcxproj
Src/MergeLang.vs2017.vcxproj.filters
Src/MergeLang.vs2019.vcxproj
Src/MergeLang.vs2019.vcxproj.filters
Translations/WinMerge/CreateMasterPotFile.vbs
Translations/WinMerge/English.pot

index 3140e7a..a55e5f6 100644 (file)
@@ -67,7 +67,6 @@ copy ShellExtension\*Register.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\"
 
 rem Translation
 copy Build\%PLATFORM%\MergeUnicodeRelease\Languages\*.po "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Languages\"
-copy Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\"
 
 rem Filters
 for %%i in (Filters\*.flt Filters\*.tmpl Filters\*.txt) do (
index 7ae44e8..5c8b512 100644 (file)
@@ -28,7 +28,6 @@ endlocal
 
 if exist "%SIGNBAT_PATH%" (
   call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
-  call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
 )
 
 mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
index d65c596..6798ff0 100644 (file)
@@ -32,7 +32,6 @@ endlocal
 
 if exist "%SIGNBAT_PATH%" (
   call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
-  call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
 )
 
 mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
index 9c27455..3c426a2 100644 (file)
@@ -32,7 +32,6 @@ endlocal
 
 if exist "%SIGNBAT_PATH%" (
   call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
-  call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
 )
 
 mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
index 2d39474..dcba856 100755 (executable)
@@ -440,9 +440,6 @@ Source: ..\..\Build\Merge7z\7z.dll; DestDir: {app}\Merge7z; Flags: promptifolder
 Source: ..\..\Build\Merge7z\*.txt; DestDir: {app}\Merge7z; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
 Source: ..\..\Build\Merge7z\Lang\*.txt; DestDir: {app}\Merge7z\Lang; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
 \r
-; MergeLang.dll - translation helper dll\r
-Source: ..\..\Build\MergeUnicodeRelease\MergeLang.dll; DestDir: {app}; Flags: promptifolder ignoreversion; Components: Core\r
-\r
 ; Language files\r
 Source: ..\..\Translations\WinMerge\Basque.po; DestDir: {app}\Languages; Components: Languages\Basque; Flags: ignoreversion comparetimestamp\r
 Source: ..\..\Translations\Docs\Readme\ReadMe-Basque.txt; DestDir: {app}\Docs; Components: Languages\Basque\r
index 5fa13dc..d55a007 100644 (file)
@@ -419,9 +419,6 @@ Source: ..\..\Build\X64\Merge7z\7z.dll; DestDir: {app}\Merge7z; Flags: promptifo
 Source: ..\..\Build\X64\Merge7z\*.txt; DestDir: {app}\Merge7z; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
 Source: ..\..\Build\X64\Merge7z\Lang\*.txt; DestDir: {app}\Merge7z\Lang; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
 \r
-; MergeLang.dll - translation helper dll\r
-Source: ..\..\Build\X64\MergeUnicodeRelease\MergeLang.dll; DestDir: {app}; Flags: promptifolder ignoreversion; Components: Core\r
-\r
 ; Language files\r
 Source: ..\..\Translations\WinMerge\Basque.po; DestDir: {app}\Languages; Components: Languages\Basque; Flags: ignoreversion comparetimestamp\r
 Source: ..\..\Translations\Docs\Readme\ReadMe-Basque.txt; DestDir: {app}\Docs; Components: Languages\Basque\r
index e2e29b6..1891ad5 100644 (file)
 /** @brief Relative path to WinMerge executable for lang files. */
 static const TCHAR szRelativePath[] = _T("Languages");
 
-static char *EatPrefix(char *text, const char *prefix);
-static void unslash(unsigned codepage, std::string &s);
+template<size_t len>
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t (&prefix)[len]);
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t *prefix);
+static void unslash(std::wstring &s);
 static HANDLE NTAPI FindFile(HANDLE h, LPCTSTR path, WIN32_FIND_DATA *fd);
 
 /**
@@ -413,36 +415,36 @@ LangFileInfo::LangFileInfo(LPCTSTR path)
 : id(0)
 {
        FILE *f;
-       if (_tfopen_s(&f, path, _T("r")) == 0 && f)
+       if (_tfopen_s(&f, path, _T("r,ccs=utf-8")) == 0 && f)
        {
-               char buf[1024 + 1];
-               while (fgets(buf, sizeof buf - 1, f) != nullptr)
+               wchar_t buf[1024 + 1];
+               while (fgetws(buf, countof(buf) - 1, f) != nullptr)
                {
                        int i = 0;
-                       strcat_s(buf, "1");
-                       sscanf_s(buf, "msgid \" LANG_ENGLISH , SUBLANG_ENGLISH_US \" %d", &i);
+                       wcscat_s(buf, L"1");
+                       swscanf_s(buf, L"msgid \" LANG_ENGLISH , SUBLANG_ENGLISH_US \" %d", &i);
                        if (i)
                        {
-                               if (fgets(buf, sizeof buf, f) != nullptr)
+                               if (fgetws(buf, countof(buf), f) != nullptr)
                                {
-                                       char *lang = strstr(buf, "LANG_");
-                                       char *sublang = strstr(buf, "SUBLANG_");
-                                       char *langNext = nullptr;
-                                       char *sublangNext = nullptr;
+                                       wchar_t *lang = wcsstr(buf, L"LANG_");
+                                       wchar_t *sublang = wcsstr(buf, L"SUBLANG_");
+                                       wchar_t *langNext = nullptr;
+                                       wchar_t *sublangNext = nullptr;
                                        if (lang && sublang)
                                        {
-                                               strtok_s(lang, ",\" \t\r\n", &langNext);
-                                               strtok_s(sublang, ",\" \t\r\n", &sublangNext);
-                                               lang += sizeof "LANG";
-                                               sublang += sizeof "SUBLANG";
-                                               if (0 != strcmp(sublang, "DEFAULT"))
+                                               wcstok_s(lang, L",\" \t\r\n", &langNext);
+                                               wcstok_s(sublang, L",\" \t\r\n", &sublangNext);
+                                               lang += countof("LANG");
+                                               sublang += countof("SUBLANG");
+                                               if (0 != wcscmp(sublang, L"DEFAULT"))
                                                {
                                                        sublang = EatPrefix(sublang, lang);
                                                        if (sublang && *sublang)
-                                                               sublang = EatPrefix(sublang, "_");
+                                                               sublang = EatPrefix(sublang, L"_");
                                                }
                                                if (sublang)
-                                                       id = LangId(lang, sublang);
+                                                       id = LangId(std::string(lang, lang + wcslen(lang)).c_str(), std::string(sublang, sublang + wcslen(sublang)).c_str());
                                        }
                                }
                                break;
@@ -484,9 +486,7 @@ static HANDLE NTAPI FindFile(HANDLE h, LPCTSTR path, WIN32_FIND_DATA *fd)
 const WORD wSourceLangId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
 
 CLanguageSelect::CLanguageSelect()
-: m_hCurrentDll(nullptr)
-, m_wCurLanguage(wSourceLangId)
-, m_codepage(0)
+: m_wCurLanguage(wSourceLangId)
 {
        SetThreadLocale(MAKELCID(m_wCurLanguage, SORT_DEFAULT));
 }
@@ -499,27 +499,35 @@ CLanguageSelect::CLanguageSelect()
  * @note Function returns pointer to original string,
  *  it does not allocate a new string.
  */
-static char *EatPrefix(char *text, const char *prefix)
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t *prefix)
 {
-       if (size_t len = strlen(prefix))
-               if (_memicmp(text, prefix, len) == 0)
+       if (size_t len = wcslen(prefix))
+               if (_memicmp(text, prefix, len * sizeof(wchar_t)) == 0)
                        return text + len;
        return 0;
 }
 
+template<size_t len>
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t (&prefix)[len])
+{
+       if (_memicmp(text, prefix, len * sizeof(wchar_t)) == 0)
+               return text + len;
+       return 0;
+}
+
 /**
  * @brief Convert C style \\nnn, \\r, \\n, \\t etc into their indicated characters.
  * @param [in] codepage Codepage to use in conversion.
  * @param [in,out] s String to convert.
  */
-static void unslash(unsigned codepage, std::string &s)
+static void unslash(std::wstring &s)
 {
-       char *p = &*s.begin();
-       char *q = p;
-       char c;
+       wchar_t *p = &*s.begin();
+       wchar_t *q = p;
+       wchar_t c;
        do
        {
-               char *r = q + 1;
+               wchar_t *r = q + 1;
                switch (c = *q)
                {
                case '\\':
@@ -547,10 +555,10 @@ static void unslash(unsigned codepage, std::string &s)
                                c = '\v';
                                break;
                        case 'x':
-                               *p = (char)strtol(r, &q, 16);
+                               *p = (wchar_t)wcstol(r, &q, 16);
                                break;
                        default:
-                               *p = (char)strtol(r - 1, &q, 8);
+                               *p = (wchar_t)wcstol(r - 1, &q, 8);
                                break;
                        }
                        if (q >= r)
@@ -558,8 +566,6 @@ static void unslash(unsigned codepage, std::string &s)
                        // fall through
                default:
                        *p = c;
-                       if ((*p & 0x80) && IsDBCSLeadByteEx(codepage, *p))
-                               *++p = *r++;
                        q = r;
                }
                ++p;
@@ -578,100 +584,14 @@ bool CLanguageSelect::LoadLanguageFile(LANGID wLangId, bool bShowError /*= false
        if (strPath.empty())
                return false;
 
-       m_hCurrentDll = LoadLibrary(_T("MergeLang.dll"));
-       // There is no point in translating error messages about inoperational
-       // translation system, so go without string resources here.
-       if (m_hCurrentDll == nullptr)
-       {
-               if (bShowError)
-                       AfxMessageBox(_T("Failed to load MergeLang.dll"), MB_ICONSTOP);
-               return false;
-       }
-       CVersionInfo viInstance(AfxGetInstanceHandle());
-       unsigned instanceVerMS = 0;
-       unsigned instanceVerLS = 0;
-       viInstance.GetFixedFileVersion(instanceVerMS, instanceVerLS);
-       CVersionInfo viResource(m_hCurrentDll);
-       unsigned resourceVerMS = 0;
-       unsigned resourceVerLS = 0;
-       viResource.GetFixedFileVersion(resourceVerMS, resourceVerLS);
-       if (instanceVerMS != resourceVerMS || instanceVerLS != resourceVerLS)
-       {
-               FreeLibrary(m_hCurrentDll);
-               m_hCurrentDll = nullptr;
-               if (bShowError)
-                       AfxMessageBox(_T("MergeLang.dll version mismatch"), MB_ICONSTOP);
-               return false;
-       }
-       HRSRC mergepot = FindResource(m_hCurrentDll, _T("MERGEPOT"), RT_RCDATA);
-       if (mergepot == nullptr)
-       {
-               if (bShowError)
-                       AfxMessageBox(_T("MergeLang.dll is invalid"), MB_ICONSTOP);
-               return false;
-       }
-       size_t size = SizeofResource(m_hCurrentDll, mergepot);
-       const char *data = (const char *)LoadResource(m_hCurrentDll, mergepot);
-       char buf[1024];
-       std::string *ps = nullptr;
-       std::string msgid;
+       wchar_t buf[1024];
+       std::wstring *ps = nullptr;
+       std::wstring msgid;
        unsigned uid = 0;
        bool found_uid = false;
-       int unresolved = 0;
-       int mismatched = 0;
-       while (const char *eol = (const char *)memchr(data, '\n', size))
-       {
-               size_t len = eol - data;
-               if (len >= sizeof buf)
-               {
-                       ASSERT(false);
-                       break;
-               }
-               memcpy(buf, data, len);
-               buf[len++] = '\0';
-               data += len;
-               size -= len;
-               if (char *p = EatPrefix(buf, "#:"))
-               {
-                       if (char *q = strchr(p, ':'))
-                       {
-                               uid = strtoul(q + 1, &q, 16);
-                               found_uid = true;
-                               ++unresolved;
-                       }
-               }
-               else if (EatPrefix(buf, "msgid "))
-               {
-                       ps = &msgid;
-               }
-               if (ps != nullptr)
-               {
-                       char *p = strchr(buf, '"');
-                       char *q = strrchr(buf, '"');
-                       if (std::string::size_type n = q - p)
-                       {
-                               ps->append(p + 1, n - 1);
-                       }
-                       else
-                       {
-                               ps = nullptr;
-                               // avoid dereference of empty vector or last vector
-                               if (found_uid)
-                               {
-                                       unslash(0, msgid);
-                                       m_map_msgid_to_uid.insert(std::make_pair(msgid, uid));
-                                       m_map_uid_to_msgid.insert(std::make_pair(uid, msgid));
-                               }
-                               found_uid = false;
-                               msgid.erase();
-                       }
-               }
-       }
        FILE *f;
-       if (_tfopen_s(&f, strPath.c_str(), _T("r")) != 0)
+       if (_tfopen_s(&f, strPath.c_str(), _T("r,ccs=UTF-8")) != 0)
        {
-               FreeLibrary(m_hCurrentDll);
-               m_hCurrentDll = nullptr;
                if (bShowError)
                {
                        String str = _T("Failed to load ") + strPath;
@@ -682,45 +602,44 @@ bool CLanguageSelect::LoadLanguageFile(LANGID wLangId, bool bShowError /*= false
        ps = nullptr;
        msgid.erase();
        found_uid = false;
-       std::string format;
-       std::string msgstr;
-       std::string directive;
-       while (fgets(buf, sizeof buf, f) != nullptr)
+       std::wstring format;
+       std::wstring msgstr;
+       std::wstring directive;
+       while (fgetws(buf, countof(buf), f) != nullptr)
        {
-               if (char *p0 = EatPrefix(buf, "#:"))
+               if (wchar_t *p0 = EatPrefix(buf, L"#:"))
                {
-                       if (char *q = strchr(p0, ':'))
+                       if (wchar_t *q = wcschr(p0, ':'))
                        {
-                               uid = strtoul(q + 1, &q, 16);
+                               uid = wcstoul(q + 1, &q, 16);
                                found_uid = true;
-                               --unresolved;
                        }
                }
-               else if (char *p1 = EatPrefix(buf, "#,"))
+               else if (wchar_t *p1 = EatPrefix(buf, L"#,"))
                {
                        format = p1;
-                       format.erase(0, format.find_first_not_of(" \t\r\n"));
-                       format.erase(format.find_last_not_of(" \t\r\n") + 1);
+                       format.erase(0, format.find_first_not_of(L" \t\r\n"));
+                       format.erase(format.find_last_not_of(L" \t\r\n") + 1);
                }
-               else if (char *p2 = EatPrefix(buf, "#."))
+               else if (wchar_t *p2 = EatPrefix(buf, L"#."))
                {
                        directive = p2;
-                       directive.erase(0, directive.find_first_not_of(" \t\r\n"));
-                       directive.erase(directive.find_last_not_of(" \t\r\n") + 1);
+                       directive.erase(0, directive.find_first_not_of(L" \t\r\n"));
+                       directive.erase(directive.find_last_not_of(L" \t\r\n") + 1);
                }
-               else if (EatPrefix(buf, "msgid "))
+               else if (EatPrefix(buf, L"msgid "))
                {
                        ps = &msgid;
                }
-               else if (EatPrefix(buf, "msgstr "))
+               else if (EatPrefix(buf, L"msgstr "))
                {
                        ps = &msgstr;
                }
                if (ps != nullptr)
                {
-                       char *p = strchr(buf, '"');
-                       char *q = strrchr(buf, '"');
-                       if (std::string::size_type n = q - p)
+                       wchar_t *p = wcschr(buf, '"');
+                       wchar_t *q = wcsrchr(buf, '"');
+                       if (std::wstring::size_type n = q - p)
                        {
                                ps->append(p + 1, n - 1);
                        }
@@ -728,45 +647,19 @@ bool CLanguageSelect::LoadLanguageFile(LANGID wLangId, bool bShowError /*= false
                        {
                                ps = nullptr;
                                if (!msgid.empty())
-                                       unslash(0, msgid);
+                                       unslash(msgid);
                                if (msgstr.empty())
                                        msgstr = msgid;
-                               unslash(m_codepage, msgstr);
-                               // avoid dereference of empty vector or last vector
+                               unslash(msgstr);
                                if (found_uid)
-                               {
-                                       if (m_map_uid_to_msgid.find(uid) != m_map_uid_to_msgid.end() && m_map_uid_to_msgid.at(uid) == msgid)
-                                               m_map_uid_to_msgid[uid] = msgstr;
-                                       else
-                                               ++mismatched;
-                               }
+                                       m_map_msgid_to_msgstr.insert_or_assign(msgid, msgstr);
                                found_uid = false;
-                               if (directive == "Codepage")
-                               {
-                                       m_codepage = strtol(msgstr.c_str(), &p, 10);
-                                       directive.erase();
-                               }
                                msgid.erase();
                                msgstr.erase();
                        }
                }
        }
        fclose(f);
-       if (unresolved != 0 || mismatched != 0)
-       {
-               FreeLibrary(m_hCurrentDll);
-               m_hCurrentDll = nullptr;
-               m_map_uid_to_msgid.clear();
-               m_map_msgid_to_uid.clear();
-               m_codepage = 0;
-               if (bShowError)
-               {
-                       String str = _T("Unresolved or mismatched references detected when ")
-                               _T("attempting to read translations from\n") + strPath;
-                       AfxMessageBox(str.c_str(), MB_ICONSTOP);
-               }
-               return false;
-       }
        return true;
 }
 
@@ -781,22 +674,10 @@ bool CLanguageSelect::SetLanguage(LANGID wLangId, bool bShowError /*= false*/)
                return false;
        if (m_wCurLanguage == wLangId)
                return true;
-       // reset the resource handle
-       AfxSetResourceHandle(AfxGetInstanceHandle());
-       // free the existing DLL
-       if (m_hCurrentDll != nullptr)
-       {
-               FreeLibrary(m_hCurrentDll);
-               m_hCurrentDll = nullptr;
-       }
-       m_map_uid_to_msgid.clear();
-       m_map_msgid_to_uid.clear();
-       m_codepage = 0;
+       m_map_msgid_to_msgstr.clear();
        if (wLangId != wSourceLangId)
        {
-               if (LoadLanguageFile(wLangId, bShowError))
-                       AfxSetResourceHandle(m_hCurrentDll);
-               else
+               if (!LoadLanguageFile(wLangId, bShowError))
                        wLangId = wSourceLangId;
        }
        m_wCurLanguage = wLangId;
@@ -833,62 +714,26 @@ String CLanguageSelect::GetFileName(LANGID wLangId) const
 /////////////////////////////////////////////////////////////////////////////
 // CLanguageSelect commands
 
-bool CLanguageSelect::TranslateString(unsigned uid, std::string &s) const
+bool CLanguageSelect::TranslateString(const std::wstring& msgid, std::wstring &s) const
 {
-       if (m_map_uid_to_msgid.find(uid) != m_map_uid_to_msgid.end())
+       if (m_map_msgid_to_msgstr.find(msgid) != m_map_msgid_to_msgstr.end())
        {
-               s = m_map_uid_to_msgid.at(uid);
-               unsigned codepage = GetACP();
-               if (m_codepage != codepage)
-               {
-                       // Attempt to convert to UI codepage
-                       if (size_t len = s.length())
-                       {
-                               std::wstring ws;
-                               ws.resize(len);
-                               len = MultiByteToWideChar(m_codepage, 0, s.c_str(), -1, &*ws.begin(), static_cast<int>(len) + 1);
-                               if (len)
-                               {
-                                       ws.resize(len - 1);
-                                       len = WideCharToMultiByte(codepage, 0, ws.c_str(), -1, 0, 0, 0, 0);
-                                       if (len)
-                                       {
-                                               s.resize(len - 1);
-                                               WideCharToMultiByte(codepage, 0, ws.c_str(), -1, &*s.begin(), static_cast<int>(len), 0, 0);
-                                       }
-                               }
-                       }
-               }
+               s = m_map_msgid_to_msgstr.at(msgid);
                return true;
        }
+       s = msgid;
        return false;
 }
 
-bool CLanguageSelect::TranslateString(unsigned uid, std::wstring &ws) const
+bool CLanguageSelect::TranslateString(const std::string& msgid, String& s) const
 {
-       if (m_map_uid_to_msgid.find(uid) != m_map_uid_to_msgid.end())
-       {
-               if (size_t len = m_map_uid_to_msgid.at(uid).length())
-               {
-                       ws.resize(len);
-                       const char *msgstr = m_map_uid_to_msgid.at(uid).c_str();
-                       len = MultiByteToWideChar(m_codepage, 0, msgstr, -1, &*ws.begin(), static_cast<int>(len) + 1);
-                       ws.resize(len - 1);
-                       return true;
-               }
-       }
-       return false;
-}
-
-bool CLanguageSelect::TranslateString(const std::string& str, String &translated_str) const
-{
-       EngMsgIDToUIDMap::const_iterator it = m_map_msgid_to_uid.find(str);
-       if (it != m_map_msgid_to_uid.end())
-       {
-               return TranslateString(it->second, translated_str);
-       }
-       translated_str = ucr::toTString(str);
-       return false;
+#ifdef _UNICODE
+       bool result = TranslateString(std::wstring(msgid.begin(), msgid.end()), s);
+#else
+       bool result = TranslateString(std::wstring(msgid.begin(), msgid.end()), ws);
+       s = ucr::toTString(ws);
+#endif
+       return result;
 }
 
 void CLanguageSelect::SetIndicators(CStatusBar &sb, const UINT *rgid, int n) const
@@ -950,21 +795,17 @@ void CLanguageSelect::TranslateMenu(HMENU h) const
                {
                        if (LPCWSTR text = pItemData->GetWideString())
                        {
-                               unsigned uid = 0;
-                               swscanf_s(text, L"Merge.rc:%x", &uid);
                                std::wstring s;
-                               if (TranslateString(uid, s))
+                               if (TranslateString(text, s))
                                        pItemData->SetWideString(s.c_str());
                        }
                }
-               TCHAR text[80];
-               if (::GetMenuString(h, i, text, countof(text), MF_BYPOSITION))
+               wchar_t text[80];
+               if (::GetMenuStringW(h, i, text, countof(text), MF_BYPOSITION))
                {
-                       unsigned uid = 0;
-                       _stscanf_s(text, _T("Merge.rc:%x"), &uid);
-                       String s;
-                       if (TranslateString(uid, s))
-                               ::ModifyMenu(h, i, mii.fState | MF_BYPOSITION, mii.wID, s.c_str());
+                       std::wstring s;
+                       if (TranslateString(text, s))
+                               ::ModifyMenuW(h, i, mii.fState | MF_BYPOSITION, mii.wID, s.c_str());
                }
        }
 }
@@ -974,13 +815,11 @@ void CLanguageSelect::TranslateDialog(HWND h) const
        UINT gw = GW_CHILD;
        do
        {
-               TCHAR text[80];
-               ::GetWindowText(h, text, countof(text));
-               unsigned uid = 0;
-               _stscanf_s(text, _T("Merge.rc:%x"), &uid);
-               String s;
-               if (TranslateString(uid, s))
-                       ::SetWindowText(h, s.c_str());
+               wchar_t text[512];
+               ::GetWindowTextW(h, text, countof(text));
+               std::wstring s;
+               if (TranslateString(text, s))
+                       ::SetWindowTextW(h, s.c_str());
                h = ::GetWindow(h, gw);
                gw = GW_HWNDNEXT;
        } while (h != nullptr);
@@ -1063,64 +902,31 @@ void CLanguageSelect::RetranslateDialog(HWND h, const TCHAR *name) const
                        reinterpret_cast<WORD*>((reinterpret_cast<DWORD_PTR>(pw) + 3) & ~DWORD_PTR(3))); // DWORD align
        };
 
-       bool english = false;
-       HMODULE hModule = m_hCurrentDll;
-       if (hModule == nullptr)
+       DLGTEMPLATEEX *pTemplate = nullptr;
+       if ((pTemplate = loadDialogResource(AfxGetInstanceHandle(), name)) != nullptr)
        {
-               hModule = LoadLibrary(_T("MergeLang.dll"));
-               english = true;
-       }
-       if (hModule != nullptr)
-       {
-               if (DLGTEMPLATEEX* pTemplate = loadDialogResource(hModule, name))
+               HWND hWndChlid = ::GetWindow(h, GW_CHILD);
+               const DLGITEMTEMPLATEEX *pItem = findFirstDlgItem(pTemplate);
+               for (int nDlgItems = 0; nDlgItems < pTemplate->cDlgItems; ++nDlgItems)
                {
-                       DLGTEMPLATEEX *pTemplateEng = nullptr;
-                       if (!english || (pTemplateEng = loadDialogResource(AfxGetInstanceHandle(), name)) != nullptr)
-                       {
-                               HWND hWndChlid = ::GetWindow(h, GW_CHILD);
-                               const DLGITEMTEMPLATEEX *pItem = findFirstDlgItem(pTemplate);
-                               const DLGITEMTEMPLATEEX *pItemEng = pTemplateEng ? findFirstDlgItem(pTemplateEng) : nullptr;
-                               for (int nDlgItems = 0; nDlgItems < pTemplate->cDlgItems; ++nDlgItems)
-                               {
-                                       const WORD *pw = reinterpret_cast<const WORD *>(pItem);
-                                       pw += sizeof(DLGITEMTEMPLATEEX) / sizeof(WORD);
-                                       skip(pw); // Skip class name string or ordinal
-
-                                       if (*pw == static_cast<WORD>(-1))     // Skip text string or ordinal
-                                               pw += 2;
-                                       else
-                                       {
-                                               const wchar_t *p = reinterpret_cast<const wchar_t*>(pw);
-                                               if (wcsncmp(p, L"Merge.rc:", 9) == 0)
-                                               {
-                                                       if (pItemEng != nullptr)
-                                                       {
-                                                               const WORD *pw2 = reinterpret_cast<const WORD *>(pItemEng);
-                                                               pw2 += sizeof(DLGITEMTEMPLATEEX) / sizeof(WORD);
-                                                               skip(pw2); // Skip class name string or ordinal
-                                                               const wchar_t *peng = reinterpret_cast<const wchar_t *>(pw2);
-                                                               ::SetWindowText(hWndChlid, peng);
-                                                       }
-                                                       else
-                                                       {
-                                                               ::SetWindowText(hWndChlid, p);
-                                                       }
-                                               }
-                                               while (*pw++);
-                                       }
+                       const WORD *pw = reinterpret_cast<const WORD *>(pItem);
+                       pw += sizeof(DLGITEMTEMPLATEEX) / sizeof(WORD);
+                       skip(pw); // Skip class name string or ordinal
 
-                                       hWndChlid = ::GetWindow(hWndChlid, GW_HWNDNEXT);
-                                       pItem = findNextDlgItem(pItem);
-                                       if (pItemEng != nullptr)
-                                               pItemEng = findNextDlgItem(pItemEng);
-                               }
+                       if (*pw == static_cast<WORD>(-1))     // Skip text string or ordinal
+                               pw += 2;
+                       else
+                       {
+                               const wchar_t *p = reinterpret_cast<const wchar_t*>(pw);
+                               ::SetWindowTextW(hWndChlid, p);
+                               while (*pw++);
                        }
+
+                       hWndChlid = ::GetWindow(hWndChlid, GW_HWNDNEXT);
+                       pItem = findNextDlgItem(pItem);
                }
-               if (english)
-                       FreeLibrary(hModule);
-               else
-                       TranslateDialog(h);
        }
+       TranslateDialog(h);
 }
 
 String CLanguageSelect::LoadString(UINT id) const
@@ -1128,11 +934,9 @@ String CLanguageSelect::LoadString(UINT id) const
        String s;
        if (id)
        {
-               TCHAR text[1024];
+               wchar_t text[1024];
                AfxLoadString(id, text, countof(text));
-               unsigned uid = 0;
-               _stscanf_s(text, _T("Merge.rc:%x"), &uid);
-               if (!TranslateString(uid, s))
+               if (!TranslateString(text, s))
                        s = text;
        }
        return s;
@@ -1160,9 +964,7 @@ std::wstring CLanguageSelect::LoadDialogCaption(LPCTSTR lpDialogTemplateID) cons
                                else
                                        while (*text++);
                                // Caption string is ahead
-                               unsigned uid = 0;
-                               swscanf_s(text, L"Merge.rc:%x", &uid);
-                               if (!TranslateString(uid, s))
+                               if (!TranslateString(text, s))
                                        s = text;
                        }
                }
index dfa3a3f..ee4465c 100644 (file)
@@ -27,9 +27,8 @@ public:
        String GetFileName(LANGID) const;
        void InitializeLanguage(WORD langID);
 
-       bool TranslateString(unsigned uid, std::string &) const;
-       bool TranslateString(unsigned uid, std::wstring &) const;
-       bool TranslateString(const std::string&, String &) const;
+       bool TranslateString(const std::wstring&, std::wstring&) const;
+       bool TranslateString(const std::string&, String&) const;
        void SetIndicators(CStatusBar &, const UINT *, int) const;
        void TranslateMenu(HMENU) const;
        void TranslateDialog(HWND) const;
@@ -41,12 +40,8 @@ public:
 
 // Implementation data
 private:
-       HINSTANCE m_hCurrentDll;
        LANGID m_wCurLanguage;
-       std::map<unsigned, std::string> m_map_uid_to_msgid;
-       typedef std::map<std::string, unsigned> EngMsgIDToUIDMap;
-       EngMsgIDToUIDMap m_map_msgid_to_uid;
-       unsigned m_codepage;
+       std::map<std::wstring, std::wstring> m_map_msgid_to_msgstr;
 // Implementation methods
 private:
        bool LoadLanguageFile(LANGID, bool bShowError = false);
index 9b84030..bf2eabb 100644 (file)
@@ -382,7 +382,6 @@ bool CConfigLog::DoFile(String &sError)
        FileWriteString(_T(        " WinMerge:            Path names are relative to the Code File's directory.\r\n"));
        WriteVersionOf1(2, _T(".\\ShellExtensionU.dll"));
        WriteVersionOf1(2, _T(".\\ShellExtensionX64.dll"));
-       WriteVersionOf1(2, _T(".\\MergeLang.dll"));
        WriteVersionOf1(2, _T(".\\Frhed\\hekseditU.dll"));
        WriteVersionOf1(2, _T(".\\WinIMerge\\WinIMergeLib.dll"));
        WriteVersionOf1(2, _T(".\\Merge7z\\7z.dll"));
diff --git a/Src/MergeLang.vcxproj b/Src/MergeLang.vcxproj
deleted file mode 100644 (file)
index ee33ccc..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="UnicodeDebug|Win32">\r
-      <Configuration>UnicodeDebug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="UnicodeDebug|x64">\r
-      <Configuration>UnicodeDebug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="UnicodeRelease|Win32">\r
-      <Configuration>UnicodeRelease</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="UnicodeRelease|x64">\r
-      <Configuration>UnicodeRelease</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectName>MergeLang</ProjectName>\r
-    <ProjectGuid>{4B011DDA-2279-437D-903C-8028913AF31B}</ProjectGuid>\r
-    <RootNamespace>MergeLang</RootNamespace>\r
-    <Keyword>Win32Proj</Keyword>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v141_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v141_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>\r
-      <SubSystem>Windows</SubSystem>\r
-      <NoEntryPoint>true</NoEntryPoint>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2&gt; NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>\r
-      <SubSystem>Windows</SubSystem>\r
-      <NoEntryPoint>true</NoEntryPoint>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2&gt; NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <ClCompile>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <NoEntryPoint>true</NoEntryPoint>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2&gt; NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"\r
-</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">\r
-    <PreBuildEvent>\r
-      <Command>\r
-      </Command>\r
-    </PreBuildEvent>\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-    </ClCompile>\r
-    <Link>\r
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <NoEntryPoint>true</NoEntryPoint>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-    </Link>\r
-    <PostBuildEvent>\r
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2&gt; NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>\r
-    </PostBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <CustomBuild Include="Merge.rc">\r
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
-    </CustomBuild>\r
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-    </ResourceCompile>\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
index 8e90d2d..7bde45a 100644 (file)
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140_xp</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140_xp</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140_xp</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140_xp</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>
   </PropertyGroup>
       <Command>
       </Command>
     </PreBuildEvent>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
-      <SubSystem>Windows</SubSystem>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX86</TargetMachine>
-    </Link>
     <PostBuildEvent>
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge
-cscript UpdatePoFilesFromPotFile.vbs
-popd
-mkdir $(OutDir)\Languages\ 2&gt; NUL
+      <Command>mkdir $(OutDir)\Languages\ 2&gt; NUL
 copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
@@ -121,29 +95,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
-      <SubSystem>Windows</SubSystem>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -157,27 +108,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
       <Command>
       </Command>
     </PreBuildEvent>
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX86</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -195,27 +125,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -226,27 +135,14 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
   </ItemDefinitionGroup>
   <ItemGroup>
     <CustomBuild Include="Merge.rc">
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge
+      <Command>pushd ..\Translations\WinMerge
+
 cscript CreateMasterPotFile.vbs
+cscript UpdatePoFilesFromPotFile.vbs
+popd
 </Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
+      <Outputs>$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
     </CustomBuild>
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs" />
@@ -255,4 +151,4 @@ cscript CreateMasterPotFile.vbs
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index 49ae388..73cf91a 100644 (file)
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
-      <Filter>Resource FIles</Filter>
-    </ResourceCompile>
-  </ItemGroup>
-  <ItemGroup>
     <CustomBuild Include="Merge.rc">
       <Filter>Resource FIles</Filter>
     </CustomBuild>
index 997ccc7..d90802b 100644 (file)
     <ProjectGuid>{4B011DDA-2279-437D-903C-8028913AF31B}</ProjectGuid>
     <RootNamespace>MergeLang</RootNamespace>
     <Keyword>Win32Proj</Keyword>
-    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>
   </PropertyGroup>
       <Command>
       </Command>
     </PreBuildEvent>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
-      <SubSystem>Windows</SubSystem>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX86</TargetMachine>
-    </Link>
     <PostBuildEvent>
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge
-cscript UpdatePoFilesFromPotFile.vbs
-popd
-mkdir $(OutDir)\Languages\ 2&gt; NUL
+      <Command>mkdir $(OutDir)\Languages\ 2&gt; NUL
 copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
@@ -125,29 +99,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
-      <SubSystem>Windows</SubSystem>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -161,27 +112,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
       <Command>
       </Command>
     </PreBuildEvent>
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX86</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -199,27 +129,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -230,27 +139,14 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
   </ItemDefinitionGroup>
   <ItemGroup>
     <CustomBuild Include="Merge.rc">
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge
+      <Command>pushd ..\Translations\WinMerge
+
 cscript CreateMasterPotFile.vbs
+cscript UpdatePoFilesFromPotFile.vbs
+popd
 </Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
+      <Outputs>$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
     </CustomBuild>
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs" />
index 49ae388..67e92b3 100644 (file)
@@ -1,29 +1,24 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs">
-      <Filter>VBS Scripts</Filter>
-    </None>
-    <None Include="..\Translations\WinMerge\UpdatePoFilesFromPotFile.vbs">
-      <Filter>VBS Scripts</Filter>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <Filter Include="VBS Scripts">
-      <UniqueIdentifier>{51a3b56c-eeee-43c9-a0e7-c2561a2e74fe}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Resource FIles">
-      <UniqueIdentifier>{6ed17c4f-f8ad-4783-b08d-accd2076a66b}</UniqueIdentifier>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
-      <Filter>Resource FIles</Filter>
-    </ResourceCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <CustomBuild Include="Merge.rc">
-      <Filter>Resource FIles</Filter>
-    </CustomBuild>
-  </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs">\r
+      <Filter>VBS Scripts</Filter>\r
+    </None>\r
+    <None Include="..\Translations\WinMerge\UpdatePoFilesFromPotFile.vbs">\r
+      <Filter>VBS Scripts</Filter>\r
+    </None>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Filter Include="VBS Scripts">\r
+      <UniqueIdentifier>{51a3b56c-eeee-43c9-a0e7-c2561a2e74fe}</UniqueIdentifier>\r
+    </Filter>\r
+    <Filter Include="Resource FIles">\r
+      <UniqueIdentifier>{6ed17c4f-f8ad-4783-b08d-accd2076a66b}</UniqueIdentifier>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <CustomBuild Include="Merge.rc">\r
+      <Filter>Resource FIles</Filter>\r
+    </CustomBuild>\r
+  </ItemGroup>\r
 </Project>
\ No newline at end of file
index 5765a9a..90dbc2a 100644 (file)
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>Utility</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v141_xp</PlatformToolset>
-       <XPDeprecationWarning>false</XPDeprecationWarning>
+    <XPDeprecationWarning>false</XPDeprecationWarning>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Translations\WinMerge\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>
   </PropertyGroup>
       <Command>
       </Command>
     </PreBuildEvent>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
-      <SubSystem>Windows</SubSystem>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX86</TargetMachine>
-    </Link>
     <PostBuildEvent>
-      <Command>pushd $(ProjectDir)..\Translations\WinMerge
-cscript UpdatePoFilesFromPotFile.vbs
-popd
-mkdir $(OutDir)\Languages\ 2&gt; NUL
+      <Command>mkdir $(OutDir)\Languages\ 2&gt; NUL
 copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
@@ -125,29 +99,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
-      <SubSystem>Windows</SubSystem>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -161,27 +112,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
       <Command>
       </Command>
     </PreBuildEvent>
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX86</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -199,27 +129,6 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <NoEntryPoint>true</NoEntryPoint>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
-      <DataExecutionPrevention>
-      </DataExecutionPrevention>
-      <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
     <PostBuildEvent>
       <Command>pushd $(ProjectDir)..\Translations\WinMerge
 cscript UpdatePoFilesFromPotFile.vbs
@@ -230,27 +139,14 @@ copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Com
   </ItemDefinitionGroup>
   <ItemGroup>
     <CustomBuild Include="Merge.rc">
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
-      <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge
+      <Command>pushd ..\Translations\WinMerge
+
 cscript CreateMasterPotFile.vbs
+cscript UpdatePoFilesFromPotFile.vbs
+popd
 </Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
+      <Outputs>$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
     </CustomBuild>
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs" />
index 49ae388..73cf91a 100644 (file)
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
-      <Filter>Resource FIles</Filter>
-    </ResourceCompile>
-  </ItemGroup>
-  <ItemGroup>
     <CustomBuild Include="Merge.rc">
       <Filter>Resource FIles</Filter>
     </CustomBuild>
index 9824aa3..65b93fb 100644 (file)
@@ -19,7 +19,6 @@ Const ACCELERATORS_BLOCK = 5
 
 Const PATH_ENGLISH_POT = "English.pot"
 Const PATH_MERGE_RC = "../../Src/Merge.rc"
-Const PATH_MERGELANG_RC = "MergeLang.rc"
 
 Dim oFSO, bRunFromCmd, bInsertLineNumbers
 
@@ -48,8 +47,8 @@ Sub Main
   InfoBox "Creating POT file from Merge.rc...", 3
   
   bNecessary = True
-  If (oFSO.FileExists(PATH_ENGLISH_POT) = True) And (oFSO.FileExists(PATH_MERGELANG_RC) = True) Then 'If the POT and RC file exists...
-    bNecessary = GetArchiveBit(PATH_MERGE_RC) Or GetArchiveBit(PATH_ENGLISH_POT) Or GetArchiveBit(PATH_MERGELANG_RC) 'RCs or POT file changed?
+  If (oFSO.FileExists(PATH_ENGLISH_POT) = True) Then 'If the POT file exists...
+    bNecessary = GetArchiveBit(PATH_MERGE_RC) Or GetArchiveBit(PATH_ENGLISH_POT) 'RCs or POT file changed?
   End If
   
   If (bNecessary = True) Then 'If update necessary...
@@ -57,7 +56,6 @@ Sub Main
     CreateMasterPotFile PATH_ENGLISH_POT, oStrings
     SetArchiveBit PATH_MERGE_RC, False
     SetArchiveBit PATH_ENGLISH_POT, False
-    SetArchiveBit PATH_MERGELANG_RC, False
     For Each oFile In oFSO.GetFolder(".").Files 'For all files in the current folder...
       If (LCase(oFSO.GetExtensionName(oFile.Name)) = "po") Then 'If a PO file...
         SetArchiveBit oFile.Path, True
@@ -108,7 +106,7 @@ End Function
 Function GetStringsFromRcFile(ByVal sRcFilePath)
   Dim oBlacklist, oStrings, oString, oRcFile, sLine, iLine, oUIDs
   Dim sRcFileName, iBlockType, sReference, sString, sComment, sContext, oMatch, sTemp, sKey
-  Dim oLcFile, sLcLine, fContinuation
+  Dim fContinuation
 
   Set oBlacklist = GetStringBlacklist("StringBlacklist.txt")
   
@@ -120,10 +118,8 @@ Function GetStringsFromRcFile(ByVal sRcFilePath)
     iLine = 0
     iBlockType = NO_BLOCK
     Set oRcFile = oFSO.OpenTextFile(sRcFilePath, ForReading)
-    Set oLcFile = oFSO.CreateTextFile("MergeLang.rc", True)
     Do Until oRcFile.AtEndOfStream = True 'For all lines...
-      sLcLine = oRcFile.ReadLine
-      sLine = Trim(sLcLine)
+      sLine = Trim(oRcFile.ReadLine)
       iLine = iLine + 1
       
       sReference = sRcFileName & ":" & iLine
@@ -172,11 +168,6 @@ Function GetStringsFromRcFile(ByVal sRcFilePath)
                 sTemp = oMatch.SubMatches(0)
                 If (sTemp <> "") And (oBlacklist.Exists(sTemp) = False) Then 'If NOT blacklisted...
                   sString = Replace(sTemp, """""", "\""")
-                  If bInsertLineNumbers Then
-                    sLcLine = Replace(sLcLine, """" & sTemp & """", """" & sReference & """", 1, 1)
-                  Else
-                    sLcLine = Replace(sLcLine, """" & sTemp & """", """" & sRcFileName & ":" & Hex(GetUniqueId(oUIDs, sString)) & """", 1, 1)
-                  End If
                   If (FoundRegExpMatch(sLine, "//#\. (.*?)$", oMatch) = True) Then 'If found a comment for the translators...
                     sComment = Trim(oMatch.SubMatches(0))
                   ElseIf (FoundRegExpMatch(sLine, "//msgctxt (.*?)$", oMatch) = True) Then 'If found a context for the translation...
@@ -218,7 +209,7 @@ Function GetStringsFromRcFile(ByVal sRcFilePath)
           Else
             oString.References = sReference
           End If
-       End If
+        End If
         oString.Context = sContext
         oString.Id = sString
         oString.Str = ""
@@ -229,12 +220,9 @@ Function GetStringsFromRcFile(ByVal sRcFilePath)
           oStrings.Add sContext & sString, oString
         End If
       End If
-      oLcFile.WriteLine sLcLine
       fContinuation = sLine <> "" And InStr(",|", Right(sLine, 1)) <> 0
     Loop
-    oLcFile.WriteLine "MERGEPOT RCDATA ""English.pot"""
     oRcFile.Close
-    oLcFile.Close
   End If
   Set GetStringsFromRcFile = oStrings
 End Function
index d0df6e7..e00c9a6 100644 (file)
@@ -5,7 +5,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: WinMerge\n"
 "Report-Msgid-Bugs-To: http://bugs.winmerge.org/\n"
-"POT-Creation-Date: 2019-01-07 22:08+0000\n"
+"POT-Creation-Date: 2019-01-14 01:56+0000\n"
 "PO-Revision-Date: \n"
 "Last-Translator: \n"
 "Language-Team: English <winmerge-translate@lists.sourceforge.net>\n"