INNER CODE UNIT · Python
InstallPremake
Ershany/Arcane-Engine · Setup/PremakeSetup.py:31
def InstallPremake(config):
permissionGranted = False
while not permissionGranted:
reply = str(input("Would you like to download Premake {0:s}? [Y/N]: ".format(config.premakeVersion))).lower().strip()[:1]
if reply == 'n':
return False
permissionGranted = (reply == 'y')
premakePath = f"{config.premakeDirectory}/premake-{config.premakeVersion}-windows.zip"
print("Downloading {0:s} to {1:s}".format(config.premakeZipDownloadUrl, premakePath))
ArcaneUtils.DownloadFile(config.premakeZipDownloadUrl, premakePath)
print("Extracting", premakePath)
ArcaneUtils.UnzipFile(premakePath, deleteZipFile=True)
print(f"Premake {config.premakeVersion} has been downloaded to '{config.premakeDirectory}'")
premakeLicensePath = f"{config.premakeDirectory}/LICENSE.txt"
print("Downloading {0:s} to {1:s}".format(config.premakeLicenseUrl, premakeLicensePath))
ArcaneUtils.DownloadFile(config.premakeLicenseUrl, premakeLicensePath)