Compare commits
	
		
			6 Commits 
		
	
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | c79ac15ab1 | |
|  | d22954e503 | |
|  | ce9c3cd89e | |
|  | b5c7d76517 | |
|  | 74d4e231d2 | |
|  | 4496e9670a | 
|  | @ -3,8 +3,6 @@ | ||||||
| ## | ## | ||||||
| ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | ||||||
| 
 | 
 | ||||||
| fnalibs/ |  | ||||||
| 
 |  | ||||||
| # User-specific files | # User-specific files | ||||||
| *.rsuser | *.rsuser | ||||||
| *.suo | *.suo | ||||||
|  |  | ||||||
|  | @ -2,43 +2,17 @@ | ||||||
|   "version": "0.2.0", |   "version": "0.2.0", | ||||||
|   "configurations": [ |   "configurations": [ | ||||||
|     { |     { | ||||||
|       "name": "Attach to Framework Debugger", |       "name": "Attach to Core Debugger", | ||||||
|       "type": "clr", |  | ||||||
|       "request": "launch", |  | ||||||
|       "preLaunchTask": "Build: Framework Debug", |  | ||||||
|       "program": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461/ProjectName.exe", |  | ||||||
|       "args": [], |  | ||||||
|       "cwd": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461", |  | ||||||
|       "console": "integratedTerminal", |  | ||||||
|       "internalConsoleOptions": "neverOpen" |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "name": "Attach to Mono Debugger", |  | ||||||
|       "type": "mono", |  | ||||||
|       "request": "launch", |  | ||||||
|       "preLaunchTask": "Build: Mono Debug", |  | ||||||
|       "program": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461/ProjectName.exe", |  | ||||||
|       "args": [], |  | ||||||
|       "env": { |  | ||||||
|         "LD_LIBRARY_PATH": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461/lib64", |  | ||||||
|         "DYLD_LIBRARY_PATH": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461/osx" |  | ||||||
|       }, |  | ||||||
|       "cwd": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461", |  | ||||||
|       "console": "integratedTerminal", |  | ||||||
|       "internalConsoleOptions": "neverOpen" |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "name": "Attach to .NET 6 Debugger", |  | ||||||
|       "type": "coreclr", |       "type": "coreclr", | ||||||
|       "request": "launch", |       "request": "launch", | ||||||
|       "preLaunchTask": "Build: .NET 6 Debug", |       "preLaunchTask": "Build: Core Debug", | ||||||
|       "program": "${workspaceFolder}/ProjectName/bin/x64/Debug/net6.0/ProjectName.dll", |       "program": "${workspaceFolder}/ProjectName/bin/Debug/netcoreapp3.1/ProjectName.dll", | ||||||
|       "args": [], |       "args": [], | ||||||
|       "env": { |       "env": { | ||||||
|         "LD_LIBRARY_PATH": "${workspaceFolder}/ProjectName/bin/x64/Debug/net6.0/lib64", |         "LD_LIBRARY_PATH": "${workspaceFolder}/ProjectName/bin/Debug/netcoreapp3.1/lib64", | ||||||
|         "DYLD_LIBRARY_PATH": "${workspaceFolder}/ProjectName/bin/x64/Debug/net6.0/osx" |         "DYLD_LIBRARY_PATH": "${workspaceFolder}/ProjectName/bin/Debug/netcoreapp3.1/osx" | ||||||
|       }, |       }, | ||||||
|       "cwd": "${workspaceFolder}/ProjectName/bin/x64/Debug/net6.0", |       "cwd": "${workspaceFolder}", | ||||||
|       "console": "integratedTerminal", |       "console": "integratedTerminal", | ||||||
|       "internalConsoleOptions": "neverOpen" |       "internalConsoleOptions": "neverOpen" | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -21,13 +21,12 @@ | ||||||
|   }, |   }, | ||||||
|   "tasks": [ |   "tasks": [ | ||||||
|     { |     { | ||||||
|       "label": "Build: Mono Release", |       "label": "Build: Framework Release", | ||||||
|       "command": "msbuild", |       "command": "msbuild", | ||||||
|       "args": [ |       "args": [ | ||||||
|         "-restore:True", |         "-restore:True", | ||||||
|         "${workspaceFolder}/ProjectName.Framework.sln", |         "${workspaceFolder}/ProjectName.Framework.sln", | ||||||
|         "-p:Configuration=Release", |         "-p:Configuration=Release" | ||||||
|         "-p:Platform=x64" |  | ||||||
|       ], |       ], | ||||||
|       "type": "shell", |       "type": "shell", | ||||||
|       "group": { |       "group": { | ||||||
|  | @ -37,7 +36,7 @@ | ||||||
|       "problemMatcher": "$msCompile" |       "problemMatcher": "$msCompile" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "label": "Run: Mono Release", |       "label": "Run: Framework Release", | ||||||
|       "command": "mono", |       "command": "mono", | ||||||
|       "args": [ |       "args": [ | ||||||
|         "ProjectName.exe" |         "ProjectName.exe" | ||||||
|  | @ -47,7 +46,7 @@ | ||||||
|           "LD_LIBRARY_PATH": "./lib64", |           "LD_LIBRARY_PATH": "./lib64", | ||||||
|           "DYLD_LIBRARY_PATH": "./osx" |           "DYLD_LIBRARY_PATH": "./osx" | ||||||
|         }, |         }, | ||||||
|         "cwd": "${workspaceFolder}/ProjectName/bin/x64/Release/net461" |         "cwd": "${workspaceFolder}/ProjectName/bin/Release/net461" | ||||||
|       }, |       }, | ||||||
|       "type": "process", |       "type": "process", | ||||||
|       "group": { |       "group": { | ||||||
|  | @ -57,10 +56,10 @@ | ||||||
|       "problemMatcher": [] |       "problemMatcher": [] | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "label": "Build & Run: Mono Release", |       "label": "Build & Run: Framework Release", | ||||||
|       "dependsOn": [ |       "dependsOn": [ | ||||||
|         "Build: Mono Release", |         "Build: Framework Release", | ||||||
|         "Run: Mono Release" |         "Run: Framework Release" | ||||||
|       ], |       ], | ||||||
|       "dependsOrder": "sequence", |       "dependsOrder": "sequence", | ||||||
|       "type": "shell", |       "type": "shell", | ||||||
|  | @ -70,166 +69,13 @@ | ||||||
|       }, |       }, | ||||||
|       "problemMatcher": [] |       "problemMatcher": [] | ||||||
|     }, |     }, | ||||||
|     { |  | ||||||
|       "label": "Build: Mono Debug", |  | ||||||
|       "command": "msbuild", |  | ||||||
|       "args": [ |  | ||||||
|         "-restore:True", |  | ||||||
|         "${workspaceFolder}/ProjectName.Framework.sln", |  | ||||||
|         "-p:Configuration=Debug", |  | ||||||
|         "-p:Platform=x64" |  | ||||||
|       ], |  | ||||||
|       "type": "shell", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Run: Mono Debug", |  | ||||||
|       "command": "mono", |  | ||||||
|       "args": [ |  | ||||||
|         "ProjectName.exe" |  | ||||||
|       ], |  | ||||||
|       "options": { |  | ||||||
|         "env": { |  | ||||||
|           "LD_LIBRARY_PATH": "./lib64", |  | ||||||
|           "DYLD_LIBRARY_PATH": "./osx" |  | ||||||
|         }, |  | ||||||
|         "cwd": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461" |  | ||||||
|       }, |  | ||||||
|       "type": "process", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Build & Run: Mono Debug", |  | ||||||
|       "dependsOn": [ |  | ||||||
|         "Build: Mono Debug", |  | ||||||
|         "Run: Mono Debug" |  | ||||||
|       ], |  | ||||||
|       "dependsOrder": "sequence", |  | ||||||
|       "type": "shell", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Build & Run: .NET 6 Debug", |  | ||||||
|       "type": "shell", |  | ||||||
|       "dependsOrder": "sequence", |  | ||||||
|       "dependsOn": [ |  | ||||||
|         "Build: .NET 6 Debug", |  | ||||||
|         "Run: .NET 6 Debug" |  | ||||||
|       ], |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Build: .NET 6 Debug", |  | ||||||
|       "command": "dotnet", |  | ||||||
|       "args": [ |  | ||||||
|         "build", |  | ||||||
|         "./ProjectName/ProjectName.Core.csproj", |  | ||||||
|         "-p:SolutionDir=${workspaceFolder}/", |  | ||||||
|         "-p:Platform=x64" |  | ||||||
|       ], |  | ||||||
|       "type": "shell", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Run: .NET 6 Debug", |  | ||||||
|       "command": "dotnet", |  | ||||||
|       "args": [ |  | ||||||
|         "./ProjectName.dll" |  | ||||||
|       ], |  | ||||||
|       "options": { |  | ||||||
|         "env": { |  | ||||||
|           "LD_LIBRARY_PATH": "./lib64", |  | ||||||
|           "DYLD_LIBRARY_PATH": "./osx" |  | ||||||
|         }, |  | ||||||
|         "cwd": "${workspaceFolder}/ProjectName/bin/x64/Debug/net6.0" |  | ||||||
|       }, |  | ||||||
|       "type": "process", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Build: .NET 6 Release", |  | ||||||
|       "command": "dotnet", |  | ||||||
|       "args": [ |  | ||||||
|         "build", |  | ||||||
|         "./ProjectName/ProjectName.Core.csproj", |  | ||||||
|         "--configuration", |  | ||||||
|         "Release", |  | ||||||
|         "-p:SolutionDir=${workspaceFolder}/", |  | ||||||
|         "-p:Platform=x64" |  | ||||||
|       ], |  | ||||||
|       "type": "shell", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Run: .NET 6 Release", |  | ||||||
|       "command": "dotnet", |  | ||||||
|       "args": [ |  | ||||||
|         "./ProjectName.dll" |  | ||||||
|       ], |  | ||||||
|       "options": { |  | ||||||
|         "env": { |  | ||||||
|           "LD_LIBRARY_PATH": "./lib64", |  | ||||||
|           "DYLD_LIBRARY_PATH": "./osx" |  | ||||||
|         }, |  | ||||||
|         "cwd": "${workspaceFolder}/ProjectName/bin/x64/Release/net6.0" |  | ||||||
|       }, |  | ||||||
|       "type": "process", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "label": "Build & Run: .NET 6 Release", |  | ||||||
|       "dependsOrder": "sequence", |  | ||||||
|       "dependsOn": [ |  | ||||||
|         "Build: .NET 6 Release", |  | ||||||
|         "Run: .NET 6 Release" |  | ||||||
|       ], |  | ||||||
|       "type": "shell", |  | ||||||
|       "group": { |  | ||||||
|         "kind": "build", |  | ||||||
|         "isDefault": true |  | ||||||
|       }, |  | ||||||
|       "problemMatcher": [] |  | ||||||
|     }, |  | ||||||
|     { |     { | ||||||
|       "label": "Build: Framework Debug", |       "label": "Build: Framework Debug", | ||||||
|       "command": "MsBuild.exe", |       "command": "msbuild", | ||||||
|       "args": [ |       "args": [ | ||||||
|         "-restore:True", |         "-restore:True", | ||||||
|         "${workspaceFolder}/ProjectName.Framework.sln", |         "${workspaceFolder}/ProjectName.Framework.sln", | ||||||
|         "-p:Configuration=Debug", |         "-p:Configuration=Debug" | ||||||
|         "-p:Platform=x64" |  | ||||||
|       ], |       ], | ||||||
|       "type": "shell", |       "type": "shell", | ||||||
|       "group": { |       "group": { | ||||||
|  | @ -240,9 +86,16 @@ | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "label": "Run: Framework Debug", |       "label": "Run: Framework Debug", | ||||||
|       "command": "ProjectName.exe", |       "command": "mono", | ||||||
|  |       "args": [ | ||||||
|  |         "ProjectName.exe" | ||||||
|  |       ], | ||||||
|       "options": { |       "options": { | ||||||
|         "cwd": "${workspaceFolder}/ProjectName/bin/x64/Debug/net461" |         "env": { | ||||||
|  |           "LD_LIBRARY_PATH": "./lib64", | ||||||
|  |           "DYLD_LIBRARY_PATH": "./osx" | ||||||
|  |         }, | ||||||
|  |         "cwd": "${workspaceFolder}/ProjectName/bin/Debug/net461" | ||||||
|       }, |       }, | ||||||
|       "type": "process", |       "type": "process", | ||||||
|       "group": { |       "group": { | ||||||
|  | @ -266,13 +119,27 @@ | ||||||
|       "problemMatcher": [] |       "problemMatcher": [] | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "label": "Build: Framework Release", |       "label": "Build & Run: Core Debug", | ||||||
|       "command": "MsBuild.exe", |       "type": "shell", | ||||||
|  |       "dependsOrder": "sequence", | ||||||
|  |       "dependsOn": [ | ||||||
|  |         "Build: Core Debug", | ||||||
|  |         "Run: Core Debug" | ||||||
|  |       ], | ||||||
|  |       "group": { | ||||||
|  |         "kind": "build", | ||||||
|  |         "isDefault": true | ||||||
|  |       }, | ||||||
|  |       "problemMatcher": [] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "label": "Build: Core Debug", | ||||||
|  |       "command": "dotnet", | ||||||
|       "args": [ |       "args": [ | ||||||
|         "-restore:True", |         "build", | ||||||
|         "${workspaceFolder}/ProjectName.Framework.sln", |         "./ProjectName.Core.sln", | ||||||
|         "-p:Configuration=Release", |         "-f", | ||||||
|         "-p:Platform=x64" |         "netcoreapp3.1" | ||||||
|       ], |       ], | ||||||
|       "type": "shell", |       "type": "shell", | ||||||
|       "group": { |       "group": { | ||||||
|  | @ -282,10 +149,17 @@ | ||||||
|       "problemMatcher": [] |       "problemMatcher": [] | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "label": "Run: Framework Release", |       "label": "Run: Core Debug", | ||||||
|       "command": "ProjectName.exe", |       "command": "dotnet", | ||||||
|  |       "args": [ | ||||||
|  |         "./ProjectName.dll" | ||||||
|  |       ], | ||||||
|       "options": { |       "options": { | ||||||
|         "cwd": "${workspaceFolder}/ProjectName/bin/x64/Release/net461" |         "env": { | ||||||
|  |           "LD_LIBRARY_PATH": "./lib64", | ||||||
|  |           "DYLD_LIBRARY_PATH": "./osx" | ||||||
|  |         }, | ||||||
|  |         "cwd": "${workspaceFolder}/ProjectName/bin/Debug/netcoreapp3.1" | ||||||
|       }, |       }, | ||||||
|       "type": "process", |       "type": "process", | ||||||
|       "group": { |       "group": { | ||||||
|  | @ -295,12 +169,50 @@ | ||||||
|       "problemMatcher": [] |       "problemMatcher": [] | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "label": "Build & Run: Framework Release", |       "label": "Build: Core Release", | ||||||
|       "dependsOn": [ |       "command": "dotnet", | ||||||
|         "Build: Framework Release", |       "args": [ | ||||||
|         "Run: Framework Release" |         "build", | ||||||
|  |         "./ProjectName.Core.sln", | ||||||
|  |         "--configuration", | ||||||
|  |         "Release", | ||||||
|  |         "-f", | ||||||
|  |         "netcoreapp3.1" | ||||||
|       ], |       ], | ||||||
|  |       "type": "shell", | ||||||
|  |       "group": { | ||||||
|  |         "kind": "build", | ||||||
|  |         "isDefault": true | ||||||
|  |       }, | ||||||
|  |       "problemMatcher": [] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "label": "Run: Core Release", | ||||||
|  |       "command": "dotnet", | ||||||
|  |       "args": [ | ||||||
|  |         "./ProjectName.dll" | ||||||
|  |       ], | ||||||
|  |       "options": { | ||||||
|  |         "env": { | ||||||
|  |           "LD_LIBRARY_PATH": "./lib64", | ||||||
|  |           "DYLD_LIBRARY_PATH": "./osx" | ||||||
|  |         }, | ||||||
|  |         "cwd": "${workspaceFolder}/ProjectName/bin/Release/netcoreapp3.1" | ||||||
|  |       }, | ||||||
|  |       "type": "process", | ||||||
|  |       "group": { | ||||||
|  |         "kind": "build", | ||||||
|  |         "isDefault": true | ||||||
|  |       }, | ||||||
|  |       "problemMatcher": [] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "label": "Build & Run: Core Release", | ||||||
|       "dependsOrder": "sequence", |       "dependsOrder": "sequence", | ||||||
|  |       "dependsOn": [ | ||||||
|  |         "Build: Core Release", | ||||||
|  |         "Run: Core Release" | ||||||
|  |       ], | ||||||
|       "type": "shell", |       "type": "shell", | ||||||
|       "group": { |       "group": { | ||||||
|         "kind": "build", |         "kind": "build", | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||||
| 	<PropertyGroup> |   <PropertyGroup> | ||||||
| 		<DefineConstants>$(DefineConstants)</DefineConstants> |           <DefineConstants>$(DefineConstants)</DefineConstants> | ||||||
| 	</PropertyGroup> |   </PropertyGroup> | ||||||
| </Project> | </Project> | ||||||
|  |  | ||||||
|  | @ -1,31 +1,34 @@ | ||||||
|  |  | ||||||
| Microsoft Visual Studio Solution File, Format Version 12.00 | Microsoft Visual Studio Solution File, Format Version 12.00 | ||||||
| # Visual Studio Version 16 | # Visual Studio 15 | ||||||
| VisualStudioVersion = 16.0.30717.126 | VisualStudioVersion = 15.0.26124.0 | ||||||
| MinimumVisualStudioVersion = 15.0.26124.0 | MinimumVisualStudioVersion = 15.0.26124.0 | ||||||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectName.Core", "ProjectName\ProjectName.Core.csproj", "{4589302C-174A-4173-9654-CAA6CA1B5220}" | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectName.Core", "ProjectName\ProjectName.Core.csproj", "{4589302C-174A-4173-9654-CAA6CA1B5220}" | ||||||
| EndProject | EndProject | ||||||
| Global | Global | ||||||
| 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||||
|  | 		Debug|Any CPU = Debug|Any CPU | ||||||
| 		Debug|x64 = Debug|x64 | 		Debug|x64 = Debug|x64 | ||||||
| 		Debug|x86 = Debug|x86 | 		Debug|x86 = Debug|x86 | ||||||
|  | 		Release|Any CPU = Release|Any CPU | ||||||
| 		Release|x64 = Release|x64 | 		Release|x64 = Release|x64 | ||||||
| 		Release|x86 = Release|x86 | 		Release|x86 = Release|x86 | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(ProjectConfigurationPlatforms) = postSolution |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.ActiveCfg = Debug|x64 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.Build.0 = Debug|x64 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x86.ActiveCfg = Debug|x86 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x86.Build.0 = Debug|x86 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.ActiveCfg = Release|x64 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.Build.0 = Release|x64 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x86.ActiveCfg = Release|x86 |  | ||||||
| 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x86.Build.0 = Release|x86 |  | ||||||
| 	EndGlobalSection |  | ||||||
| 	GlobalSection(SolutionProperties) = preSolution | 	GlobalSection(SolutionProperties) = preSolution | ||||||
| 		HideSolutionNode = FALSE | 		HideSolutionNode = FALSE | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(ExtensibilityGlobals) = postSolution | 	GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||||
| 		SolutionGuid = {70247DA8-9C19-4FC5-B4BC-68E1262B9F4B} | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.Build.0 = Debug|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x86.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x86.Build.0 = Debug|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|Any CPU.Build.0 = Release|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.ActiveCfg = Release|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.Build.0 = Release|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x86.ActiveCfg = Release|Any CPU | ||||||
|  | 		{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x86.Build.0 = Release|Any CPU | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| EndGlobal | EndGlobal | ||||||
|  |  | ||||||
|  | @ -1,31 +1,34 @@ | ||||||
|  |  | ||||||
| Microsoft Visual Studio Solution File, Format Version 12.00 | Microsoft Visual Studio Solution File, Format Version 12.00 | ||||||
| # Visual Studio Version 16 | # Visual Studio 15 | ||||||
| VisualStudioVersion = 16.0.30717.126 | VisualStudioVersion = 15.0.26124.0 | ||||||
| MinimumVisualStudioVersion = 15.0.26124.0 | MinimumVisualStudioVersion = 15.0.26124.0 | ||||||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectName.Framework", "ProjectName\ProjectName.Framework.csproj", "{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}" | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FNATemplate.Framework", "ProjectName\ProjectName.Framework.csproj", "{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}" | ||||||
| EndProject | EndProject | ||||||
| Global | Global | ||||||
| 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||||
|  | 		Debug|Any CPU = Debug|Any CPU | ||||||
| 		Debug|x64 = Debug|x64 | 		Debug|x64 = Debug|x64 | ||||||
| 		Debug|x86 = Debug|x86 | 		Debug|x86 = Debug|x86 | ||||||
|  | 		Release|Any CPU = Release|Any CPU | ||||||
| 		Release|x64 = Release|x64 | 		Release|x64 = Release|x64 | ||||||
| 		Release|x86 = Release|x86 | 		Release|x86 = Release|x86 | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(ProjectConfigurationPlatforms) = postSolution |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x64.ActiveCfg = Debug|x64 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x64.Build.0 = Debug|x64 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x86.ActiveCfg = Debug|x86 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x86.Build.0 = Debug|x86 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x64.ActiveCfg = Release|x64 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x64.Build.0 = Release|x64 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x86.ActiveCfg = Release|x86 |  | ||||||
| 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x86.Build.0 = Release|x86 |  | ||||||
| 	EndGlobalSection |  | ||||||
| 	GlobalSection(SolutionProperties) = preSolution | 	GlobalSection(SolutionProperties) = preSolution | ||||||
| 		HideSolutionNode = FALSE | 		HideSolutionNode = FALSE | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| 	GlobalSection(ExtensibilityGlobals) = postSolution | 	GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||||
| 		SolutionGuid = {4DB7BE1E-CAC6-4275-B514-20CBE80F794F} | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x64.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x64.Build.0 = Debug|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x86.ActiveCfg = Debug|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Debug|x86.Build.0 = Debug|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|Any CPU.Build.0 = Release|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x64.ActiveCfg = Release|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x64.Build.0 = Release|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x86.ActiveCfg = Release|Any CPU | ||||||
|  | 		{9ED076FA-32C3-4F1E-BB90-549B3A2FA46F}.Release|x86.Build.0 = Release|Any CPU | ||||||
| 	EndGlobalSection | 	EndGlobalSection | ||||||
| EndGlobal | EndGlobal | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Put your Component structs here. | ||||||
|  | @ -0,0 +1,259 @@ | ||||||
|  | // only works in .NET Core. disable in .NET framework | ||||||
|  | 
 | ||||||
|  | using System; | ||||||
|  | using System.Collections.Generic; | ||||||
|  | using System.IO; | ||||||
|  | using System.Linq; | ||||||
|  | using System.Reflection; | ||||||
|  | using System.Runtime.InteropServices; | ||||||
|  | using System.Xml.Linq; | ||||||
|  | 
 | ||||||
|  | public static class DllMap | ||||||
|  | { | ||||||
|  |     [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | ||||||
|  |     [return: MarshalAs(UnmanagedType.Bool)] | ||||||
|  |     static extern bool SetDefaultDllDirectories(int directoryFlags); | ||||||
|  | 
 | ||||||
|  |     [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | ||||||
|  |     static extern void AddDllDirectory(string lpPathName); | ||||||
|  | 
 | ||||||
|  |     [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | ||||||
|  |     [return: MarshalAs(UnmanagedType.Bool)] | ||||||
|  |     static extern bool SetDllDirectory(string lpPathName); | ||||||
|  | 
 | ||||||
|  |     const int LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000; | ||||||
|  | 
 | ||||||
|  |     public static Dictionary<string, string> MapDictionary; | ||||||
|  |     public static string OS; | ||||||
|  |     public static string CPU; | ||||||
|  |     public static bool Optimise; | ||||||
|  | 
 | ||||||
|  |     public static void Initialise(bool optimise = true) | ||||||
|  |     { | ||||||
|  |         Optimise = optimise; | ||||||
|  | 
 | ||||||
|  |         // Our executabe needs to know how to find the native libraries | ||||||
|  |         // For Windows, we can set this to be x86 or x64 directory at runtime (below) | ||||||
|  |         // For Linux we need to move our native libraries to 'netcoredeps' which is set by .net core | ||||||
|  |         // For OSX we need to set an environment variable (DYLD_LIBRARY_PATH) outside of the process by a script | ||||||
|  |         if (Environment.OSVersion.Platform == PlatformID.Win32NT) | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); | ||||||
|  |                 AddDllDirectory(Path.Combine( | ||||||
|  |                     AppDomain.CurrentDomain.BaseDirectory, | ||||||
|  |                     Environment.Is64BitProcess ? "x64" : "x86" | ||||||
|  |                 )); | ||||||
|  |             } | ||||||
|  |             catch | ||||||
|  |             { | ||||||
|  |                 // Pre-Windows 7, KB2533623 | ||||||
|  |                 SetDllDirectory(Path.Combine( | ||||||
|  |                     AppDomain.CurrentDomain.BaseDirectory, | ||||||
|  |                     Environment.Is64BitProcess ? "x64" : "x86" | ||||||
|  |                 )); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         // .NET Core also doesn't use DllImport but we can replicate this using NativeLibrary as per below | ||||||
|  |         // Uses FNA.dll.config to dictate what the name of the native library is per platform and architecture | ||||||
|  |         var fnaAssembly = Assembly.GetAssembly(typeof(Microsoft.Xna.Framework.Graphics.ColorWriteChannels)); | ||||||
|  |         DllMap.Register(fnaAssembly); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Register a call-back for native library resolution. | ||||||
|  |     public static void Register(Assembly assembly) | ||||||
|  |     { | ||||||
|  |         NativeLibrary.SetDllImportResolver(assembly, MapAndLoad); | ||||||
|  | 
 | ||||||
|  |         // Do setup so that MapLibraryName is faster than reading the XML each time | ||||||
|  | 
 | ||||||
|  |         // 1) Get platform & cpu | ||||||
|  |         OS = GetCurrentPlatform().ToString().ToLowerInvariant(); | ||||||
|  |         CPU = GetCurrentRuntimeArchitecture().ToString().ToLowerInvariant(); | ||||||
|  | 
 | ||||||
|  |         // 2) Setup MapDictionary | ||||||
|  |         // For Windows use hardcoded values | ||||||
|  |         // Why?  This is our development platform and we wanted the fastest start time possible (eliminates XML Load) | ||||||
|  |         if (OS == "windows" && Optimise) | ||||||
|  |         { | ||||||
|  |             MapDictionary = new Dictionary<string, string>(); | ||||||
|  |             MapDictionary.Add("SDL2", "SDL2.dll"); | ||||||
|  |             MapDictionary.Add("SDL_image", "SDL_image.dll"); | ||||||
|  |             MapDictionary.Add("FAudio", "FAudio.dll"); | ||||||
|  |         } | ||||||
|  |         else | ||||||
|  |         { | ||||||
|  |             // For every other platform use XML file | ||||||
|  |             // Read in config XML and only store details we're interested in within MapDictionary | ||||||
|  |             string xmlPath = Path.Combine(Path.GetDirectoryName(assembly.Location), | ||||||
|  |                Path.GetFileNameWithoutExtension(assembly.Location) + ".dll.config"); | ||||||
|  | 
 | ||||||
|  |             if (!File.Exists(xmlPath)) | ||||||
|  |             { | ||||||
|  |                 Console.WriteLine($"=== Cannot find XML: " + xmlPath); | ||||||
|  |                 return; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             XElement root = XElement.Load(xmlPath); | ||||||
|  | 
 | ||||||
|  |             MapDictionary = new Dictionary<string, string>(); | ||||||
|  |             ParseXml(root, true); // Direct match on OS & CPU first | ||||||
|  |             ParseXml(root, false); // Loose match on CPU second (won't allow duplicates) | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     private static void ParseXml(XElement root, bool matchCPU) | ||||||
|  |     { | ||||||
|  |         foreach (var el in root.Elements("dllmap")) | ||||||
|  |         { | ||||||
|  |             // Ignore entries for other OSs | ||||||
|  |             if (el.Attribute("os").ToString().IndexOf(OS) < 0) | ||||||
|  |                 continue; | ||||||
|  | 
 | ||||||
|  |             // Ignore entries for other CPUs | ||||||
|  |             if (matchCPU) | ||||||
|  |             { | ||||||
|  |                 if (el.Attribute("cpu") == null) | ||||||
|  |                     continue; | ||||||
|  |                 if (el.Attribute("cpu").ToString().IndexOf(CPU) < 0) | ||||||
|  |                     continue; | ||||||
|  |             } | ||||||
|  |             else | ||||||
|  |             { | ||||||
|  |                 if (el.Attribute("cpu") != null && el.Attribute("cpu").ToString().IndexOf(CPU) < 0) | ||||||
|  |                     continue; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             string oldLib = el.Attribute("dll").Value; | ||||||
|  |             string newLib = el.Attribute("target").Value; | ||||||
|  |             if (string.IsNullOrWhiteSpace(oldLib) || string.IsNullOrWhiteSpace(newLib)) | ||||||
|  |                 continue; | ||||||
|  | 
 | ||||||
|  |             // Don't allow duplicates | ||||||
|  |             if (MapDictionary.ContainsKey(oldLib)) | ||||||
|  |                 continue; | ||||||
|  | 
 | ||||||
|  |             MapDictionary.Add(oldLib, newLib); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // The callback: which loads the mapped libray in place of the original | ||||||
|  |     private static IntPtr MapAndLoad(string libraryName, Assembly assembly, DllImportSearchPath? dllImportSearchPath) | ||||||
|  |     { | ||||||
|  |         string mappedName = null; | ||||||
|  |         mappedName = MapLibraryName(assembly.Location, libraryName, out mappedName) ? mappedName : libraryName; | ||||||
|  |         return NativeLibrary.Load(mappedName, assembly, dllImportSearchPath); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Parse the assembly.xml file, and map the old name to the new name of a library. | ||||||
|  |     private static bool MapLibraryName(string assemblyLocation, string originalLibName, out string mappedLibName) | ||||||
|  |     { | ||||||
|  |         if (MapDictionary.TryGetValue(originalLibName, out mappedLibName)) | ||||||
|  |             return true; | ||||||
|  |         else | ||||||
|  |             return false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Below pinched from Mono.DllMap project:   https://github.com/Firwood-Software/AdvancedDLSupport/tree/1b7394211a655b2f77649ce3b610a3161215cbdc/Mono.DllMap | ||||||
|  |     public static DllMapOS GetCurrentPlatform() | ||||||
|  |     { | ||||||
|  |         if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) | ||||||
|  |         { | ||||||
|  |             return DllMapOS.Linux; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||||||
|  |         { | ||||||
|  |             return DllMapOS.Windows; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) | ||||||
|  |         { | ||||||
|  |             return DllMapOS.OSX; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         var operatingDesc = RuntimeInformation.OSDescription.ToUpperInvariant(); | ||||||
|  |         foreach (var system in Enum.GetValues(typeof(DllMapOS)).Cast<DllMapOS>() | ||||||
|  |             .Except(new[] { DllMapOS.Linux, DllMapOS.Windows, DllMapOS.OSX })) | ||||||
|  |         { | ||||||
|  |             if (operatingDesc.Contains(system.ToString().ToUpperInvariant())) | ||||||
|  |             { | ||||||
|  |                 return system; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         throw new PlatformNotSupportedException($"Couldn't detect platform: {RuntimeInformation.OSDescription}"); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static DllMapArchitecture GetCurrentRuntimeArchitecture() | ||||||
|  |     { | ||||||
|  |         switch (RuntimeInformation.ProcessArchitecture) | ||||||
|  |         { | ||||||
|  |             case Architecture.Arm: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.ARM; | ||||||
|  |                 } | ||||||
|  |             case Architecture.X64: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.x86_64; | ||||||
|  |                 } | ||||||
|  |             case Architecture.X86: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.x86; | ||||||
|  |                 } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         typeof(object).Module.GetPEKind(out _, out var machine); | ||||||
|  |         switch (machine) | ||||||
|  |         { | ||||||
|  |             case ImageFileMachine.I386: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.x86; | ||||||
|  |                 } | ||||||
|  |             case ImageFileMachine.AMD64: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.x86_64; | ||||||
|  |                 } | ||||||
|  |             case ImageFileMachine.ARM: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.ARM; | ||||||
|  |                 } | ||||||
|  |             case ImageFileMachine.IA64: | ||||||
|  |                 { | ||||||
|  |                     return DllMapArchitecture.IA64; | ||||||
|  |                 } | ||||||
|  |         } | ||||||
|  |         throw new PlatformNotSupportedException("Couldn't detect the current architecture."); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public enum DllMapOS | ||||||
|  |     { | ||||||
|  |         Linux = 1 << 0, | ||||||
|  |         OSX = 1 << 1, | ||||||
|  |         Solaris = 1 << 2, | ||||||
|  |         FreeBSD = 1 << 3, | ||||||
|  |         OpenBSD = 1 << 4, | ||||||
|  |         NetBSD = 1 << 5, | ||||||
|  |         Windows = 1 << 6, | ||||||
|  |         AIX = 1 << 7, | ||||||
|  |         HPUX = 1 << 8 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public enum DllMapArchitecture | ||||||
|  |     { | ||||||
|  |         x86 = 1 << 0, | ||||||
|  |         x86_64 = 1 << 1, | ||||||
|  |         SPARC = 1 << 2, | ||||||
|  |         PPC = 1 << 3, | ||||||
|  |         S390 = 1 << 4, | ||||||
|  |         S390X = 1 << 5, | ||||||
|  |         ARM = 1 << 6, | ||||||
|  |         ARMV8 = 1 << 7, | ||||||
|  |         MIPS = 1 << 8, | ||||||
|  |         Alpha = 1 << 9, | ||||||
|  |         HPPA = 1 << 10, | ||||||
|  |         IA64 = 1 << 11 | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Put your Engine classes here. | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Put your Message structs here. | ||||||
|  | @ -5,39 +5,43 @@ using System.Runtime.InteropServices; | ||||||
| 
 | 
 | ||||||
| namespace ProjectName | namespace ProjectName | ||||||
| { | { | ||||||
| 	class Program |     class Program | ||||||
| 	{ |     { | ||||||
| 		[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] |         [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | ||||||
| 		[return: MarshalAs(UnmanagedType.Bool)] |         [return: MarshalAs(UnmanagedType.Bool)] | ||||||
| 		static extern bool SetDllDirectory(string lpPathName); |         static extern bool SetDllDirectory(string lpPathName); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 		static void Main(string[] args) |         static void Main(string[] args) | ||||||
| 		{ |         { | ||||||
| 			// https://github.com/FNA-XNA/FNA/wiki/4:-FNA-and-Windows-API#64-bit-support | #if NETCOREAPP | ||||||
| 			if (Environment.OSVersion.Platform == PlatformID.Win32NT) |             DllMap.Initialise(false); | ||||||
| 			{ | #endif | ||||||
| 				SetDllDirectory(Path.Combine( |  | ||||||
| 					AppDomain.CurrentDomain.BaseDirectory, |  | ||||||
| 					Environment.Is64BitProcess ? "x64" : "x86" |  | ||||||
| 				)); |  | ||||||
| 			} |  | ||||||
| 
 | 
 | ||||||
| 			// https://github.com/FNA-XNA/FNA/wiki/7:-FNA-Environment-Variables#fna_graphics_enable_highdpi |             // https://github.com/FNA-XNA/FNA/wiki/4:-FNA-and-Windows-API#64-bit-support | ||||||
| 			// NOTE: from documentation: |             if (Environment.OSVersion.Platform == PlatformID.Win32NT) | ||||||
| 			//       Lastly, when packaging for macOS, be sure this is in your app bundle's Info.plist: |             { | ||||||
| 			//           <key>NSHighResolutionCapable</key> |                 SetDllDirectory(Path.Combine( | ||||||
| 			//           <string>True</string> |                     AppDomain.CurrentDomain.BaseDirectory, | ||||||
| 			Environment.SetEnvironmentVariable("FNA_GRAPHICS_ENABLE_HIGHDPI", "1"); |                     Environment.Is64BitProcess ? "x64" : "x86" | ||||||
|  |                 )); | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
| 			using (ProjectNameGame game = new ProjectNameGame()) |             // https://github.com/FNA-XNA/FNA/wiki/7:-FNA-Environment-Variables#fna_graphics_enable_highdpi | ||||||
| 			{ |             // NOTE: from documentation:  | ||||||
| 				bool isHighDPI = Environment.GetEnvironmentVariable("FNA_GRAPHICS_ENABLE_HIGHDPI") == "1"; |             //       Lastly, when packaging for macOS, be sure this is in your app bundle's Info.plist: | ||||||
| 				if (isHighDPI) |             //           <key>NSHighResolutionCapable</key> | ||||||
| 					Debug.WriteLine("HiDPI Enabled"); |             //           <string>True</string> | ||||||
|  |             Environment.SetEnvironmentVariable("FNA_GRAPHICS_ENABLE_HIGHDPI", "1"); | ||||||
| 
 | 
 | ||||||
| 				game.Run(); |             using (ProjectNameGame game = new ProjectNameGame()) | ||||||
| 			} |             { | ||||||
| 		} |                 bool isHighDPI = Environment.GetEnvironmentVariable("FNA_GRAPHICS_ENABLE_HIGHDPI") == "1"; | ||||||
| 	} |                 if (isHighDPI) | ||||||
|  |                     Debug.WriteLine("HiDPI Enabled"); | ||||||
|  | 
 | ||||||
|  |                 game.Run(); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,31 +1,31 @@ | ||||||
| <Project> | <Project> | ||||||
| 	<PropertyGroup> | 	<PropertyGroup> | ||||||
| 		<BaseIntermediateOutputPath>obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | 		<BaseIntermediateOutputPath>obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||||||
| 		<Platforms>x64;x86</Platforms> |  | ||||||
| 	</PropertyGroup> | 	</PropertyGroup> | ||||||
| 	<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" /> | 	<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" /> | ||||||
| 	<PropertyGroup> |   <PropertyGroup> | ||||||
| 		<OutputType>WinExe</OutputType> |     <OutputType>WinExe</OutputType> | ||||||
| 		<TargetFramework>net6.0</TargetFramework> |     <TargetFramework>netcoreapp3.1</TargetFramework> | ||||||
| 		<TargetName>ProjectName</TargetName> |     <TargetName>ProjectName</TargetName> | ||||||
| 		<GenerateAssemblyInfo>false</GenerateAssemblyInfo> |     <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||||||
| 		<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> |     <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> | ||||||
| 		<LangVersion>7.3</LangVersion> |     <LangVersion>8.0</LangVersion> | ||||||
| 		<StartupObject>ProjectName.Program</StartupObject> |     <StartupObject>ProjectName.Program</StartupObject> | ||||||
| 		<AssemblyName>ProjectName</AssemblyName> |     <AssemblyName>ProjectName</AssemblyName> | ||||||
| 		<RootNamespace>ProjectName</RootNamespace> |     <RootNamespace>ProjectName</RootNamespace> | ||||||
| 		<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> |     <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> | ||||||
| 		<RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers> |     <RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers> | ||||||
| 		<ApplicationIcon /> |     <ApplicationIcon/> | ||||||
| 	</PropertyGroup> |   </PropertyGroup> | ||||||
| 	<ItemGroup> |   <ItemGroup> | ||||||
| 		<Content Include="Content\**\*.*"> |     <Content Include="Content\**\*.*"> | ||||||
| 		<CopyToOutputDirectory>Always</CopyToOutputDirectory> |       <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||||
| 		</Content> |     </Content> | ||||||
| 	</ItemGroup> |   </ItemGroup> | ||||||
| 	<ItemGroup> |   <ItemGroup> | ||||||
| 		<ProjectReference Include="..\FNA\FNA.Core.csproj" /> |     <ProjectReference Include="..\FNA\FNA.Core.csproj"/> | ||||||
| 	</ItemGroup> |     <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" /> | ||||||
| 	<Import Project=".\CopyFNALibs.targets" /> |   </ItemGroup> | ||||||
| 	<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> |   <Import Project="..\build\CopyFNALibs.targets"/> | ||||||
|  |   <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> | ||||||
| </Project> | </Project> | ||||||
|  |  | ||||||
|  | @ -1,34 +1,34 @@ | ||||||
| <Project> | <Project> | ||||||
| 	<PropertyGroup> | 	<PropertyGroup> | ||||||
| 		<BaseIntermediateOutputPath>obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | 		<BaseIntermediateOutputPath>obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||||||
| 		<Platforms>x64;x86</Platforms> |  | ||||||
| 	</PropertyGroup> | 	</PropertyGroup> | ||||||
| 	<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" /> | 	<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" /> | ||||||
| 	<PropertyGroup> |   <PropertyGroup> | ||||||
| 		<OutputType>Exe</OutputType> |     <OutputType>WinExe</OutputType> | ||||||
| 		<TargetFramework>net461</TargetFramework> |     <TargetFramework>net461</TargetFramework> | ||||||
| 		<TargetName>ProjectName</TargetName> |     <TargetName>ProjectName</TargetName> | ||||||
| 		<GenerateAssemblyInfo>false</GenerateAssemblyInfo> |     <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||||||
| 		<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> |     <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> | ||||||
| 		<LangVersion>7.3</LangVersion> |     <LangVersion>8.0</LangVersion> | ||||||
| 		<StartupObject>ProjectName.Program</StartupObject> |     <StartupObject>ProjectName.Program</StartupObject> | ||||||
| 		<AssemblyName>ProjectName</AssemblyName> |     <AssemblyName>ProjectName</AssemblyName> | ||||||
| 		<RootNamespace>ProjectName</RootNamespace> |     <RootNamespace>ProjectName</RootNamespace> | ||||||
| 		<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> |     <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> | ||||||
| 		<RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers> |     <RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers> | ||||||
| 		<ApplicationIcon /> |     <ApplicationIcon/> | ||||||
| 	</PropertyGroup> |   </PropertyGroup> | ||||||
| 	<PropertyGroup> |   <PropertyGroup> | ||||||
| 		<DefaultItemExcludes>$(DefaultItemExcludes);DllMap.cs</DefaultItemExcludes> |     <DefaultItemExcludes>$(DefaultItemExcludes);DllMap.cs</DefaultItemExcludes> | ||||||
| 	</PropertyGroup> |   </PropertyGroup> | ||||||
| 	<ItemGroup> |   <ItemGroup> | ||||||
| 		<Content Include="Content\**\*.*"> |     <Content Include="Content\**\*.*"> | ||||||
| 			<CopyToOutputDirectory>Always</CopyToOutputDirectory> |       <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||||
| 		</Content> |     </Content> | ||||||
| 	</ItemGroup> |   </ItemGroup> | ||||||
| 	<ItemGroup> |   <ItemGroup> | ||||||
| 		<ProjectReference Include="..\FNA\FNA.csproj" /> |     <ProjectReference Include="..\FNA\FNA.csproj"/> | ||||||
| 	</ItemGroup> |     <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" /> | ||||||
| 	<Import Project=".\CopyFNALibs.targets" /> |   </ItemGroup> | ||||||
| 	<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> |   <Import Project="..\build\CopyFNALibs.targets"/> | ||||||
|  |   <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> | ||||||
| </Project> | </Project> | ||||||
|  |  | ||||||
|  | @ -1,52 +1,52 @@ | ||||||
|  | using Encompass; | ||||||
| using Microsoft.Xna.Framework; | using Microsoft.Xna.Framework; | ||||||
| using Microsoft.Xna.Framework.Graphics; | using Microsoft.Xna.Framework.Graphics; | ||||||
| 
 | 
 | ||||||
| namespace ProjectName | namespace ProjectName | ||||||
| { | { | ||||||
| 	class ProjectNameGame : Game |     class ProjectNameGame : Game | ||||||
| 	{ |     { | ||||||
| 		GraphicsDeviceManager graphics; |         GraphicsDeviceManager graphics; | ||||||
| 
 | 
 | ||||||
| 		public ProjectNameGame() |         WorldBuilder WorldBuilder { get; } = new WorldBuilder(); | ||||||
| 		{ |         World World { get; set; } | ||||||
| 			graphics = new GraphicsDeviceManager(this); |  | ||||||
| 			graphics.PreferredBackBufferWidth = 1280; |  | ||||||
| 			graphics.PreferredBackBufferHeight = 720; |  | ||||||
| 			graphics.PreferMultiSampling = true; |  | ||||||
| 			Content.RootDirectory = "Content"; |  | ||||||
| 
 | 
 | ||||||
| 			Window.AllowUserResizing = true; |         public ProjectNameGame() | ||||||
| 			IsMouseVisible = true; |         { | ||||||
| 		} |             graphics = new GraphicsDeviceManager(this); | ||||||
|  |             graphics.PreferredBackBufferWidth = 1280; | ||||||
|  |             graphics.PreferredBackBufferHeight = 720; | ||||||
|  |             graphics.PreferMultiSampling = true; | ||||||
|  |             Content.RootDirectory = "Content"; | ||||||
| 
 | 
 | ||||||
| 		protected override void LoadContent() |             Window.AllowUserResizing = true; | ||||||
| 		{ |             IsMouseVisible = true; | ||||||
| 			base.LoadContent(); |         } | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 		protected override void UnloadContent() |         protected override void LoadContent() | ||||||
| 		{ |         { | ||||||
| 			base.UnloadContent(); |             World = WorldBuilder.Build(); | ||||||
| 		} |         } | ||||||
| 
 | 
 | ||||||
| 		protected override void Update(GameTime gameTime) |         protected override void UnloadContent() | ||||||
| 		{ |         { | ||||||
| 			// |             base.UnloadContent(); | ||||||
| 			// Insert your game update logic here. |         } | ||||||
| 			// |  | ||||||
| 
 | 
 | ||||||
| 			base.Update(gameTime); |         protected override void Update(GameTime gameTime) | ||||||
| 		} |         { | ||||||
|  |             World.Update(gameTime.ElapsedGameTime.TotalSeconds); | ||||||
| 
 | 
 | ||||||
| 		protected override void Draw(GameTime gameTime) |             base.Update(gameTime); | ||||||
| 		{ |         } | ||||||
| 			// |  | ||||||
| 			// Replace this with your own drawing code. |  | ||||||
| 			// |  | ||||||
| 
 | 
 | ||||||
| 			GraphicsDevice.Clear(Color.CornflowerBlue); |         protected override void Draw(GameTime gameTime) | ||||||
|  |         { | ||||||
|  |             GraphicsDevice.Clear(Color.CornflowerBlue); | ||||||
| 
 | 
 | ||||||
| 			base.Draw(gameTime); |             World.Draw(); | ||||||
| 		} | 
 | ||||||
| 	} |             base.Draw(gameTime); | ||||||
|  |         } | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Put your Renderer classes here. | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Put your static Utility classes here. | ||||||
							
								
								
									
										27
									
								
								README.md
								
								
								
								
							
							
						
						
									
										27
									
								
								README.md
								
								
								
								
							|  | @ -1,25 +1,22 @@ | ||||||
| # FNA-VSCode-Template | # FNA-VSCode-Template | ||||||
| 
 | 
 | ||||||
| Template and build tasks for developing a cross-platform multi-target .NET Framework, Mono, and .NET 6 FNA project in VSCode. | Template and build tasks for developing a cross-platform multi-target .NET Framework and .NET Core FNA project in VSCode. | ||||||
| 
 |  | ||||||
| The generated solution file will also work in regular Visual Studio. |  | ||||||
| 
 | 
 | ||||||
| ## Features | ## Features | ||||||
| 
 | 
 | ||||||
| - Includes project boilerplate code | - Includes project boilerplate code | ||||||
| - Build tasks for both .NET Framework, Mono, and .NET 6 side by side | - Build tasks for both .NET Framework and .NET Core side by side | ||||||
| - VSCode debugger integration | - Press F5 to build and debug in-editor with Core Debugger | ||||||
| 
 | 
 | ||||||
| ## Requirements | ## Requirements | ||||||
| 
 | 
 | ||||||
| - [Git](https://git-scm.com/) or [Git for Windows](https://gitforwindows.org/) on Windows | - [Git](https://git-scm.com/) | ||||||
| - [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) | - [Git for Windows](https://gitforwindows.org/) if on Windows | ||||||
| - [.NET Framework 4.6.1 Developer Pack](https://dotnet.microsoft.com/download/dotnet-framework/net461) on Windows |  | ||||||
| - [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) on Windows |  | ||||||
| - [Mono](https://www.mono-project.com/) on OSX or Linux |  | ||||||
| - [Visual Studio Code](https://code.visualstudio.com/) | - [Visual Studio Code](https://code.visualstudio.com/) | ||||||
| - [VSCode C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp) | - [VSCode C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp) | ||||||
| - [VSCode Mono Debug Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.mono-debug) if debugging using Mono | - [.NET Core SDK](https://dotnet.microsoft.com/download/dotnet-core) | ||||||
|  | - [.NET Framework SDK](https://dotnet.microsoft.com/download/visual-studio-sdks) or [Mono](https://www.mono-project.com/) | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| ## Installation | ## Installation | ||||||
| 
 | 
 | ||||||
|  | @ -27,16 +24,14 @@ The generated solution file will also work in regular Visual Studio. | ||||||
| - Download this repository | - Download this repository | ||||||
| - Run `install.sh` | - Run `install.sh` | ||||||
| - Move the newly created project directory wherever you want | - Move the newly created project directory wherever you want | ||||||
| - On Windows, add `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin` to your system environment PATH variable after installing Build Tools for VS 2019 |  | ||||||
| 
 | 
 | ||||||
| ## Usage | ## Usage | ||||||
| 
 | 
 | ||||||
| - Open the project directory in VSCode | - Open the project directory in VSCode | ||||||
| - Press Ctrl-Shift-B to open the build tasks menu | - Press Ctrl-Shift-B to open the build tasks menu | ||||||
| - `Framework` tasks use .NET Framework to build and run (Windows only) | - `Framework` tasks use .NET Framework or Mono to build and run | ||||||
| - `Mono` tasks use Mono to build and run | - `Core` tasks use .NET Core to build and run | ||||||
| - `.NET 6` tasks use .NET 6 to build and run | - Press F5 to build and debug with Core Debugger | ||||||
| - Press F5 to build and debug |  | ||||||
| 
 | 
 | ||||||
| ## Acknowledgments | ## Acknowledgments | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										113
									
								
								install.sh
								
								
								
								
							
							
						
						
									
										113
									
								
								install.sh
								
								
								
								
							|  | @ -7,24 +7,30 @@ | ||||||
| # Get the directory of this script | # Get the directory of this script | ||||||
| MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||||||
| 
 | 
 | ||||||
|  | FNA_VERSION=20.07 | ||||||
|  | ENCOMPASS_VERSION=0.21.1 | ||||||
|  | 
 | ||||||
| readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";} | readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";} | ||||||
| 
 | 
 | ||||||
| # Checks if git is installed | # Checks if git is installed | ||||||
| function checkGit() | function checkGit() | ||||||
| { | { | ||||||
| 	git --version > /dev/null 2>&1 |     git --version > /dev/null 2>&1 | ||||||
| 	if [ ! $? -eq 0 ]; then |     if [ ! $? -eq 0 ]; then | ||||||
| 		echo >&2 "ERROR: Git is not installed. Please install git to download FNA." |         echo >&2 "ERROR: Git is not installed. Please install git to download FNA." | ||||||
| 		exit 1 |         exit 1 | ||||||
| 	fi |     fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # Pulls FNA from github | # Pulls FNA from github | ||||||
| function pullFNA() | function pullFNA() | ||||||
| { | { | ||||||
| 	checkGit |     checkGit | ||||||
| 	git submodule add https://github.com/FNA-XNA/FNA.git |     git submodule add https://github.com/FNA-XNA/FNA.git | ||||||
| 	echo "Updating to the latest git version of FNA..." |     cd FNA | ||||||
|  |     git checkout $FNA_VERSION | ||||||
|  |     cd .. | ||||||
|  |     echo "Updating to the latest version of FNA..." | ||||||
| 	git submodule update --init --recursive | 	git submodule update --init --recursive | ||||||
| 	if [ $? -eq 0 ]; then | 	if [ $? -eq 0 ]; then | ||||||
| 		echo "Finished updating!" | 		echo "Finished updating!" | ||||||
|  | @ -34,57 +40,66 @@ function pullFNA() | ||||||
| 	fi | 	fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | # Pulls Encompass from gitea | ||||||
|  | function pullEncompass() | ||||||
|  | { | ||||||
|  |     checkGit | ||||||
|  |     echo "Updating to latest version of Encompass..." | ||||||
|  |     git submodule add https://gitea.moonside.games/MoonsideGames/encompass-cs.git | ||||||
|  |     cd encompass-cs | ||||||
|  |     git checkout $ENCOMPASS_VERSION | ||||||
|  |     cd .. | ||||||
|  |     if [ $? -eq 0 ]; then | ||||||
|  |         echo "Finished updating!" | ||||||
|  |     else | ||||||
|  |         echo >&2 "ERROR: Unable to update." | ||||||
|  |         exit 1 | ||||||
|  |     fi | ||||||
|  | } | ||||||
|  | 
 | ||||||
| # Downloads and extracts prepackaged archive of native libraries ("fnalibs") | # Downloads and extracts prepackaged archive of native libraries ("fnalibs") | ||||||
| function getLibs() | function getLibs() | ||||||
| { | { | ||||||
| 	# Downloading |     # Downloading | ||||||
| 	echo "Downloading latest fnalibs..." |     echo "Downloading latest fnalibs..." | ||||||
| 	curl https://fna.flibitijibibo.com/archive/fnalibs.tar.bz2 > "$MY_DIR/fnalibs.tar.bz2" |     curl http://fna.flibitijibibo.com/archive/fnalibs.tar.bz2 > "$MY_DIR/fnalibs.tar.bz2" | ||||||
| 	if [ $? -eq 0 ]; then |     if [ $? -eq 0 ]; then | ||||||
| 		echo "Finished downloading!" |         echo "Finished downloading!" | ||||||
| 	else |     else | ||||||
| 		>&2 echo "ERROR: Unable to download successfully." |         >&2 echo "ERROR: Unable to download successfully." | ||||||
| 		exit 1 |         exit 1 | ||||||
| 	fi |     fi | ||||||
| 
 | 
 | ||||||
| 	# Decompressing |     # Decompressing | ||||||
| 	echo "Decompressing fnalibs..." |     echo "Decompressing fnalibs..." | ||||||
| 	mkdir -p "$MY_DIR"/fnalibs |     mkdir -p "$MY_DIR"/fnalibs | ||||||
| 	tar xjC "$MY_DIR"/fnalibs -f "$MY_DIR"/fnalibs.tar.bz2 |     tar xjC "$MY_DIR"/fnalibs -f "$MY_DIR"/fnalibs.tar.bz2 | ||||||
| 	if [ $? -eq 0 ]; then |     if [ $? -eq 0 ]; then | ||||||
| 		echo "Finished decompressing!" |         echo "Finished decompressing!" | ||||||
| 		echo "" |         echo "" | ||||||
| 		rm "$MY_DIR"/fnalibs.tar.bz2 |         rm "$MY_DIR"/fnalibs.tar.bz2 | ||||||
| 	else |     else | ||||||
| 		>&2 echo "ERROR: Unable to decompress successfully." |         >&2 echo "ERROR: Unable to decompress successfully." | ||||||
| 		exit 1 |         exit 1 | ||||||
| 	fi |     fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| read -p "Enter your project name or 'exit' to quit: " newProjectName |  | ||||||
| if [[ $newProjectName = 'exit' || -z "$newProjectName" ]]; then |  | ||||||
| 	exit 1 |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| NEW_PROJECT_DIR="$MY_DIR/../$newProjectName" |  | ||||||
| 
 |  | ||||||
| if [ -d "$NEW_PROJECT_DIR" ]; then |  | ||||||
| 	>&2 echo "ERROR: Project directory already exists." |  | ||||||
| 	exit 1 |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| getLibs | getLibs | ||||||
| 
 | 
 | ||||||
|  | read -p "Enter your project name or 'exit' to quit: " newProjectName | ||||||
|  | if [[ $newProjectName = 'exit' || -z "$newProjectName" ]]; then | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| # copy everything into new dir | # copy everything into new dir | ||||||
|  | NEW_PROJECT_DIR="$MY_DIR/../$newProjectName" | ||||||
| cp -R "$MY_DIR" "$NEW_PROJECT_DIR" | cp -R "$MY_DIR" "$NEW_PROJECT_DIR" | ||||||
| 
 | 
 | ||||||
| cd "$NEW_PROJECT_DIR" | cd "$NEW_PROJECT_DIR" | ||||||
| files=(ProjectName.Core.sln ProjectName.Framework.sln .gitignore ProjectName/ProjectName.Core.csproj ProjectName/ProjectName.Framework.csproj ProjectName/ProjectNameGame.cs ProjectName/Program.cs .vscode/tasks.json .vscode/launch.json) | files=(ProjectName.Core.sln ProjectName.Framework.sln .gitignore ProjectName/ProjectName.Core.csproj ProjectName/ProjectName.Framework.csproj ProjectName/ProjectNameGame.cs ProjectName/Program.cs .vscode/tasks.json .vscode/launch.json) | ||||||
| for file in "${files[@]}"; do | for file in "${files[@]}"; do | ||||||
| 	sed -i -e "s/ProjectName/$newProjectName/g" "./$file" |     sed -i -e "s/ProjectName/$newProjectName/g" "./$file" | ||||||
| 	if [ "$(uname)" == "Darwin" ]; then |     rm ./${file}-e | ||||||
| 		rm ./${file}-e |  | ||||||
| 	fi |  | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| mv ./ProjectName.Core.sln "./$newProjectName.Core.sln" | mv ./ProjectName.Core.sln "./$newProjectName.Core.sln" | ||||||
|  | @ -99,14 +114,12 @@ rm ./LICENSE | ||||||
| rm -rf .git | rm -rf .git | ||||||
| git init | git init | ||||||
| pullFNA | pullFNA | ||||||
| 
 | pullEncompass | ||||||
| dotnet sln ${newProjectName}.Framework.sln add FNA/FNA.csproj |  | ||||||
| dotnet sln ${newProjectName}.Core.sln add FNA/FNA.Core.csproj |  | ||||||
| 
 | 
 | ||||||
| echo "Project $newProjectName created at: " | echo "Project $newProjectName created at: " | ||||||
| 
 | 
 | ||||||
| if [ "$(uname)" == "Darwin" ]; then | if [ "$(uname)" == "Darwin" ]; then | ||||||
| 	echo $(readlinkf $NEW_PROJECT_DIR) |     echo $(readlinkf $NEW_PROJECT_DIR) | ||||||
| else | else | ||||||
| 	echo $(readlink -f $NEW_PROJECT_DIR) |     echo $(readlink -f $NEW_PROJECT_DIR) | ||||||
| fi | fi | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue