From 795f3259a6a030fcf4e7008cca1cc492b43c469e Mon Sep 17 00:00:00 2001 From: Rob Martens Date: Sat, 29 Dec 2018 01:16:27 -0500 Subject: [PATCH] Add Nuke build system Will be amended as necessary before pushing public, but a commit while this at least partially works seems wise. --- .editorconfig | 2 +- .gitignore | 5 + .nuke | 0 Arbatel.Gtk/App.config | 6 - Arbatel.sln | 44 +++- Directory.Build.props | 20 ++ Directory.Build.targets | 20 ++ SharedAssemblyInfo.cs | 24 -- build.ps1 | 69 +++++ build.sh | 72 ++++++ build/.editorconfig | 10 + build/Build.cs | 232 +++++++++++++++++ build/_build.csproj | 40 +++ build/_build.csproj.DotSettings | 23 ++ .../Arbatel.Core}/Arbatel.Core.csproj | 13 +- .../Arbatel.Core}/Assembly.cs | 0 .../Arbatel.Core}/Controllers/Controller.cs | 0 .../Controllers/FirstPersonController.cs | 0 .../Arbatel.Core}/Controls/View.cs | 0 .../Arbatel.Core}/Controls/View3d.cs | 0 .../Arbatel.Core}/Controls/Viewport.cs | 0 .../Arbatel.Core}/Formats/Block.cs | 0 .../Arbatel.Core}/Formats/Definition.cs | 0 .../Formats/DefinitionDictionary.cs | 0 .../Arbatel.Core}/Formats/Loader.cs | 0 .../Arbatel.Core}/Formats/Map.cs | 0 .../Arbatel.Core}/Formats/MapObject.cs | 0 .../Arbatel.Core}/Formats/Quake/QuakeBlock.cs | 0 .../Arbatel.Core}/Formats/Quake/QuakeFgd.cs | 0 .../Arbatel.Core}/Formats/Quake/QuakeMap.cs | 0 .../Formats/Quake/QuakeMapObject.cs | 0 .../Arbatel.Core}/Formats/Quake/QuakeSide.cs | 0 .../Arbatel.Core}/Formats/Quake/Wad2.cs | 0 .../Arbatel.Core}/Formats/Side.cs | 0 .../Arbatel.Core}/Formats/Solid.cs | 0 .../Formats/TextureDictionary.cs | 0 .../Arbatel.Core}/Graphics/AABB.cs | 0 .../Arbatel.Core}/Graphics/Backend.cs | 0 .../Arbatel.Core}/Graphics/BoxGenerator.cs | 0 .../Arbatel.Core}/Graphics/Camera.cs | 0 .../Arbatel.Core}/Graphics/FlatShader.cs | 0 .../Arbatel.Core}/Graphics/GemGenerator.cs | 0 .../Arbatel.Core}/Graphics/OpenGLBackend.cs | 0 .../Arbatel.Core}/Graphics/Plane.cs | 0 .../Arbatel.Core}/Graphics/QuakeBrush.cs | 0 .../Arbatel.Core}/Graphics/Renderable.cs | 0 .../Graphics/RenderableGenerator.cs | 0 .../Arbatel.Core}/Graphics/Shader.cs | 0 .../Graphics/SingleTextureShader.cs | 0 .../Arbatel.Core}/Graphics/Texture.cs | 0 .../Arbatel.Core}/Graphics/Vertex.cs | 0 .../Arbatel.Core}/Graphics/Winding.cs | 0 .../Arbatel.Core}/OpenTK.dll.config | 0 {Arbatel.Core => src/Arbatel.Core}/Startup.cs | 0 .../Arbatel.Core}/UI/MainForm/Commands.cs | 0 .../Arbatel.Core}/UI/MainForm/MainForm.cs | 0 .../Arbatel.Core}/UI/MainForm/MainForm.eto.cs | 0 .../Arbatel.Core}/UI/Preferences/Commands.cs | 0 .../UI/Preferences/ControlsTab.eto.cs | 0 .../UI/Preferences/DefinitionsTab.eto.cs | 0 .../UI/Preferences/PreferencesDialog.cs | 0 .../UI/Preferences/PreferencesDialog.eto.cs | 0 .../UI/Preferences/TexturesTab.eto.cs | 0 .../UI/Settings/LocalSettings.cs | 0 .../UI/Settings/RoamingSettings.cs | 0 .../Utilities/AssemblyUtilities.cs | 0 .../Arbatel.Core}/Utilities/Formatting.cs | 0 .../Arbatel.Core}/Utilities/MathUtilities.cs | 0 src/Arbatel.Core/build.ps1 | 242 ++++++++++++++++++ .../Arbatel.Core}/res/palette-quake.lmp | Bin src/gui/Arbatel.Gtk/App.config | 11 + .../gui/Arbatel.Gtk}/Arbatel.Gtk.csproj | 16 +- .../gui/Arbatel.Gtk}/Program.cs | 0 src/gui/Arbatel.Mac/App.config | 11 + .../gui/Arbatel.Mac}/Arbatel.Mac.csproj | 6 +- .../gui/Arbatel.Mac}/Icon.icns | Bin .../gui/Arbatel.Mac}/Info.plist | 0 .../gui/Arbatel.Mac}/Program.cs | 0 .../gui/Arbatel.WinForms/App.config | 16 +- .../Arbatel.WinForms}/Arbatel.WinForms.csproj | 21 +- .../gui/Arbatel.WinForms}/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 0 .../gui/Arbatel.Wpf}/App.config | 17 +- .../gui/Arbatel.Wpf}/Arbatel.Wpf.csproj | 8 +- .../gui/Arbatel.Wpf}/Program.cs | 0 .../Arbatel.Wpf}/Properties/AssemblyInfo.cs | 0 .../gui/Arbatel.XamMac}/Arbatel.XamMac.csproj | 6 +- .../AppIcon.appiconset/AppIcon-128.png | Bin .../AppIcon.appiconset/AppIcon-128@2x.png | Bin .../AppIcon.appiconset/AppIcon-16.png | Bin .../AppIcon.appiconset/AppIcon-16@2x.png | Bin .../AppIcon.appiconset/AppIcon-256.png | Bin .../AppIcon.appiconset/AppIcon-256@2x.png | Bin .../AppIcon.appiconset/AppIcon-32.png | Bin .../AppIcon.appiconset/AppIcon-32@2x.png | Bin .../AppIcon.appiconset/AppIcon-512.png | Bin .../AppIcon.appiconset/AppIcon-512@2x.png | Bin .../AppIcon.appiconset/Contents.json | 0 .../Assets.xcassets/Contents.json | 0 .../gui/Arbatel.XamMac}/Info.plist | 0 .../gui/Arbatel.XamMac}/Program.cs | 0 src/gui/Directory.Build.targets | 22 ++ .../data/instance/arrow_wedge.map | 0 .../data/instance/arrow_wedge_holder.map | 0 .../data/instance/rotation_instance.map | 0 .../data/instance_test-arrow_wedge.map | 0 .../data/instance_test-pitch.map | 0 .../data/instance_test-roll.map | 0 .../data/instance_test-yaw.map | 0 {ArbatelTest.Core => test}/data/test.wad | Bin .../src/ArbatelTest.Core}/App.config | 0 .../ArbatelTest.Core}/ArbatelTest.Core.csproj | 24 +- .../Features/Instance/Nesting.cs | 0 .../Features/Instance/Rotation.cs | 0 .../Features/Instance/SetUp.cs | 0 .../FormatsTest/BlockTest.cs | 0 .../GraphicsTest/GraphicsTest.cs | 0 .../src/ArbatelTest.Core}/OpenTK.dll.config | 0 .../Properties/AssemblyInfo.cs | 0 .../UtilitiesTest/MathUtilitiesTest.cs | 0 .../src/ArbatelTest.Core}/packages.config | 0 121 files changed, 875 insertions(+), 107 deletions(-) create mode 100644 .nuke delete mode 100644 Arbatel.Gtk/App.config create mode 100644 Directory.Build.props create mode 100644 Directory.Build.targets delete mode 100644 SharedAssemblyInfo.cs create mode 100644 build.ps1 create mode 100644 build.sh create mode 100644 build/.editorconfig create mode 100644 build/Build.cs create mode 100644 build/_build.csproj create mode 100644 build/_build.csproj.DotSettings rename {Arbatel.Core => src/Arbatel.Core}/Arbatel.Core.csproj (79%) rename {Arbatel.Core => src/Arbatel.Core}/Assembly.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Controllers/Controller.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Controllers/FirstPersonController.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Controls/View.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Controls/View3d.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Controls/Viewport.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Block.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Definition.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/DefinitionDictionary.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Loader.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Map.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/MapObject.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Quake/QuakeBlock.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Quake/QuakeFgd.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Quake/QuakeMap.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Quake/QuakeMapObject.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Quake/QuakeSide.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Quake/Wad2.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Side.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/Solid.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Formats/TextureDictionary.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/AABB.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Backend.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/BoxGenerator.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Camera.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/FlatShader.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/GemGenerator.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/OpenGLBackend.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Plane.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/QuakeBrush.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Renderable.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/RenderableGenerator.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Shader.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/SingleTextureShader.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Texture.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Vertex.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Graphics/Winding.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/OpenTK.dll.config (100%) rename {Arbatel.Core => src/Arbatel.Core}/Startup.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/MainForm/Commands.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/MainForm/MainForm.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/MainForm/MainForm.eto.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Preferences/Commands.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Preferences/ControlsTab.eto.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Preferences/DefinitionsTab.eto.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Preferences/PreferencesDialog.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Preferences/PreferencesDialog.eto.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Preferences/TexturesTab.eto.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Settings/LocalSettings.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/UI/Settings/RoamingSettings.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Utilities/AssemblyUtilities.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Utilities/Formatting.cs (100%) rename {Arbatel.Core => src/Arbatel.Core}/Utilities/MathUtilities.cs (100%) create mode 100644 src/Arbatel.Core/build.ps1 rename {Arbatel.Core => src/Arbatel.Core}/res/palette-quake.lmp (100%) create mode 100644 src/gui/Arbatel.Gtk/App.config rename {Arbatel.Gtk => src/gui/Arbatel.Gtk}/Arbatel.Gtk.csproj (83%) rename {Arbatel.Gtk => src/gui/Arbatel.Gtk}/Program.cs (100%) create mode 100644 src/gui/Arbatel.Mac/App.config rename {Arbatel.Mac => src/gui/Arbatel.Mac}/Arbatel.Mac.csproj (64%) rename {Arbatel.Mac => src/gui/Arbatel.Mac}/Icon.icns (100%) rename {Arbatel.Mac => src/gui/Arbatel.Mac}/Info.plist (100%) rename {Arbatel.Mac => src/gui/Arbatel.Mac}/Program.cs (100%) rename Arbatel.WinForms/app.config => src/gui/Arbatel.WinForms/App.config (61%) rename {Arbatel.WinForms => src/gui/Arbatel.WinForms}/Arbatel.WinForms.csproj (85%) rename {Arbatel.WinForms => src/gui/Arbatel.WinForms}/Program.cs (97%) rename {Arbatel.WinForms => src/gui/Arbatel.WinForms}/Properties/AssemblyInfo.cs (100%) rename {Arbatel.Wpf => src/gui/Arbatel.Wpf}/App.config (74%) rename {Arbatel.Wpf => src/gui/Arbatel.Wpf}/Arbatel.Wpf.csproj (92%) rename {Arbatel.Wpf => src/gui/Arbatel.Wpf}/Program.cs (100%) rename {Arbatel.Wpf => src/gui/Arbatel.Wpf}/Properties/AssemblyInfo.cs (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Arbatel.XamMac.csproj (94%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Assets.xcassets/Contents.json (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Info.plist (100%) rename {Arbatel.XamMac => src/gui/Arbatel.XamMac}/Program.cs (100%) create mode 100644 src/gui/Directory.Build.targets rename {ArbatelTest.Core => test}/data/instance/arrow_wedge.map (100%) rename {ArbatelTest.Core => test}/data/instance/arrow_wedge_holder.map (100%) rename {ArbatelTest.Core => test}/data/instance/rotation_instance.map (100%) rename {ArbatelTest.Core => test}/data/instance_test-arrow_wedge.map (100%) rename {ArbatelTest.Core => test}/data/instance_test-pitch.map (100%) rename {ArbatelTest.Core => test}/data/instance_test-roll.map (100%) rename {ArbatelTest.Core => test}/data/instance_test-yaw.map (100%) rename {ArbatelTest.Core => test}/data/test.wad (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/App.config (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/ArbatelTest.Core.csproj (70%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/Features/Instance/Nesting.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/Features/Instance/Rotation.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/Features/Instance/SetUp.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/FormatsTest/BlockTest.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/GraphicsTest/GraphicsTest.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/OpenTK.dll.config (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/Properties/AssemblyInfo.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/UtilitiesTest/MathUtilitiesTest.cs (100%) rename {ArbatelTest.Core => test/src/ArbatelTest.Core}/packages.config (100%) diff --git a/.editorconfig b/.editorconfig index c74e7eb..a6f9595 100644 --- a/.editorconfig +++ b/.editorconfig @@ -58,7 +58,7 @@ dotnet_style_prefer_auto_properties = true dotnet_style_coalesce_expression = true dotnet_style_null_propagation = true -[*.csproj] +[*.{csproj,props,targets}] indent_style = space indent_size = 2 diff --git a/.gitignore b/.gitignore index d89e6fc..087e5f9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ MigrationBackup/ # design plans, a todo list, and general notes. Useful, but not for the repo. scratch/ +staging/ + # J.A.C.K. backups of .map files *.max @@ -265,6 +267,9 @@ paket-files/ # Re-include dependencies otherwise excluded by the above. !lib/** +tools/* +!tools/packages.config + # ========================= # Operating System Files # ========================= diff --git a/.nuke b/.nuke new file mode 100644 index 0000000..e69de29 diff --git a/Arbatel.Gtk/App.config b/Arbatel.Gtk/App.config deleted file mode 100644 index b50c74f..0000000 --- a/Arbatel.Gtk/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Arbatel.sln b/Arbatel.sln index b17fa66..97f6782 100644 --- a/Arbatel.sln +++ b/Arbatel.sln @@ -1,26 +1,40 @@ + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2026 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arbatel.Core", "Arbatel.Core\Arbatel.Core.csproj", "{A5FFC3A4-78CA-44F2-B8A8-F18DADF1690A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arbatel.Core", "src\Arbatel.Core\Arbatel.Core.csproj", "{A5FFC3A4-78CA-44F2-B8A8-F18DADF1690A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arbatel.WinForms", "Arbatel.WinForms\Arbatel.WinForms.csproj", "{4925B6D7-8B10-43D7-8CA9-D7A03B2B622E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arbatel.WinForms", "src\gui\Arbatel.WinForms\Arbatel.WinForms.csproj", "{4925B6D7-8B10-43D7-8CA9-D7A03B2B622E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArbatelTest.Core", "ArbatelTest.Core\ArbatelTest.Core.csproj", "{4B4E25A8-B7D3-420D-8193-1785E0528D5E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArbatelTest.Core", "test\src\ArbatelTest.Core\ArbatelTest.Core.csproj", "{4B4E25A8-B7D3-420D-8193-1785E0528D5E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arbatel.Wpf", "Arbatel.Wpf\Arbatel.Wpf.csproj", "{63B65D5D-D3F6-4C18-B4B4-75A0DFEEE635}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arbatel.Wpf", "src\gui\Arbatel.Wpf\Arbatel.Wpf.csproj", "{63B65D5D-D3F6-4C18-B4B4-75A0DFEEE635}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arbatel.Mac", "Arbatel.Mac\Arbatel.Mac.csproj", "{82126DF9-6E7A-4DB4-8C78-7406786CC70C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arbatel.Mac", "src\gui\Arbatel.Mac\Arbatel.Mac.csproj", "{82126DF9-6E7A-4DB4-8C78-7406786CC70C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arbatel.Gtk", "Arbatel.Gtk\Arbatel.Gtk.csproj", "{94AE77B4-896E-4184-B351-A2E35F98535E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arbatel.Gtk", "src\gui\Arbatel.Gtk\Arbatel.Gtk.csproj", "{94AE77B4-896E-4184-B351-A2E35F98535E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arbatel.XamMac", "Arbatel.XamMac\Arbatel.XamMac.csproj", "{73F11BF1-A18D-4091-B451-C884FDDD922F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arbatel.XamMac", "src\gui\Arbatel.XamMac\Arbatel.XamMac.csproj", "{73F11BF1-A18D-4091-B451-C884FDDD922F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{16A799F0-6BE4-430B-9D9C-2645193C7ED3}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{16A799F0-6BE4-430B-9D9C-2645193C7ED3}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{25570A55-7D75-4A24-84C1-864BBB2A0545}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gui", "gui", "{697D0DF3-4FE0-49DC-828E-60A3898F2368}" + ProjectSection(SolutionItems) = preProject + src\gui\Directory.Build.targets = src\gui\Directory.Build.targets + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{9E70FBE8-83E7-49E5-9495-626693C6D26A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0CA443D2-1B96-46DE-A904-AF9E2E8A5731}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,10 +69,24 @@ Global {73F11BF1-A18D-4091-B451-C884FDDD922F}.Debug|Any CPU.Build.0 = Debug|Any CPU {73F11BF1-A18D-4091-B451-C884FDDD922F}.Release|Any CPU.ActiveCfg = Release|Any CPU {73F11BF1-A18D-4091-B451-C884FDDD922F}.Release|Any CPU.Build.0 = Release|Any CPU + {25570A55-7D75-4A24-84C1-864BBB2A0545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25570A55-7D75-4A24-84C1-864BBB2A0545}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25570A55-7D75-4A24-84C1-864BBB2A0545}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25570A55-7D75-4A24-84C1-864BBB2A0545}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A5FFC3A4-78CA-44F2-B8A8-F18DADF1690A} = {9E70FBE8-83E7-49E5-9495-626693C6D26A} + {4925B6D7-8B10-43D7-8CA9-D7A03B2B622E} = {697D0DF3-4FE0-49DC-828E-60A3898F2368} + {4B4E25A8-B7D3-420D-8193-1785E0528D5E} = {0CA443D2-1B96-46DE-A904-AF9E2E8A5731} + {63B65D5D-D3F6-4C18-B4B4-75A0DFEEE635} = {697D0DF3-4FE0-49DC-828E-60A3898F2368} + {82126DF9-6E7A-4DB4-8C78-7406786CC70C} = {697D0DF3-4FE0-49DC-828E-60A3898F2368} + {94AE77B4-896E-4184-B351-A2E35F98535E} = {697D0DF3-4FE0-49DC-828E-60A3898F2368} + {73F11BF1-A18D-4091-B451-C884FDDD922F} = {697D0DF3-4FE0-49DC-828E-60A3898F2368} + {25570A55-7D75-4A24-84C1-864BBB2A0545} = {16A799F0-6BE4-430B-9D9C-2645193C7ED3} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3C1D08AD-2C29-462B-BE50-224C00AC61D4} EndGlobalSection diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..1b593ca --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,20 @@ + + + + Windows + Linux + macOS + + + + 0.1.0 + Big Dumb Idiot + Copyright © 2018 + Arbatel + + + + true + + + diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000..eba3fe4 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,20 @@ + + + + + diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs deleted file mode 100644 index 234c12c..0000000 --- a/SharedAssemblyInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyCompany("Robert Martens")] -[assembly: AssemblyProduct("Temblor")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("0.1.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..64beb44 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,69 @@ +[CmdletBinding()] +Param( + #[switch]$CustomParam, + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$BuildArguments +) + +Write-Output "Windows PowerShell $($Host.Version)" + +Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 } +$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent + +########################################################################### +# CONFIGURATION +########################################################################### + +$BuildProjectFile = "$PSScriptRoot\build\_build.csproj" +$TempDirectory = "$PSScriptRoot\\.tmp" + +$DotNetGlobalFile = "$PSScriptRoot\\global.json" +$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" +$DotNetChannel = "Current" + +$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 +$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 +$env:NUGET_XMLDOC_MODE = "skip" + +########################################################################### +# EXECUTION +########################################################################### + +function ExecSafe([scriptblock] $cmd) { + & $cmd + if ($LASTEXITCODE) { exit $LASTEXITCODE } +} + +# If global.json exists, load expected version +if (Test-Path $DotNetGlobalFile) { + $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json) + if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) { + $DotNetVersion = $DotNetGlobal.sdk.version + } +} + +# If dotnet is installed locally, and expected version is not set or installation matches the expected version +if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -ne $null -and ` + (!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) { + $env:DOTNET_EXE = (Get-Command "dotnet").Path +} +else { + $DotNetDirectory = "$TempDirectory\dotnet-win" + $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" + + # Download install script + $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" + md -force $TempDirectory > $null + (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) + + # Install by channel or version + if (!(Test-Path variable:DotNetVersion)) { + ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } + } else { + ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } + } +} + +Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" + +ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile -- $BuildArguments } diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..5a69449 --- /dev/null +++ b/build.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +echo $(bash --version 2>&1 | head -n 1) + +#CUSTOMPARAM=0 +BUILD_ARGUMENTS=() +for i in "$@"; do + case $(echo $1 | awk '{print tolower($0)}') in + # -custom-param) CUSTOMPARAM=1;; + *) BUILD_ARGUMENTS+=("$1") ;; + esac + shift +done + +set -eo pipefail +SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) + +########################################################################### +# CONFIGURATION +########################################################################### + +BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj" +TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" + +DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" +DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" +DOTNET_CHANNEL="Current" + +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +export NUGET_XMLDOC_MODE="skip" + +########################################################################### +# EXECUTION +########################################################################### + +function FirstJsonValue { + perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2} +} + +# If global.json exists, load expected version +if [ -f "$DOTNET_GLOBAL_FILE" ]; then + DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) + if [ "$DOTNET_VERSION" == "" ]; then + unset DOTNET_VERSION + fi +fi + +# If dotnet is installed locally, and expected version is not set or installation matches the expected version +if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") ]]; then + export DOTNET_EXE="$(command -v dotnet)" +else + DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" + export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + + # Download install script + DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" + mkdir -p "$TEMP_DIRECTORY" + curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" + chmod +x "$DOTNET_INSTALL_FILE" + + # Install by channel or version + if [ -z ${DOTNET_VERSION+x} ]; then + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path + else + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path + fi +fi + +echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" + +"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} diff --git a/build/.editorconfig b/build/.editorconfig new file mode 100644 index 0000000..94be682 --- /dev/null +++ b/build/.editorconfig @@ -0,0 +1,10 @@ +[*.cs] +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning +dotnet_style_require_accessibility_modifiers = never:warning + +csharp_style_expression_bodied_properties = true:warning +csharp_style_expression_bodied_indexers = true:warning +csharp_style_expression_bodied_accessors = true:warning diff --git a/build/Build.cs b/build/Build.cs new file mode 100644 index 0000000..50b26ce --- /dev/null +++ b/build/Build.cs @@ -0,0 +1,232 @@ +using Nuke.Common; +using Nuke.Common.Git; +using Nuke.Common.ProjectModel; +using Nuke.Common.Tooling; +using Nuke.Common.Tools.GitVersion; +using Nuke.Common.Tools.MSBuild; +using Nuke.Common.Tools.Nunit; +using SharpCompress.Archives; +using SharpCompress.Archives.Zip; +using SharpCompress.Common; +using SharpCompress.Compressors.Deflate; +using SharpCompress.Writers; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Text; +using static Nuke.Common.IO.FileSystemTasks; +using static Nuke.Common.IO.PathConstruction; +using static Nuke.Common.Tools.MSBuild.MSBuildTasks; +using static Nuke.Common.Tools.NuGet.NuGetTasks; +using static Nuke.Common.Tools.Nunit.NunitTasks; + +class Build : NukeBuild +{ + public static string GetMsBuildPath() + { + // Visual Studio 2017 Update 2 and newer install vswhere by default. + return GetMsBuildPath("vswhere.exe"); + } + public static string GetMsBuildPath(string vswherePath) + { + string args = "-latest -products * -requires Microsoft.Component.MSBuild"; + + var vswhere = new Process(); + vswhere.StartInfo.FileName = vswherePath; + vswhere.StartInfo.UseShellExecute = false; + vswhere.StartInfo.RedirectStandardOutput = true; + vswhere.StartInfo.CreateNoWindow = true; + + vswhere.StartInfo.Arguments = String.Join(' ', args, "-property installationPath"); + vswhere.Start(); + var output = new StringBuilder(); + while (!vswhere.StandardOutput.EndOfStream) + { + output.Append(vswhere.StandardOutput.ReadLine()); + } + string vsPath = output.ToString(); + + vswhere.StartInfo.Arguments = String.Join(' ', args, "-property installationVersion"); + vswhere.Start(); + output.Clear(); + while (!vswhere.StandardOutput.EndOfStream) + { + output.Append(vswhere.StandardOutput.ReadLine()); + } + Int32.TryParse(output.ToString().Split('.')[0], out int vsMajor); + + if (vsMajor < 15) + { + throw new Exception("Can't build with less than VS 2017!"); + } + + return Path.Combine(vsPath, "MSBuild", vsMajor.ToString() + ".0", "Bin", "MSBuild.exe"); + } + + public static int Main() + { + return Execute(x => x.PackageWindows); + } + + [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] + readonly string Configuration = IsLocalBuild ? "Debug" : "Release"; + + const string ProjectName = "Arbatel"; + + [Solution(ProjectName + ".sln")] + readonly Solution Solution; + + [GitRepository] + readonly GitRepository GitRepository; + + [GitVersion] + readonly GitVersion GitVersion; + + AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; + AbsolutePath StagingDirectory => RootDirectory / "staging"; + AbsolutePath SourceDirectory => RootDirectory / "src"; + + Target Clean => _ => _ + .Executes(() => + { + // Using SetTargets("Rebuild") in the compile targets below would + // ensure that everything got cleaned and built fresh every time the + // build scripts were run. Unfortunately, project references in + // .csproj files mean that dependencies would also be rebuilt, which + // in this case means the core class library. To start fresh every + // time, but still build the core library only once, it's important + // to clean all the bin and obj folders along with the staging + // directory. Then use SetTargets("Build") on each GUI project to + // trigger an incremental build. The core will have been built anew, + // and no time will be wasted rebuilding it for every GUI app. + + // Make sure all files are gone first; can't remove empty folders. + foreach (string file in GlobFiles(SourceDirectory, "**/bin/**/*", "**/obj/**/*")) + { + DeleteFile(file); + } + + IEnumerable directories = GlobDirectories(SourceDirectory, "**/bin/**", "**/obj/**"); + + // Sort paths by length, and reverse to delete the deepest first; + // the parent levels will then be empty and cleanly deletable. + var list = new List(directories); + list.Sort((a, b) => a.Length.CompareTo(b.Length)); + list.Reverse(); + DeleteDirectories(list); + + EnsureCleanDirectory(StagingDirectory); + }); + + Target CompileCore => _ => _ + .DependsOn(Clean) + .Executes(() => + { + string msbuildPath = GetMsBuildPath(); + + AbsolutePath projectDir = RootDirectory / "src" / $"{ProjectName}.Core"; + AbsolutePath project = projectDir / $"{ProjectName}.Core.csproj"; + + MSBuildProject parsed = MSBuildParseProject(project, s => s.SetToolPath(msbuildPath)); + + AbsolutePath buildDir = projectDir / parsed.Properties["OutputPath"]; + + NuGetRestore(project); + + MSBuild(s => new MSBuildSettings() + .SetToolPath(msbuildPath) + .SetProjectFile(project) + .SetTargets("Build") + .SetConfiguration(Configuration) + .SetAssemblyVersion(GitVersion.GetNormalizedAssemblyVersion()) + .SetFileVersion(GitVersion.GetNormalizedFileVersion()) + .SetInformationalVersion(GitVersion.InformationalVersion) + .SetMaxCpuCount(Environment.ProcessorCount) + .SetNodeReuse(IsLocalBuild)); + }); + + Target CompileWindows => _ => _ + .DependsOn(CompileCore) + .Executes(() => + { + // Currently, Nuke can only find C drive installations of VS. + string msbuildPath = GetMsBuildPath(); + + foreach (string platform in new string[] { "WinForms" })//, "Wpf" }) + { + AbsolutePath projectDir = RootDirectory / "src" / "gui" / $"{ProjectName}.{platform}"; + AbsolutePath project = projectDir / $"{ProjectName}.{platform}.csproj"; + + MSBuildProject parsed = MSBuildParseProject(project, s => s.SetToolPath(msbuildPath)); + + AbsolutePath buildDir = projectDir / parsed.Properties["OutputPath"]; + + NuGetRestore(project); + + MSBuild(s => new MSBuildSettings() + .SetToolPath(msbuildPath) + .SetProjectFile(project) + .SetTargets("Build") + .SetConfiguration(Configuration) + .SetAssemblyVersion(GitVersion.GetNormalizedAssemblyVersion()) + .SetFileVersion(GitVersion.GetNormalizedFileVersion()) + .SetInformationalVersion(GitVersion.InformationalVersion) + .SetMaxCpuCount(Environment.ProcessorCount) + .SetNodeReuse(IsLocalBuild)); + + CopyDirectoryRecursively(buildDir, StagingDirectory); + } + }); + + Target CompileTests => _ => _ + .DependsOn(CompileCore) + .Executes(() => + { + string project = RootDirectory / "test" / "src" / $"{ProjectName}Test.Core" / $"{ProjectName}Test.Core.csproj"; + + NuGetRestore(project); + + MSBuildSettings settings = new MSBuildSettings() + .SetProjectFile(project) + .SetTargets("Rebuild") + .SetConfiguration(Configuration) + .SetAssemblyVersion(GitVersion.GetNormalizedAssemblyVersion()) + .SetFileVersion(GitVersion.GetNormalizedFileVersion()) + .SetInformationalVersion(GitVersion.InformationalVersion) + .SetMaxCpuCount(Environment.ProcessorCount) + .SetNodeReuse(IsLocalBuild); + + if (EnvironmentInfo.IsWin) + { + settings = settings.SetToolPath(GetMsBuildPath()); + } + + MSBuild(s => settings); + }); + + Target TestWindows => _ => _ + .DependsOn(CompileWindows, CompileTests) + .Executes(() => + { + Nunit3(s => new Nunit3Settings() + .SetInputFiles(RootDirectory / "test" / $"{ProjectName}Test.Core" / ".csproj")); + }); + + Target PackageWindows => _ => _ + //.DependsOn(TestWindows) + .DependsOn(CompileWindows) + .Executes(() => + { + EnsureExistingDirectory(ArtifactsDirectory); + + using (var archive = ZipArchive.Create()) + { + archive.DeflateCompressionLevel = CompressionLevel.BestCompression; + archive.AddAllFromDirectory(StagingDirectory); + + string name = String.Join('-', ProjectName, GitVersion.SemVer, EnvironmentInfo.Platform); + archive.SaveTo(ArtifactsDirectory / name + ".zip", new WriterOptions(CompressionType.Deflate)); + } + }); +} diff --git a/build/_build.csproj b/build/_build.csproj new file mode 100644 index 0000000..5d19883 --- /dev/null +++ b/build/_build.csproj @@ -0,0 +1,40 @@ + + + + Exe + netcoreapp2.0 + false + + False + CS0649;CS0169 + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/_build.csproj.DotSettings b/build/_build.csproj.DotSettings new file mode 100644 index 0000000..96e392e --- /dev/null +++ b/build/_build.csproj.DotSettings @@ -0,0 +1,23 @@ + + False + Implicit + Implicit + ExpressionBody + 0 + NEXT_LINE + True + False + 120 + IF_OWNER_IS_SINGLE_LINE + WRAP_IF_LONG + False + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + True + True + True + True + True + True + True + True diff --git a/Arbatel.Core/Arbatel.Core.csproj b/src/Arbatel.Core/Arbatel.Core.csproj similarity index 79% rename from Arbatel.Core/Arbatel.Core.csproj rename to src/Arbatel.Core/Arbatel.Core.csproj index 155b602..9e4d080 100644 --- a/Arbatel.Core/Arbatel.Core.csproj +++ b/src/Arbatel.Core/Arbatel.Core.csproj @@ -1,11 +1,4 @@ - - - - Rob Martens - Arbatel - Copyright © 2018 - 0.1.0 - + netstandard2.0 @@ -32,7 +25,7 @@ - + PreserveNewest @@ -49,7 +42,7 @@ - ..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll + ..\..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll diff --git a/Arbatel.Core/Assembly.cs b/src/Arbatel.Core/Assembly.cs similarity index 100% rename from Arbatel.Core/Assembly.cs rename to src/Arbatel.Core/Assembly.cs diff --git a/Arbatel.Core/Controllers/Controller.cs b/src/Arbatel.Core/Controllers/Controller.cs similarity index 100% rename from Arbatel.Core/Controllers/Controller.cs rename to src/Arbatel.Core/Controllers/Controller.cs diff --git a/Arbatel.Core/Controllers/FirstPersonController.cs b/src/Arbatel.Core/Controllers/FirstPersonController.cs similarity index 100% rename from Arbatel.Core/Controllers/FirstPersonController.cs rename to src/Arbatel.Core/Controllers/FirstPersonController.cs diff --git a/Arbatel.Core/Controls/View.cs b/src/Arbatel.Core/Controls/View.cs similarity index 100% rename from Arbatel.Core/Controls/View.cs rename to src/Arbatel.Core/Controls/View.cs diff --git a/Arbatel.Core/Controls/View3d.cs b/src/Arbatel.Core/Controls/View3d.cs similarity index 100% rename from Arbatel.Core/Controls/View3d.cs rename to src/Arbatel.Core/Controls/View3d.cs diff --git a/Arbatel.Core/Controls/Viewport.cs b/src/Arbatel.Core/Controls/Viewport.cs similarity index 100% rename from Arbatel.Core/Controls/Viewport.cs rename to src/Arbatel.Core/Controls/Viewport.cs diff --git a/Arbatel.Core/Formats/Block.cs b/src/Arbatel.Core/Formats/Block.cs similarity index 100% rename from Arbatel.Core/Formats/Block.cs rename to src/Arbatel.Core/Formats/Block.cs diff --git a/Arbatel.Core/Formats/Definition.cs b/src/Arbatel.Core/Formats/Definition.cs similarity index 100% rename from Arbatel.Core/Formats/Definition.cs rename to src/Arbatel.Core/Formats/Definition.cs diff --git a/Arbatel.Core/Formats/DefinitionDictionary.cs b/src/Arbatel.Core/Formats/DefinitionDictionary.cs similarity index 100% rename from Arbatel.Core/Formats/DefinitionDictionary.cs rename to src/Arbatel.Core/Formats/DefinitionDictionary.cs diff --git a/Arbatel.Core/Formats/Loader.cs b/src/Arbatel.Core/Formats/Loader.cs similarity index 100% rename from Arbatel.Core/Formats/Loader.cs rename to src/Arbatel.Core/Formats/Loader.cs diff --git a/Arbatel.Core/Formats/Map.cs b/src/Arbatel.Core/Formats/Map.cs similarity index 100% rename from Arbatel.Core/Formats/Map.cs rename to src/Arbatel.Core/Formats/Map.cs diff --git a/Arbatel.Core/Formats/MapObject.cs b/src/Arbatel.Core/Formats/MapObject.cs similarity index 100% rename from Arbatel.Core/Formats/MapObject.cs rename to src/Arbatel.Core/Formats/MapObject.cs diff --git a/Arbatel.Core/Formats/Quake/QuakeBlock.cs b/src/Arbatel.Core/Formats/Quake/QuakeBlock.cs similarity index 100% rename from Arbatel.Core/Formats/Quake/QuakeBlock.cs rename to src/Arbatel.Core/Formats/Quake/QuakeBlock.cs diff --git a/Arbatel.Core/Formats/Quake/QuakeFgd.cs b/src/Arbatel.Core/Formats/Quake/QuakeFgd.cs similarity index 100% rename from Arbatel.Core/Formats/Quake/QuakeFgd.cs rename to src/Arbatel.Core/Formats/Quake/QuakeFgd.cs diff --git a/Arbatel.Core/Formats/Quake/QuakeMap.cs b/src/Arbatel.Core/Formats/Quake/QuakeMap.cs similarity index 100% rename from Arbatel.Core/Formats/Quake/QuakeMap.cs rename to src/Arbatel.Core/Formats/Quake/QuakeMap.cs diff --git a/Arbatel.Core/Formats/Quake/QuakeMapObject.cs b/src/Arbatel.Core/Formats/Quake/QuakeMapObject.cs similarity index 100% rename from Arbatel.Core/Formats/Quake/QuakeMapObject.cs rename to src/Arbatel.Core/Formats/Quake/QuakeMapObject.cs diff --git a/Arbatel.Core/Formats/Quake/QuakeSide.cs b/src/Arbatel.Core/Formats/Quake/QuakeSide.cs similarity index 100% rename from Arbatel.Core/Formats/Quake/QuakeSide.cs rename to src/Arbatel.Core/Formats/Quake/QuakeSide.cs diff --git a/Arbatel.Core/Formats/Quake/Wad2.cs b/src/Arbatel.Core/Formats/Quake/Wad2.cs similarity index 100% rename from Arbatel.Core/Formats/Quake/Wad2.cs rename to src/Arbatel.Core/Formats/Quake/Wad2.cs diff --git a/Arbatel.Core/Formats/Side.cs b/src/Arbatel.Core/Formats/Side.cs similarity index 100% rename from Arbatel.Core/Formats/Side.cs rename to src/Arbatel.Core/Formats/Side.cs diff --git a/Arbatel.Core/Formats/Solid.cs b/src/Arbatel.Core/Formats/Solid.cs similarity index 100% rename from Arbatel.Core/Formats/Solid.cs rename to src/Arbatel.Core/Formats/Solid.cs diff --git a/Arbatel.Core/Formats/TextureDictionary.cs b/src/Arbatel.Core/Formats/TextureDictionary.cs similarity index 100% rename from Arbatel.Core/Formats/TextureDictionary.cs rename to src/Arbatel.Core/Formats/TextureDictionary.cs diff --git a/Arbatel.Core/Graphics/AABB.cs b/src/Arbatel.Core/Graphics/AABB.cs similarity index 100% rename from Arbatel.Core/Graphics/AABB.cs rename to src/Arbatel.Core/Graphics/AABB.cs diff --git a/Arbatel.Core/Graphics/Backend.cs b/src/Arbatel.Core/Graphics/Backend.cs similarity index 100% rename from Arbatel.Core/Graphics/Backend.cs rename to src/Arbatel.Core/Graphics/Backend.cs diff --git a/Arbatel.Core/Graphics/BoxGenerator.cs b/src/Arbatel.Core/Graphics/BoxGenerator.cs similarity index 100% rename from Arbatel.Core/Graphics/BoxGenerator.cs rename to src/Arbatel.Core/Graphics/BoxGenerator.cs diff --git a/Arbatel.Core/Graphics/Camera.cs b/src/Arbatel.Core/Graphics/Camera.cs similarity index 100% rename from Arbatel.Core/Graphics/Camera.cs rename to src/Arbatel.Core/Graphics/Camera.cs diff --git a/Arbatel.Core/Graphics/FlatShader.cs b/src/Arbatel.Core/Graphics/FlatShader.cs similarity index 100% rename from Arbatel.Core/Graphics/FlatShader.cs rename to src/Arbatel.Core/Graphics/FlatShader.cs diff --git a/Arbatel.Core/Graphics/GemGenerator.cs b/src/Arbatel.Core/Graphics/GemGenerator.cs similarity index 100% rename from Arbatel.Core/Graphics/GemGenerator.cs rename to src/Arbatel.Core/Graphics/GemGenerator.cs diff --git a/Arbatel.Core/Graphics/OpenGLBackend.cs b/src/Arbatel.Core/Graphics/OpenGLBackend.cs similarity index 100% rename from Arbatel.Core/Graphics/OpenGLBackend.cs rename to src/Arbatel.Core/Graphics/OpenGLBackend.cs diff --git a/Arbatel.Core/Graphics/Plane.cs b/src/Arbatel.Core/Graphics/Plane.cs similarity index 100% rename from Arbatel.Core/Graphics/Plane.cs rename to src/Arbatel.Core/Graphics/Plane.cs diff --git a/Arbatel.Core/Graphics/QuakeBrush.cs b/src/Arbatel.Core/Graphics/QuakeBrush.cs similarity index 100% rename from Arbatel.Core/Graphics/QuakeBrush.cs rename to src/Arbatel.Core/Graphics/QuakeBrush.cs diff --git a/Arbatel.Core/Graphics/Renderable.cs b/src/Arbatel.Core/Graphics/Renderable.cs similarity index 100% rename from Arbatel.Core/Graphics/Renderable.cs rename to src/Arbatel.Core/Graphics/Renderable.cs diff --git a/Arbatel.Core/Graphics/RenderableGenerator.cs b/src/Arbatel.Core/Graphics/RenderableGenerator.cs similarity index 100% rename from Arbatel.Core/Graphics/RenderableGenerator.cs rename to src/Arbatel.Core/Graphics/RenderableGenerator.cs diff --git a/Arbatel.Core/Graphics/Shader.cs b/src/Arbatel.Core/Graphics/Shader.cs similarity index 100% rename from Arbatel.Core/Graphics/Shader.cs rename to src/Arbatel.Core/Graphics/Shader.cs diff --git a/Arbatel.Core/Graphics/SingleTextureShader.cs b/src/Arbatel.Core/Graphics/SingleTextureShader.cs similarity index 100% rename from Arbatel.Core/Graphics/SingleTextureShader.cs rename to src/Arbatel.Core/Graphics/SingleTextureShader.cs diff --git a/Arbatel.Core/Graphics/Texture.cs b/src/Arbatel.Core/Graphics/Texture.cs similarity index 100% rename from Arbatel.Core/Graphics/Texture.cs rename to src/Arbatel.Core/Graphics/Texture.cs diff --git a/Arbatel.Core/Graphics/Vertex.cs b/src/Arbatel.Core/Graphics/Vertex.cs similarity index 100% rename from Arbatel.Core/Graphics/Vertex.cs rename to src/Arbatel.Core/Graphics/Vertex.cs diff --git a/Arbatel.Core/Graphics/Winding.cs b/src/Arbatel.Core/Graphics/Winding.cs similarity index 100% rename from Arbatel.Core/Graphics/Winding.cs rename to src/Arbatel.Core/Graphics/Winding.cs diff --git a/Arbatel.Core/OpenTK.dll.config b/src/Arbatel.Core/OpenTK.dll.config similarity index 100% rename from Arbatel.Core/OpenTK.dll.config rename to src/Arbatel.Core/OpenTK.dll.config diff --git a/Arbatel.Core/Startup.cs b/src/Arbatel.Core/Startup.cs similarity index 100% rename from Arbatel.Core/Startup.cs rename to src/Arbatel.Core/Startup.cs diff --git a/Arbatel.Core/UI/MainForm/Commands.cs b/src/Arbatel.Core/UI/MainForm/Commands.cs similarity index 100% rename from Arbatel.Core/UI/MainForm/Commands.cs rename to src/Arbatel.Core/UI/MainForm/Commands.cs diff --git a/Arbatel.Core/UI/MainForm/MainForm.cs b/src/Arbatel.Core/UI/MainForm/MainForm.cs similarity index 100% rename from Arbatel.Core/UI/MainForm/MainForm.cs rename to src/Arbatel.Core/UI/MainForm/MainForm.cs diff --git a/Arbatel.Core/UI/MainForm/MainForm.eto.cs b/src/Arbatel.Core/UI/MainForm/MainForm.eto.cs similarity index 100% rename from Arbatel.Core/UI/MainForm/MainForm.eto.cs rename to src/Arbatel.Core/UI/MainForm/MainForm.eto.cs diff --git a/Arbatel.Core/UI/Preferences/Commands.cs b/src/Arbatel.Core/UI/Preferences/Commands.cs similarity index 100% rename from Arbatel.Core/UI/Preferences/Commands.cs rename to src/Arbatel.Core/UI/Preferences/Commands.cs diff --git a/Arbatel.Core/UI/Preferences/ControlsTab.eto.cs b/src/Arbatel.Core/UI/Preferences/ControlsTab.eto.cs similarity index 100% rename from Arbatel.Core/UI/Preferences/ControlsTab.eto.cs rename to src/Arbatel.Core/UI/Preferences/ControlsTab.eto.cs diff --git a/Arbatel.Core/UI/Preferences/DefinitionsTab.eto.cs b/src/Arbatel.Core/UI/Preferences/DefinitionsTab.eto.cs similarity index 100% rename from Arbatel.Core/UI/Preferences/DefinitionsTab.eto.cs rename to src/Arbatel.Core/UI/Preferences/DefinitionsTab.eto.cs diff --git a/Arbatel.Core/UI/Preferences/PreferencesDialog.cs b/src/Arbatel.Core/UI/Preferences/PreferencesDialog.cs similarity index 100% rename from Arbatel.Core/UI/Preferences/PreferencesDialog.cs rename to src/Arbatel.Core/UI/Preferences/PreferencesDialog.cs diff --git a/Arbatel.Core/UI/Preferences/PreferencesDialog.eto.cs b/src/Arbatel.Core/UI/Preferences/PreferencesDialog.eto.cs similarity index 100% rename from Arbatel.Core/UI/Preferences/PreferencesDialog.eto.cs rename to src/Arbatel.Core/UI/Preferences/PreferencesDialog.eto.cs diff --git a/Arbatel.Core/UI/Preferences/TexturesTab.eto.cs b/src/Arbatel.Core/UI/Preferences/TexturesTab.eto.cs similarity index 100% rename from Arbatel.Core/UI/Preferences/TexturesTab.eto.cs rename to src/Arbatel.Core/UI/Preferences/TexturesTab.eto.cs diff --git a/Arbatel.Core/UI/Settings/LocalSettings.cs b/src/Arbatel.Core/UI/Settings/LocalSettings.cs similarity index 100% rename from Arbatel.Core/UI/Settings/LocalSettings.cs rename to src/Arbatel.Core/UI/Settings/LocalSettings.cs diff --git a/Arbatel.Core/UI/Settings/RoamingSettings.cs b/src/Arbatel.Core/UI/Settings/RoamingSettings.cs similarity index 100% rename from Arbatel.Core/UI/Settings/RoamingSettings.cs rename to src/Arbatel.Core/UI/Settings/RoamingSettings.cs diff --git a/Arbatel.Core/Utilities/AssemblyUtilities.cs b/src/Arbatel.Core/Utilities/AssemblyUtilities.cs similarity index 100% rename from Arbatel.Core/Utilities/AssemblyUtilities.cs rename to src/Arbatel.Core/Utilities/AssemblyUtilities.cs diff --git a/Arbatel.Core/Utilities/Formatting.cs b/src/Arbatel.Core/Utilities/Formatting.cs similarity index 100% rename from Arbatel.Core/Utilities/Formatting.cs rename to src/Arbatel.Core/Utilities/Formatting.cs diff --git a/Arbatel.Core/Utilities/MathUtilities.cs b/src/Arbatel.Core/Utilities/MathUtilities.cs similarity index 100% rename from Arbatel.Core/Utilities/MathUtilities.cs rename to src/Arbatel.Core/Utilities/MathUtilities.cs diff --git a/src/Arbatel.Core/build.ps1 b/src/Arbatel.Core/build.ps1 new file mode 100644 index 0000000..c6c91b2 --- /dev/null +++ b/src/Arbatel.Core/build.ps1 @@ -0,0 +1,242 @@ +########################################################################## +# This is the Cake bootstrapper script for PowerShell. +# This file was downloaded from https://github.com/cake-build/resources +# Feel free to change this file to fit your needs. +########################################################################## + +<# + +.SYNOPSIS +This is a Powershell script to bootstrap a Cake build. + +.DESCRIPTION +This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) +and execute your Cake build script with the parameters you provide. + +.PARAMETER Script +The build script to execute. +.PARAMETER Target +The build script target to run. +.PARAMETER Configuration +The build configuration to use. +.PARAMETER Verbosity +Specifies the amount of information to be displayed. +.PARAMETER ShowDescription +Shows description about tasks. +.PARAMETER DryRun +Performs a dry run. +.PARAMETER SkipToolPackageRestore +Skips restoring of packages. +.PARAMETER ScriptArgs +Remaining arguments are added here. + +.LINK +https://cakebuild.net + +#> + +[CmdletBinding()] +Param( + [string]$Script = "build.cake", + [string]$Target, + [string]$Configuration, + [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] + [string]$Verbosity, + [switch]$ShowDescription, + [Alias("WhatIf", "Noop")] + [switch]$DryRun, + [switch]$SkipToolPackageRestore, + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$ScriptArgs +) + +# Attempt to set highest encryption available for SecurityProtocol. +# PowerShell will not set this by default (until maybe .NET 4.6.x). This +# will typically produce a message for PowerShell v2 (just an info +# message though) +try { + # Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48) + # Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't + # exist in .NET 4.0, even though they are addressable if .NET 4.5+ is + # installed (.NET 4.5 is an in-place upgrade). + [System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48 + } catch { + Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3' + } + +[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null +function MD5HashFile([string] $filePath) +{ + if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) + { + return $null + } + + [System.IO.Stream] $file = $null; + [System.Security.Cryptography.MD5] $md5 = $null; + try + { + $md5 = [System.Security.Cryptography.MD5]::Create() + $file = [System.IO.File]::OpenRead($filePath) + return [System.BitConverter]::ToString($md5.ComputeHash($file)) + } + finally + { + if ($file -ne $null) + { + $file.Dispose() + } + } +} + +function GetProxyEnabledWebClient +{ + $wc = New-Object System.Net.WebClient + $proxy = [System.Net.WebRequest]::GetSystemWebProxy() + $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials + $wc.Proxy = $proxy + return $wc +} + +Write-Host "Preparing to run build script..." + +if(!$PSScriptRoot){ + $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent +} + +$TOOLS_DIR = Join-Path $PSScriptRoot "tools" +$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins" +$MODULES_DIR = Join-Path $TOOLS_DIR "Modules" +$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" +$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" +$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" +$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" +$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" +$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config" +$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" + +# Make sure tools folder exists +if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { + Write-Verbose -Message "Creating tools directory..." + New-Item -Path $TOOLS_DIR -Type directory | out-null +} + +# Make sure that packages.config exist. +if (!(Test-Path $PACKAGES_CONFIG)) { + Write-Verbose -Message "Downloading packages.config..." + try { + $wc = GetProxyEnabledWebClient + $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) + } catch { + Throw "Could not download packages.config." + } +} + +# Try find NuGet.exe in path if not exists +if (!(Test-Path $NUGET_EXE)) { + Write-Verbose -Message "Trying to find nuget.exe in PATH..." + $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) } + $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 + if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { + Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." + $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName + } +} + +# Try download NuGet.exe if not exists +if (!(Test-Path $NUGET_EXE)) { + Write-Verbose -Message "Downloading NuGet.exe..." + try { + $wc = GetProxyEnabledWebClient + $wc.DownloadFile($NUGET_URL, $NUGET_EXE) + } catch { + Throw "Could not download NuGet.exe." + } +} + +# Save nuget.exe path to environment to be available to child processed +$ENV:NUGET_EXE = $NUGET_EXE + +# Restore tools from NuGet? +if(-Not $SkipToolPackageRestore.IsPresent) { + Push-Location + Set-Location $TOOLS_DIR + + # Check for changes in packages.config and remove installed tools if true. + [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) + if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or + ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { + Write-Verbose -Message "Missing or changed package.config hash..." + Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery | + Remove-Item -Recurse + } + + Write-Verbose -Message "Restoring tools from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet tools." + } + else + { + $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" + } + Write-Verbose -Message ($NuGetOutput | out-string) + + Pop-Location +} + +# Restore addins from NuGet +if (Test-Path $ADDINS_PACKAGES_CONFIG) { + Push-Location + Set-Location $ADDINS_DIR + + Write-Verbose -Message "Restoring addins from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet addins." + } + + Write-Verbose -Message ($NuGetOutput | out-string) + + Pop-Location +} + +# Restore modules from NuGet +if (Test-Path $MODULES_PACKAGES_CONFIG) { + Push-Location + Set-Location $MODULES_DIR + + Write-Verbose -Message "Restoring modules from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet modules." + } + + Write-Verbose -Message ($NuGetOutput | out-string) + + Pop-Location +} + +# Make sure that Cake has been installed. +if (!(Test-Path $CAKE_EXE)) { + Throw "Could not find Cake.exe at $CAKE_EXE" +} + + + +# Build Cake arguments +$cakeArguments = @("$Script"); +if ($Target) { $cakeArguments += "-target=$Target" } +if ($Configuration) { $cakeArguments += "-configuration=$Configuration" } +if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" } +if ($ShowDescription) { $cakeArguments += "-showdescription" } +if ($DryRun) { $cakeArguments += "-dryrun" } +$cakeArguments += $ScriptArgs + +# Start Cake +Write-Host "Running build script..." +&$CAKE_EXE $cakeArguments +exit $LASTEXITCODE diff --git a/Arbatel.Core/res/palette-quake.lmp b/src/Arbatel.Core/res/palette-quake.lmp similarity index 100% rename from Arbatel.Core/res/palette-quake.lmp rename to src/Arbatel.Core/res/palette-quake.lmp diff --git a/src/gui/Arbatel.Gtk/App.config b/src/gui/Arbatel.Gtk/App.config new file mode 100644 index 0000000..8b58c2b --- /dev/null +++ b/src/gui/Arbatel.Gtk/App.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Arbatel.Gtk/Arbatel.Gtk.csproj b/src/gui/Arbatel.Gtk/Arbatel.Gtk.csproj similarity index 83% rename from Arbatel.Gtk/Arbatel.Gtk.csproj rename to src/gui/Arbatel.Gtk/Arbatel.Gtk.csproj index 5fbd5f6..9158b03 100644 --- a/Arbatel.Gtk/Arbatel.Gtk.csproj +++ b/src/gui/Arbatel.Gtk/Arbatel.Gtk.csproj @@ -2,13 +2,13 @@ WinExe - net462 + net472 AnyCPU - + true @@ -20,11 +20,6 @@ - - - - - @@ -34,6 +29,9 @@ $(AssemblySearchPaths);{GAC} + + + @@ -52,10 +50,10 @@ gtk-sharp-2.0 - ..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll - ..\lib\thirdparty\Eto.Gl\Eto.Gl.Gtk2\Debug\Eto.Gl.Gtk2.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl.Gtk2\Debug\Eto.Gl.Gtk2.dll \ No newline at end of file diff --git a/Arbatel.Gtk/Program.cs b/src/gui/Arbatel.Gtk/Program.cs similarity index 100% rename from Arbatel.Gtk/Program.cs rename to src/gui/Arbatel.Gtk/Program.cs diff --git a/src/gui/Arbatel.Mac/App.config b/src/gui/Arbatel.Mac/App.config new file mode 100644 index 0000000..8b58c2b --- /dev/null +++ b/src/gui/Arbatel.Mac/App.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Arbatel.Mac/Arbatel.Mac.csproj b/src/gui/Arbatel.Mac/Arbatel.Mac.csproj similarity index 64% rename from Arbatel.Mac/Arbatel.Mac.csproj rename to src/gui/Arbatel.Mac/Arbatel.Mac.csproj index 59dae14..8c8000f 100644 --- a/Arbatel.Mac/Arbatel.Mac.csproj +++ b/src/gui/Arbatel.Mac/Arbatel.Mac.csproj @@ -10,14 +10,14 @@ - + - ..\lib\thirdparty\Eto.Gl\Eto.Gl.Mac\Debug\Eto.Gl.Mac.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl.Mac\Debug\Eto.Gl.Mac.dll - ..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll diff --git a/Arbatel.Mac/Icon.icns b/src/gui/Arbatel.Mac/Icon.icns similarity index 100% rename from Arbatel.Mac/Icon.icns rename to src/gui/Arbatel.Mac/Icon.icns diff --git a/Arbatel.Mac/Info.plist b/src/gui/Arbatel.Mac/Info.plist similarity index 100% rename from Arbatel.Mac/Info.plist rename to src/gui/Arbatel.Mac/Info.plist diff --git a/Arbatel.Mac/Program.cs b/src/gui/Arbatel.Mac/Program.cs similarity index 100% rename from Arbatel.Mac/Program.cs rename to src/gui/Arbatel.Mac/Program.cs diff --git a/Arbatel.WinForms/app.config b/src/gui/Arbatel.WinForms/App.config similarity index 61% rename from Arbatel.WinForms/app.config rename to src/gui/Arbatel.WinForms/App.config index 0661fa6..25f67c8 100644 --- a/Arbatel.WinForms/app.config +++ b/src/gui/Arbatel.WinForms/App.config @@ -1,15 +1,19 @@ - + + - - + + - - + + - + + + + diff --git a/Arbatel.WinForms/Arbatel.WinForms.csproj b/src/gui/Arbatel.WinForms/Arbatel.WinForms.csproj similarity index 85% rename from Arbatel.WinForms/Arbatel.WinForms.csproj rename to src/gui/Arbatel.WinForms/Arbatel.WinForms.csproj index 217ab4f..7700391 100644 --- a/Arbatel.WinForms/Arbatel.WinForms.csproj +++ b/src/gui/Arbatel.WinForms/Arbatel.WinForms.csproj @@ -7,7 +7,7 @@ WinExe Arbatel.WinForms Arbatel - v4.6.2 + v4.7.2 true @@ -36,10 +36,10 @@ - ..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll - ..\lib\thirdparty\Eto.Gl\Eto.Gl.WinForms\Debug\Eto.Gl.Windows.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl.WinForms\Debug\Eto.Gl.Windows.dll @@ -53,18 +53,15 @@ - - 2.5.0-ci-10063 - - - 2.5.0-ci-10063 - - - - + {a5ffc3a4-78ca-44f2-b8a8-f18dadf1690a} Arbatel.Core + + + 2.5.0-ci-10063 + + \ No newline at end of file diff --git a/Arbatel.WinForms/Program.cs b/src/gui/Arbatel.WinForms/Program.cs similarity index 97% rename from Arbatel.WinForms/Program.cs rename to src/gui/Arbatel.WinForms/Program.cs index 4834bf8..fe271b7 100644 --- a/Arbatel.WinForms/Program.cs +++ b/src/gui/Arbatel.WinForms/Program.cs @@ -17,7 +17,7 @@ public static void Main(string[] args) { Toolkit opentk = Core.InitOpenTK(); - var platform = Platform.Detect; + Platform platform = Platform.Detect; platform.Add(() => new WinGLSurfaceHandler()); diff --git a/Arbatel.WinForms/Properties/AssemblyInfo.cs b/src/gui/Arbatel.WinForms/Properties/AssemblyInfo.cs similarity index 100% rename from Arbatel.WinForms/Properties/AssemblyInfo.cs rename to src/gui/Arbatel.WinForms/Properties/AssemblyInfo.cs diff --git a/Arbatel.Wpf/App.config b/src/gui/Arbatel.Wpf/App.config similarity index 74% rename from Arbatel.Wpf/App.config rename to src/gui/Arbatel.Wpf/App.config index e61fdec..c9ec293 100644 --- a/Arbatel.Wpf/App.config +++ b/src/gui/Arbatel.Wpf/App.config @@ -1,21 +1,22 @@ - + - + + - - + + - - + + - - + + diff --git a/Arbatel.Wpf/Arbatel.Wpf.csproj b/src/gui/Arbatel.Wpf/Arbatel.Wpf.csproj similarity index 92% rename from Arbatel.Wpf/Arbatel.Wpf.csproj rename to src/gui/Arbatel.Wpf/Arbatel.Wpf.csproj index 6390ba4..78caf51 100644 --- a/Arbatel.Wpf/Arbatel.Wpf.csproj +++ b/src/gui/Arbatel.Wpf/Arbatel.Wpf.csproj @@ -8,7 +8,7 @@ WinExe Arbatel.Wpf Arbatel - v4.6.2 + v4.7.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -45,11 +45,11 @@ False - ..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll False - ..\lib\thirdparty\Eto.Gl\Eto.Gl.WPF_WinformsHost\Debug\Eto.Gl.WPF_WinformsHost.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl.WPF_WinformsHost\Debug\Eto.Gl.WPF_WinformsHost.dll @@ -88,7 +88,7 @@ - + {a5ffc3a4-78ca-44f2-b8a8-f18dadf1690a} Arbatel.Core diff --git a/Arbatel.Wpf/Program.cs b/src/gui/Arbatel.Wpf/Program.cs similarity index 100% rename from Arbatel.Wpf/Program.cs rename to src/gui/Arbatel.Wpf/Program.cs diff --git a/Arbatel.Wpf/Properties/AssemblyInfo.cs b/src/gui/Arbatel.Wpf/Properties/AssemblyInfo.cs similarity index 100% rename from Arbatel.Wpf/Properties/AssemblyInfo.cs rename to src/gui/Arbatel.Wpf/Properties/AssemblyInfo.cs diff --git a/Arbatel.XamMac/Arbatel.XamMac.csproj b/src/gui/Arbatel.XamMac/Arbatel.XamMac.csproj similarity index 94% rename from Arbatel.XamMac/Arbatel.XamMac.csproj rename to src/gui/Arbatel.XamMac/Arbatel.XamMac.csproj index 3d3da8f..7c8fd32 100644 --- a/Arbatel.XamMac/Arbatel.XamMac.csproj +++ b/src/gui/Arbatel.XamMac/Arbatel.XamMac.csproj @@ -60,10 +60,10 @@ - ..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl\Debug\Eto.Gl.dll - ..\lib\thirdparty\Eto.Gl\Eto.Gl.XamMac\Debug\Eto.Gl.XamMac.dll + ..\..\..\lib\thirdparty\Eto.Gl\Eto.Gl.XamMac\Debug\Eto.Gl.XamMac.dll @@ -87,7 +87,7 @@ - + {A5FFC3A4-78CA-44F2-B8A8-F18DADF1690A} Arbatel.Core diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png diff --git a/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json b/src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json rename to src/gui/Arbatel.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Arbatel.XamMac/Assets.xcassets/Contents.json b/src/gui/Arbatel.XamMac/Assets.xcassets/Contents.json similarity index 100% rename from Arbatel.XamMac/Assets.xcassets/Contents.json rename to src/gui/Arbatel.XamMac/Assets.xcassets/Contents.json diff --git a/Arbatel.XamMac/Info.plist b/src/gui/Arbatel.XamMac/Info.plist similarity index 100% rename from Arbatel.XamMac/Info.plist rename to src/gui/Arbatel.XamMac/Info.plist diff --git a/Arbatel.XamMac/Program.cs b/src/gui/Arbatel.XamMac/Program.cs similarity index 100% rename from Arbatel.XamMac/Program.cs rename to src/gui/Arbatel.XamMac/Program.cs diff --git a/src/gui/Directory.Build.targets b/src/gui/Directory.Build.targets new file mode 100644 index 0000000..d9d3e0e --- /dev/null +++ b/src/gui/Directory.Build.targets @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ArbatelTest.Core/data/instance/arrow_wedge.map b/test/data/instance/arrow_wedge.map similarity index 100% rename from ArbatelTest.Core/data/instance/arrow_wedge.map rename to test/data/instance/arrow_wedge.map diff --git a/ArbatelTest.Core/data/instance/arrow_wedge_holder.map b/test/data/instance/arrow_wedge_holder.map similarity index 100% rename from ArbatelTest.Core/data/instance/arrow_wedge_holder.map rename to test/data/instance/arrow_wedge_holder.map diff --git a/ArbatelTest.Core/data/instance/rotation_instance.map b/test/data/instance/rotation_instance.map similarity index 100% rename from ArbatelTest.Core/data/instance/rotation_instance.map rename to test/data/instance/rotation_instance.map diff --git a/ArbatelTest.Core/data/instance_test-arrow_wedge.map b/test/data/instance_test-arrow_wedge.map similarity index 100% rename from ArbatelTest.Core/data/instance_test-arrow_wedge.map rename to test/data/instance_test-arrow_wedge.map diff --git a/ArbatelTest.Core/data/instance_test-pitch.map b/test/data/instance_test-pitch.map similarity index 100% rename from ArbatelTest.Core/data/instance_test-pitch.map rename to test/data/instance_test-pitch.map diff --git a/ArbatelTest.Core/data/instance_test-roll.map b/test/data/instance_test-roll.map similarity index 100% rename from ArbatelTest.Core/data/instance_test-roll.map rename to test/data/instance_test-roll.map diff --git a/ArbatelTest.Core/data/instance_test-yaw.map b/test/data/instance_test-yaw.map similarity index 100% rename from ArbatelTest.Core/data/instance_test-yaw.map rename to test/data/instance_test-yaw.map diff --git a/ArbatelTest.Core/data/test.wad b/test/data/test.wad similarity index 100% rename from ArbatelTest.Core/data/test.wad rename to test/data/test.wad diff --git a/ArbatelTest.Core/App.config b/test/src/ArbatelTest.Core/App.config similarity index 100% rename from ArbatelTest.Core/App.config rename to test/src/ArbatelTest.Core/App.config diff --git a/ArbatelTest.Core/ArbatelTest.Core.csproj b/test/src/ArbatelTest.Core/ArbatelTest.Core.csproj similarity index 70% rename from ArbatelTest.Core/ArbatelTest.Core.csproj rename to test/src/ArbatelTest.Core/ArbatelTest.Core.csproj index f3c081b..b15ab40 100644 --- a/ArbatelTest.Core/ArbatelTest.Core.csproj +++ b/test/src/ArbatelTest.Core/ArbatelTest.Core.csproj @@ -1,7 +1,7 @@  - - + + Debug @@ -41,23 +41,23 @@ - ..\packages\Eto.Forms.2.5.0-ci-10015\lib\netstandard1.0\Eto.dll + ..\..\..\packages\Eto.Forms.2.5.0-ci-10015\lib\netstandard1.0\Eto.dll - ..\packages\Eto.Platform.Windows.2.5.0-ci-10015\lib\net45\Eto.WinForms.dll + ..\..\..\packages\Eto.Platform.Windows.2.5.0-ci-10015\lib\net45\Eto.WinForms.dll - ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll + ..\..\..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll - ..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll + ..\..\..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll - ..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll + ..\..\..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll @@ -81,7 +81,7 @@ - + {a5ffc3a4-78ca-44f2-b8a8-f18dadf1690a} Arbatel.Core @@ -91,9 +91,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + - + \ No newline at end of file diff --git a/ArbatelTest.Core/Features/Instance/Nesting.cs b/test/src/ArbatelTest.Core/Features/Instance/Nesting.cs similarity index 100% rename from ArbatelTest.Core/Features/Instance/Nesting.cs rename to test/src/ArbatelTest.Core/Features/Instance/Nesting.cs diff --git a/ArbatelTest.Core/Features/Instance/Rotation.cs b/test/src/ArbatelTest.Core/Features/Instance/Rotation.cs similarity index 100% rename from ArbatelTest.Core/Features/Instance/Rotation.cs rename to test/src/ArbatelTest.Core/Features/Instance/Rotation.cs diff --git a/ArbatelTest.Core/Features/Instance/SetUp.cs b/test/src/ArbatelTest.Core/Features/Instance/SetUp.cs similarity index 100% rename from ArbatelTest.Core/Features/Instance/SetUp.cs rename to test/src/ArbatelTest.Core/Features/Instance/SetUp.cs diff --git a/ArbatelTest.Core/FormatsTest/BlockTest.cs b/test/src/ArbatelTest.Core/FormatsTest/BlockTest.cs similarity index 100% rename from ArbatelTest.Core/FormatsTest/BlockTest.cs rename to test/src/ArbatelTest.Core/FormatsTest/BlockTest.cs diff --git a/ArbatelTest.Core/GraphicsTest/GraphicsTest.cs b/test/src/ArbatelTest.Core/GraphicsTest/GraphicsTest.cs similarity index 100% rename from ArbatelTest.Core/GraphicsTest/GraphicsTest.cs rename to test/src/ArbatelTest.Core/GraphicsTest/GraphicsTest.cs diff --git a/ArbatelTest.Core/OpenTK.dll.config b/test/src/ArbatelTest.Core/OpenTK.dll.config similarity index 100% rename from ArbatelTest.Core/OpenTK.dll.config rename to test/src/ArbatelTest.Core/OpenTK.dll.config diff --git a/ArbatelTest.Core/Properties/AssemblyInfo.cs b/test/src/ArbatelTest.Core/Properties/AssemblyInfo.cs similarity index 100% rename from ArbatelTest.Core/Properties/AssemblyInfo.cs rename to test/src/ArbatelTest.Core/Properties/AssemblyInfo.cs diff --git a/ArbatelTest.Core/UtilitiesTest/MathUtilitiesTest.cs b/test/src/ArbatelTest.Core/UtilitiesTest/MathUtilitiesTest.cs similarity index 100% rename from ArbatelTest.Core/UtilitiesTest/MathUtilitiesTest.cs rename to test/src/ArbatelTest.Core/UtilitiesTest/MathUtilitiesTest.cs diff --git a/ArbatelTest.Core/packages.config b/test/src/ArbatelTest.Core/packages.config similarity index 100% rename from ArbatelTest.Core/packages.config rename to test/src/ArbatelTest.Core/packages.config