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] More PyInstaller Options not working as expected

kyranops opened this issue · comments

Per the user guide section for PyInstaller options, appending additional PyInstaller options does not seem to have the intended effect on the config file and is not reflected in the generated package.

Running the two commands below:
pyarmor cfg pack:pyi_options = "-i favion.ico"
pyarmor cfg pack:pyi_options ^ "--add-data joker/config.json:joker"

In .pyarmor/config:

Expectation:
[pack]
pyi_options = -i favion.ico --add-data joker/config.json:joker

Actual:
[pack]
pyi_options = -i favion.ico

CLI output:
C:\Users\user\Documents\GitHub\project>pyarmor cfg pack:pyi_options = "-i favion.ico"
INFO Python 3.10.1
INFO Pyarmor 8.5.7 (trial), 000000, non-profits
INFO Platform windows.x86_64
INFO change option "pyi_options" to new value "-i favion.ico"


Section: pack

Current settings
no option "pyi_options"

Global settings

Local settings
pyi_options = -i favion.ico

C:\Users\user\Documents\GitHub\project>pyarmor cfg pack:pyi_options ^ "--add-data joker/config.json:joker"
INFO Python 3.10.1
INFO Pyarmor 8.5.7 (trial), 000000, non-profits
INFO Platform windows.x86_64
INFO change option "pyi_options" to new value "-i favion.ico"


Section: pack

Current settings
pyi_options = -i favion.ico

Global settings

Local settings
pyi_options = -i favion.ico

It works in my MacOS,

(venv) bogon:test jondy$ pyarmor cfg pack:pyi_options ^ "--add-data joker:b"
INFO     Python 3.7.10
INFO     Pyarmor 8.5.7 (pro), 005068, btarmor
INFO     Platform darwin.x86_64
INFO     change option "pyi_options" to new value "-i a.icon
--add-data joker:b"

------------------------------------------------------------
Section: pack

Current settings
  pyi_options = -i a.icon

Global settings

Local settings
  pyi_options = -i a.icon
	--add-data joker:b

One option one line, I'll test it in Windows.

As a quick workaround, just edit .pyarmor/config

It seems "^" has special meaning in windows shell, quote it like this would work

pyarmor cfg pack:pyi_options "^" "--add-data joker/config.json:joker" 

Tested working. Thanks for the speedy support!