2019-05-25 01:30:12 +08:00
|
|
|
|
param([string]$version)
|
2019-02-03 05:54:29 +08:00
|
|
|
|
|
2019-05-25 01:30:12 +08:00
|
|
|
|
cd $PSScriptRoot;
|
|
|
|
|
mkdir -Force -Verbose Builds;
|
|
|
|
|
cd Builds;
|
|
|
|
|
mkdir -Force -Verbose x86;
|
|
|
|
|
mkdir -Force -Verbose x64;
|
2018-10-28 14:27:24 +08:00
|
|
|
|
|
2019-05-25 01:30:12 +08:00
|
|
|
|
foreach ($language in @{
|
|
|
|
|
ENGLISH="";
|
|
|
|
|
SPANISH="Español";
|
|
|
|
|
SIMPLIFIED_CHINESE="简体中文";
|
|
|
|
|
RUSSIAN="Русский";
|
|
|
|
|
TURKISH="Türkçe";
|
|
|
|
|
}.GetEnumerator())
|
|
|
|
|
{
|
2019-05-28 02:13:12 +08:00
|
|
|
|
$folder = "Textractor-$($language.Value)-$version";
|
2019-05-25 01:30:12 +08:00
|
|
|
|
mkdir -Force -Verbose $folder;
|
2019-05-28 02:13:12 +08:00
|
|
|
|
rm -Force -Recurse -Verbose "$folder/*";
|
2019-05-25 01:30:12 +08:00
|
|
|
|
|
2019-05-28 02:13:12 +08:00
|
|
|
|
foreach ($arch in @("x86", "x64"))
|
2019-05-25 01:30:12 +08:00
|
|
|
|
{
|
2019-05-28 02:13:12 +08:00
|
|
|
|
cd $arch;
|
|
|
|
|
$cmakeArch = if ($arch -eq "x86") {""} else {" Win64"};
|
|
|
|
|
$vsArch = if ($arch -eq "x86") {"Win32"} else {"x64"};
|
|
|
|
|
cmake -G "Visual Studio 15 2017$cmakeArch" -DVERSION="$version" -DTEXT_LANGUAGE="$($language.Key)" -DCMAKE_BUILD_TYPE="Release" ../..;
|
|
|
|
|
&"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv" Textractor.sln /build "Release|$vsArch";
|
|
|
|
|
cd ..;
|
|
|
|
|
mkdir -Force -Verbose "$folder/$arch";
|
|
|
|
|
foreach ($file in @(
|
|
|
|
|
"Textractor.exe",
|
|
|
|
|
"TextractorCLI.exe",
|
|
|
|
|
"texthook.dll",
|
|
|
|
|
"Qt5Core.dll",
|
|
|
|
|
"Qt5Gui.dll",
|
|
|
|
|
"Qt5Widgets.dll",
|
|
|
|
|
"LoaderDll.dll",
|
|
|
|
|
"LocaleEmulator.dll",
|
|
|
|
|
"Bing Translate.dll",
|
|
|
|
|
"Copy to Clipboard.dll",
|
|
|
|
|
"Extra Newlines.dll",
|
|
|
|
|
"Extra Window.dll",
|
|
|
|
|
"Google Translate.dll",
|
|
|
|
|
"Lua.dll",
|
|
|
|
|
"Regex Filter.dll",
|
|
|
|
|
"Remove Repetition.dll",
|
|
|
|
|
"Replacer.dll",
|
|
|
|
|
"Thread Linker.dll",
|
|
|
|
|
"platforms",
|
|
|
|
|
"styles"
|
|
|
|
|
))
|
|
|
|
|
{
|
|
|
|
|
copy -Force -Recurse -Verbose -Destination "$folder/$arch" -Path "Release_$arch/$file";
|
|
|
|
|
}
|
2019-05-25 01:30:12 +08:00
|
|
|
|
}
|
|
|
|
|
}
|