Update to Visual Studio 2015
This commit is contained in:
parent
017bbe1e59
commit
4366e59353
12 changed files with 9 additions and 85 deletions
|
@ -12,9 +12,9 @@ Support is available on [the forums](http://forum.aegisub.org) or [on IRC](irc:/
|
||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
1. Visual Studio 2013 (Express edition is good enough) or the Windows 8.1 SDK (command line builds only).
|
1. Visual Studio 2015 (the freee Community edition is good enough)
|
||||||
2. A recent DirectX SDK
|
2. The June 2010 DirectX SDK (the final release before DirectSound was dropped)
|
||||||
4. [Yasm](http://yasm.tortall.net/) installed to somewhere on your path.
|
3. [Yasm](http://yasm.tortall.net/) installed to somewhere on your path.
|
||||||
|
|
||||||
There are a few optional dependencies:
|
There are a few optional dependencies:
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'" >true</WholeProgramOptimization>
|
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'" >true</WholeProgramOptimization>
|
||||||
<CharacterSet >Unicode</CharacterSet>
|
<CharacterSet >Unicode</CharacterSet>
|
||||||
<CharacterSet Condition="'$(AegisubMBCS)'=='true'" >MultiByte</CharacterSet>
|
<CharacterSet Condition="'$(AegisubMBCS)'=='true'" >MultiByte</CharacterSet>
|
||||||
<PlatformToolset >v120_xp</PlatformToolset>
|
<PlatformToolset >v140_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
|
$(WindowsSDK_IncludePath);
|
||||||
$(SrcDir);
|
$(SrcDir);
|
||||||
$(SrcDir)include;
|
$(SrcDir)include;
|
||||||
%(AdditionalIncludeDirectories)
|
%(AdditionalIncludeDirectories)
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<AdditionalIncludeDirectories>$(SrcDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SrcDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>wx/wxprec.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>wx/wxprec.h</PrecompiledHeaderFile>
|
||||||
|
<AdditionalOptions>/Zm150 %(AdditionalOptions)</AdditionalOptions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<InstallHeader>
|
<InstallHeader>
|
||||||
<HeaderRoot>$(SrcDir)include</HeaderRoot>
|
<HeaderRoot>$(SrcDir)include</HeaderRoot>
|
||||||
|
|
|
@ -56,7 +56,7 @@ Save::Save(fs::path const& file, bool binary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Save::~Save() {
|
Save::~Save() noexcept(false) {
|
||||||
fp.reset(); // Need to close before rename on Windows to unlock the file
|
fp.reset(); // Need to close before rename on Windows to unlock the file
|
||||||
for (int i = 0; i < 10; ++i) {
|
for (int i = 0; i < 10; ++i) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Save {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Save(fs::path const& file, bool binary = false);
|
Save(fs::path const& file, bool binary = false);
|
||||||
~Save();
|
~Save() noexcept(false);
|
||||||
std::ostream& Get() { return *fp; }
|
std::ostream& Get() { return *fp; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,14 +43,10 @@ public:
|
||||||
|
|
||||||
line_iterator_base() = default;
|
line_iterator_base() = default;
|
||||||
line_iterator_base(line_iterator_base const&) = default;
|
line_iterator_base(line_iterator_base const&) = default;
|
||||||
#ifndef _MSC_VER
|
|
||||||
line_iterator_base(line_iterator_base&&) = default;
|
line_iterator_base(line_iterator_base&&) = default;
|
||||||
#endif
|
|
||||||
|
|
||||||
line_iterator_base& operator=(line_iterator_base const&) = default;
|
line_iterator_base& operator=(line_iterator_base const&) = default;
|
||||||
#ifndef _MSC_VER
|
|
||||||
line_iterator_base& operator=(line_iterator_base&&) = default;
|
line_iterator_base& operator=(line_iterator_base&&) = default;
|
||||||
#endif
|
|
||||||
|
|
||||||
bool operator==(line_iterator_base const& rgt) const { return stream == rgt.stream; }
|
bool operator==(line_iterator_base const& rgt) const { return stream == rgt.stream; }
|
||||||
bool operator!=(line_iterator_base const& rgt) const { return !operator==(rgt); }
|
bool operator!=(line_iterator_base const& rgt) const { return !operator==(rgt); }
|
||||||
|
|
|
@ -52,27 +52,7 @@ AssOverrideParameter::AssOverrideParameter(VariableDataType type, AssParameterCl
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
AssOverrideParameter::~AssOverrideParameter() = default;
|
||||||
AssOverrideParameter::AssOverrideParameter(AssOverrideParameter&& o)
|
|
||||||
: value(std::move(o.value))
|
|
||||||
, block(std::move(o.block))
|
|
||||||
, type(o.type)
|
|
||||||
, classification(o.classification)
|
|
||||||
, omitted(o.omitted)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
AssOverrideParameter& AssOverrideParameter::operator=(AssOverrideParameter&& rhs) {
|
|
||||||
value = std::move(rhs.value);
|
|
||||||
block = std::move(rhs.block);
|
|
||||||
type = rhs.type;
|
|
||||||
classification = rhs.classification;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AssOverrideParameter::~AssOverrideParameter() {
|
|
||||||
}
|
|
||||||
|
|
||||||
template<> std::string AssOverrideParameter::Get<std::string>() const {
|
template<> std::string AssOverrideParameter::Get<std::string>() const {
|
||||||
if (omitted) throw agi::InternalError("AssOverrideParameter::Get() called on omitted parameter");
|
if (omitted) throw agi::InternalError("AssOverrideParameter::Get() called on omitted parameter");
|
||||||
|
@ -454,22 +434,6 @@ AssOverrideTag::AssOverrideTag(std::string const& text) {
|
||||||
SetText(text);
|
SetText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
AssOverrideTag::AssOverrideTag(AssOverrideTag&& rhs)
|
|
||||||
: valid(rhs.valid)
|
|
||||||
, Name(std::move(rhs.Name))
|
|
||||||
, Params(std::move(rhs.Params))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
AssOverrideTag& AssOverrideTag::operator=(AssOverrideTag&& rhs) {
|
|
||||||
valid = rhs.valid;
|
|
||||||
Name = std::move(rhs.Name);
|
|
||||||
Params = std::move(rhs.Params);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void AssOverrideTag::Clear() {
|
void AssOverrideTag::Clear() {
|
||||||
Params.clear();
|
Params.clear();
|
||||||
Params.reserve(6);
|
Params.reserve(6);
|
||||||
|
|
|
@ -69,13 +69,8 @@ class AssOverrideParameter {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AssOverrideParameter(VariableDataType type, AssParameterClass classification);
|
AssOverrideParameter(VariableDataType type, AssParameterClass classification);
|
||||||
#ifdef _MSC_VER
|
|
||||||
AssOverrideParameter(AssOverrideParameter&&);
|
|
||||||
AssOverrideParameter& operator=(AssOverrideParameter&&);
|
|
||||||
#else
|
|
||||||
AssOverrideParameter(AssOverrideParameter&&) = default;
|
AssOverrideParameter(AssOverrideParameter&&) = default;
|
||||||
AssOverrideParameter& operator=(AssOverrideParameter&&) = default;
|
AssOverrideParameter& operator=(AssOverrideParameter&&) = default;
|
||||||
#endif
|
|
||||||
~AssOverrideParameter();
|
~AssOverrideParameter();
|
||||||
|
|
||||||
/// Type of parameter
|
/// Type of parameter
|
||||||
|
@ -98,13 +93,8 @@ class AssOverrideTag {
|
||||||
public:
|
public:
|
||||||
AssOverrideTag() = default;
|
AssOverrideTag() = default;
|
||||||
AssOverrideTag(std::string const& text);
|
AssOverrideTag(std::string const& text);
|
||||||
#ifdef _MSC_VER
|
|
||||||
AssOverrideTag(AssOverrideTag&&);
|
|
||||||
AssOverrideTag& operator=(AssOverrideTag&&);
|
|
||||||
#else
|
|
||||||
AssOverrideTag(AssOverrideTag&&) = default;
|
AssOverrideTag(AssOverrideTag&&) = default;
|
||||||
AssOverrideTag& operator=(AssOverrideTag&&) = default;
|
AssOverrideTag& operator=(AssOverrideTag&&) = default;
|
||||||
#endif
|
|
||||||
|
|
||||||
std::string Name;
|
std::string Name;
|
||||||
std::vector<AssOverrideParameter> Params;
|
std::vector<AssOverrideParameter> Params;
|
||||||
|
|
|
@ -54,16 +54,6 @@ class DataBlockCache {
|
||||||
|
|
||||||
/// The blocks contained in the macroblock
|
/// The blocks contained in the macroblock
|
||||||
BlockArray blocks;
|
BlockArray blocks;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
MacroBlock() = default;
|
|
||||||
MacroBlock(MacroBlock&& rgt) : position(rgt.position), blocks(std::move(rgt.blocks)) { }
|
|
||||||
MacroBlock& operator=(MacroBlock&& rgt) {
|
|
||||||
position = rgt.position;
|
|
||||||
blocks = std::move(rgt.blocks);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Type of an array of macro blocks
|
/// Type of an array of macro blocks
|
||||||
|
@ -105,17 +95,6 @@ class DataBlockCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifdef _MSC_VER
|
|
||||||
DataBlockCache(DataBlockCache&& rgt)
|
|
||||||
: data(std::move(rgt.data))
|
|
||||||
, age(std::move(rgt.age))
|
|
||||||
, macroblock_size(rgt.macroblock_size)
|
|
||||||
, macroblock_index_mask(rgt.macroblock_index_mask)
|
|
||||||
, size(rgt.size)
|
|
||||||
, factory(std::move(rgt.factory))
|
|
||||||
{ }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
/// @param block_count Total number of blocks the cache will manage
|
/// @param block_count Total number of blocks the cache will manage
|
||||||
/// @param factory Factory object to use for producing blocks
|
/// @param factory Factory object to use for producing blocks
|
||||||
|
|
|
@ -164,11 +164,7 @@ struct parsed_line {
|
||||||
std::vector<std::unique_ptr<AssDialogueBlock>> blocks;
|
std::vector<std::unique_ptr<AssDialogueBlock>> blocks;
|
||||||
|
|
||||||
parsed_line(AssDialogue *line) : line(line), blocks(line->ParseTags()) { }
|
parsed_line(AssDialogue *line) : line(line), blocks(line->ParseTags()) { }
|
||||||
#ifdef _MSC_VER
|
|
||||||
parsed_line(parsed_line&& r) : line(r.line), blocks(std::move(r.blocks)) { }
|
|
||||||
#else
|
|
||||||
parsed_line(parsed_line&& r) = default;
|
parsed_line(parsed_line&& r) = default;
|
||||||
#endif
|
|
||||||
|
|
||||||
const AssOverrideTag *find_tag(int blockn, std::string const& tag_name, std::string const& alt) const {
|
const AssOverrideTag *find_tag(int blockn, std::string const& tag_name, std::string const& alt) const {
|
||||||
for (auto ovr : blocks | sliced(0, blockn + 1) | reversed | agi::of_type<AssDialogueBlockOverride>()) {
|
for (auto ovr : blocks | sliced(0, blockn + 1) | reversed | agi::of_type<AssDialogueBlockOverride>()) {
|
||||||
|
|
|
@ -526,9 +526,6 @@ namespace
|
||||||
return tti;
|
return tti;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define vsnprintf _vsnprintf
|
|
||||||
#endif
|
|
||||||
void fieldprintf(char *field, size_t fieldlen, const char *format, ...)
|
void fieldprintf(char *field, size_t fieldlen, const char *format, ...)
|
||||||
{
|
{
|
||||||
char buf[16];
|
char buf[16];
|
||||||
|
|
Loading…
Reference in a new issue