From f7855b6c65f5727fbfd45d2b912047a5cfaa27e7 Mon Sep 17 00:00:00 2001 From: "Leroy.H.Y" Date: Fri, 21 Jun 2019 18:59:02 +0800 Subject: [PATCH] [CI] Added Appveyor CI Config --- appveyor.yml | 6 +++--- tools/FixPythonWithMinGW.bat | 7 ++----- tools/WindowsInstallDependencies.bat | 18 +++--------------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 924a73b0..3cf54f58 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,14 +4,14 @@ branches: - dev - AppVeyor - ui-implementation - + install: - set QTDIR=C:\Qt\5.10\mingw53_32 - choco install -y InnoSetup - - set PATH=%QTDIR%\bin;C:\Qt\Tools\mingw530_32\bin;%PATH%;"C:\Program Files (x86)\Inno Setup 5" + - set PATH=%QTDIR%\bin;C:\Qt\Tools\mingw730_32\bin;%PATH%;"C:\Program Files (x86)\Inno Setup 5" build_script: - - tools\WindowsInstallDependencies.bat + - mkdir python37 && xcopy C:\Python37 python37 /E /H /Q - tools\FixPythonWithMinGW.bat - cd src - mkdir build && cd build diff --git a/tools/FixPythonWithMinGW.bat b/tools/FixPythonWithMinGW.bat index 078fd8a2..3ab8766a 100644 --- a/tools/FixPythonWithMinGW.bat +++ b/tools/FixPythonWithMinGW.bat @@ -1,9 +1,6 @@ - - set CURRENT_PATH=%~dp0% - cd %~dp0\..\python37\libs\ - echo EXPORTS > python37.def nm python37.lib | grep " T _" | sed "s/.* T _//" >> python37.def -dlltool --input-def python37.def --dllname python37 --output-lib libpython37_mingw.a \ No newline at end of file +dlltool --input-def python37.def --dllname python37 --output-lib libpython37_mingw.a +cd %CURRENT_PATH%\..\ diff --git a/tools/WindowsInstallDependencies.bat b/tools/WindowsInstallDependencies.bat index 8b1bee55..75e1df43 100644 --- a/tools/WindowsInstallDependencies.bat +++ b/tools/WindowsInstallDependencies.bat @@ -2,26 +2,14 @@ REM Install Python ECHO Downloading Python using wget... -wget.exe https://www.python.org/ftp/python/3.7.3/python-3.7.3.exe -O %~dp0\python-3.7.3.exe +%~dp0\wget.exe https://www.python.org/ftp/python/3.7.3/python-3.7.3.exe -O %~dp0\python-3.7.3.exe REM Get install path -CALL :NORMALIZEPATH "..\python37\" +CALL :NORMALIZEPATH "\python37\" ECHO INSTALL_PATH=%RETVAL% REM Installing Python... -python-3.7.3.exe /quiet TargetDir=%RETVAL% - -REM From: https://stackoverflow.com/a/8185270/8364323 -ECHO Wait for it installing.... -:LOOP -PSLIST python-3.7.3 >nul 2>&1 -IF ERRORLEVEL 1 ( - GOTO CONTINUE -) ELSE ( - ECHO Waiting for python finish install. - TIMEOUT /T 5 - GOTO LOOP -) +start /w "" "%~dp0\python-3.7.3.exe" /quiet TargetDir=%RETVAL% :CONTINUE ECHO Python headers and libs are installed!