Now builds on Windows, mostly successfully.
This commit is contained in:
parent
0e469e0c91
commit
a541b86f6f
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
|
||||
Building on Windows:
|
||||
1. In a CMD window, type:
|
||||
c:\Python27\python.exe setup.py py2exe
|
||||
2. Copy the GUI folder from the root directory into dist\.
|
||||
3. The executable is in dist\lightningbeam.exe. You probably do need most if the DLL's, I haven't
|
||||
gone through them yet.
|
||||
|
|
@ -6,7 +6,10 @@
|
|||
import os
|
||||
|
||||
#Uncomment to build on OS X
|
||||
import objc, AppKit, cPickle
|
||||
#import objc, AppKit, cPickle
|
||||
|
||||
#Uncomment to build on Windows
|
||||
import ctypes, ctypes.wintypes, win32print
|
||||
|
||||
#SVLGUI - my custom GUI wrapper to abstract the GUI
|
||||
import svlgui
|
||||
|
|
|
|||
22
setup.py
22
setup.py
|
|
@ -36,10 +36,28 @@ if sys.platform == 'darwin':
|
|||
)),
|
||||
)
|
||||
elif sys.platform == 'win32':
|
||||
import GUI.py2exe
|
||||
import py2exe
|
||||
import os
|
||||
import win32ui
|
||||
Mydata_files=["gpl.txt",]#"GUI",]
|
||||
for files in os.listdir('media'):
|
||||
f1 = 'media/' + files
|
||||
if os.path.isfile(f1): # skip directories
|
||||
f2 = 'media', [f1]
|
||||
Mydata_files.append(f2)
|
||||
for files in os.listdir('swfc'):
|
||||
f1 = 'swfc/' + files
|
||||
if os.path.isfile(f1): # skip directories
|
||||
f2 = 'swfc', [f1]
|
||||
Mydata_files.append(f2)
|
||||
extra_options = dict(
|
||||
setup_requires=['py2exe'],
|
||||
app=[mainscript],
|
||||
options=dict(py2app=dict(resources=["media","gpl.txt","swfc"],)),
|
||||
windows=[mainscript],
|
||||
other_resources=[("media",["media"]),("gpl.txt",["gpl.txt"]),("swfc",["swfc"]),("GUI",["GUI"])],
|
||||
data_files=Mydata_files,
|
||||
options=dict(py2exe=dict(packages=["win32ui","win32clipboard","win32api","win32gui","win32process"],
|
||||
skip_archive=True,)),
|
||||
)
|
||||
else:
|
||||
extra_options = dict(
|
||||
|
|
|
|||
Loading…
Reference in New Issue