From 454cc5f88cbfd6a1f7f5e6b9b96a0216be7f1720 Mon Sep 17 00:00:00 2001 From: Nackophilz <61667226+Nackophilz@users.noreply.github.com> Date: Sun, 6 Aug 2023 12:38:23 +0200 Subject: [PATCH] Added more Pyinstaller options (#9) Added support for more Pyinstaller options when using `.py` file type: --add-data , --add-binary , --collect-data , --collect-all --- README.md | 7 ++++--- src/mods.py | 18 ++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f0c4726..354c554 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,10 @@ You can also use any major tags like `@v1` for any `@v1.*.*` | `--noupx` | `--key ` | | `--onedir`, `-D` | `--upx-dir ` | | `--onefile`, `-F` | `--upx-exclude ` | - | `--ascii`, `-a` - | `--console`, `--nowindowed`, `-c` - | `--windowed`, `--noconsole`, `-w` + | `--ascii`, `-a` | `--add-data ` | + | `--console`, `--nowindowed`, `-c` | `--add-binary ` | + | `--windowed`, `--noconsole`, `-w` | `--collect-data ` | + | | `--collect-all ` |
diff --git a/src/mods.py b/src/mods.py index 55bfbf0..02caf3e 100644 --- a/src/mods.py +++ b/src/mods.py @@ -35,6 +35,11 @@ '--upx-dir ', '--upx-exclude ', + '--add-data ', + '--add-binary ', + '--collect-data ', + '--collect-all ', + '--name ', '-n ', '--icon ', '-i ', ] @@ -89,21 +94,14 @@ def get_option_value(option:str): - """ Returns: Value of `option` from provided options (if available) """ + """ Returns: Value of `option` from provided options """ for i in supported_options: - iList = i.split( - maxsplit=1 - ) + iList = i.split(maxsplit=1) if len(iList) < 2: continue key, value, *_ = iList if key == option: - return value.strip( - '"' - ).strip( - "'" - ) - + return value.strip('"').strip("'") ## ---------------------- Spec Name ---------------------- ##