wxPython and Py2Exe... 2 questions



Hi !

I have an application that I compile to exe.

1.)
I want to compile main.ico into exe, or int zip. Can I do it ?

2.)
Can I compile the result to my specified directory, not into the dist ?
I want to structure my projects like this:
\src\
python codes, etc.
\res\
icons, etc
\bin\
the compiled version (exe, bins)
Can I do it with py2exe ?

Thanx for the help:
dd

Ps:
The setup file is:
# A setup script showing advanced features.
#
# Note that for the NT service to build correctly, you need at least
# win32all build 161, for the COM samples, you need build 163.
# Requires wxPython, and Tim Golden's WMI module.

# Note: WMI is probably NOT a good example for demonstrating how to
# include a pywin32 typelib wrapper into the exe: wmi uses different
# typelib versions on win2k and winXP. The resulting exe will only
# run on the same windows version as the one used to build the exe.
# So, the newest version of wmi.py doesn't use any typelib anymore.

from distutils.core import setup
import py2exe
import sys

# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
sys.argv.append("py2exe")
sys.argv.append("-q")

class Target:
def __init__(self, **kw):
self.__dict__.update(kw)
# for the versioninfo resources
self.version = "1.5.0"
self.company_name = "DurumDara Ltd."
self.copyright = "Copyright by DurumDara 2006."
self.name = "wxPyHDDirList"

################################################################
# A program using wxPython

# The manifest will be inserted as resource into test_wx.exe. This
# gives the controls the Windows XP appearance (if run on XP ;-)
#
# Another option would be to store it in a file named
# test_wx.exe.manifest, and copy it with the data_files option into
# the dist-dir.
#

wxPyHDDirList = Target(
# used for the versioninfo resource
description = "wxPyHDDirList",

# what to build
script = "wxPyHDDirList.py",
icon_resources = [(1, "main.ico")],
dest_base = "wxPyHDDirList")

setup(
options = {"py2exe": {"bundle_files": 1,
"compressed": 1,
"optimize": 2}},
# The lib directory contains everything except the executables and the python dll.
# Can include a subdirectory name.
windows = [wxPyHDDirList],
)

Ps2:
A BUG !

setup(
options = {"py2exe": {"bundle_files": 1,
"compressed": 3, # !
"optimize": 4}}, # !
# The lib directory contains everything except the executables and the python dll.
# Can include a subdirectory name.
windows = [wxPyHDDirList],
)

These valus makes that compiled exe is cannot do encodings (example: iso-8859-2).... :-(







.



Relevant Pages

  • NT 3.51 Resource Kit
    ... Microsoft Windows NT Resource Kit Release Notes ... Additional Setup for Some Resource Kit Utilities ... REXX EXE 668.956 15.08.95 ...
    (comp.sys.ibm.ps2.hardware)
  • VC 6
    ... I'm looking over some of the compile options for Visual C++ 6.0. ... In Visual C++ 1.0 there used to be options to compile the app as ... a DOS exe, as a Windows .DLL, as a Windows .exe, with different ...
    (microsoft.public.vc.language)
  • Re: ActiveX EXE
    ... The progress bar is an EXE so that it can ... because VB automatically registers during compile. ... (Also see note below about project compatibility ... (You don't actually have to register an EXE. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB application crashes
    ... I have created an VB application with a MDI form and a lot of ... In VB6, in the project's properties, go to the Compile tab and select ... Run the EXE from Windows Explorer. ... Make sure that you disable "Create symbolic debug info" before releasing ...
    (microsoft.public.vb.general.discussion)
  • Re: Clarion 2.1 APP Under Windows XP Problem
    ... which produces Windows programs, so I cannot say whether a DOS Clarion ... How compile a exe ??? ... After compiling the program you get a bunch of .PRO files. ...
    (comp.lang.clarion)