-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathlinux_build.py
More file actions
44 lines (35 loc) · 1.15 KB
/
linux_build.py
File metadata and controls
44 lines (35 loc) · 1.15 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This script hasn't been used since Test Build 9 - it may not work properly!
from cx_Freeze import setup, Executable
import os, os.path, shutil, sys
dir = 'distrib/linux'
print '[[ Freezing Reggie! ]]'
print '>> Destination directory: %s' % dir
sys.argv.append('build')
if os.path.isdir(dir): shutil.rmtree(dir)
os.makedirs(dir)
# check to see if we have qtwebkit
excludes = ['cookielib', 'getpass', 'urllib', 'urllib2', 'ssl', 'termios']
try:
from PyQt4 import QtWebKit
except ImportError:
excludes.append('QtWebKit')
excludes.append('QtNetwork')
# set it up
setup(
name='Reggie! Level Editor',
version='1.0',
description='New Super Mario Bros. Wii Level Editor',
options={
'build_exe': {'excludes': excludes}
},
executables=[
Executable("reggie.py", copyDependentFiles=True, targetDir=dir)
]
)
print '>> Built frozen executable!'
# now that it's built, configure everything
if os.path.isdir(dir + '/reggiedata'): shutil.rmtree(dir + '/reggiedata')
shutil.copytree('reggiedata', dir + '/reggiedata')
shutil.copy('license.txt', dir)
shutil.copy('readme.txt', dir)
print '>> Reggie has been frozen to %s!' % dir