I know there were quite some silimar posts for this, and I read them. but I
still can not fix my problem.
I have a APP that using python 2.6 + wxpython 2.8.10.1. which run fine on
windows XP both as script file and exe file. and it is still fine when I run
it as script on vista(32bit), but when I ran same exe file, it works, but
the looks is quite diffrent, looks more like old windows and some bitmaps I
am using are surrounded by black shadow.
This is my app running as exe: http://www.nabble.com/file/p23629717/vista.jpg
This is my app running as script http://www.nabble.com/file/p23629717/script.jpg
I know there were quite some silimar posts for this, and I read them. but I
still can not fix my problem.
I have a APP that using python 2.6 + wxpython 2.8.10.1. which run fine on
windows XP both as script file and exe file. and it is still fine when I run
it as script on vista(32bit), but when I ran same exe file, it works, but
the looks is quite diffrent, looks more like old windows and some bitmaps I
am using are surrounded by black shadow.
Yes, it works, Thanks a lot!
However,is this the only way? because I really don't want so many dlls and
pyds
It's probably the only way currently to do it, until wxPython, py2exe
and Python 2.6 will learn to play nice together. In any case, I have
never understood this issue of "too many files, dlls and pyds". You
can package your application using Inno Setup or NSIS and obtain a
single installer executable. Using bundle_files=3 has two or three
obvious advantages:
1) It works;
2) It causes less troubles when you install your app on other
computers (in my experience);
3) Inno Setup can compress the installer far more than when you use
bundle_files=1 or 2, so you end up with a smaller single-file
installer.
I know there were quite some silimar posts for this, and I read them. but I
still can not fix my problem.
I have a APP that using python 2.6 + wxpython 2.8.10.1. which run fine on
windows XP both as script file and exe file. and it is still fine when I run
it as script on vista(32bit), but when I ran same exe file, it works, but
the looks is quite diffrent, looks more like old windows and some bitmaps I
am using are surrounded by black shadow.
Yes, it works, Thanks a lot!
However,is this the only way? because I really don't want so many dlls and
pyds
It's probably the only way currently to do it, until wxPython, py2exe
and Python 2.6 will learn to play nice together. In any case, I have
never understood this issue of "too many files, dlls and pyds". You
can package your application using Inno Setup or NSIS and obtain a
single installer executable. Using bundle_files=3 has two or three
obvious advantages:
1) It works;
2) It causes less troubles when you install your app on other
computers (in my experience);
3) Inno Setup can compress the installer far more than when you use
bundle_files=1 or 2, so you end up with a smaller single-file
installer.
Totally agree, what about changing the Gui2Exe tooltip on this.
- change the order of listing the options, i.e. 3 first
- would even go as far as recommending against 1 and 2
- and maybe hint at the lib/zip option which reduces the number of files in the install folder and puts just about all the wxPython and other libs such as SQLA etc into the lib folder.
- and maybe hint at the lib/zip option which reduces the number of files in the install folder and puts just about all the wxPython and other libs such as SQLA etc into the lib folder.
absolutely! and you can use /lib without the zip, if you stuff is not zip compatible...
-chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Below is my setup.py, it is quite simple:
-----------------------------------------------------
from distutils.core import setup
import glob
import py2exe
import os,sys
sys.argv.append('py2exe')
setup(windows=[{'script':'litebook.py',"icon_resources": [(1, "litebook.ico")]}],
data_files=[('icon', glob.glob('icon/*.*')),"LiteBook_Readme.txt","litebook.exe.manifest","litebook.ico","unrar.dll"],
options = {'py2exe': {'bundle_files': 3,'compressed':2,'optimize':2}},
zipfile = None,
)
-------------------------------------------------------
and I will assume users already installed vc++ 2008 redistribute. or maybe I will pack that into my installer after I figure out how to use Inno/NSIS
I guess this is the difference, I try it with a vc++ runtime installed locally.
I studied inno last night a little bit, and I found there is way to check if user has already installed vc runntime, if not the installer will install it, if yes, the installer will just skip it. below is the inno script, basically, it will check system registry to see if there is vc++ runtime installed. I think same method can be used in setup.py
this script is from: [http://wanwan722.blogspot.com/2008/11/inno-setup-visual-c-runtime-library.html](http://wanwan722.blogspot.com/2008/11/inno-setup-visual-c-runtime-library.html)
<details class='elided'>
<summary title='Show trimmed content'>···</summary>
-----------------------------------------
[Setup]
Your program setup
[Files]
; Visual C++ redist
Source: vcredist_x86.exe"; DestDir: "{tmp}"; Check: NeedInstallVC9SP1
[Run]
Filename: "{tmp}\vcredist_x86.exe"; Parameters: /q; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Installing Microsoft Visual C++ Runtime ..."; Check: NeedInstallVC9SP1
[Code]
var vc9SP1Missing: Boolean;
function NeedInstallVC9SP1(): Boolean;
begin
Result := vc9SP1Missing;
end;
function InitializeSetup(): Boolean;
var version: Cardinal;
begin
if RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}', 'Version', version) = false then begin
vc9SP1Missing := true;
end;
result := true;
end;