MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / ProjectConfig

Class ProjectConfig

tools/project.py:135–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134
135class ProjectConfig:
136 def __init__(self) -> None:
137 # Paths
138 self.build_dir: Path = Path("build") # Output build files
139 self.src_dir: Path = Path("src") # C/C++/asm source files
140 self.tools_dir: Path = Path("tools") # Python scripts
141 self.asm_dir: Optional[Path] = Path(
142 "asm"
143 ) # Override incomplete objects (for modding)
144
145 # Tooling
146 self.binutils_tag: Optional[str] = None # Git tag
147 self.binutils_path: Optional[Path] = None # If None, download
148 self.dtk_tag: Optional[str] = None # Git tag
149 self.dtk_path: Optional[Path] = None # If None, download
150 self.compilers_tag: Optional[str] = None # 1
151 self.compilers_path: Optional[Path] = None # If None, download
152 self.wibo_tag: Optional[str] = None # Git tag
153 self.wrapper: Optional[Path] = None # If None, download wibo on Linux
154 self.sjiswrap_tag: Optional[str] = None # Git tag
155 self.sjiswrap_path: Optional[Path] = None # If None, download
156 self.objdiff_tag: Optional[str] = None # Git tag
157 self.objdiff_path: Optional[Path] = None # If None, download
158
159 # Project config
160 self.non_matching: bool = False
161 self.build_rels: bool = True # Build REL files
162 self.check_sha_path: Optional[Path] = None # Path to version.sha1
163 self.config_path: Optional[Path] = None # Path to config.yml
164 self.generate_map: bool = False # Generate map file(s)
165 self.asflags: Optional[List[str]] = None # Assembler flags
166 self.ldflags: Optional[List[str]] = None # Linker flags
167 self.libs: Optional[List[Library]] = None # List of libraries
168 self.linker_version: Optional[str] = None # mwld version
169 self.version: Optional[str] = None # Version name
170 self.warn_missing_config: bool = False # Warn on missing unit configuration
171 self.warn_missing_source: bool = False # Warn on missing source file
172 self.rel_strip_partial: bool = True # Generate PLFs with -strip_partial
173 self.rel_empty_file: Optional[str] = (
174 None # Object name for generating empty RELs
175 )
176 self.shift_jis = (
177 True # Convert source files from UTF-8 to Shift JIS automatically
178 )
179 self.reconfig_deps: Optional[List[Path]] = (
180 None # Additional re-configuration dependency files
181 )
182 self.custom_build_rules: Optional[List[Dict[str, Any]]] = (
183 None # Custom ninja build rules
184 )
185 self.custom_build_steps: Optional[Dict[str, List[Dict[str, Any]]]] = (
186 None # Custom build steps, types are ["pre-compile", "post-compile", "post-link", "post-build"]
187 )
188 self.generate_compile_commands: bool = (
189 True # Generate compile_commands.json for clangd
190 )
191 self.extra_clang_flags: List[str] = [] # Extra flags for clangd
192 self.scratch_preset_id: Optional[int] = (

Callers 1

configure.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected