diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2005-04-16 22:25:42 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2005-04-16 22:25:42 +0400 |
commit | fa5d910f93c0cb279f5a41af9cc3d36d53f8c94f (patch) | |
tree | 86202b41c7d56d2b1fc857f2693de8e0f129f478 /tools/scons/bs | |
parent | dfe3ad0d7bb09129adee4eb27a7367ae6c40b54e (diff) |
Updating build systems: folder release/bpydata/ moved to release/scripts/bpydata/
It seemed trivial enough, so I updated all systems (makefiles, xcode, scons, scons win installer), please complain if something went wrong. Mostly it was just removing release/bpydata references, since the release/scripts dir is already worked on recursevely, handling dirs inside it.
For the scons nsi file writer script I had to write code for each new dir, but it can be recoded recursively, too (in fact joining all release stuff in a single dir tree with nothing else would be a good idea, making installation code simpler). Since it's just python and I have a little more time now, I can help scons managers if they still need.
Thanks Campbell Barton for reporting.
Diffstat (limited to 'tools/scons/bs')
-rw-r--r-- | tools/scons/bs/bs_arc.py | 4 | ||||
-rw-r--r-- | tools/scons/bs/bs_dirs.py | 12 | ||||
-rw-r--r-- | tools/scons/bs/bs_nsis.py | 50 |
3 files changed, 42 insertions, 24 deletions
diff --git a/tools/scons/bs/bs_arc.py b/tools/scons/bs/bs_arc.py index b215b9dc977..4c827632633 100644 --- a/tools/scons/bs/bs_arc.py +++ b/tools/scons/bs/bs_arc.py @@ -52,8 +52,6 @@ def appit(target, source, env): commands.getoutput(cmd) cmd = 'mkdir %s.app/Contents/MacOS/.blender'%target commands.getoutput(cmd) - cmd = 'cp -R release/bpydata %s.app/Contents/MacOS/.blender'%target - commands.getoutput(cmd) cmd = 'cp -R release/scripts %s.app/Contents/MacOS/.blender/'%target commands.getoutput(cmd) cmd = 'cp -R release/plugins %s.app/Contents/Resources/'%target @@ -88,8 +86,6 @@ def appit(target, source, env): shutil.copy('bin/.blender/.Blanguages', cmd) cmd = 'cp -R bin/.blender/locale %s.app/Contents/Resources/'%target commands.getoutput(cmd) - cmd = 'cp -R release/bpydata %s.app/Contents/MacOS/.blender'%target - commands.getoutput(cmd) cmd = 'cp -R release/scripts %s.app/Contents/MacOS/.blender/'%target commands.getoutput(cmd) cmd = 'cp -R release/plugins %s.app/Contents/Resources/'%target diff --git a/tools/scons/bs/bs_dirs.py b/tools/scons/bs/bs_dirs.py index a12472246f5..224a95afe57 100644 --- a/tools/scons/bs/bs_dirs.py +++ b/tools/scons/bs/bs_dirs.py @@ -78,16 +78,10 @@ def preparedist(): os.chdir(startdir) if os.path.isdir("dist/.blender/scripts"): shutil.rmtree("dist/.blender/scripts") - if os.path.isdir("dist/.blender/bpydata"): - shutil.rmtree("dist/.blender/bpydata") - - os.makedirs("dist/.blender/bpydata") - shutil.copy("release/bpydata/readme.txt", "dist/.blender/bpydata/readme.txt") - shutil.copy("release/bpydata/KUlang.txt", "dist/.blender/bpydata/KUlang.txt") - + os.chdir("release") shutil.copytree("scripts/", "../dist/.blender/scripts") - + # finally copy auxiliaries (readme, license, etc.) if sys.platform == 'win32': shutil.copy("windows/extra/Help.url", "../dist/Help.url") @@ -123,4 +117,4 @@ def finalisedist(zipname): #shutil.copy("dist/" + zipname, zipname) #shutil.rmtree("dist") - return 1
\ No newline at end of file + return 1 diff --git a/tools/scons/bs/bs_nsis.py b/tools/scons/bs/bs_nsis.py index df6dcdb1c08..cdac85560eb 100644 --- a/tools/scons/bs/bs_nsis.py +++ b/tools/scons/bs/bs_nsis.py @@ -50,24 +50,52 @@ def donsis(env, target, source): # do scripts scriptlist = [] - scriptdir = os.listdir(startdir + "\\dist\\.blender\\scripts") + scriptpath = "%s%s" % (startdir, "\\dist\\.blender\\scripts") + scriptdir = os.listdir(scriptpath) for scriptitem in scriptdir: - if os.path.isdir(startdir + "\\dist\\.blender\\scripts\\" + scriptitem) == 0: - scriptlist.append("File " + startdir + "\\dist\\.blender\\scripts\\" + scriptitem) + scriptfile = "%s\\%s" % (scriptpath, scriptitem) + if os.path.isdir(scriptfile) == 0: + scriptlist.append("File %s" % scriptfile) scriptstring = string.join(scriptlist, "\n ") scriptstring += "\n\n" nsis_cnt = string.replace(nsis_cnt, "[SCRIPTCONTS]", scriptstring) - - # do bpycontents + + # do scripts\bpymodules + bpymodlist = [] + bpymodpath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpymodules") + bpymoddir = os.listdir(bpymodpath) + for bpymoditem in bpymoddir: + bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem) + if os.path.isdir(bpymodfile) == 0: + bpymodlist.append("File %s" % bpymodfile) + bpymodstring = string.join(bpymodlist, "\n ") + bpymodstring += "\n\n" + nsis_cnt = string.replace(nsis_cnt, "[SCRIPTMODCONTS]", bpymodstring) + + # do scripts\bpydata bpydatalist = [] - bpydatadir = os.listdir(startdir + "\\dist\\.blender\\bpydata") + bpydatapath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpydata") + bpydatadir = os.listdir(bpydatapath) for bpydataitem in bpydatadir: - if os.path.isdir(startdir + "\\dist\\.blender\\bpydata\\" + bpydataitem) == 0: - bpydatalist.append("File " + startdir + "\\dist\\.blender\\bpydata\\" + bpydataitem) + bpydatafile = "%s\\%s" % (bpydatapath, bpydataitem) + if os.path.isdir(bpydatafile) == 0: + bpydatalist.append("File %s" % bpydatafile) bpydatastring = string.join(bpydatalist, "\n ") bpydatastring += "\n\n" - nsis_cnt = string.replace(nsis_cnt, "[BPYCONTS]", bpydatastring) - + nsis_cnt = string.replace(nsis_cnt, "[SCRIPTDATACONTS]", bpydatastring) + + # do scripts\bpydata\config + cfglist = [] + cfgpath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpydata\\config") + cfgdir = os.listdir(cfgpath) + for cfgitem in cfgdir: + cfgfile = "%s\\%s" % (cfgpath, cfgitem) + if os.path.isdir(cfgfile) == 0: + cfglist.append("File %s" % cfgfile) + cfgstring = string.join(cfglist, "\n ") + cfgstring += "\n\n" + nsis_cnt = string.replace(nsis_cnt, "[SCRIPTDATACFGCONTS]", cfgstring) + # do dotblender dotblendlist = [] dotblenddir = os.listdir(startdir+"\\dist\\.blender") @@ -112,4 +140,4 @@ def BlenderNSIS(target): nsis_inst = inst_env.Command('nsisinstaller', 'blender$PROGSUFFIX', donsis) if bs_globals.user_options_dict['BUILD_BLENDER_PLAYER'] == 1: inst_env.Depends(nsis_inst, 'blenderplayer$PROGSUFFIX') - inst_env.Alias("wininst", nsis_inst)
\ No newline at end of file + inst_env.Alias("wininst", nsis_inst) |