|
Makeprojects
|
Project file generator subroutines for Microsoft Visual Studio 2003-2008. More...
Functions | |
| get_path_property (ide, pathname) | |
| If a path is relative, return the proper object. | |
| get_toolset_version (ide) | |
| Get the toolset version for the Visual Studio version. | |
| convert_file_name_vs2010 (item) | |
| Convert macros from to Visual Studio 2003-2008. | |
| wiiu_props (project) | |
| If the project is for WiiU, check if there are assembly files. | |
| add_masm_support (project) | |
| If the project is has assembly files, add the props files. | |
| get_cpu_folder (platform) | |
| If the platform is a Windows type, return the CPU name. | |
| generate_solution_file (solution_lines, solution) | |
| Serialize the solution file into a string array. | |
| create_copy_file_script (source_file, dest_file, perforce) | |
| Create a batch file to copy a single file. | |
| create_deploy_script (configuration) | |
| Create a deployment batch file if needed. | |
Variables | |
| dict | _PLATFORM_CPUS |
| Dict of platforms to maps to names. | |
| dict | _SLN_HEADERS |
| Internal list of Visual Studio headers for SLN files. | |
| dict | _SLN_POSTSOLUTION |
| UUIDs for postSolution SLN records. | |
Project file generator subroutines for Microsoft Visual Studio 2003-2008.
This module contains classes needed to generate project files intended for use by Microsoft's Visual Studio 2003, 2005 and 2008.
| makeprojects.visual_studio_utils.add_masm_support | ( | project | ) |
If the project is has assembly files, add the props files.
This function works for Visual Studio 2003-2022.
| project | Project to check |
| makeprojects.visual_studio_utils.convert_file_name_vs2010 | ( | item | ) |
Convert macros from to Visual Studio 2003-2008.
This table shows the conversions
| Visual Studio 2010+ | 2003-2008 |
|---|---|
| %(RootDir)%(Directory) | $(InputDir) |
| %(FileName) | $(InputName) |
| %(Extension) | $(InputExt) |
| %(FullPath) | $(InputPath) |
| %(Identity) | $(InputPath) |
| item | Filename string |
| makeprojects.visual_studio_utils.create_copy_file_script | ( | source_file, | |
| dest_file, | |||
| perforce ) |
Create a batch file to copy a single file.
Create a list of command lines to copy a file from source_file to dest_file with perforce support.
This is an example of the Windows batch file. The lines for the tool p4 are added if perforce=True.
| source_file | Pathname to the source file |
| dest_file | Pathname to where to copy source file |
| perforce | True if perforce commands should be generated. |
| makeprojects.visual_studio_utils.create_deploy_script | ( | configuration | ) |
Create a deployment batch file if needed.
If an attribute of deploy_folder exists, a batch file will be returned that has the commands to copy the output file to the folder named in deploy_folder.
Two values are returned, the first is the command description suitable for Visual Studio Post Build and the second is the batch file string to perform the file copy. Both values are set to None if deploy_folder is empty.
| configuration | Configuration record. |
| makeprojects.visual_studio_utils.generate_solution_file | ( | solution_lines, | |
| solution ) |
Serialize the solution file into a string array.
This function generates SLN files for all versions of Visual Studio. It assumes the text file will be encoded using UTF-8 character encoding so the resulting file will be pre-pended with a UTF-8 Byte Order Mark (BOM) for Visual Studio 2005 or higher.
| solution_lines | List to insert string lines. |
| solution | Reference to the raw solution record |
| makeprojects.visual_studio_utils.get_cpu_folder | ( | platform | ) |
If the platform is a Windows type, return the CPU name.
Returns None, "x86", "x64", "arm", "arm64", or "ia64"
| platform | enums.PlatformTypes to check |
| makeprojects.visual_studio_utils.get_path_property | ( | ide, | |
| pathname ) |
If a path is relative, return the proper object.
Check if a pathname starts with a ".", which means it's relative to the project. If so, return a RelativePath string, otherwise return a FileName string. Special case for Visual Studio 2003, it only accepts RelativePath as a parameter
| ide | enums.IDETypes of the IDE being generated for. |
| pathname | Pathname to test. |
| makeprojects.visual_studio_utils.get_toolset_version | ( | ide | ) |
Get the toolset version for the Visual Studio version.
Each version of Visual Studio uses a toolset version specific to that version. Return the version number for the vcxproj file.
Strings returned are "4.0", "12.0", "14.0" and "15.0".
| ide | enums.IDETypes of the IDE being generated |
| makeprojects.visual_studio_utils.wiiu_props | ( | project | ) |
If the project is for WiiU, check if there are assembly files.
If there are assembly files, add the Nintendo supplied props file for assembly language support.
| project | Project to check |
|
protected |
Dict of platforms to maps to names.