Add ManifestSupportedOS attribute
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6265 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b0c40ee3b5
commit
da2fe44184
10 changed files with 139 additions and 15 deletions
|
@ -20,6 +20,7 @@
|
|||
#define ___MANIFEST_H___
|
||||
|
||||
#include "tstring.h"
|
||||
#include "strlist.h"
|
||||
|
||||
namespace manifest
|
||||
{
|
||||
|
@ -37,7 +38,44 @@ namespace manifest
|
|||
exec_level_admin
|
||||
};
|
||||
|
||||
std::string generate(comctl, exec_level);
|
||||
class SupportedOSList
|
||||
{
|
||||
StringList m_list;
|
||||
bool m_isdefaultlist;
|
||||
public:
|
||||
SupportedOSList() : m_isdefaultlist(false) {}
|
||||
|
||||
bool append(const TCHAR* osid);
|
||||
int getcount() const { return m_list.getnum(); }
|
||||
bool isdefaultlist() const { return m_isdefaultlist; }
|
||||
const TCHAR* get(int idx)
|
||||
{
|
||||
int pos = m_list.idx2pos(idx);
|
||||
if (-1 == pos) return 0;
|
||||
return m_list.get() + pos;
|
||||
}
|
||||
void deleteall()
|
||||
{
|
||||
m_list.deleteall();
|
||||
m_isdefaultlist = false;
|
||||
}
|
||||
void addall()
|
||||
{
|
||||
append("WinVista");
|
||||
append("Win7");
|
||||
append("Win8");
|
||||
}
|
||||
void setdefault()
|
||||
{
|
||||
m_list.deleteall();
|
||||
append("Win7");
|
||||
append("Win8");
|
||||
m_isdefaultlist = true;
|
||||
}
|
||||
};
|
||||
|
||||
std::string generate(comctl, exec_level, SupportedOSList&);
|
||||
|
||||
};
|
||||
|
||||
#endif//!___MANIFEST_H___
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue