-
Notifications
You must be signed in to change notification settings - Fork 5
/
DJVnew.patch
469 lines (441 loc) · 15.8 KB
/
DJVnew.patch
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
--- bin/djv/win.rc.orig 2020-02-06 18:36:03.506931711 +0000
+++ bin/djv/win.rc 2020-02-06 18:36:17.118797808 +0000
@@ -1,3 +1,3 @@
#include "winrc.h"
-DJV_ICON ICON "..\\..\\etc\\Windows\\djv.ico"
+DJV_ICON ICON "../../etc/Windows/djv.ico"
--- lib/djvAV/PNGRead.cpp.orig 2020-04-13 21:28:28.509935857 +0100
+++ lib/djvAV/PNGRead.cpp 2020-04-13 21:29:29.404968651 +0100
@@ -135,7 +135,7 @@
png_infop * pngInfo,
png_infop * pngInfoEnd)
{
- if (setjmp(png_jmpbuf(png)))
+ if (__builtin_setjmp(png_jmpbuf(png)))
{
return false;
}
@@ -184,7 +184,7 @@
{
bool pngScanline(png_structp png, uint8_t * out)
{
- if (setjmp(png_jmpbuf(png)))
+ if (__builtin_setjmp(png_jmpbuf(png)))
{
return false;
}
@@ -194,7 +194,7 @@
bool pngEnd(png_structp png, png_infop pngInfo)
{
- if (setjmp(png_jmpbuf(png)))
+ if (__builtin_setjmp(png_jmpbuf(png)))
{
return false;
}
--- lib/djvAV/JPEGWrite.cpp.orig 2020-04-13 21:31:49.810822144 +0100
+++ lib/djvAV/JPEGWrite.cpp 2020-04-13 21:32:23.258325555 +0100
@@ -102,7 +102,7 @@
bool jpegInit(jpeg_compress_struct* jpeg, JPEGErrorStruct* error)
{
- if (setjmp(error->jump))
+ if (__builtin_setjmp(error->jump))
{
return false;
}
@@ -118,7 +118,7 @@
const Options& options,
JPEGErrorStruct* error)
{
- if (setjmp(error->jump))
+ if (__builtin_setjmp(error->jump))
{
return false;
}
@@ -155,7 +155,7 @@
const uint8_t* in,
JPEGErrorStruct* error)
{
- if (::setjmp(error->jump))
+ if (::__builtin_setjmp(error->jump))
{
return false;
}
@@ -169,7 +169,7 @@
bool jpeg_end(jpeg_compress_struct* jpeg, JPEGErrorStruct* error)
{
- if (::setjmp(error->jump))
+ if (::__builtin_setjmp(error->jump))
{
return false;
}
--- lib/djvAV/PNGWrite.cpp.orig 2020-04-13 21:34:46.648248971 +0100
+++ lib/djvAV/PNGWrite.cpp 2020-04-13 21:35:24.335715421 +0100
@@ -136,7 +136,7 @@
png_infop * pngInfo,
const Image::Info & info)
{
- if (setjmp(png_jmpbuf(png)))
+ if (__builtin_setjmp(png_jmpbuf(png)))
{
return false;
}
@@ -178,7 +178,7 @@
bool pngScanline(png_structp png, const uint8_t * in)
{
- if (setjmp(png_jmpbuf(png)))
+ if (__builtin_setjmp(png_jmpbuf(png)))
return false;
png_write_row(png, reinterpret_cast<const png_byte*>(in));
return true;
@@ -186,7 +186,7 @@
bool pngEnd(png_structp png, png_infop pngInfo)
{
- if (setjmp(png_jmpbuf(png)))
+ if (__builtin_setjmp(png_jmpbuf(png)))
return false;
png_write_end(png, pngInfo);
return true;
--- CMakeLists.txt.orig 2020-08-09 13:48:59.510000000 +0100
+++ CMakeLists.txt 2020-08-09 13:49:11.050000000 +0100
@@ -303,7 +303,7 @@
include(djvPackage)
add_subdirectory(lib)
-add_subdirectory(tests)
+#add_subdirectory(tests)
if(DJV_BUILD_TINY)
elseif(DJV_BUILD_MINIMAL)
add_subdirectory(examples)
--- CMakeLists.txt.orig 2020-08-09 13:59:35.350000000 +0100
+++ CMakeLists.txt 2020-08-09 14:00:01.820000000 +0100
@@ -68,8 +68,8 @@
elseif(WIN32)
set(DJV_PLATFORM_WINDOWS TRUE)
add_definitions(-DDJV_PLATFORM_WINDOWS)
- set(CMAKE_C_FLAGS "/MP /EHsc")
- set(CMAKE_CXX_FLAGS "/MP /EHsc")
+ #set(CMAKE_C_FLAGS "/MP /EHsc")
+ #set(CMAKE_CXX_FLAGS "/MP /EHsc")
endif()
# Set the output directories for the build.
--- lib/djvAV/JPEG.cpp.orig 2020-08-09 14:25:43.160000000 +0100
+++ lib/djvAV/JPEG.cpp 2020-08-09 14:26:15.600000000 +0100
@@ -68,7 +68,7 @@
char message[JMSG_LENGTH_MAX] = "";
in->err->format_message(in, message);
error->messages.push_back(message);
- ::longjmp(error->jump, 1);
+ ::__builtin_longjmp(error->jump, 1);
}
void djvJPEGWarning(j_common_ptr in, int level)
--- lib/djvCore/Core.h.orig 2020-11-11 20:11:29.410000000 +0000
+++ lib/djvCore/Core.h 2020-11-11 20:12:05.730000000 +0000
@@ -43,7 +43,7 @@
#if defined(DJV_PLATFORM_WINDOWS)
//! \bug https://social.msdn.microsoft.com/Forums/vstudio/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error?forum=vcgeneral
-typedef unsigned int djv_char_t;
+typedef char16_t djv_char_t;
#else // DJV_PLATFORM_WINDOWS
typedef char32_t djv_char_t;
#endif // DJV_PLATFORM_WINDOWS
--- lib/djvAV/CMakeLists.txt.orig 2020-11-11 20:15:46.060000000 +0000
+++ lib/djvAV/CMakeLists.txt 2020-11-11 20:16:25.860000000 +0000
@@ -117,7 +117,7 @@
djvOCIO
djvAudio
#OpenAL
- RtAudio)
+ rtaudio)
if(FFmpeg_FOUND)
set(LIBRARIES ${LIBRARIES} FFmpeg)
endif()
--- lib/djvCore/RapidJSONTemplatesInline.h.orig 2020-11-11 20:35:51.800000000 +0000
+++ lib/djvCore/RapidJSONTemplatesInline.h 2020-11-11 20:36:17.710000000 +0000
@@ -3,6 +3,7 @@
// All rights reserved.
#include <stdexcept>
+#undef GetObject
namespace djv
{
--- lib/djvCore/OSFuncWin32.cpp.orig 2020-11-11 21:24:07.650000000 +0000
+++ lib/djvCore/OSFuncWin32.cpp 2020-11-11 21:24:23.620000000 +0000
@@ -14,7 +14,7 @@
#define NOMINMAX
#endif // NOMINMAX
#include <windows.h>
-#include <Shlobj.h>
+#include <shlobj.h>
#include <shellapi.h>
#include <stdlib.h>
#include <VersionHelpers.h>
--- lib/djvCore/OSFuncWin32.cpp.orig 2020-11-11 21:33:35.840000000 +0000
+++ lib/djvCore/OSFuncWin32.cpp 2020-11-11 21:33:51.810000000 +0000
@@ -17,7 +17,7 @@
#include <shlobj.h>
#include <shellapi.h>
#include <stdlib.h>
-#include <VersionHelpers.h>
+#include <versionhelpers.h>
#include <array>
#include <codecvt>
--- lib/djvCore/CMakeLists.txt.orig 2020-11-11 21:46:10.610000000 +0000
+++ lib/djvCore/CMakeLists.txt 2020-11-11 21:47:12.880000000 +0000
@@ -62,7 +62,7 @@
add_library(djvCore ${header} ${source})
set(LIBRARIES
- RapidJSON)
+ RapidJSON msvcr120.lib)
if (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm")
set(LIBRARIES ${LIBRARIES} atomic)
endif()
--- lib/djvMath/FrameNumber.h.orig 2020-11-11 21:55:22.480000000 +0000
+++ lib/djvMath/FrameNumber.h 2020-11-11 21:56:17.150000000 +0000
@@ -5,7 +5,7 @@
#pragma once
#include <djvMath/Range.h>
-
+#include <cstdint>
#include <vector>
namespace djv
--- lib/djvSystem/PathFuncWin32.cpp.orig 2020-11-11 22:00:08.950000000 +0000
+++ lib/djvSystem/PathFuncWin32.cpp 2020-11-11 22:00:18.380000000 +0000
@@ -15,7 +15,7 @@
#endif // NOMINMAX
#include <windows.h>
#include <direct.h>
-#include <Shlobj.h>
+#include <shlobj.h>
#include <shellapi.h>
#include <codecvt>
--- lib/djvSystem/DirectoryWatcherWin32.cpp.orig 2020-11-11 22:09:59.430000000 +0000
+++ lib/djvSystem/DirectoryWatcherWin32.cpp 2020-11-11 22:10:29.270000000 +0000
@@ -41,7 +41,7 @@
std::condition_variable changedCV;
std::mutex mutex;
std::thread thread;
- std::atomic<bool> running = true;
+ std::atomic<bool> running{true};
std::function<void(void)> callback;
std::shared_ptr<Timer> timer;
};
--- lib/djvSystem/PathFuncWin32.cpp.orig 2020-11-11 22:15:19.250000000 +0000
+++ lib/djvSystem/PathFuncWin32.cpp 2020-11-11 22:17:32.280000000 +0000
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2004-2020 Darby Johnston
// All rights reserved.
-
+#define NTDDI_VERSION 0x06000000
#include <djvSystem/PathFunc.h>
#include <djvCore/StringFormat.h>
--- lib/djvSystem/CMakeLists.txt.orig 2020-11-11 22:22:29.510000000 +0000
+++ lib/djvSystem/CMakeLists.txt 2020-11-11 22:22:47.640000000 +0000
@@ -94,7 +94,7 @@
Threads::Threads
${CMAKE_DL_LIBS})
if (WIN32)
- set(LIBRARIES ${LIBRARIES} Netapi32.lib mpr.lib)
+ set(LIBRARIES ${LIBRARIES} netapi32.lib mpr.lib)
elseif (APPLE)
find_library(CORE_SERVICES CoreServices)
set(LIBRARIES ${LIBRARIES} ${CORE_SERVICES})
--- lib/djvAudio/Type.h.orig 2020-11-11 22:27:07.330000000 +0000
+++ lib/djvAudio/Type.h 2020-11-11 22:27:28.630000000 +0000
@@ -7,7 +7,7 @@
#include <djvCore/Core.h>
#include <djvMath/Range.h>
-
+#include <cstdint>
#include <limits>
namespace djv
--- bin/djv_info/CMakeLists.txt.orig 2020-11-11 22:50:23.640000000 +0000
+++ bin/djv_info/CMakeLists.txt 2020-11-11 22:51:11.320000000 +0000
@@ -1,6 +1,9 @@
set(header)
set(source main.cpp)
+set(CMAKE_C_FLAGS "-municode")
+set(CMAKE_CXX_FLAGS "-municode")
+
add_executable(djv_info ${header} ${source})
target_link_libraries(djv_info djvCmdLineApp)
set_target_properties(
@@ -11,4 +14,4 @@
install(
TARGETS djv_info
- RUNTIME DESTINATION ${DJV_INSTALL_BIN})
\ No newline at end of file
+ RUNTIME DESTINATION ${DJV_INSTALL_BIN})
--- bin/djv_ls/CMakeLists.txt.orig 2020-11-11 22:56:19.970000000 +0000
+++ bin/djv_ls/CMakeLists.txt 2020-11-11 22:57:00.090000000 +0000
@@ -1,6 +1,9 @@
set(header)
set(source main.cpp)
+set(CMAKE_C_FLAGS "-municode")
+set(CMAKE_CXX_FLAGS "-municode")
+
add_executable(djv_ls ${header} ${source})
target_link_libraries(djv_ls djvCmdLineApp)
set_target_properties(
--- bin/djv_test_pattern/CMakeLists.txt.orig 2020-11-11 23:03:08.240000000 +0000
+++ bin/djv_test_pattern/CMakeLists.txt 2020-11-11 23:03:37.690000000 +0000
@@ -1,6 +1,9 @@
set(header)
set(source main.cpp)
+set(CMAKE_C_FLAGS "-municode")
+set(CMAKE_CXX_FLAGS "-municode")
+
add_executable(djv_test_pattern ${header} ${source})
target_link_libraries(djv_test_pattern djvRender2D djvCmdLineApp)
set_target_properties(
--- CMakeLists.txt.orig 2020-11-11 23:15:58.650000000 +0000
+++ CMakeLists.txt 2020-11-11 23:16:04.680000000 +0000
@@ -321,7 +321,7 @@
add_subdirectory(bin)
add_subdirectory(docs)
add_subdirectory(examples)
- add_subdirectory(experiments)
+ # add_subdirectory(experiments)
endif()
include(CPack)
--- bin/djv/CMakeLists.txt.orig 2020-11-11 23:24:23.410000000 +0000
+++ bin/djv/CMakeLists.txt 2020-11-11 23:25:45.620000000 +0000
@@ -21,6 +21,8 @@
RUNTIME DESTINATION ${DJV_INSTALL_BIN})
if (WIN32)
+ set(CMAKE_C_FLAGS "-municode")
+ set(CMAKE_CXX_FLAGS "-municode")
add_executable(djv. ${header} ${source})
target_link_libraries(djv. djvViewApp)
set_target_properties(
--- cmake/Modules/FindFFmpeg.cmake.orig 2020-11-11 23:52:52.640000000 +0000
+++ cmake/Modules/FindFFmpeg.cmake 2020-11-11 23:53:29.850000000 +0000
@@ -106,68 +106,68 @@
target_link_libraries(FFmpeg INTERFACE FFmpeg::swscale)
endif()
-if(FFmpeg_FOUND)
- if(WIN32)
- install(
- FILES
- ${CMAKE_PREFIX_PATH}/bin/avcodec-58.dll
- ${CMAKE_PREFIX_PATH}/bin/avdevice-58.dll
- ${CMAKE_PREFIX_PATH}/bin/avfilter-7.dll
- ${CMAKE_PREFIX_PATH}/bin/avformat-58.dll
- ${CMAKE_PREFIX_PATH}/bin/avutil-56.dll
- ${CMAKE_PREFIX_PATH}/bin/swresample-3.dll
- ${CMAKE_PREFIX_PATH}/bin/swscale-5.dll
- DESTINATION bin)
- elseif(APPLE)
- install(
- FILES
- ${FFmpeg_LIBAVCODEC}
- ${CMAKE_PREFIX_PATH}/lib/libavcodec.58.dylib
- ${CMAKE_PREFIX_PATH}/lib/libavcodec.58.54.100.dylib
- ${FFmpeg_LIBAVDEVICE}
- ${CMAKE_PREFIX_PATH}/lib/libavdevice.58.dylib
- ${CMAKE_PREFIX_PATH}/lib/libavdevice.58.8.100.dylib
- ${FFmpeg_LIBAVFILTER}
- ${CMAKE_PREFIX_PATH}/lib/libavfilter.7.dylib
- ${CMAKE_PREFIX_PATH}/lib/libavfilter.7.57.100.dylib
- ${FFmpeg_LIBAVFORMAT}
- ${CMAKE_PREFIX_PATH}/lib/libavformat.58.dylib
- ${CMAKE_PREFIX_PATH}/lib/libavformat.58.29.100.dylib
- ${FFmpeg_LIBAVUTIL}
- ${CMAKE_PREFIX_PATH}/lib/libavutil.56.dylib
- ${CMAKE_PREFIX_PATH}/lib/libavutil.56.31.100.dylib
- ${FFmpeg_LIBSWRESAMPLE}
- ${CMAKE_PREFIX_PATH}/lib/libswresample.3.dylib
- ${CMAKE_PREFIX_PATH}/lib/libswresample.3.5.100.dylib
- ${FFmpeg_LIBSWSCALE}
- ${CMAKE_PREFIX_PATH}/lib/libswscale.5.dylib
- ${CMAKE_PREFIX_PATH}/lib/libswscale.5.5.100.dylib
- DESTINATION lib)
- else()
- install(
- FILES
- ${FFmpeg_LIBAVCODEC}
- ${FFmpeg_LIBAVCODEC}.58
- ${FFmpeg_LIBAVCODEC}.58.54.100
- ${FFmpeg_LIBAVDEVICE}
- ${FFmpeg_LIBAVDEVICE}.58
- ${FFmpeg_LIBAVDEVICE}.58.8.100
- ${FFmpeg_LIBAVFILTER}
- ${FFmpeg_LIBAVFILTER}.7
- ${FFmpeg_LIBAVFILTER}.7.57.100
- ${FFmpeg_LIBAVFORMAT}
- ${FFmpeg_LIBAVFORMAT}.58
- ${FFmpeg_LIBAVFORMAT}.58.29.100
- ${FFmpeg_LIBAVUTIL}
- ${FFmpeg_LIBAVUTIL}.56
- ${FFmpeg_LIBAVUTIL}.56.31.100
- ${FFmpeg_LIBSWRESAMPLE}
- ${FFmpeg_LIBSWRESAMPLE}.3
- ${FFmpeg_LIBSWRESAMPLE}.3.5.100
- ${FFmpeg_LIBSWSCALE}
- ${FFmpeg_LIBSWSCALE}.5
- ${FFmpeg_LIBSWSCALE}.5.5.100
- DESTINATION lib)
- endif()
-endif()
+#if(FFmpeg_FOUND)
+# if(WIN32)
+# install(
+# FILES
+# ${CMAKE_PREFIX_PATH}/bin/avcodec-58.dll
+# ${CMAKE_PREFIX_PATH}/bin/avdevice-58.dll
+# ${CMAKE_PREFIX_PATH}/bin/avfilter-7.dll
+# ${CMAKE_PREFIX_PATH}/bin/avformat-58.dll
+# ${CMAKE_PREFIX_PATH}/bin/avutil-56.dll
+# ${CMAKE_PREFIX_PATH}/bin/swresample-3.dll
+# ${CMAKE_PREFIX_PATH}/bin/swscale-5.dll
+# DESTINATION bin)
+# elseif(APPLE)
+# install(
+# FILES
+# ${FFmpeg_LIBAVCODEC}
+# ${CMAKE_PREFIX_PATH}/lib/libavcodec.58.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libavcodec.58.54.100.dylib
+# ${FFmpeg_LIBAVDEVICE}
+# ${CMAKE_PREFIX_PATH}/lib/libavdevice.58.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libavdevice.58.8.100.dylib
+# ${FFmpeg_LIBAVFILTER}
+# ${CMAKE_PREFIX_PATH}/lib/libavfilter.7.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libavfilter.7.57.100.dylib
+# ${FFmpeg_LIBAVFORMAT}
+# ${CMAKE_PREFIX_PATH}/lib/libavformat.58.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libavformat.58.29.100.dylib
+# ${FFmpeg_LIBAVUTIL}
+# ${CMAKE_PREFIX_PATH}/lib/libavutil.56.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libavutil.56.31.100.dylib
+# ${FFmpeg_LIBSWRESAMPLE}
+# ${CMAKE_PREFIX_PATH}/lib/libswresample.3.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libswresample.3.5.100.dylib
+# ${FFmpeg_LIBSWSCALE}
+# ${CMAKE_PREFIX_PATH}/lib/libswscale.5.dylib
+# ${CMAKE_PREFIX_PATH}/lib/libswscale.5.5.100.dylib
+# DESTINATION lib)
+# else()
+# install(
+# FILES
+# ${FFmpeg_LIBAVCODEC}
+# ${FFmpeg_LIBAVCODEC}.58
+# ${FFmpeg_LIBAVCODEC}.58.54.100
+# ${FFmpeg_LIBAVDEVICE}
+# ${FFmpeg_LIBAVDEVICE}.58
+# ${FFmpeg_LIBAVDEVICE}.58.8.100
+# ${FFmpeg_LIBAVFILTER}
+# ${FFmpeg_LIBAVFILTER}.7
+# ${FFmpeg_LIBAVFILTER}.7.57.100
+# ${FFmpeg_LIBAVFORMAT}
+# ${FFmpeg_LIBAVFORMAT}.58
+# ${FFmpeg_LIBAVFORMAT}.58.29.100
+# ${FFmpeg_LIBAVUTIL}
+# ${FFmpeg_LIBAVUTIL}.56
+# ${FFmpeg_LIBAVUTIL}.56.31.100
+# ${FFmpeg_LIBSWRESAMPLE}
+# ${FFmpeg_LIBSWRESAMPLE}.3
+# ${FFmpeg_LIBSWRESAMPLE}.3.5.100
+# ${FFmpeg_LIBSWSCALE}
+# ${FFmpeg_LIBSWSCALE}.5
+# ${FFmpeg_LIBSWSCALE}.5.5.100
+# DESTINATION lib)
+# endif()
+#endif()