NSIS/Source/manifest.h
anders_k 7cc150c464 MakeNSIS can now generate Unicode or Ansi installers based on a script attribute. SCons generates both Ansi and Unicode stubs and plugins.
The official plugins are now stored in architecture specific subdirectories under NSIS\Plugins. !AddPluginDir also gained a new (optional) architecture flag because MakeNSIS now stores separate plugin information for each target architecture. Storing plugins in the root of the Plugins directory is no longer supported.

MinGW does not implement the unicode CRT startup functions so the entry point functions and linker parameters had to be changed. The unicode tools use the ansi entry point and a small helper function that calls into the real code: _tmain has full argc+argv emulation while wWinMain does not pass the command line parameters. The stubs do not use any CRT functions and have no CRT or unicode helper code, they call our entry point directly.



git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6269 212acab6-be3b-0410-9dea-997c60f758d6
2012-10-13 01:47:50 +00:00

88 lines
1.7 KiB
C++

/*
* manifest.h
*
* This file is a part of NSIS.
*
* Copyright (C) 1999-2009 Nullsoft and Contributors
*
* Licensed under the zlib/libpng license (the "License");
* you may not use this file except in compliance with the License.
*
* Licence details can be found in the file COPYING.
*
* This software is provided 'as-is', without any express or implied
* warranty.
*
* Reviewed for Unicode support by Jim Park -- 08/22/2007
*/
#ifndef ___MANIFEST_H___
#define ___MANIFEST_H___
#include "tstring.h"
#include "strlist.h"
namespace manifest
{
enum comctl
{
comctl_old,
comctl_xp
};
enum exec_level
{
exec_level_none,
exec_level_user,
exec_level_highest,
exec_level_admin
};
enum dpiaware
{
dpiaware_notset,
dpiaware_false,
dpiaware_true,
};
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(_T("WinVista"));
append(_T("Win7"));
append(_T("Win8"));
}
void setdefault()
{
m_list.deleteall();
append(_T("Win7"));
append(_T("Win8"));
m_isdefaultlist = true;
}
};
std::string generate(comctl, exec_level, dpiaware, SupportedOSList&);
};
#endif//!___MANIFEST_H___