From e93ef6c1c4c63ee6fdcb60831f669eca807eff0d Mon Sep 17 00:00:00 2001 From: ZStrikeGit Date: Sat, 20 Sep 2025 15:21:08 -0400 Subject: [PATCH] Add legible error message for missing setup file hopefully this will help avoid confusion for people who can't follow instructions, such as myself. --- build_installer.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/build_installer.py b/build_installer.py index 166da98..7e6709c 100644 --- a/build_installer.py +++ b/build_installer.py @@ -59,18 +59,23 @@ session = requests.sessions.Session() def setup_version(): - jsonFromPowerShell = subprocess.run( - [ - "powershell.exe", - "(Get-Item '" - + ADOBE_SETUP_BIN - + "').VersionInfo.FileVersion | ConvertTo-Json", - ], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - shell=True, - ).stdout - return json.loads(jsonFromPowerShell) + try: + jsonFromPowerShell = json.loads(subprocess.run( + [ + "powershell.exe", + "(Get-Item '" + + ADOBE_SETUP_BIN + + "').VersionInfo.FileVersion | ConvertTo-Json", + ], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + shell=True, + ).stdout) + return jsonFromPowerShell + except Exception as e: + sys.stderr.write("Set-up.exe not found! Please extract Set-up.exe from one of the archives, and place it in this directory.") + sys.exit(1) + def os_data():