public void SetUpFixture() { SD.InitializeForUnitTests(); WixBindingTestsHelper.InitMSBuildEngine(); // create the project. ProjectCreateInformation info = new ProjectCreateInformation(MockSolution.Create(), new FileName(@"C:\Projects\Test\Test.wixproj")); wixProject = new WixProjectWithOverriddenSave(info); // Add wix extensionitem. wixExtensionItem = new WixExtensionProjectItem(wixProject); wixExtensionItem.Include = @"..\..\first.dll"; ProjectService.AddProjectItem(wixProject, wixExtensionItem); // Run Initialize on the WixExtensionFolderNode, which is // equivalent to expanding the node, so it adds it children. Cannot // call ExtTreeNode.Expanding since this relies on the tree node // being visible. WixExtensionFolderNodeTester nodeTester = new WixExtensionFolderNodeTester(wixProject); nodeTester.RunInitialize(); wixExtensionFolderNode = (WixExtensionFolderNode)nodeTester; wixExtensionNode = (WixExtensionNode)wixExtensionFolderNode.Nodes[0]; }
public void SetUpFixture() { wixProject = WixBindingTestsHelper.CreateEmptyWixProject(); // Add wix Extension item. firstWixExtensionItem = new WixExtensionProjectItem(wixProject); firstWixExtensionItem.Include = @"..\..\first-ext.dll"; ProjectService.AddProjectItem(wixProject, firstWixExtensionItem); // Add another wix Extension item. secondWixExtensionItem = new WixExtensionProjectItem(wixProject); secondWixExtensionItem.Include = @"..\..\second-ext.dll"; ProjectService.AddProjectItem(wixProject, secondWixExtensionItem); // Run Initialize on the WixExtensionFolderNode, which is // equivalent to expanding the node, so it adds it children. Cannot // call ExtTreeNode.Expanding since this relies on the tree node // being visible. WixExtensionFolderNodeTester nodeTester = new WixExtensionFolderNodeTester(wixProject); nodeTester.RunInitialize(); wixExtensionFolderNode = (WixExtensionFolderNode)nodeTester; if (wixExtensionFolderNode.Nodes.Count > 1) { firstWixExtensionNode = (WixExtensionNode)wixExtensionFolderNode.Nodes[0]; secondWixExtensionNode = (WixExtensionNode)wixExtensionFolderNode.Nodes[1]; } }
public WixExtensionNode(WixExtensionProjectItem projectItem) { Text = Path.GetFileName(projectItem.Include); this.projectItem = projectItem; ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/WixExtensionNode"; SetIcon("Icons.16x16.Library"); }
public WixExtensionNode(WixExtensionProjectItem projectItem) { Text = Path.GetFileName(projectItem.Include); this.projectItem = projectItem; ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/WixExtensionNode"; SetIcon("Icons.16x16.Library"); }
public void AddWixExtension(string fileName) { WixExtensionProjectItem projectItem = new WixExtensionProjectItem(this); projectItem.FileName = FileName.Create(fileName); ProjectService.AddProjectItem(this, projectItem); }
public void SetUpFixture() { WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); WixExtensionProjectItem compilerItem = new WixExtensionProjectItem(p); compilerItem.Include = @"$(WixToolPath)\WixNetFxExtension.dll"; ProjectService.AddProjectItem(p, compilerItem); extensionItem = p.WixExtensions[0]; }
/// <summary> /// Returns a collection of compiler extension items that match the specified /// type. /// </summary> ReadOnlyCollection<WixExtensionProjectItem> GetExtensions() { List<WixExtensionProjectItem> items = new List<WixExtensionProjectItem>(); foreach (ProjectItem projectItem in Items) { WixExtensionProjectItem item = projectItem as WixExtensionProjectItem; if (item != null) { items.Add(item); } } return new ReadOnlyCollection<WixExtensionProjectItem>(items); }
void AddExtensionNodes() { Nodes.Clear(); foreach (ProjectItem item in project.Items) { WixExtensionProjectItem extensionItem = item as WixExtensionProjectItem; if (extensionItem != null) { WixExtensionNode node = new WixExtensionNode(extensionItem); node.AddTo(this); } } }
public void SetUpFixture() { wixProject = WixBindingTestsHelper.CreateEmptyWixProject(); // Add wix library item. firstWixLibraryItem = new WixLibraryProjectItem(wixProject); firstWixLibraryItem.Include = "first.wixlib"; ProjectService.AddProjectItem(wixProject, firstWixLibraryItem); // Add another wix library item. secondWixLibraryItem = new WixLibraryProjectItem(wixProject); secondWixLibraryItem.Include = "second.wixlib"; ProjectService.AddProjectItem(wixProject, secondWixLibraryItem); // Add a wix extension item. firstWixExtensionItem = new WixExtensionProjectItem(wixProject); firstWixExtensionItem.Include = "first-ext.dll"; ProjectService.AddProjectItem(wixProject, firstWixExtensionItem); wixLibraryFolderNode = new WixLibraryFolderNode(wixProject); wixExtensionFolderNode = new WixExtensionFolderNode(wixProject); }
public void AddWixExtension(string fileName) { WixExtensionProjectItem projectItem = new WixExtensionProjectItem(this); projectItem.FileName = fileName; ProjectService.AddProjectItem(this, projectItem); }
public void NewWixExtensionProjectItem() { IProject p = WixBindingTestsHelper.CreateEmptyWixProject(); WixExtensionProjectItem item = new WixExtensionProjectItem(p); Assert.AreEqual(WixItemType.Extension, item.ItemType); }