forked from GoyaPtyLtd/BaseElements-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILDING.win64
497 lines (270 loc) · 15.2 KB
/
BUILDING.win64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
=======================================================================
Windows
=======================================================================
The plug-in was built using Visual Studio 2015 Professional Upgrade 3 on Windows 10.
Download the FileMaker External Plug-In API from
http://www.filemaker.com/support/technologies/
and place the FMWrapper directory inside the SDK's Headers directory in the Headers directory. The version of FMWrapper.lib in the Libraries\win64 should be placed the Libraries directory.
The BaseElements plug-in is built as a static library and all third-party libraries must be built from source as static libraries (/MTd & /MT) using libcmt.lib and nafxcw.lib for release and libcrtd.lib and nafxcwd.lib for debug builds.
Unicode is used rather than the multi-byte character set.
Note: source code for some of the libraries is supplied as gzipped tar archives; there are a number of applications that can unpack these archives, for example, Stuffit Expander
http://www.stuffit.com/win-expander.html
Another note: when doing both debug and release builds clean the project when switching from one t'other.
=======================================================================
Boost - 1.70_0
=======================================================================
The Boost FileSystem and System libraries are required.
http://www.boost.org/
See
more/getting_started/index.html
for instructions on compiling the Boost libraries. From the command prompt try
cd boost_1_70_0
bootstrap.bat
b2 address-model=64 link=static runtime-link=static --with-program_options --with-thread --with-filesystem --with-date_time --with-chrono --with-regex --prefix=build install
Copy the directory containing the boost headers from the build/include directory to the Headers directory and copy the files in the build/lib to Libraries/win64.
=======================================================================
zlib
=======================================================================
Building zlib is straightforward. Download the zlib source from
http://www.zlib.net/
and extract the folder zlib-1.2.8 to the desktop.
Open the solution file "contrib/vstudio/vc11/zlibvc.sln" and remove ZLIB_WINAPI from the list of preprocessor definitions for the libzstat x64 ReleaseWithoutAsm configuration. From the "Build Menu" select "Batch Build" and select the libzstat "ReleaseWithoutAsm" configuration for x64, and "Build".
Move
contrib/vstudio/vc11/x64/ZlibStatReleaseWithoutAsm/zlibstat.lib
into the Libraries/win64.
Copy zip.h and zconf.h from the root directory of the distribution to the Headers directory.
=======================================================================
Jansson - 2.5
=======================================================================
Download the source from
https://github.com/rogerz/jansson/tree/json_path
Download the source from
https://github.com/GoyaPtyLtd/jansson
And build the release configuration.
Copy jansson.h and jansson_config.h from ./src/ to the Headers directory and win32/vs2010/Output/Release/jansson.lib to Libraries\win64.
=======================================================================
liboauth - 1.0.3
=======================================================================
Note: OpenSSL should be built first.
Download the source from
http://liboauth.sourceforge.net/
Unpack directory containing the Visual Studio solution files (from the BaseElements-Plugin Projects/Extras), open the Solution make sure the project can find the BaseElements plug-in Header and Libraries directories. Then, from Build->Batch Build build the two "Release" configurations.
Copy liboauth.h from ./src/ to the Headers directory and liboauth\Release\liboauth.lib to Libraries\win64.
=======================================================================
mimetic - 0.9.8
=======================================================================
Download the source from
http://www.codesink.org/mimetic_mime_library.html#download
Edit the file mimetic/base64.h to replace the line
*out = NL; ++out;
with
*out = CR; ++out;
*out = LF; ++out;
In
Configuration Properties -> General -> Project Defaults
for MTDebug & MTRelease set
Character Set = Use Unicode Character Set
To create 64-bit configurations go to:
Build -> Configuration Manager -> Active Solution Platform: -> <New>
- Type or select the new platform: -> x64
- Copy Settings from Win32
Then build the MTRelease x64 configuration.
Copy the directory containing the mimetic headers from the build/include directory to the Headers directory and copy the libraries libmimetic_d.lib & libmimetic.lib from the win32\win64 to Libraries\win64.
=======================================================================
libssh2 - 1.7.0
=======================================================================
Download the source from
http://www.libssh2.org/
Open
win32\libssh2.vcproj
and set the following Configuration Properties:
Project Defaults -> Character Set == Use Unicode Character Set
VC++ Directories -> Include Directories -> add the path to the BEPlugin Headers directory
C/C++ -> Code Generation -> Runtime Library == Multi-threaded (/MT)
Comment out the line
#define snprintf _snprintf
in libssh2_config.h.
For x64 builds select <New…> in the "Active Solution Platform" pop-up in the "Configuration Manager". Select x64 in "Type or select the new platform", "Copy settings from" should be Win32 and check "Create New project platforms" and click "OK".
Copy the library from
win32\Release_lib\libssl2.lib
into the Libraries\win64 directory and copy
include
to the Headers directory and rename it libssh2.
=======================================================================
OpenSSL - 1.0.2g
=======================================================================
Building OpenSSL requires that perl is installed. The ActiveState perl (Community Edition) is a good
place to start if you do not already have perl installed
http://www.activestate.com/activeperl
Download the latest openssl source from
http://www.openssl.org/source/
Unpack the archive and, in a "VS2015 x64 Native Command Prompt":
cd openssl-1.0.2g
perl Configure VC-WIN64A enable-static-engine no-asm
ms\do_win64a
nmake -f ms\nt.mak
Copy out32\libeay32.lib and out32\ssleay32.lib to Libraries\win64 and copy inc32\openssl to Headers.
=======================================================================
libcurl - 7.48
=======================================================================
Note: OpenSSL & libssh2 must be built before building libcurl.
Download the source from
http://curl.haxx.se/download.html
and expand it into a directory on the Desktop.
Open
projects\Windows\VC14\lib\libcurl.vcproj
and set the following Configuration Properties for all projects/platforms:
Project Defaults -> Character Set == Use Unicode Character Set
VC++ Directories -> Include Directories -> add the path to the BEPlugin Headers/libssh directory
VC++ Directories -> Include Directories -> add the path to the BEPlugin Headers directory
C/C++ -> Code Generation -> Runtime Library == Multi-threaded (/MT)
In Visual Studio and select "Batch Build" and select both the x86 & x64 "LIB Release - LIB OpenSSL - LIB LibSSH2" configurations and then "Build".
Copy the library from
build\Win64\VC14\LIB Release - LIB OpenSSL - LIB LibSSH2\libcurl.lib
into the Libraries\win64 directory and copy
include\curl
to the Headers directory.
=======================================================================
libiconv - 1.14 & libxml2 - 2.9.4
=======================================================================
Download the libiconv source from
http://www.gnu.org/software/libiconv/
Download a patch to provide Visual Studio support from
https://sites.google.com/site/kontr0kontradiktion/software/patches
and download the Windows port of the patch from
http://gnuwin32.sourceforge.net/packages/patch.htm
Then, in a terminal prompt
cd libiconv-1.14
patch.exe -p1 -i ..\libiconv-1.14.vc10.patch --binary
Download the source for libxml2 from
http://xmlsoft.org/downloads.html
and expand it into a directory on the Desktop.
Note: the full path of the directory should not contain any spaces.
Rename the folder libiconv-1.14 to libiconv-1.14.vc10
The Visual Studio solution file is in
libxml2-2.9.4\win32\VC10
From the "Build" menu select "Configuration Manager" and then set "Active solution configuration" to Release and in the "Build" column, uncheck "runsuite".
In the Property Pages
libxml2 -> Configuration Properties -> VC++ Directories -> Include Directories
add paths to the following directories
libxml2-2.9.4\win32\VC10
libxml2-2.9.4\include
libiconv-1.14.vc10\include
and in
libxml2 -> Configuration Properties -> General -> Project Defaults
set
Configuration Type = Static Library (.lib)
Character Set = Use Unicode Character Set
And also
... -> C++ -> Preprocessor -> Preprocessor Definitions = WIN32
... -> Linker -> Input -> Additional Dependencies = ws2_32.lib
In the Property Pages of both libxml2 & iconv set
... -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library = Multi-threaded (/MT)
Change the line
#elif defined(_WIN32_WCE)
to
#elif defined(_MSC_VER)
For x64 builds select <New…> in the "Active Solution Platform" pop-up in the "Configuration Manager". Select x64 in "Type or select the new platform", "Copy settings from" should be Win32 and check "Create New project platforms" and click "OK". Set the "Active solution configuration" to "Release" and uncheck "Build" for "runsuite".
Make the changes to the configuration properties as per the x86 instructions, above, and then build the project. Move
win32/VC10/x64/Release/iconv.lib
win32/VC10/x64/Release/libxml2.lib
to the Libraries/win64 directory and copy
libxml2-2.9.4\include\libxml
into the BE Plugin Headers folder and create a folder, iconv, in the BE Plugin Headers folder and copy
libiconv-1.14.vc10\include\iconv.h
into that.
=======================================================================
libxslt & libexslt - 1.1.29
=======================================================================
Download the source from
http://xmlsoft.org/XSLT/downloads.html
and expand it into a directory on the Desktop.
Note: the full path of the directory should not contain any spaces.
For Win32 builds use the "VS2015 x86 Native Command Prompt" and for x64 builds the "VS2015 x64 Native Command Prompt".
Move to the win32 directory in the archive
cd Desktop\libxslt-1.1.29\win32
Run the commands (changing the include= & lib= paths as appropriate)
cscript configure.js static=yes debug=no cruntime=-MT include="<path to BaseElements-Plugin\Headers>;<path to BaseElements-Plugin\Headers\iconv>" lib="<patjh tp BaseElements-Plugin>\Libraries\win64"
Then
nmake -f Makefile.msvc MFLAGS=-MT libxslta libexslta
to configure and build the source.
Finally, place the headers from the directories
libxslt-1.1.29\libxslt & libxslt-1.1.29\libexslt
into directories, libxslt & libexslt, in the Headers directory and copy the libraries
bin.msvc\libxslt_a.lib & bin.msvc\libexslt_a.lib
into the Libraries\win64 directory.
=======================================================================
duktape - 2.3.0
=======================================================================
Download the source from
http://duktape.org/
and extract the archive to the desktop and copy the src directory to the Source directory and rename it to duktape.
=======================================================================
libjpeg-turbo - 1.4.2
=======================================================================
To build first download and install NASM from
http://www.nasm.us/
Download the source from
http://www.libjpeg-turbo.org/
and extract the archive to the desktop. Download and install cmake from
http://www.cmake.org/download/
and then, from that directory, in a terminal window
cmake -G "Visual Studio 14 Win64"
Open the project
turbojpeg-static
and in
Configuration Properties -> General -> Project Defaults
set
Character Set = Use Unicode Character Set
and build the Release configuration and copy turbojpeg-static.lib to the Liraries/win64 directory.
Create a directory libturbojpeg in the Headers directory and copy
jconfig.h
jerror.j
jmorecfg.h
jpeglib.h
turbo.jpg.h
into that from the source directory.
=======================================================================
Poco 1.9.2
=======================================================================
Download the source from
http://pocoproject.org/download/index.html
Then, after extracting the archive set
Configuration Properties -> General -> Project Defaults -> Character Set = Use Unicode Character Set
Then build the Zip, Util, JSON and Foundation MT Release and Debug libraries using the projects in the respective directories.
Copy PocoFoundationmt.lib/PocoFoundationmtd.lib, libPocoJSON.a/libPocoJSONd.a & PocoZipmt.lib/PocoZipmtd.lib libraries from the lib and lib64 driectories into the Libraries/win32 and Libraries/win64 directory and copy the include/Poco directory to Headers.
=======================================================================
freetype - 2.7
=======================================================================
Download freetype from
https://www.freetype.org/download.html
and expand it into a directory on the Desktop.
Open the project file at
builds/windows/vc2010
and set the following Configuration Properties:
Project Defaults -> Character Set == Use Unicode Character Set
C/C++ -> Code Generation -> Runtime Library == Multi-threaded (/MT)
and build the x64 Release configuration.
then copy objs/vc2010/x64/freetype27.lib to Libraries/Win64 and rename include to freetype2 and copy to Headers.
=======================================================================
podofo - 0.9.4
=======================================================================
Download freetype from
https://www.freetype.org/download.html
and expand it into a directory on the Desktop.
cd podofo-0.9.4
Edit
CMakeLists.txt
to remove references to CMP0033 and the PNG library. Then
cmake -G "Visual Studio 14 2015" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX="./_build" -DPODOFO_BUILD_STATIC:BOOL=TRUE -DPODOFO_BUILD_SHARED:BOOL=FALSE -DPODOFO_BUILD_LIB_ONLY=TRUE -DCMAKE_INCLUDE_PATH=<path to /BaseElements-Plugin/Headers> -DCMAKE_LIBRARY_PATH=<path to /BaseElements-Plugin/Libraries/Win64> -DZLIB_LIBRARY_RELEASE=<path to /BaseElements-Plugin/Libraries/Win64>\zlibstat.lib -DWANT_LIB64:BOOL=TRUE -DFREETYPE_INCLUDE_DIR="<path to /BaseElements-Plugin/Headers>/freetype2" -DFREETYPE_LIBRARY_RELEASE="<path to /BaseElements-Plugin/Libraries/Win64>/freetype27.lib" ./
Open the PoDoFo project and
Project Defaults -> Character Set == Use Unicode Character Set
Librarian -> Command Line -> Additional Options ... delete /machine:X386
and for release builds
C/C++ -> Code Generation -> Runtime Library == Multi-threaded (/MT)
and for debug builds
General -> Target Name == podofod
C/C++ -> Code Generation -> Runtime Library == Multi-threaded (/MTd)
then batch build the podofo_static debug and release targets.
Copy _build/lib/podofod.lib and _build/lib/podofod.lib to Libraries/Win64 and _build/include/podofo to Headers.
=======================================================================