viest 6 anni fa
parent
commit
74c0693e11
1 ha cambiato i file con 21 aggiunte e 2 eliminazioni
  1. 21 2
      .appveyor.yml

+ 21 - 2
.appveyor.yml

@@ -32,6 +32,25 @@ install:
                 if (-not (Test-Path c:\build-cache\$lname1)) {
                         & 7z x c:\build-cache\$lname0 -oc:\build-cache\$lname1
                 }
+                $lname2 = 'zlib-1.2.11.tar.gz'
+                $lname3 = 'zlib'
+                if (-not (Test-Path c:\build-cache\$lname2)) {
+                        $zliurl = "http://zlib.net/" + $lname2
+                        Invoke-WebRequest $zliurl -OutFile "c:\build-cache\$lname2"
+                }
+                if (-not (Test-Path c:\build-cache\$lname3)) {
+                        & 7z x c:\build-cache\$lname2 -oc:\build-cache
+                        & 7z x c:\build-cache\zlib-1.2.11.tar -oc:\build-cache\$lname3
+                }
+                if (-not (Test-Path c:\build-cache\$lname3\Release)) {
+                       cd c:\build-cache\$lname3\zlib-1.2.11
+                       $cmakegen = 'Visual Studio 15 2017'
+                       if ($env:VC -Match "vc14") {
+                              $cmakegen = "Visual Studio 14 2015"
+                       }
+                       & cmake -G $cmakegen -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_FLAGS_RELEASE="/MT"
+                       & cmake --build . --config "Release"
+                }
 
 cache:
         c:\build-cache -> .appveyor.yml
@@ -124,7 +143,7 @@ build_script:
                 #echo "" | Out-File -Encoding "ASCII" -Append task.bat
                 echo "" | Out-File -Encoding "ASCII" task.bat
                 echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
-                $conf_cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\libxlsxwriter\lib --with-extra-includes=c:\build-cache\libxlsxwriter\include --enable-debug-pack 2>&1'
+                $conf_cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\zlib\zlib-1.2.11\Release --with-extra-libs=c:\build-cache\libxlsxwriter\lib --with-extra-includes=c:\build-cache\zlib\zlib-1.2.11 --with-extra-includes=c:\build-cache\libxlsxwriter\include --enable-debug-pack 2>&1'
                 echo $conf_cmd | Out-File -Encoding "ASCII" -Append task.bat
                 echo "nmake /nologo 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
                 echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
@@ -163,7 +182,7 @@ test_script:
                 cd c:\projects\xlswriter
                 echo "" | Out-File -Encoding "ASCII" task.bat
                 echo "set REPORT_EXIT_STATUS=1" | Out-File -Encoding "ASCII" -Append task.bat
-                $cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\libxlsxwriter\lib --with-extra-includes=c:\build-cache\libxlsxwriter\include --with-prefix=c:\build-cache\' + $dname + ' 2>&1'
+                $cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\zlib\zlib-1.2.11\Release --with-extra-libs=c:\build-cache\libxlsxwriter\lib --with-extra-includes=c:\build-cache\zlib\zlib-1.2.11 --with-extra-includes=c:\build-cache\libxlsxwriter\include --with-prefix=c:\build-cache\' + $dname + ' 2>&1'
                 echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
                 echo 'nmake /nologo test TESTS="-q --show-diff --set-timeout 120" 2>&1' | Out-File -Encoding "ASCII" -Append task.bat
                 echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat