WORD->LANGID
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1593 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fd8040478f
commit
6e237675ed
5 changed files with 16 additions and 16 deletions
|
@ -106,7 +106,7 @@ CResourceEditor::~CResourceEditor() {
|
||||||
|
|
||||||
// Adds/Replaces/Removes a resource.
|
// Adds/Replaces/Removes a resource.
|
||||||
// If lpData is 0 UpdateResource removes the resource.
|
// If lpData is 0 UpdateResource removes the resource.
|
||||||
void CResourceEditor::UpdateResource(char* szType, char* szName, WORD wLanguage, BYTE* lpData, DWORD dwSize) {
|
void CResourceEditor::UpdateResource(char* szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
|
||||||
CResourceDirectory* nameDir = 0;
|
CResourceDirectory* nameDir = 0;
|
||||||
CResourceDirectory* langDir = 0;
|
CResourceDirectory* langDir = 0;
|
||||||
CResourceDataEntry* data = 0;
|
CResourceDataEntry* data = 0;
|
||||||
|
@ -168,21 +168,21 @@ void CResourceEditor::UpdateResource(char* szType, char* szName, WORD wLanguage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CResourceEditor::UpdateResource(WORD szType, char* szName, WORD wLanguage, BYTE* lpData, DWORD dwSize) {
|
void CResourceEditor::UpdateResource(WORD szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
|
||||||
UpdateResource(MAKEINTRESOURCE(szType), szName, wLanguage, lpData, dwSize);
|
UpdateResource(MAKEINTRESOURCE(szType), szName, wLanguage, lpData, dwSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CResourceEditor::UpdateResource(char* szType, WORD szName, WORD wLanguage, BYTE* lpData, DWORD dwSize) {
|
void CResourceEditor::UpdateResource(char* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
|
||||||
UpdateResource(szType, MAKEINTRESOURCE(szName), wLanguage, lpData, dwSize);
|
UpdateResource(szType, MAKEINTRESOURCE(szName), wLanguage, lpData, dwSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CResourceEditor::UpdateResource(WORD szType, WORD szName, WORD wLanguage, BYTE* lpData, DWORD dwSize) {
|
void CResourceEditor::UpdateResource(WORD szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
|
||||||
UpdateResource(MAKEINTRESOURCE(szType), MAKEINTRESOURCE(szName), wLanguage, lpData, dwSize);
|
UpdateResource(MAKEINTRESOURCE(szType), MAKEINTRESOURCE(szName), wLanguage, lpData, dwSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a copy of the resource requested
|
// Returns a copy of the resource requested
|
||||||
// Returns 0 if resource can't be found
|
// Returns 0 if resource can't be found
|
||||||
BYTE* CResourceEditor::GetResource(char* szType, char* szName, WORD wLanguage) {
|
BYTE* CResourceEditor::GetResource(char* szType, char* szName, LANGID wLanguage) {
|
||||||
CResourceDirectory* nameDir = 0;
|
CResourceDirectory* nameDir = 0;
|
||||||
CResourceDirectory* langDir = 0;
|
CResourceDirectory* langDir = 0;
|
||||||
CResourceDataEntry* data = 0;
|
CResourceDataEntry* data = 0;
|
||||||
|
|
|
@ -62,11 +62,11 @@ public:
|
||||||
CResourceEditor(BYTE* pbPE, int iSize);
|
CResourceEditor(BYTE* pbPE, int iSize);
|
||||||
virtual ~CResourceEditor();
|
virtual ~CResourceEditor();
|
||||||
|
|
||||||
void UpdateResource(char* szType, char* szName, WORD wLanguage, BYTE* lpData, DWORD dwSize);
|
void UpdateResource(char* szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
|
||||||
void UpdateResource(WORD szType, char* szName, WORD wLanguage, BYTE* lpData, DWORD dwSize);
|
void UpdateResource(WORD szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
|
||||||
void UpdateResource(char* szType, WORD szName, WORD wLanguage, BYTE* lpData, DWORD dwSize);
|
void UpdateResource(char* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
|
||||||
void UpdateResource(WORD szType, WORD szName, WORD wLanguage, BYTE* lpData, DWORD dwSize);
|
void UpdateResource(WORD szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
|
||||||
BYTE* GetResource(char* szType, char* szName, WORD wLanguage);
|
BYTE* GetResource(char* szType, char* szName, LANGID wLanguage);
|
||||||
|
|
||||||
BYTE* Save(DWORD &dwSize);
|
BYTE* Save(DWORD &dwSize);
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ class CEXEBuild {
|
||||||
|
|
||||||
// lang.cpp by Amir Szekely 3rd August 2002
|
// lang.cpp by Amir Szekely 3rd August 2002
|
||||||
StringTable *GetTable(LANGID &lang);
|
StringTable *GetTable(LANGID &lang);
|
||||||
int SetString(char *string, int id, int process, WORD lang=0);
|
int SetString(char *string, int id, int process, LANGID lang=0);
|
||||||
int SetString(char *string, int id, int process, StringTable *table);
|
int SetString(char *string, int id, int process, StringTable *table);
|
||||||
int SetUserString(char *name, LANGID lang, char *string, int process=1);
|
int SetUserString(char *name, LANGID lang, char *string, int process=1);
|
||||||
int WriteStringTables();
|
int WriteStringTables();
|
||||||
|
@ -146,7 +146,7 @@ class CEXEBuild {
|
||||||
#define IsNotSet(s) _IsNotSet(string_tables.size()?&(string_tables[0]->s):0)
|
#define IsNotSet(s) _IsNotSet(string_tables.size()?&(string_tables[0]->s):0)
|
||||||
bool _IsNotSet(int *str); // Checks if a string is not set in all of the string tables
|
bool _IsNotSet(int *str); // Checks if a string is not set in all of the string tables
|
||||||
#define IsSet(s,lang) _IsSet(string_tables.size()?&(string_tables[0]->s):0,lang)
|
#define IsSet(s,lang) _IsSet(string_tables.size()?&(string_tables[0]->s):0,lang)
|
||||||
bool _IsSet(int *str, WORD lang); // Checks if a string is set in a given string table
|
bool _IsSet(int *str, LANGID lang); // Checks if a string is set in a given string table
|
||||||
|
|
||||||
// a whole bunch O data.
|
// a whole bunch O data.
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ int CEXEBuild::SetUserString(char *name, LANGID lang, char *string, int process/
|
||||||
return PS_OK;
|
return PS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CEXEBuild::_IsSet(int *str, WORD lang) {
|
bool CEXEBuild::_IsSet(int *str, LANGID lang) {
|
||||||
if (!str) return false;
|
if (!str) return false;
|
||||||
lang = lang?lang:build_nlfs.size()?build_nlfs[build_nlfs.size()-1]->GetLang():0;
|
lang = lang?lang:build_nlfs.size()?build_nlfs[build_nlfs.size()-1]->GetLang():0;
|
||||||
lang = lang?lang:string_tables.size()?string_tables[0]->lang_id:1033; // Default is English (1033)
|
lang = lang?lang:string_tables.size()?string_tables[0]->lang_id:1033; // Default is English (1033)
|
||||||
|
@ -628,7 +628,7 @@ NLF::~NLF() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WORD NLF::GetLang() {
|
LANGID NLF::GetLang() {
|
||||||
return m_wLangId;
|
return m_wLangId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,11 +95,11 @@ class NLF {
|
||||||
NLF(char *filename);
|
NLF(char *filename);
|
||||||
~NLF();
|
~NLF();
|
||||||
|
|
||||||
WORD GetLang();
|
LANGID GetLang();
|
||||||
char* GetString(int idx);
|
char* GetString(int idx);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WORD m_wLangId;
|
LANGID m_wLangId;
|
||||||
char *m_szStrings[NLF_STRINGS];
|
char *m_szStrings[NLF_STRINGS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue