''
' This script creates the master POT file (English.pot).
'
-' Copyright (C) 2007 by Tim Gerundt
+' Copyright (C) 2007-2009 by Tim Gerundt
' Released under the "GNU General Public License"
'
' ID line follows -- this is updated by SVN
Const VERSIONINFO_BLOCK = 4
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
Set oFSO = CreateObject("Scripting.FileSystemObject")
InfoBox "Creating POT file from Merge.rc...", 3
bNecessary = True
- If (oFSO.FileExists("English.pot") = True) And (oFSO.FileExists("MergeLang.rc") = True) Then 'If the POT and RC file exists...
- bNecessary = GetArchiveBit("../../Src/Merge.rc") Or GetArchiveBit("English.pot") Or GetArchiveBit("MergeLang.rc") 'RCs or POT file changed?
+ 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?
End If
If (bNecessary = True) Then 'If update necessary...
- Set oStrings = GetStringsFromRcFile("../../Src/Merge.rc", sCodePage)
- CreateMasterPotFile "English.pot", oStrings, sCodePage
- SetArchiveBit "../../Src/Merge.rc", False
- SetArchiveBit "English.pot", False
- SetArchiveBit "MergeLang.rc", False
+ Set oStrings = GetStringsFromRcFile(PATH_MERGE_RC, sCodePage)
+ CreateMasterPotFile PATH_ENGLISH_POT, oStrings, sCodePage
+ 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