Update gen_csproj script and references

This commit is contained in:
Norbi Peti 2021-05-11 22:56:36 +02:00
parent 858a5c9b5c
commit 3eef859095
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
2 changed files with 10 additions and 10 deletions

View file

@ -27,7 +27,7 @@ def buildReferencesXml(path):
return "<!--Start Dependencies-->\n <ItemGroup>\n" + "".join(result) + " </ItemGroup>\n<!--End Dependencies-->"
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Generate GamecraftModdingAPI.csproj")
parser = argparse.ArgumentParser(description="Generate TechbloxModdingAPI.csproj")
# TODO (maybe?): add params for custom csproj read and write locations
args = parser.parse_args()
@ -35,8 +35,8 @@ if __name__ == "__main__":
asmXml = buildReferencesXml("../ref/TechbloxPreview_Data/Managed")
# print(asmXml)
with open("../GamecraftModdingAPI/GamecraftModdingAPI.csproj", "r") as xmlFile:
print("Parsing GamecraftModdingAPI.csproj")
with open("../TechbloxModdingAPI/TechbloxModdingAPI.csproj", "r") as xmlFile:
print("Parsing TechbloxModdingAPI.csproj")
fileStr = xmlFile.read()
# print(fileStr)
depsStart = re.search(r"\<!--\s*Start\s+Dependencies\s*--\>", fileStr)
@ -45,7 +45,7 @@ if __name__ == "__main__":
print("Unable to find dependency XML comments, aborting!")
exit(1)
newFileStr = fileStr[:depsStart.start()] + "\n" + asmXml + "\n" + fileStr[depsEnd.end() + 1:]
with open("../GamecraftModdingAPI/GamecraftModdingAPI.csproj", "w") as xmlFile:
with open("../TechbloxModdingAPI/TechbloxModdingAPI.csproj", "w") as xmlFile:
print("Writing Assembly references")
xmlFile.write(newFileStr)
# print(newFileStr)

View file

@ -487,9 +487,9 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.RemoveBlock">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.RemoveBlock.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.RemoveBlock.dll</HintPath>
<Reference Include="RobocraftX.GUI.PauseMenu">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.PauseMenu.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.PauseMenu.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.ScaleGhost">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.ScaleGhost.dll</HintPath>
@ -655,9 +655,9 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.InputCapture.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.InputCapture.dll</HintPath>
</Reference>
<Reference Include="Techblox.MouseCursor">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.MouseCursor.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.MouseCursor.dll</HintPath>
<Reference Include="Techblox.Pointer">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Pointer.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Pointer.dll</HintPath>
</Reference>
<Reference Include="Techblox.SwitchAnimation">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>