-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpainter.spec
69 lines (56 loc) · 2.16 KB
/
painter.spec
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# -*- mode: python ; coding: utf-8 -*-
import sys
import shutil
import glob
import os
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------#
block_cipher = None
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------#
# Compile application executable
a = Analysis(
['packed.py'],
pathex=['K:\\dev\\DarksideRP\\AtlasPreviewTool'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Painter',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False)
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------#
# Compile data directory
os.chdir('assets')
os.system('multify -c -f %s/assets.mf .' % DISTPATH)
os.chdir('../items')
os.system('multify -c -f %s/items.mf .' % DISTPATH)
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------#
# Copy Panda3d DLLs to output directory
import panda3d
p3d_module = os.path.dirname(panda3d.__file__)
p3d_sdk = os.path.join(p3d_module, "..")
abs_p3d_sdk = os.path.abspath(p3d_sdk)
bin_folder = os.path.join(abs_p3d_sdk, 'bin')
files = glob.iglob(os.path.join(bin_folder, '*.dll'))
for dll in files:
if os.path.isfile(dll) and not os.path.exists('{0}/{1}'.format(DISTPATH, dll)):
shutil.copy2(dll, DISTPATH)
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------#