Skip to content

Commit a7566c2

Browse files
committed
Changed the FL parser mechanism from download-binary to download-source
1 parent e72352c commit a7566c2

File tree

7 files changed

+64
-16
lines changed

7 files changed

+64
-16
lines changed

.appveyor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@ install:
1717
Invoke-WebRequest "https://web.archive.org/web/20200502121517/https://www.steinberg.net/sdk_downloads/vstsdk366_27_06_2016_build_61.zip" -OutFile "vstsdk.zip"
1818
Expand-Archive "vstsdk.zip" "C:\tmp"
1919
}
20-
if (-Not (Test-Path "C:\tmp\Monad.FLParser.dll")) {
21-
Invoke-WebRequest "https://github.com/LeStahL/FLParser/releases/download/compatibility-20.9/Monad.FLParser.dll" -OutFile "C:\tmp\Monad.FLParser.dll"
22-
}
2320
2421
build_script:
2522
# build native code/tests
2623
- mkdir build
2724
- cd build
28-
- cmake -DCMAKE_GENERATOR_PLATFORM=%PLATFORM% -DVSTSDK3_DIR="C:/tmp/VST3 SDK" -DMONAD_FL_PARSER_DIR="C:/tmp/" ..
25+
- cmake -DCMAKE_GENERATOR_PLATFORM=%PLATFORM% -DVSTSDK3_DIR="C:/tmp/VST3 SDK" -DDOWNLOAD_MONAD_FL_PARSER=ON -DMONAD_FL_PARSER_DIR="C:/tmp/Monad.FLParser" ..
2926
- msbuild /v:minimal /nologo WaveSabre.sln
3027
- msbuild /v:minimal /nologo /property:Configuration="MinSizeRel" WaveSabre.sln
3128
- cd ..

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Vst3.x/*
3535
!Vst3.x/README
3636
Data/data.aps
3737
Vsts/*/*.def
38-
WaveSabreConvert/FLParser/Monad.FLParser.dll
3938

4039
# Ignore VS 2017 IDE fluff
4140
.vs/

CMakeLists.txt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ cmake_policy(SET CMP0057 NEW)
55
include(CSharpUtilities)
66
set(CMAKE_CSharp_FLAGS ${CMAKE_CSharp_FLAGS} "/langversion:6")
77

8+
find_package(Git REQUIRED)
9+
include(ExternalProject)
10+
811
cmake_minimum_required(VERSION 3.11)
912
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
1013

@@ -19,7 +22,7 @@ set(BUILD_WAVESABRE_CONVERT_TESTS ON CACHE BOOL "Do not build the WaveSabreConve
1922
set(BUILD_CONVERT_THE_FUCK ON CACHE BOOL "Do not build ConvertTheFuck.")
2023
set(BUILD_PROJECT_MANAGER ON CACHE BOOL "Do not build the project manager.")
2124
set(VSTSDK3_DIR "${PROJECT_SOURCE_DIR}/Vst3.x/" CACHE PATH "VSTSDK location.")
22-
set(MONAD_FL_PARSER_DIR "${PROJECT_SOURCE_DIR}/WaveSabreConvert/FLParser/" CACHE PATH "Monad FL parser location.")
25+
set(MONAD_FL_PARSER_DIR "${CMAKE_CURRENT_BINARY_DIR}/Monad.FLParser.Source" CACHE PATH "Monad FL parser location.")
2326

2427
# Download and unpack VST3 SDK
2528
set(DOWNLOAD_VST3SDK OFF CACHE BOOL "Download and unpack VST3 SDK automatically.")
@@ -37,12 +40,23 @@ endif()
3740
# Download and unpack the Monad FL Parser
3841
set(DOWNLOAD_MONAD_FL_PARSER OFF CACHE BOOL "Download the Monad FL parser binary automatically.")
3942
if(${BUILD_WAVESABRE_CONVERT} AND ${DOWNLOAD_MONAD_FL_PARSER})
40-
find_file(MONAD_FL_PARSER_TEST name Monad.FLParser.dll HINTS ${MONAD_FL_PARSER_DIR})
43+
set(MONAD_FL_PARSER_BINARY ${CMAKE_CURRENT_BINARY_DIR}/Monad.FLParser/Release/Monad.FLParser.dll)
44+
find_file(MONAD_FL_PARSER_TEST NAME Project.cs HINTS ${MONAD_FL_PARSER_DIR})
4145
if(${MONAD_FL_PARSER_TEST} MATCHES MONAD_FL_PARSER_TEST-NOTFOUND)
4246
message(STATUS "Monad FL parser not found. Will download.")
43-
file(DOWNLOAD https://github.com/LeStahL/FLParser/releases/download/compatibility-20.9/Monad.FLParser.dll Monad.FLParser.dll SHOW_PROGRESS)
44-
file(COPY "${CMAKE_CURRENT_BINARY_DIR}/Monad.FLParser.dll" DESTINATION "${MONAD_FL_PARSER_DIR}")
47+
ExternalProject_Add(FLParser
48+
SOURCE_DIR ${MONAD_FL_PARSER_DIR}
49+
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Monad.FLParser
50+
GIT_REPOSITORY https://github.com/Kwarf/FLParser.git
51+
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/WaveSabreConvert/FLParser/CMakeLists.txt ${MONAD_FL_PARSER_DIR}/CMakeLists.txt && ${CMAKE_COMMAND} ${MONAD_FL_PARSER_DIR} -DMONAD_FL_PARSER_DIR=${MONAD_FL_PARSER_DIR}
52+
BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/Monad.FLParser --config Release -- -m
53+
INSTALL_COMMAND ""
54+
)
4555
endif()
56+
elseif(${BUILD_WAVESABRE_CONVERT})
57+
message(STATUS "Using existent FL parser repo.")
58+
add_subdirectory(WaveSabreConvert/FLParser)
59+
set(MONAD_FL_PARSER_BINARY ${CMAKE_CURRENT_BINARY_DIR}/WaveSabreConvert/FLParser/Release/Monad.FLParser.dll)
4660
endif()
4761

4862
# shared code

Docs/Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- WaveSabre builds have only been tested with Visual Studio 2013/2015/2017/2019 and version 3.6.6 of the VST3 SDK.
66
- Due to licensing requirements, WaveSabre requires you to either [download](https://web.archive.org/web/20200502121517/https://www.steinberg.net/sdk_downloads/vstsdk366_27_06_2016_build_61.zip) and copy the VST3 SDK into the build yourself. Download, extract, and copy into the *"Vst3.x"* folder. See [this readme](https://github.com/logicomacorp/WaveSabre/blob/master/Vst3.x/README) or download the VST3 SDK automatically using CMake (see below).
7-
- For the same reasons, you should [download](https://github.com/LeStahL/FLParser/releases/download/compatibility-20.9/Monad.FLParser.dll) and copy the Monad FL parser into the build yourself. Download and copy the dll into the folder at `WaveSabreConvert/FLParser/`. See [this readme](https://github.com/logicomacorp/WaveSabre/blob/master/WaveSabreConvert/FLParser/README). You can also let CMake download the Monad FL parser automatically for you; see below for the command line options to use for this.
7+
- For the same reasons, you should [download](https://github.com/Kwarf/FLParser) the Monad FL parser source yourself. You can also let CMake download the Monad FL parser automatically for you; see below for the command line options to use for this.
88

99
### CMake
1010

WaveSabreConvert/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ set(WAVESABRE_CONVERT_SOURCES
3131
)
3232

3333
add_library(WaveSabreConvert SHARED ${WAVESABRE_CONVERT_SOURCES})
34+
set_property(TARGET WaveSabreConvert PROPERTY VS_DOTNET_REFERENCE_Monad.FLParser "${MONAD_FL_PARSER_BINARY}")
35+
if(${DOWNLOAD_MONAD_FL_PARSER})
36+
add_dependencies(WaveSabreConvert FLParser)
37+
else()
38+
add_dependencies(WaveSabreConvert Monad.FLParser)
39+
endif()
3440

3541
csharp_set_designer_cs_properties(${WAVESABRE_CONVERT_SOURCES})
3642
csharp_set_windows_forms_properties(${WAVESABRE_CONVERT_SOURCES})
37-
set_property(TARGET WaveSabreConvert PROPERTY VS_DOTNET_REFERENCE_Monad.FLParser "${MONAD_FL_PARSER_DIR}/Monad.FLParser.dll")
3843
set_property(TARGET WaveSabreConvert PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1")
3944
set_property(TARGET WaveSabreConvert PROPERTY VS_DOTNET_REFERENCES
4045
"System"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
project(Monad.FLParser LANGUAGES CSharp)
4+
5+
cmake_policy(SET CMP0057 NEW)
6+
include(CSharpUtilities)
7+
set(CMAKE_CSharp_FLAGS ${CMAKE_CSharp_FLAGS} "/langversion:6")
8+
9+
set(MONAD_FL_PARSER_SOURCES
10+
${MONAD_FL_PARSER_DIR}/Properties/AssemblyInfo.cs
11+
12+
${MONAD_FL_PARSER_DIR}/AutomationData.cs
13+
${MONAD_FL_PARSER_DIR}/AutomationKeyframe.cs
14+
${MONAD_FL_PARSER_DIR}/Channel.cs
15+
${MONAD_FL_PARSER_DIR}/ChannelPlaylistItem.cs
16+
${MONAD_FL_PARSER_DIR}/Enums.cs
17+
${MONAD_FL_PARSER_DIR}/FlParseException.cs
18+
${MONAD_FL_PARSER_DIR}/GeneratorData.cs
19+
${MONAD_FL_PARSER_DIR}/IChannelData.cs
20+
${MONAD_FL_PARSER_DIR}/Insert.cs
21+
${MONAD_FL_PARSER_DIR}/InsertSlot.cs
22+
${MONAD_FL_PARSER_DIR}/IPlaylistItem.cs
23+
${MONAD_FL_PARSER_DIR}/Note.cs
24+
${MONAD_FL_PARSER_DIR}/Pattern.cs
25+
${MONAD_FL_PARSER_DIR}/PatternPlaylistItem.cs
26+
${MONAD_FL_PARSER_DIR}/Plugin.cs
27+
${MONAD_FL_PARSER_DIR}/PluginIoInfo.cs
28+
${MONAD_FL_PARSER_DIR}/Project.cs
29+
${MONAD_FL_PARSER_DIR}/ProjectParser.cs
30+
${MONAD_FL_PARSER_DIR}/Track.cs
31+
)
32+
33+
add_library(Monad.FLParser SHARED ${MONAD_FL_PARSER_SOURCES})
34+
set_property(TARGET Monad.FLParser PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.6.1")
35+
set_property(TARGET Monad.FLParser PROPERTY VS_DOTNET_REFERENCES
36+
"System"
37+
"System.Core"
38+
)

WaveSabreConvert/FLParser/README

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)