forked from plugdata-team/JUCE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JUCE_CHANGES.txt
55 lines (44 loc) · 2.64 KB
/
JUCE_CHANGES.txt
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
The files in this directory are from the FLAC 1.4.3 release downloaded in a tarball from
https://github.com/xiph/flac/releases/tag/1.4.3
They have been modified as little as possible, so that when they are included by
juce_FlacAudioFormat.cpp they compile without warnings and work correctly on the supported
platforms.
Below I will refer to the contents of the tarball as RELEASE and to our repo as JUCE.
The steps carried out when including the 1.4.3 version
* The contents of RELEASE/include/FLAC and RELEASE/include/share were copied to
JUCE/[..]/codecs/flac
* The contents of RELEASE/libFLAC were copied to JUCE/[..]/codecs/flac/libFLAC
* The includes in all these files were retargeted, to be relative to the file that does the
including, so that we don't have to rely on e.g. flac/libFLAC/include being among the include
directories, like it is when building FLAC with the official makefiles. All this retargeting is
done per-line with a Python script. All the rules used for the retargeting can be seen in the code
excerpt at [1].
* Then I will do a compile/test/modify loop, until it works and compiles without warnings. The
changes made are mostly C to C++ conversions like adding explicit casts, or fixing warnings, like
eliminating always true branches that refer to preprocessor defines.
* Then I delete all library files, and only re-add those that are needed for successful compilation.
This delete step is propagated back to older commits, so that unneeded files are never added to
the GIT repo.
[1]: Code excerpt used for retargeting includes in the copied files
```
def transform(path: Path, line: str) -> str:
if path.match("libFLAC/*"):
line = line.replace('#include "private', '#include "include/private')
line = line.replace('#include "protected', '#include "include/protected')
line = line.replace('#include "share/', '#include "../')
line = line.replace('#include "FLAC/', '#include "../')
if path.match("libFLAC/include/private/*") or path.match(
"libFLAC/include/public/*"
):
line = line.replace('#include "share/', '#include "../../../')
line = line.replace('#include "FLAC/', '#include "../../../')
if path.match("*"):
line = line.replace('#include "share/', '#include "')
if path.match("libFLAC/include/private/*"):
line = line.replace('#include "private/', '#include "')
if path.match("libFLAC/include/protected/*"):
line = line.replace('#include "private/', '#include "../private/')
line = line.replace('#include "FLAC/', '#include "../../../')
line = line.replace('#include "include/private/macros.h"', "")
return line
```