#pragma once
#include "cmConfigure.h"
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
#include <cm/string_view>
#include "cmCPackGenerator.h"
class cmCPackComponent;
class cmCPackComponentGroup;
class cmCPackNSISGenerator : public cmCPackGenerator
{
public:
cmCPackTypeMacro(cmCPackNSISGenerator, cmCPackGenerator);
static cmCPackGenerator* CreateGenerator64()
{
return new cmCPackNSISGenerator(true);
}
cmCPackNSISGenerator(bool nsis64 = false);
~cmCPackNSISGenerator() override;
protected:
int InitializeInternal() override;
void CreateMenuLinks(std::ostream& str, std::ostream& deleteStr);
int PackageFiles() override;
char const* GetOutputExtension() override { return ".exe"; }
char const* GetOutputPostfix() override { return "win32"; }
bool GetListOfSubdirectories(char const* dir,
std::vector<std::string>& dirs);
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir()
const override;
bool SupportsAbsoluteDestination() const override;
bool SupportsComponentInstallation() const override;
std::string CreateComponentDescription(cmCPackComponent* component,
std::ostream& macrosOut);
std::string CreateSelectionDependenciesDescription(
cmCPackComponent* component, std::set<cmCPackComponent*>& visited);
std::string CreateDeselectionDependenciesDescription(
cmCPackComponent* component, std::set<cmCPackComponent*>& visited);
std::string CreateComponentGroupDescription(cmCPackComponentGroup* group,
std::ostream& macrosOut);
std::string CustomComponentInstallDirectory(cm::string_view componentName);
static std::string TranslateNewlines(std::string str);
bool Nsis64;
};