diff --git a/Configuration/SystemConfig.cs b/Configuration/SystemConfig.cs index 15ba5464..f115a02d 100644 --- a/Configuration/SystemConfig.cs +++ b/Configuration/SystemConfig.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using TweetDuck.Core; using TweetDuck.Data.Serialization; diff --git a/Resources/ScriptLoader.cs b/Resources/ScriptLoader.cs index fee9d590..2cf10233 100644 --- a/Resources/ScriptLoader.cs +++ b/Resources/ScriptLoader.cs @@ -5,6 +5,7 @@ using System.Windows.Forms; using TweetDuck.Core.Controls; using TweetDuck.Core.Other; + #if DEBUG using System.Diagnostics; using System.Reflection; @@ -88,7 +89,7 @@ private static void ShowLoadError(bool silent, Control sync, string message){ static ScriptLoader(){ if (File.Exists(HotSwapRebuildScript)){ - Debug.WriteLine("Activating resource hot swap"); + Debug.WriteLine("Activating resource hot swap..."); ResetHotSwap(); Application.ApplicationExit += (sender, args) => ResetHotSwap(); @@ -104,6 +105,8 @@ public static void HotSwap(){ ResetHotSwap(); Directory.CreateDirectory(HotSwapTargetDir); + Stopwatch sw = Stopwatch.StartNew(); + using(Process process = Process.Start(new ProcessStartInfo{ FileName = "powershell", Arguments = $"-ExecutionPolicy Unrestricted -File \"{HotSwapRebuildScript}\" \"{HotSwapTargetDir}\\\" \"{HotSwapProjectRoot}\\\" \"Debug\" \"{Program.VersionTag}\"", @@ -120,6 +123,9 @@ public static void HotSwap(){ } } + sw.Stop(); + Debug.WriteLine("Finished rebuild script in "+sw.ElapsedMilliseconds+" ms"); + // Force update plugin manager setup scripts string newPluginRoot = Path.Combine(HotSwapTargetDir, "plugins"); diff --git a/TweetDuck.csproj b/TweetDuck.csproj index d294731e..e1e0395d 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="packages\CefSharp.WinForms.67.0.0-CI2658\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.67.0.0-CI2658\build\CefSharp.WinForms.props')" /> <Import Project="packages\CefSharp.Common.67.0.0-CI2658\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.67.0.0-CI2658\build\CefSharp.Common.props')" /> @@ -410,6 +410,7 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild <Exec Command="del "$(TargetDir)*.xml"" /> <Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" /> <Delete Files="$(TargetDir)widevinecdmadapter.dll" /> + <Exec Command=""$(ProjectDir)bld\UPDATE ONLY.bat"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" /> </Target> <PropertyGroup> <PreBuildEvent>powershell Get-Process TweetDuck.Browser -ErrorAction SilentlyContinue ^| Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'} ^| Stop-Process; Exit 0</PreBuildEvent>