2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2015-02-21 14:38:14 +03:00
|
|
|
#ifndef cmWIXShortcut_h
|
|
|
|
#define cmWIXShortcut_h
|
2014-02-25 02:21:12 +04:00
|
|
|
|
2016-04-29 16:40:20 +03:00
|
|
|
#include <cmInstalledFile.h>
|
|
|
|
|
2015-02-21 14:38:14 +03:00
|
|
|
#include <map>
|
|
|
|
#include <set>
|
2016-04-29 17:53:13 +03:00
|
|
|
#include <string>
|
2015-02-21 14:38:14 +03:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class cmWIXFilesSourceWriter;
|
2014-02-25 02:21:12 +04:00
|
|
|
|
|
|
|
struct cmWIXShortcut
|
|
|
|
{
|
2015-02-21 14:38:14 +03:00
|
|
|
std::string label;
|
2014-02-25 02:21:12 +04:00
|
|
|
std::string workingDirectoryId;
|
2015-02-21 14:38:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
class cmWIXShortcuts
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
START_MENU,
|
2015-02-21 20:07:36 +03:00
|
|
|
DESKTOP,
|
|
|
|
STARTUP
|
2015-02-21 14:38:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::vector<cmWIXShortcut> shortcut_list_t;
|
|
|
|
typedef std::map<std::string, shortcut_list_t> shortcut_id_map_t;
|
|
|
|
|
|
|
|
void insert(Type type, std::string const& id, cmWIXShortcut const& shortcut);
|
|
|
|
|
|
|
|
bool empty(Type type) const;
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
bool EmitShortcuts(Type type, std::string const& registryKey,
|
|
|
|
std::string const& cpackComponentName,
|
|
|
|
cmWIXFilesSourceWriter& fileDefinitions) const;
|
2015-02-21 14:38:14 +03:00
|
|
|
|
|
|
|
void AddShortcutTypes(std::set<Type>& types);
|
|
|
|
|
2015-02-21 19:30:31 +03:00
|
|
|
void CreateFromProperties(std::string const& id,
|
2016-05-16 17:34:04 +03:00
|
|
|
std::string const& directoryId,
|
|
|
|
cmInstalledFile const& installedFile);
|
2015-02-21 19:30:31 +03:00
|
|
|
|
2015-02-21 14:38:14 +03:00
|
|
|
private:
|
|
|
|
typedef std::map<Type, shortcut_id_map_t> shortcut_type_map_t;
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
void CreateFromProperty(std::string const& propertyName, Type type,
|
|
|
|
std::string const& id,
|
|
|
|
std::string const& directoryId,
|
|
|
|
cmInstalledFile const& installedFile);
|
2015-02-21 19:30:31 +03:00
|
|
|
|
2015-02-21 14:38:14 +03:00
|
|
|
shortcut_type_map_t Shortcuts;
|
|
|
|
shortcut_id_map_t EmptyIdMap;
|
2014-02-25 02:21:12 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|