Got this cx freeze setup
<code>import sys, os
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
"packages": ["pyarmor_runtime_000000", "os", "sys", "hashlib", "json", "time", "logging", "subprocess", "traceback", "paramiko", "PyQt5"],
"excludes": [],
# "includes": [r'distpyarmor_runtime_000000']
}
base = None
if sys.platform == "win32":
base = "Win32GUI"
# Define the executable
executables = [
Executable("dist/patcher-source.py", base=base, target_name="Awakening2-Patcher.exe", icon='patcher-icon.ico')
]
setup(
name="Awakening2-Patcher",
version="1.0",
description="Auto Patcher for Awakening2",
options={"build_exe": build_exe_options},
executables=executables
)
</code>
<code>import sys, os
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
"packages": ["pyarmor_runtime_000000", "os", "sys", "hashlib", "json", "time", "logging", "subprocess", "traceback", "paramiko", "PyQt5"],
"excludes": [],
# "includes": [r'distpyarmor_runtime_000000']
}
base = None
if sys.platform == "win32":
base = "Win32GUI"
# Define the executable
executables = [
Executable("dist/patcher-source.py", base=base, target_name="Awakening2-Patcher.exe", icon='patcher-icon.ico')
]
setup(
name="Awakening2-Patcher",
version="1.0",
description="Auto Patcher for Awakening2",
options={"build_exe": build_exe_options},
executables=executables
)
</code>
import sys, os
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
"packages": ["pyarmor_runtime_000000", "os", "sys", "hashlib", "json", "time", "logging", "subprocess", "traceback", "paramiko", "PyQt5"],
"excludes": [],
# "includes": [r'distpyarmor_runtime_000000']
}
base = None
if sys.platform == "win32":
base = "Win32GUI"
# Define the executable
executables = [
Executable("dist/patcher-source.py", base=base, target_name="Awakening2-Patcher.exe", icon='patcher-icon.ico')
]
setup(
name="Awakening2-Patcher",
version="1.0",
description="Auto Patcher for Awakening2",
options={"build_exe": build_exe_options},
executables=executables
)
Problem is I m trying to obfuscate my py file with pyarmor, generating steps are:
<code>import os
if __name__ == '__main__':
script_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(script_dir)
os.system('pyarmor gen .patcher-source.py')
os.system('python setup.py build')
</code>
<code>import os
if __name__ == '__main__':
script_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(script_dir)
os.system('pyarmor gen .patcher-source.py')
os.system('python setup.py build')
</code>
import os
if __name__ == '__main__':
script_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(script_dir)
os.system('pyarmor gen .patcher-source.py')
os.system('python setup.py build')
Problem is i dont know how to properly include dist/pyarmor_runtime_000000, tried adding it to “includes” key, no luck, to packages also, but it raises module not found.
for contenxt ‘pyarmor_runtime_000000’ is a directory containing an init.py:
<code># Pyarmor 8.5.8 (trial), 000000, 2024-05-17T12:37:57.872232
from .pyarmor_runtime import __pyarmor__
</code>
<code># Pyarmor 8.5.8 (trial), 000000, 2024-05-17T12:37:57.872232
from .pyarmor_runtime import __pyarmor__
</code>
# Pyarmor 8.5.8 (trial), 000000, 2024-05-17T12:37:57.872232
from .pyarmor_runtime import __pyarmor__
And a pyarmor_runtime.pyd