- Uses 32 version of Cygwin (on a 64 bit machine) - Adding PYTHON_EXECUTABLE override variable for Cygwin builds * We have to use the system CMake instead of the Cygwin CMake which detects the wrong version of Python - Update Bootloader build infrastructure to attempt tests on Windowsmaster
@@ -84,21 +84,35 @@ done | |||
# Run CMake commands | |||
## TODO Check for windows and do windows specific things ## | |||
mkdir -p "${BuildPath}" | |||
cd "${BuildPath}" | |||
cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" "${CMakeListsPath}" | |||
return_code=$? | |||
# Cygwin | |||
if [[ $(uname -s) == MINGW32_NT* ]] || [[ $(uname -s) == CYGWIN* ]]; then | |||
if [[ -z "$wincmake_path" ]]; then | |||
echo "Error wincmake_path environment variable has not been set, see -> https://github.com/kiibohd/controller/wiki/Windows-Setup" | |||
exit 1 | |||
fi | |||
echo "Cygwin Build" | |||
PATH="$wincmake_path":"${PATH}" cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" "${CMakeListsPath}" -G 'Unix Makefiles' | |||
# Linux / Mac (and everything else) | |||
else | |||
cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" "${CMakeListsPath}" | |||
return_code=$? | |||
fi | |||
if [ $return_code != 0 ] ; then | |||
echo "Error in cmake. Exiting..." | |||
exit $return_code | |||
echo "Error in cmake. Exiting..." | |||
exit $return_code | |||
fi | |||
make | |||
return_code=$? | |||
if [ $return_code != 0 ] ; then | |||
echo "Error in make. Exiting..." | |||
exit $return_code | |||
echo "Error in make. Exiting..." | |||
exit $return_code | |||
fi | |||
echo "Firmware has been compiled into: '${BuildPath}'" |
@@ -93,6 +93,7 @@ if [[ $(uname -s) == MINGW32_NT* ]] || [[ $(uname -s) == CYGWIN* ]]; then | |||
echo "Error wincmake_path environment variable has not been set, see -> https://github.com/kiibohd/controller/wiki/Windows-Setup" | |||
exit 1 | |||
fi | |||
echo "Cygwin Build" | |||
PATH="$wincmake_path":"${PATH}" cmake -DCHIP="${Chip}" -DCOMPILER="${Compiler}" -DScanModule="${ScanModule}" -DMacroModule="${MacroModule}" -DOutputModule="${OutputModule}" -DDebugModule="${DebugModule}" -DBaseMap="${BaseMap}" -DDefaultMap="${DefaultMap}" -DPartialMaps="${PartialMapsExpanded}" "${CMakeListsPath}" -G 'Unix Makefiles' | |||
return_code=$? | |||
@@ -104,15 +105,15 @@ else | |||
fi | |||
if [ $return_code != 0 ] ; then | |||
echo "Error in cmake. Exiting..." | |||
exit $return_code | |||
echo "Error in cmake. Exiting..." | |||
exit $return_code | |||
fi | |||
make | |||
return_code=$? | |||
if [ $return_code != 0 ] ; then | |||
echo "Error in make. Exiting..." | |||
exit $return_code | |||
echo "Error in make. Exiting..." | |||
exit $return_code | |||
fi | |||
echo "Firmware has been compiled into: '${BuildPath}'" |
@@ -16,9 +16,17 @@ if ( "${MacroModule}" STREQUAL "PartialMap" ) | |||
### | |||
# Python 3 is required for kll | |||
# Check disabled for Win32 as it can't detect version correctly (we don't use Python directly through CMake anyways) | |||
# | |||
set ( PYTHON_EXECUTABLE python3 ) # Required on systems where python is 2, not 3 | |||
find_package ( PythonInterp 3 REQUIRED ) | |||
if ( NOT WIN32 ) | |||
# Required on systems where python is 2, not 3 | |||
set ( PYTHON_EXECUTABLE | |||
python3 | |||
CACHE STRING "Python 3 Executable Path" | |||
) | |||
find_package ( PythonInterp 3 REQUIRED ) | |||
endif () | |||
### |
@@ -7,7 +7,8 @@ The [KLL](https://github.com/kiibohd/kll) git repo is automatically cloned durin | |||
Please refer to the [KLL](https://github.com/kiibohd/kll) repo or [kiibohd.com](http://kiibohd.com) for details on the KLL (Keyboard Layout Language) Spec. | |||
[](https://travis-ci.org/kiibohd/controller) | |||
[](https://travis-ci.org/kiibohd/controller) [](https://ci.appveyor.com/project/haata/controller/branch/master) | |||
[](https://kiwiirc.com/client/irc.freenode.net/#input.club) | |||
@@ -0,0 +1,59 @@ | |||
# appveyor file for kiibohd/controller | |||
# Used to test out the Cygwin builds | |||
platform: | |||
- x64 | |||
environment: | |||
global: | |||
CYG_MIRROR: http://cygwin.uib.no | |||
CYG_CACHE: C:/cygwin/var/cache/setup | |||
CYG_ARCH: x86 | |||
CYG_ROOT: C:/cygwin | |||
WIN_CMAKE: "/cygdrive/c/Program Files (x86)/CMake/bin" | |||
matrix: | |||
# Input Club Keyboard Tests | |||
- SCRIPT_DIR: Keyboards | |||
SCRIPT: infinity.bash | |||
- SCRIPT_DIR: Keyboards | |||
SCRIPT: infinity_led.bash | |||
- SCRIPT_DIR: Keyboards | |||
SCRIPT: ergodox.bash | |||
- SCRIPT_DIR: Keyboards | |||
SCRIPT: whitefox.bash | |||
# Debug Build Tests | |||
- SCRIPT_DIR: Keyboards/Testing | |||
SCRIPT: uartout.bash | |||
- SCRIPT_DIR: Keyboards/Testing | |||
SCRIPT: usbmuxuart.bash | |||
# Bootloader Build Tests | |||
- SCRIPT_DIR: Bootloader/Builds | |||
SCRIPT: mk20dx128vlf5.bash | |||
- SCRIPT_DIR: Bootloader/Builds | |||
SCRIPT: mk20dx256vlh7.bash | |||
init: | |||
- git config --global core.autocrlf input | |||
install: | |||
- 'appveyor DownloadFile http://cygwin.com/setup-%CYG_ARCH%.exe -FileName setup.exe' | |||
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P git -P make -P python3 -P ctags -P tree -P p7zip' | |||
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"/%SCRIPT_DIR% && export wincmake_path=\"%WIN_CMAKE%\" && which cmake"' | |||
- 'appveyor DownloadFile https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-win32.zip -FileName gcc-arm-none-eabi.zip' | |||
- dir | |||
- cmake --version | |||
build_script: | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && 7z x -o/ gcc-arm-none-eabi.zip"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && pwd"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && tree"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && cmake --version"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"/%SCRIPT_DIR% && export wincmake_path=\"%WIN_CMAKE%\" && export PATH=\"${wincmake_path}\":$PATH && cmake --version"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && git --version"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && python3 --version"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && arm-none-eabi-gcc --version"' | |||
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"/%SCRIPT_DIR% && export wincmake_path=\"%WIN_CMAKE%\" && COMPILER=gcc ./%SCRIPT%"' | |||