Files
vsmartcard/appveyor.yml
fabio rodrigues db8d6f2699 [vpicc] update Appveyor with better swig install
choco install of swig only give us the executable, not the libraries needed for package compilation

Best way is to direct download it from sourceforge, extract it to a folder and then add that folder to PATH env variable.
2020-08-18 16:15:52 +01:00

62 lines
2.2 KiB
YAML

platform:
- x86
- x64
os: Visual Studio 2019
install:
- date /T & time /T
- ps: >-
If ($env:Platform -Match "x86") {
$env:MSBUILD_PLATFORM="x86"
$env:VCVARS_PLATFORM="x86"
$env:ARTIFACT="virtualsmartcard_win32"
$env:X64=""
} Else {
$env:MSBUILD_PLATFORM="x64"
$env:VCVARS_PLATFORM="amd64"
$env:ARTIFACT="virtualsmartcard_win64"
$env:X64="x64\"
}
- git submodule update --init --recursive
# BUGFIX: wdf directory was renamed to 00wdf, rename it back (see github.com/appveyor/ci/issues/414)
#- ps: ren 'C:\Program Files (x86)\Windows Kits\10\include\00wdf' 'wdf'
- (new-object net.webclient).DownloadFile('https://sourceforge.net/projects/swig/', '..\swig.zip')
- Expand-Archive -LiteralPath ..\swig.zip -DestinationPath ..\swig_folder
- $env:Path += "..\swig_folder"
- python -m pip install --upgrade pip
- pip install virtualenv
- pip install -U setuptools
- pip install pycryptodome
- pip install pbkdf2
- pip install Pillow
- pip install pyreadline
- pip install pyscard
- pip install pyinstaller
- set PATH=C:\cygwin\bin;%PATH%
# set Visual Studio 2015 build environment
- set VSVER=19
- ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
- echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
- call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
build_script:
- md %ARTIFACT%
- msbuild virtualsmartcard\win32\BixVReader.sln /p:Configuration=Release;Platform=%MSBUILD_PLATFORM%
- move virtualsmartcard\win32\BixVReaderInstaller\bin\%X64%Release\BixVReaderInstaller.msi %ARTIFACT%
- cl /Ivirtualsmartcard\src\vpcd virtualsmartcard\src\vpcd-config\vpcd-config.c /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT virtualsmartcard\src\vpcd-config\local-ip.c ws2_32.lib
- move vpcd-config.exe %ARTIFACT%
- bash -c "cd virtualsmartcard && autoreconf -i && exec 0</dev/null ./configure --enable-libpcsclite HELP2MAN=/usr/bin/true"
- bash -c "make vicc -C virtualsmartcard/src/vpicc"
- pyinstaller --onefile virtualsmartcard\src\vpicc\vicc -i doc\_static\chip.ico --distpath %ARTIFACT%
- 7z a %ARTIFACT%.zip %ARTIFACT%
- appveyor PushArtifact %ARTIFACT%.zip