├── .gitattributes ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── IceBuilder.Next ├── IceBuilder.Next.csproj └── source.extension.vsixmanifest ├── IceBuilder.Shared ├── AssemblyInfo.cs ├── BuildLogger.cs ├── Builder.cs ├── CSharpConfigurationView.Designer.cs ├── CSharpConfigurationView.cs ├── CSharpConfigurationView.resx ├── DTEUtil.cs ├── DocumentEventHandler.cs ├── IceBuilder.Shared.projitems ├── IceBuilder.Shared.shproj ├── IceHomeEditor.Designer.cs ├── IceHomeEditor.cs ├── IceHomeEditor.resx ├── IceOptionsPage.cs ├── MSBuildUtils.cs ├── Package.cs ├── Project.cs ├── ProjectConverter.cs ├── ProjectFactory.cs ├── ProjectSettigns.cs ├── ProjectUtil.cs ├── PropertyNames.cs ├── PropertyPage.cs ├── SolutionEventHandler.cs ├── StreamReader.cs ├── UIUtil.cs ├── UpgradeDialog.Designer.cs ├── UpgradeDialog.cs ├── UpgradeDialog.resx ├── UpgradeDialogProgress.Designer.cs ├── UpgradeDialogProgress.cs ├── UpgradeDialogProgress.resx └── VSPackage.resx ├── IceBuilder.VS2022.sln ├── IceBuilder.sln ├── IceBuilder ├── IceBuilder.csproj └── source.extension.vsixmanifest ├── IceBuilderTemplates ├── CSharpSliceItemTemplate │ ├── CSharpSliceItemTemplate.csproj │ ├── CSharpSliceItemTemplate.ico │ ├── CSharpSliceItemTemplate.vstemplate │ ├── New.ice │ └── Properties │ │ └── AssemblyInfo.cs └── VCSliceItemTemplate │ ├── New.ice │ ├── Properties │ └── AssemblyInfo.cs │ ├── VCSliceItemTemplate.csproj │ ├── VCSliceItemTemplate.ico │ └── VCSliceItemTemplate.vstemplate ├── IceBuilder_Common.Next ├── IceBuilder_Common.Next.csproj └── Properties │ └── AssemblyInfo.cs ├── IceBuilder_Common.Shared ├── DTEProjectExtension.cs ├── FileUtil.cs ├── GeneratedFileSet.cs ├── IVsProjectExtension.cs ├── IVsProjectHelper.cs ├── IVsProjectHelperFactory.cs ├── IceBuilder_Common.Shared.projitems ├── IceBuilder_Common.Shared.shproj ├── MSProjectExtension.cs ├── NuGet.cs ├── PackageInitializationException.cs └── VCUtil.cs ├── IceBuilder_Common ├── IceBuilder_Common.csproj ├── NuGetI.cs ├── ProjectDesignerPageProvider.cs ├── ProjectHelperFactoryI.cs ├── ProjectHelperI.cs ├── Properties │ └── AssemblyInfo.cs └── VCUtilI.cs ├── IceBuilder_VS2015 ├── IceBuilder_VS2015.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── IceBuilder_VS2017 ├── IceBuilder_VS2017.csproj ├── Properties │ └── AssemblyInfo.cs ├── app.config └── packages.config ├── IceBuilder_VS2019 ├── IceBuilder_VS2019.csproj ├── Properties │ └── AssemblyInfo.cs ├── app.config └── packages.config ├── IceBuilder_VS2022 ├── IceBuilder_VS2022.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── LICENSE.txt ├── README.md ├── Screenshots ├── cpp-additional-include-directories.png ├── cpp-mapping.png ├── cpp-property-page.png ├── csharp-property-page.png ├── file-cpp-property-page.png └── options.png └── assets ├── Grammars.pkgdef ├── LICENSE.rtf ├── Package.ico ├── Package.png ├── ice.tmLanguage.json └── upgrade.rtf /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: ["main"] 7 | pull_request: 8 | branches: ["main"] 9 | 10 | concurrency: 11 | group: ${{ github.head_ref || github.run_id }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | build-visualstudio-2022: 16 | runs-on: windows-2022 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v2 20 | 21 | - name: Setup MSBuild 22 | uses: microsoft/setup-msbuild@v2 23 | 24 | - name: Add nuget to PATH 25 | uses: nuget/setup-nuget@v1 26 | 27 | - name: Install SignTool 28 | run: | 29 | dotnet tool install --tool-path . --prerelease sign 30 | 31 | - name: Restore NuGet packages 32 | run: | 33 | nuget restore IceBuilder.VS2022.sln 34 | 35 | - name: Build Visual Studio 2022 Extension 36 | run: | 37 | MSBuild IceBuilder.VS2022.sln /p:Configuration=Release /p:Platform="Any CPU" 38 | 39 | - name: Sign VSIX Package 40 | run: | 41 | .\sign.exe code trusted-signing ".\IceBuilder.Next\bin\Release\IceBuilder.Next.vsix" ` 42 | --trusted-signing-endpoint https://eus.codesigning.azure.net/ ` 43 | --timestamp-url http://timestamp.acs.microsoft.com ` 44 | --trusted-signing-account zeroc ` 45 | --trusted-signing-certificate-profile zeroc-ice ` 46 | --azure-key-vault-tenant-id ${{ secrets.AZURE_TENANT_ID }} ` 47 | --azure-key-vault-client-id ${{ secrets.AZURE_CLIENT_ID }} ` 48 | --azure-key-vault-client-secret ${{ secrets.AZURE_CLIENT_SECRET }} 49 | 50 | - name: Upload Visual Studio 2022 Extension 51 | uses: actions/upload-artifact@v4 52 | with: 53 | name: vs2022-vsix 54 | path: | 55 | ./IceBuilder.Next/bin/Release/*.vsix 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Ice Builder 3 | ################# 4 | 5 | generated 6 | .vs 7 | IceBuilder/Resources/*.xml 8 | 9 | ################# 10 | ## Eclipse 11 | ################# 12 | 13 | *.pydevproject 14 | .project 15 | .metadata 16 | bin/ 17 | tmp/ 18 | *.tmp 19 | *.bak 20 | *.swp 21 | *~.nib 22 | local.properties 23 | .classpath 24 | .settings/ 25 | .loadpath 26 | 27 | # External tool builders 28 | .externalToolBuilders/ 29 | 30 | # Locally stored "Eclipse launch configurations" 31 | *.launch 32 | 33 | # CDT-specific 34 | .cproject 35 | 36 | # PDT-specific 37 | .buildpath 38 | 39 | ################# 40 | ## Visual Studio 41 | ################# 42 | 43 | ## Ignore Visual Studio temporary files, build results, and 44 | ## files generated by popular Visual Studio add-ons. 45 | 46 | # User-specific files 47 | *.suo 48 | *.user 49 | *.sln.docstates 50 | 51 | # Build results 52 | 53 | [Dd]ebug/ 54 | [Rr]elease/ 55 | x64/ 56 | build/ 57 | [Bb]in/ 58 | [Oo]bj/ 59 | 60 | # MSTest test Results 61 | [Tt]est[Rr]esult*/ 62 | [Bb]uild[Ll]og.* 63 | 64 | *_i.c 65 | *_p.c 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.pch 70 | *.pdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.log 86 | *.scc 87 | 88 | # Visual C++ cache files 89 | ipch/ 90 | *.aps 91 | *.ncb 92 | *.opensdf 93 | *.sdf 94 | *.cachefile 95 | 96 | # Visual Studio profiler 97 | *.psess 98 | *.vsp 99 | *.vspx 100 | 101 | # Guidance Automation Toolkit 102 | *.gpState 103 | 104 | # ReSharper is a .NET coding add-in 105 | _ReSharper*/ 106 | *.[Rr]e[Ss]harper 107 | 108 | # TeamCity is a build add-in 109 | _TeamCity* 110 | 111 | # DotCover is a Code Coverage Tool 112 | *.dotCover 113 | 114 | # NCrunch 115 | *.ncrunch* 116 | .*crunch*.local.xml 117 | 118 | # Installshield output folder 119 | [Ee]xpress/ 120 | 121 | # DocProject is a documentation generator add-in 122 | DocProject/buildhelp/ 123 | DocProject/Help/*.HxT 124 | DocProject/Help/*.HxC 125 | DocProject/Help/*.hhc 126 | DocProject/Help/*.hhk 127 | DocProject/Help/*.hhp 128 | DocProject/Help/Html2 129 | DocProject/Help/html 130 | 131 | # Click-Once directory 132 | publish/ 133 | 134 | # Publish Web Output 135 | *.Publish.xml 136 | *.pubxml 137 | *.publishproj 138 | 139 | # NuGet Packages Directory 140 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 141 | #packages/ 142 | 143 | # Windows Azure Build Output 144 | csx 145 | *.build.csdef 146 | 147 | # Windows Store app package directory 148 | AppPackages/ 149 | 150 | # Others 151 | sql/ 152 | *.Cache 153 | ClientBin/ 154 | [Ss]tyle[Cc]op.* 155 | ~$* 156 | *~ 157 | *.dbmdl 158 | *.[Pp]ublish.xml 159 | *.pfx 160 | *.publishsettings 161 | 162 | # RIA/Silverlight projects 163 | Generated_Code/ 164 | 165 | # Backup & report files from converting an old project file to a newer 166 | # Visual Studio version. Backup files are not needed, because we have git ;-) 167 | _UpgradeReport_Files/ 168 | Backup*/ 169 | UpgradeLog*.XML 170 | UpgradeLog*.htm 171 | 172 | # SQL Server files 173 | App_Data/*.mdf 174 | App_Data/*.ldf 175 | 176 | ############# 177 | ## Windows detritus 178 | ############# 179 | 180 | # Windows image file caches 181 | Thumbs.db 182 | ehthumbs.db 183 | 184 | # Folder config file 185 | Desktop.ini 186 | 187 | # Recycle Bin used on file shares 188 | $RECYCLE.BIN/ 189 | 190 | # Mac crap 191 | .DS_Store 192 | 193 | ############# 194 | ## Python 195 | ############# 196 | 197 | *.py[cod] 198 | 199 | # Packages 200 | *.egg 201 | *.egg-info 202 | dist/ 203 | build/ 204 | eggs/ 205 | parts/ 206 | var/ 207 | sdist/ 208 | develop-eggs/ 209 | .installed.cfg 210 | 211 | # Installer logs 212 | pip-log.txt 213 | 214 | # Unit test / coverage reports 215 | .coverage 216 | .tox 217 | 218 | #Translations 219 | *.mo 220 | 221 | #Mr Developer 222 | .mr.developer.cfg 223 | 224 | # 225 | # Executables 226 | *.exe 227 | *.dll 228 | 229 | # 230 | # Nuget packages diretory 231 | # 232 | packages 233 | 234 | \#*\# 235 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Ice Builder for Visual Studio 2 | 3 | Thank you for your interest in contributing to Ice Builder for Visual Studio! 4 | 5 | ## How to Contribute 6 | 7 | To contribute code or documentation to this project, please follow these steps: 8 | 9 | 1. Review the [ZeroC Contributor Agreement](https://gist.github.com/zcabot/1a4c24dca55adaa83d78cdeabc63226b). 10 | The CLA assistant bot will ask you to sign this agreement when you submit 11 | your first pull request. 12 | 13 | 2. If you're planning to make a significant contribution, such as a new feature 14 | or major changes, please discuss your ideas with the community first by 15 | starting a [discussion](https://github.com/zeroc-ice/ice-builder-visualstudio/discussions) or by 16 | contacting us via [email](mailto:contributing@zeroc.com). 17 | 18 | 3. Fork this repository. 19 | 20 | 4. When implementing your contribution, please adhere to the project's naming 21 | and coding conventions to maintain consistency in the source code. 22 | 23 | 5. Submit a pull request. 24 | 25 | We review carefully any contribution that we accept, and these reviews may take 26 | some time. Please keep in mind there is no guarantee your contribution will be 27 | accepted: we may reject a pull request for any reason, or no reason. 28 | 29 | ## Contact 30 | 31 | - GitHub Discussions: 32 | - Twitter: 33 | - Email: 34 | -------------------------------------------------------------------------------- /IceBuilder.Next/IceBuilder.Next.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 17.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | 2.0 12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | {A51B4AA4-714B-4E23-A8C1-E0759BF5B609} 14 | Library 15 | Properties 16 | IceBuilder.Next 17 | IceBuilder.Next 18 | v4.7.2 19 | true 20 | true 21 | true 22 | false 23 | false 24 | true 25 | true 26 | Program 27 | $(DevEnvDir)devenv.exe 28 | /rootsuffix Exp 29 | 30 | 31 | true 32 | full 33 | false 34 | bin\Debug\ 35 | TRACE;DEBUG;VS2022 36 | prompt 37 | 4 38 | 39 | 40 | pdbonly 41 | true 42 | bin\Release\ 43 | TRACE;VS2022 44 | prompt 45 | 4 46 | 47 | 48 | 49 | Grammars.pkgdef 50 | true 51 | 52 | 53 | Resources\LICENSE.rtf 54 | true 55 | 56 | 57 | Resources\upgrade.rtf 58 | true 59 | 60 | 61 | Grammars\ice.tmLanguage.json 62 | true 63 | 64 | 65 | Designer 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | compile; build; native; contentfiles; analyzers; buildtransitive 78 | 79 | 80 | runtime; build; native; contentfiles; analyzers; buildtransitive 81 | all 82 | 83 | 84 | 85 | 86 | 17.10.34916.79 87 | 88 | 89 | 90 | 91 | {6D243563-186E-4FCC-B1FC-74E97B9A5942} 92 | CSharpSliceItemTemplate 93 | ItemTemplates 94 | false 95 | TemplateProjectOutputGroup%3b 96 | 97 | 98 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5} 99 | VCSliceItemTemplate 100 | ItemTemplates 101 | false 102 | TemplateProjectOutputGroup%3b 103 | 104 | 105 | {c014d4bf-6eb0-409e-ad9b-5b783450200f} 106 | IceBuilder_Common.Next 107 | 108 | 109 | 110 | 111 | Resources\Package.ico 112 | 113 | 114 | Resources\Package.png 115 | true 116 | 117 | 118 | IceBuilder.VS2022.dll 119 | true 120 | Always 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /IceBuilder.Next/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ice Builder For Visual Studio 2022 6 | Ice Builder manages the compilation of Slice (.ice) files to C++ and C#. It compiles your Slice files with slice2cpp and slice2cs, and allows you to specify the parameters provided to these compilers. 7 | https://github.com/zeroc-ice/ice-builder-visualstudio 8 | Resources\LICENSE.rtf 9 | Resources\Package.png 10 | Resources\Package.png 11 | ZeroC, Ice, Slice 12 | 13 | 14 | 15 | amd64 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /IceBuilder.Shared/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisibleAttribute(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder.Shared/BuildLogger.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.Build.Framework; 4 | using Microsoft.Build.Utilities; 5 | using Microsoft.VisualStudio.Shell; 6 | using System; 7 | using System.Diagnostics; 8 | using System.IO; 9 | using System.Text; 10 | 11 | namespace IceBuilder 12 | { 13 | public class BuildLogger : Logger 14 | { 15 | private int Indent { get; set; } 16 | private int IndentLevel { get; set; } 17 | private EnvDTE.OutputWindowPane OutputPane { get; set; } 18 | private Stopwatch Stopwatch { get; set; } 19 | 20 | public BuildLogger(EnvDTE.OutputWindowPane outputPane) 21 | { 22 | OutputPane = outputPane; 23 | IndentLevel = 2; 24 | } 25 | 26 | public override void Initialize(IEventSource eventSource) 27 | { 28 | eventSource.ProjectStarted += new ProjectStartedEventHandler(EventSource_ProjectStarted); 29 | eventSource.ProjectFinished += new ProjectFinishedEventHandler(EventSource_ProjectFinished); 30 | 31 | eventSource.TargetStarted += new TargetStartedEventHandler(EventSource_TargetStarted); 32 | eventSource.TargetFinished += new TargetFinishedEventHandler(EventSource_TargetFinished); 33 | 34 | eventSource.MessageRaised += new BuildMessageEventHandler(EventSource_MessageRaised); 35 | eventSource.WarningRaised += new BuildWarningEventHandler(EventSource_WarningRaised); 36 | eventSource.ErrorRaised += new BuildErrorEventHandler(EventSource_ErrorRaised); 37 | } 38 | 39 | void EventSource_ProjectStarted(object sender, ProjectStartedEventArgs e) 40 | { 41 | Stopwatch = Stopwatch.StartNew(); 42 | WriteMessage(string.Format("Build started {0}.", DateTime.Now)); 43 | } 44 | 45 | void EventSource_ProjectFinished(object sender, ProjectFinishedEventArgs e) 46 | { 47 | Stopwatch.Stop(); 48 | WriteMessage(string.Format("\nBuild {0}.", e.Succeeded ? "succeeded" : "FAILED")); 49 | WriteMessage(string.Format("Time Elapsed {0:00}:{1:00}:{2:00}.{3:00}", 50 | Stopwatch.Elapsed.Hours, 51 | Stopwatch.Elapsed.Minutes, 52 | Stopwatch.Elapsed.Seconds, 53 | Stopwatch.Elapsed.Milliseconds)); 54 | Stopwatch = null; 55 | } 56 | 57 | public void EventSource_TargetStarted(object sender, TargetStartedEventArgs e) 58 | { 59 | if (e.TargetName.Equals("SliceCompile") || IsVerbosityAtLeast(LoggerVerbosity.Detailed)) 60 | { 61 | WriteMessage(string.Format("{0}:", e.TargetName)); 62 | } 63 | Indent += IndentLevel; 64 | } 65 | 66 | public void EventSource_TargetFinished(object sender, TargetFinishedEventArgs e) => Indent -= IndentLevel; 67 | 68 | public void EventSource_MessageRaised(object sender, BuildMessageEventArgs e) 69 | { 70 | if ((e.Importance == MessageImportance.High && IsVerbosityAtLeast(LoggerVerbosity.Minimal)) || 71 | (e.Importance == MessageImportance.Normal && IsVerbosityAtLeast(LoggerVerbosity.Normal)) || 72 | (e.Importance == MessageImportance.Low && IsVerbosityAtLeast(LoggerVerbosity.Detailed))) 73 | { 74 | WriteMessage(e.Message); 75 | } 76 | } 77 | 78 | public void WriteMessage(string message) 79 | { 80 | ThreadHelper.JoinableTaskFactory.Run(async () => 81 | { 82 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 83 | StringBuilder s = new StringBuilder(); 84 | for (int i = 0; i < Indent; ++i) 85 | { 86 | s.Append(" "); 87 | } 88 | s.AppendLine(message); 89 | 90 | OutputPane.Activate(); 91 | OutputPane.OutputString(s.ToString()); 92 | }); 93 | } 94 | 95 | private void OutputTaskItem( 96 | string message, 97 | EnvDTE.vsTaskPriority priority, 98 | string file, 99 | int line, 100 | string description) 101 | { 102 | ThreadHelper.JoinableTaskFactory.Run(async () => 103 | { 104 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 105 | OutputPane.Activate(); 106 | OutputPane.OutputTaskItemString( 107 | message, 108 | priority, 109 | EnvDTE.vsTaskCategories.vsTaskCategoryBuildCompile, 110 | EnvDTE.vsTaskIcon.vsTaskIconCompile, 111 | file, 112 | line, 113 | description, 114 | true); 115 | }); 116 | } 117 | 118 | void EventSource_WarningRaised(object sender, BuildWarningEventArgs e) => 119 | OutputTaskItem( 120 | $"{Path.Combine(Path.GetDirectoryName(e.ProjectFile), e.File)}({e.LineNumber}: warning : {e.Message}", 121 | EnvDTE.vsTaskPriority.vsTaskPriorityMedium, 122 | e.File, 123 | e.LineNumber, 124 | e.Message); 125 | 126 | void EventSource_ErrorRaised(object sender, BuildErrorEventArgs e) => 127 | OutputTaskItem( 128 | $"{Path.Combine(Path.GetDirectoryName(e.ProjectFile), e.File)}({e.LineNumber}): error : {e.Message}", 129 | EnvDTE.vsTaskPriority.vsTaskPriorityHigh, 130 | e.File, 131 | e.LineNumber, 132 | e.Message); 133 | 134 | public override void Shutdown() 135 | { 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /IceBuilder.Shared/Builder.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.Build.Execution; 4 | using Microsoft.VisualStudio; 5 | using Microsoft.VisualStudio.Shell; 6 | using Microsoft.VisualStudio.Shell.Interop; 7 | using Microsoft.Win32.SafeHandles; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Threading; 11 | using MSBuildProject = Microsoft.Build.Evaluation.Project; 12 | 13 | namespace IceBuilder 14 | { 15 | public class Builder 16 | { 17 | private ManualResetEvent BuildAvailableEvent { get; set; } 18 | private IVsBuildManagerAccessor2 BuildManagerAccessor { get; set; } 19 | 20 | public Builder(IVsBuildManagerAccessor2 accessor) => BuildManagerAccessor = accessor; 21 | 22 | public bool Build( 23 | IVsProject project, 24 | BuildCallback buildCallback, 25 | BuildLogger buildLogger, 26 | string platform, 27 | string configuration) 28 | { 29 | return project.WithProject((MSBuildProject msproject) => 30 | { 31 | ThreadHelper.ThrowIfNotOnUIThread(); 32 | 33 | // We need to set this before we acquire the build resources otherwise Msbuild will not see the changes. 34 | bool onlyLogCriticalEvents = msproject.ProjectCollection.OnlyLogCriticalEvents; 35 | msproject.ProjectCollection.Loggers.Add(buildLogger); 36 | msproject.ProjectCollection.OnlyLogCriticalEvents = false; 37 | 38 | int err = BuildManagerAccessor.AcquireBuildResources( 39 | VSBUILDMANAGERRESOURCE.VSBUILDMANAGERRESOURCE_DESIGNTIME | 40 | VSBUILDMANAGERRESOURCE.VSBUILDMANAGERRESOURCE_UITHREAD, 41 | out uint cookie); 42 | 43 | if (err != VSConstants.E_PENDING && err != VSConstants.S_OK) 44 | { 45 | ErrorHandler.ThrowOnFailure(err); 46 | } 47 | 48 | if (err == VSConstants.E_PENDING) 49 | { 50 | msproject.ProjectCollection.Loggers.Remove(buildLogger); 51 | msproject.ProjectCollection.OnlyLogCriticalEvents = onlyLogCriticalEvents; 52 | 53 | BuildAvailableEvent = new ManualResetEvent(false) 54 | { 55 | SafeWaitHandle = new SafeWaitHandle(BuildManagerAccessor.DesignTimeBuildAvailable, false) 56 | }; 57 | 58 | ThreadHelper.JoinableTaskFactory.RunAsync(async () => 59 | { 60 | BuildAvailableEvent.WaitOne(); 61 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 62 | Package.Instance.BuildNextProject(); 63 | }); 64 | return false; 65 | } 66 | else 67 | { 68 | try 69 | { 70 | Dictionary properties = new Dictionary 71 | { 72 | ["Platform"] = platform, 73 | ["Configuration"] = configuration 74 | }; 75 | 76 | BuildRequestData buildRequest = new BuildRequestData( 77 | msproject.FullPath, 78 | properties, 79 | null, 80 | new string[] { "SliceCompile" }, 81 | msproject.ProjectCollection.HostServices, 82 | BuildRequestDataFlags.ProvideProjectStateAfterBuild | 83 | BuildRequestDataFlags.IgnoreExistingProjectState | 84 | BuildRequestDataFlags.ReplaceExistingProjectInstance); 85 | 86 | BuildSubmission submission = BuildManager.DefaultBuildManager.PendBuildRequest(buildRequest); 87 | ErrorHandler.ThrowOnFailure(BuildManagerAccessor.RegisterLogger(submission.SubmissionId, buildLogger)); 88 | buildCallback.BeginBuild(platform, configuration); 89 | 90 | submission.ExecuteAsync(s => 91 | { 92 | ThreadHelper.JoinableTaskFactory.Run(async () => 93 | { 94 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 95 | msproject.ProjectCollection.Loggers.Remove(buildLogger); 96 | msproject.ProjectCollection.OnlyLogCriticalEvents = onlyLogCriticalEvents; 97 | BuildManagerAccessor.ReleaseBuildResources(cookie); 98 | s.BuildManager.ResetCaches(); 99 | BuildManagerAccessor.UnregisterLoggers(s.SubmissionId); 100 | buildCallback.EndBuild(s.BuildResult.OverallResult == BuildResultCode.Success); 101 | }); 102 | }, null); 103 | 104 | return true; 105 | } 106 | catch (Exception) 107 | { 108 | msproject.ProjectCollection.Loggers.Remove(buildLogger); 109 | msproject.ProjectCollection.OnlyLogCriticalEvents = onlyLogCriticalEvents; 110 | BuildManagerAccessor.ReleaseBuildResources(cookie); 111 | throw; 112 | } 113 | } 114 | }, true); 115 | } 116 | } 117 | 118 | public class BuildCallback 119 | { 120 | private readonly IVsProject _project; 121 | private readonly EnvDTE.OutputWindowPane _outputPane; 122 | 123 | public BuildCallback(IVsProject project, EnvDTE.OutputWindowPane outputPane) 124 | { 125 | _project = project; 126 | _outputPane = outputPane; 127 | } 128 | 129 | public void BeginBuild(string platform, string configuration) 130 | { 131 | ThreadHelper.ThrowIfNotOnUIThread(); 132 | _outputPane.OutputString( 133 | string.Format("------ Ice Builder Build started: Project: {0}, Configuration: {1} {2} ------\n", 134 | ProjectUtil.GetProjectName(_project), configuration, platform)); 135 | } 136 | 137 | public void EndBuild(bool succeed) 138 | { 139 | ThreadHelper.ThrowIfNotOnUIThread(); 140 | _outputPane.OutputString( 141 | string.Format("------ Build {0} ------\n\n", succeed ? "succeeded" : "failed")); 142 | Package.Instance.BuildDone(); 143 | } 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /IceBuilder.Shared/CSharpConfigurationView.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio; 4 | using Microsoft.VisualStudio.Shell; 5 | using System; 6 | using System.Drawing; 7 | using System.Windows.Forms; 8 | 9 | namespace IceBuilder 10 | { 11 | public partial class CSharpConfigurationView : UserControl 12 | { 13 | private PropertyPage Page { get; set; } 14 | 15 | public CSharpConfigurationView(PropertyPage page) 16 | { 17 | Page = page; 18 | InitializeComponent(); 19 | } 20 | 21 | public void LoadSettigns(ProjectSettigns settings) 22 | { 23 | ThreadHelper.ThrowIfNotOnUIThread(); 24 | var enabled = settings.IsMSBuildIceBuilderInstalled(); 25 | Enable(enabled); 26 | if (enabled) 27 | { 28 | OutputDir = settings.OutputDir; 29 | IncludeDirectories = settings.IncludeDirectories; 30 | AdditionalOptions = settings.AdditionalOptions; 31 | Dirty = false; 32 | } 33 | } 34 | 35 | private void Enable(bool enabled) 36 | { 37 | txtOutputDir.Enabled = enabled; 38 | txtIncludeDirectories.Enabled = enabled; 39 | txtAdditionalOptions.Enabled = enabled; 40 | btnOutputDirectoryBrowse.Enabled = enabled; 41 | } 42 | 43 | public virtual void Initialize(Control parent, Rectangle rect) 44 | { 45 | SetBounds(rect.X, rect.Y, rect.Width, rect.Height); 46 | Parent = parent; 47 | } 48 | 49 | public int ProcessAccelerator(ref Message keyboardMessage) 50 | { 51 | if (FromHandle(keyboardMessage.HWnd).PreProcessMessage(ref keyboardMessage)) 52 | { 53 | return VSConstants.S_OK; 54 | } 55 | return VSConstants.S_FALSE; 56 | } 57 | 58 | public readonly uint PageStatusDirty = 0x1; 59 | public readonly uint PageStatusClean = 0x4; 60 | public bool _dirty; 61 | public bool Dirty 62 | { 63 | get =>_dirty; 64 | set 65 | { 66 | ThreadHelper.ThrowIfNotOnUIThread(); 67 | _dirty = value; 68 | if (Page.PageSite != null) 69 | { 70 | Page.PageSite.OnStatusChange(value ? PageStatusDirty : PageStatusClean); 71 | } 72 | } 73 | } 74 | 75 | public string OutputDir 76 | { 77 | get => txtOutputDir.Text; 78 | set => txtOutputDir.Text = value; 79 | } 80 | 81 | public string AdditionalOptions 82 | { 83 | get => txtAdditionalOptions.Text; 84 | set => txtAdditionalOptions.Text = value; 85 | } 86 | 87 | public string IncludeDirectories 88 | { 89 | get => txtIncludeDirectories.Text; 90 | set => txtIncludeDirectories.Text = value; 91 | } 92 | 93 | private void BtnOutputDirectoryBrowse_Click(object sender, EventArgs e) 94 | { 95 | ThreadHelper.ThrowIfNotOnUIThread(); 96 | string projectDir = Page.Project.GetProjectBaseDirectory(); 97 | string selectedPath = UIUtil.BrowserFolderDialog(Handle, "Output Directory", projectDir); 98 | if (!string.IsNullOrEmpty(selectedPath)) 99 | { 100 | selectedPath = FileUtil.RelativePath(projectDir, selectedPath); 101 | OutputDir = string.IsNullOrEmpty(selectedPath) ? "." : selectedPath; 102 | if (!txtOutputDir.Text.Equals(Page.Settings.OutputDir)) 103 | { 104 | Dirty = IsDirty(); 105 | } 106 | } 107 | } 108 | 109 | private void OutputDirectory_Leave(object sender, EventArgs e) 110 | { 111 | ThreadHelper.ThrowIfNotOnUIThread(); 112 | if (!txtOutputDir.Text.Equals(Page.Settings.OutputDir)) 113 | { 114 | Dirty = IsDirty(); 115 | } 116 | } 117 | 118 | private void AdditionalOptions_Leave(object sender, EventArgs e) 119 | { 120 | ThreadHelper.ThrowIfNotOnUIThread(); 121 | if (!txtAdditionalOptions.Text.Equals(Page.Settings.AdditionalOptions)) 122 | { 123 | Dirty = IsDirty(); 124 | } 125 | } 126 | 127 | private void TxtOutputDir_TextChanged(object sender, EventArgs e) 128 | { 129 | ThreadHelper.ThrowIfNotOnUIThread(); 130 | if (!txtOutputDir.Text.Equals(Page.Settings.OutputDir)) 131 | { 132 | Dirty = IsDirty(); 133 | } 134 | } 135 | 136 | private void TxtIncludeDirectories_TextChanged(object sender, EventArgs e) 137 | { 138 | ThreadHelper.ThrowIfNotOnUIThread(); 139 | if (!txtIncludeDirectories.Text.Equals(Page.Settings.IncludeDirectories)) 140 | { 141 | Dirty = IsDirty(); 142 | } 143 | } 144 | 145 | private void TxtAdditionalOptions_TextChanged(object sender, EventArgs e) 146 | { 147 | ThreadHelper.ThrowIfNotOnUIThread(); 148 | if (!txtAdditionalOptions.Text.Equals(Page.Settings.AdditionalOptions)) 149 | { 150 | Dirty = IsDirty(); 151 | } 152 | } 153 | 154 | private bool IsDirty() => 155 | !txtOutputDir.Text.Equals(Page.Settings.OutputDir) || 156 | !txtIncludeDirectories.Text.Equals(Page.Settings.IncludeDirectories) || 157 | !txtAdditionalOptions.Text.Equals(Page.Settings.AdditionalOptions); 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /IceBuilder.Shared/CSharpConfigurationView.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 17, 17 125 | 126 | -------------------------------------------------------------------------------- /IceBuilder.Shared/DTEUtil.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio; 4 | using Microsoft.VisualStudio.Shell; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Runtime.InteropServices; 10 | 11 | namespace IceBuilder 12 | { 13 | public class DTEUtil 14 | { 15 | public static uint GetItemId(object value) 16 | { 17 | if (value == null) 18 | { 19 | return VSConstants.VSITEMID_NIL; 20 | } 21 | if (value is int) 22 | { 23 | return (uint)(int)value; 24 | } 25 | if (value is uint) 26 | { 27 | return (uint)value; 28 | } 29 | if (value is short) 30 | { 31 | return (uint)(short)value; 32 | } 33 | if (value is long) 34 | { 35 | return (uint)(long)value; 36 | } 37 | return VSConstants.VSITEMID_NIL; 38 | } 39 | 40 | public static IVsProject GetProject(string path) 41 | { 42 | ThreadHelper.ThrowIfNotOnUIThread(); 43 | List projects = GetProjects(); 44 | return projects.FirstOrDefault(p => p.GetProjectFullPath().Equals(path)); 45 | } 46 | 47 | public static List GetProjects() 48 | { 49 | ThreadHelper.ThrowIfNotOnUIThread(); 50 | Guid guid = Guid.Empty; 51 | uint flags = (uint)__VSENUMPROJFLAGS.EPF_ALLPROJECTS; 52 | ErrorHandler.ThrowOnFailure( 53 | Package.Instance.IVsSolution.GetProjectEnum(flags, guid, out IEnumHierarchies enumHierarchies)); 54 | 55 | List projects = new List(); 56 | 57 | IVsHierarchy[] hierarchies = new IVsHierarchy[1]; 58 | uint sz; 59 | do 60 | { 61 | ErrorHandler.ThrowOnFailure(enumHierarchies.Next(1, hierarchies, out sz)); 62 | if (sz > 0) 63 | { 64 | if (hierarchies[0] is IVsProject project) 65 | { 66 | projects.Add(project); 67 | } 68 | } 69 | } 70 | while (sz == 1); 71 | return projects; 72 | } 73 | 74 | public static void GetSubProjects(IVsProject p, ref List projects) 75 | { 76 | ThreadHelper.ThrowIfNotOnUIThread(); 77 | IVsHierarchy h = p as IVsHierarchy; 78 | // Get the first visible child node 79 | int result = h.GetProperty( 80 | VSConstants.VSITEMID_ROOT, 81 | (int)__VSHPROPID.VSHPROPID_FirstVisibleChild, 82 | out object value); 83 | while (ErrorHandler.Succeeded(result)) 84 | { 85 | uint child = GetItemId(value); 86 | if (child == VSConstants.VSITEMID_NIL) 87 | { 88 | // No more nodes 89 | break; 90 | } 91 | else 92 | { 93 | GetSubProjects(h, child, ref projects); 94 | 95 | // Get the next visible sibling node 96 | result = h.GetProperty(child, (int)__VSHPROPID.VSHPROPID_NextVisibleSibling, out value); 97 | } 98 | } 99 | } 100 | 101 | public static void GetSubProjects(IVsHierarchy h, uint itemId, ref List projects) 102 | { 103 | ThreadHelper.ThrowIfNotOnUIThread(); 104 | Guid nestedGuid = typeof(IVsHierarchy).GUID; 105 | int result = h.GetNestedHierarchy(itemId, ref nestedGuid, out IntPtr nestedValue, out uint nestedId); 106 | if (ErrorHandler.Succeeded(result) && nestedValue != IntPtr.Zero && nestedId == VSConstants.VSITEMID_ROOT) 107 | { 108 | // Get the nested hierachy 109 | Marshal.Release(nestedValue); 110 | if (Marshal.GetObjectForIUnknown(nestedValue) is IVsProject project) 111 | { 112 | projects.Add(project); 113 | GetSubProjects(project, ref projects); 114 | } 115 | } 116 | } 117 | 118 | public static IVsProject GetSelectedProject() 119 | { 120 | ThreadHelper.ThrowIfNotOnUIThread(); 121 | IVsHierarchy hier = null; 122 | var sp = new ServiceProvider( 123 | Package.Instance.DTE as Microsoft.VisualStudio.OLE.Interop.IServiceProvider); 124 | 125 | // There isn't an open project. 126 | if (sp.GetService(typeof(IVsMonitorSelection)) is IVsMonitorSelection selectionMonitor) 127 | { 128 | _ = ErrorHandler.ThrowOnFailure( 129 | selectionMonitor.GetCurrentSelection(out IntPtr ppHier, out _, out _, out IntPtr ppSC)); 130 | 131 | if (ppHier != IntPtr.Zero) 132 | { 133 | hier = (IVsHierarchy)Marshal.GetObjectForIUnknown(ppHier); 134 | Marshal.Release(ppHier); 135 | } 136 | 137 | if (ppSC != IntPtr.Zero) 138 | { 139 | Marshal.Release(ppSC); 140 | } 141 | } 142 | return hier as IVsProject; 143 | } 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /IceBuilder.Shared/IceBuilder.Shared.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | 28b94594-c9a1-4212-a538-6d0ac85d6993 7 | 8 | 9 | IceBuilder.Shared 10 | 11 | 12 | 13 | 14 | 15 | UserControl 16 | 17 | 18 | CSharpConfigurationView.cs 19 | 20 | 21 | 22 | 23 | UserControl 24 | 25 | 26 | IceHomeEditor.cs 27 | 28 | 29 | Component 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Form 45 | 46 | 47 | UpgradeDialog.cs 48 | 49 | 50 | Form 51 | 52 | 53 | UpgradeDialogProgress.cs 54 | 55 | 56 | 57 | 58 | CSharpConfigurationView.cs 59 | 60 | 61 | IceHomeEditor.cs 62 | 63 | 64 | UpgradeDialog.cs 65 | 66 | 67 | UpgradeDialogProgress.cs 68 | 69 | 70 | Designer 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /IceBuilder.Shared/IceBuilder.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 28b94594-c9a1-4212-a538-6d0ac85d6993 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /IceBuilder.Shared/IceHomeEditor.Designer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | namespace IceBuilder 4 | { 5 | partial class IceHomeEditor 6 | { 7 | /// 8 | /// Required designer variable. 9 | /// 10 | private System.ComponentModel.IContainer components = null; 11 | 12 | /// 13 | /// Clean up any resources being used. 14 | /// 15 | /// true if managed resources should be disposed; otherwise, false. 16 | protected override void Dispose(bool disposing) 17 | { 18 | if (disposing && (components != null)) 19 | { 20 | components.Dispose(); 21 | } 22 | base.Dispose(disposing); 23 | } 24 | 25 | #region Component Designer generated code 26 | 27 | /// 28 | /// Required method for Designer support - do not modify 29 | /// the contents of this method with the code editor. 30 | /// 31 | private void InitializeComponent() 32 | { 33 | this.txtIceHome = new System.Windows.Forms.TextBox(); 34 | this.btnIceHome = new System.Windows.Forms.Button(); 35 | this.lblInfo = new System.Windows.Forms.Label(); 36 | this.lblIceHome = new System.Windows.Forms.Label(); 37 | this.autoBuild = new System.Windows.Forms.CheckBox(); 38 | this.SuspendLayout(); 39 | // 40 | // txtIceHome 41 | // 42 | this.txtIceHome.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 43 | | System.Windows.Forms.AnchorStyles.Right))); 44 | this.txtIceHome.Location = new System.Drawing.Point(3, 42); 45 | this.txtIceHome.Name = "txtIceHome"; 46 | this.txtIceHome.Size = new System.Drawing.Size(283, 20); 47 | this.txtIceHome.TabIndex = 49; 48 | // 49 | // btnIceHome 50 | // 51 | this.btnIceHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 52 | this.btnIceHome.Location = new System.Drawing.Point(289, 41); 53 | this.btnIceHome.Margin = new System.Windows.Forms.Padding(0); 54 | this.btnIceHome.Name = "btnIceHome"; 55 | this.btnIceHome.Size = new System.Drawing.Size(29, 22); 56 | this.btnIceHome.TabIndex = 50; 57 | this.btnIceHome.Text = "..."; 58 | this.btnIceHome.UseVisualStyleBackColor = true; 59 | this.btnIceHome.Click += new System.EventHandler(this.BtnIceHome_Click); 60 | // 61 | // lblInfo 62 | // 63 | this.lblInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 64 | | System.Windows.Forms.AnchorStyles.Right))); 65 | this.lblInfo.Location = new System.Drawing.Point(4, 75); 66 | this.lblInfo.Name = "lblInfo"; 67 | this.lblInfo.Size = new System.Drawing.Size(315, 29); 68 | this.lblInfo.TabIndex = 51; 69 | // 70 | // lblIceHome 71 | // 72 | this.lblIceHome.AutoSize = true; 73 | this.lblIceHome.Location = new System.Drawing.Point(3, 26); 74 | this.lblIceHome.Name = "lblIceHome"; 75 | this.lblIceHome.Size = new System.Drawing.Size(161, 13); 76 | this.lblIceHome.TabIndex = 48; 77 | this.lblIceHome.Text = "Ice home directory (Ice 3.6 only):"; 78 | // 79 | // autoBuild 80 | // 81 | this.autoBuild.AutoSize = true; 82 | this.autoBuild.Location = new System.Drawing.Point(3, 3); 83 | this.autoBuild.Name = "autoBuild"; 84 | this.autoBuild.Size = new System.Drawing.Size(217, 17); 85 | this.autoBuild.TabIndex = 53; 86 | this.autoBuild.Text = "Compile Slice files immediately after save"; 87 | this.autoBuild.UseVisualStyleBackColor = true; 88 | // 89 | // IceHomeEditor 90 | // 91 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 92 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 93 | this.Controls.Add(this.autoBuild); 94 | this.Controls.Add(this.lblInfo); 95 | this.Controls.Add(this.txtIceHome); 96 | this.Controls.Add(this.lblIceHome); 97 | this.Controls.Add(this.btnIceHome); 98 | this.Margin = new System.Windows.Forms.Padding(0); 99 | this.Name = "IceHomeEditor"; 100 | this.Size = new System.Drawing.Size(319, 211); 101 | this.ResumeLayout(false); 102 | this.PerformLayout(); 103 | 104 | } 105 | 106 | #endregion 107 | 108 | private System.Windows.Forms.TextBox txtIceHome; 109 | private System.Windows.Forms.Button btnIceHome; 110 | private System.Windows.Forms.Label lblInfo; 111 | private System.Windows.Forms.Label lblIceHome; 112 | private System.Windows.Forms.CheckBox autoBuild; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /IceBuilder.Shared/IceHomeEditor.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell; 4 | using System; 5 | using System.IO; 6 | using System.Windows.Forms; 7 | 8 | namespace IceBuilder 9 | { 10 | public partial class IceHomeEditor : UserControl 11 | { 12 | public IceHomeEditor() => InitializeComponent(); 13 | 14 | internal IceOptionsPage optionsPage; 15 | 16 | public string IceHome 17 | { 18 | get => txtIceHome.Text; 19 | set 20 | { 21 | txtIceHome.Text = value; 22 | lblInfo.Text = ""; 23 | } 24 | } 25 | 26 | public bool SetIceHome(string path) 27 | { 28 | if (!string.IsNullOrEmpty(path)) 29 | { 30 | if (File.Exists(Path.Combine(path, "config", "ice.props")) || 31 | File.Exists(Path.Combine(path, "config", "icebuilder.props"))) 32 | { 33 | txtIceHome.Text = path; 34 | } 35 | else 36 | { 37 | lblInfo.Text = $"Invalid Ice home directory:\r\n\"{path}\"\r\n"; 38 | return false; 39 | } 40 | } 41 | return true; 42 | } 43 | 44 | private void BtnIceHome_Click(object sender, EventArgs e) 45 | { 46 | ThreadHelper.ThrowIfNotOnUIThread(); 47 | string selectedPath = UIUtil.BrowserFolderDialog(Handle, "Select Folder", 48 | string.IsNullOrEmpty(txtIceHome.Text) ? 49 | Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) : txtIceHome.Text); 50 | 51 | lblInfo.Text = ""; 52 | SetIceHome(selectedPath); 53 | } 54 | 55 | public bool AutoBuilding 56 | { 57 | set => autoBuild.Checked = value; 58 | get => autoBuild.Checked; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /IceBuilder.Shared/IceHomeEditor.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /IceBuilder.Shared/IceOptionsPage.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell; 4 | using System; 5 | using System.ComponentModel; 6 | using System.Runtime.InteropServices; 7 | using System.Windows.Forms; 8 | 9 | namespace IceBuilder 10 | { 11 | [ClassInterface(ClassInterfaceType.AutoDual)] 12 | [Guid("1D9ECCF3-5D2F-4112-9B25-264596873DC9")] 13 | [Category("Projects and Solutions")] 14 | public class IceOptionsPage : DialogPage 15 | { 16 | IceHomeEditor Editor { get; set; } 17 | 18 | public IceOptionsPage() => Editor = new IceHomeEditor(); 19 | 20 | protected override IWin32Window Window 21 | { 22 | get 23 | { 24 | Editor.optionsPage = this; 25 | return Editor; 26 | } 27 | } 28 | 29 | protected override void OnApply(PageApplyEventArgs e) 30 | { 31 | ThreadHelper.ThrowIfNotOnUIThread(); 32 | try 33 | { 34 | if (Editor.SetIceHome(Editor.IceHome)) 35 | { 36 | Package.Instance.SetIceHome(Editor.IceHome); 37 | } 38 | else 39 | { 40 | e.ApplyBehavior = ApplyKind.CancelNoNavigate; 41 | } 42 | 43 | Package.Instance.SetAutoBuilding(Editor.AutoBuilding); 44 | } 45 | catch (Exception ex) 46 | { 47 | Package.UnexpectedExceptionWarning(ex); 48 | } 49 | } 50 | 51 | protected override void OnActivate(CancelEventArgs e) 52 | { 53 | ThreadHelper.ThrowIfNotOnUIThread(); 54 | try 55 | { 56 | Editor.IceHome = Package.Instance.GetIceHome(); 57 | Editor.AutoBuilding = Package.Instance.AutoBuilding; 58 | } 59 | catch (Exception ex) 60 | { 61 | Package.UnexpectedExceptionWarning(ex); 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /IceBuilder.Shared/Project.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio; 4 | using Microsoft.VisualStudio.Shell; 5 | using Microsoft.VisualStudio.Shell.Flavor; 6 | using Microsoft.VisualStudio.Shell.Interop; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Runtime.InteropServices; 11 | 12 | namespace IceBuilder 13 | { 14 | public class Project : FlavoredProjectBase 15 | { 16 | public static readonly string BuildEventsPropertyPageGUID = "{1e78f8db-6c07-4d61-a18f-7514010abd56}"; 17 | 18 | protected override void SetInnerProject(IntPtr innerIUnknown) 19 | { 20 | ThreadHelper.ThrowIfNotOnUIThread(); 21 | object objectForIUnknown = Marshal.GetObjectForIUnknown(innerIUnknown); 22 | if (serviceProvider == null) 23 | { 24 | serviceProvider = Package; 25 | } 26 | base.SetInnerProject(innerIUnknown); 27 | _cfgProvider = objectForIUnknown as IVsProjectFlavorCfgProvider; 28 | } 29 | 30 | protected override void Close() 31 | { 32 | base.Close(); 33 | if (_cfgProvider != null) 34 | { 35 | if (Marshal.IsComObject(_cfgProvider)) 36 | { 37 | Marshal.ReleaseComObject(_cfgProvider); 38 | } 39 | _cfgProvider = null; 40 | } 41 | } 42 | 43 | protected override int GetProperty(uint itemId, int propId, out object property) 44 | { 45 | if (propId == (int)__VSHPROPID2.VSHPROPID_PropertyPagesCLSIDList) 46 | { 47 | string propertyPageGUID = typeof(PropertyPage).GUID.ToString("B"); 48 | ErrorHandler.ThrowOnFailure(base.GetProperty(itemId, propId, out property)); 49 | property = string.Format("{0};{1}", propertyPageGUID, property); 50 | return VSConstants.S_OK; 51 | } 52 | else if (propId == (int)__VSHPROPID2.VSHPROPID_PriorityPropertyPagesCLSIDList) 53 | { 54 | string propertyPageGUID = typeof(PropertyPage).GUID.ToString("B"); 55 | ErrorHandler.ThrowOnFailure(base.GetProperty(itemId, propId, out property)); 56 | List sorted = new List(); 57 | property.ToString() 58 | .Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries) 59 | .ToList() 60 | .ForEach(token => 61 | { 62 | // Keep all other pages in is current position 63 | if (!token.Equals(propertyPageGUID, StringComparison.CurrentCultureIgnoreCase)) 64 | { 65 | sorted.Add(token); 66 | } 67 | 68 | // Add our property pages after the build events property page 69 | if (token.Equals(BuildEventsPropertyPageGUID, StringComparison.CurrentCultureIgnoreCase)) 70 | { 71 | sorted.Add(propertyPageGUID); 72 | } 73 | }); 74 | property = string.Join(";", sorted); 75 | return VSConstants.S_OK; 76 | } 77 | return base.GetProperty(itemId, propId, out property); 78 | } 79 | 80 | protected IVsProjectFlavorCfgProvider _cfgProvider = null; 81 | internal Microsoft.VisualStudio.Shell.Package Package { get; set; } 82 | } 83 | 84 | public class ProjectOld : FlavoredProjectBase 85 | { 86 | protected override void SetInnerProject(IntPtr innerIUnknown) 87 | { 88 | if (serviceProvider == null) 89 | { 90 | serviceProvider = Package.Instance; 91 | } 92 | base.SetInnerProject(innerIUnknown); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /IceBuilder.Shared/ProjectFactory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell.Flavor; 4 | using System; 5 | using System.Runtime.InteropServices; 6 | 7 | namespace IceBuilder 8 | { 9 | [Guid(Package.IceBuilderNewFlavorGuid)] 10 | public class ProjectFactory : FlavoredProjectFactoryBase 11 | { 12 | protected override object PreCreateForOuter(IntPtr IUnknown) 13 | { 14 | Project project = new Project(); 15 | project.Package = Package.Instance; 16 | return project; 17 | } 18 | } 19 | 20 | [Guid(Package.IceBuilderOldFlavorGuid)] 21 | public class ProjectFactoryOld : FlavoredProjectFactoryBase 22 | { 23 | protected override object PreCreateForOuter(IntPtr IUnknown) => new ProjectOld(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /IceBuilder.Shared/ProjectSettigns.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell.Interop; 4 | 5 | namespace IceBuilder 6 | { 7 | public class ProjectSettigns 8 | { 9 | public ProjectSettigns(IVsProject project) => _project = project; 10 | 11 | public void Load() 12 | { 13 | OutputDir = _project.GetDefaultItemMetadata(ItemMetadataNames.OutputDir, false); 14 | IncludeDirectories = _project.GetDefaultItemMetadata(ItemMetadataNames.IncludeDirectories, false); 15 | AdditionalOptions = _project.GetDefaultItemMetadata(ItemMetadataNames.AdditionalOptions, false); 16 | } 17 | 18 | public void Save() 19 | { 20 | _project.SetItemMetadata(ItemMetadataNames.OutputDir, OutputDir); 21 | _project.SetItemMetadata(ItemMetadataNames.IncludeDirectories, IncludeDirectories); 22 | _project.SetItemMetadata(ItemMetadataNames.AdditionalOptions, AdditionalOptions); 23 | } 24 | 25 | public bool IsMSBuildIceBuilderInstalled() => _project.IsMSBuildIceBuilderInstalled(); 26 | 27 | public string OutputDir { get; set; } 28 | 29 | public string IncludeDirectories { get; set; } 30 | 31 | public string AdditionalOptions { get; set; } 32 | 33 | public IVsProject _project; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /IceBuilder.Shared/PropertyNames.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | namespace IceBuilder 4 | { 5 | public class ItemMetadataNames 6 | { 7 | // Common properties 8 | public static readonly string OutputDir = "OutputDir"; 9 | public static readonly string IncludeDirectories = "IncludeDirectories"; 10 | public static readonly string AdditionalOptions = "AdditionalOptions"; 11 | 12 | // C++ properties 13 | public static readonly string HeaderOutputDir = "HeaderOutputDir"; 14 | public static readonly string HeaderExt = "HeaderExt"; 15 | public static readonly string SourceExt = "SourceExt"; 16 | public static readonly string BaseDirectoryForGeneratedInclude = "BaseDirectoryForGeneratedInclude"; 17 | } 18 | public class PropertyNames 19 | { 20 | public class Old 21 | { 22 | // Common properties 23 | public static readonly string OutputDir = "IceBuilderOutputDir"; 24 | public static readonly string AllowIcePrefix = "IceBuilderAllowIcePrefix"; 25 | public static readonly string Checksum = "IceBuilderChecksum"; 26 | public static readonly string Stream = "IceBuilderStream"; 27 | public static readonly string Underscore = "IceBuilderUnderscore"; 28 | public static readonly string IncludeDirectories = "IceBuilderIncludeDirectories"; 29 | public static readonly string AdditionalOptions = "IceBuilderAdditionalOptions"; 30 | 31 | // C++ properties 32 | public static readonly string HeaderOutputDir = "IceBuilderHeaderOutputDir"; 33 | public static readonly string HeaderExt = "IceBuilderHeaderExt"; 34 | public static readonly string SourceExt = "IceBuilderSourceExt"; 35 | public static readonly string DLLExport = "IceBuilderDLLExport"; 36 | public static readonly string BaseDirectoryForGeneratedInclude = "IceBuilderBaseDirectoryForGeneratedInclude"; 37 | 38 | // C# properties 39 | public static readonly string Tie = "IceBuilderTie"; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /IceBuilder.Shared/PropertyPage.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio; 4 | using Microsoft.VisualStudio.OLE.Interop; 5 | using Microsoft.VisualStudio.Shell; 6 | using Microsoft.VisualStudio.Shell.Interop; 7 | using System; 8 | using System.Drawing; 9 | using System.Runtime.InteropServices; 10 | using System.Windows.Forms; 11 | 12 | namespace IceBuilder 13 | { 14 | 15 | [Guid(PropertyPageGUID)] 16 | public class PropertyPage : IPropertyPage2, IPropertyPage, IDisposable 17 | { 18 | public const string PropertyPageGUID = "1E2800FE-37C5-4FD3-BC2E-969342EE08AF"; 19 | 20 | public CSharpConfigurationView ConfigurationView { get; private set; } 21 | 22 | public IDisposable ProjectSubscription { get; private set; } 23 | 24 | public PropertyPage() => 25 | ConfigurationView = new CSharpConfigurationView(this); 26 | 27 | public void Dispose() 28 | { 29 | Dispose(true); 30 | GC.SuppressFinalize(this); 31 | } 32 | 33 | protected virtual void Dispose(bool disposing) 34 | { 35 | if (ConfigurationView != null) 36 | { 37 | ConfigurationView.Dispose(); 38 | ConfigurationView = null; 39 | } 40 | } 41 | 42 | public void Activate(IntPtr parentHandle, RECT[] pRect, int modal) 43 | { 44 | ThreadHelper.ThrowIfNotOnUIThread(); 45 | try 46 | { 47 | RECT rect = pRect[0]; 48 | ConfigurationView.Initialize(Control.FromHandle(parentHandle), 49 | Rectangle.FromLTRB(rect.left, rect.top, rect.right, rect.bottom)); 50 | } 51 | catch (Exception ex) 52 | { 53 | Package.UnexpectedExceptionWarning(ex); 54 | } 55 | } 56 | 57 | public void Apply() 58 | { 59 | ThreadHelper.ThrowIfNotOnUIThread(); 60 | try 61 | { 62 | Settings.OutputDir = ConfigurationView.OutputDir; 63 | Settings.IncludeDirectories = ConfigurationView.IncludeDirectories; 64 | Settings.AdditionalOptions = ConfigurationView.AdditionalOptions; 65 | Settings.Save(); 66 | ConfigurationView.Dirty = false; 67 | } 68 | catch (Exception ex) 69 | { 70 | Package.UnexpectedExceptionWarning(ex); 71 | } 72 | } 73 | 74 | public void Deactivate() 75 | { 76 | ThreadHelper.ThrowIfNotOnUIThread(); 77 | try 78 | { 79 | if (ConfigurationView != null) 80 | { 81 | ConfigurationView.Dispose(); 82 | ConfigurationView = null; 83 | } 84 | } 85 | catch (Exception ex) 86 | { 87 | Package.UnexpectedExceptionWarning(ex); 88 | } 89 | } 90 | 91 | public void EditProperty(int DISPID) 92 | { 93 | } 94 | 95 | public void GetPageInfo(PROPPAGEINFO[] pageInfo) 96 | { 97 | ThreadHelper.ThrowIfNotOnUIThread(); 98 | try 99 | { 100 | PROPPAGEINFO proppageinfo; 101 | proppageinfo.cb = (uint)Marshal.SizeOf(typeof(PROPPAGEINFO)); 102 | proppageinfo.dwHelpContext = 0; 103 | proppageinfo.pszDocString = null; 104 | proppageinfo.pszHelpFile = null; 105 | proppageinfo.pszTitle = "Ice Builder"; 106 | proppageinfo.SIZE.cx = ConfigurationView.Size.Width; 107 | proppageinfo.SIZE.cy = ConfigurationView.Size.Height; 108 | pageInfo[0] = proppageinfo; 109 | } 110 | catch (Exception ex) 111 | { 112 | Package.UnexpectedExceptionWarning(ex); 113 | } 114 | } 115 | 116 | public void Help(string pszHelpDir) 117 | { 118 | } 119 | 120 | public int IsPageDirty() => 121 | ConfigurationView.Dirty ? VSConstants.S_OK : VSConstants.S_FALSE; 122 | 123 | public void Move(RECT[] pRect) 124 | { 125 | ThreadHelper.ThrowIfNotOnUIThread(); 126 | try 127 | { 128 | Rectangle rect = Rectangle.FromLTRB(pRect[0].left, pRect[0].top, pRect[0].right, pRect[0].bottom); 129 | ConfigurationView.Location = new Point(rect.X, rect.Y); 130 | ConfigurationView.Size = new Size(rect.Width, rect.Height); 131 | } 132 | catch (Exception ex) 133 | { 134 | Package.UnexpectedExceptionWarning(ex); 135 | } 136 | } 137 | 138 | public ProjectSettigns Settings { get; private set; } 139 | 140 | public IVsProject Project { get; private set; } 141 | 142 | public void SetObjects(uint cObjects, object[] objects) 143 | { 144 | ThreadHelper.ThrowIfNotOnUIThread(); 145 | try 146 | { 147 | if (objects != null && cObjects > 0) 148 | { 149 | if (objects[0] is IVsBrowseObject browse) 150 | { 151 | browse.GetProjectItem(out IVsHierarchy hier, out uint id); 152 | Project = hier as IVsProject; 153 | if (Project != null) 154 | { 155 | Settings = new ProjectSettigns(Project); 156 | Settings.Load(); 157 | ConfigurationView.LoadSettigns(Settings); 158 | ProjectSubscription = Project.OnProjectUpdate(() => 159 | { 160 | if (!ConfigurationView.Dirty) 161 | { 162 | Settings.Load(); 163 | ConfigurationView.LoadSettigns(Settings); 164 | } 165 | }); 166 | } 167 | } 168 | } 169 | } 170 | catch (Exception ex) 171 | { 172 | Package.UnexpectedExceptionWarning(ex); 173 | } 174 | } 175 | 176 | public IPropertyPageSite PageSite { get; private set; } 177 | 178 | public void SetPageSite(IPropertyPageSite site) => PageSite = site; 179 | 180 | public const int SW_SHOW = 5; 181 | public const int SW_SHOWNORMAL = 1; 182 | public const int SW_HIDE = 0; 183 | 184 | public void Show(uint show) 185 | { 186 | switch (show) 187 | { 188 | case SW_HIDE: 189 | { 190 | ConfigurationView.Hide(); 191 | break; 192 | } 193 | case SW_SHOW: 194 | case SW_SHOWNORMAL: 195 | { 196 | ConfigurationView.Show(); 197 | break; 198 | } 199 | default: 200 | { 201 | break; 202 | } 203 | } 204 | } 205 | 206 | public int TranslateAccelerator(MSG[] pMsg) 207 | { 208 | Message message = Message.Create(pMsg[0].hwnd, (int)pMsg[0].message, pMsg[0].wParam, pMsg[0].lParam); 209 | int hr = ConfigurationView.ProcessAccelerator(ref message); 210 | pMsg[0].lParam = message.LParam; 211 | pMsg[0].wParam = message.WParam; 212 | return hr; 213 | } 214 | 215 | int IPropertyPage.Apply() 216 | { 217 | ThreadHelper.ThrowIfNotOnUIThread(); 218 | Apply(); 219 | return VSConstants.S_OK; 220 | } 221 | } 222 | } 223 | -------------------------------------------------------------------------------- /IceBuilder.Shared/SolutionEventHandler.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell; 4 | using Microsoft.VisualStudio.Shell.Interop; 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | namespace IceBuilder 9 | { 10 | public class SolutionEventHandler : IVsSolutionEvents3, IVsSolutionLoadEvents 11 | { 12 | public void BeginTrack() => 13 | ThreadHelper.JoinableTaskFactory.Run(async () => 14 | { 15 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 16 | Package.Instance.IVsSolution.AdviseSolutionEvents(this, out _cookie); 17 | }); 18 | 19 | public void EndTrack() => 20 | ThreadHelper.JoinableTaskFactory.Run(async () => 21 | { 22 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 23 | Package.Instance.IVsSolution.UnadviseSolutionEvents(_cookie); 24 | }); 25 | 26 | public int OnAfterBackgroundSolutionLoadComplete() 27 | { 28 | ThreadHelper.JoinableTaskFactory.Run(async () => 29 | { 30 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 31 | try 32 | { 33 | Package.Instance.RunningDocumentTableEventHandler.BeginTrack(); 34 | Package.Instance.InitializeProjects(DTEUtil.GetProjects()); 35 | } 36 | catch (Exception ex) 37 | { 38 | Package.UnexpectedExceptionWarning(ex); 39 | } 40 | }); 41 | return 0; 42 | } 43 | 44 | public int OnAfterLoadProjectBatch(bool fIsBackgroundIdleBatch) => 0; 45 | 46 | public int OnBeforeBackgroundSolutionLoadBegins() => 0; 47 | 48 | public int OnBeforeLoadProjectBatch(bool fIsBackgroundIdleBatch) => 0; 49 | 50 | public int OnBeforeOpenSolution(string pszSolutionFilename) => 0; 51 | 52 | public int OnQueryBackgroundLoadProjectBatch(out bool pfShouldDelayLoadToNextIdle) 53 | { 54 | pfShouldDelayLoadToNextIdle = false; 55 | return 0; 56 | } 57 | 58 | public int OnAfterCloseSolution(object pUnkReserved) 59 | { 60 | ThreadHelper.JoinableTaskFactory.Run(async () => 61 | { 62 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 63 | try 64 | { 65 | Package.Instance.RunningDocumentTableEventHandler.EndTrack(); 66 | } 67 | catch (Exception ex) 68 | { 69 | Package.UnexpectedExceptionWarning(ex); 70 | } 71 | }); 72 | return 0; 73 | } 74 | 75 | public int OnAfterClosingChildren(IVsHierarchy child) => 0; 76 | 77 | public int OnAfterLoadProject(IVsHierarchy hierarchyOld, IVsHierarchy hierarchyNew) 78 | { 79 | ThreadHelper.JoinableTaskFactory.Run(async () => 80 | { 81 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 82 | try 83 | { 84 | var project = hierarchyNew as IVsProject; 85 | if (project != null) 86 | { 87 | Package.Instance.InitializeProjects(new List(new IVsProject[] { project })); 88 | } 89 | } 90 | catch (Exception ex) 91 | { 92 | Package.UnexpectedExceptionWarning(ex); 93 | } 94 | }); 95 | return 0; 96 | } 97 | 98 | public int OnAfterMergeSolution(object pUnkReserved) => 0; 99 | public int OnAfterOpeningChildren(IVsHierarchy hierarchy) => 0; 100 | public int OnAfterOpenProject(IVsHierarchy hierarchy, int fAdded) => 0; 101 | public int OnAfterOpenSolution(object pUnkReserved, int fNewSolution) => 0; 102 | public int OnBeforeCloseProject(IVsHierarchy pHierarchy, int fRemoved) => 0; 103 | public int OnBeforeCloseSolution(object pUnkReserved) => 0; 104 | public int OnBeforeClosingChildren(IVsHierarchy pHierarchy) => 0; 105 | public int OnBeforeOpeningChildren(IVsHierarchy pHierarchy) => 0; 106 | public int OnBeforeUnloadProject(IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy) => 0; 107 | 108 | public int OnQueryCloseProject(IVsHierarchy pHierarchy, int fRemoving, ref int pfCancel) 109 | { 110 | pfCancel = 0; 111 | return 0; 112 | } 113 | 114 | public int OnQueryCloseSolution(object pUnkReserved, ref int pfCancel) 115 | { 116 | pfCancel = 0; 117 | return 0; 118 | } 119 | 120 | public int OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel) 121 | { 122 | pfCancel = 0; 123 | return 0; 124 | } 125 | 126 | uint _cookie; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /IceBuilder.Shared/StreamReader.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Diagnostics; 4 | 5 | namespace IceBuilder 6 | { 7 | // This class is used to asynchronously read the output of a Slice compiler process. 8 | public class StreamReader 9 | { 10 | public void AppendData(object sendingProcess, DataReceivedEventArgs outLine) 11 | { 12 | if (outLine.Data != null) 13 | { 14 | _data += outLine.Data + "\n"; 15 | } 16 | } 17 | 18 | public string Data() => _data; 19 | 20 | private string _data = ""; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UIUtil.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio; 4 | using Microsoft.VisualStudio.Shell; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | using System; 7 | using System.Runtime.InteropServices; 8 | using System.Windows.Forms; 9 | 10 | namespace IceBuilder 11 | { 12 | class UIUtil 13 | { 14 | public static void ShowErrorDialog(string title, string message) => 15 | MessageBox.Show( 16 | message, 17 | title, 18 | MessageBoxButtons.OK, 19 | MessageBoxIcon.Error, 20 | MessageBoxDefaultButton.Button1, 21 | 0); 22 | 23 | // Open the Visual Studio native dialog for selecting a directory 24 | public static string BrowserFolderDialog(IntPtr owner, string title, string initialDirectory) 25 | { 26 | ThreadHelper.ThrowIfNotOnUIThread(); 27 | IVsUIShell shell = Package.Instance.UIShell; 28 | 29 | VSBROWSEINFOW[] browseInfo = new VSBROWSEINFOW[1]; 30 | browseInfo[0].lStructSize = (uint)Marshal.SizeOf(typeof(VSBROWSEINFOW)); 31 | browseInfo[0].pwzInitialDir = initialDirectory; 32 | browseInfo[0].pwzDlgTitle = title; 33 | browseInfo[0].hwndOwner = owner; 34 | browseInfo[0].nMaxDirName = 260; 35 | IntPtr pDirName = Marshal.AllocCoTaskMem(520); 36 | browseInfo[0].pwzDirName = pDirName; 37 | 38 | try 39 | { 40 | int hr = shell.GetDirectoryViaBrowseDlg(browseInfo); 41 | if (hr == VSConstants.OLE_E_PROMPTSAVECANCELLED) 42 | { 43 | return string.Empty; 44 | } 45 | ErrorHandler.ThrowOnFailure(hr); 46 | return Marshal.PtrToStringAuto(browseInfo[0].pwzDirName); 47 | } 48 | finally 49 | { 50 | if (pDirName != IntPtr.Zero) 51 | { 52 | Marshal.FreeCoTaskMem(pDirName); 53 | } 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UpgradeDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace IceBuilder 2 | { 3 | partial class UpgradeDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.Cancel = new System.Windows.Forms.Button(); 32 | this.OKButton = new System.Windows.Forms.Button(); 33 | this.description = new System.Windows.Forms.RichTextBox(); 34 | this.SuspendLayout(); 35 | // 36 | // Cancel 37 | // 38 | this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 39 | this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 40 | this.Cancel.Location = new System.Drawing.Point(537, 253); 41 | this.Cancel.Name = "Cancel"; 42 | this.Cancel.Size = new System.Drawing.Size(75, 23); 43 | this.Cancel.TabIndex = 2; 44 | this.Cancel.Text = "Cancel"; 45 | this.Cancel.UseVisualStyleBackColor = true; 46 | this.Cancel.Click += new System.EventHandler(this.CancelButton_Clicked); 47 | // 48 | // OKButton 49 | // 50 | this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 51 | this.OKButton.Location = new System.Drawing.Point(456, 253); 52 | this.OKButton.Name = "OKButton"; 53 | this.OKButton.Size = new System.Drawing.Size(75, 23); 54 | this.OKButton.TabIndex = 3; 55 | this.OKButton.Text = "OK"; 56 | this.OKButton.UseVisualStyleBackColor = true; 57 | this.OKButton.Click += new System.EventHandler(this.OKButton_Clicked); 58 | // 59 | // description 60 | // 61 | this.description.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 62 | | System.Windows.Forms.AnchorStyles.Left) 63 | | System.Windows.Forms.AnchorStyles.Right))); 64 | this.description.BackColor = System.Drawing.SystemColors.Control; 65 | this.description.BorderStyle = System.Windows.Forms.BorderStyle.None; 66 | this.description.Location = new System.Drawing.Point(16, 12); 67 | this.description.Name = "description"; 68 | this.description.ReadOnly = true; 69 | this.description.Size = new System.Drawing.Size(594, 232); 70 | this.description.TabIndex = 6; 71 | this.description.Text = ""; 72 | this.description.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.description_LinkClicked); 73 | // 74 | // UpgradeDialog 75 | // 76 | this.AcceptButton = this.OKButton; 77 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 78 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 79 | this.AutoSize = true; 80 | this.CancelButton = this.Cancel; 81 | this.ClientSize = new System.Drawing.Size(624, 288); 82 | this.ControlBox = false; 83 | this.Controls.Add(this.description); 84 | this.Controls.Add(this.OKButton); 85 | this.Controls.Add(this.Cancel); 86 | this.Name = "UpgradeDialog"; 87 | this.Text = "Ice Builder Project Upgrade"; 88 | this.ResumeLayout(false); 89 | 90 | } 91 | 92 | #endregion 93 | private System.Windows.Forms.Button Cancel; 94 | private System.Windows.Forms.Button OKButton; 95 | private System.Windows.Forms.RichTextBox description; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UpgradeDialog.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell; 4 | using Microsoft.VisualStudio.Shell.Interop; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.IO; 8 | using System.Windows.Forms; 9 | 10 | namespace IceBuilder 11 | { 12 | public partial class UpgradeDialog : Form 13 | { 14 | public UpgradeDialog() 15 | { 16 | InitializeComponent(); 17 | description.Rtf = File.ReadAllText(Path.Combine(Package.ResourcesDirectory, "upgrade.rtf")); 18 | } 19 | 20 | private void OKButton_Clicked(object sender, EventArgs e) 21 | { 22 | ThreadHelper.ThrowIfNotOnUIThread(); 23 | Hide(); 24 | UpgradeDialogProgress proggressDialog = new UpgradeDialogProgress(Projects.Count); 25 | ProjectConverter.Upgrade(Projects, proggressDialog); 26 | proggressDialog.StartPosition = FormStartPosition.CenterParent; 27 | proggressDialog.ShowDialog(this); 28 | Close(); 29 | } 30 | 31 | private void CancelButton_Clicked(object sender, EventArgs e) 32 | { 33 | Close(); 34 | } 35 | 36 | public Dictionary Projects 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | private void description_LinkClicked(object sender, LinkClickedEventArgs e) 43 | { 44 | System.Diagnostics.Process.Start(e.LinkText); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UpgradeDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UpgradeDialogProgress.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace IceBuilder 2 | { 3 | partial class UpgradeDialogProgress 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.ProgressBar = new System.Windows.Forms.ProgressBar(); 32 | this.InfoLabel = new System.Windows.Forms.Label(); 33 | this.cancelButton = new System.Windows.Forms.Button(); 34 | this.SuspendLayout(); 35 | // 36 | // ProgressBar 37 | // 38 | this.ProgressBar.Location = new System.Drawing.Point(12, 39); 39 | this.ProgressBar.Name = "ProgressBar"; 40 | this.ProgressBar.Size = new System.Drawing.Size(433, 23); 41 | this.ProgressBar.TabIndex = 0; 42 | // 43 | // InfoLabel 44 | // 45 | this.InfoLabel.Location = new System.Drawing.Point(12, 9); 46 | this.InfoLabel.Name = "InfoLabel"; 47 | this.InfoLabel.Size = new System.Drawing.Size(433, 23); 48 | this.InfoLabel.TabIndex = 2; 49 | // 50 | // cancelButton 51 | // 52 | this.cancelButton.Location = new System.Drawing.Point(191, 69); 53 | this.cancelButton.Name = "cancelButton"; 54 | this.cancelButton.Size = new System.Drawing.Size(75, 23); 55 | this.cancelButton.TabIndex = 3; 56 | this.cancelButton.Text = "Cancel"; 57 | this.cancelButton.UseVisualStyleBackColor = true; 58 | this.cancelButton.Click += new System.EventHandler(this.CancelButton_Clicked); 59 | // 60 | // UpgradeDialogProgress 61 | // 62 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 63 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 64 | this.AutoSize = true; 65 | this.CancelButton = this.cancelButton; 66 | this.ClientSize = new System.Drawing.Size(457, 105); 67 | this.ControlBox = false; 68 | this.Controls.Add(this.cancelButton); 69 | this.Controls.Add(this.InfoLabel); 70 | this.Controls.Add(this.ProgressBar); 71 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 72 | this.Name = "UpgradeDialogProgress"; 73 | this.Text = "Ice Builder Project Upgrade"; 74 | this.ResumeLayout(false); 75 | 76 | } 77 | 78 | #endregion 79 | 80 | private System.Windows.Forms.ProgressBar ProgressBar; 81 | private System.Windows.Forms.Label InfoLabel; 82 | private System.Windows.Forms.Button cancelButton; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UpgradeDialogProgress.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace IceBuilder 7 | { 8 | public interface IUpgradeProgressCallback 9 | { 10 | bool Canceled { get; set; } 11 | void Finished(); 12 | void ReportProgress(string project, int index); 13 | } 14 | 15 | public partial class UpgradeDialogProgress : Form, IUpgradeProgressCallback 16 | { 17 | public UpgradeDialogProgress(int total) 18 | { 19 | InitializeComponent(); 20 | _canceled = false; 21 | ProgressBar.Maximum = total; 22 | } 23 | 24 | private void CancelButton_Clicked(object sender, EventArgs e) 25 | { 26 | Canceled = true; 27 | } 28 | 29 | private bool _canceled; 30 | public bool Canceled 31 | { 32 | get 33 | { 34 | lock (_lock) 35 | { 36 | return _canceled; 37 | } 38 | } 39 | set 40 | { 41 | lock (_lock) 42 | { 43 | _canceled = value; 44 | if (_canceled) 45 | { 46 | Close(); 47 | } 48 | } 49 | } 50 | } 51 | 52 | public void ReportProgress(string project, int index) 53 | { 54 | InfoLabel.Text = string.Format("Upgrading project: {0}", project); 55 | ProgressBar.Value = index; 56 | } 57 | 58 | public void Finished() => Close(); 59 | 60 | private readonly object _lock = new object(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /IceBuilder.Shared/UpgradeDialogProgress.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /IceBuilder.Shared/VSPackage.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Ice Builder 122 | 123 | 124 | Ice Builder manages the compilation of Slice (.ice) files to C++ and C#. It compiles your Slice files with slice2cpp and slice2cs, and allows you to specify the parameters provided to these compilers. 125 | 126 | 127 | Projects and Solutions 128 | 129 | 130 | ..\assets\Package.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 131 | 132 | -------------------------------------------------------------------------------- /IceBuilder.VS2022.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.14.35906.104 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{077FF067-76D0-4C84-8DEF-37D8BDEF5515}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3C742979-4218-4AEA-9988-6758FEAEFD48}" 9 | ProjectSection(SolutionItems) = preProject 10 | CHANGELOG.md = CHANGELOG.md 11 | README.md = README.md 12 | EndProjectSection 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpSliceItemTemplate", "IceBuilderTemplates\CSharpSliceItemTemplate\CSharpSliceItemTemplate.csproj", "{6D243563-186E-4FCC-B1FC-74E97B9A5942}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VCSliceItemTemplate", "IceBuilderTemplates\VCSliceItemTemplate\VCSliceItemTemplate.csproj", "{5B778A54-EFB1-4085-9CA2-49C83AC352B5}" 17 | EndProject 18 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IceBuilder.Shared", "IceBuilder.Shared\IceBuilder.Shared.shproj", "{28B94594-C9A1-4212-A538-6D0AC85D6993}" 19 | EndProject 20 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "IceBuilder_Common.Shared", "IceBuilder_Common.Shared\IceBuilder_Common.Shared.shproj", "{449835BC-2889-45FB-BF79-BCC700FB5998}" 21 | EndProject 22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IceBuilder_VS2022", "IceBuilder_VS2022\IceBuilder_VS2022.csproj", "{C998637F-98DD-45D3-AF85-47D883697E54}" 23 | EndProject 24 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IceBuilder.Next", "IceBuilder.Next\IceBuilder.Next.csproj", "{A51B4AA4-714B-4E23-A8C1-E0759BF5B609}" 25 | ProjectSection(ProjectDependencies) = postProject 26 | {C998637F-98DD-45D3-AF85-47D883697E54} = {C998637F-98DD-45D3-AF85-47D883697E54} 27 | EndProjectSection 28 | EndProject 29 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IceBuilder_Common.Next", "IceBuilder_Common.Next\IceBuilder_Common.Next.csproj", "{C014D4BF-6EB0-409E-AD9B-5B783450200F}" 30 | EndProject 31 | Global 32 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 33 | Debug|Any CPU = Debug|Any CPU 34 | Release|Any CPU = Release|Any CPU 35 | EndGlobalSection 36 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 37 | {6D243563-186E-4FCC-B1FC-74E97B9A5942}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {6D243563-186E-4FCC-B1FC-74E97B9A5942}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {6D243563-186E-4FCC-B1FC-74E97B9A5942}.Release|Any CPU.ActiveCfg = Release|Any CPU 40 | {6D243563-186E-4FCC-B1FC-74E97B9A5942}.Release|Any CPU.Build.0 = Release|Any CPU 41 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 42 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5}.Debug|Any CPU.Build.0 = Debug|Any CPU 43 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5}.Release|Any CPU.ActiveCfg = Release|Any CPU 44 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5}.Release|Any CPU.Build.0 = Release|Any CPU 45 | {C998637F-98DD-45D3-AF85-47D883697E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 46 | {C998637F-98DD-45D3-AF85-47D883697E54}.Debug|Any CPU.Build.0 = Debug|Any CPU 47 | {C998637F-98DD-45D3-AF85-47D883697E54}.Release|Any CPU.ActiveCfg = Release|Any CPU 48 | {C998637F-98DD-45D3-AF85-47D883697E54}.Release|Any CPU.Build.0 = Release|Any CPU 49 | {A51B4AA4-714B-4E23-A8C1-E0759BF5B609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 50 | {A51B4AA4-714B-4E23-A8C1-E0759BF5B609}.Debug|Any CPU.Build.0 = Debug|Any CPU 51 | {A51B4AA4-714B-4E23-A8C1-E0759BF5B609}.Release|Any CPU.ActiveCfg = Release|Any CPU 52 | {A51B4AA4-714B-4E23-A8C1-E0759BF5B609}.Release|Any CPU.Build.0 = Release|Any CPU 53 | {C014D4BF-6EB0-409E-AD9B-5B783450200F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 54 | {C014D4BF-6EB0-409E-AD9B-5B783450200F}.Debug|Any CPU.Build.0 = Debug|Any CPU 55 | {C014D4BF-6EB0-409E-AD9B-5B783450200F}.Release|Any CPU.ActiveCfg = Release|Any CPU 56 | {C014D4BF-6EB0-409E-AD9B-5B783450200F}.Release|Any CPU.Build.0 = Release|Any CPU 57 | EndGlobalSection 58 | GlobalSection(SolutionProperties) = preSolution 59 | HideSolutionNode = FALSE 60 | EndGlobalSection 61 | GlobalSection(NestedProjects) = preSolution 62 | {6D243563-186E-4FCC-B1FC-74E97B9A5942} = {077FF067-76D0-4C84-8DEF-37D8BDEF5515} 63 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5} = {077FF067-76D0-4C84-8DEF-37D8BDEF5515} 64 | EndGlobalSection 65 | GlobalSection(ExtensibilityGlobals) = postSolution 66 | SolutionGuid = {B135092D-36A8-4857-AB75-612DFD51CC8A} 67 | EndGlobalSection 68 | GlobalSection(SharedMSBuildProjectFiles) = preSolution 69 | IceBuilder.Shared\IceBuilder.Shared.projitems*{28b94594-c9a1-4212-a538-6d0ac85d6993}*SharedItemsImports = 13 70 | IceBuilder_Common.Shared\IceBuilder_Common.Shared.projitems*{449835bc-2889-45fb-bf79-bcc700fb5998}*SharedItemsImports = 13 71 | IceBuilder.Shared\IceBuilder.Shared.projitems*{a51b4aa4-714b-4e23-a8c1-e0759bf5b609}*SharedItemsImports = 4 72 | IceBuilder_Common.Shared\IceBuilder_Common.Shared.projitems*{c014d4bf-6eb0-409e-ad9b-5b783450200f}*SharedItemsImports = 4 73 | EndGlobalSection 74 | EndGlobal 75 | -------------------------------------------------------------------------------- /IceBuilder/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ice Builder 6 | Ice Builder manages the compilation of Slice (.ice) files to C++ and C#. It compiles your Slice files with slice2cpp and slice2cs, and allows you to specify the parameters provided to these compilers. 7 | https://github.com/zeroc-ice/ice-builder-visualstudio 8 | Resources\LICENSE.rtf 9 | Resources\Package.png 10 | Resources\Package.png 11 | ZeroC, Ice, Slice 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /IceBuilderTemplates/CSharpSliceItemTemplate/CSharpSliceItemTemplate.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 16.0 5 | 11.0 6 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 7 | 8 | 9 | 10 | 11 | 12.0 12 | 13 | 14 | 15 | 16 | Debug 17 | AnyCPU 18 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | {6D243563-186E-4FCC-B1FC-74E97B9A5942} 20 | Library 21 | Properties 22 | CSharpSliceItemTemplate 23 | CSharpSliceItemTemplate 24 | v4.7.2 25 | 512 26 | false 27 | false 28 | false 29 | false 30 | false 31 | false 32 | false 33 | false 34 | false 35 | false 36 | 37 | 38 | true 39 | full 40 | false 41 | bin\Debug\ 42 | DEBUG;TRACE 43 | prompt 44 | 4 45 | 46 | 47 | pdbonly 48 | true 49 | bin\Release\ 50 | TRACE 51 | prompt 52 | 4 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | Designer 71 | 72 | 73 | 74 | 75 | 82 | -------------------------------------------------------------------------------- /IceBuilderTemplates/CSharpSliceItemTemplate/CSharpSliceItemTemplate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/IceBuilderTemplates/CSharpSliceItemTemplate/CSharpSliceItemTemplate.ico -------------------------------------------------------------------------------- /IceBuilderTemplates/CSharpSliceItemTemplate/CSharpSliceItemTemplate.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Slice File 5 | Empty Slice File 6 | CSharpSliceItemTemplate.ico 7 | 12be1e27-61db-4434-b488-921a54226ec8 8 | CSharp 9 | Slice 10 | 2.0 11 | 1 12 | New.ice 13 | 14 | 15 | New.ice 16 | 17 | 18 | -------------------------------------------------------------------------------- /IceBuilderTemplates/CSharpSliceItemTemplate/New.ice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/IceBuilderTemplates/CSharpSliceItemTemplate/New.ice -------------------------------------------------------------------------------- /IceBuilderTemplates/CSharpSliceItemTemplate/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | 5 | [assembly: AssemblyTitle("CSharpSliceItemTemplate")] 6 | [assembly: AssemblyDescription("Slice Item Template for CSharp Projects")] 7 | [assembly: AssemblyCompany("ZeroC, Inc.")] 8 | [assembly: AssemblyProduct("Ice Visual Studio Extension")] 9 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 10 | [assembly: AssemblyVersion("6.0.4")] 11 | [assembly: AssemblyDelaySign(false)] 12 | -------------------------------------------------------------------------------- /IceBuilderTemplates/VCSliceItemTemplate/New.ice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/IceBuilderTemplates/VCSliceItemTemplate/New.ice -------------------------------------------------------------------------------- /IceBuilderTemplates/VCSliceItemTemplate/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | 5 | [assembly: AssemblyTitle("VCSliceItemTemplate")] 6 | [assembly: AssemblyDescription("Slice Item Template for VC Projects")] 7 | [assembly: AssemblyCompany("ZeroC, Inc.")] 8 | [assembly: AssemblyProduct("Ice Visual Studio Extension")] 9 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 10 | [assembly: AssemblyVersion("6.0.3")] 11 | [assembly: AssemblyDelaySign(false)] 12 | -------------------------------------------------------------------------------- /IceBuilderTemplates/VCSliceItemTemplate/VCSliceItemTemplate.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 16.0 5 | 11.0 6 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 7 | 8 | 9 | 10 | 11 | 12.0 12 | 13 | 14 | 15 | 16 | Debug 17 | AnyCPU 18 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | {5B778A54-EFB1-4085-9CA2-49C83AC352B5} 20 | Library 21 | Properties 22 | VCSliceItemTemplate 23 | VCSliceItemTemplate 24 | v4.7.2 25 | 512 26 | false 27 | false 28 | false 29 | false 30 | false 31 | false 32 | false 33 | false 34 | false 35 | false 36 | 37 | 38 | true 39 | full 40 | false 41 | bin\Debug\ 42 | DEBUG;TRACE 43 | prompt 44 | 4 45 | 46 | 47 | pdbonly 48 | true 49 | bin\Release\ 50 | TRACE 51 | prompt 52 | 4 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | Designer 71 | 72 | 73 | 74 | 75 | 82 | -------------------------------------------------------------------------------- /IceBuilderTemplates/VCSliceItemTemplate/VCSliceItemTemplate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/IceBuilderTemplates/VCSliceItemTemplate/VCSliceItemTemplate.ico -------------------------------------------------------------------------------- /IceBuilderTemplates/VCSliceItemTemplate/VCSliceItemTemplate.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Slice File 5 | Empty Slice File 6 | VCSliceItemTemplate.ico 7 | ff2254e8-4853-40bc-8ec4-4822c6b7db88 8 | VC 9 | 1 10 | New.ice 11 | 12 | 13 | New.ice 14 | 15 | 16 | -------------------------------------------------------------------------------- /IceBuilder_Common.Next/IceBuilder_Common.Next.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C014D4BF-6EB0-409E-AD9B-5B783450200F} 8 | Library 9 | Properties 10 | IceBuilder_Common.Next 11 | IceBuilder_Common.Next 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | compile; build; native; contentfiles; analyzers; buildtransitive 44 | 45 | 46 | runtime; build; native; contentfiles; analyzers; buildtransitive 47 | all 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /IceBuilder_Common.Next/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder.Common")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisible(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/DTEProjectExtension.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | namespace IceBuilder 4 | { 5 | public enum IceBuilderProjectType 6 | { 7 | None, 8 | CppProjectType, 9 | CsharpProjectType 10 | } 11 | 12 | public static class DTEProjectExtension 13 | { 14 | public static VSLangProj.References GetProjectRererences(this EnvDTE.Project project) => 15 | ((VSLangProj.VSProject)project.Object).References; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/FileUtil.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System; 4 | using System.IO; 5 | 6 | namespace IceBuilder 7 | { 8 | public class FileUtil 9 | { 10 | public static string RelativePath(string mainDirPath, string absoluteFilePath) 11 | { 12 | if (string.IsNullOrEmpty(absoluteFilePath)) 13 | { 14 | return ""; 15 | } 16 | 17 | if (string.IsNullOrEmpty(mainDirPath)) 18 | { 19 | return absoluteFilePath; 20 | } 21 | 22 | if (!Path.IsPathRooted(absoluteFilePath)) 23 | { 24 | return absoluteFilePath; 25 | } 26 | 27 | mainDirPath = Path.GetFullPath(mainDirPath).Trim(Path.DirectorySeparatorChar); 28 | absoluteFilePath = Path.GetFullPath(absoluteFilePath).Trim(Path.DirectorySeparatorChar); 29 | 30 | string[] firstPathParts = mainDirPath.Split(Path.DirectorySeparatorChar); 31 | string[] secondPathParts = absoluteFilePath.Split(Path.DirectorySeparatorChar); 32 | 33 | int sameCounter = 0; 34 | while (sameCounter < Math.Min(firstPathParts.Length, secondPathParts.Length) && 35 | string.Equals( 36 | firstPathParts[sameCounter], 37 | secondPathParts[sameCounter], 38 | StringComparison.CurrentCultureIgnoreCase)) 39 | { 40 | ++sameCounter; 41 | } 42 | 43 | // Different volumes, relative path not possible. 44 | if (sameCounter == 0) 45 | { 46 | return absoluteFilePath; 47 | } 48 | 49 | // Pop back up to the common point. 50 | string newPath = ""; 51 | for (int i = sameCounter; i < firstPathParts.Length; ++i) 52 | { 53 | newPath += ".." + Path.DirectorySeparatorChar; 54 | } 55 | 56 | // Descend to the target. 57 | for (int i = sameCounter; i < secondPathParts.Length; ++i) 58 | { 59 | newPath += secondPathParts[i] + Path.DirectorySeparatorChar; 60 | } 61 | return newPath.TrimEnd(Path.DirectorySeparatorChar); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/GeneratedFileSet.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace IceBuilder 6 | { 7 | public struct GeneratedFileSet 8 | { 9 | // Slice file name 10 | public string filename; 11 | 12 | // Each entry in this dictionary represents a generated source file and the list of configurations for which 13 | // it is build. 14 | public Dictionary> sources; 15 | 16 | // Each entry in this dictionary represents a generated C++ header file and the list of configurations for 17 | // which it is build. It is always empty for non C++ projects. 18 | public Dictionary> headers; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/IVsProjectHelper.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell.Interop; 4 | using System; 5 | using System.Collections.Generic; 6 | using MSProject = Microsoft.Build.Evaluation.Project; 7 | 8 | namespace IceBuilder 9 | { 10 | public interface IVsProjectHelper 11 | { 12 | void UpdateProject(IVsProject project, Action action, bool switchToMainThread = false); 13 | 14 | T WithProject(IVsProject project, Func func, bool switchToMainThread = false); 15 | 16 | IDisposable OnProjectUpdate(IVsProject project, Action onProjectUpdate); 17 | 18 | string GetItemMetadata(IVsProject project, string identity, string name, string defaultValue = ""); 19 | 20 | string GetDefaultItemMetadata(IVsProject project, string name, bool evaluated, string defaultValue = ""); 21 | 22 | void SetItemMetadata(IVsProject project, string itemType, string label, string name, string value); 23 | 24 | void SetItemMetadata(IVsProject project, string name, string value); 25 | 26 | void SetGeneratedItemCustomMetadata( 27 | IVsProject project, 28 | string slice, 29 | string generated, 30 | List excludedConfigurations = null); 31 | 32 | void RemoveGeneratedItemCustomMetadata(IVsProject project, List paths); 33 | 34 | void AddFromFile(IVsProject project, string file); 35 | 36 | void RemoveGeneratedItemDuplicates(IVsProject project); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/IVsProjectHelperFactory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | namespace IceBuilder 4 | { 5 | public interface IVsProjectHelperFactory 6 | { 7 | IVCUtil VCUtil { get; } 8 | INuGet NuGet { get; } 9 | IVsProjectHelper ProjectHelper { get; } 10 | } 11 | 12 | public class ProjectFactoryHelperInstance 13 | { 14 | public static void Init(IVCUtil vcutil, INuGet nuget, IVsProjectHelper projectHelper) 15 | { 16 | VCUtil = vcutil; 17 | NuGet = nuget; 18 | ProjectHelper = projectHelper; 19 | } 20 | 21 | public static IVCUtil VCUtil { get; private set; } 22 | 23 | public static INuGet NuGet { get; private set; } 24 | 25 | public static IVsProjectHelper ProjectHelper { get; private set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/IceBuilder_Common.Shared.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | 449835bc-2889-45fb-bf79-bcc700fb5998 7 | 8 | 9 | IceBuilder_Common.Shared 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/IceBuilder_Common.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 449835bc-2889-45fb-bf79-bcc700fb5998 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/NuGet.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | namespace IceBuilder 4 | { 5 | public delegate void NuGetBatchEnd(); 6 | 7 | public interface INuGet 8 | { 9 | void OnNugetBatchEnd(NuGetBatchEnd batchEnd); 10 | void Restore(EnvDTE.Project project); 11 | bool IsPackageInstalled(EnvDTE.Project project, string packageId); 12 | void InstallLatestPackage(EnvDTE.Project project, string packageId); 13 | 14 | bool IsUserConsentGranted(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/PackageInitializationException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System; 4 | 5 | public class PackageInitializationException : ApplicationException 6 | { 7 | public PackageInitializationException() 8 | { 9 | } 10 | 11 | public PackageInitializationException(string reason) : base(reason) 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /IceBuilder_Common.Shared/VCUtil.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell.Interop; 4 | 5 | namespace IceBuilder 6 | { 7 | public interface IVCUtil 8 | { 9 | bool SetupSliceFilter(EnvDTE.Project project); 10 | string Evaluate(EnvDTE.Configuration config, string value); 11 | 12 | void AddGenerated(IVsProject project, string path, string filter, string platform, string configuration); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /IceBuilder_Common/IceBuilder_Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9D33C9B1-4436-4C37-BACF-89165396B12D} 8 | Library 9 | Properties 10 | IceBuilder 11 | IceBuilder.Common 12 | v4.6 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | False 36 | 37 | 38 | True 39 | 40 | 41 | True 42 | 43 | 44 | True 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | True 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /IceBuilder_Common/NuGetI.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.ComponentModelHost; 4 | using Microsoft.VisualStudio.Shell; 5 | using NuGet.VisualStudio; 6 | 7 | namespace IceBuilder 8 | { 9 | public class NuGetI : INuGet 10 | { 11 | IVsPackageInstallerEvents PackageInstallerEvents { get; set; } 12 | 13 | IVsPackageInstallerServices PackageInstallerServices { get; set; } 14 | IVsPackageInstaller PackageInstaller { get; set; } 15 | 16 | IVsPackageRestorer PackageRestorer { get; set; } 17 | 18 | NuGetBatchEnd BatchEnd { get; set; } 19 | 20 | public NuGetI() 21 | { 22 | var model = Package.GetGlobalService(typeof(SComponentModel)) as IComponentModel; 23 | PackageInstallerServices = model.GetService(); 24 | PackageInstaller = model.GetService(); 25 | PackageRestorer = model.GetService(); 26 | PackageInstallerEvents = model.GetService(); 27 | PackageInstallerEvents.PackageReferenceAdded += PackageInstallerEvents_PackageReferenceAdded; 28 | } 29 | 30 | private void PackageInstallerEvents_PackageReferenceAdded(IVsPackageMetadata metadata) => 31 | ThreadHelper.JoinableTaskFactory.Run(async () => 32 | { 33 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 34 | BatchEnd?.Invoke(); 35 | }); 36 | 37 | public bool IsPackageInstalled(EnvDTE.Project project, string packageId) => 38 | PackageInstallerServices.IsPackageInstalled(project, packageId); 39 | 40 | public void InstallLatestPackage(EnvDTE.Project project, string packageId) => 41 | PackageInstaller.InstallPackage(null, project, packageId, (string)null, false); 42 | 43 | public void Restore(EnvDTE.Project project) => 44 | PackageRestorer.RestorePackages(project); 45 | 46 | void INuGet.OnNugetBatchEnd(NuGetBatchEnd batchEnd) => 47 | BatchEnd = batchEnd; 48 | 49 | public bool IsUserConsentGranted() => 50 | PackageRestorer.IsUserConsentGranted(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /IceBuilder_Common/ProjectDesignerPageProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.ProjectSystem; 4 | using Microsoft.VisualStudio.ProjectSystem.VS.Properties; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Collections.Immutable; 8 | using System.Composition; 9 | using System.Threading.Tasks; 10 | 11 | namespace IceBuilder 12 | { 13 | class SliceCompilePageMetadata : IPageMetadata 14 | { 15 | string IPageMetadata.Name => "Ice Builder"; 16 | 17 | Guid IPageMetadata.PageGuid => new Guid("1E2800FE-37C5-4FD3-BC2E-969342EE08AF"); 18 | 19 | int IPageMetadata.PageOrder => 3; 20 | 21 | bool IPageMetadata.HasConfigurationCondition => false; 22 | } 23 | 24 | [Export(typeof(IVsProjectDesignerPageProvider))] 25 | [AppliesTo("SliceCompile")] 26 | internal class ProjectDesignerPageProvider : IVsProjectDesignerPageProvider 27 | { 28 | public Task> GetPagesAsync() 29 | { 30 | return Task.FromResult((IReadOnlyCollection)ImmutableArray.Create(SliceCompile)); 31 | } 32 | 33 | private static SliceCompilePageMetadata SliceCompile = new SliceCompilePageMetadata(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /IceBuilder_Common/ProjectHelperFactoryI.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | namespace IceBuilder 4 | { 5 | public class ProjectHelperFactoryI : IVsProjectHelperFactory 6 | { 7 | public IVCUtil VCUtil => new VCUtilI(); 8 | public INuGet NuGet => new NuGetI(); 9 | public IVsProjectHelper ProjectHelper => new ProjectHelper(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IceBuilder_Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder.Common")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisible(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder_Common/VCUtilI.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using Microsoft.VisualStudio.Shell.Interop; 4 | using Microsoft.VisualStudio.VCProjectEngine; 5 | using System; 6 | using System.IO; 7 | 8 | namespace IceBuilder 9 | { 10 | public class VCUtilI : IVCUtil 11 | { 12 | public bool SetupSliceFilter(EnvDTE.Project dteProject) 13 | { 14 | VCProject project = dteProject.Object as VCProject; 15 | IVCCollection filters = (IVCCollection)project.Filters; 16 | foreach (VCFilter f in filters) 17 | { 18 | if (f.Name == "Slice Files") 19 | { 20 | if (string.IsNullOrEmpty(f.Filter) || f.Filter != "ice") 21 | { 22 | f.Filter = "ice"; 23 | return true; 24 | } 25 | return false; 26 | } 27 | } 28 | 29 | VCFilter filter = (VCFilter)project.AddFilter("Slice Files"); 30 | filter.Filter = "ice"; 31 | return true; 32 | } 33 | 34 | public VCFilter FindOrCreateFilter(VCFilter parent, string name) 35 | { 36 | IVCCollection filters = (IVCCollection)parent.Filters; 37 | foreach (VCFilter f in filters) 38 | { 39 | if (f.Name == name) 40 | { 41 | return f; 42 | } 43 | } 44 | return (VCFilter)parent.AddFilter(name); 45 | } 46 | 47 | public VCFile FindFile(VCProject project, string name) 48 | { 49 | IVCCollection files = (IVCCollection)project.Files; 50 | foreach (VCFile file in files) 51 | { 52 | if (name == file.RelativePath) 53 | { 54 | return file; 55 | } 56 | } 57 | return null; 58 | } 59 | 60 | public VCFilter FindOrCreateFilter(VCProject parent, string name) 61 | { 62 | IVCCollection filters = (IVCCollection)parent.Filters; 63 | foreach (VCFilter f in filters) 64 | { 65 | if (f.Name == name) 66 | { 67 | return f; 68 | } 69 | } 70 | return (VCFilter)parent.AddFilter(name); 71 | } 72 | 73 | public string Evaluate(EnvDTE.Configuration dteConfig, string value) 74 | { 75 | EnvDTE.Project dteProject = dteConfig.Owner as EnvDTE.Project; 76 | VCProject project = dteProject.Object as VCProject; 77 | VCConfiguration config = (VCConfiguration)(project.Configurations as IVCCollection).Item(dteConfig.ConfigurationName + "|" + dteConfig.PlatformName); 78 | return config.Evaluate(value); 79 | } 80 | 81 | public void AddGeneratedFile(IVsProject project, VCFilter filter, string path, EnvDTE.Configuration config) 82 | { 83 | VSDOCUMENTPRIORITY[] priority = new VSDOCUMENTPRIORITY[1]; 84 | project.IsDocumentInProject(path, out int found, priority, out uint _); 85 | if (found == 0) 86 | { 87 | if (!Directory.Exists(Path.GetDirectoryName(path))) 88 | { 89 | Directory.CreateDirectory(Path.GetDirectoryName(path)); 90 | } 91 | 92 | if (!File.Exists(path)) 93 | { 94 | File.Create(path).Dispose(); 95 | } 96 | 97 | if (config == null) 98 | { 99 | filter.AddFile(path); 100 | } 101 | else 102 | { 103 | filter = FindOrCreateFilter(filter, config.PlatformName); 104 | filter = FindOrCreateFilter(filter, config.ConfigurationName); 105 | VCFile file = (VCFile)filter.AddFile(path); 106 | VCFileConfiguration[] configurations = (VCFileConfiguration[])file.FileConfigurations; 107 | foreach (VCFileConfiguration c in configurations) 108 | { 109 | VCConfiguration projectConfiguration = (VCConfiguration)c.ProjectConfiguration; 110 | VCPlatform projectPlatform = (VCPlatform)projectConfiguration.Platform; 111 | if (projectConfiguration.ConfigurationName != config.ConfigurationName || projectPlatform.Name != config.PlatformName) 112 | { 113 | c.ExcludedFromBuild = true; 114 | } 115 | } 116 | } 117 | 118 | try 119 | { 120 | // Remove the file otherwise it will be considered up to date. 121 | File.Delete(path); 122 | } 123 | catch (Exception) 124 | { 125 | } 126 | } 127 | } 128 | 129 | public void AddGenerated(IVsProject project, string path, string filter, string platform, string configuration) 130 | { 131 | var dteproject = project.GetDTEProject(); 132 | var vcproject = dteproject.Object as VCProject; 133 | var parent = FindOrCreateFilter(vcproject, filter); 134 | parent = FindOrCreateFilter(parent, platform); 135 | parent = FindOrCreateFilter(parent, configuration); 136 | var file = FindFile(vcproject, path); 137 | if (file != null) 138 | { 139 | file.Move(parent); 140 | } 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /IceBuilder_VS2015/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder.VS2015")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisible(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder_VS2015/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /IceBuilder_VS2017/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder.VS2017")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisible(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder_VS2017/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /IceBuilder_VS2017/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /IceBuilder_VS2019/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder.VS2019")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisible(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder_VS2019/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /IceBuilder_VS2019/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /IceBuilder_VS2022/IceBuilder_VS2022.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C998637F-98DD-45D3-AF85-47D883697E54} 8 | Library 9 | Properties 10 | IceBuilder 11 | IceBuilder.VS2022 12 | v4.7.2 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\ 21 | TRACE;DEBUG;VS2022 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\ 29 | TRACE;VS2022 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | compile; build; native; contentfiles; analyzers; buildtransitive 44 | 45 | 46 | runtime; build; native; contentfiles; analyzers; buildtransitive 47 | all 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | NuGetI.cs 58 | 59 | 60 | ProjectHelperFactoryI.cs 61 | 62 | 63 | ProjectHelperI.cs 64 | 65 | 66 | VCUtilI.cs 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | {c014d4bf-6eb0-409e-ad9b-5b783450200f} 76 | IceBuilder_Common.Next 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /IceBuilder_VS2022/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ZeroC, Inc. All rights reserved. 2 | 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | [assembly: AssemblyTitle("IceBuilder.VS2022")] 7 | [assembly: AssemblyDescription("Ice Builder Visual Studio Extension")] 8 | [assembly: AssemblyCompany("ZeroC, Inc.")] 9 | [assembly: AssemblyProduct("Ice Builder")] 10 | [assembly: AssemblyCopyright("Copyright (c) ZeroC, Inc.")] 11 | [assembly: AssemblyVersion("6.0.4")] 12 | [assembly: ComVisible(false)] 13 | -------------------------------------------------------------------------------- /IceBuilder_VS2022/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c), ZeroC, Inc. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | * Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /Screenshots/cpp-additional-include-directories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/Screenshots/cpp-additional-include-directories.png -------------------------------------------------------------------------------- /Screenshots/cpp-mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/Screenshots/cpp-mapping.png -------------------------------------------------------------------------------- /Screenshots/cpp-property-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/Screenshots/cpp-property-page.png -------------------------------------------------------------------------------- /Screenshots/csharp-property-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/Screenshots/csharp-property-page.png -------------------------------------------------------------------------------- /Screenshots/file-cpp-property-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/Screenshots/file-cpp-property-page.png -------------------------------------------------------------------------------- /Screenshots/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/Screenshots/options.png -------------------------------------------------------------------------------- /assets/Grammars.pkgdef: -------------------------------------------------------------------------------- 1 | [$RootKey$\TextMate\Repositories] 2 | "Slice"="$PackageFolder$\Grammars" 3 | -------------------------------------------------------------------------------- /assets/LICENSE.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang3082{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset2 Symbol;}} 2 | {\*\generator Riched20 10.0.17763}\viewkind4\uc1 3 | \pard\sa200\sl240\slmult1\f0\fs20\lang9 Copyright (c), ZeroC, Inc. All rights reserved.\par 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\par 5 | 6 | \pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}\fi-360\li720\sl240\slmult1 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\par 7 | {\pntext\f1\'B7\tab}Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\par 8 | {\pntext\f1\'B7\tab}Neither the name ZeroC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\par 9 | 10 | \pard\sl240\slmult1\par 11 | 12 | \pard\sa200\sl240\slmult1 THIS SOFTWARE IS PROVIDED BY ZEROC AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEROC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\par 13 | } 14 | -------------------------------------------------------------------------------- /assets/Package.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/assets/Package.ico -------------------------------------------------------------------------------- /assets/Package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroc-ice/ice-builder-visualstudio/18e9238567cf47928450e44ec0407669037be528/assets/Package.png -------------------------------------------------------------------------------- /assets/upgrade.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}} 2 | {\colortbl ;\red0\green0\blue255;} 3 | {\*\generator Riched20 10.0.16299}\viewkind4\uc1 4 | \pard\sa200\sl240\slmult1\f0\fs22\lang9 Ice Builder is about to convert your projects to the Ice Builder 5.0 format. This conversion is non-reversible and we encourage you to create a backup of your project files before you proceed.\par 5 | If you don't want to perform this conversion at this time, you need to uninstall your current Ice Builder extension, install Ice Builder 4.3.10 available at:\par 6 | {{\field{\*\fldinst{HYPERLINK https://github.com/zeroc-ice/ice-builder-visualstudio/releases/tag/v4.3.10 }}{\fldrslt{https://github.com/zeroc-ice/ice-builder-visualstudio/releases/tag/v4.3.10\ul0\cf0}}}}\f0\fs22\par 7 | and disable automatic updates for the Ice Builder extension.\par 8 | Do you want to proceed with the conversion of your projects?\par 9 | } 10 | --------------------------------------------------------------------------------