diff --git a/aegisub/build/BuildTasks/BuildTasks.fs b/aegisub/build/BuildTasks/BuildTasks.fs index 0b14a2ce1..a7ff6658d 100644 --- a/aegisub/build/BuildTasks/BuildTasks.fs +++ b/aegisub/build/BuildTasks/BuildTasks.fs @@ -66,7 +66,7 @@ type ShellWrapper(conf : ITaskItem) = this.UseCommandProcessor <- false this.StandardOutputImportance <- "High" this.EnvironmentVariables <- [| for x in ["CC"; "CPP"; "CFLAGS"; "PATH"; "INCLUDE"; "LIB"] - -> sprintf "%s=%s" <| x <| conf.GetMetadata x |] + -> sprintf "%s=%s" <| x <| conf.GetMetadata(x).Replace("\n", "").Replace(" ", "") |] base.Execute() type ExecShellScript() = diff --git a/aegisub/build/BuildTasks/BuildTasks.fsproj b/aegisub/build/BuildTasks/BuildTasks.fsproj index 91c8d067b..e0242e081 100644 --- a/aegisub/build/BuildTasks/BuildTasks.fsproj +++ b/aegisub/build/BuildTasks/BuildTasks.fsproj @@ -14,6 +14,7 @@ BuildTasks true ..\..\..\ + 4.3.0.0 @@ -40,15 +41,18 @@ 3 - 11 + 12 - + + + True + ..\..\..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll @@ -57,7 +61,6 @@ - @@ -65,4 +68,4 @@ - \ No newline at end of file + diff --git a/aegisub/build/aegisub.props b/aegisub/build/aegisub.props index 76dd08570..b67218f6b 100644 --- a/aegisub/build/aegisub.props +++ b/aegisub/build/aegisub.props @@ -33,7 +33,7 @@ false true Unicode - v110_xp + v120_xp diff --git a/aegisub/build/tasks.props b/aegisub/build/tasks.props index 2258f9a53..7bd4227a2 100644 --- a/aegisub/build/tasks.props +++ b/aegisub/build/tasks.props @@ -8,12 +8,32 @@ cl -nologo - $(MsysBasePath)\bin;$(NativeExecutablePath) - $(MSBuildProjectDirectory);$(AegisubSourceBase)\src\msvc;$(AegisubSourceBase)\include;$(IncludePath) - $(AegisubLibraryDir);$(LibraryPath) $(Configuration) $(Platform) $(MsysBasePath)\bin\sh.exe + + $(MSBuildProjectDirectory); + $(AegisubSourceBase)\src\msvc; + $(AegisubSourceBase)\include; + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include; + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include; + c:\Program Files (x86)\Windows Kits\8.1\Include\um; + c:\Program Files (x86)\Windows Kits\8.1\Include\shared + + $(MsysBasePath)\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin + $(MsysBasePath)\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64 + + $(AegisubLibraryDir); + c:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86; + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib; + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\lib + + + $(AegisubLibraryDir); + c:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64; + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64; + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\lib\amd64 + diff --git a/aegisub/libaegisub/include/libaegisub/util.h b/aegisub/libaegisub/include/libaegisub/util.h index 32b6a56ba..6288a578f 100644 --- a/aegisub/libaegisub/include/libaegisub/util.h +++ b/aegisub/libaegisub/include/libaegisub/util.h @@ -55,20 +55,10 @@ namespace agi { /// @param name New name for the thread void SetThreadName(const char *name); -#ifdef _MSC_VER -#define MAKE_UNIQUE(TEMPLATE_LIST, PADDING_LIST, LIST, COMMA, X1, X2, X3, X4) \ - template \ - inline std::unique_ptr make_unique(LIST(_TYPE_REFREF_ARG)) { \ - return std::unique_ptr(new T(LIST(_FORWARD_ARG))); \ - } - _VARIADIC_EXPAND_0X(MAKE_UNIQUE, , , , ) -#undef MAKE_UNIQUE -#else template std::unique_ptr make_unique(Args&&... args) { return std::unique_ptr(new T(std::forward(args)...)); } -#endif /// A thin wrapper around this_thread::sleep_for that uses std::thread on /// Windows (to avoid having to compile boost.thread) and boost::thread diff --git a/aegisub/libaegisub/windows/fs.cpp b/aegisub/libaegisub/windows/fs.cpp index b0a8d5cdd..5cf84c149 100644 --- a/aegisub/libaegisub/windows/fs.cpp +++ b/aegisub/libaegisub/windows/fs.cpp @@ -30,19 +30,13 @@ using agi::charset::ConvertLocal; #include namespace bfs = boost::filesystem; +#include + #undef CreateDirectory namespace { FINDEX_INFO_LEVELS find_info_level() { - OSVERSIONINFO osvi; - ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&osvi); - - if (osvi.dwMajorVersion > 6 || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 1)) - return FindExInfoBasic; - else - return FindExInfoStandard; + return IsWindowsVistaOrGreater() ? FindExInfoBasic : FindExInfoStandard; } } diff --git a/aegisub/src/audio_player_dsound2.cpp b/aegisub/src/audio_player_dsound2.cpp index 231ef1046..9dc495f3d 100644 --- a/aegisub/src/audio_player_dsound2.cpp +++ b/aegisub/src/audio_player_dsound2.cpp @@ -812,7 +812,7 @@ bool DirectSoundPlayer2::IsThreadAlive() thread.reset(); } - return thread; + return !!thread; } void DirectSoundPlayer2::Play(int64_t start,int64_t count) diff --git a/aegisub/src/ffmpegsource_common.cpp b/aegisub/src/ffmpegsource_common.cpp index 90a788a50..868b1e7b5 100644 --- a/aegisub/src/ffmpegsource_common.cpp +++ b/aegisub/src/ffmpegsource_common.cpp @@ -108,14 +108,14 @@ FFMS_Index *FFmpegSourceProvider::DoIndexing(FFMS_Indexer *Indexer, agi::fs::pat int calls; }; progress state = { ps, 0 }; - Index = FFMS_DoIndexing(Indexer, Trackmask, FFMS_TRACKMASK_NONE, nullptr, nullptr, IndexEH, - static_cast([](int64_t Current, int64_t Total, void *Private) -> int { - auto state = static_cast(Private); - if (++state->calls % 10 == 0) - state->ps->SetProgress(Current, Total); - return state->ps->IsCancelled(); - }), - &state, &ErrInfo); + TIndexCallback callback = [](int64_t Current, int64_t Total, void *Private) -> int { + auto state = static_cast(Private); + if (++state->calls % 10 == 0) + state->ps->SetProgress(Current, Total); + return state->ps->IsCancelled(); + }; + Index = FFMS_DoIndexing(Indexer, Trackmask, FFMS_TRACKMASK_NONE, + nullptr, nullptr, IndexEH, callback, &state, &ErrInfo); }); if (Index == nullptr) { diff --git a/deps/boost b/deps/boost index 55e528420..f866ff6fe 160000 --- a/deps/boost +++ b/deps/boost @@ -1 +1 @@ -Subproject commit 55e528420dcc2cef01ca17f1d51d349debcc9b81 +Subproject commit f866ff6fea187a5c9ad80895f078dec577cdc304