protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration)
 {
     base.PopulateSupportFileList(list, configuration);
     foreach (var projectReference in References)
     {
         if (projectReference != null && projectReference.Package.Name == "monogame")
         {
             if (projectReference.ReferenceType == ReferenceType.Gac)
             {
                 foreach (var assem in projectReference.Package.Assemblies)
                 {
                     list.Add(assem.Location);
                     var cfg = (MonoGameProjectConfiguration)configuration.GetConfiguration(this);
                     if (cfg.DebugMode)
                     {
                         var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(assem.Location);
                         if (System.IO.File.Equals(mdbFile))
                         {
                             list.Add(mdbFile);
                         }
                     }
                 }
             }
             break;
         }
     }
 }
Ejemplo n.º 2
0
 protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector solutionConfiguration)
 {
     base.PopulateSupportFileList(list, solutionConfiguration);
     //HACK: workaround for MD not local-copying package references
     foreach (var projectReference in References)
     {
         if (projectReference.Package != null && projectReference.Package.Name == "Cocos2D")
         {
             if (projectReference.ReferenceType == ReferenceType.Gac)
             {
                 foreach (var assem in projectReference.Package.Assemblies)
                 {
                     list.Add(assem.Location);
                     var cfg = (Cocos2DProjectConfiguration)solutionConfiguration.GetConfiguration(this);
                     if (cfg.DebugMode)
                     {
                         var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(assem.Location);
                         if (System.IO.File.Exists(mdbFile))
                         {
                             list.Add(mdbFile);
                         }
                     }
                 }
             }
             break;
         }
     }
 }
Ejemplo n.º 3
0
        protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration)
        {
            base.PopulateSupportFileList(list, configuration);

            // Automatically copy referenced dll/so's to the target dir
            DProjectConfiguration prjCfg;

            foreach (var prj in DependingProjects)
            {
                if ((prjCfg = prj.GetConfiguration(configuration) as DProjectConfiguration) != null &&
                    prjCfg.CompileTarget == DCompileTarget.SharedLibrary)
                {
                    list.Add(prj.GetOutputFileName(configuration));
                }
            }
        }
Ejemplo n.º 4
0
        protected override void OnPopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration)
        {
            base.OnPopulateSupportFileList(list, configuration);

            //HACK: workaround for MD not local-copying package references
            foreach (MonoDevelop.Projects.ProjectReference projectReference in Project.References)
            {
                if (projectReference.Package != null && projectReference.Package.Name == "system.web.mvc")
                {
                    if (projectReference.ReferenceType == ReferenceType.Package)
                    {
                        foreach (SystemAssembly assem in projectReference.Package.Assemblies)
                        {
                            list.Add(assem.Location);
                        }
                    }
                    break;
                }
            }
        }
Ejemplo n.º 5
0
		protected override void OnPopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration)
		{
			base.OnPopulateSupportFileList (list, configuration);

			//HACK: workaround for MD not local-copying package references
			foreach (MonoDevelop.Projects.ProjectReference projectReference in Project.References) {
				if (projectReference.Package != null && projectReference.Package.Name == "system.web.mvc") {
					if (projectReference.ReferenceType == ReferenceType.Package)
						foreach (SystemAssembly assem in projectReference.Package.Assemblies)
							list.Add (assem.Location);
					break;
				}
			}
		}
Ejemplo n.º 6
0
		internal protected override void PopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration)
		{
			try {
				supportReferDistance++;
				PopulateSupportFileListInternal (list, configuration);
			} finally {
				supportReferDistance--;
			}
		}
Ejemplo n.º 7
0
		/// <summary>
		/// Gets a list of files required to use the project output
		/// </summary>
		/// <param name='list'>
		/// List where to add the support files.
		/// </param>
		/// <param name='configuration'>
		/// Build configuration for which get the list
		/// </param>
		/// <remarks>
		/// Returns a list of all files that are required to use the project output binary, for example: data files with
		/// the Copy to Output option, debug information files, generated resource files, etc.
		/// </remarks>
		protected virtual void PopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration)
		{
			foreach (ProjectFile pf in Files) {
				if (pf.CopyToOutputDirectory == FileCopyMode.None)
					continue;
				list.Add (pf.FilePath, pf.CopyToOutputDirectory == FileCopyMode.PreserveNewest, pf.ProjectVirtualPath);
			}
		}
Ejemplo n.º 8
0
		/// <summary>
		/// Gets a list of files required to use the project output
		/// </summary>
		/// <returns>
		/// A list of files.
		/// </returns>
		/// <param name='configuration'>
		/// Build configuration for which get the list
		/// </param>
		/// <remarks>
		/// Returns a list of all files that are required to use the project output binary, for example: data files with
		/// the Copy to Output option, debug information files, generated resource files, etc.
		/// </remarks>
		public FileCopySet GetSupportFileList (ConfigurationSelector configuration)
		{
			FileCopySet list = new FileCopySet ();
			PopulateSupportFileList (list, configuration);
			return list;
		}
Ejemplo n.º 9
0
		/// <summary>
		/// Gets a list of files required to use the project output
		/// </summary>
		/// <returns>
		/// A list of files.
		/// </returns>
		/// <param name='configuration'>
		/// Build configuration for which get the list
		/// </param>
		/// <remarks>
		/// Returns a list of all files that are required to use the project output binary, for example: data files with
		/// the Copy to Output option, debug information files, generated resource files, etc.
		/// </remarks>
		public FileCopySet GetSupportFileList (ConfigurationSelector configuration)
		{
			FileCopySet list = new FileCopySet ();
			Services.ProjectService.GetExtensionChain (this).PopulateSupportFileList (this, list, configuration);
			return list;
		}
Ejemplo n.º 10
0
		void PopulateSupportFileListInternal (FileCopySet list, ConfigurationSelector configuration)
		{
			if (supportReferDistance <= 2)
				base.PopulateSupportFileList (list, configuration);

			//rename the app.config file
			list.Remove ("app.config");
			list.Remove ("App.config");
			
			ProjectFile appConfig = Files.FirstOrDefault (f => f.FilePath.FileName.Equals ("app.config", StringComparison.CurrentCultureIgnoreCase));
			if (appConfig != null) {
				string output = GetOutputFileName (configuration).FileName;
				list.Add (appConfig.FilePath, true, output + ".config");
			}
			
			//collect all the "local copy" references and their attendant files
			foreach (ProjectReference projectReference in References) {
				if (!projectReference.LocalCopy || !projectReference.CanSetLocalCopy)
					continue;

				if (ParentSolution != null && projectReference.ReferenceType == ReferenceType.Project) {
					DotNetProject p = ParentSolution.FindProjectByName (projectReference.Reference) as DotNetProject;

					if (p == null) {
						LoggingService.LogWarning ("Project '{0}' referenced from '{1}' could not be found", projectReference.Reference, this.Name);
						continue;
					}
					DotNetProjectConfiguration conf = p.GetConfiguration (configuration) as DotNetProjectConfiguration;
					//VS COMPAT: recursively copy references's "local copy" files
					//but only copy the "copy to output" files from the immediate references
					if (processedProjects.Add (p) || supportReferDistance == 1) {
						foreach (var v in p.GetOutputFiles (configuration))
							list.Add (v, true, v.CanonicalPath.ToString ().Substring (conf.OutputDirectory.CanonicalPath.ToString ().Length + 1));

						foreach (var v in p.GetSupportFileList (configuration))
							list.Add (v.Src, v.CopyOnlyIfNewer, v.Target);
					}
				}
				else if (projectReference.ReferenceType == ReferenceType.Assembly) {
					// VS COMPAT: Copy the assembly, but also all other assemblies referenced by it
					// that are located in the same folder
					foreach (string file in GetAssemblyRefsRec (projectReference.Reference, new HashSet<string> ())) {
						// Indirectly referenced assemblies are only copied if a newer copy doesn't exist. This avoids overwritting directly referenced assemblies
						// by indirectly referenced stale copies of the same assembly. See bug #655566.
						bool copyIfNewer = file != projectReference.Reference;
						list.Add (file, copyIfNewer);
						if (File.Exists (file + ".config"))
							list.Add (file + ".config", copyIfNewer);
						string mdbFile = TargetRuntime.GetAssemblyDebugInfoFile (file);
						if (File.Exists (mdbFile))
							list.Add (mdbFile, copyIfNewer);
					}
				}
				else if (projectReference.ReferenceType == ReferenceType.Custom) {
					foreach (string refFile in projectReference.GetReferencedFileNames (configuration))
						list.Add (refFile);
				}
			}
		}
Ejemplo n.º 11
0
		protected override void PopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration)
		{
			PopulateSupportFileList (list, configuration, 0);
		}
Ejemplo n.º 12
0
		internal protected virtual void OnPopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration)
		{
			next.OnPopulateSupportFileList (list, configuration);
		}
        protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector solutionConfiguration)
        {
            System.Diagnostics.Debug.WriteLine("MonoGamePlatform=" +this.MonoGamePlatform);
            base.PopulateSupportFileList (list, solutionConfiguration);
            //HACK: workaround for MD not local-copying package references
            foreach (var projectReference in References)
            {
                if (projectReference.Reference.Contains("MonoGame.Framework"))
                {
                    // because of a weird bug in the way monodevelop resolves the assemblies
                    // we do it manually. We combine the monogame-<MonoGamePlatform>
                    // to resolve the internal packages.
                    foreach(var p in this.AssemblyContext.GetPackages(this.TargetFramework))
                    {
                        if (p.Name == string.Format("monogame-{0}", this.MonoGamePlatform.ToLower()))
                        {
                            foreach(var assem in p.Assemblies) {
                                list.Add(assem.Location);
                                var cfg = (MonoGameProjectConfiguration)solutionConfiguration.GetConfiguration(this);
                                if (cfg.DebugMode)
                                {
                                    var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(assem.Location);
                                    if (System.IO.File.Exists(mdbFile))
                                        list.Add(mdbFile);
                                }
                                var assemDir = System.IO.Path.GetDirectoryName (assem.Location);
                                // opentk needs a config file on linux and mac, so we just copy it over anyway
                                if (assem.Location.ToLower().Contains("opentk")) {
                                    if (System.IO.File.Exists(System.IO.Path.Combine(assemDir, "OpenTK.dll.config"))) {
                                        list.Add(System.IO.Path.Combine(assemDir, "OpenTK.dll.config"));
                                    }
                                }
                                // we are a Tao.SDL project we need the sdl support libraries as well
                                if (assem.Location.ToLower().Contains("tao.sdl")) {
                                    if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
                                        if (System.IO.File.Exists(System.IO.Path.Combine(assemDir, "sdl.dll"))) {
                                            list.Add(System.IO.Path.Combine(assemDir, "sdl.dll"));
                                        }
                                        if (System.IO.File.Exists(System.IO.Path.Combine(assemDir, "sdl_mixer.dll"))) {
                                            list.Add(System.IO.Path.Combine(assemDir, "sdl_mixer.dll"));
                                        }
                                    }
                                    if (System.IO.File.Exists(System.IO.Path.Combine(assemDir, "Tao.Sdl.dll.config"))) {
                                        list.Add(System.IO.Path.Combine(assemDir, "Tao.Sdl.dll.config"));
                                    }
                                }

                            }
                        }
                    }
                    break;
                }
            }
        }
Ejemplo n.º 14
0
 protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector solutionConfiguration)
 {
     base.PopulateSupportFileList(list, solutionConfiguration);
     //HACK: workaround for MD not local-copying package references
     foreach (var projectReference in References)
     {
         if (projectReference.Package != null && projectReference.Package.Name == "monogame")
         {
             if (projectReference.ReferenceType == ReferenceType.Gac)
             {
                 foreach (var assem in projectReference.Package.Assemblies)
                 {
                     list.Add(assem.Location);
                     var cfg = (MonoGameProjectConfiguration)solutionConfiguration.GetConfiguration(this);
                     if (cfg.DebugMode)
                     {
                         var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile(assem.Location);
                         if (System.IO.File.Exists(mdbFile))
                             list.Add(mdbFile);
                     }
                 }
             }
             break;
         }
     }
 }
		public virtual void PopulateSupportFileList (Project project, FileCopySet list, ConfigurationSelector configuration)
		{
			GetNext (project).PopulateSupportFileList (project, list, configuration);
		}
Ejemplo n.º 16
0
		void PopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration, int referenceDistance)
		{
			if (referenceDistance < 2)
				base.PopulateSupportFileList (list, configuration);

			//rename the app.config file
			FileCopySet.Item appConfig = list.Remove ("app.config");
			if (appConfig == null)
				appConfig = list.Remove ("App.config");
			if (appConfig != null) {
				string output = Path.GetFileName (GetOutputFileName (configuration));
				list.Add (appConfig.Src, appConfig.CopyOnlyIfNewer, output + ".config");
			}
			
			//collect all the "local copy" references and their attendant files
			foreach (ProjectReference projectReference in References) {
				if (!projectReference.LocalCopy || ParentSolution == null)
					continue;

				if (projectReference.ReferenceType == ReferenceType.Project) {
					DotNetProject p = ParentSolution.FindProjectByName (projectReference.Reference) as DotNetProject;

					if (p == null) {
						LoggingService.LogWarning ("Project '{0}' referenced from '{1}' could not be found", projectReference.Reference, this.Name);
						continue;
					}

					string refOutput = p.GetOutputFileName (configuration);
					if (string.IsNullOrEmpty (refOutput)) {
						LoggingService.LogWarning ("Project '{0}' referenced from '{1}' has an empty output filename", p.Name, this.Name);
						continue;
					}

					list.Add (refOutput);

					//VS COMPAT: recursively copy references's "local copy" files
					//but only copy the "copy to output" files from the immediate references
					p.PopulateSupportFileList (list, configuration, referenceDistance + 1);

					DotNetProjectConfiguration refConfig = p.GetConfiguration (configuration) as DotNetProjectConfiguration;

					if (refConfig != null && refConfig.DebugMode) {
						string mdbFile = TargetRuntime.GetAssemblyDebugInfoFile (refOutput);
						if (File.Exists (mdbFile)) {
							list.Add (mdbFile);
						}
					}
				}
				else if (projectReference.ReferenceType == ReferenceType.Assembly) {
					// VS COMPAT: Copy the assembly, but also all other assemblies referenced by it
					// that are located in the same folder
					foreach (string file in GetAssemblyRefsRec (projectReference.Reference, new HashSet<string> ())) {
						list.Add (file);
						if (File.Exists (file + ".config"))
							list.Add (file + ".config");
						string mdbFile = TargetRuntime.GetAssemblyDebugInfoFile (file);
						if (File.Exists (mdbFile))
							list.Add (mdbFile);
					}
				}
				else if (projectReference.ReferenceType == ReferenceType.Custom) {
					foreach (string refFile in projectReference.GetReferencedFileNames (configuration))
						list.Add (refFile);
				}
			}
		}
Ejemplo n.º 17
0
		internal protected override void PopulateSupportFileList (FileCopySet list, ConfigurationSelector configuration)
		{
			try {
				if (supportReferDistance == 0)
					processedProjects = new HashSet<DotNetProject> ();
				supportReferDistance++;

				PopulateSupportFileListInternal (list, configuration);
			} finally {
				supportReferDistance--;
				if (supportReferDistance == 0)
					processedProjects = null;
			}
		}
Ejemplo n.º 18
0
        protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration)
        {
            base.PopulateSupportFileList(list, configuration);

            // Automatically copy referenced dll/so's to the target dir
            DProjectConfiguration prjCfg;
            foreach(var prj in DependingProjects)
                if((prjCfg=prj.GetConfiguration(configuration) as DProjectConfiguration) != null &&
                  prjCfg.CompileTarget == DCompileTarget.SharedLibrary)
            {
                list.Add(prj.GetOutputFileName(configuration));
            }
        }
Ejemplo n.º 19
0
		public override void PopulateSupportFileList (Project project, FileCopySet list, ConfigurationSelector configuration)
		{
			project.PopulateSupportFileList (list, configuration);
		}
Ejemplo n.º 20
0
        protected override void PopulateSupportFileList(FileCopySet list, ConfigurationSelector configuration)
        {
            base.PopulateSupportFileList (list, configuration);
            foreach(var projectReference in References){
                if (projectReference != null && projectReference.Package.Name == "monogame") {
                    if (projectReference.ReferenceType == ReferenceType.Gac) {
                        foreach (var assem in projectReference.Package.Assemblies) {
                            list.Add (assem.Location);
                            var cfg = (MonoGameProjectConfiguration)configuration.GetConfiguration (this);
                            if (cfg.DebugMode) {
                                var mdbFile = TargetRuntime.GetAssemblyDebugInfoFile (assem.Location);
                                if (System.IO.File.Equals(mdbFile)){
                                    list.Add(mdbFile);
                                }
                            }
                        }
                    }
                    break;
                }

            }
        }