rizin/dist/windows/build_windows_installer.ps1
Giovanni 6ef55aa63a
Some checks failed
Code scanning / build (CodeQL-cpp) (push) Has been cancelled
Code scanning / build (CodeQL-javascript) (push) Has been cancelled
Code scanning / build (CodeQL-python) (push) Has been cancelled
Mixed linter and checks / changes (push) Has been cancelled
Mixed linter and checks / licenses (push) Has been cancelled
Mixed linter and checks / cmd_descs_yaml_check (push) Has been cancelled
Mixed linter and checks / clang-format (push) Has been cancelled
Mixed linter and checks / prettier (push) Has been cancelled
Mixed linter and checks / python (push) Has been cancelled
Fix #1881 - Fix windows build (#1984)
2021-11-17 22:52:31 +08:00

31 lines
929 B
PowerShell

$name=$args[0]
$bits=$args[1]
$end=$args.Length
$meson_options=$args[2..$end]
$scriptpath=$PSScriptRoot
$builddir=$(Join-Path -Path $env:TEMP -ChildPath "build-win-installer-$name-$bits")
$installdir=$(Join-Path -Path $env:TEMP -ChildPath "rizin-win-installer-$name-$bits")
pushd $PSScriptRoot\..\..
$version=$(python sys\version.py)
echo $version
echo $builddir
echo $installdir
$env:Path += ";$env:ProgramFiles (x86)\Microsoft Visual Studio\Installer"
$env:Path += ";$env:ProgramFiles\7-Zip"
$env:Path += ";$env:ProgramFiles (x86)\Inno Setup 6"
dist\windows\vsdevenv.ps1 $bits
meson --buildtype=release --prefix=$installdir $builddir $meson_options
ninja -C $builddir -j1
ninja -C $builddir install
7z a dist\windows\Output\rizin-$name-$version.zip $installdir
iscc dist\windows\rizin.iss /DRizinLocation=$installdir\* /DLicenseLocation=$PWD\COPYING.LESSER /DMyAppVersion=$version
rm -r $builddir
rm -r $installdir
popd