too much indentation!
[blender.git] / tools / scons / bs / bs_nsis.py
index df6dcdb1c08458a12974016d5cbea8bca7ed0de5..2c9c9ce6ca767100d2fa08bed917b3d331713a76 100644 (file)
@@ -50,24 +50,64 @@ def donsis(env, target, source):
        
        # do scripts
        scriptlist = []
        
        # 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:
        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)
        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 = []
        bpydatalist = []
-       bpydatadir = os.listdir(startdir + "\\dist\\.blender\\bpydata")
+       bpydatapath = "%s%s" % (startdir, "\\dist\\.blender\\scripts\\bpydata")
+       bpydatadir = os.listdir(bpydatapath)
        for bpydataitem in bpydatadir:
        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"
        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 plugins\include
+       plugincludelist = []
+       plugincludepath = "%s%s" % (startdir, "\\dist\\plugins\\include")
+       plugincludedir = os.listdir(plugincludepath)
+       for plugincludeitem in plugincludedir:
+               plugincludefile = "%s\\%s" % (plugincludepath, plugincludeitem)
+               if os.path.isdir(plugincludefile) == 0:
+                       plugincludelist.append("File %s" % plugincludefile)
+       plugincludestring = string.join(plugincludelist, "\n  ")
+       plugincludestring += "\n\n"
+       nsis_cnt = string.replace(nsis_cnt, "[PLUGINCONTS]", plugincludestring)
+
        # do dotblender
        dotblendlist = []
        dotblenddir = os.listdir(startdir+"\\dist\\.blender")
        # do dotblender
        dotblendlist = []
        dotblenddir = os.listdir(startdir+"\\dist\\.blender")
@@ -112,4 +152,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')
                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)