Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-06-27 09:43:35 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-06-27 09:43:35 +0400
commit101c9e3f769d4849ce17e6f8ac341321149c827f (patch)
treea08fde8da3dc712b9ff548336ad21e7d1bb5eea0 /game_engine_save_as_runtime.py
parent967056afc369cf28e3cda24a57fcfca5bb46849f (diff)
Save as Runtime: Some minor changes to bundling Python:
* Now __pycache__ folders are ignored instead of *.pyc files (the only pyc files are in the __pycachce__ folders) * Now 2.58/python/lib is copied over instead of just lib. This allows the runtime to take advantage of Blender's "bundled Python" features. Having the 2.58 folder also allows for other potential files that BGE users might eventually want (e.g., components).
Diffstat (limited to 'game_engine_save_as_runtime.py')
-rw-r--r--game_engine_save_as_runtime.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/game_engine_save_as_runtime.py b/game_engine_save_as_runtime.py
index 527234fa..281dd075 100644
--- a/game_engine_save_as_runtime.py
+++ b/game_engine_save_as_runtime.py
@@ -19,9 +19,9 @@
bl_info = {
'name': 'Save As Runtime',
'author': 'Mitchell Stokes (Moguri)',
- 'version': (0, 3, 0),
- "blender": (2, 5, 7),
- "api": 35622,
+ 'version': (0, 3, 1),
+ "blender": (2, 5, 8),
+ "api": 37846,
'location': 'File > Export',
'description': 'Bundle a .blend file with the Blenderplayer',
'warning': '',
@@ -131,15 +131,16 @@ def WriteRuntime(player_path, output_path, copy_python, overwrite_lib, copy_dlls
if copy_python:
print("Copying Python files...", end=" ")
- src = os.path.join(blender_dir, bpy.app.version_string.split()[0], "python", "lib")
- dst = os.path.join(runtime_dir, "lib")
+ py_folder = os.path.join(bpy.app.version_string.split()[0], "python", "lib")
+ src = os.path.join(blender_dir, py_folder)
+ dst = os.path.join(runtime_dir, py_folder)
if os.path.exists(dst):
if overwrite_lib:
shutil.rmtree(dst)
- shutil.copytree(src, dst, ignore=lambda dir, contents: [i for i in contents if i.endswith('.pyc')])
+ shutil.copytree(src, dst, ignore=lambda dir, contents: [i for i in contents if i == '__pycache__'])
else:
- shutil.copytree(src, dst, ignore=lambda dir, contents: [i for i in contents if i.endswith('.pyc')])
+ shutil.copytree(src, dst, ignore=lambda dir, contents: [i for i in contents if i == '__pycache__'])
print("done")