2

I created a new script with cx_freeze's template. Then I'm running python setup.py build to create the exe. If I move main.exe to the root folder cx_freeze test it will fail to run.

All I want is to move .exe up 1 or two directories. Here's my code:

main.py

foo = input("Complete")

setup.py:

from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(
    packages = [],
    excludes = [],
    includes = ["atexit"]
)
    # include_files=[]

base = 'Console'

executables = [
    Executable('main.py', base=base, targetName = 'main.exe')
]

setup(name='freeze test',
      version = '1',
      description = '.',
      options = dict(build_exe = buildOptions),
      executables = executables)

enter image description here I thought http://cx-freeze.readthedocs.org/en/latest/faq.html#using-data-files might have some help, but since the files are in the subdirectory, I can't use os module?

ninMonkey
  • 7,211
  • 8
  • 37
  • 66

1 Answers1

0

That feature is not available in 4.x but will be available in 5.x when it is made available. The current source has this capability so if you can compile it you can have it today; otherwise, you'll need to wait for the official release which I hope will be soon.

Anthony Tuininga
  • 6,388
  • 2
  • 14
  • 23