Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added vscode defaults to Templates #16

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"omnisharp.defaultLaunchSolution": "Rhino.VisualStudio.Mac.sln",
"var": {
"configuration" : "Debug",
"buildProperties" : "/v:Minimal /p:GenerateFullPaths=True /consoleLoggerParameters:NoSummary"
},
"dotnet.defaultSolution": "Rhino.VisualStudio.Mac.sln",
}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<BaseOutputPath>$(ArtifactsDir)bin\$(MSBuildProjectName)\</BaseOutputPath>
<BaseIntermediateOutputPath>$(ArtifactsDir)obj\$(OS)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>

<Version>8.0.0</Version> <!-- PSST. Hey Curtis. Update all other files with this number too -->
<Version>8.0.1</Version> <!-- PSST. Hey Curtis. Update all other files with this number too -->
<PackageVersion>$(Version)</PackageVersion>
</PropertyGroup>
</Project>
14 changes: 13 additions & 1 deletion Rhino.Templates/Rhino.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</PropertyGroup>

<ItemGroup>
<None Include="rhinocommon.png" Pack="true" PackagePath=""/>
<None Include="rhinocommon.png" Pack="true" PackagePath="" />
<None Include="content\Directory.*" />
<None Include="content\*\.template.config" />

Expand All @@ -52,4 +52,16 @@
<Content Remove="content\NuGet.Config" />
<Content Remove="content\Directory.*" />
</ItemGroup>

<ItemGroup>
<Content Update="content\CSRhino\.vscode\launch.json">
<PackagePath>%(RelativeDir)%(Filename)%(Extension)</PackagePath>
</Content>
<Content Update="content\CSRhino\.vscode\settings.json">
<PackagePath>%(RelativeDir)%(Filename)%(Extension)</PackagePath>
</Content>
<Content Update="content\CSRhino\.vscode\tasks.json">
<PackagePath>%(RelativeDir)%(Filename)%(Extension)</PackagePath>
</Content>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
{
"choice": "8",
"description": "Version 8 (WIP)"
"description": "Version 8"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"choice": "8",
"description": "Version 8 (WIP)"
"description": "Version 8"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,31 @@
"type": "parameter",
"description": "Version of Rhino",
"datatype": "choice",
"defaultValue": "7",
"choices": [
{
"choice": "6",
"description": "Version 6"
},
{
"choice": "7",
"description": "Version 7"
},
{
"choice": "8",
"description": "Version 8 (WIP)"
}
]
"defaultValue": "8",
"choices": [
{
"choice": "6",
"description": "Version 6"
},
{
"choice": "7",
"description": "Version 7"
},
{
"choice": "8",
"description": "Version 8"
}
],
"replaces" : "MyRhinoVersion"
},
"RhinoLocation": {
"type": "parameter",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 7\\System\\Rhino.exe",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 8\\System\\Rhino.exe",
"replaces": "MyExecutablePath",
"forms": {
"global": [ "JsonStringEncode" ]
},
"defaultValue": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe"
"defaultValue": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe"
},
"AddonDisplayName": {
"type": "parameter",
Expand Down
42 changes: 42 additions & 0 deletions Rhino.Templates/content/CSGrasshopper/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run GH MyRhinoVersion (Mac)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-plugin-netcore",
// Launches Rhino for us
"program": "/Applications/Rhino MyRhinoVersion.app/Contents/MacOS/Rhinoceros",
// See : https://developer.rhino3d.com/guides/cpp/running-rhino-from-command-line/
"args": [ "-runscript=_Grasshopper" ],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"console": "internalConsole",
// RHINO_PACKAGE_DIRS is required for Multi-Targeted plugins
// This is what enables Rhino to register our Plug-in
"env": {
"RHINO_PACKAGE_DIRS": "${workspaceFolder}/bin/Debug/"
}
},
{
"name": "Run GH MyRhinoVersion (Win)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-plugin-netcore",
// Launches Rhino for us
"program": "C:\\Program Files\\Rhino MyRhinoVersion\\System\\Rhino.exe",
// See : https://developer.rhino3d.com/guides/cpp/running-rhino-from-command-line/
"args": [ "/runscript=\"_Grasshopper\"" ],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"console": "internalConsole",
// RHINO_PACKAGE_DIRS is required for Multi-Targeted plugins
// This is what enables Rhino to register our Plug-in
"env": {
"RHINO_PACKAGE_DIRS": "${workspaceFolder}/bin/Debug/"
}
}
],
"compounds": []
}
4 changes: 4 additions & 0 deletions Rhino.Templates/content/CSGrasshopper/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// This file will specify the solution we use to build
"dotnet.defaultSolution": "MyGrasshopper.1.sln"
}
19 changes: 19 additions & 0 deletions Rhino.Templates/content/CSGrasshopper/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-plugin-netcore",
// This will ensure the project is built before we try to debug it
"command": "dotnet build ${workspaceFolder}\\MyGrasshopper.1.csproj",
"type": "shell",
"args": [],
"problemMatcher": [
"$msCompile"
],
"presentation": {
"reveal": "always"
},
"group": "build"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PackageReference Include="Grasshopper" Version="6.35.21222.17001" Condition="$(RhinoVersion) == '6'" IncludeAssets="compile;build" />
<PackageReference Include="Grasshopper" Version="7.13.21348.13001" Condition="$(RhinoVersion) == '7'" IncludeAssets="compile;build" />
<PackageReference Include="Grasshopper" Version="8.0.23164.14305-wip" Condition="$(RhinoVersion) == '8'" IncludeAssets="compile;build" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" Condition="$(TargetFramework) == 'net7.0'" IncludeAssets="compile;build" />
</ItemGroup>

</Project>
11 changes: 6 additions & 5 deletions Rhino.Templates/content/CSRhino/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"type": "parameter",
"description": "Version of Rhino",
"datatype": "choice",
"defaultValue": "7",
"defaultValue": "8",
"choices": [
{
"choice": "6",
Expand All @@ -65,18 +65,19 @@
},
{
"choice": "8",
"description": "Version 8 (WIP)"
"description": "Version 8"
}
]
],
"replaces": "MyRhinoVersion"
},
"RhinoLocation": {
"type": "parameter",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 7\\System\\Rhino.exe",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 8\\System\\Rhino.exe",
"replaces": "MyExecutablePath",
"forms": {
"global": [ "JsonStringEncode" ]
},
"defaultValue": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe"
"defaultValue": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe"
},
"CommandClassName": {
"type": "parameter",
Expand Down
42 changes: 42 additions & 0 deletions Rhino.Templates/content/CSRhino/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Rhino MyRhinoVersion (Mac)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-plugin-netcore",
// Launches Rhino for us
"program": "/Applications/Rhino MyRhinoVersion.app/Contents/MacOS/Rhinoceros",
// See : https://developer.rhino3d.com/guides/cpp/running-rhino-from-command-line/
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"console": "internalConsole",
// RHINO_PACKAGE_DIRS is required for Multi-Targeted plugins
// This is what enables Rhino to register our Plug-in
"env": {
"RHINO_PACKAGE_DIRS": "${workspaceFolder}/bin/Debug/"
}
},
{
"name": "Run Rhino MyRhinoVersion (Win)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-plugin-netcore",
// Launches Rhino for us
"program": "C:\\Program Files\\Rhino MyRhinoVersion\\System\\Rhino.exe",
// See : https://developer.rhino3d.com/guides/cpp/running-rhino-from-command-line/
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"console": "internalConsole",
// RHINO_PACKAGE_DIRS is required for Multi-Targeted plugins
// This is what enables Rhino to register our Plug-in
"env": {
"RHINO_PACKAGE_DIRS": "${workspaceFolder}/bin/Debug/"
}
}
],
"compounds": []
}
4 changes: 4 additions & 0 deletions Rhino.Templates/content/CSRhino/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// This file will specify the solution we use to build
"dotnet.defaultSolution": "MyRhino.1.sln"
}
19 changes: 19 additions & 0 deletions Rhino.Templates/content/CSRhino/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-plugin-netcore",
// This will ensure the project is built before we try to debug it
"command": "dotnet build ${workspaceFolder}\\MyRhino.1.csproj",
"type": "shell",
"args": [],
"problemMatcher": [
"$msCompile"
],
"presentation": {
"reveal": "always"
},
"group": "build"
}
]
}
1 change: 1 addition & 0 deletions Rhino.Templates/content/CSRhino/MyRhino.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<PackageReference Include="RhinoCommon" Version="6.35.21222.17001" Condition="$(RhinoVersion) == '6'" IncludeAssets="compile;build" />
<PackageReference Include="RhinoCommon" Version="7.13.21348.13001" Condition="$(RhinoVersion) == '7'" IncludeAssets="compile;build" />
<PackageReference Include="RhinoCommon" Version="8.0.23164.14305-wip" Condition="$(RhinoVersion) == '8'" IncludeAssets="compile;build" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" Condition="$(TargetFramework) == 'net7.0'" IncludeAssets="compile;build" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
},
{
"choice": "8",
"description": "Version 8 (WIP)"
"description": "Version 8"
}
]
},
"RhinoLocation": {
"type": "parameter",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 7\\System\\Rhino.exe",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 8\\System\\Rhino.exe",
"replaces": "MyExecutablePath",
"forms": {
"global": [ "JsonStringEncode" ]
},
"defaultValue": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe"
"defaultValue": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe"
},
"AddonDisplayName": {
"type": "parameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@
},
{
"choice": "8",
"description": "Version 8 (WIP)"
"description": "Version 8"
}
]
},
"RhinoLocation": {
"type": "parameter",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 7\\System\\Rhino.exe",
"description": "Location of Rhino.exe, usually C:\\Program Files\\Rhino 8\\System\\Rhino.exe",
"replaces": "MyExecutablePath",
"forms": {
"global": [ "JsonStringEncode" ]
},
"defaultValue": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe"
"defaultValue": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe"
},
"CommandClassName": {
"type": "parameter",
Expand Down
Loading