diff options
-rwxr-xr-x | CMakeLists.txt | 12 | ||||
-rw-r--r-- | Toolchain/mingw32.cmake | 3 | ||||
-rw-r--r-- | navit/support/gettext_intl/dcigettext.c | 7 | ||||
-rw-r--r-- | navit/support/gettext_intl/localealias.c | 4 | ||||
-rw-r--r-- | navit/zipfile.h | 4 | ||||
-rw-r--r-- | scripts/build_win32.sh | 27 |
6 files changed, 43 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 105766811..681b27b9d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -576,12 +576,6 @@ if(WIN32 OR WINCE) add_plugin(support/win32 "Windows detected" TRUE) SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -I ${CMAKE_CURRENT_SOURCE_DIR}/navit/gui/win32/resources <DEFINES> -i <SOURCE> -o <OBJECT>") - set_with_reason(support/ezxml "Windows detected" TRUE) - set_with_reason(speech/espeak "Windows detected" TRUE) - #speech/espeak does use windows threads, and therefore needs only parts of - #espeak lib. INTERNAL_ESPEAK_COMPLETE controls this. - set_with_reason(INTERNAL_ESPEAK_COMPLETE "Windows detected" FALSE) - set_with_reason(support/espeak "Windows detected" TRUE) set_with_reason(binding/win32 "Windows detected" TRUE) # vehicle_file is broken for windows. use vehicle_wince instead @@ -647,6 +641,12 @@ if(WINCE) set(HAVE_PRAGMA_PACK 1) set_with_reason(vehicle/file "wince: currently broken" FALSE) set_with_reason(vehicle/wince "wince detected" TRUE) + set_with_reason(support/ezxml "Windows detected" TRUE) + set_with_reason(speech/espeak "Windows detected" TRUE) + #speech/espeak does use windows threads, and therefore needs only parts of + #espeak lib. INTERNAL_ESPEAK_COMPLETE controls this. + set_with_reason(INTERNAL_ESPEAK_COMPLETE "Windows detected" FALSE) + set_with_reason(support/espeak "Windows detected" TRUE) endif() if (APPLE OR USE_UIKIT) set_with_reason(vehicle/iphone "apple detected" TRUE) diff --git a/Toolchain/mingw32.cmake b/Toolchain/mingw32.cmake index d00e7d6ab..f16eb51ad 100644 --- a/Toolchain/mingw32.cmake +++ b/Toolchain/mingw32.cmake @@ -7,6 +7,8 @@ FIND_PROGRAM(CMAKE_RC_COMPILER_INIT NAMES i686-w64-mingw32-windres i686-mingw32- FIND_PROGRAM(CMAKE_AR NAMES i686-w64-mingw32-ar i686-mingw32-ar i586-mingw32-ar i386-mingw32-ar i586-mingw32msvc-ar mingw32-ar ar.exe) +FIND_PROGRAM(PKG_CONFIG_EXECUTABLE i686-w64-mingw32-pkg-config mingw32-pkg-config) + IF (NOT CMAKE_FIND_ROOT_PATH) EXECUTE_PROCESS( COMMAND ${CMAKE_C_COMPILER} -print-sysroot @@ -14,7 +16,6 @@ EXECUTE_PROCESS( ) ENDIF(NOT CMAKE_FIND_ROOT_PATH) -set(PKG_CONFIG_EXECUTABLE "mingw32-pkg-config") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) diff --git a/navit/support/gettext_intl/dcigettext.c b/navit/support/gettext_intl/dcigettext.c index 9d4e3542e..1b66fba37 100644 --- a/navit/support/gettext_intl/dcigettext.c +++ b/navit/support/gettext_intl/dcigettext.c @@ -133,6 +133,11 @@ extern int errno; # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif +#if defined(__MINGW32__) && !defined(__MINGW32CE__) +# define HAVE_MEMPCPY 1 +#endif + + /* @@ end of prolog @@ */ #ifdef _LIBC @@ -158,7 +163,7 @@ char *getcwd (); # ifndef HAVE_STPCPY static char *stpcpy (char *dest, const char *src); # endif -# ifndef HAVE_MEMPCPY +# if !defined(HAVE_MEMPCPY) static void *mempcpy (void *dest, const void *src, size_t n); # endif #endif diff --git a/navit/support/gettext_intl/localealias.c b/navit/support/gettext_intl/localealias.c index ee27649af..9078994d4 100644 --- a/navit/support/gettext_intl/localealias.c +++ b/navit/support/gettext_intl/localealias.c @@ -88,6 +88,10 @@ char *alloca (); __libc_lock_define_initialized (static, lock); #endif +#if defined(__MINGW32__) && !defined(__MINGW32CE__) +# define HAVE_MEMPCPY 1 +#endif + #ifndef internal_function # define internal_function #endif diff --git a/navit/zipfile.h b/navit/zipfile.h index 8002e48d9..9edccf2ef 100644 --- a/navit/zipfile.h +++ b/navit/zipfile.h @@ -167,10 +167,6 @@ struct zip64_eocl { int zip74lnum; } ATTRIBUTE_PACKED; -struct zip_alignment_check { - int x[sizeof(struct zip_cd) == 46 ? 1:-1]; -}; - #ifdef HAVE_PRAGMA_PACK #pragma pack(pop) #endif diff --git a/scripts/build_win32.sh b/scripts/build_win32.sh index b9ba8d30a..3fbe81d1d 100644 --- a/scripts/build_win32.sh +++ b/scripts/build_win32.sh @@ -1,10 +1,33 @@ #!/usr/bin/env bash set -e -apt-get update && apt-get install -y mingw32 mingw32-binutils mingw32-runtime default-jdk nsis libsaxonb-java +export nixpaste="curl -F 'text=<-' http://nixpaste.lbr.uno" +apt-get update && apt-get install -y mingw-w64 mingw-w64-tools \ + default-jdk nsis libsaxonb-java curl mkdir win32 pushd win32 -cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DXSLTS=windows -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ && make -j $(nproc --all) && make -j $(nproc --all) package +if ! cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n \ + -DXSLTS=windows -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ +then + find . + #nixpaste < ./CMakeFiles/CMakeError.log + exit 1 +fi + +if ! make -j $(nproc --all) +then + echo "make" + make -d + nixpaste < ./Makefile || cat ./Makefile + exit 1 +fi + +if ! make -j $(nproc --all) package +then + echo "make package" + nixpaste < ./Makefile + exit 1 +fi popd cp win32/*.exe $CIRCLE_ARTIFACTS/ |