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

bs_bincopy.py « bs « scons « tools - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 117abc1ed9cf70f8db9868ab4f6fdc7dd87ead8c (plain)
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
# bincopy target
import sys
import os
import shutil
import bs_globals

def docopyit(env, target, source):
	"""
	Copy the blender binaries to a specified location
	"""
	if bs_globals.docopy==0 or bs_globals.copyto=='':
		print "The bincopy target has been activated with corrupt data"
		sys.exit()
		
	blender = 'blender'
	blenderplayer = 'blenderplayer'
	
	# make sure bs_globals.copyto exists
	if os.path.isdir(bs_globals.copyto) == 0:
		os.makedirs(bs_globals.copyto)
		
	if sys.platform in ['win32', 'cygwin']:
		blender = 'blender.exe'
		blenderplayer = 'blenderplayer.exe'
	
	shutil.copy(blender, bs_globals.copyto + os.sep + blender)
	if bs_globals.user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
		shutil.copy(blenderplayer, bs_globals.copyto + os.sep + blenderplayer)

def BlenderCopy(target):
	#~ if sys.platform == 'darwin':
		#~ copy_env = bs_globals.init_env.Copy()
		#~ Mappit = app_env.Command('appit', bs_globals.appname, appit)
		#~ if bs_globals.user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
			#~ app_env.Depends(Mappit, bs_globals.playername)
		#~ app_env.Alias("release", Mappit)
	if sys.platform in ['win32', 'linux2', 'linux-i386', 'freebsd4', 'freebsd5','cygwin']:
		copy_env = bs_globals.init_env.Copy()
		copyit = copy_env.Command('blendercopy', bs_globals.appname, docopyit)
		if bs_globals.user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
			copy_env.Depends(copyit, bs_globals.playername)
		copy_env.Alias("bincopy", copyit)
	else:
		print "Check the scons implementation for bincopy, copydo if everything is setup correctly for your platform"