From 5c3ef9d8614a38e4f895f1d303df8c101c8fc1ee Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:42:16 -0600 Subject: [PATCH 01/49] Lets try appveyor --- appveyor.yml | 8 ++++++++ ci/appveyor/build.cmd | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 appveyor.yml create mode 100644 ci/appveyor/build.cmd diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..79483fc --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,8 @@ +shallow_clone: true +environment: + matrix: + - WXVER: "2.8" + - ARCH: "x86" + - BUILDTYPE: Release +build_script: + - cmd: %APPVEYOR_BUILD_FOLDER/ci/appveyor/build.cmd diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd new file mode 100644 index 0000000..b1bcab7 --- /dev/null +++ b/ci/appveyor/build.cmd @@ -0,0 +1,24 @@ +setlocal ENABLEEXTENSIONS + +call %VCVARSALL% %ARCH% +echo %INCLUDE% +echo %LIB% +echo %LIBPATH% + +if not exist build (mkdir build) +cd build + +echo. +echo Configuring build +cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% -DCMAKE_BUILD_TYPE=%BUILDTYPE% +if ERRORLEVEL 1 exit /b %ERRORLEVEL% + +echo. +echo Building +nmake +if ERRORLEVEL 1 exit /b %ERRORLEVEL% + +echo. +echo Making package +nmake package +if ERRORLEVEL 1 exit /b %ERRORLEVEL% From 851e89940a2748ac3f7b5780d11b3cfaa966b91f Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:44:05 -0600 Subject: [PATCH 02/49] Yaml doesn't like %? --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 79483fc..bdab774 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,4 +5,4 @@ environment: - ARCH: "x86" - BUILDTYPE: Release build_script: - - cmd: %APPVEYOR_BUILD_FOLDER/ci/appveyor/build.cmd + - cmd: "%APPVEYOR_BUILD_FOLDER/ci/appveyor/build.cmd" From 3b1206ac0039dfd97a6b05d38982149336fc542d Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:46:37 -0600 Subject: [PATCH 03/49] more fiddling --- appveyor.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bdab774..ed26ab4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,10 @@ shallow_clone: true environment: matrix: - WXVER: "2.8" - - ARCH: "x86" - - BUILDTYPE: Release +platform: + - x86 +configuration: + - RelDbgInfo + - Debug build_script: - - cmd: "%APPVEYOR_BUILD_FOLDER/ci/appveyor/build.cmd" + - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From 0abdf1c7ec536cd5374e1c1f02accdaaa36a8dfd Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:48:22 -0600 Subject: [PATCH 04/49] Lets run with echo on --- ci/appveyor/build.cmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index b1bcab7..9efd309 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -1,6 +1,8 @@ setlocal ENABLEEXTENSIONS -call %VCVARSALL% %ARCH% +echo on + +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH% echo %INCLUDE% echo %LIB% echo %LIBPATH% From 29bea086b830a5a2cecb2c4d5c4867d78bc27882 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:53:18 -0600 Subject: [PATCH 05/49] Figure out why git can't find repo --- ci/appveyor/build.cmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index 9efd309..1af3a95 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -7,6 +7,9 @@ echo %INCLUDE% echo %LIB% echo %LIBPATH% +set + +cd %APPVEYOR_BUILD_FOLDER% if not exist build (mkdir build) cd build From 9cf8b0aa9c8e2721ff299df5070de106f0b7093a Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:58:08 -0600 Subject: [PATCH 06/49] More debuggin --- ci/appveyor/build.cmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index 1af3a95..b5bc4fb 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -2,12 +2,13 @@ setlocal ENABLEEXTENSIONS echo on -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH% +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Platform% echo %INCLUDE% echo %LIB% echo %LIBPATH% set +dir cd %APPVEYOR_BUILD_FOLDER% if not exist build (mkdir build) From 030289e1494e51072b8cd8df1546329a56eedd3a Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 17:59:32 -0600 Subject: [PATCH 07/49] git tools don't work on shallow clones --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ed26ab4..4f5cc47 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -shallow_clone: true +clone_depth: 5 environment: matrix: - WXVER: "2.8" From 0bb33462d64bfccde3cece0b138a7548eb1d8797 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 18:01:59 -0600 Subject: [PATCH 08/49] Remove some debugging --- appveyor.yml | 1 - ci/appveyor/build.cmd | 6 ------ 2 files changed, 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4f5cc47..bdb7eb9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,3 @@ -clone_depth: 5 environment: matrix: - WXVER: "2.8" diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index b5bc4fb..f878ec2 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -3,12 +3,6 @@ setlocal ENABLEEXTENSIONS echo on call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Platform% -echo %INCLUDE% -echo %LIB% -echo %LIBPATH% - -set -dir cd %APPVEYOR_BUILD_FOLDER% if not exist build (mkdir build) From 0029c34709854e5262f57bf922f15a2c0026eabf Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 22:23:01 -0600 Subject: [PATCH 09/49] Build wxWidgets first --- appveyor.yml | 2 ++ ci/appveyor/build.cmd | 2 +- ci/appveyor/build_wxwidgets.cmd | 12 +++++++ ci/appveyor/load_wxwidgets.ps1 | 62 +++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 ci/appveyor/build_wxwidgets.cmd create mode 100644 ci/appveyor/load_wxwidgets.ps1 diff --git a/appveyor.yml b/appveyor.yml index bdb7eb9..580541a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,5 +6,7 @@ platform: configuration: - RelDbgInfo - Debug +before_build: + - ps1: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" build_script: - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index f878ec2..f93eea8 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -10,7 +10,7 @@ cd build echo. echo Configuring build -cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% -DCMAKE_BUILD_TYPE=%BUILDTYPE% +cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% -DCMAKE_BUILD_TYPE=%Configuration% if ERRORLEVEL 1 exit /b %ERRORLEVEL% echo. diff --git a/ci/appveyor/build_wxwidgets.cmd b/ci/appveyor/build_wxwidgets.cmd new file mode 100644 index 0000000..badb8f7 --- /dev/null +++ b/ci/appveyor/build_wxwidgets.cmd @@ -0,0 +1,12 @@ +:contargs +@if "%2"=="" goto doneargs +set %1=%2 +@shift +@shift +@goto contargs + +:doneargs + +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Platform% + +nmake -f makefile.vc BUILD=%BUILD% UNICODE=1 \ No newline at end of file diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 new file mode 100644 index 0000000..9f3d76d --- /dev/null +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -0,0 +1,62 @@ +if ($ENV:WXVER -eq "2.8") { + $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxMSW-2.8.12.zip" + $wxdir = "C:\wxMSW-2.8.12" + $wxfile = "wxMSW-2.8.12.zip" + $sha2sum = "307D713D8AFFBED69A89418D9C9073193AADFEF4B16DA3D8EF68558A9F57AE88" + $7zipoutdir = "C:\" +} else { + $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.7z" + $wxdir = "C:\wxWidgets-3.1.0" + $wxfile = "wxWidgets-3.1.0.7z" + $sha2sum = "FDB970D6D3278B5ABD999E6F87295C2162E64184826D07B1AA26AB1E3E46BA27" + $7zipoutdir = $wxdir +} + +$start_dir = $pwd + +if (Test-Path $wxdir) { + echo "$($wxdir) already exists" + exit 0 +} + +if (Test-Path $wxfile) { + $sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" + if ($sum.Hash -ne $sha2sum) { + echo "Current file hash doesn't match" + Remove-Item $wxfile + } +} +if (-Not (Test-Path $wxfile)) { + Invoke-WebRequest $wxurl -outfile $wxfile +} + +$sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" +if ($sum.Hash -ne $sha2sum) { + echo "ERROR: $($wxfile) is corrupt" + echo "Orig: $($sha2sum)" + echo "Calc: $($sum.Hash)" + exit 3 +} + +$unzip_args = "x", $wxfile, "-o$($7zipoutdir)" + +& "C:\Program Files\7-zip\7z.exe" $unzip_args + +cd $wxdir + +if ($stl) {} + +# Include is not needed and can be removed http://stackoverflow.com/a/17144445 +(Get-Content src/msw/window.cpp) -replace '#include ', '' | Set-Content src/msw/window.cpp + +cd build\msw + +if ($ENV:Configuration -eq "Debug") { + $buildtype = "BUILD=debug" +} else { + $buildtype = "BUILD=release" +} +echo "Building UNICODE=1 $($buildtype)" +$build_args = "UNICODE=1", $buildtype +& "$($start_dir.Path)\ci\appveyor\build_wxwidgets.cmd" $build_args + From 8d5dac797c4fe793352b7afa1e6fbeaf94adb738 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 22:25:05 -0600 Subject: [PATCH 10/49] Build wxwidgets --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 580541a..78b2203 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,6 @@ platform: configuration: - RelDbgInfo - Debug -before_build: - - ps1: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" build_script: + - ps1: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From e9412a3fe207558760d706888718be94299a60f2 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sat, 17 Sep 2016 22:31:32 -0600 Subject: [PATCH 11/49] Why no run? --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 78b2203..6c7b877 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,5 +7,5 @@ configuration: - RelDbgInfo - Debug build_script: - - ps1: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" + - "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From b4c59877b44838d22a136bc67d42a66c8196d177 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 11:47:21 -0600 Subject: [PATCH 12/49] Where did it hang? --- ci/appveyor/load_wxwidgets.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 9f3d76d..31515ac 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -18,8 +18,10 @@ if (Test-Path $wxdir) { echo "$($wxdir) already exists" exit 0 } +echo "$($wxdir) is missing. Getting wx" if (Test-Path $wxfile) { + echo "Zip exists" $sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" if ($sum.Hash -ne $sha2sum) { echo "Current file hash doesn't match" @@ -27,6 +29,7 @@ if (Test-Path $wxfile) { } } if (-Not (Test-Path $wxfile)) { + echo "Fetching zip" Invoke-WebRequest $wxurl -outfile $wxfile } From e8c81c121c7456cdd71b93c3c46a64f21000ac95 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 11:57:05 -0600 Subject: [PATCH 13/49] Try a different downloader --- ci/appveyor/load_wxwidgets.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 31515ac..5a43087 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -30,7 +30,7 @@ if (Test-Path $wxfile) { } if (-Not (Test-Path $wxfile)) { echo "Fetching zip" - Invoke-WebRequest $wxurl -outfile $wxfile + (new-object net.webclient).DownloadFile($wxurl, $wxfile) } $sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" From 64886b59e98b6dc53b2775b81658ddf8d83dd9e9 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 12:33:08 -0600 Subject: [PATCH 14/49] Another option? --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6c7b877..b04a944 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,5 +7,5 @@ configuration: - RelDbgInfo - Debug build_script: - - "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" + - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From c8a881297822d3bae2de09a806816ba937b8a0ac Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 12:51:47 -0600 Subject: [PATCH 15/49] Get the wxWidgets folder from env as CmakeLists expects --- appveyor.yml | 2 ++ ci/appveyor/load_wxwidgets.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b04a944..4e943f8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,5 +7,7 @@ configuration: - RelDbgInfo - Debug build_script: + - set WXWIDGETS2.8=C:\wxMSW-2.8.12 + - set WXWIDGETS3.1=C:\wxWidgets-3.1.0 - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 5a43087..cddf568 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -1,12 +1,12 @@ if ($ENV:WXVER -eq "2.8") { $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxMSW-2.8.12.zip" - $wxdir = "C:\wxMSW-2.8.12" + $wxdir = $ENV:WXWIDGETS2.8 $wxfile = "wxMSW-2.8.12.zip" $sha2sum = "307D713D8AFFBED69A89418D9C9073193AADFEF4B16DA3D8EF68558A9F57AE88" $7zipoutdir = "C:\" } else { $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.7z" - $wxdir = "C:\wxWidgets-3.1.0" + $wxdir = $ENV:WXWIDGETS3.1 $wxfile = "wxWidgets-3.1.0.7z" $sha2sum = "FDB970D6D3278B5ABD999E6F87295C2162E64184826D07B1AA26AB1E3E46BA27" $7zipoutdir = $wxdir From 89d3f736ee04ac347ea93e9df253e3a68fe7322c Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 13:07:14 -0600 Subject: [PATCH 16/49] Set env in right place --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4e943f8..f1886ba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,6 @@ environment: + WXWIDGETS2.8: C:\wxMSW-2.8.12 + WXWIDGETS3.1: C:\wxWidgets-3.1.0 matrix: - WXVER: "2.8" platform: @@ -7,7 +9,5 @@ configuration: - RelDbgInfo - Debug build_script: - - set WXWIDGETS2.8=C:\wxMSW-2.8.12 - - set WXWIDGETS3.1=C:\wxWidgets-3.1.0 - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From 471510ab4df7f6ae25a2b42268f969bab43b7095 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 13:17:08 -0600 Subject: [PATCH 17/49] Dump env at script startup --- ci/appveyor/load_wxwidgets.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index cddf568..0b7a3d9 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -1,12 +1,14 @@ +Get-Childitem -Path Env:* | Sort-Object Name + if ($ENV:WXVER -eq "2.8") { $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxMSW-2.8.12.zip" - $wxdir = $ENV:WXWIDGETS2.8 + $wxdir = ${ENV:WXWIDGETS2.8} $wxfile = "wxMSW-2.8.12.zip" $sha2sum = "307D713D8AFFBED69A89418D9C9073193AADFEF4B16DA3D8EF68558A9F57AE88" $7zipoutdir = "C:\" } else { $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.7z" - $wxdir = $ENV:WXWIDGETS3.1 + $wxdir = ${ENV:WXWIDGETS3.1} $wxfile = "wxWidgets-3.1.0.7z" $sha2sum = "FDB970D6D3278B5ABD999E6F87295C2162E64184826D07B1AA26AB1E3E46BA27" $7zipoutdir = $wxdir From d0125e590b4227c0fa6b69979c4c6479f7583c39 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 13:29:24 -0600 Subject: [PATCH 18/49] Lets try with the slashes the otherway --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f1886ba..57f24d1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ environment: - WXWIDGETS2.8: C:\wxMSW-2.8.12 - WXWIDGETS3.1: C:\wxWidgets-3.1.0 + WXWIDGETS2.8: C:/wxMSW-2.8.12 + WXWIDGETS3.1: C:/wxWidgets-3.1.0 matrix: - WXVER: "2.8" platform: From f4e52bc02febb2a8af7c0323f862386f9f76e143 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 14:23:47 -0600 Subject: [PATCH 19/49] Build openal as well --- appveyor.yml | 5 ++++ ci/appveyor/load_openal.ps1 | 53 +++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 ci/appveyor/load_openal.ps1 diff --git a/appveyor.yml b/appveyor.yml index 57f24d1..b53918d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,12 @@ environment: WXWIDGETS2.8: C:/wxMSW-2.8.12 WXWIDGETS3.1: C:/wxWidgets-3.1.0 + OPENAL: C:\openal-soft-1.17.2 + OPENAL_LIBRARY: C:\openal-soft-1.17.2\build\OpenAL.lib + OPENAL_INCLUDE_DIR: C:\openal-soft-1.17.2\include\AL matrix: - WXVER: "2.8" + - WXVER: "3.1" platform: - x86 configuration: @@ -10,4 +14,5 @@ configuration: - Debug build_script: - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" + - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" diff --git a/ci/appveyor/load_openal.ps1 b/ci/appveyor/load_openal.ps1 new file mode 100644 index 0000000..b521edb --- /dev/null +++ b/ci/appveyor/load_openal.ps1 @@ -0,0 +1,53 @@ +$start_dir = $pwd + +$openaldir = $ENV:OPENAL +$sha2sum = "A341F8542F1F0B8C65241A17DA13D073F18EC06658E1A1606A8ECC8BBC2B3314" +$openalurl = "http://kcat.strangesoft.net/openal-releases/openal-soft-1.17.2.tar.bz2" +$openalfile = "openal-soft-1.17.2.tar.bz2" +$openaltar = "openal-soft-1.17.2.tar" +$7zipoutdir = "C:\" + +if (Test-Path $openaldir) { + echo "$($openaldir) already exists" + exit 0 +} +echo "$($openaldir) is missing. Getting wx" + +if (Test-Path $openalfile) { + echo "Zip exists" + $sum = Get-FileHash -LiteralPath $openalfile -Algorithm "SHA256" + if ($sum.Hash -ne $sha2sum) { + echo "Current file hash doesn't match" + Remove-Item $openalfile + } +} +if (-Not (Test-Path $openalfile)) { + echo "Fetching zip" + (new-object net.webclient).DownloadFile($openalurl, $openalfile) +} + +$sum = Get-FileHash -LiteralPath $openalfile -Algorithm "SHA256" +if ($sum.Hash -ne $sha2sum) { + echo "ERROR: $($wxfile) is corrupt" + echo "Orig: $($sha2sum)" + echo "Calc: $($sum.Hash)" + exit 3 +} + +$unzip_args = "x", $openalfile, "-y" +& "C:\Program Files\7-zip\7z.exe" $unzip_args + +$unzip_args = "x", $openaltar, "-y", "-o$($7zipoutdir)" +& "C:\Program Files\7-zip\7z.exe" $unzip_args + +cd $openaldir + +cd build + +echo "Configuring..." +$configure_args = "..", "-G", "NMake Makefiles", "-DCMAKE_BUILD_TYPE=Release" +& cmake $configure_args + +echo "Building" +$build_args = "--build", "." +& cmake $build_args From 3341053d3e00f2f10bd926302b13abab0750c3ad Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 14:55:36 -0600 Subject: [PATCH 20/49] Need to do it this way --- ci/appveyor/build_openal.cmd | 16 ++++++++++++++++ ci/appveyor/load_openal.ps1 | 8 +------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 ci/appveyor/build_openal.cmd diff --git a/ci/appveyor/build_openal.cmd b/ci/appveyor/build_openal.cmd new file mode 100644 index 0000000..c208ca0 --- /dev/null +++ b/ci/appveyor/build_openal.cmd @@ -0,0 +1,16 @@ +:contargs +@if "%2"=="" goto doneargs +set %1=%2 +@shift +@shift +@goto contargs + +:doneargs + +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Platform% + +echo "Configuring..." +cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release + +echo "Building" +cmake .. --build . diff --git a/ci/appveyor/load_openal.ps1 b/ci/appveyor/load_openal.ps1 index b521edb..73ed3ef 100644 --- a/ci/appveyor/load_openal.ps1 +++ b/ci/appveyor/load_openal.ps1 @@ -44,10 +44,4 @@ cd $openaldir cd build -echo "Configuring..." -$configure_args = "..", "-G", "NMake Makefiles", "-DCMAKE_BUILD_TYPE=Release" -& cmake $configure_args - -echo "Building" -$build_args = "--build", "." -& cmake $build_args +& "$($start_dir.Path)\ci\appveyor\build_wxwidgets.cmd" From 27bd0207701878e4a05ca49f882a425e40e6366d Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 15:02:15 -0600 Subject: [PATCH 21/49] Run the right build script --- ci/appveyor/load_openal.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/load_openal.ps1 b/ci/appveyor/load_openal.ps1 index 73ed3ef..021acd3 100644 --- a/ci/appveyor/load_openal.ps1 +++ b/ci/appveyor/load_openal.ps1 @@ -44,4 +44,4 @@ cd $openaldir cd build -& "$($start_dir.Path)\ci\appveyor\build_wxwidgets.cmd" +& "$($start_dir.Path)\ci\appveyor\build_openal.cmd" From ab2fac05c8c411ef49b8485ea728a07eb87a2420 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 15:23:11 -0600 Subject: [PATCH 22/49] More configure options for cmake --- ci/appveyor/build.cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index f93eea8..9001ff3 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -10,7 +10,10 @@ cd build echo. echo Configuring build -cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% -DCMAKE_BUILD_TYPE=%Configuration% +cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% ^ + -DCMAKE_BUILD_TYPE=%Configuration% ^ + -DOPENAL_LIBRARY=%OPENAL_LIBRARY% ^ + -DOPENAL_INCLUDE_DIR=%OPENAL_INCLUDE_DIR% if ERRORLEVEL 1 exit /b %ERRORLEVEL% echo. From ee7a44c7404017dfe0d63788a79d36a6a53c5992 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 15:29:04 -0600 Subject: [PATCH 23/49] Add support for wxWidgets 3.1 to CI --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f78a823..6661a18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,9 @@ if(DEFINED WXVER AND NOT WXVER MATCHES "PLATFORM") elseif(WXVER MATCHES "3.0") find_package(wxWidgets 3.0.2 COMPONENTS base core net xml html adv qa richtext) + elseif(WXVER MATCHES "3.1") + find_package(wxWidgets 3.1.0 + COMPONENTS base core net xml html adv qa richtext) else() message(FATAL_ERROR "Unknown WXVER forced") endif() From 3a75fc806f8f658c1c1b3b6f31321e71dc6d59d3 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 15:32:29 -0600 Subject: [PATCH 24/49] Remove remaining bits of futures prerequisit --- scripts/ohm/utilfunctions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/ohm/utilfunctions.py b/scripts/ohm/utilfunctions.py index 0b415c4..94dce86 100644 --- a/scripts/ohm/utilfunctions.py +++ b/scripts/ohm/utilfunctions.py @@ -2,9 +2,6 @@ print_function, unicode_literals) import traceback - -from builtins import * - import logging import os import os.path @@ -131,4 +128,4 @@ def rmtree_error_handler(function, path, excinfo): logging.error(" %s: %s", type.__name__, value) for filename, line, function, text in traceback.extract_tb(tb): logging.error("%s:%d %s", os.path.basename(filename), line, function) - logging.error(" %s", text) \ No newline at end of file + logging.error(" %s", text) From 0b52744e8a87133ef11484eebb6d6dd79853fe81 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 15:56:26 -0600 Subject: [PATCH 25/49] Include markdown for the python --- appveyor.yml | 4 +++- ci/appveyor/load_openal.ps1 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b53918d..0571565 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,9 @@ platform: configuration: - RelDbgInfo - Debug -build_script: +install: - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" + - %PYTHON%\Scripts\pip.exe install markdown +build_script: - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" diff --git a/ci/appveyor/load_openal.ps1 b/ci/appveyor/load_openal.ps1 index 021acd3..cda746d 100644 --- a/ci/appveyor/load_openal.ps1 +++ b/ci/appveyor/load_openal.ps1 @@ -11,7 +11,7 @@ if (Test-Path $openaldir) { echo "$($openaldir) already exists" exit 0 } -echo "$($openaldir) is missing. Getting wx" +echo "$($openaldir) is missing. Getting openal" if (Test-Path $openalfile) { echo "Zip exists" From 688e83ab3ff5e9e947cd838deb8db040a050c60f Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 16:02:12 -0600 Subject: [PATCH 26/49] Set python for CI from ENV --- ci/appveyor/build.cmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index 9001ff3..fb81923 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -13,7 +13,8 @@ echo Configuring build cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% ^ -DCMAKE_BUILD_TYPE=%Configuration% ^ -DOPENAL_LIBRARY=%OPENAL_LIBRARY% ^ - -DOPENAL_INCLUDE_DIR=%OPENAL_INCLUDE_DIR% + -DOPENAL_INCLUDE_DIR=%OPENAL_INCLUDE_DIR% ^ + -DPYTHON_EXECUTABLE=%PYTHON%\python.exe if ERRORLEVEL 1 exit /b %ERRORLEVEL% echo. From e59122ce2340928e9b22d9c64a36399e2719b413 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 16:03:46 -0600 Subject: [PATCH 27/49] Set python version in env --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 0571565..b08745f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,9 @@ environment: OPENAL_INCLUDE_DIR: C:\openal-soft-1.17.2\include\AL matrix: - WXVER: "2.8" + PYTHON: "C:\\Python35" - WXVER: "3.1" + PYTHON: "C:\\Python35" platform: - x86 configuration: From a1b1cbb54764f3162da5e1b5a2e3511a57328807 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 16:06:30 -0600 Subject: [PATCH 28/49] Quote %'s in config --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b08745f..b46fca9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,6 @@ configuration: install: - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - - %PYTHON%\Scripts\pip.exe install markdown + - "%PYTHON%\Scripts\pip.exe" install markdown build_script: - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From e6651d621085a5aa7c18b17bfae8d953701ec203 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 16:08:14 -0600 Subject: [PATCH 29/49] Escape backslashes --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b46fca9..a433ad2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,6 @@ configuration: install: - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - - "%PYTHON%\Scripts\pip.exe" install markdown + - "%PYTHON%\\Scripts\\pip.exe" install markdown build_script: - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From fa2eeffdc3e1b45bffdf6778f7fcd6d0b3c4ccf1 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 16:14:32 -0600 Subject: [PATCH 30/49] Fix quote --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a433ad2..e4cb0af 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,6 @@ configuration: install: - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - - "%PYTHON%\\Scripts\\pip.exe" install markdown + - "%PYTHON%\\Scripts\\pip.exe install markdown" build_script: - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" From 50b3d555d077df3732ad366ac8bd9638fed3c45c Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 16:59:57 -0600 Subject: [PATCH 31/49] RelWithDbgInfo is a tool for someone with a debugger Not something that should be used for released software --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e4cb0af..6e628c4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ environment: platform: - x86 configuration: - - RelDbgInfo + - Release - Debug install: - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" From 22a87919dbfc5e2d637be7530582b0ce182abf92 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 17:07:09 -0600 Subject: [PATCH 32/49] Don't attempt to build installers --- ci/appveyor/build.cmd | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index fb81923..7d1ab57 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -21,8 +21,3 @@ echo. echo Building nmake if ERRORLEVEL 1 exit /b %ERRORLEVEL% - -echo. -echo Making package -nmake package -if ERRORLEVEL 1 exit /b %ERRORLEVEL% From 8487b4e69032163427e1da0f885820d7789eee36 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 18:52:16 -0600 Subject: [PATCH 33/49] Rework wxwidgets handling to allow it to cache --- appveyor.yml | 23 +++++++++++++++++++++-- ci/appveyor/load_wxwidgets.ps1 | 28 ++++++++-------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6e628c4..7730fc9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,14 +1,23 @@ environment: - WXWIDGETS2.8: C:/wxMSW-2.8.12 - WXWIDGETS3.1: C:/wxWidgets-3.1.0 + WXSUM: 51784F296EB791209C9AD1BCBEADBCFCBEB57872611DBE5FF322D180E8491E9D + WXFILE: wxlauncher_widgets-1.0.1.7z + WXURL: "https://dl.bintray.com/issmneur/generic/:wxlauncher_widgets-1.0.1.7z" + WXWIDGETS2.8: C:/wx/wxMSW-2.8.12 + WXWIDGETS2.8-stl: C:/wx/wxMSW-2.8.12-stl + WXWIDGETS3.1: C:/wx/wxWidgets-3.1.0 + WXWIDGETS3.1-stl: C:/wx/wxWidgets-3.1.0-stl OPENAL: C:\openal-soft-1.17.2 OPENAL_LIBRARY: C:\openal-soft-1.17.2\build\OpenAL.lib OPENAL_INCLUDE_DIR: C:\openal-soft-1.17.2\include\AL matrix: - WXVER: "2.8" PYTHON: "C:\\Python35" + - WXVER: "2.8-stl" + PYTHON: "C:\\Python35" - WXVER: "3.1" PYTHON: "C:\\Python35" + - WXVER: "3.1-stl" + PYTHON: "C:\\Python35" platform: - x86 configuration: @@ -20,3 +29,13 @@ install: - "%PYTHON%\\Scripts\\pip.exe install markdown" build_script: - cmd: "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/build.cmd" +cache: + - C:\wx\wxMSW-2.8.12\include -> appveyor.yml + - C:\wx\wxMSW-2.8.12\lib\vc_lib -> appveyor.yml + - C:\wx\wxMSW-2.8.12-stl\include -> appveyor.yml + - C:\wx\wxMSW-2.8.12-stl\lib\vc_lib -> appveyor.yml + - C:\wx\wxWidgets-3.1.0\include -> appveyor.yml + - C:\wx\wxWidgets-3.1.0\lib\vc_lib -> appveyor.yml + - C:\wx\wxWidgets-3.1.0-stl\include -> appveyor.yml + - C:\wx\wxWidgets-3.1.0-stl\lib\vc_lib -> appveyor.yml + - C:\openal-soft-1.17.2 -> appveyor.yml diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 0b7a3d9..496c352 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -1,20 +1,10 @@ Get-Childitem -Path Env:* | Sort-Object Name -if ($ENV:WXVER -eq "2.8") { - $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxMSW-2.8.12.zip" - $wxdir = ${ENV:WXWIDGETS2.8} - $wxfile = "wxMSW-2.8.12.zip" - $sha2sum = "307D713D8AFFBED69A89418D9C9073193AADFEF4B16DA3D8EF68558A9F57AE88" - $7zipoutdir = "C:\" -} else { - $wxurl = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.7z" - $wxdir = ${ENV:WXWIDGETS3.1} - $wxfile = "wxWidgets-3.1.0.7z" - $sha2sum = "FDB970D6D3278B5ABD999E6F87295C2162E64184826D07B1AA26AB1E3E46BA27" - $7zipoutdir = $wxdir -} - $start_dir = $pwd +$wxdir = ${ENV:WXWIDGETS${ENV:WXVER}} +$wxfile = $ENV:WXFILE +$wxurl = $ENV:WXURL +$wxsum = $ENV:WXSUM if (Test-Path $wxdir) { echo "$($wxdir) already exists" @@ -25,7 +15,7 @@ echo "$($wxdir) is missing. Getting wx" if (Test-Path $wxfile) { echo "Zip exists" $sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" - if ($sum.Hash -ne $sha2sum) { + if ($sum.Hash -ne $wxsum) { echo "Current file hash doesn't match" Remove-Item $wxfile } @@ -36,21 +26,19 @@ if (-Not (Test-Path $wxfile)) { } $sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" -if ($sum.Hash -ne $sha2sum) { +if ($sum.Hash -ne $wxsum) { echo "ERROR: $($wxfile) is corrupt" - echo "Orig: $($sha2sum)" + echo "Orig: $($wxsum)" echo "Calc: $($sum.Hash)" exit 3 } -$unzip_args = "x", $wxfile, "-o$($7zipoutdir)" +$unzip_args = "x", $wxfile, "-y", "-oC:/" & "C:\Program Files\7-zip\7z.exe" $unzip_args cd $wxdir -if ($stl) {} - # Include is not needed and can be removed http://stackoverflow.com/a/17144445 (Get-Content src/msw/window.cpp) -replace '#include ', '' | Set-Content src/msw/window.cpp From 2724549ef4ae15c24715e5bbdc88a0157f2e7df6 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 18:55:46 -0600 Subject: [PATCH 34/49] Seems I am not allowed to do this --- ci/appveyor/load_wxwidgets.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 496c352..1936683 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -1,7 +1,7 @@ Get-Childitem -Path Env:* | Sort-Object Name $start_dir = $pwd -$wxdir = ${ENV:WXWIDGETS${ENV:WXVER}} +$wxdir = ${ENV:WXWIDGETS$`{ENV:WXVER}} $wxfile = $ENV:WXFILE $wxurl = $ENV:WXURL $wxsum = $ENV:WXSUM From f9720f1ef9e9f0d38dc2405bcd2bf81fc969a192 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 18:56:56 -0600 Subject: [PATCH 35/49] update --- ci/appveyor/load_wxwidgets.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 1936683..cc749b8 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -1,7 +1,7 @@ Get-Childitem -Path Env:* | Sort-Object Name $start_dir = $pwd -$wxdir = ${ENV:WXWIDGETS$`{ENV:WXVER}} +$wxdir = ${ENV:WXWIDGETS$`{ENV:WXVER`}} $wxfile = $ENV:WXFILE $wxurl = $ENV:WXURL $wxsum = $ENV:WXSUM From cd3b6d86155e79e574b90685a28e139af1395833 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 19:24:18 -0600 Subject: [PATCH 36/49] rework how wxfolder is selected --- ci/appveyor/load_wxwidgets.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index cc749b8..72e248e 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -1,7 +1,16 @@ Get-Childitem -Path Env:* | Sort-Object Name $start_dir = $pwd -$wxdir = ${ENV:WXWIDGETS$`{ENV:WXVER`}} +switch ($ENV:WXVER) { + "2.8" {$wxdir = ${ENV:WXWIDGETS2.8} } + "2.8-stl" {$wxdir = ${ENV:WXWIDGETS2.8-stl} } + "3.1" {$wxdir = ${ENV:WXWIDGETS3.1} } + "3.1-stl" {$wxdir = ${ENV:WXWIDGETS3.1-stl} } + default { + echo "$($ENV:WXVER) is unhandled" + exit 4 + } +} $wxfile = $ENV:WXFILE $wxurl = $ENV:WXURL $wxsum = $ENV:WXSUM From 99771001c673a3ab03c5beff5101ca9d97f5f2e5 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 19:41:23 -0600 Subject: [PATCH 37/49] Report the paths be used --- ci/appveyor/load_wxwidgets.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 72e248e..fafcd30 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -22,7 +22,7 @@ if (Test-Path $wxdir) { echo "$($wxdir) is missing. Getting wx" if (Test-Path $wxfile) { - echo "Zip exists" + echo "Zip exists $wxfile" $sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256" if ($sum.Hash -ne $wxsum) { echo "Current file hash doesn't match" @@ -30,7 +30,7 @@ if (Test-Path $wxfile) { } } if (-Not (Test-Path $wxfile)) { - echo "Fetching zip" + echo "Fetching $wxfile from $wxurl" (new-object net.webclient).DownloadFile($wxurl, $wxfile) } From c6c871b694307558741f9c8b69efb908fc0f155a Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 19:43:02 -0600 Subject: [PATCH 38/49] vim typo's --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7730fc9..4441e00 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ environment: WXSUM: 51784F296EB791209C9AD1BCBEADBCFCBEB57872611DBE5FF322D180E8491E9D WXFILE: wxlauncher_widgets-1.0.1.7z - WXURL: "https://dl.bintray.com/issmneur/generic/:wxlauncher_widgets-1.0.1.7z" + WXURL: "https://dl.bintray.com/issmneur/generic/wxlauncher_widgets-1.0.1.7z" WXWIDGETS2.8: C:/wx/wxMSW-2.8.12 WXWIDGETS2.8-stl: C:/wx/wxMSW-2.8.12-stl WXWIDGETS3.1: C:/wx/wxWidgets-3.1.0 From 79748bc32ef851823c7edfe3be8c82f63ac06477 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Sun, 18 Sep 2016 21:04:08 -0600 Subject: [PATCH 39/49] Fix setup.h on every run --- ci/appveyor/load_wxwidgets.ps1 | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index fafcd30..8ea8f1d 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -2,10 +2,22 @@ Get-Childitem -Path Env:* | Sort-Object Name $start_dir = $pwd switch ($ENV:WXVER) { - "2.8" {$wxdir = ${ENV:WXWIDGETS2.8} } - "2.8-stl" {$wxdir = ${ENV:WXWIDGETS2.8-stl} } - "3.1" {$wxdir = ${ENV:WXWIDGETS3.1} } - "3.1-stl" {$wxdir = ${ENV:WXWIDGETS3.1-stl} } + "2.8" { + $wxdir = ${ENV:WXWIDGETS2.8} + $stl = 'No' + } + "2.8-stl" { + $wxdir = ${ENV:WXWIDGETS2.8-stl} + $stl = 'Yes' + } + "3.1" { + $wxdir = ${ENV:WXWIDGETS3.1} + $stl = 'No' + } + "3.1-stl" { + $wxdir = ${ENV:WXWIDGETS3.1-stl} + $stl = 'Yes' + } default { echo "$($ENV:WXVER) is unhandled" exit 4 @@ -50,6 +62,13 @@ cd $wxdir # Include is not needed and can be removed http://stackoverflow.com/a/17144445 (Get-Content src/msw/window.cpp) -replace '#include ', '' | Set-Content src/msw/window.cpp +$setuph = "include/msw/setup.h" +if ($stl -eq 'Yes') { + echo "Mangling $setuph" + (Get-Content $setuph) -replace '#define wxUSE_STL 0', '#define wxUSE_STL 1' | Set-Content $setuph +} else { + echo "Not magngling $setuph" +} cd build\msw From 6204efe78422db93b7205e936c1fa6ad7cacbdd5 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 19:31:57 -0600 Subject: [PATCH 40/49] Use the correct path for the setup.h --- ci/appveyor/load_wxwidgets.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 8ea8f1d..1803b7c 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -62,7 +62,7 @@ cd $wxdir # Include is not needed and can be removed http://stackoverflow.com/a/17144445 (Get-Content src/msw/window.cpp) -replace '#include ', '' | Set-Content src/msw/window.cpp -$setuph = "include/msw/setup.h" +$setuph = "include/wx/msw/setup.h" if ($stl -eq 'Yes') { echo "Mangling $setuph" (Get-Content $setuph) -replace '#define wxUSE_STL 0', '#define wxUSE_STL 1' | Set-Content $setuph From cee3eb86bad3795b21c881ea3df0ad1be41ca50e Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 19:56:41 -0600 Subject: [PATCH 41/49] Rebuild --- ci/appveyor/load_wxwidgets.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 1803b7c..b7def34 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -60,6 +60,7 @@ $unzip_args = "x", $wxfile, "-y", "-oC:/" cd $wxdir + # Include is not needed and can be removed http://stackoverflow.com/a/17144445 (Get-Content src/msw/window.cpp) -replace '#include ', '' | Set-Content src/msw/window.cpp $setuph = "include/wx/msw/setup.h" From bd25e4f1c31260420f934aac7806337846bd3fe7 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 20:35:04 -0600 Subject: [PATCH 42/49] Use the actual commit as the build number --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 4441e00..3bc7740 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,6 +24,7 @@ configuration: - Release - Debug install: + - ps: git describe --tags | Set-Variable -Name tag; appveyor UpdateBuild -Version "$tag-{build}" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - "%PYTHON%\\Scripts\\pip.exe install markdown" From 0c23fca65ae15f2454bf9efc44806f31e0b2c8a8 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 20:55:33 -0600 Subject: [PATCH 43/49] Fail fast --- ci/appveyor/build_openal.cmd | 2 ++ ci/appveyor/build_wxwidgets.cmd | 3 ++- ci/appveyor/load_openal.ps1 | 3 +++ ci/appveyor/load_wxwidgets.ps1 | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/appveyor/build_openal.cmd b/ci/appveyor/build_openal.cmd index c208ca0..48aaba8 100644 --- a/ci/appveyor/build_openal.cmd +++ b/ci/appveyor/build_openal.cmd @@ -11,6 +11,8 @@ call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Pla echo "Configuring..." cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release +if ERRORLEVEL 1 exit /b %ERRORLEVEL% echo "Building" cmake .. --build . +if ERRORLEVEL 1 exit /b %ERRORLEVEL% diff --git a/ci/appveyor/build_wxwidgets.cmd b/ci/appveyor/build_wxwidgets.cmd index badb8f7..ce524d6 100644 --- a/ci/appveyor/build_wxwidgets.cmd +++ b/ci/appveyor/build_wxwidgets.cmd @@ -9,4 +9,5 @@ set %1=%2 call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Platform% -nmake -f makefile.vc BUILD=%BUILD% UNICODE=1 \ No newline at end of file +nmake -f makefile.vc BUILD=%BUILD% UNICODE=1 +if ERRORLEVEL 1 exit /b %ERRORLEVEL% diff --git a/ci/appveyor/load_openal.ps1 b/ci/appveyor/load_openal.ps1 index cda746d..963a6d2 100644 --- a/ci/appveyor/load_openal.ps1 +++ b/ci/appveyor/load_openal.ps1 @@ -36,12 +36,15 @@ if ($sum.Hash -ne $sha2sum) { $unzip_args = "x", $openalfile, "-y" & "C:\Program Files\7-zip\7z.exe" $unzip_args +if ($exitcode -gt 0) exit $exitcode $unzip_args = "x", $openaltar, "-y", "-o$($7zipoutdir)" & "C:\Program Files\7-zip\7z.exe" $unzip_args +if ($exitcode -gt 0) exit $exitcode cd $openaldir cd build & "$($start_dir.Path)\ci\appveyor\build_openal.cmd" +if ($exitcode -gt 0) exit $exitcode diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index b7def34..0b5f9ac 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -57,6 +57,7 @@ if ($sum.Hash -ne $wxsum) { $unzip_args = "x", $wxfile, "-y", "-oC:/" & "C:\Program Files\7-zip\7z.exe" $unzip_args +if ($exitcode -gt 0) exit $exitcode cd $wxdir @@ -81,4 +82,4 @@ if ($ENV:Configuration -eq "Debug") { echo "Building UNICODE=1 $($buildtype)" $build_args = "UNICODE=1", $buildtype & "$($start_dir.Path)\ci\appveyor\build_wxwidgets.cmd" $build_args - +if ($exitcode -gt 0) exit $exitcode From 59ad2c33033cc801c32d4b5074eff3ababc07467 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 20:57:06 -0600 Subject: [PATCH 44/49] Doesn't sub {build} --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3bc7740..1431109 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ configuration: - Release - Debug install: - - ps: git describe --tags | Set-Variable -Name tag; appveyor UpdateBuild -Version "$tag-{build}" + - ps: git describe --tags | Set-Variable -Name tag; appveyor UpdateBuild -Version "$tag" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - "%PYTHON%\\Scripts\\pip.exe install markdown" From cca1fc71074b68e4135e405b0584cc187f8603c1 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 21:00:55 -0600 Subject: [PATCH 45/49] Need blocks after if --- ci/appveyor/load_openal.ps1 | 6 +++--- ci/appveyor/load_wxwidgets.ps1 | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/appveyor/load_openal.ps1 b/ci/appveyor/load_openal.ps1 index 963a6d2..6f5e6a1 100644 --- a/ci/appveyor/load_openal.ps1 +++ b/ci/appveyor/load_openal.ps1 @@ -36,15 +36,15 @@ if ($sum.Hash -ne $sha2sum) { $unzip_args = "x", $openalfile, "-y" & "C:\Program Files\7-zip\7z.exe" $unzip_args -if ($exitcode -gt 0) exit $exitcode +if ($exitcode -gt 0) {exit $exitcode} $unzip_args = "x", $openaltar, "-y", "-o$($7zipoutdir)" & "C:\Program Files\7-zip\7z.exe" $unzip_args -if ($exitcode -gt 0) exit $exitcode +if ($exitcode -gt 0) {exit $exitcode} cd $openaldir cd build & "$($start_dir.Path)\ci\appveyor\build_openal.cmd" -if ($exitcode -gt 0) exit $exitcode +if ($exitcode -gt 0) {exit $exitcode} diff --git a/ci/appveyor/load_wxwidgets.ps1 b/ci/appveyor/load_wxwidgets.ps1 index 0b5f9ac..eb65592 100644 --- a/ci/appveyor/load_wxwidgets.ps1 +++ b/ci/appveyor/load_wxwidgets.ps1 @@ -57,7 +57,7 @@ if ($sum.Hash -ne $wxsum) { $unzip_args = "x", $wxfile, "-y", "-oC:/" & "C:\Program Files\7-zip\7z.exe" $unzip_args -if ($exitcode -gt 0) exit $exitcode +if ($exitcode -gt 0) {exit $exitcode} cd $wxdir @@ -82,4 +82,4 @@ if ($ENV:Configuration -eq "Debug") { echo "Building UNICODE=1 $($buildtype)" $build_args = "UNICODE=1", $buildtype & "$($start_dir.Path)\ci\appveyor\build_wxwidgets.cmd" $build_args -if ($exitcode -gt 0) exit $exitcode +if ($exitcode -gt 0) {exit $exitcode} From 53b634715104f618b6596338a4a3489ceb453c0f Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 21:59:11 -0600 Subject: [PATCH 46/49] Update new resources Fixes missing #include in list.h for building with VS2015 --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1431109..2534bf4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ environment: - WXSUM: 51784F296EB791209C9AD1BCBEADBCFCBEB57872611DBE5FF322D180E8491E9D - WXFILE: wxlauncher_widgets-1.0.1.7z - WXURL: "https://dl.bintray.com/issmneur/generic/wxlauncher_widgets-1.0.1.7z" + WXSUM: EA219E64377E78AA5CDB7C438A5D3E19B91FD22EB9DE33FA21447EF0EEA794D9 + WXFILE: wxlauncher_widgets-1.0.2.7z + WXURL: "https://dl.bintray.com/issmneur/generic/:wxlauncher_widgets-1.0.2.7z" WXWIDGETS2.8: C:/wx/wxMSW-2.8.12 WXWIDGETS2.8-stl: C:/wx/wxMSW-2.8.12-stl WXWIDGETS3.1: C:/wx/wxWidgets-3.1.0 @@ -39,4 +39,4 @@ cache: - C:\wx\wxWidgets-3.1.0\lib\vc_lib -> appveyor.yml - C:\wx\wxWidgets-3.1.0-stl\include -> appveyor.yml - C:\wx\wxWidgets-3.1.0-stl\lib\vc_lib -> appveyor.yml - - C:\openal-soft-1.17.2 -> appveyor.yml + - C:\openal-soft-1.17.2\build -> appveyor.yml From 77d220946512c98180438eafa2d9033600b6eeab Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 22:04:00 -0600 Subject: [PATCH 47/49] Remove : from url --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2534bf4..9dfd323 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ environment: WXSUM: EA219E64377E78AA5CDB7C438A5D3E19B91FD22EB9DE33FA21447EF0EEA794D9 WXFILE: wxlauncher_widgets-1.0.2.7z - WXURL: "https://dl.bintray.com/issmneur/generic/:wxlauncher_widgets-1.0.2.7z" + WXURL: "https://dl.bintray.com/issmneur/generic/wxlauncher_widgets-1.0.2.7z" WXWIDGETS2.8: C:/wx/wxMSW-2.8.12 WXWIDGETS2.8-stl: C:/wx/wxMSW-2.8.12-stl WXWIDGETS3.1: C:/wx/wxWidgets-3.1.0 From 8ba0fe727b723279d1c55726b88987be7b6abedf Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 22:17:56 -0600 Subject: [PATCH 48/49] More complete matrix --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 9dfd323..1f7eb56 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,8 +18,13 @@ environment: PYTHON: "C:\\Python35" - WXVER: "3.1-stl" PYTHON: "C:\\Python35" +matrix: + fast_finish: true + allow_failures: + - platform: x64 platform: - x86 + - x64 configuration: - Release - Debug From 8da880cd3a72d2800417f9f1518b982c3e76c1e3 Mon Sep 17 00:00:00 2001 From: Iss Mneur Date: Fri, 23 Sep 2016 22:59:38 -0600 Subject: [PATCH 49/49] Put the build number on the version --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1f7eb56..f969335 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,9 @@ configuration: - Release - Debug install: - - ps: git describe --tags | Set-Variable -Name tag; appveyor UpdateBuild -Version "$tag" + - ps: | + git describe --tags | Set-Variable -Name tag + appveyor UpdateBuild -Version "$tag-${ENV:APPVEYOR_BUILD_NUMBER}" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_wxwidgets.ps1" - powershell "%APPVEYOR_BUILD_FOLDER%/ci/appveyor/load_openal.ps1" - "%PYTHON%\\Scripts\\pip.exe install markdown"