<Target Name="RarOutput" AfterTargets="ZipOutput">
<PropertyGroup>
<ArchiveFileName>FileName</ArchiveFileName>
<ArchiveFilePath>$([System.IO.Path]::GetFullPath($(OutDir)../$(ArchiveFileName)))</ArchiveFilePath>
<ProgramFilesPath>$([System.Environment]::GetEnvironmentVariable("ProgramFiles"))</ProgramFilesPath>
<RarPath>$([System.IO.Path]::Combine($(ProgramFilesPath), "WinRAR", "Rar.exe"))</RarPath>
</PropertyGroup>
<Message Text="RAR path: $(RarPath)" Importance="high" Condition="Exists($(RarPath))"/>
<Exec Command=""$(RarPath)" a -ep1 -v25600k -tsmcap -m5 -r -k -s -tl -dh -ag[yyyy-MM-ddThh-mm-ss] -hp"File" -x"*.pdb" "$(ArchiveFilePath)(pass=File)" "$(OutDir)"" IgnoreExitCode="true" Condition="Exists($(RarPath))"/>
<Exec Command=""$(RarPath)" a -ep1 -tsmcap -m5 -r -k -s -tl -dh -ag[yyyy-MM-ddThh-mm-ss] -x"*.pdb" "$(ArchiveFilePath)" "$(OutDir)"" IgnoreExitCode="true" Condition="Exists($(RarPath))"/>
<Message Text="Rared: $(ArchiveFilePath)" Importance="high" Condition="Exists($(RarPath))"/>
</Target>
Created
June 1, 2024 17:23
-
-
Save Platonenkov/ff3c670e8bbe912d9da72da70a0fdff3 to your computer and use it in GitHub Desktop.
Автоматическая упаковка релиза в архив RAR
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment