-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.py
27 lines (19 loc) · 952 Bytes
/
make.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Make Win32 executable for OpenDict
import os
import sys
#sys.path = [os.path.join(os.curdir, "lib")] + sys.path
sys.path = ["C:\\Program files\\OpenDict-dev\Opendict-source\lib"] + sys.path
odlist = "wx.Python.html,shutil,zipfile,string,"
list = "encodings,codecs,xml,ConfigParser,"\
"Cookie,copy,ftplib,glob,gopherlib,gzip,htmllib,HTMLParser,httplib,"\
"locale,re,sgmllib,socket,stat,StringIO,threading,thread,"\
"urllib,urllib2,urlparse,uu,warnings,webbrowser"
command = "C:\\python24\\python.exe setup.py py2exe -w " \
"--icon ..\\pixmaps\\icon.ico -i %s " \
"--packages encodings --force-imports encodings" % (odlist+list)
#command = "C:\\python22\\python.exe setup.py py2exe --icon ..\\pixmaps\\icon.ico"
print("Command: '%s'\n" % command)
out = os.popen(command)
print("\"dist\" directory will be created.")
print("Compiling, will take a minute...\n", out.read())
raw_input("<Enter>...")