Skip to content

这是一个用于处理和优化 Objective-C 头文件依赖关系的 Python 工具。它可以分析头文件之间的依赖关系,清理头文件内容,并生成优化后的头文件。

Notifications You must be signed in to change notification settings

fly8888/header_dependency_processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Header Dependency Processor

Overview

A Python tool for processing and optimizing Objective-C header file dependencies. It analyzes dependencies between header files, cleans header content, and generates optimized header files.

Key Features

  • Analyzes header file dependencies
  • Cleans and optimizes header content
  • Handles framework imports and protocol dependencies
  • Generates dependency graphs
  • Provides detailed processing logs

Usage

  1. Run the program with required arguments:

    python header_dependency_processor.py <source_headers_dir> <output_dir> <wx_header_path>

    Where:

    • source_headers_dir: Directory containing the original header files
    • output_dir: Directory where processed files will be saved
    • wx_header_path: Path to your Header.h file

The script will:

  • Process all headers imported in Header.h
  • Clean and optimize the header contents
  • Save processed files to the output directory
  • Generate detailed logs of the process

Features

  • Automatic cleanup of .cxx_destruct methods
  • Replacement of CDUnknownBlockType with id
  • Protocol declaration optimization
  • System framework import handling
  • @class declaration processing
  • Recursive dependency processing

Logging

The program generates detailed processing logs including:

  • Total number of processed files
  • Total number of protocols found
  • Dependency tree for each file

Requirements

  • Python 3.x
  • OS: Cross-platform support

Important Notes

  • Ensure all required header files are present in the input directory
  • Backup original files before processing

About

这是一个用于处理和优化 Objective-C 头文件依赖关系的 Python 工具。它可以分析头文件之间的依赖关系,清理头文件内容,并生成优化后的头文件。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages