1 /* 2 * Copyright (C) 2011-2019 Daniel Scharrer 3 * 4 * This software is provided 'as-is', without any express or implied 5 * warranty. In no event will the author(s) be held liable for any damages 6 * arising from the use of this software. 7 * 8 * Permission is granted to anyone to use this software for any purpose, 9 * including commercial applications, and to alter it and redistribute it 10 * freely, subject to the following restrictions: 11 * 12 * 1. The origin of this software must not be misrepresented; you must not 13 * claim that you wrote the original software. If you use this software 14 * in a product, an acknowledgment in the product documentation would be 15 * appreciated but is not required. 16 * 2. Altered source versions must be plainly marked as such, and must not be 17 * misrepresented as being the original software. 18 * 3. This notice may not be removed or altered from any source distribution. 19 */ 20 21 /*! 22 * \file 23 * 24 * Structures for setup types stored in Inno Setup files. 25 */ 26 #ifndef INNOEXTRACT_SETUP_TYPE_HPP 27 #define INNOEXTRACT_SETUP_TYPE_HPP 28 29 #include <string> 30 #include <iosfwd> 31 32 #include <boost/cstdint.hpp> 33 34 #include "setup/windows.hpp" 35 #include "util/enum.hpp" 36 #include "util/flags.hpp" 37 38 namespace setup { 39 40 struct info; 41 42 struct type_entry { 43 44 // introduced in 2.0.0 45 46 enum setup_type { 47 User, 48 DefaultFull, 49 DefaultCompact, 50 DefaultCustom 51 }; 52 53 std::string name; 54 std::string description; 55 std::string languages; 56 std::string check; 57 58 windows_version_range winver; 59 60 bool custom_type; 61 62 setup_type type; 63 64 boost::uint64_t size; 65 66 void load(std::istream & is, const info & i); 67 68 }; 69 70 } // namespace setup 71 72 NAMED_ENUM(setup::type_entry::setup_type) 73 74 #endif // INNOEXTRACT_SETUP_TYPE_HPP 75