Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5c3ef9d
Lets try appveyor
IssMneur Sep 17, 2016
851e899
Yaml doesn't like %?
IssMneur Sep 17, 2016
3b1206a
more fiddling
IssMneur Sep 17, 2016
0abdf1c
Lets run with echo on
IssMneur Sep 17, 2016
29bea08
Figure out why git can't find repo
IssMneur Sep 17, 2016
9cf8b0a
More debuggin
IssMneur Sep 17, 2016
030289e
git tools don't work on shallow clones
IssMneur Sep 17, 2016
0bb3346
Remove some debugging
IssMneur Sep 18, 2016
0029c34
Build wxWidgets first
IssMneur Sep 18, 2016
8d5dac7
Build wxwidgets
IssMneur Sep 18, 2016
e9412a3
Why no run?
IssMneur Sep 18, 2016
b4c5987
Where did it hang?
IssMneur Sep 18, 2016
e8c81c1
Try a different downloader
IssMneur Sep 18, 2016
64886b5
Another option?
IssMneur Sep 18, 2016
c8a8812
Get the wxWidgets folder from env as CmakeLists expects
IssMneur Sep 18, 2016
89d3f73
Set env in right place
IssMneur Sep 18, 2016
471510a
Dump env at script startup
IssMneur Sep 18, 2016
d0125e5
Lets try with the slashes the otherway
IssMneur Sep 18, 2016
f4e52bc
Build openal as well
IssMneur Sep 18, 2016
3341053
Need to do it this way
IssMneur Sep 18, 2016
27bd020
Run the right build script
IssMneur Sep 18, 2016
ab2fac0
More configure options for cmake
IssMneur Sep 18, 2016
ee7a44c
Add support for wxWidgets 3.1 to CI
IssMneur Sep 18, 2016
3a75fc8
Remove remaining bits of futures prerequisit
IssMneur Sep 18, 2016
0b52744
Include markdown for the python
IssMneur Sep 18, 2016
688e83a
Set python for CI from ENV
IssMneur Sep 18, 2016
e59122c
Set python version in env
IssMneur Sep 18, 2016
a1b1cbb
Quote %'s in config
IssMneur Sep 18, 2016
e6651d6
Escape backslashes
IssMneur Sep 18, 2016
fa2eeff
Fix quote
IssMneur Sep 18, 2016
50b3d55
RelWithDbgInfo is a tool for someone with a debugger
IssMneur Sep 18, 2016
22a8791
Don't attempt to build installers
IssMneur Sep 18, 2016
8487b4e
Rework wxwidgets handling to allow it to cache
IssMneur Sep 19, 2016
2724549
Seems I am not allowed to do this
IssMneur Sep 19, 2016
f9720f1
update
IssMneur Sep 19, 2016
cd3b6d8
rework how wxfolder is selected
IssMneur Sep 19, 2016
9977100
Report the paths be used
IssMneur Sep 19, 2016
c6c871b
vim typo's
IssMneur Sep 19, 2016
79748bc
Fix setup.h on every run
IssMneur Sep 19, 2016
6204efe
Use the correct path for the setup.h
IssMneur Sep 24, 2016
cee3eb8
Rebuild
IssMneur Sep 24, 2016
bd25e4f
Use the actual commit as the build number
IssMneur Sep 24, 2016
0c23fca
Fail fast
IssMneur Sep 24, 2016
59ad2c3
Doesn't sub {build}
IssMneur Sep 24, 2016
cca1fc7
Need blocks after if
IssMneur Sep 24, 2016
53b6347
Update new resources
IssMneur Sep 24, 2016
77d2209
Remove : from url
IssMneur Sep 24, 2016
8ba0fe7
More complete matrix
IssMneur Sep 24, 2016
8da880c
Put the build number on the version
IssMneur Sep 24, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
49 changes: 49 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
environment:
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
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"
matrix:
fast_finish: true
allow_failures:
- platform: x64
platform:
- x86
- x64
configuration:
- Release
- Debug
install:
- 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"
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\build -> appveyor.yml
23 changes: 23 additions & 0 deletions ci/appveyor/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
setlocal ENABLEEXTENSIONS

echo on

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %Platform%

cd %APPVEYOR_BUILD_FOLDER%
if not exist build (mkdir build)
cd build

echo.
echo Configuring build
cmake .. -G "NMake Makefiles" -DWXVER=%WXVER% ^
-DCMAKE_BUILD_TYPE=%Configuration% ^
-DOPENAL_LIBRARY=%OPENAL_LIBRARY% ^
-DOPENAL_INCLUDE_DIR=%OPENAL_INCLUDE_DIR% ^
-DPYTHON_EXECUTABLE=%PYTHON%\python.exe
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

echo.
echo Building
nmake
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
18 changes: 18 additions & 0 deletions ci/appveyor/build_openal.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
: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
if ERRORLEVEL 1 exit /b %ERRORLEVEL%

echo "Building"
cmake .. --build .
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
13 changes: 13 additions & 0 deletions ci/appveyor/build_wxwidgets.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
: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
if ERRORLEVEL 1 exit /b %ERRORLEVEL%
50 changes: 50 additions & 0 deletions ci/appveyor/load_openal.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
$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 openal"

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
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}
85 changes: 85 additions & 0 deletions ci/appveyor/load_wxwidgets.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Get-Childitem -Path Env:* | Sort-Object Name

$start_dir = $pwd
switch ($ENV:WXVER) {
"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
}
}
$wxfile = $ENV:WXFILE
$wxurl = $ENV:WXURL
$wxsum = $ENV:WXSUM

if (Test-Path $wxdir) {
echo "$($wxdir) already exists"
exit 0
}
echo "$($wxdir) is missing. Getting wx"

if (Test-Path $wxfile) {
echo "Zip exists $wxfile"
$sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256"
if ($sum.Hash -ne $wxsum) {
echo "Current file hash doesn't match"
Remove-Item $wxfile
}
}
if (-Not (Test-Path $wxfile)) {
echo "Fetching $wxfile from $wxurl"
(new-object net.webclient).DownloadFile($wxurl, $wxfile)
}

$sum = Get-FileHash -LiteralPath $wxfile -Algorithm "SHA256"
if ($sum.Hash -ne $wxsum) {
echo "ERROR: $($wxfile) is corrupt"
echo "Orig: $($wxsum)"
echo "Calc: $($sum.Hash)"
exit 3
}

$unzip_args = "x", $wxfile, "-y", "-oC:/"

& "C:\Program Files\7-zip\7z.exe" $unzip_args
if ($exitcode -gt 0) {exit $exitcode}

cd $wxdir


# Include is not needed and can be removed http://stackoverflow.com/a/17144445
(Get-Content src/msw/window.cpp) -replace '#include <pbt.h>', '' | Set-Content src/msw/window.cpp
$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
} else {
echo "Not magngling $setuph"
}

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
if ($exitcode -gt 0) {exit $exitcode}
5 changes: 1 addition & 4 deletions scripts/ohm/utilfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
print_function, unicode_literals)

import traceback

from builtins import *

import logging
import os
import os.path
Expand Down Expand Up @@ -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)
logging.error(" %s", text)