2016-03-29 6 views
1

cx_freezeのテンプレートで新しいスクリプトを作成しました。次に、python setup.py buildを実行してexeファイルを作成します。 main.exeをルートフォルダcx_freeze testに移動すると、実行に失敗します。cx_freezeを使ってexeを作成しますが、exeを展開してルートディレクトリに移動します

私が望むのは、.exeを1つまたは2つのディレクトリに移動することです。 は、ここに私のコードです:

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 私はhttp://cx-freeze.readthedocs.org/en/latest/faq.html#using-data-filesはいくつかの助けを持っているかもしれないと思ったが、ファイルがでているので、サブディレクトリ、私はosモジュールを使用することはできません?

答えて

0

この機能は4.xでは使用できませんが、5.xで使用できるようになりました。現在のソースにはこの機能がありますので、コンパイルできれば、それを今日持つことができます。さもなければ、私はすぐになることを望む公式のリリースを待つ必要があります。

関連する問題