Skip to content

Commit ff5dbaa

Browse files
committed
Update install targets
1 parent c841ea9 commit ff5dbaa

2 files changed

Lines changed: 64 additions & 31 deletions

File tree

BUILDING.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -139,34 +139,43 @@ build/MatchingCompressor_artefacts/Release/
139139

140140
## Installation
141141

142-
### macOS
142+
After building, install the plugins to standard system locations:
143143

144144
```bash
145-
# VST3
146-
cp -r build/MatchingCompressor_artefacts/Release/VST3/MatchingCompressor.vst3 ~/Library/Audio/Plug-Ins/VST3/
145+
# Modern CMake style
146+
cmake --install build
147147

148-
# Audio Unit
149-
cp -r build/MatchingCompressor_artefacts/Release/AU/MatchingCompressor.component ~/Library/Audio/Plug-Ins/Components/
148+
# Or traditional Unix style (from build directory)
149+
cd build && make install
150150
```
151151

152-
### Linux
152+
This installs to the standard plugin directories:
153+
154+
| Platform | Plugin | Location |
155+
|----------|--------|----------|
156+
| macOS | AU | `~/Library/Audio/Plug-Ins/Components/` |
157+
| macOS | VST3 | `~/Library/Audio/Plug-Ins/VST3/` |
158+
| Linux | VST3 | `~/.vst3/` |
159+
| Windows | VST3 | `C:\Program Files\Common Files\VST3\` |
160+
161+
### Manual Installation
162+
163+
Alternatively, copy the plugins manually:
164+
165+
#### macOS
166+
```bash
167+
cp -r build/MatchingCompressor_artefacts/Release/AU/MatchingCompressor.component ~/Library/Audio/Plug-Ins/Components/
168+
cp -r build/MatchingCompressor_artefacts/Release/VST3/MatchingCompressor.vst3 ~/Library/Audio/Plug-Ins/VST3/
169+
```
153170

171+
#### Linux
154172
```bash
155-
# VST3 (user install)
156173
mkdir -p ~/.vst3
157174
cp -r build/MatchingCompressor_artefacts/Release/VST3/MatchingCompressor.vst3 ~/.vst3/
158-
159-
# VST3 (system-wide)
160-
sudo cp -r build/MatchingCompressor_artefacts/Release/VST3/MatchingCompressor.vst3 /usr/lib/vst3/
161175
```
162176

163-
### Windows
164-
165-
Copy `MatchingCompressor.vst3` to one of:
166-
- `C:\Program Files\Common Files\VST3\` (system-wide)
167-
- `%LOCALAPPDATA%\Programs\Common\VST3\` (user install)
168-
169-
Or run the installer from the releases page.
177+
#### Windows
178+
Copy `build/MatchingCompressor_artefacts/Release/VST3/MatchingCompressor.vst3` to `C:\Program Files\Common Files\VST3\`
170179

171180
## Troubleshooting
172181

CMakeLists.txt

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project("MatchingCompressor")
44
include(FetchContent)
55

66
# Fetch JUCE
7-
set(JUCE_VERSION "8.0.1")
7+
set(JUCE_VERSION "8.0.4")
88
FetchContent_Declare(
99
JUCE
1010
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
@@ -46,8 +46,13 @@ juce_add_plugin(MatchingCompressor
4646
COMPANY_NAME "Just1m0reApp"
4747
COMPANY_WEBSITE "https://github.com/justonem0reuser"
4848

49+
PLUGIN_MANUFACTURER_CODE Jmor
50+
PLUGIN_CODE Mtcp
51+
4952
FORMATS ${JUCE_PLUGIN_FORMATS}
5053

54+
AU_MAIN_TYPE kAudioUnitType_Effect
55+
5156
VST3_CATEGORIES
5257
"Analyzer"
5358
"Dynamics"
@@ -163,17 +168,36 @@ target_link_libraries(MatchingCompressor
163168
juce::juce_recommended_warning_flags
164169
)
165170

166-
# This allows to add additional steps after building:
167-
# for example, to copy the plugin to the common VST3 directory
168-
# and run a DAW app.
169-
170-
set(POST_BUILD_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/post_build_plugin.cmake")
171-
172-
if(EXISTS "${POST_BUILD_SCRIPT}")
173-
add_custom_command(TARGET MatchingCompressor_VST3 POST_BUILD
174-
COMMAND ${CMAKE_COMMAND}
175-
-DPLUGIN_PATH="$<TARGET_FILE:MatchingCompressor_VST3>"
176-
-DPOST_BUILD_SCRIPT="${POST_BUILD_SCRIPT}"
177-
-P "${POST_BUILD_SCRIPT}"
178-
)
171+
# Installation targets
172+
# Usage: cmake --install build
173+
174+
if(APPLE)
175+
install(CODE "
176+
file(INSTALL
177+
DESTINATION \"\$ENV{HOME}/Library/Audio/Plug-Ins/Components\"
178+
TYPE DIRECTORY
179+
FILES \"${CMAKE_BINARY_DIR}/MatchingCompressor_artefacts/\$<CONFIG>/AU/MatchingCompressor.component\"
180+
)
181+
file(INSTALL
182+
DESTINATION \"\$ENV{HOME}/Library/Audio/Plug-Ins/VST3\"
183+
TYPE DIRECTORY
184+
FILES \"${CMAKE_BINARY_DIR}/MatchingCompressor_artefacts/\$<CONFIG>/VST3/MatchingCompressor.vst3\"
185+
)
186+
")
187+
elseif(UNIX)
188+
install(CODE "
189+
file(INSTALL
190+
DESTINATION \"\$ENV{HOME}/.vst3\"
191+
TYPE DIRECTORY
192+
FILES \"${CMAKE_BINARY_DIR}/MatchingCompressor_artefacts/\$<CONFIG>/VST3/MatchingCompressor.vst3\"
193+
)
194+
")
195+
elseif(WIN32)
196+
install(CODE "
197+
file(INSTALL
198+
DESTINATION \"\$ENV{PROGRAMFILES}/Common Files/VST3\"
199+
TYPE DIRECTORY
200+
FILES \"${CMAKE_BINARY_DIR}/MatchingCompressor_artefacts/\$<CONFIG>/VST3/MatchingCompressor.vst3\"
201+
)
202+
")
179203
endif()

0 commit comments

Comments
 (0)