Update gen_csproj script and references
This commit is contained in:
parent
858a5c9b5c
commit
3eef859095
2 changed files with 10 additions and 10 deletions
|
@ -27,7 +27,7 @@ def buildReferencesXml(path):
|
||||||
return "<!--Start Dependencies-->\n <ItemGroup>\n" + "".join(result) + " </ItemGroup>\n<!--End Dependencies-->"
|
return "<!--Start Dependencies-->\n <ItemGroup>\n" + "".join(result) + " </ItemGroup>\n<!--End Dependencies-->"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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
|
# TODO (maybe?): add params for custom csproj read and write locations
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ if __name__ == "__main__":
|
||||||
asmXml = buildReferencesXml("../ref/TechbloxPreview_Data/Managed")
|
asmXml = buildReferencesXml("../ref/TechbloxPreview_Data/Managed")
|
||||||
# print(asmXml)
|
# print(asmXml)
|
||||||
|
|
||||||
with open("../GamecraftModdingAPI/GamecraftModdingAPI.csproj", "r") as xmlFile:
|
with open("../TechbloxModdingAPI/TechbloxModdingAPI.csproj", "r") as xmlFile:
|
||||||
print("Parsing GamecraftModdingAPI.csproj")
|
print("Parsing TechbloxModdingAPI.csproj")
|
||||||
fileStr = xmlFile.read()
|
fileStr = xmlFile.read()
|
||||||
# print(fileStr)
|
# print(fileStr)
|
||||||
depsStart = re.search(r"\<!--\s*Start\s+Dependencies\s*--\>", 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!")
|
print("Unable to find dependency XML comments, aborting!")
|
||||||
exit(1)
|
exit(1)
|
||||||
newFileStr = fileStr[:depsStart.start()] + "\n" + asmXml + "\n" + fileStr[depsEnd.end() + 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")
|
print("Writing Assembly references")
|
||||||
xmlFile.write(newFileStr)
|
xmlFile.write(newFileStr)
|
||||||
# print(newFileStr)
|
# print(newFileStr)
|
||||||
|
|
|
@ -487,9 +487,9 @@
|
||||||
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
|
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RobocraftX.GUI.RemoveBlock">
|
<Reference Include="RobocraftX.GUI.PauseMenu">
|
||||||
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.RemoveBlock.dll</HintPath>
|
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.PauseMenu.dll</HintPath>
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.RemoveBlock.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.PauseMenu.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RobocraftX.GUI.ScaleGhost">
|
<Reference Include="RobocraftX.GUI.ScaleGhost">
|
||||||
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.ScaleGhost.dll</HintPath>
|
<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>
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.InputCapture.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.InputCapture.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Techblox.MouseCursor">
|
<Reference Include="Techblox.Pointer">
|
||||||
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.MouseCursor.dll</HintPath>
|
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Pointer.dll</HintPath>
|
||||||
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.MouseCursor.dll</HintPath>
|
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Pointer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Techblox.SwitchAnimation">
|
<Reference Include="Techblox.SwitchAnimation">
|
||||||
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>
|
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>
|
||||||
|
|
Loading…
Reference in a new issue