parameters: (self)
docstring: not exactly the same some further work needed.
docstring_summary: not exactly the same some further work needed.
docstring_tokens: not exactly the same some further work needed .
function: def creating_samples(self):
          """
          not exactly the same some further work needed.
          """
          #-------Creating samples-------------------------------------------------------#
          print("* Creating samples...")
          self.logger.info("Creating samples...")
  
          all_samples = self.get_samples()
  
          os.chdir(os.path.join(self.WORK_DIR, "Platform", "Win32"))
  
          # open all solution files
          if not self.project_is_2010:
              OUTFILESLN2008 = open("Redist\\Samples\\Build\\All_2008.sln",'w')
              OUTFILESLN2008.write("Microsoft Visual Studio Solution File, Format Version 10.00\n")
              OUTFILESLN2008.write("# Visual Studio 2008\n")
  
          if not self.project_is_2010:
              OUTFILESLN2010 = open("Redist\\Samples\\Build\\All_2010.sln",'w')
          else:
              OUTFILESLN2010 = open("Redist\\Samples\\Build\\All.sln",'w')
          
          OUTFILESLN2010.write("Microsoft Visual Studio Solution File, Format Version 11.00\n")
          OUTFILESLN2010.write("# Visual Studio 2010\n")
  
          # copy java build script
          try:
              shutil.copy(os.path.join("Build", "BuildJava.py"), os.path.join("Redist", "Samples", "Build"))
          except:
              pass
  
          # add projects
          for sample in list(all_samples.values()):
              # make dir
              os.system ("mkdir " + sample.redist_dir)
              # copy source
              os.system ("xcopy /S " + sample.source_dir + " " + sample.redist_dir)
  
              if sample.is_other:
                  shutil.copy(sample.project_file, sample.redist_dir)
              else:
                  # copy the project file to 2008 and 2010:
                  prj_name_partitioned = os.path.splitext(sample.project_file);
                  prj2008_filename = sample.redist_dir + "\\" + sample.name + "_2008" + prj_name_partitioned[1]
  
                  if self.project_is_2010:
                      prj2010_filename = sample.redist_dir + "\\" + sample.name + prj_name_partitioned[1]
                  else:
                      prj2010_filename = sample.redist_dir + "\\" + sample.name + "_2010" + prj_name_partitioned[1]
  
                  if not self.project_is_2010:
                      shutil.copy(sample.project_file, prj2008_filename)
                  shutil.copy(sample.project_file, prj2010_filename)
  
                  # create reletive path to samples
                  prj2008_path = "..\\" + prj2008_filename.partition("\\")[2].partition("\\")[2]
                  prj2010_path = "..\\" + prj2010_filename.partition("\\")[2].partition("\\")[2]
  
                  # add project to solution
                  if not self.project_is_2010:
                      OUTFILESLN2008.write("Project(\"{19091980-2008-4CFA-1491-04CC20D8BCF9}\") = \""+\
                                              sample.project_name + "\", \"" + prj2008_path + "\", \"" + sample.project_guid + "\"\n")
                  OUTFILESLN2010.write("Project(\"{19091980-2008-4CFA-1491-04CC20D8BCF9}\") = \""+\
                                              sample.project_name + "\", \"" + prj2010_path + "\", \"" + sample.project_guid + "\"\n")
  
                  # write down dependencies
                  if len(sample.dependencies) > 0:
                      if not self.project_is_2010:
                          OUTFILESLN2008.write("\tProjectSection(ProjectDependencies) = postProject\n")
                          for depend in sample.dependencies:
                              OUTFILESLN2008.write("\t\t" + all_samples[depend].project_guid + " = " + all_samples[depend].project_guid + "\n")
                          OUTFILESLN2008.write("\tEndProjectSection\n")
                          if self.write_2010_sample_dependency == True:
                              write_dependencides(OUTFILESLN2010,all_samples,sample)
                              
                  if not self.project_is_2010:
                      OUTFILESLN2008.write("EndProject\n")
                  OUTFILESLN2010.write("EndProject\n")
  
          # Close files
          if not self.project_is_2010:
              OUTFILESLN2008.write("Global\n")
              OUTFILESLN2008.write("	GlobalSection(SolutionConfigurationPlatforms) = preSolution\n")
              OUTFILESLN2008.write("		Debug|Win32 = Debug|Win32\n")
              OUTFILESLN2008.write("		Debug|x64 = Debug|x64\n")
              OUTFILESLN2008.write("		Release|Win32 = Release|Win32\n")
              OUTFILESLN2008.write("		Release|x64 = Release|x64\n")
              OUTFILESLN2008.write("	EndGlobalSection\n")
              OUTFILESLN2008.write("	GlobalSection(ProjectConfigurationPlatforms) = postSolution\n")
          OUTFILESLN2010.write("Global\n")
          OUTFILESLN2010.write("	GlobalSection(SolutionConfigurationPlatforms) = preSolution\n")
          OUTFILESLN2010.write("		Debug|Win32 = Debug|Win32\n")
          OUTFILESLN2010.write("		Debug|x64 = Debug|x64\n")
          OUTFILESLN2010.write("		Release|Win32 = Release|Win32\n")
          OUTFILESLN2010.write("		Release|x64 = Release|x64\n")
          OUTFILESLN2010.write("	EndGlobalSection\n")
          OUTFILESLN2010.write("	GlobalSection(ProjectConfigurationPlatforms) = postSolution\n")
  
          for sample in list(all_samples.values()):
              conf_32_name = "Win32"
              if sample.is_net:
                  conf_32_name = "x86"
  
              if not self.project_is_2010:
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Debug|Win32.ActiveCfg = Debug|" + conf_32_name + "\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Debug|Win32.Build.0 = Debug|" + conf_32_name + "\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Debug|x64.ActiveCfg = Debug|x64\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Debug|x64.Build.0 = Debug|x64\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Release|Win32.ActiveCfg = Release|" + conf_32_name + "\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Release|Win32.Build.0 = Release|" + conf_32_name + "\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Release|x64.ActiveCfg = Release|x64\n")
                  OUTFILESLN2008.write("		" + sample.project_guid + ".Release|x64.Build.0 = Release|x64\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Debug|Win32.ActiveCfg = Debug|" + conf_32_name + "\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Debug|Win32.Build.0 = Debug|" + conf_32_name + "\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Debug|x64.ActiveCfg = Debug|x64\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Debug|x64.Build.0 = Debug|x64\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Release|Win32.ActiveCfg = Release|" + conf_32_name + "\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Release|Win32.Build.0 = Release|" + conf_32_name + "\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Release|x64.ActiveCfg = Release|x64\n")
              OUTFILESLN2010.write("		" + sample.project_guid + ".Release|x64.Build.0 = Release|x64\n")
  
          if not self.project_is_2010:
              OUTFILESLN2008.write("	EndGlobalSection\n")
              OUTFILESLN2008.write("	GlobalSection(SolutionProperties) = preSolution\n")
              OUTFILESLN2008.write("		HideSolutionNode = FALSE\n")
              OUTFILESLN2008.write("	EndGlobalSection\n")
              OUTFILESLN2008.write("EndGlobal	\n")
          OUTFILESLN2010.write("	EndGlobalSection\n")
          OUTFILESLN2010.write("	GlobalSection(SolutionProperties) = preSolution\n")
          OUTFILESLN2010.write("		HideSolutionNode = FALSE\n")
          OUTFILESLN2010.write("	EndGlobalSection\n")
          OUTFILESLN2010.write("EndGlobal	\n")
  
          if not self.project_is_2010:
              OUTFILESLN2008.close()
          OUTFILESLN2010.close()
  
          os.chdir(self.WORK_DIR)
function_tokens: def creating_samples ( self ) : #-------Creating samples-------------------------------------------------------# print ( "* Creating samples..." ) self . logger . info ( "Creating samples..." ) all_samples = self . get_samples ( ) os . chdir ( os . path . join ( self . WORK_DIR , "Platform" , "Win32" ) ) # open all solution files if not self . project_is_2010 : OUTFILESLN2008 = open ( "Redist\\Samples\\Build\\All_2008.sln" , 'w' ) OUTFILESLN2008 . write ( "Microsoft Visual Studio Solution File, Format Version 10.00\n" ) OUTFILESLN2008 . write ( "# Visual Studio 2008\n" ) if not self . project_is_2010 : OUTFILESLN2010 = open ( "Redist\\Samples\\Build\\All_2010.sln" , 'w' ) else : OUTFILESLN2010 = open ( "Redist\\Samples\\Build\\All.sln" , 'w' ) OUTFILESLN2010 . write ( "Microsoft Visual Studio Solution File, Format Version 11.00\n" ) OUTFILESLN2010 . write ( "# Visual Studio 2010\n" ) # copy java build script try : shutil . copy ( os . path . join ( "Build" , "BuildJava.py" ) , os . path . join ( "Redist" , "Samples" , "Build" ) ) except : pass # add projects for sample in list ( all_samples . values ( ) ) : # make dir os . system ( "mkdir " + sample . redist_dir ) # copy source os . system ( "xcopy /S " + sample . source_dir + " " + sample . redist_dir ) if sample . is_other : shutil . copy ( sample . project_file , sample . redist_dir ) else : # copy the project file to 2008 and 2010: prj_name_partitioned = os . path . splitext ( sample . project_file ) prj2008_filename = sample . redist_dir + "\\" + sample . name + "_2008" + prj_name_partitioned [ 1 ] if self . project_is_2010 : prj2010_filename = sample . redist_dir + "\\" + sample . name + prj_name_partitioned [ 1 ] else : prj2010_filename = sample . redist_dir + "\\" + sample . name + "_2010" + prj_name_partitioned [ 1 ] if not self . project_is_2010 : shutil . copy ( sample . project_file , prj2008_filename ) shutil . copy ( sample . project_file , prj2010_filename ) # create reletive path to samples prj2008_path = "..\\" + prj2008_filename . partition ( "\\" ) [ 2 ] . partition ( "\\" ) [ 2 ] prj2010_path = "..\\" + prj2010_filename . partition ( "\\" ) [ 2 ] . partition ( "\\" ) [ 2 ] # add project to solution if not self . project_is_2010 : OUTFILESLN2008 . write ( "Project(\"{19091980-2008-4CFA-1491-04CC20D8BCF9}\") = \"" + sample . project_name + "\", \"" + prj2008_path + "\", \"" + sample . project_guid + "\"\n" ) OUTFILESLN2010 . write ( "Project(\"{19091980-2008-4CFA-1491-04CC20D8BCF9}\") = \"" + sample . project_name + "\", \"" + prj2010_path + "\", \"" + sample . project_guid + "\"\n" ) # write down dependencies if len ( sample . dependencies ) > 0 : if not self . project_is_2010 : OUTFILESLN2008 . write ( "\tProjectSection(ProjectDependencies) = postProject\n" ) for depend in sample . dependencies : OUTFILESLN2008 . write ( "\t\t" + all_samples [ depend ] . project_guid + " = " + all_samples [ depend ] . project_guid + "\n" ) OUTFILESLN2008 . write ( "\tEndProjectSection\n" ) if self . write_2010_sample_dependency == True : write_dependencides ( OUTFILESLN2010 , all_samples , sample ) if not self . project_is_2010 : OUTFILESLN2008 . write ( "EndProject\n" ) OUTFILESLN2010 . write ( "EndProject\n" ) # Close files if not self . project_is_2010 : OUTFILESLN2008 . write ( "Global\n" ) OUTFILESLN2008 . write ( "	GlobalSection(SolutionConfigurationPlatforms) = preSolution\n" ) OUTFILESLN2008 . write ( "		Debug|Win32 = Debug|Win32\n" ) OUTFILESLN2008 . write ( "		Debug|x64 = Debug|x64\n" ) OUTFILESLN2008 . write ( "		Release|Win32 = Release|Win32\n" ) OUTFILESLN2008 . write ( "		Release|x64 = Release|x64\n" ) OUTFILESLN2008 . write ( "	EndGlobalSection\n" ) OUTFILESLN2008 . write ( "	GlobalSection(ProjectConfigurationPlatforms) = postSolution\n" ) OUTFILESLN2010 . write ( "Global\n" ) OUTFILESLN2010 . write ( "	GlobalSection(SolutionConfigurationPlatforms) = preSolution\n" ) OUTFILESLN2010 . write ( "		Debug|Win32 = Debug|Win32\n" ) OUTFILESLN2010 . write ( "		Debug|x64 = Debug|x64\n" ) OUTFILESLN2010 . write ( "		Release|Win32 = Release|Win32\n" ) OUTFILESLN2010 . write ( "		Release|x64 = Release|x64\n" ) OUTFILESLN2010 . write ( "	EndGlobalSection\n" ) OUTFILESLN2010 . write ( "	GlobalSection(ProjectConfigurationPlatforms) = postSolution\n" ) for sample in list ( all_samples . values ( ) ) : conf_32_name = "Win32" if sample . is_net : conf_32_name = "x86" if not self . project_is_2010 : OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Debug|Win32.ActiveCfg = Debug|" + conf_32_name + "\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Debug|Win32.Build.0 = Debug|" + conf_32_name + "\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Debug|x64.ActiveCfg = Debug|x64\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Debug|x64.Build.0 = Debug|x64\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Release|Win32.ActiveCfg = Release|" + conf_32_name + "\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Release|Win32.Build.0 = Release|" + conf_32_name + "\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Release|x64.ActiveCfg = Release|x64\n" ) OUTFILESLN2008 . write ( "		" + sample . project_guid + ".Release|x64.Build.0 = Release|x64\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Debug|Win32.ActiveCfg = Debug|" + conf_32_name + "\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Debug|Win32.Build.0 = Debug|" + conf_32_name + "\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Debug|x64.ActiveCfg = Debug|x64\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Debug|x64.Build.0 = Debug|x64\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Release|Win32.ActiveCfg = Release|" + conf_32_name + "\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Release|Win32.Build.0 = Release|" + conf_32_name + "\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Release|x64.ActiveCfg = Release|x64\n" ) OUTFILESLN2010 . write ( "		" + sample . project_guid + ".Release|x64.Build.0 = Release|x64\n" ) if not self . project_is_2010 : OUTFILESLN2008 . write ( "	EndGlobalSection\n" ) OUTFILESLN2008 . write ( "	GlobalSection(SolutionProperties) = preSolution\n" ) OUTFILESLN2008 . write ( "		HideSolutionNode = FALSE\n" ) OUTFILESLN2008 . write ( "	EndGlobalSection\n" ) OUTFILESLN2008 . write ( "EndGlobal	\n" ) OUTFILESLN2010 . write ( "	EndGlobalSection\n" ) OUTFILESLN2010 . write ( "	GlobalSection(SolutionProperties) = preSolution\n" ) OUTFILESLN2010 . write ( "		HideSolutionNode = FALSE\n" ) OUTFILESLN2010 . write ( "	EndGlobalSection\n" ) OUTFILESLN2010 . write ( "EndGlobal	\n" ) if not self . project_is_2010 : OUTFILESLN2008 . close ( ) OUTFILESLN2010 . close ( ) os . chdir ( self . WORK_DIR )