[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41167] trunk/blender: move fonts/ and locale/ dirs into release/datafiles, since blender wasn' t finding them in their current location and so to test international characters you had to 'make install'.
Campbell Barton
ideasman42 at gmail.com
Fri Oct 21 05:00:30 CEST 2011
Revision: 41167
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41167
Author: campbellbarton
Date: 2011-10-21 03:00:28 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
move fonts/ and locale/ dirs into release/datafiles, since blender wasn't finding them in their current location and so to test international characters you had to 'make install'.
updated scons/cmake/translation-scripts.
Modified Paths:
--------------
trunk/blender/SConstruct
trunk/blender/build_files/scons/tools/Blender.py
trunk/blender/po/update_mo.py
trunk/blender/source/creator/CMakeLists.txt
Added Paths:
-----------
trunk/blender/release/datafiles/fonts/
trunk/blender/release/datafiles/locale/
Removed Paths:
-------------
trunk/blender/release/bin/.blender/fonts/
trunk/blender/release/bin/.blender/locale/
Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct 2011-10-21 02:13:36 UTC (rev 41166)
+++ trunk/blender/SConstruct 2011-10-21 03:00:28 UTC (rev 41167)
@@ -521,19 +521,19 @@
if not env['WITH_BF_INTERNATIONAL']:
if 'locale' in dp:
continue
- if not env['WITH_BF_FREETYPE']:
- if f.endswith('.ttf'):
- continue
+ #~ if not env['WITH_BF_FREETYPE']:
+ #~ if f.endswith('.ttf'):
+ #~ continue
- if 'locale' in dp or 'fonts' in dp:
- datafileslist.append(os.path.join(dp,f))
- dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[3:])) # skip bin
- datafilestargetlist.append(dir + os.sep + f)
+ #~ if 'locale' in dp or 'fonts' in dp:
+ #~ datafileslist.append(os.path.join(dp,f))
+ #~ dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[3:])) # skip bin
+ #~ datafilestargetlist.append(dir + os.sep + f)
- else:
- dotblendlist.append(os.path.join(dp, f))
- dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[3:])) # skip bin
- dottargetlist.append(dir + os.sep + f)
+ #~ else:
+ #~ dotblendlist.append(os.path.join(dp, f))
+ #~ dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[3:])) # skip bin
+ #~ dottargetlist.append(dir + os.sep + f)
dotblenderinstall = []
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
@@ -563,7 +563,35 @@
if len(source)==0:
env.Execute(Mkdir(dir))
scriptinstall.append(env.Install(dir=dir,source=source))
+
+ if env['WITH_BF_INTERNATIONAL']:
+ internationalpaths=['release' + os.sep + 'datafiles']
+
+ def check_path(path, member):
+ return (member in path.split(os.sep))
+
+ for intpath in internationalpaths:
+ for dp, dn, df in os.walk(intpath):
+ if '.svn' in dn:
+ dn.remove('.svn')
+ if '_svn' in dn:
+ dn.remove('_svn')
+ # we only care about release/datafiles/fonts, release/datafiles/locales
+ if check_path(dp, "fonts") or check_path(dp, "locale"):
+ pass
+ else:
+ continue
+
+ dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
+ dir += os.sep + os.path.basename(intpath) + dp[len(intpath):]
+
+ source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
+ # To ensure empty dirs are created too
+ if len(source)==0:
+ env.Execute(Mkdir(dir))
+ scriptinstall.append(env.Install(dir=dir,source=source))
+
#-- icons
if env['OURPLATFORM']=='linux':
iconlist = []
Modified: trunk/blender/build_files/scons/tools/Blender.py
===================================================================
--- trunk/blender/build_files/scons/tools/Blender.py 2011-10-21 02:13:36 UTC (rev 41166)
+++ trunk/blender/build_files/scons/tools/Blender.py 2011-10-21 03:00:28 UTC (rev 41167)
@@ -561,9 +561,9 @@
if binary == 'blender':
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+ cmd = 'cp -R %s/release/datafiles/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+ cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
Modified: trunk/blender/po/update_mo.py
===================================================================
--- trunk/blender/po/update_mo.py 2011-10-21 02:13:36 UTC (rev 41166)
+++ trunk/blender/po/update_mo.py 2011-10-21 03:00:28 UTC (rev 41167)
@@ -30,7 +30,7 @@
GETTEXT_MSGFMT_EXECUTABLE = "msgfmt"
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
-LOCALE_DIR = os.path.join(SOURCE_DIR, "release", "bin", ".blender", "locale")
+LOCALE_DIR = os.path.join(SOURCE_DIR, "release", "datafiles", "locale")
DOMAIN = "blender"
Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt 2011-10-21 02:13:36 UTC (rev 41166)
+++ trunk/blender/source/creator/CMakeLists.txt 2011-10-21 03:00:28 UTC (rev 41167)
@@ -352,8 +352,8 @@
if(WITH_INTERNATIONAL)
install(
DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+ ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+ ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
@@ -424,8 +424,8 @@
if(WITH_INTERNATIONAL) # same as linux!, deduplicate
install(
DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+ ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+ ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
@@ -648,8 +648,8 @@
if(WITH_INTERNATIONAL)
install(
DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+ ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+ ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
More information about the Bf-blender-cvs
mailing list