2014-02-25 02:21:12 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
2015-02-21 14:38:14 +03:00
|
|
|
Copyright 2014-2015 Kitware, Inc.
|
2014-02-25 02:21:12 +04:00
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
bool EmitShortcuts(
|
|
|
|
Type type,
|
|
|
|
std::string const& registryKey,
|
|
|
|
std::string const& cpackComponentName,
|
|
|
|
cmWIXFilesSourceWriter& fileDefinitions) const;
|
|
|
|
|
|
|
|
void AddShortcutTypes(std::set<Type>& types);
|
|
|
|
|
2015-02-21 19:30:31 +03:00
|
|
|
void CreateFromProperties(std::string const& id,
|
|
|
|
std::string const& directoryId, cmInstalledFile const& installedFile);
|
|
|
|
|
2015-02-21 14:38:14 +03:00
|
|
|
private:
|
|
|
|
typedef std::map<Type, shortcut_id_map_t> shortcut_type_map_t;
|
|
|
|
|
2015-02-21 19:30:31 +03:00
|
|
|
void CreateFromProperty(
|
|
|
|
std::string const& propertyName,
|
|
|
|
Type type,
|
|
|
|
std::string const& id,
|
|
|
|
std::string const& directoryId,
|
|
|
|
cmInstalledFile const& installedFile);
|
|
|
|
|
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
|