Skip to content

Commit 0da3218

Browse files
committed
Add pandoc documentation generation and improve install configuration
- Add pandoc to CI workflows for all platforms (Linux, macOS, Windows) - Generate manual.html during build (reTunerManual target) - Fix macOS plugin install paths for CPack compatibility - Switch macOS CPack generator from ZIP to DragNDrop (DMG) - Improve README installation instructions with platform-specific guidance - Simplify app install destination and remove redundant file installs
1 parent e78e27d commit 0da3218

File tree

5 files changed

+58
-24
lines changed

5 files changed

+58
-24
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
build-essential \
3131
cmake \
3232
ninja-build \
33+
pandoc \
3334
libasound2-dev \
3435
libjack-jackd2-dev \
3536
ladspa-sdk \
@@ -49,12 +50,12 @@ jobs:
4950
- name: Install dependencies (macOS)
5051
if: runner.os == 'macOS'
5152
run: |
52-
brew install cmake ninja
53-
53+
brew install cmake ninja pandoc
54+
5455
- name: Install dependencies (Windows)
5556
if: runner.os == 'Windows'
5657
run: |
57-
choco install cmake ninja -y
58+
choco install cmake ninja pandoc -y
5859
5960
- name: Setup MSVC environment (Windows)
6061
if: runner.os == 'Windows'

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
build-essential \
3434
cmake \
3535
ninja-build \
36+
pandoc \
3637
libasound2-dev \
3738
libjack-jackd2-dev \
3839
ladspa-sdk \
@@ -52,12 +53,12 @@ jobs:
5253
- name: Install dependencies (macOS)
5354
if: runner.os == 'macOS'
5455
run: |
55-
brew install cmake ninja
56+
brew install cmake ninja pandoc
5657
5758
- name: Install dependencies (Windows)
5859
if: runner.os == 'Windows'
5960
run: |
60-
choco install cmake ninja -y
61+
choco install cmake ninja pandoc -y
6162
6263
- name: Setup MSVC environment (Windows)
6364
if: runner.os == 'Windows'

CMakeLists.txt

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
cmake_minimum_required(VERSION 3.21)
32
project(retuner VERSION 1.1.0)
43

@@ -129,20 +128,46 @@ if(LINUX OR WIN32)
129128
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/reTuner_artefacts/$<CONFIG>/VST3/"
130129
DESTINATION "${CMAKE_INSTALL_LIBDIR}/vst3")
131130
elseif(APPLE)
132-
install(TARGETS "reTuner_AU" LIBRARY DESTINATION "Library/Audio/Plug-Ins/Components")
133-
install(TARGETS "reTuner_CLAP" LIBRARY DESTINATION "Library/Audio/Plug-Ins/CLAP")
134-
install(TARGETS "reTuner_VST3" LIBRARY DESTINATION "Library/Audio/Plug-Ins/VST3")
131+
install(TARGETS "reTuner_AU" LIBRARY DESTINATION "Plug-Ins/AU")
132+
install(TARGETS "reTuner_CLAP" LIBRARY DESTINATION "Plug-Ins/CLAP")
133+
install(TARGETS "reTuner_VST3" LIBRARY DESTINATION "Plug-Ins/VST3")
135134
# LV2 on macOS isn't a real library bundle.
136135
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/reTuner_artefacts/$<CONFIG>/LV2/"
137-
DESTINATION "Library/Audio/Plug-Ins/LV2")
136+
DESTINATION "Plug-Ins/LV2")
137+
endif()
138+
139+
find_program(PANDOC_EXECUTABLE pandoc)
140+
if(PANDOC_EXECUTABLE)
141+
message(STATUS "Found pandoc: ${PANDOC_EXECUTABLE}")
142+
143+
add_custom_target(reTunerManual ALL
144+
COMMAND ${PANDOC_EXECUTABLE}
145+
-o "${CMAKE_BINARY_DIR}/manual.html"
146+
--standalone
147+
"${CMAKE_SOURCE_DIR}/docs/manual.md"
148+
COMMENT "Generating the manual with pandoc"
149+
VERBATIM
150+
BYPRODUCTS
151+
"${CMAKE_BINARY_DIR}/manual.html"
152+
)
153+
if(LINUX)
154+
install(FILES "${CMAKE_BINARY_DIR}/manual.html"
155+
DESTINATION "${CMAKE_INSTALL_DATADIR}/retuner")
156+
else()
157+
install(FILES "${CMAKE_BINARY_DIR}/manual.html"
158+
DESTINATION "${CMAKE_INSTALL_PREFIX}")
159+
endif()
160+
else()
161+
message(STATUS "pandoc not found - documentation target will not be available")
138162
endif()
139163

140164
add_subdirectory(src/app)
141165
add_subdirectory(test)
142166

143167
if(LINUX)
144-
install(FILES README.md LICENSE.txt docs/manual.md
145-
DESTINATION "${CMAKE_INSTALL_DATADIR}/retuner")
168+
install(FILES LICENSE.txt DESTINATION "${CMAKE_INSTALL_DATADIR}/retuner")
169+
else()
170+
install(FILES LICENSE.txt DESTINATION "${CMAKE_INSTALL_PREFIX}")
146171
endif()
147172

148173
# CPack configuration
@@ -162,30 +187,25 @@ set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
162187
if(LINUX)
163188
set(RETUNER_SYSTEM_NAME "linux")
164189
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" RETUNER_PROCESSOR)
165-
set(CPACK_GENERATOR "TGZ;DEB")
190+
set(CPACK_GENERATOR "DEB")
166191
set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF)
167192
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
168193
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libasound2;libfreetype6;libx11-6;libxext6;libxrandr2;libxinerama1;libxcursor1;libcurl4;libgl1;libstdc++6")
169194
elseif(APPLE)
170195
set(RETUNER_SYSTEM_NAME "macos")
171196
set(RETUNER_PROCESSOR "universal")
172-
set(CPACK_GENERATOR "ZIP")
197+
set(CPACK_GENERATOR "DragNDrop")
173198
set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF)
174-
set(CPACK_SET_DESTDIR OFF)
199+
set(CPACK_SET_DESTDIR ON)
175200
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
176-
install(FILES README.md LICENSE.txt docs/manual.md
177-
DESTINATION "${CMAKE_INSTALL_PREFIX}")
178201
elseif(WIN32)
179202
set(RETUNER_SYSTEM_NAME "windows")
180203
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" RETUNER_PROCESSOR)
181204
set(CPACK_IGNORE_FILES ".*\\.lib$;.*\\.exp$;.*\\.ico$")
182205
set(CPACK_GENERATOR "ZIP")
183206
set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF)
184207
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
185-
install(FILES README.md LICENSE.txt docs/manual.md
186-
DESTINATION "${CMAKE_INSTALL_PREFIX}")
187208
endif()
188209

189210
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-${RETUNER_SYSTEM_NAME}-${RETUNER_PROCESSOR}")
190211
include(CPack)
191-

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ reTuner is a precision audio pitch shifting plugin designed to convert music bet
44

55
![Screenshot](docs/screenshot.png)
66

7-
Built with [JUCE](https://juce.com/) and [Rubber Band Library](https://breakfastquay.com/rubberband/).
7+
Built with [JUCE](https://juce.com/) and [Rubber Band](https://breakfastquay.com/rubberband/).
88

99
## Features
1010

@@ -56,8 +56,21 @@ git submodule update --init --recursive
5656
```
5757

5858
## Installation
59+
### Linux
60+
Note: You might need `sudo` depending on your prefix:
61+
```sh
62+
cmake --install build
63+
```
64+
65+
### Mac an PC
66+
**WARNING**
67+
_Do not_ use `cmake --install ...` to install apps and plugins on these platforms. cmake install for these platforms is set up to work well with cpack, not system installation. Use at your own peril.
68+
69+
**INSTEAD**
70+
After building, the artifacts can be found in the `build/reTuner_artefacts` directory for plugins and `build/src/app/reTunerApp_artefacts` for the standalone application. Just manually copy them where you want them.
5971

60-
After building, the artifacts can be found in the `reTuner_artefacts` directory for plugins or `build/reTunerApp_artefacts` for the standalone application.
72+
**OR**
73+
You can use JUCE's [copy plugin options in cmake](deps/JUCE/docs/CMake%20API.md). Search for `COPY_PLUGIN_AFTER_BUILD` in the JUCE docs for details. Note that this option won't copy the standalone application (`reTuner.app` or `reTuner.exe`), and may fail on Windows when copying to system directories.
6174

6275
## License
6376

src/app/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,5 @@ if(NOT APPLE)
7070
install(TARGETS reTunerApp DESTINATION ${CMAKE_INSTALL_BINDIR})
7171
else()
7272
install(TARGETS reTunerApp
73-
BUNDLE DESTINATION "Applications"
74-
COMPONENT "Standalone")
73+
BUNDLE DESTINATION "${CMAKE_INSTALL_PREFIX}")
7574
endif()

0 commit comments

Comments
 (0)