mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-29 03:15:51 +02:00
Fix post build scripts to support moved F# executables
This commit is contained in:
parent
ab8752845d
commit
994f9635ef
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
bld/*
|
bld/*
|
||||||
!bld/*.iss
|
!bld/*.iss
|
||||||
!bld/*.bat
|
!bld/*.bat
|
||||||
|
!bld/*.ps1
|
||||||
!bld/Redist
|
!bld/Redist
|
||||||
!bld/Resources
|
!bld/Resources
|
||||||
|
|
||||||
|
@ -405,15 +405,11 @@ rmdir "$(ProjectDir)bin\Release"
|
|||||||
rmdir "$(TargetDir)scripts" /S /Q
|
rmdir "$(TargetDir)scripts" /S /Q
|
||||||
rmdir "$(TargetDir)plugins" /S /Q
|
rmdir "$(TargetDir)plugins" /S /Q
|
||||||
|
|
||||||
IF EXIST "$(ProjectDir)bld\post_build.exe" (
|
"$(ProjectDir)bld\post_build.exe" "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
||||||
"$(ProjectDir)bld\post_build.exe" "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
|
||||||
) ELSE (
|
|
||||||
"$(DevEnvDir)CommonExtensions\Microsoft\FSharp\fsi.exe" "$(ProjectDir)Resources\PostBuild.fsx" --exec --nologo -- "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
|
||||||
)
|
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="BeforeBuild" Condition="(!$([System.IO.File]::Exists("$(ProjectDir)\bld\post_build.exe")) OR ($([System.IO.File]::GetLastWriteTime("$(ProjectDir)\Resources\PostBuild.fsx").Ticks) > $([System.IO.File]::GetLastWriteTime("$(ProjectDir)\bld\post_build.exe").Ticks)))">
|
<Target Name="BeforeBuild" Condition="(!$([System.IO.File]::Exists("$(ProjectDir)bld\post_build.exe")) OR ($([System.IO.File]::GetLastWriteTime("$(ProjectDir)Resources\PostBuild.fsx").Ticks) > $([System.IO.File]::GetLastWriteTime("$(ProjectDir)bld\post_build.exe").Ticks)))">
|
||||||
<Exec Command=""$(ProjectDir)bld\POST BUILD.bat" "$(DevEnvDir)CommonExtensions\Microsoft\FSharp\fsc.exe"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" />
|
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(ProjectDir)bld\POST BUILD.ps1" "$(DevEnvDir)\CommonExtensions\Microsoft\FSharp"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild" Condition="$(ConfigurationName) == Release">
|
<Target Name="AfterBuild" Condition="$(ConfigurationName) == Release">
|
||||||
<Exec Command="del "$(TargetDir)*.pdb"" />
|
<Exec Command="del "$(TargetDir)*.pdb"" />
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
IF EXIST "post_build.exe" (
|
|
||||||
DEL "post_build.exe"
|
|
||||||
)
|
|
||||||
|
|
||||||
IF NOT EXIST %1 (
|
|
||||||
ECHO fsc.exe not found
|
|
||||||
EXIT 1
|
|
||||||
)
|
|
||||||
|
|
||||||
%1 --standalone --deterministic --preferreduilang:en-US --platform:x86 --target:exe --out:post_build.exe "%~dp0..\Resources\PostBuild.fsx"
|
|
22
bld/POST BUILD.ps1
Normal file
22
bld/POST BUILD.ps1
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
if ([IO.File]::Exists("post_build.exe")) {
|
||||||
|
[IO.File]::Delete("post_build.exe");
|
||||||
|
}
|
||||||
|
|
||||||
|
$fs = $args[0];
|
||||||
|
$fsc = "";
|
||||||
|
|
||||||
|
if ([IO.File]::Exists("$fs\fsc.exe")) {
|
||||||
|
$fsc = "$fs\fsc.exe";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([IO.File]::Exists("$fs\Tools\fsc.exe")) {
|
||||||
|
$fsc = "$fs\Tools\fsc.exe";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($fsc -eq "") {
|
||||||
|
Write-Host "fsc.exe not found"
|
||||||
|
$Host.SetShouldExit(1);
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
& $fsc --standalone --deterministic --preferreduilang:en-US --platform:x86 --target:exe --out:post_build.exe "$PSScriptRoot\..\Resources\PostBuild.fsx"
|
Loading…
Reference in New Issue
Block a user