mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-13 18:15:48 +02:00
Move debug configuration build events to PostBuild script
This commit is contained in:
parent
d2a6560a90
commit
0096a1a4ef
@ -1,7 +1,8 @@
|
||||
Param(
|
||||
[Parameter(Mandatory = $True, Position = 1)][string] $targetDir,
|
||||
[Parameter(Mandatory = $True, Position = 2)][string] $projectDir,
|
||||
[Parameter(Position = 3)][string] $version = ""
|
||||
[Parameter(Position = 3)][string] $configuration = "Release",
|
||||
[Parameter(Position = 4)][string] $version = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@ -37,6 +38,11 @@ try{
|
||||
Copy-Item (Join-Path $projectDir "Resources\Scripts\*") -Destination (Join-Path $targetDir "scripts") -Recurse
|
||||
Copy-Item (Join-Path $projectDir "Resources\Plugins\*") -Exclude ".debug", "emoji-instructions.txt" -Destination (Join-Path $targetDir "plugins\official") -Recurse
|
||||
|
||||
if ($configuration -eq "Debug"){
|
||||
New-Item -ItemType directory -Path $targetDir -Name "plugins\user\.debug" | Out-Null
|
||||
Copy-Item (Join-Path $projectDir "Resources\Plugins\.debug\*") -Destination (Join-Path $targetDir "plugins\user\.debug") -Recurse
|
||||
}
|
||||
|
||||
# Helper functions
|
||||
|
||||
function Check-Carriage-Return{
|
||||
|
@ -106,7 +106,7 @@ public static void HotSwap(){
|
||||
|
||||
using(Process process = Process.Start(new ProcessStartInfo{
|
||||
FileName = "powershell",
|
||||
Arguments = $"-ExecutionPolicy Unrestricted -File \"{HotSwapRebuildScript}\" \"{HotSwapTargetDir}\\\" \"{HotSwapProjectRoot}\\\" \"{Program.VersionTag}\"",
|
||||
Arguments = $"-ExecutionPolicy Unrestricted -File \"{HotSwapRebuildScript}\" \"{HotSwapTargetDir}\\\" \"{HotSwapProjectRoot}\\\" \"Debug\" \"{Program.VersionTag}\"",
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
})){
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
|
@ -413,13 +413,7 @@ rmdir "$(ProjectDir)bin\Release"
|
||||
rmdir "$(TargetDir)scripts" /S /Q
|
||||
rmdir "$(TargetDir)plugins" /S /Q
|
||||
|
||||
powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild.ps1" "$(TargetDir)\" "$(ProjectDir)\"
|
||||
|
||||
if $(ConfigurationName) == Debug (
|
||||
rmdir "$(TargetDir)plugins\official\.debug" /S /Q
|
||||
mkdir "$(TargetDir)plugins\user\.debug"
|
||||
xcopy "$(ProjectDir)Resources\Plugins\.debug\*" "$(TargetDir)plugins\user\.debug\" /E /Y
|
||||
)
|
||||
powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild.ps1" "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="AfterBuild" Condition="$(ConfigurationName) == Release">
|
||||
|
Loading…
Reference in New Issue
Block a user