Skip to content

Commit

Permalink
Add VS2019 cli only solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
scamille committed May 5, 2019
1 parent 670d883 commit 9abb913
Show file tree
Hide file tree
Showing 9 changed files with 592 additions and 15 deletions.
6 changes: 3 additions & 3 deletions engine/player/sc_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5000,7 +5000,7 @@ void player_t::schedule_ready( timespan_t delta_time, bool waiting )
{
if ( readying )
{
std::runtime_error(fmt::format("{} scheduled ready while already ready.", *this ));
throw std::runtime_error(fmt::format("{} scheduled ready while already ready.", *this ));
}
action_t* was_executing = ( channeling ? channeling : executing );

Expand Down Expand Up @@ -6459,7 +6459,7 @@ void player_t::target_mitigation( school_e school, dmg_e dmg_type, action_state_
double pre_block_amount = s->result_amount;

// In BfA, Block and Crit Block work in the same manner as armor and are affected by the same cap
if ( s -> block_result == BLOCK_RESULT_BLOCKED || s -> block_result == BLOCK_RESULT_CRIT_BLOCKED )
if ( s ->action && (s -> block_result == BLOCK_RESULT_BLOCKED || s -> block_result == BLOCK_RESULT_CRIT_BLOCKED ))
{
double block_reduction = composite_block_reduction( s );

Expand Down Expand Up @@ -8800,7 +8800,7 @@ void player_t::parse_talents_numbers( const std::string& talent_string )
char c = talent_string[ i ];
if ( c < '0' || c > ( '0' + MAX_TALENT_COLS ) )
{
std::runtime_error(fmt::format("Illegal character '{}' in talent encoding.", c ));
throw std::runtime_error(fmt::format("Illegal character '{}' in talent encoding.", c ));
}
if ( c > '0' )
talent_points.select_row_col( i, c - '1' );
Expand Down
4 changes: 2 additions & 2 deletions engine/player/sc_unique_gear_x7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1971,8 +1971,8 @@ struct vigor_engaged_t : public special_effect_t
{
// Initialize max oscillations from spell data, buff-adjusting phases are -1 ticks, since the
// transition event itself adjusts the buff stack count by one (up or down)
max_ticks[ ASCENDING ] = max_ticks[ DESCENDING ] = driver()->effectN( 2 ).base_value() - 1;
max_ticks[ MAX_STACK ] = max_ticks[ INACTIVE ] = driver()->effectN( 3 ).base_value();
max_ticks[ ASCENDING ] = max_ticks[ DESCENDING ] = as<int>(driver()->effectN( 2 ).base_value() - 1);
max_ticks[ MAX_STACK ] = max_ticks[ INACTIVE ] = as<int>(driver()->effectN( 3 ).base_value());

vigor_buff = ::create_buff<stat_buff_t>( effect.player, "vigor_engaged",
effect.player->find_spell( 287916 ), effect.item );
Expand Down
7 changes: 4 additions & 3 deletions engine/report/sc_report_html_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "data/report_data.inc"
#include "interfaces/sc_js.hpp"
#include "util/git_info.hpp"
#include "fmt/time.h"

namespace
{ // UNNAMED NAMESPACE ==========================================
Expand Down Expand Up @@ -1078,11 +1079,11 @@ void print_html_masthead( report::sc_html_stream& os, const sim_t& sim )
sim.dbc.wow_version(), type, sim.dbc.build_level(), commit_link.c_str(), git_info::revision());
}

time_t rawtime;
time( &rawtime );
std::time_t rawtime = std::time(nullptr);
const tm localtime = fmt::localtime( rawtime );

os << "<ul class=\"params\">\n";
os.printf( "<li><b>Timestamp:</b> %s</li>\n", ctime( &rawtime ) );
os.format( "<li><b>Timestamp:</b> {:%c}</li>\n", localtime);
os.printf( "<li><b>Iterations:</b> %d</li>\n", sim.iterations );

if ( sim.vary_combat_length > 0.0 )
Expand Down
2 changes: 1 addition & 1 deletion engine/report/sc_report_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ void print_iteration_data( std::ostream& os, const sim_t& sim )
void sim_summary_performance( std::ostream& os, sim_t* sim )
{
std::time_t cur_time = std::time( nullptr );
auto date_str = fmt::format("{:%Y-%m-%d %H:%M:%S%z}", *std::localtime(&cur_time) );
auto date_str = fmt::format("{:%Y-%m-%d %H:%M:%S%z}", fmt::localtime(cur_time) );

std::stringstream iterations_str;
if ( sim -> threads > 1 )
Expand Down
10 changes: 7 additions & 3 deletions engine/sc_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,20 @@ std::string get_cache_directory()
}
#endif
#ifdef _WIN32
env = getenv( "TMP" );
#pragma warning( push )
// Disable security warning
#pragma warning( disable : 4996 )
env = std::getenv( "TMP" );
if ( !env )
{
env = getenv( "TEMP" );
env = std::getenv( "TEMP" );
if ( ! env )
{
env = getenv( "HOME" );
env = std::getenv( "HOME" );
}
}
s = std::string( env );
#pragma warning( pop )
#endif

return s;
Expand Down
31 changes: 31 additions & 0 deletions simc_vs2019.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.202
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simc_vs2019", "vs\simc_vs2019.vcxproj", "{3347E740-6831-4441-A559-481FD127156F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug-NoNetworking|x64 = Debug-NoNetworking|x64
Release|x64 = Release|x64
Release-NoNetworking|x64 = Release-NoNetworking|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3347E740-6831-4441-A559-481FD127156F}.Debug|x64.ActiveCfg = Debug|x64
{3347E740-6831-4441-A559-481FD127156F}.Debug|x64.Build.0 = Debug|x64
{3347E740-6831-4441-A559-481FD127156F}.Debug-NoNetworking|x64.ActiveCfg = Debug-NoNetworking|x64
{3347E740-6831-4441-A559-481FD127156F}.Debug-NoNetworking|x64.Build.0 = Debug-NoNetworking|x64
{3347E740-6831-4441-A559-481FD127156F}.Release|x64.ActiveCfg = Release|x64
{3347E740-6831-4441-A559-481FD127156F}.Release|x64.Build.0 = Release|x64
{3347E740-6831-4441-A559-481FD127156F}.Release-NoNetworking|x64.ActiveCfg = Release-NoNetworking|x64
{3347E740-6831-4441-A559-481FD127156F}.Release-NoNetworking|x64.Build.0 = Release-NoNetworking|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7590735D-AF0B-40E3-895D-DFA3DB12AAF3}
EndGlobalSection
EndGlobal
4 changes: 1 addition & 3 deletions vs/CommonIncludeDirectories.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)vs;$(SolutionDir)vs\msinttypes;$(SolutionDir)engine;$(SolutionDir)engine/util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)engine;$(SolutionDir)engine/util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
Expand Down
144 changes: 144 additions & 0 deletions vs/simc_vs2019.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug-NoNetworking|x64">
<Configuration>Debug-NoNetworking</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-NoNetworking|x64">
<Configuration>Release-NoNetworking</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{3347E740-6831-4441-A559-481FD127156F}</ProjectGuid>
<RootNamespace>simc</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-NoNetworking|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-NoNetworking|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-NoNetworking|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-NoNetworking|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>26495;26451</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-NoNetworking|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);SC_NO_NETWORKING</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>26495;26451</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>26495;26451</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-NoNetworking|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);SC_NO_NETWORKING</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>26495;26451</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
</ItemGroup>
<Import Project="PrecompiledHeaders.props" />
<Import Project="CommonIncludeDirectories.props" />
<Import Project="..\source_files\VS_engine.props" />
<Import Project="..\source_files\VS_engine_main.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Loading

0 comments on commit 9abb913

Please sign in to comment.