Skip to content

Commit

Permalink
Merge pull request #310 from azarzadavila/windows
Browse files Browse the repository at this point in the history
Add CI for Windows
  • Loading branch information
layus authored Aug 23, 2018
2 parents 6b06b1a + 0f5cd36 commit 91589dd
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ if(MINGW)
CACHE STRING "Version of GCC in your MinGW installation")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format -Wno-format-extra-args")
set(CMAKE_CXX_STANDARD_LIBRARIES "-static -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")

# Linking mingw libs statically
set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive, -static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")

# Check for gcc target architecture
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE GCC_ARCH)
string(STRIP "${GCC_ARCH}" GCC_ARCH_TRIPLE)
Expand Down
54 changes: 54 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: 2.0.0-beta.1-{branch}+{build}
image: Visual Studio 2015
environment:
BOOST_ROOT: C:\Libraries\boost_1_65_1

install:
- 'git submodule update --init'
- ps: '$env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "")'
- ps: '$env:path = "C:\msys64\mingw64\bin;C:\msys64\usr\bin\;" + $env:path'

build_script:

# uninstall tcl/tk
- pacman -Rdd --noconfirm mingw-w64-x86_64-tcl mingw-w64-x86_64-tk

# build tcl
- cd C:\projects
- wget -O tcl-release.tar.gz https://github.com/tcltk/tcl/archive/release.tar.gz
- tar xf tcl-release.tar.gz
- cd tcl-release/win/
- bash configure --enable-threads --enable-64bit --prefix=C:/tcltk/
- make
- make install

# build tk
- cd C:\projects
- wget -O tk-release.tar.gz https://github.com/tcltk/tk/archive/release.tar.gz
- tar xf tk-release.tar.gz
- cd tk-release/win/
- bash configure --enable-64bit --prefix=C:/tcltk/ --with-tcl=../../tcl-release/win/
- make
- make install

# build boost
- cd %BOOST_ROOT%
- call bootstrap.bat gcc
- cat bootstrap.log
- .\b2 toolset=gcc variant=release --with-thread --with-system --with-random --with-filesystem --with-program_options

# install emacs
# We cannot use $(pacman -S *-emacs because ISS packs C:/.../emacs.exe/../* which would include all of msys)
- choco install emacs64

# build mozart2
- mkdir C:\projects\mozart2\build
- cd C:\projects\mozart2\build
- cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" -DCMAKE_PREFIX_PATH=C:/tcltk -DBOOST_ROOT="%BOOST_ROOT%" -DISS_INCLUDE_TCL=ON -DISS_INCLUDE_EMACS=ON C:\projects\mozart2
- make check || true
- cmake --build . --target installer -- VERBOSE=1

artifacts:
- path: build\mozart2-2.0.0-beta.1-x86_64-windows.exe
name: binary installer

5 changes: 5 additions & 0 deletions vm/boostenv/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ include_directories(${GENERATED_BOOSTSOURCES_DIR})

add_library(mozartvmboost boostvm.cc boostenvmodules.cc)
add_dependencies(mozartvmboost genboostsources)

# We add bcrypt lib(dynamically) for Windows
if(WIN32)
target_link_libraries(mozartvmboost bcrypt)
endif()

0 comments on commit 91589dd

Please sign in to comment.