From a5bfbdb5213da760e45fd17f7a8ecf45c6f87f76 Mon Sep 17 00:00:00 2001 From: idkwh Date: Mon, 28 Apr 2025 17:21:22 +0200 Subject: [PATCH] update SWFChecker.py --- SWFChecker.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/SWFChecker.py b/SWFChecker.py index 7fc5daf..14dd84f 100644 --- a/SWFChecker.py +++ b/SWFChecker.py @@ -1,15 +1,16 @@ import os import zlib -from sys import platform, version +from sys import version, exit +import platform -platf = platform -if platf == "linux" or "linux2" or "darwin": +platf = platform.system() +if platf == "Windows": + os.system("title SWF Checker v2.3") + os.system("clear") +else: os.system("clear") -elif platf == "win32": - os.system("title SWF Checker v2.1") - os.system("cls") -print(f"SWF Version Checker v2.1\nPython {version}") +print(f"SWF Version Checker v2.3\nPython {version}") try: swf = input("SWF Filename: ").strip() @@ -57,13 +58,10 @@ def CheckSWF(swf): if doact_idx != -1 and not result_isas3: result_isas3 = False - if flashver < 9: - if result_isas3: - isas3 = True - else: - isas3 = False + if flashver >= 9: + isas3 = result_isas3 # AS3 support is based on external result else: - isas3 = result_isas3 + isas3 = False # AS3 does not exist before Flash Player 9 asver = "ActionScript 3.0 (incompatible)" if isas3 else "ActionScript 1.0/2.0 (compatible)" return flashver, asver, obj @@ -109,3 +107,10 @@ if flashver is not None: print("WARNING: The given SWF might overlap/clip on the Wii.") else: print("The SWF should NOT overlap and/or clip on the Wii.") + + if platf == "Windows": + os.system("pause") + exit() + else: + os.system("/bin/bash -c 'read -s -n 1 -p \"Press any key to exit.\"'") + exit() \ No newline at end of file