Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion build/scripts/metadata-generation-build-step
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,25 @@ other_cflags_parsed = shlex.split(other_cflags)
preprocessor_defs = env_or_empty("GCC_PREPROCESSOR_DEFINITIONS")
preprocessor_defs_parsed = map((lambda s: "-D" + s), shlex.split(preprocessor_defs, '\''))
typescript_output_folder = env_or_none("TNS_TYPESCRIPT_DECLARATIONS_PATH")
docset_platform = "iOS"
effective_platofrm_name = env("EFFECTIVE_PLATFORM_NAME")

if effective_platofrm_name is "-macosx":
docset_platform = "OSX"
elif effective_platofrm_name is "-watchos" or effective_platofrm_name is "-watchsimulator":
docset_platform = "watchOS"
elif effective_platofrm_name is "-appletvos" or effective_platofrm_name is "-appletvsimulator":
docset_platform = "tvOS"
docset_path = os.path.join(os.path.expanduser("~"), "Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.{}.docset".format(docset_platform))
yaml_output_folder = env_or_none("TNS_DEBUG_METADATA_PATH")


def generate_metadata(arch):
# metadata generator arguments
generator_call = ["./objc-metadata-generator",
"-output-bin", "{}/metadata-{}.bin".format(conf_build_dir, arch),
"-output-umbrella", "{}/umbrella-{}.h".format(conf_build_dir, arch)]
"-output-umbrella", "{}/umbrella-{}.h".format(conf_build_dir, arch),
"-docset-path", docset_path]

# optionally add typescript output folder
if typescript_output_folder is not None:
Expand Down