in compile.py [0:0]
def create_windows_installer(iss_file_path: str) -> int:
""" Based on the given .iss file path, we run the inno setup compiler to create the window's installer
Args:
iss_file_path: The path to the .iss file to use to create the installer
Returns: The return code of the inno setup compiler
"""
# Path to your Inno Setup Compiler - adjust if necessary
inno_compiler_path = r"C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
# Create the command
command = f'"{inno_compiler_path}" "{iss_file_path}"'
# Execute the command
process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
# Print output in real time
while True:
output = process.stdout.readline()
if output == b'' and process.poll() is not None:
break
if output:
print(output.strip().decode('utf-8'))
# Wait for the process to finish and get the return code.
return_code = process.wait()
return return_code