Browse Source

Improved the standalone BLOCKS-SDK build

tags/2021-05-28
tpoole 8 years ago
parent
commit
cd8598cae4
4 changed files with 30 additions and 39 deletions
  1. +24
    -0
      extras/BLOCKS/Makefile
  2. +6
    -7
      extras/BLOCKS/doxygen/process_source_files.py
  3. +0
    -5
      extras/BLOCKS/juce_modules.txt
  4. +0
    -27
      extras/BLOCKS/standalone_sdk/create_standalone_sdk.py

+ 24
- 0
extras/BLOCKS/Makefile View File

@@ -0,0 +1,24 @@
# Execute this Makefile in an empty directory to create the contents of the
# standalone SDK repository.

ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

JUCE_MODULES := juce_audio_basics juce_audio_devices juce_blocks_basics juce_core juce_events
SDK_JUCE_MODULES := $(addprefix SDK/,$(JUCE_MODULES))

FILES := $(wildcard $(ROOT_DIR)/standalone_sdk/*)
SDK_FILES := $(notdir $(FILES))

all: $(SDK_FILES) $(SDK_JUCE_MODULES)

# Create $(SDK_JUCE_MODULES)
SDK/%: $(ROOT_DIR)/../../modules/%
rm -rf $@
cp -r $< $@

$(SDK_JUCE_MODULES): $(SDK_FILES)

# Create $(SDK_FILES)
%: $(ROOT_DIR)/standalone_sdk/%
rm -rf $@
cp -r $< $@

+ 6
- 7
extras/BLOCKS/doxygen/process_source_files.py View File

@@ -71,10 +71,8 @@ def add_doxygen_group(path, group_name):
############################################################################### ###############################################################################


# Get the list of JUCE modules to include. # Get the list of JUCE modules to include.
juce_modules = []
with open("../juce_modules.txt", "r") as f:
for line in f:
juce_modules.append(line.strip())
juce_modules = ("juce_audio_basics", "juce_audio_devices",
"juce_blocks_basics", "juce_core", "juce_events")


# A temporary directory to hold our preprocessed source files. # A temporary directory to hold our preprocessed source files.
build_directory = "build" build_directory = "build"
@@ -94,13 +92,14 @@ module_definitions = []
for module_name in juce_modules: for module_name in juce_modules:


# Copy the required modules. # Copy the required modules.
original_module_dir = os.path.join("..", "..", "..", "modules", module_name)
original_module_dir = os.path.join("..", "..", "..", "modules",
module_name)
module_path = os.path.join(build_directory, module_name) module_path = os.path.join(build_directory, module_name)
shutil.copytree(original_module_dir, module_path) shutil.copytree(original_module_dir, module_path)


# Parse the module header to get module information. # Parse the module header to get module information.
module_header = os.path.join(module_path, module_name + ".h") module_header = os.path.join(module_path, module_name + ".h")
with open (module_header, "r") as f:
with open(module_header, "r") as f:
content = f.read() content = f.read()
block_info_result = re.match(r".*BEGIN_JUCE_MODULE_DECLARATION" block_info_result = re.match(r".*BEGIN_JUCE_MODULE_DECLARATION"
"(.*)" "(.*)"
@@ -138,7 +137,7 @@ for module_name in juce_modules:
if os.path.isdir(os.path.join(module_path, x))] if os.path.isdir(os.path.join(module_path, x))]
module_groups = {} module_groups = {}
for subdir in subdirs: for subdir in subdirs:
subgroup_name = "{n}-{s}".format(n=module_name, s=subdir)
subgroup_name = "{n}-{s}".format(n=module_name, s=subdir)
module_groups[subgroup_name] = os.path.join(module_path, subdir) module_groups[subgroup_name] = os.path.join(module_path, subdir)
module_definiton.append("") module_definiton.append("")
module_definiton.append( module_definiton.append(


+ 0
- 5
extras/BLOCKS/juce_modules.txt View File

@@ -1,5 +0,0 @@
juce_audio_basics
juce_audio_devices
juce_blocks_basics
juce_core
juce_events

+ 0
- 27
extras/BLOCKS/standalone_sdk/create_standalone_sdk.py View File

@@ -1,27 +0,0 @@
# Run this script in an empty directory to create the contents of the
# standalone SDK repository.

import os
import shutil

script_dir = os.path.dirname(os.path.realpath(__file__))

# Get the list of JUCE modules to include.
juce_modules = []
with open(os.path.join(script_dir, "..", "juce_modules.txt"), "r") as f:
for line in f:
juce_modules.append(line.strip())

# Copy the required modules into the SDK dir.
sdk_dir = "SDK"
shutil.copytree(os.path.join(script_dir, sdk_dir), sdk_dir)
for module_name in juce_modules:
shutil.copytree(os.path.join(script_dir, "..", "..", "..", "modules",
module_name),
os.path.join(sdk_dir, module_name))

# Copy the examples.
shutil.copytree(os.path.join(script_dir, "examples"), "examples")

# Copy the README.
shutil.copyfile(os.path.join(script_dir, "README.md"), "README.md")

Loading…
Cancel
Save