more flexible deploy script

This commit is contained in:
Akash Mozumdar 2019-02-02 16:54:29 -05:00
parent f74cd553c0
commit dcfbeafd44

View File

@ -1,31 +1,29 @@
param([string]$arch = "86", [string]$folder = "Textractor$($arch)")
Set-Location $PSScriptRoot; Set-Location $PSScriptRoot;
foreach ($arch in @("86", "64")) { $targets = @(
$folder = "Textractor$($arch)"; "Textractor.exe",
$targets = @( "TextractorCLI.exe",
"Textractor.exe", "vnrhook.dll",
"TextractorCLI.exe", "Qt5Core.dll",
"vc_redist.x$($arch).exe" "Qt5Gui.dll",
"vnrhook.dll", "Qt5Widgets.dll",
"Qt5Core.dll", "LoaderDll.dll",
"Qt5Gui.dll", "LocaleEmulator.dll",
"Qt5Widgets.dll", "Bing Translate.dll",
"LoaderDll.dll", "Copy to Clipboard.dll",
"LocaleEmulator.dll", "Extra Newlines.dll",
"Bing Translate.dll", "Extra Window.dll",
"Copy to Clipboard.dll", "Google Translate.dll",
"Extra Newlines.dll", "Regex Filter.dll",
"Extra Window.dll", "Remove Repetition.dll",
"Google Translate.dll", "Replacer.dll",
"Regex Filter.dll", "Thread Linker.dll",
"Remove Repetition.dll", "platforms",
"Replacer.dll", "styles"
"Thread Linker.dll", ) | ForEach-Object { "builds/RelWithDebInfo_x$($arch)/$($_)" };
"platforms", mkdir -Force -Verbose $folder;
"styles" Remove-Item -Force -Recurse -Verbose "$($folder)/*";
) | ForEach-Object { "builds/RelWithDebInfo_x$($arch)/$($_)" }; Copy-Item -Force -Recurse -Verbose -Destination $folder -Path $targets;
mkdir -Force -Verbose $folder; Compress-Archive -Force -Verbose -DestinationPath "$($folder).zip" -Path $folder;
Remove-Item -Force -Recurse -Verbose "$($folder)/*";
Copy-Item -Force -Recurse -Verbose -Destination $folder -Path $targets;
Compress-Archive -Force -Verbose -DestinationPath $folder -Path $folder;
}