dashingsoft / pyarmor

A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

Home Page:http://pyarmor.dashingsoft.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] It is impossible to use add-data flag in pack:pyi_options

RobertAzovski opened this issue · comments

$ pyarmor cfg pack:pyi_options = " -w -i tgi.ico --add-data "tgi.ico;./""
INFO Python 3.11.9
INFO Pyarmor 8.5.8 (trial), 000000, non-profits
INFO Platform windows.x86_64
INFO change option "pyi_options" to new value " -w -i tgi.ico --add-data tgi.ico"


Section: pack

Current settings
pyi_options = -w -i tgi.ico --add-data tgi.ico

Global settings

Local settings
pyi_options = -w -i tgi.ico --add-data tgi.ico
bash: ./: Is a directory

Failed all retries to add data in pyinstaller custom options

Used:

pyarmor 8.5.8
pyinstaller 5.13.2

And then getting this error:

DEBUG C:\Dev\tg-stealer\venv\Scripts\python.exe -m PyInstaller.utils.cliutils.makespec -w -i tgi.ico --add-data tgi.ico _tg.py
INFO call PyInstaller to generate specfile
DEBUG unknown error, please check pyarmor.error.log
ERROR Command '['C:\Dev\tg-stealer\venv\Scripts\python.exe', '-m', 'PyInstaller.utils.cliutils.makespec', '-w', '-i', 'tgi.ico', '--add-data', 'tgi.ico', '_tg.py']' returned non-zero exit status 2.
ERROR something is wrong

Also, if you try to build separately with pyinstaller and then use pyarmor gen --pack dist/my_file.exe my_file.py you would get this error:

ERROR [Errno 2] No such file or directory: '.pyarmor\pack\PYZ-00.pyz_extracted\pyarmor_runtime_000000\init.pyc'

Had to use slashes...

pyarmor cfg pack:pyi_options = " -w -i tgi.ico --add-data \"tgi.ico;.\""