Skip to content

Commit

Permalink
Add some resources to the BEE2 binaries
Browse files Browse the repository at this point in the history
This is required for some modules.
  • Loading branch information
TeamSpen210 committed Oct 4, 2018
1 parent 58c1b5e commit dbaf28d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/compile_BEE2.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,25 @@ def get_localisation(key):

bee_version = input('BEE2 Version: ')

import srctools

zip_includes = [
# Add the FGD data for us.
(os.path.join(srctools.__path__[0], 'fgd.lzma'), 'srctools/fgd.lzma'),
(os.path.join(srctools.__path__[0], 'srctools.fgd'), 'srctools/srctools.fgd'),
]
# We need to include this version data.
try:
import importlib_resources
zip_includes.append(
(
os.path.join(importlib_resources.__path__[0], 'version.txt'),
'importlib_resources/version.txt',
)
)
except ImportError:
pass


setup(
name='BEE2',
Expand All @@ -159,6 +178,7 @@ def get_localisation(key):
# Include all modules in the zip..
'zip_include_packages': '*',
'zip_exclude_packages': '',
'zip_includes': zip_includes,
},
},
executables=[
Expand Down

0 comments on commit dbaf28d

Please sign in to comment.