2

私のアプリケーションは、cx_freeze (Gui2Exe を使用して cx_freeze スクリプトを作成および実行しています) を使用してフリーズした後と、Python インタープリターを使用して実行したときとは異なって見えます。

[画像を投稿することは許可されていないため、UI へのリンクは次のとおりです。編集しますか?]

スクリプトの実行:

コマンドラインから実行されるアプリケーション

冷凍ラン:

cx_freeze によって凍結された後に実行されるアプリケーション

マニフェスト ファイルを cx_freeze スクリプトに含めたり含めなかったりしてみましたが、何がアプリケーション UI を劇的に変化させたのかわかりません。

cx_freeze スクリプトは次のとおりです。

# ======================================================== #
# File automagically generated by GUI2Exe version 0.5.3
# Copyright: (c) 2007-2012 Andrea Gavana
# ======================================================== #

# Let's start with some default (for me) imports...

from cx_Freeze import setup, Executable



# Process the includes, excludes and packages first

includes = ['ast', 'gobject', 'gtk']
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
            'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
            'Tkconstants', 'Tkinter']
packages = ['BeautifulSoup', 'mechanize', 'pygtk']
path = []

# This is a place where the user custom code may go. You can do almost
# whatever you want, even modify the data_files, includes and friends
# here as long as they have the same variable name that the setup call
# below is expecting.

# No custom code added

# The setup for cx_Freeze is different from py2exe. Here I am going to
# use the Python class Executable from cx_Freeze


GUI2Exe_Target_1 = Executable(
    # what to build
    script = "moodle-downloader.py",
    initScript = None,
    base = 'Win32GUI',
    targetDir = r"md",
    targetName = "moodle-downloader.exe",
    compress = True,
    copyDependentFiles = True,
    appendScriptToExe = True,
    appendScriptToLibrary = True,
    icon = r"C:\Users\Nasser.Al-Hilal\Dropbox\CodeN\Projects\Applications\Personal\MoodleDownloader\res\md.ico"
    )


# That's serious now: we have all (or almost all) the options cx_Freeze
# supports. I put them all even if some of them are usually defaulted
# and not used. Some of them I didn't even know about.

setup(

    version = "0.3",
    description = "An app to assist in downloading assignment submissions from Moodle LMS.",
    author = "Nasser Al-Hilal",
    name = "Moodle Downloader",

    options = {"build_exe": {"includes": includes,
                             "excludes": excludes,
                             "packages": packages,
                             "path": path
                             }
               },

    executables = [GUI2Exe_Target_1]
    )

# This is a place where any post-compile code may go.
# You can add as much code as you want, which can be used, for example,
# to clean up your folders or to do some particular post-compilation
# actions.

# No post-compilation code added


# And we are done. That's a setup script :-D

インタープリターから実行した場合と同じようにアプリケーションを表示できるようにしたいと考えています。

4

3 に答える 3