Unicode port: Unicode version of NSIS can now generate both ANSI & Unicode installers (using new instruction UnicodeInstaller on/off).
Stubs & Plugins differentiation is done automatically using a 'W' suffix. SConscripts need to be reviewed to generate both variants of Plugins & pluginapi.lib under Unicode compilation. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6100 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fbc7cb8fd0
commit
57f7ff8a1c
24 changed files with 376 additions and 112 deletions
|
@ -104,18 +104,43 @@ public:
|
|||
* Get the buffer straight as a const TCHAR pointer. Very unwise to use.
|
||||
* @return m_gr.m_s cast as a TCHAR*.
|
||||
*/
|
||||
const TCHAR *get() const;
|
||||
const TCHAR *get() const { return (const TCHAR*) m_gr.get(); }
|
||||
|
||||
/**
|
||||
* Get the buffer size (number of TCHARs).
|
||||
* @return The buffer size (number of TCHARs).
|
||||
*/
|
||||
int getcount() const;
|
||||
int getcount() const { return m_gr.getlen() / sizeof(TCHAR); }
|
||||
|
||||
private:
|
||||
protected:
|
||||
GrowBuf m_gr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Similar to StringList with case_sensitive=2, but stores strings as both Unicode AND ANSI (codepaged)
|
||||
*/
|
||||
class MLStringList : private StringList
|
||||
{
|
||||
private: // don't copy instances
|
||||
MLStringList(const MLStringList&);
|
||||
void operator=(const MLStringList&);
|
||||
|
||||
public:
|
||||
MLStringList();
|
||||
~MLStringList() {}
|
||||
|
||||
int add(const TCHAR *str, WORD codepage, bool processed, bool build_unicode);
|
||||
int getnum() const { return StringList::getnum(); }
|
||||
int getcount() const { return StringList::getcount(); }
|
||||
const TCHAR *getTchar() const { return (const TCHAR*) m_gr.get(); }
|
||||
#ifdef _UNICODE
|
||||
const char *getAnsi() const { return (const char*) m_grAnsi.get(); }
|
||||
int findAnsi(const char *str, int case_sensitive) const;
|
||||
private:
|
||||
GrowBuf m_grAnsi;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* This class maintains a list of T types in a GrowBuf sorted by T.name which
|
||||
* is assumed to be a string (TCHAR*). So it's really sort of a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue