Skip to content

Commit 3e51829

Browse files
Merge pull request #70 from meownoid/main
JUCE 8, ARM64 support, dependency cleanup
2 parents 181fe24 + 30370b9 commit 3e51829

83 files changed

Lines changed: 3229 additions & 36230 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,69 @@
1-
# Juce stuff
2-
Maim/Builds
3-
Maim/JuceLibraryCode
4-
Maim/maim\ audiohost\ setup.filtergraph
1+
# Build outputs
2+
Builds/
3+
cmake-build-*/
4+
packaging/build/
5+
packaging/plugins/
56

7+
# IDE
8+
.idea/
69

7-
cmake-build-*
8-
Packages.dmg
9-
.idea
10-
packaging/build
11-
packaging/plugins
12-
**.dmg
10+
# Packaging artifacts
11+
*.dmg
1312

14-
# Audio stuff
13+
# Audio assets (except bundled assets)
1514
**/*.wav
1615
**/*.mp3
1716
**/*.flac
1817
!assets/*.wav
1918

20-
# Prerequisites
19+
# Compiled files
2120
*.d
22-
23-
# Compiled Object files
24-
*.slo
25-
*.lo
26-
**/*.o
27-
**/*.a
21+
*.o
2822
*.obj
29-
30-
# Precompiled Headers
31-
*.gch
32-
*.pch
33-
34-
# Compiled Dynamic libraries
23+
*.lo
24+
*.slo
25+
*.la
26+
*.lai
27+
*.a
28+
*.lib
3529
*.so
3630
*.dylib
3731
*.dll
32+
*.exe
33+
*.out
34+
*.app
35+
36+
# Precompiled headers
37+
*.gch
38+
*.pch
3839

3940
# Fortran module files
4041
*.mod
4142
*.smod
4243

43-
# Compiled Static libraries
44-
*.lai
45-
**/*.la
46-
**/*.a
47-
*.lib
44+
# Debug symbols
45+
*.dSYM
4846

49-
# Executables
50-
*.exe
51-
*.out
52-
*.app
53-
Maim/lib/lame/frontend/lame
54-
Maim/lib/blade/bladeenc/bladeenc
47+
# LAME generated build artifacts
48+
lib/lame/**/Makefile
49+
lib/lame/**/*.Po
50+
lib/lame/**/*.Plo
51+
lib/lame/**/*.deps
52+
lib/lame/config.h
53+
lib/lame/config.log
54+
lib/lame/config.status
55+
lib/lame/libtool
56+
lib/lame/stamp-h1
57+
lib/lame/lame.spec
58+
lib/lame/frontend/lame
5559

56-
# misc
57-
**/.DS_Store
58-
**/*.asd
59-
**/*.dSYM
60-
Maim/lib/blade/test
60+
# Blade generated build artifacts
61+
lib/blade/bladeenc/bladeenc
62+
lib/blade/test
6163

62-
# lame stuff
63-
/Source/lib/lame/**/Makefile
64-
/Source/lib/lame/**/*.Po
65-
/Source/lib/lame/**/*.Plo
66-
Source/lib/lame/config.log
67-
Source/lib/lame/config.h
68-
Source/lib/lame/config.status
69-
Source/lib/lame/libtool
64+
# Python virtual environments
65+
venv/
7066

71-
venv
72-
Source/lib/lame/stamp-h1
73-
Source/lib/lame/lame.spec
67+
# OS / editor noise
68+
.DS_Store
69+
*.asd

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
url = https://github.com/free-audio/clap-juce-extensions.git
99
branch = main
1010
[submodule "opus"]
11-
path = opus
11+
path = lib/opus
1212
url = https://github.com/xiph/opus.git
1313
[submodule "cmake"]
1414
path = "cmake"

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ project(${PROJECT_NAME} VERSION ${CURRENT_VERSION})
3838

3939
set(LAMELIBRARYPATH "${CMAKE_CURRENT_SOURCE_DIR}/${LAME_LIB}")
4040

41-
add_subdirectory(opus)
41+
add_subdirectory(lib/opus)
4242

4343
# Couple tweaks that IMO should be JUCE defaults
4444
include(JUCEDefaults)
@@ -107,7 +107,7 @@ target_sources(SharedCode INTERFACE ${SourceFiles})
107107
target_include_directories(SharedCode
108108
INTERFACE
109109
lib/lame/include
110-
${CMAKE_SOURCE_DIR}/opus/include
110+
${CMAKE_SOURCE_DIR}/lib/opus/include
111111
lib/blade/bladeenc
112112
)
113113

@@ -127,9 +127,6 @@ target_compile_definitions(SharedCode
127127
JUCE_USE_CURL=0 # If you set this to 1, add `NEEDS_CURL TRUE` to the `juce_add_plugin` call
128128
JUCE_VST3_CAN_REPLACE_VST2=0
129129

130-
# Uncomment if you are paying for a an Indie/Pro license or releasing under GPLv3
131-
JUCE_DISPLAY_SPLASH_SCREEN=0
132-
133130
# lets the app known if we're Debug or Release
134131
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
135132
VERSION="${CURRENT_VERSION}"
@@ -157,6 +154,7 @@ target_link_libraries(SharedCode
157154
"${LAMELIBRARYPATH}"
158155
opus
159156
blade_library
157+
juce_audio_formats
160158
juce_audio_utils
161159
juce_audio_processors
162160
juce_dsp

Docs/BUILDING.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,44 @@ We figured out the steps, so you don't have to.
88
### Prerequisites:
99
* [CMake version >= 3.24.1](https://cmake.org/download/) (This link actually takes you to the latest version)
1010
* ninja
11-
* ccache (Ensure that ccache is actually on the path: `which g++ gcc` should return `/usr/lib/ccache/g++ /usr/lib/ccache/gcc`.)
11+
* pkg-config (`sudo apt-get install pkg-config`)
12+
* JUCE's Linux dependencies:
13+
```sh
14+
sudo apt-get install libasound2-dev libfontconfig1-dev libfreetype6-dev \
15+
libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev \
16+
libgl1-mesa-dev
17+
```
1218

1319
### Steps:
1420

1521
1. Clone the repository, making sure to use `--recurse-submodules` to clone JUCE as well.
1622

1723
```sh
1824
git clone --recurse-submodules https://github.com/ArdenButterfield/Maim
25+
cd Maim
1926
```
2027

2128
2. Build Lame. This project includes a quirked up version of [LAME](https://lame.sourceforge.io/),
22-
3. so even if you have LAME installed already, you still need to do this step.
29+
so even if you have LAME installed already, you still need to do this step.
2330

2431
```sh
25-
cd Maim/Source/lib/lame/
26-
./configure CFLAGS="-fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
32+
cd lib/lame/
33+
./configure CFLAGS="-fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
2734
make
28-
cd ../../..
35+
cd ../..
2936
```
3037

38+
If `./configure` fails to detect your system type, add an explicit build triplet:
39+
40+
- x86_64: `--build=x86_64-linux-gnu`
41+
- ARM64: `--build=aarch64-linux-gnu`
42+
3143
Optionally, add `--enable-debug` to the `configure` command, to compile with `-g`.
3244

3345
3. Build the plugin. You can change `Release` to `Debug` in both lines to change the build configuration to one without optimization.
3446

3547
```sh
36-
cmake -B Builds -G Ninja -DLAME_LIB=Source/lib/lame/libmp3lame/.libs/libmp3lame.a -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
48+
cmake -B Builds -G Ninja -DLAME_LIB=lib/lame/libmp3lame/.libs/libmp3lame.a -DCMAKE_BUILD_TYPE=Release
3749
cmake --build Builds --config Release
3850
```
3951

@@ -47,30 +59,44 @@ Note that the configure command when building Lame is slightly different from in
4759
### Prerequisites:
4860
* [CMake version >= 3.24.1](https://cmake.org/download/) (This link actually takes you to the latest version)
4961
* ninja
50-
* ccache (Ensure that ccache is actually on the path: `which g++ gcc` should return `/usr/local/opt/ccache/libexec/g++ /usr/local/opt/ccache/libexec/gcc
51-
`, or something similar.)
5262

5363
### Steps:
5464

5565
1. Clone the repository, making sure to use `--recurse-submodules` to clone JUCE as well.
5666

5767
```sh
5868
git clone --recurse-submodules https://github.com/ArdenButterfield/Maim
69+
cd Maim
5970
```
6071

6172
2. Build Lame. This project includes a quirked up version of [LAME](https://lame.sourceforge.io/), so even if you have LAME installed already, you still need to do this step.
6273

74+
For an Apple Silicon-only build:
75+
6376
```sh
64-
cd Maim/Source/lib/lame/
65-
./configure CFLAGS="-arch x86_64 -arch arm64 -fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
77+
cd lib/lame/
78+
./configure CFLAGS="-fPIC -mmacosx-version-min=11.0" \
79+
--disable-frontend --enable-expopt=full --disable-shared --enable-static
6680
make
67-
cd ../../..
81+
cd ../..
6882
```
6983

84+
If you want a universal binary for both `arm64` and `x86_64`, build LAME with universal flags instead:
85+
86+
```sh
87+
./configure CFLAGS="-arch x86_64 -arch arm64 -fPIC -mmacosx-version-min=10.13" \
88+
--disable-frontend --enable-expopt=full --disable-shared --enable-static
89+
make
90+
```
91+
92+
Then use `-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"` in the CMake command below.
93+
94+
Optionally, add `--enable-debug` to the `configure` command, to compile with `-g`.
95+
7096
3. Build the plugin. You can change `Release` to `Debug` in both lines to change the build configuration to one without optimization.
7197

7298
```sh
73-
cmake -B Builds -G Ninja -DLAME_LIB=Source/lib/lame/libmp3lame/.libs/libmp3lame.a -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
99+
cmake -B Builds -G Ninja -DLAME_LIB=lib/lame/libmp3lame/.libs/libmp3lame.a -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64
74100
cmake --build Builds --config Release
75101
```
76102

@@ -96,23 +122,23 @@ curl --output oneapi.exe https://registrationcenter-download.intel.com/akdlm/irc
96122

97123
2. Clone the repo with `git clone --recurse-submodules https://github.com/ArdenButterfield/Maim` (Recursive to make sure git clone also hits JUCE).
98124

99-
3. Inside your local project, navigate to `Source/lib/lame`. (This is a quirked up version of [LAME](https://lame.sourceforge.io/) included in the project, so even if you have LAME already installed, you still need to do this step.)
125+
3. Inside your local project, navigate to `lib/lame`. (This is a quirked up version of [LAME](https://lame.sourceforge.io/) included in the project, so even if you have LAME already installed, you still need to do this step.)
100126

101127
4. Copy the file called `configMS.h` into `libmp3lame/config.h` (you would presumably copy one of the other config files if you were on a different OS).
102128

103129
5. Launch the command window `x64 Native Tools Command Prompt for VS 2022` which you can find from the start menu if you have Build Tools for Visual Studio 2022 installed.
104130

105-
6. Inside the command window, run `cd [Path to root directotry of local project]/Source/lib/lame`.
131+
6. Inside the command window, run `cd [Path to root directory of local project]\lib\lame`.
106132

107133
7. Then run `nmake dll -f Makefile.MSVC comp=msvc asm=n`.
108134

109-
8. Hopefully the build should succeed, and you can now see the built file `Source/lib/lame/output/libmp3lame-static.lib`.
135+
8. Hopefully the build should succeed, and you can now see the built file `lib/lame/output/libmp3lame-static.lib`.
110136

111137
9. Before we open up the project in CLion, there's even more hoops we need to jump through. (Isn't that what you wanted to hear?) CLion must be run with administrator privileges to install the VST file correctly. If you installed CLion yourself, then you can probably right-click, "Run as Administrator". If you installed CLion through JetBrains Toolbox, click on the vertical dots next to CLion in the list, click "Settings" in the dropdown, the click on "Configuration". Toggle "Run as administrator".
112138

113139
10. Open up the project in CLion. It's gonna start trying to load the CMake project and there's going to be errors because we need to change the CMake settings first.
114140

115-
11. Go to `File | Settings | Build, Execution, Deployment | CMake`. In the `CMake options:` field, place in `-DLAME_LIB=Source\lib\lame\output\libmp3lame-static.lib`, the path to our built file.
141+
11. Go to `File | Settings | Build, Execution, Deployment | CMake`. In the `CMake options:` field, place in `-DLAME_LIB=lib\lame\output\libmp3lame-static.lib`, the path to our built file.
116142

117143
12. Now reload the CMake project.
118144

@@ -127,4 +153,4 @@ curl --output oneapi.exe https://registrationcenter-download.intel.com/akdlm/irc
127153

128154
### Notes:
129155

130-
* If the build fails and you get a message like `file INSTALL cannot set permissions on "C:\Program Files\Common File/VSt3/Maim.vst3": Permission denied.`, it might be for two reasons. The first is that you didn't follow my instructions on giving the build adminsitrator privileges. The second is because your audio workstation is currently using the previously built VST file. You have to close it to rebuild.
156+
* If the build fails and you get a message like `file INSTALL cannot set permissions on "C:\Program Files\Common File/VSt3/Maim.vst3": Permission denied.`, it might be for two reasons. The first is that you didn't follow my instructions on giving the build administrator privileges. The second is because your audio workstation is currently using the previously built VST file. You have to close it to rebuild.

JUCE

Submodule JUCE updated 3605 files

0 commit comments

Comments
 (0)