static MergeProject CreateMergePixelFarmProject() { MergeProject mergePro = new MergeProject(); mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.One.HtmlRenderer.csproj");//this is auto-gen project too mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.DataProvider.Native\PixelFarm.DataProvider.Native.csproj");//this is auto-gen project too mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.SkiaSharp\PixelFarm.SkiaSharp.csproj"); mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.Drawing.Skia\PixelFarm.Drawing.Skia.csproj"); mergePro.LoadSubProject(DEV_DIR + @"Deps\Tesselate\Tesselate.csproj"); //------------------------------------------------------------------------------------------------ //base modules mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.ClientPlatforms\LayoutFarm.ClientPlatforms.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.CssBase\LayoutFarm.CssBase.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.WebLexer\LayoutFarm.WebLexer.csproj"); //layout and renderer module mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.BaseRenderer\LayoutFarm.BaseRenderer.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.HtmlRenderer\LayoutFarm.HtmlRenderer.csproj"); //integrated module mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.Composers\LayoutFarm.Composers.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.TextEdit\LayoutFarm.TextEdit.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.WebDom\LayoutFarm.WebDom.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.YourCustomWidgets\LayoutFarm.YourCustomWidgets.csproj"); //platforms.Windows mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.Platforms.WinForms\LayoutFarm.Platforms.WinForms.csproj"); //js engine mergePro.LoadSubProject(DEV_DIR + @"Deps\Espresso\Net20\Espresso.Interfaces\Espresso.Interfaces.csproj"); mergePro.LoadSubProject(DEV_DIR + @"Deps\Espresso\Net20\EspressoCore\EspressoCore.csproj"); return mergePro; }
static MergeProject CreateMergePixelFarmProject() { MergeProject mergePro = new MergeProject(); mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.One.HtmlRenderer.csproj");//this is auto-gen project too //mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.SkiaSharp\PixelFarm.SkiaSharp.csproj"); //mergePro.LoadSubProject(DEV_DIR + @"Deps\PixelFarm.Drawing.Skia\PixelFarm.Drawing.Skia.csproj"); //mergePro.LoadSubProject(DEV_DIR + @"Deps\Tesselate\Tesselate.csproj"); //------------------------------------------------------------------------------------------------ //base modules mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.ClientPlatforms\LayoutFarm.ClientPlatforms.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.CssBase\LayoutFarm.CssBase.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.WebLexer\LayoutFarm.WebLexer.csproj"); //layout and renderer module mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.BaseRenderer\LayoutFarm.BaseRenderer.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.HtmlRenderer\LayoutFarm.HtmlRenderer.csproj"); //integrated module mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.HtmlComposer\LayoutFarm.HtmlComposer.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.TextEdit\LayoutFarm.TextEdit.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.WebDom\LayoutFarm.WebDom.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.YourCustomWidgets\LayoutFarm.YourCustomWidgets.csproj"); //platforms.Windows mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.PlatformBase\LayoutFarm.PlatformBase.csproj"); mergePro.LoadSubProject(DEV_DIR + @"LayoutFarm.Platforms.WinForms\LayoutFarm.Platforms.WinForms.csproj"); //js engine mergePro.LoadSubProject(DEV_DIR + @"Deps\Espresso\Net20\Espresso.Interfaces\Espresso.Interfaces.csproj"); mergePro.LoadSubProject(DEV_DIR + @"Deps\Espresso\Net20\EspressoCore\EspressoCore.csproj"); return(mergePro); }
MergeProject CreateMergeProjectPlan(SolutionProject project) { MergeProject mergePro = new MergeProject(); List <ProjectAsmReference> asmRefs = _solutionMx.GetReferenceAsmList(project.RelativePath); mergePro.PostMergeRefs = _solutionMx.GetPostMergeReferences(project.RelativePath); // string fullProjectDir = System.IO.Path.GetDirectoryName(_solutionMx.SolutionDir + "\\" + project.RelativePath); string projFilename = System.IO.Path.GetFileName(project.RelativePath); int j = asmRefs.Count; for (int i = 0; i < j; ++i) { ProjectAsmReference asmRef = asmRefs[i]; switch (asmRef.Kind) { case ProjectAsmReferenceKind.ProjectReference: string result = System.IO.Path.Combine(fullProjectDir, asmRef.Name); if (!System.IO.File.Exists(result)) { } mergePro.LoadSubProject(result); break; case ProjectAsmReferenceKind.Reference: mergePro._asmReferences.Add(asmRef.Name); break; } } //---------- //find var pro = GlobalLoadedProject.LoadProject(fullProjectDir + "\\" + projFilename); foreach (var item in pro.AllEvaluatedProperties) { //select some our interest features switch (item.Name) { case "DefineConstants": mergePro.DefineConstants = item.EvaluatedValue; break; case "TargetFrameworkVersion": mergePro.TargetFrameworkVersion = item.EvaluatedValue; break; } } return(mergePro); }
public void BuildMergeProjectFromSelectedItem() { if (_currentSelectedMergePro == null) { return; } //--- MergeProject mergePro = CreateMergeProjectPlan(_currentSelectedMergePro); //BY_CONVENTION: //set target to build output, set to x_autogen_projects dir //----------------------------------- string rootSlnFolder = _solutionMx.SolutionDir; string rightPart; string beginAt = _solutionMx.BuildPathRelativeToSolution(Application.ExecutablePath, out rightPart); string targetProjectName = _currentSelectedMergePro.ProjectName; string targetProjectFile = targetProjectName + ".csproj"; string saveProjectName = beginAt + "x_autogen\\" + targetProjectName + "\\" + targetProjectFile; string[] asmReferences = mergePro._asmReferences.ToArray(); //----------- mergePro.MergeAndSave(saveProjectName, targetProjectName, mergePro.TargetFrameworkVersion, mergePro.DefineConstants,//additional define constant asmReferences); if (NetStdVersion != null) { //generate as dotnet std project LinkProjectConverter.ConvertToLinkProjectNetStd( _solutionMx, saveProjectName, "x_autogen_" + NetStdVersion + "\\" + targetProjectName, NetStdVersion, false);//after link project is created, we remove the targetProjectFile } else { LinkProjectConverter.ConvertToLinkProject( _solutionMx, saveProjectName, "x_autogen2\\" + targetProjectName, false);//after link project is created, we remove the targetProjectFile } //----------- }
private void cmdBuildHtmlRenderOne_Click(object sender, EventArgs e) { MergeProject mergePro = CreateMergePixelFarmProject(); mergePro.MergeAndSave(DEV_DIR + "HtmlRenderer.One.csproj", "HtmlRenderer.One", "v2.0", //"ICU_VER_54;NET20", ";NET20, __DESKTOP__" + ",NET20,PIXEL_FARM,PIXEL_FARM_NET20,__SKIA__, GL_ENABLE", //additional define constant, new string[] { "System", "System.Drawing", "System.Windows.Forms", "System.XML", }); }
public void BuildMergeProjectFromSelectedItem() { if (_currentSelectedMergePro == null) { return; } //--- MergeProject mergePro = CreateMergeProjectPlan(_currentSelectedMergePro); //BY_CONVENTION: //set target to build output, set to x_autogen_projects dir //----------------------------------- string rootSlnFolder = _solutionMx.SolutionDir; string rightPart; string beginAt = _solutionMx.BuildPathRelativeToSolution(Application.ExecutablePath, out rightPart); string targetProjectName = _currentSelectedMergePro.ProjectName;// "PixelFarm.MiniAgg.One"; string targetProjectFile = targetProjectName + ".csproj"; string saveProjectName = beginAt + "x_autogen\\" + targetProjectName + "\\" + targetProjectFile; string[] asmReferences = mergePro._asmReferences.ToArray(); //mergePro.MergeAndSave(saveProjectName, // targetProjectName, // "v2.0", // " PIXEL_FARM,PIXEL_FARM_NET20",//additional define constant // asmReferences); //----------- mergePro.MergeAndSave(saveProjectName, targetProjectName, mergePro.TargetFrameworkVersion, mergePro.DefineConstants,//additional define constant asmReferences); //----------- LinkProjectConverter.ConvertToLinkProject2( _solutionMx, saveProjectName, "x_autogen2\\" + targetProjectName, false);//after link project is created, we remove the targetProjectFile }
public void BuildMergeProjectFromSelectedItem() { if (_currentSelectedMergePro == null) { return; } //--- MergeProject mergePro = CreateMergeProjectPlan(_currentSelectedMergePro); //BY_CONVENTION: //set target to build output, set to x_autogen_projects dir //----------------------------------- string rootSlnFolder = _solutionMx.SolutionDir; string rightPart; string beginAt = _solutionMx.BuildPathRelativeToSolution(Application.ExecutablePath, out rightPart); string targetProjectName = _currentSelectedMergePro.ProjectName; string targetProjectFile = targetProjectName + ".csproj"; string saveProjectName = beginAt + "x_autogen\\" + targetProjectName + "\\" + targetProjectFile; string[] asmReferences = mergePro._asmReferences.ToArray(); //----------- mergePro.MergeAndSave(saveProjectName, targetProjectName, mergePro.TargetFrameworkVersion, mergePro.DefineConstants,//additional define constant asmReferences); switch (ProjectKind) { case "classic": { LinkProjectConverter.ConvertToLinkProject( _solutionMx, saveProjectName, "x_autogen2\\" + targetProjectName, false); //after link project is created, we remove the targetProjectFile } break; case "xamarin_ios": { //create xamarin ios lib LinkProjectConverter.ConvertToLinkProjectXamarin_ios( _solutionMx, saveProjectName, "x_autogen_" + ProjectKind + "\\" + targetProjectName, ProjectKind, false); } break; case "xamarin_droid": { LinkProjectConverter.ConvertToLinkProjectXamarin_droid( _solutionMx, saveProjectName, "x_autogen_" + ProjectKind + "\\" + targetProjectName, ProjectKind, false); } break; case "xamarin_ios_and_droid": { //ios LinkProjectConverter.ConvertToLinkProjectXamarin_ios( _solutionMx, saveProjectName, "x_autogen_" + ProjectKind + "\\" + targetProjectName, ProjectKind, false); //android LinkProjectConverter.ConvertToLinkProjectXamarin_droid( _solutionMx, saveProjectName, "x_autogen_" + ProjectKind + "\\" + targetProjectName, ProjectKind, false); } break; default: { // //generate as dotnet std project LinkProjectConverter.ConvertToLinkProjectNetStd( _solutionMx, saveProjectName, "x_autogen_" + ProjectKind + "\\" + targetProjectName, ProjectKind, false); //after link project is created, we remove the targetProjectFile } break; } }