The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1KB

  1. import os
  2. import shutil
  3. script_dir = os.path.dirname(os.path.realpath(__file__))
  4. # Get the list of JUCE modules to include.
  5. juce_modules = []
  6. with open(os.path.join(script_dir, "..", "juce_modules.txt"), "r") as f:
  7. for line in f:
  8. juce_modules.append(line.strip())
  9. # Make sure we are starting afresh.
  10. out_directory = "BLOCKS-SDK"
  11. try:
  12. shutil.rmtree(out_directory)
  13. except OSError as e:
  14. if e.errno != 2:
  15. # An errno of 2 indicates that the directory does not exist, which is
  16. # fine!
  17. raise e
  18. # Copy the required modules into the SDK dir.
  19. sdk_dir = os.path.join(out_directory, "SDK")
  20. shutil.copytree(os.path.join(script_dir, "SDK"), sdk_dir)
  21. for module_name in juce_modules:
  22. shutil.copytree(os.path.join(script_dir, "..", "..", "..", "modules",
  23. module_name),
  24. os.path.join(sdk_dir, module_name))
  25. # Copy the examples.
  26. shutil.copytree(os.path.join(script_dir, "examples"),
  27. os.path.join(out_directory, "examples"))
  28. # Copy the README.
  29. shutil.copyfile(os.path.join(script_dir, "README.md"),
  30. os.path.join(out_directory, "README.md"))