DRY build script

This commit is contained in:
Akash Mozumdar 2019-01-10 01:59:27 -05:00
parent 0afdafb3d1
commit 24d9244ad4

View File

@ -1,35 +1,25 @@
cd Builds/RelWithDebInfo_x86; Set-Location "$($PSScriptRoot)/Builds";
Compress-Archive -Force -DestinationPath Textractor -Path @(
"Textractor.exe",
"styles",
"platforms",
"Qt5Core.dll",
"Qt5Gui.dll",
"Qt5Widgets.dll",
"vnrhook.dll",
"Bing Translate.dll",
"Copy to Clipboard.dll",
"Extra Newlines.dll",
"Google Translate.dll",
"Regex Filter.dll",
"Remove Repetition.dll",
"Extensions.txt"
)
cd ../RelWithDebInfo_x64; foreach ($arch in @("86", "64")) {
Compress-Archive -Force -DestinationPath Textractor -Path @( $folder = "Textractor$($arch)";
"Textractor.exe", $targets = @(
"styles", "Textractor.exe",
"platforms", "Qt5Core.dll",
"Qt5Core.dll", "Qt5Gui.dll",
"Qt5Gui.dll", "Qt5Widgets.dll",
"Qt5Widgets.dll", "vnrhook.dll",
"vnrhook.dll", "Bing Translate.dll",
"Bing Translate.dll", "Copy to Clipboard.dll",
"Copy to Clipboard.dll", "Extra Newlines.dll",
"Extra Newlines.dll", "Google Translate.dll",
"Google Translate.dll", "Regex Filter.dll",
"Regex Filter.dll", "Remove Repetition.dll",
"Remove Repetition.dll", "Extensions.txt",
"Extensions.txt" "platforms",
) "styles"
) | ForEach-Object { "RelWithDebInfo_x$($arch)/$($_)" };
mkdir -Force -Verbose $folder;
Remove-Item -Force -Recurse -Verbose "$($folder)/*";
Copy-Item -Force -Recurse -Verbose -Destination $folder -Path $targets;
Compress-Archive -Force -Verbose -DestinationPath $folder -Path $folder;
}