Skip to content

Commit 4f0f127

Browse files
Move MSVC build to standard stdbool.h and require Visual C++ 2015
Closes: #754
1 parent bfa5f94 commit 4f0f127

File tree

5 files changed

+12
-49
lines changed

5 files changed

+12
-49
lines changed

lib/native/win32-x86-64.jar

23 KB
Binary file not shown.

lib/native/win32-x86.jar

20.1 KB
Binary file not shown.

native/Makefile

-10
Original file line numberDiff line numberDiff line change
@@ -253,21 +253,11 @@ else
253253
# Mingw compiler
254254
LDFLAGS=-o $@ -shared
255255
FFI_ENV+=CXXCPP="$(CPP)"
256-
257-
ifneq ($(ARCH),amd64)
258256
CC=$(MINGW_PREFIX)gcc
259257
CPP=$(MINGW_PREFIX)gcc -E
260258
LDFLAGS+=-Wl,--add-stdcall-alias
261-
LIBS=-lpsapi
262-
else
263-
# mingw64 lacks SEH, so MSVC build is preferred
264-
CC=$(MINGW)
265-
# No SEH under mingw64, thus no HAVE_PROTECTION
266-
CDEFINES=-DPSAPI_VERSION=1
267-
LD = $(CC)
268259
LIBS= -lmingwex -lpsapi -lkernel32 -lmsvcrt
269260
endif
270-
endif
271261

272262
endif
273263

native/dispatch.c

-7
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,8 @@ static int _protect;
120120
#ifdef __cplusplus
121121
extern "C" {
122122
#else
123-
#if defined(_MSC_VER)
124-
// At least until I upgrace to 2013-era MSVS
125-
typedef int bool;
126-
#define true 1
127-
#define false 0
128-
#else
129123
#include <stdbool.h>
130124
#endif
131-
#endif
132125

133126
#define MEMCPY(ENV,D,S,L) do { \
134127
PSTART(); memcpy(D,S,L); PEND(ENV); \

www/WindowsDevelopmentEnvironment.md

+12-32
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To use the MS compiler, ensure that the appropriate 32-bit or 64-bit versions
2424
of cl.exe/ml.exe/ml64.exe/link.exe are in your PATH and that the INCLUDE and
2525
LIB environment variables are set properly (as in VCVARS.BAT).
2626

27-
Sample configuration setting up INCLUDE/LIB:
27+
Sample configuration setting up INCLUDE/LIB (see an alternative below):
2828

2929
``` shell
3030
export MSVC="/c/Program Files (x86)/Microsoft Visual Studio 10.0/vc"
@@ -67,55 +67,35 @@ windows.
6767

6868
<pre>
6969
0. Start-Point: A clean Windows 10 Installation with all patches as of 2016-06-10
70-
1. Install Windows SDK 7.1:
71-
72-
Version registry key:
73-
74-
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client
75-
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full
76-
77-
Relevant attribute: VERSION
78-
79-
1. Note down the values in the version value (Windows 10 pure with patches as of 2016-06-10: 4.6.01038)
80-
2. Change ownership of the registry keys to your current user (Open permissions for the key and choose "Extended")
81-
3. Add full access righs for your current user to the permissions
82-
4. Change both version attributes to 4.0.30319
83-
5. Download and Install Windows SDK 7.1 with defaults: http://www.microsoft.com/en-us/download/details.aspx?id=8279
84-
6. Restore Version from first item of this list
85-
86-
87-
2. Install Oracle JDK 8u92 (64 bit)
70+
1. Install Visual C++ Build Tools 2015 (http://landinghub.visualstudio.com/visual-cpp-build-tools) (the 8.1 SDK is enough)
71+
2. Install Oracle JDK 8u121 (64 bit)
8872
3. Install Cygwin (https://cygwin.com/install.html)
8973
- make
9074
- automake
9175
- automake1.15
9276
- libtool
93-
- mingw64-x86_64-gcc-g++ (Version 5.3.0-1)
94-
- mingw64-x86_64-gcc-core (Version 5.3.0-1)
77+
- mingw64-x86_64-gcc-g++ (Version 5.4.0-3)
78+
- mingw64-x86_64-gcc-core (Version 5.4.0-2)
9579
- gcc-g++
9680
- diffutils
81+
- git
9782
4. Ensure ant, maven, cygwin are accessible from the PATH
9883
5. Run
99-
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd /Release /x64
84+
"C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat" x64
10085
inside a windows command prompt
10186
6. Point JAVA_HOME to the root of a 64 Bit JDK
10287
7. Run native build
10388

104-
10589
For 32bit:
10690

10791
- Install:
108-
- mingw64-i686-gcc-g++ (Version 5.3.0-1)
109-
- mingw64-i686-gcc-core (Version 5.3.0-1)
92+
- mingw64-i686-gcc-g++ (Version 5.4.0-3)
93+
- mingw64-i686-gcc-core (Version 5.4.0-2)
11094
- Modify the recipe:
95+
- Step 2:
96+
Install JDK 8u121 (32 bit)
11197
- Step 5:
112-
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd /Release /x86
98+
"C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat" x86
11399
- Step 6:
114100
Point JAVA_HOME to the root of a 32 Bit JDK
115-
116-
To build with Visual Studio 2015:
117-
- Instead of Step 5 start the build environments from start menu:
118-
- VS2015 x86 Native Tools
119-
- VS2015 x64 Native Tools
120-
- Run steps 6+7 inside that environment
121101
</pre>

0 commit comments

Comments
 (0)