diff --git a/Build/NuGetPackageSpecs/AudioHandling.Sample.nuspec b/Build/NuGetPackageSpecs/AudioHandling.Sample.nuspec
index 6b1f1b137..54af0f67a 100644
--- a/Build/NuGetPackageSpecs/AudioHandling.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/AudioHandling.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.AudioHandling
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Audio Handling Sample
@@ -13,18 +13,18 @@
Demonstrates how to handle Audio in Duality.
This package contains a sample Scene for handling audio using SoundEmitters, and another one for handling it manually using code.
Duality Sample Plugin Audio
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Base.Editor.nuspec b/Build/NuGetPackageSpecs/Base.Editor.nuspec
index 02abe7280..7b109057d 100644
--- a/Build/NuGetPackageSpecs/Base.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/Base.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.Base
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Editor Base Infrastructure
@@ -16,8 +16,8 @@
Patch Version Update
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/BasicMenu.Sample.nuspec b/Build/NuGetPackageSpecs/BasicMenu.Sample.nuspec
index 42904f82a..e37ebff93 100644
--- a/Build/NuGetPackageSpecs/BasicMenu.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/BasicMenu.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.BasicMenu
- 3.0.4
+ 4.0.0-alpha
Pilati Alessandro
Pilati Alessandro
Basic Menu Sample
@@ -13,18 +13,18 @@
Demonstrates a GameObject-based way to create a game menu.
This package contains an object-based game menu sample with a custom Font, multiple menu pages and simple color animations.
Duality Sample Plugin Menu
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/BasicShaders.Sample.nuspec b/Build/NuGetPackageSpecs/BasicShaders.Sample.nuspec
index 7d656b5ad..564eb3bb8 100644
--- a/Build/NuGetPackageSpecs/BasicShaders.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/BasicShaders.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.BasicShaders
- 3.0.4
+ 4.0.0-alpha
Pilati Alessandro, Fedja Adam
Pilati Alessandro, Fedja Adam
Basic Shaders Sample
@@ -13,14 +13,16 @@
Demonstrates how to use shaders in Duality.
This package contains a sample Scene that uses some very basic shaders to render sprites.
Duality Sample Plugin Shaders Rendering
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Benchmarks.Sample.nuspec b/Build/NuGetPackageSpecs/Benchmarks.Sample.nuspec
index f221eb736..6e09c209b 100644
--- a/Build/NuGetPackageSpecs/Benchmarks.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/Benchmarks.Sample.nuspec
@@ -13,18 +13,18 @@
Implements a set of benchmarks for profiling Duality.
This package implements a set of benchmarks for profiling Duality performance on your system.
Duality Sample Plugin Benchmark Rendering
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/CamView.Editor.nuspec b/Build/NuGetPackageSpecs/CamView.Editor.nuspec
index 25398ea19..cda3bdc54 100644
--- a/Build/NuGetPackageSpecs/CamView.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/CamView.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.CamView
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Camera View
@@ -16,8 +16,8 @@
Patch Version Update
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/CameraController.Sample.nuspec b/Build/NuGetPackageSpecs/CameraController.Sample.nuspec
index 6ded1caa4..018fcb1b4 100644
--- a/Build/NuGetPackageSpecs/CameraController.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/CameraController.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.CameraController
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Camera Controller Sample
@@ -13,18 +13,18 @@
Demonstrates various camera controller Components.
This package contains a testbed for camera controller Components and various sample implementations.
Duality Sample Plugin Camera
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Compatibility.Core.nuspec b/Build/NuGetPackageSpecs/Compatibility.Core.nuspec
index ad0a4ed09..c1e7224ba 100644
--- a/Build/NuGetPackageSpecs/Compatibility.Core.nuspec
+++ b/Build/NuGetPackageSpecs/Compatibility.Core.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Plugins.Compatibility
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Backwards Compatibility
@@ -16,7 +16,7 @@
Patch Version Update
-
+
diff --git a/Build/NuGetPackageSpecs/CustomRenderingSetup.Sample.nuspec b/Build/NuGetPackageSpecs/CustomRenderingSetup.Sample.nuspec
index 5757de840..a1083a08b 100644
--- a/Build/NuGetPackageSpecs/CustomRenderingSetup.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/CustomRenderingSetup.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.CustomRenderingSetup
- 2.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Custom Rendering Setup Sample
@@ -13,18 +13,18 @@
Demonstrates various custom rendering setups for post-processing or fixed-resolution rendering.
This package demonstrates custom rendering setups with fullscreen post-processing effects or fixed-resolution rendering.
Duality Sample Plugin Shaders RenderSetup Rendering Postprocessing
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Core.nuspec b/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Core.nuspec
index 28d80cf0f..ea0b5e8f7 100644
--- a/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Core.nuspec
+++ b/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Core.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Backend.DefaultOpenTK
- 3.2.0
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
OpenTK Backend
@@ -16,14 +16,14 @@
Added Support for Setting Hardware Cursors
#ADD: It is now possible to adjust the hardware cursor on the game window through `INativeWindow`.
-
+
-
-
+
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Editor.nuspec b/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Editor.nuspec
index e74c8ffff..39461b1e9 100644
--- a/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/DefaultOpenTKBackend.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Backend.DefaultOpenTK
- 3.1.3
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
OpenTK Editor Backend
@@ -16,9 +16,9 @@
Patch Version Update
-
-
-
+
+
+
diff --git a/Build/NuGetPackageSpecs/DotNetFrameworkBackend.Core.nuspec b/Build/NuGetPackageSpecs/DotNetFrameworkBackend.Core.nuspec
index 1f4ceb93c..ed607502f 100644
--- a/Build/NuGetPackageSpecs/DotNetFrameworkBackend.Core.nuspec
+++ b/Build/NuGetPackageSpecs/DotNetFrameworkBackend.Core.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Backend.DotNetFramework
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
DotNetFramework Backend
@@ -14,7 +14,7 @@
The default system backend layer for Duality. It uses regular .Net Framework classes, as are available on desktop platforms.
Duality Core Plugin Backend
-
+
Patch Version Update
diff --git a/Build/NuGetPackageSpecs/DualStickSpaceShooter.Sample.nuspec b/Build/NuGetPackageSpecs/DualStickSpaceShooter.Sample.nuspec
index 810b7ec1d..9b5e42b32 100644
--- a/Build/NuGetPackageSpecs/DualStickSpaceShooter.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/DualStickSpaceShooter.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.DualStickSpaceShooter
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Dual Stick Space Shooter Sample
@@ -13,18 +13,18 @@
A small dual stick space shooter made with Duality.
This package contains a small coop game for one to two players, controlled with mouse / keyboard and gamepads. Recommended to play with stereo audio at full volume.
Duality Sample Plugin Game Multiplayer Coop Shooter Topdown Minimalistic
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Duality.Docs.nuspec b/Build/NuGetPackageSpecs/Duality.Docs.nuspec
index c76e40d22..48c636adc 100644
--- a/Build/NuGetPackageSpecs/Duality.Docs.nuspec
+++ b/Build/NuGetPackageSpecs/Duality.Docs.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Docs
- 3.0.0
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Duality Documentation
@@ -16,7 +16,7 @@
Major Version Update
-
+
diff --git a/Build/NuGetPackageSpecs/Duality.Editor.nuspec b/Build/NuGetPackageSpecs/Duality.Editor.nuspec
index d1b23e555..76548f88f 100644
--- a/Build/NuGetPackageSpecs/Duality.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/Duality.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor
- 3.1.9
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Duality Editor
@@ -13,15 +13,14 @@
The Duality editor.
The Duality editor.
Duality Editor
- Patch Version Update
+
-
+
-
diff --git a/Build/NuGetPackageSpecs/Duality.Launcher.nuspec b/Build/NuGetPackageSpecs/Duality.Launcher.nuspec
index 0408ff81c..05180d499 100644
--- a/Build/NuGetPackageSpecs/Duality.Launcher.nuspec
+++ b/Build/NuGetPackageSpecs/Duality.Launcher.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Launcher
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Duality Launcher
@@ -16,7 +16,7 @@
Patch Version Update
-
+
diff --git a/Build/NuGetPackageSpecs/Duality.Physics.nuspec b/Build/NuGetPackageSpecs/Duality.Physics.nuspec
index dfef9084b..092f70ed2 100644
--- a/Build/NuGetPackageSpecs/Duality.Physics.nuspec
+++ b/Build/NuGetPackageSpecs/Duality.Physics.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Physics
- 3.0.4
+ 4.0.0-alpha
See original project authors
Fedja Adam
Duality Physics
diff --git a/Build/NuGetPackageSpecs/Duality.Primitives.nuspec b/Build/NuGetPackageSpecs/Duality.Primitives.nuspec
index 86660dbba..27d14031c 100644
--- a/Build/NuGetPackageSpecs/Duality.Primitives.nuspec
+++ b/Build/NuGetPackageSpecs/Duality.Primitives.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Primitives
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Duality Primitives
diff --git a/Build/NuGetPackageSpecs/Duality.nuspec b/Build/NuGetPackageSpecs/Duality.nuspec
index edccda4e1..674919ab3 100644
--- a/Build/NuGetPackageSpecs/Duality.nuspec
+++ b/Build/NuGetPackageSpecs/Duality.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality
- 3.2.1
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Duality Core
@@ -16,9 +16,9 @@
-
+
-
+
diff --git a/Build/NuGetPackageSpecs/DynamicLighting.Sample.nuspec b/Build/NuGetPackageSpecs/DynamicLighting.Sample.nuspec
index 5cc123573..8c90deda5 100644
--- a/Build/NuGetPackageSpecs/DynamicLighting.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/DynamicLighting.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.DynamicLighting
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
DynamicLighting Sample
@@ -13,23 +13,19 @@
Introduces a naive implementation of dynamic lighting Components.
Introduces a naive implementation of dynamic lighting Components.
Duality Sample Plugin Rendering Lighting Component
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/FlapOrDie.Sample.nuspec b/Build/NuGetPackageSpecs/FlapOrDie.Sample.nuspec
index d571a811f..0dc579d50 100644
--- a/Build/NuGetPackageSpecs/FlapOrDie.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/FlapOrDie.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.FlapOrDie
- 3.0.4
+ 4.0.0-alpha
Pilati Alessandro
Pilati Alessandro
Flap-Or-Die Sample
@@ -13,18 +13,18 @@
A clone of a commonly known casual game in Duality.
This package contains a simple implementation of a commonly known casual game.
Duality Sample Plugin Game
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/HelpAdvisor.Editor.nuspec b/Build/NuGetPackageSpecs/HelpAdvisor.Editor.nuspec
index 0ae7c07f8..0b19f2f5c 100644
--- a/Build/NuGetPackageSpecs/HelpAdvisor.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/HelpAdvisor.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.HelpAdvisor
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Help Advisor
@@ -16,8 +16,8 @@
Patch Version Update
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/InputHandling.Sample.nuspec b/Build/NuGetPackageSpecs/InputHandling.Sample.nuspec
index c54efb50d..4205957fb 100644
--- a/Build/NuGetPackageSpecs/InputHandling.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/InputHandling.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.InputHandling
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Input Handling Sample
@@ -13,18 +13,18 @@
Demonstrates how to access user input in Duality.
This package contains a testbed for user input handling.
Duality Sample Plugin Input
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/LogView.Editor.nuspec b/Build/NuGetPackageSpecs/LogView.Editor.nuspec
index 560b31081..5e0d2b7ea 100644
--- a/Build/NuGetPackageSpecs/LogView.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/LogView.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.LogView
- 3.0.5
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Log View
@@ -16,8 +16,8 @@
Patch Version Update
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/ObjectInspector.Editor.nuspec b/Build/NuGetPackageSpecs/ObjectInspector.Editor.nuspec
index 3eacf08ee..30579a104 100644
--- a/Build/NuGetPackageSpecs/ObjectInspector.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/ObjectInspector.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.ObjectInspector
- 3.0.5
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Object Inspector
@@ -16,8 +16,8 @@
Inspector Auto Update Bugfix
#FIX: Fixed Object Inspector auto refresh not working unless disabled and enabled again.
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/PackageManagerFrontend.Editor.nuspec b/Build/NuGetPackageSpecs/PackageManagerFrontend.Editor.nuspec
deleted file mode 100644
index 48638d7fb..000000000
--- a/Build/NuGetPackageSpecs/PackageManagerFrontend.Editor.nuspec
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- AdamsLair.Duality.Editor.Plugins.PackageManagerFrontend
- 3.0.5
- Fedja Adam
- Fedja Adam
- Package Manager Frontend
- https://github.com/AdamsLair/duality/raw/release/Build/NuGetPackageSpecs/Icons/PackageManager.png
- https://github.com/AdamsLair/duality/raw/release/LICENSE
- https://github.com/AdamsLair/duality
- false
- A user interface for conveniently managing Duality packages.
- A user interface for conveniently managing Duality packages.
- Duality Editor Plugin PackageManagerFrontend
- Patch Version Update
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/ParticleSystem.Sample.nuspec b/Build/NuGetPackageSpecs/ParticleSystem.Sample.nuspec
index a01e91fc6..f9232e820 100644
--- a/Build/NuGetPackageSpecs/ParticleSystem.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/ParticleSystem.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.ParticleSystem
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Custom ParticleSystem Sample
@@ -13,18 +13,18 @@
Implements and showcases a custom Particle System in Duality.
This package implements a custom Particle System in Duality and showcases its functionality in a sample Scene.
Duality Sample Plugin Particles Rendering
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Physics.Sample.nuspec b/Build/NuGetPackageSpecs/Physics.Sample.nuspec
index a6258c9d0..082953b06 100644
--- a/Build/NuGetPackageSpecs/Physics.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/Physics.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.Physics
- 2.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Physics Sample
@@ -13,18 +13,18 @@
Demonstrates how to use physics simulation in Duality.
This package contains a testbed for RigidBody physics simulation, showing various aspects of their configuration and interaction.
Duality Sample Plugin Physics
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/ProjectView.Editor.nuspec b/Build/NuGetPackageSpecs/ProjectView.Editor.nuspec
index 2e0857765..17231efb5 100644
--- a/Build/NuGetPackageSpecs/ProjectView.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/ProjectView.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.ProjectView
- 3.0.5
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Project View
@@ -16,8 +16,8 @@
Patch Version Update
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/SceneView.Editor.nuspec b/Build/NuGetPackageSpecs/SceneView.Editor.nuspec
index a6babbe74..4f4e45192 100644
--- a/Build/NuGetPackageSpecs/SceneView.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/SceneView.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.SceneView
- 3.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Scene View
@@ -16,8 +16,8 @@
Patch Version Update
-
-
+
+
diff --git a/Build/NuGetPackageSpecs/SmoothAnimation.Sample.nuspec b/Build/NuGetPackageSpecs/SmoothAnimation.Sample.nuspec
index 11422893e..d6b914950 100644
--- a/Build/NuGetPackageSpecs/SmoothAnimation.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/SmoothAnimation.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.SmoothAnimation
- 2.0.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Smooth Sprite Animation Blending Sample
@@ -13,18 +13,18 @@
Demonstrates a smooth blending technique for sprite animations.
This package implements a custom sprite renderer that is able to smoothly blend between two animation frames using a shader, rather than switching between the two frames instantaneously.
Duality Sample Plugin Shaders Animation Rendering
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
-
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Steering.Sample.nuspec b/Build/NuGetPackageSpecs/Steering.Sample.nuspec
index f0ae94049..23fe548fa 100644
--- a/Build/NuGetPackageSpecs/Steering.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/Steering.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.Steering
- 3.0.5
+ 4.0.0-alpha
Daniel Herb, Fedja Adam
Daniel Herb, Fedja Adam
Steering Behaviours Sample
@@ -13,18 +13,17 @@
Introduces a Steering Agent Component that allows for objects to evade each other.
Introduces a Steering Agent Component that allows for objects to evade each other.
Duality Sample Plugin Steering Component AI
- Patch Version Update
-
+ Patch Version Update
+
+
+
-
+
-
-
-
-
+
\ No newline at end of file
diff --git a/Build/NuGetPackageSpecs/Tilemaps.Core.nuspec b/Build/NuGetPackageSpecs/Tilemaps.Core.nuspec
index eaf42759e..d0cf0b21f 100644
--- a/Build/NuGetPackageSpecs/Tilemaps.Core.nuspec
+++ b/Build/NuGetPackageSpecs/Tilemaps.Core.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Plugins.Tilemaps
- 2.1.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Tilemaps (Core)
@@ -16,7 +16,7 @@
Tilemap Editing Default Empty Tile
#CHANGE: Use a default empty tile for all empty tiles.
-
+
diff --git a/Build/NuGetPackageSpecs/Tilemaps.Editor.nuspec b/Build/NuGetPackageSpecs/Tilemaps.Editor.nuspec
index bcbc0f47d..0d9899eb7 100644
--- a/Build/NuGetPackageSpecs/Tilemaps.Editor.nuspec
+++ b/Build/NuGetPackageSpecs/Tilemaps.Editor.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Editor.Plugins.Tilemaps
- 2.1.4
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Tilemaps (Editor)
@@ -16,9 +16,9 @@
Tilemap Editing Default Empty Tile
#CHANGE: Use a default empty tile for all empty tiles.
-
-
-
+
+
+
diff --git a/Build/NuGetPackageSpecs/Tilemaps.Sample.nuspec b/Build/NuGetPackageSpecs/Tilemaps.Sample.nuspec
index 656617d83..103cdd487 100644
--- a/Build/NuGetPackageSpecs/Tilemaps.Sample.nuspec
+++ b/Build/NuGetPackageSpecs/Tilemaps.Sample.nuspec
@@ -2,7 +2,7 @@
AdamsLair.Duality.Samples.Tilemaps
- 2.0.9
+ 4.0.0-alpha
Fedja Adam
Fedja Adam
Tilemaps Sample
@@ -15,17 +15,18 @@
Duality Sample Plugin Tilemaps
Updated Dependencies
#CHANGE: Updated AdamsLair.Duality.Editor.Plugins.Tilemaps dependency
+
+
+
-
-
-
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Duality.sln b/Duality.sln
index 2730084e7..065e30c20 100644
--- a/Duality.sln
+++ b/Duality.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27428.1
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29911.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duality", "Source\Core\Duality\Duality.csproj", "{D821AFB9-BCC9-4025-9A9C-798E2BC546AB}"
EndProject
@@ -35,8 +35,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EditorModules", "EditorModu
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DualityUpdater", "Source\Editor\Updater\DualityUpdater.csproj", "{7BED6319-022E-4B62-8F64-F51DE9A2D7EF}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageManagerFrontend.Editor", "Source\Plugins\EditorModules\PackageManagerFrontend\PackageManagerFrontend.Editor.csproj", "{E771E45B-3EB3-4CD3-8483-7D8798D0F5F8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DualStickSpaceShooter", "Samples\DualStickSpaceShooter\DualStickSpaceShooter.csproj", "{54376712-DBFA-4EF3-A8BA-B1D44A2DA97E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DualityPrimitives", "Source\Core\Primitives\DualityPrimitives.csproj", "{C87A6A2F-E537-48FA-A789-3C54CF29CC09}"
@@ -168,10 +166,6 @@ Global
{7BED6319-022E-4B62-8F64-F51DE9A2D7EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BED6319-022E-4B62-8F64-F51DE9A2D7EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BED6319-022E-4B62-8F64-F51DE9A2D7EF}.Release|Any CPU.Build.0 = Release|Any CPU
- {E771E45B-3EB3-4CD3-8483-7D8798D0F5F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E771E45B-3EB3-4CD3-8483-7D8798D0F5F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E771E45B-3EB3-4CD3-8483-7D8798D0F5F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E771E45B-3EB3-4CD3-8483-7D8798D0F5F8}.Release|Any CPU.Build.0 = Release|Any CPU
{54376712-DBFA-4EF3-A8BA-B1D44A2DA97E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54376712-DBFA-4EF3-A8BA-B1D44A2DA97E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54376712-DBFA-4EF3-A8BA-B1D44A2DA97E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -281,7 +275,6 @@ Global
{E67350ED-2676-492A-9FBE-A08B5FBF3726} = {1F9CE5E4-5E97-4813-9299-33064673D393}
{1F9CE5E4-5E97-4813-9299-33064673D393} = {F7B868F5-0B5D-497C-BA40-FA08DD3EB07D}
{7BED6319-022E-4B62-8F64-F51DE9A2D7EF} = {8425804A-7CFA-4E0B-9672-F979830DCC0F}
- {E771E45B-3EB3-4CD3-8483-7D8798D0F5F8} = {1F9CE5E4-5E97-4813-9299-33064673D393}
{54376712-DBFA-4EF3-A8BA-B1D44A2DA97E} = {9D215950-8E34-4070-914F-7B7D8A54ED6C}
{C87A6A2F-E537-48FA-A789-3C54CF29CC09} = {FC08D0D6-612E-4AD2-950C-8E9BA895D5D1}
{FDA91F3F-1621-4E41-A1FC-2C3F45754CE4} = {34618774-B865-4BAC-A890-925704761500}
@@ -307,9 +300,6 @@ Global
{165D83B8-EAE8-4CDC-9003-E595D4225B8F} = {9D215950-8E34-4070-914F-7B7D8A54ED6C}
{5CA66347-C3DA-47DA-B07B-E2B89E6E712A} = {FC08D0D6-612E-4AD2-950C-8E9BA895D5D1}
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {9A945D0B-5EF2-4D0D-BE86-3AEE6659F281}
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {74E2A280-F2F3-400D-9CC2-7A91D6D3D15C}
EndGlobalSection
diff --git a/Samples/AudioHandling/Properties/AssemblyInfo.cs b/Samples/AudioHandling/Properties/AssemblyInfo.cs
index 47b46b5e7..72f8537d0 100644
--- a/Samples/AudioHandling/Properties/AssemblyInfo.cs
+++ b/Samples/AudioHandling/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/BasicMenu/Properties/AssemblyInfo.cs b/Samples/BasicMenu/Properties/AssemblyInfo.cs
index 35776cd86..5c1ce9572 100644
--- a/Samples/BasicMenu/Properties/AssemblyInfo.cs
+++ b/Samples/BasicMenu/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/BasicShaders/Properties/AssemblyInfo.cs b/Samples/BasicShaders/Properties/AssemblyInfo.cs
index 59e174f90..a4f5b96f4 100644
--- a/Samples/BasicShaders/Properties/AssemblyInfo.cs
+++ b/Samples/BasicShaders/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/Benchmarks/Properties/AssemblyInfo.cs b/Samples/Benchmarks/Properties/AssemblyInfo.cs
index fd7de07df..91b5fc4d7 100644
--- a/Samples/Benchmarks/Properties/AssemblyInfo.cs
+++ b/Samples/Benchmarks/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("2.0.4")]
-[assembly: AssemblyVersion("2.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/CameraController/Properties/AssemblyInfo.cs b/Samples/CameraController/Properties/AssemblyInfo.cs
index 35776cd86..5c1ce9572 100644
--- a/Samples/CameraController/Properties/AssemblyInfo.cs
+++ b/Samples/CameraController/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/CustomRenderingSetup/Properties/AssemblyInfo.cs b/Samples/CustomRenderingSetup/Properties/AssemblyInfo.cs
index 74bcffeb1..5d03c6763 100644
--- a/Samples/CustomRenderingSetup/Properties/AssemblyInfo.cs
+++ b/Samples/CustomRenderingSetup/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("2.0.4")]
-[assembly: AssemblyVersion("2.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/DualStickSpaceShooter/Properties/AssemblyInfo.cs b/Samples/DualStickSpaceShooter/Properties/AssemblyInfo.cs
index 4dc5611f1..4eb97b51a 100644
--- a/Samples/DualStickSpaceShooter/Properties/AssemblyInfo.cs
+++ b/Samples/DualStickSpaceShooter/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/DynamicLighting/Core/Properties/AssemblyInfo.cs b/Samples/DynamicLighting/Core/Properties/AssemblyInfo.cs
index 9865b94cd..065f7a5e5 100644
--- a/Samples/DynamicLighting/Core/Properties/AssemblyInfo.cs
+++ b/Samples/DynamicLighting/Core/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/DynamicLighting/Editor/Properties/AssemblyInfo.cs b/Samples/DynamicLighting/Editor/Properties/AssemblyInfo.cs
index 2220fe059..e59617b48 100644
--- a/Samples/DynamicLighting/Editor/Properties/AssemblyInfo.cs
+++ b/Samples/DynamicLighting/Editor/Properties/AssemblyInfo.cs
@@ -30,6 +30,5 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/FlapOrDie/Properties/AssemblyInfo.cs b/Samples/FlapOrDie/Properties/AssemblyInfo.cs
index 3bd12f0b6..226ceab0e 100644
--- a/Samples/FlapOrDie/Properties/AssemblyInfo.cs
+++ b/Samples/FlapOrDie/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/InputHandling/Properties/AssemblyInfo.cs b/Samples/InputHandling/Properties/AssemblyInfo.cs
index caeeb5458..623d104d3 100644
--- a/Samples/InputHandling/Properties/AssemblyInfo.cs
+++ b/Samples/InputHandling/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/ParticleSystem/Properties/AssemblyInfo.cs b/Samples/ParticleSystem/Properties/AssemblyInfo.cs
index 70aecd78f..619f7001f 100644
--- a/Samples/ParticleSystem/Properties/AssemblyInfo.cs
+++ b/Samples/ParticleSystem/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/Physics/Properties/AssemblyInfo.cs b/Samples/Physics/Properties/AssemblyInfo.cs
index fd7de07df..91b5fc4d7 100644
--- a/Samples/Physics/Properties/AssemblyInfo.cs
+++ b/Samples/Physics/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("2.0.4")]
-[assembly: AssemblyVersion("2.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/SmoothAnimation/Properties/AssemblyInfo.cs b/Samples/SmoothAnimation/Properties/AssemblyInfo.cs
index 74bcffeb1..5d03c6763 100644
--- a/Samples/SmoothAnimation/Properties/AssemblyInfo.cs
+++ b/Samples/SmoothAnimation/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("2.0.4")]
-[assembly: AssemblyVersion("2.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/Steering/Properties/AssemblyInfo.cs b/Samples/Steering/Properties/AssemblyInfo.cs
index f9a307f52..b7e861844 100644
--- a/Samples/Steering/Properties/AssemblyInfo.cs
+++ b/Samples/Steering/Properties/AssemblyInfo.cs
@@ -32,5 +32,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.0.5")]
-[assembly: AssemblyVersion("3.0.5")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Samples/Tilemaps/Properties/AssemblyInfo.cs b/Samples/Tilemaps/Properties/AssemblyInfo.cs
index 9261bcba6..3b80e64c3 100644
--- a/Samples/Tilemaps/Properties/AssemblyInfo.cs
+++ b/Samples/Tilemaps/Properties/AssemblyInfo.cs
@@ -31,5 +31,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("2.0.9")]
-[assembly: AssemblyVersion("2.0.9")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Source/Core/Duality/Properties/AssemblyInfo.cs b/Source/Core/Duality/Properties/AssemblyInfo.cs
index cf27e26a9..953d2a109 100644
--- a/Source/Core/Duality/Properties/AssemblyInfo.cs
+++ b/Source/Core/Duality/Properties/AssemblyInfo.cs
@@ -30,9 +30,6 @@
// Buildnummer
// Revision
//
-// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
-// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("3.2.1")]
-[assembly: AssemblyVersion("3.2.1")]
+[assembly: AssemblyVersion("4.0.0")]
[assembly: InternalsVisibleTo("DualityEditor")]
[assembly: InternalsVisibleTo("DualityTests")]
diff --git a/Source/Core/Physics/Properties/AssemblyInfo.cs b/Source/Core/Physics/Properties/AssemblyInfo.cs
index 6b6276000..46df87e64 100644
--- a/Source/Core/Physics/Properties/AssemblyInfo.cs
+++ b/Source/Core/Physics/Properties/AssemblyInfo.cs
@@ -23,4 +23,4 @@
// Revision
//
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Source/Core/Primitives/Properties/AssemblyInfo.cs b/Source/Core/Primitives/Properties/AssemblyInfo.cs
index 0c2dd1aa4..ae49d1625 100644
--- a/Source/Core/Primitives/Properties/AssemblyInfo.cs
+++ b/Source/Core/Primitives/Properties/AssemblyInfo.cs
@@ -25,5 +25,4 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-// [assembly: AssemblyVersion("3.0.4")]
-[assembly: AssemblyVersion("3.0.4")]
+[assembly: AssemblyVersion("4.0.0")]
diff --git a/Source/Editor/DualityEditor/DualityEditor.csproj b/Source/Editor/DualityEditor/DualityEditor.csproj
index ba6559552..574aefb1f 100644
--- a/Source/Editor/DualityEditor/DualityEditor.csproj
+++ b/Source/Editor/DualityEditor/DualityEditor.csproj
@@ -161,13 +161,6 @@
-
-
-
-
-
-
-
@@ -214,13 +207,6 @@
-
-
-
-
-
-
-
True
True
@@ -248,12 +234,6 @@
AppRunningDialog.cs
-
- Form
-
-
- NewProjectDialog.cs
-
Form
@@ -349,9 +329,6 @@
AppRunningDialog.cs
-
- NewProjectDialog.cs
-
ProcessingBigTaskDialog.cs
@@ -401,7 +378,6 @@
-
@@ -416,8 +392,6 @@
-
-
@@ -427,13 +401,11 @@
-
-
@@ -457,20 +429,17 @@
2.1.1
-
- 2.14.0
-
+
-
-
+
+
-
@@ -478,7 +447,4 @@
-
-
-
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/DualityEditorApp.cs b/Source/Editor/DualityEditor/DualityEditorApp.cs
index 7db538ded..d1e0f925c 100644
--- a/Source/Editor/DualityEditor/DualityEditorApp.cs
+++ b/Source/Editor/DualityEditor/DualityEditorApp.cs
@@ -21,7 +21,6 @@
using Duality.Editor.Backend;
using Duality.Editor.Forms;
using Duality.Editor.UndoRedoActions;
-using Duality.Editor.PackageManagement;
using Duality.Editor.AssetManagement;
using WeifenLuo.WinFormsUI.Docking;
@@ -65,7 +64,6 @@ public static class DualityEditorApp
private static string launcherApp = null;
private static ContentRef lastOpenScene = null;
private static bool startWithLastScene = true;
- private static PackageManager packageManager = null;
private static EditorLogOutput memoryLogOutput = null;
@@ -95,10 +93,6 @@ public static EditorLogOutput GlobalLogData
{
get { return memoryLogOutput; }
}
- public static PackageManager PackageManager
- {
- get { return packageManager; }
- }
public static MainForm MainForm
{
get { return mainForm; }
@@ -167,7 +161,6 @@ public static string LauncherAppPath
if (value != launcherApp)
{
launcherApp = value;
- UpdatePluginSourceCode();
}
}
}
@@ -222,9 +215,6 @@ public static void Init(MainForm mainForm, bool recover)
if (!Directory.Exists(EditorHelper.SourceMediaDirectory)) Directory.CreateDirectory(EditorHelper.SourceMediaDirectory);
if (!Directory.Exists(EditorHelper.SourceCodeDirectory)) Directory.CreateDirectory(EditorHelper.SourceCodeDirectory);
- // Initialize Package Management system
- packageManager = new PackageManager();
-
// Initialize Duality
EditorHintImageAttribute.ImageResolvers += EditorHintImageResolver;
DualityApp.PluginManager.PluginsReady += DualityApp_PluginsReady;
@@ -763,226 +753,6 @@ public static void BackupResource(string path)
Logs.Editor.WriteError("Backup of file '{0}' failed: {1}", path, LogFormat.Exception(e));
}
}
-
- public static void UpdatePluginSourceCode()
- {
- string sourceCodeSolutionFile = EditorHelper.SourceCodeSolutionFilePath;
- // Initially generate source code, if not existing yet
- if (!File.Exists(sourceCodeSolutionFile))
- {
- InitPluginSourceCode();
- sourceCodeSolutionFile = EditorHelper.DefaultSourceCodeSolutionFile;
- }
-
- // Replace exec path in project files to account for custom launcher settings
- {
- XDocument projectDoc;
- string solutionDir = Path.GetFullPath(Path.GetDirectoryName(sourceCodeSolutionFile));
-
- string startProgram = Path.GetFullPath(DualityEditorApp.LauncherAppPath);
- string startProgramRelative = PathHelper.MakeFilePathRelative(startProgram, solutionDir);
- if (startProgramRelative != null)
- startProgramRelative = "$(SolutionDir)" + startProgramRelative;
- else
- startProgramRelative = startProgram;
-
- string startWorkingDir = Path.GetFullPath(".");
- string startWorkingDirRelative = PathHelper.MakeDirectoryPathRelative(startWorkingDir, solutionDir);
- if (startWorkingDirRelative != null)
- startWorkingDirRelative = "$(SolutionDir)" + startWorkingDirRelative;
- else
- startWorkingDirRelative = startWorkingDir;
-
- // Adjust the game debugger startup parameters
- string gameDebuggerProjectFile = EditorHelper.SourceCodeProjectGameDebuggerFile;
- if (File.Exists(gameDebuggerProjectFile))
- {
- bool anythingChanged = false;
-
- projectDoc = XDocument.Load(gameDebuggerProjectFile);
- foreach (XElement element in projectDoc.Descendants("StartProgram", true))
- {
- if (!string.Equals(element.Value, startProgramRelative))
- {
- element.Value = startProgramRelative;
- anythingChanged = true;
- }
- }
- foreach (XElement element in projectDoc.Descendants("StartWorkingDirectory", true))
- {
- if (!string.Equals(element.Value, startWorkingDirRelative))
- {
- element.Value = startWorkingDirRelative;
- anythingChanged = true;
- }
- }
- if (anythingChanged)
- {
- projectDoc.Save(gameDebuggerProjectFile);
- }
- }
-
- // Legacy support 2019-07-27:
- // Adjust the core plugin startup parameters
- string corePluginProjectFile = EditorHelper.SourceCodeProjectCorePluginFile;
- if (File.Exists(corePluginProjectFile))
- {
- bool anythingChanged = false;
-
- projectDoc = XDocument.Load(corePluginProjectFile);
- foreach (XElement element in projectDoc.Descendants("StartProgram", true))
- {
- if (!string.Equals(element.Value, startProgramRelative))
- {
- element.Value = startProgramRelative;
- anythingChanged = true;
- }
- }
- foreach (XElement element in projectDoc.Descendants("StartWorkingDirectory", true))
- {
- if (!string.Equals(element.Value, startWorkingDirRelative))
- {
- element.Value = startWorkingDirRelative;
- anythingChanged = true;
- }
- }
- if (anythingChanged)
- {
- projectDoc.Save(corePluginProjectFile);
- }
- }
- }
- }
- public static void ReadPluginSourceCodeContentData(out string rootNamespace, out string desiredRootNamespace)
- {
- rootNamespace = null;
- desiredRootNamespace = EditorHelper.GenerateClassNameFromPath(EditorHelper.CurrentProjectName);
-
- // Read root namespaces
- if (File.Exists(EditorHelper.SourceCodeProjectCorePluginFile))
- {
- XDocument projXml = XDocument.Load(EditorHelper.SourceCodeProjectCorePluginFile);
- foreach (XElement element in projXml.Descendants("RootNamespace", true))
- {
- if (rootNamespace == null) rootNamespace = element.Value;
- }
- }
- }
- public static void InitPluginSourceCode()
- {
- // Check if the solution file has to be created
- if (!File.Exists(EditorHelper.SourceCodeSolutionFilePath))
- {
- // Create solution file
- using (MemoryStream gamePluginStream = new MemoryStream(Properties.GeneralRes.GamePluginTemplate))
- using (ZipArchive gamePluginZip = new ZipArchive(gamePluginStream))
- {
- gamePluginZip.ExtractAll(EditorHelper.SourceCodeDirectory, false);
- }
- }
-
- string projectClassName = EditorHelper.GenerateClassNameFromPath(EditorHelper.CurrentProjectName);
- string newRootNamespaceCore = projectClassName;
- string newRootNamespaceEditor = newRootNamespaceCore + ".Editor";
- string pluginNameCore = projectClassName + "CorePlugin";
- string pluginNameEditor = projectClassName + "EditorPlugin";
- string oldRootNamespaceCore = null;
- string oldRootNamespaceEditor = null;
-
- // Update root namespaces
- if (File.Exists(EditorHelper.SourceCodeProjectCorePluginFile))
- {
- XDocument projXml = XDocument.Load(EditorHelper.SourceCodeProjectCorePluginFile);
- foreach (XElement element in projXml.Descendants("RootNamespace", true))
- {
- if (oldRootNamespaceCore == null) oldRootNamespaceCore = element.Value;
- element.Value = newRootNamespaceCore;
- }
- projXml.Save(EditorHelper.SourceCodeProjectCorePluginFile);
- }
-
- if (File.Exists(EditorHelper.SourceCodeProjectEditorPluginFile))
- {
- XDocument projXml = XDocument.Load(EditorHelper.SourceCodeProjectEditorPluginFile);
- foreach (XElement element in projXml.Descendants("RootNamespace", true))
- {
- if (oldRootNamespaceEditor == null) oldRootNamespaceEditor = element.Value;
- element.Value = newRootNamespaceEditor;
- }
- projXml.Save(EditorHelper.SourceCodeProjectEditorPluginFile);
- }
-
- // Guess old plugin class names
- string oldPluginNameCore = oldRootNamespaceCore + "CorePlugin";
- string oldPluginNameEditor = oldRootNamespaceCore + "EditorPlugin";
- string regExpr;
- string regExprReplace;
-
- // Replace namespace names: Core
- if (Directory.Exists(EditorHelper.SourceCodeProjectCorePluginDir))
- {
- regExpr = @"^(\s*namespace\s*)(.*)(" + oldRootNamespaceCore + @")(.*)(\s*{)";
- regExprReplace = @"$1$2" + newRootNamespaceCore + @"$4$5";
- foreach (string filePath in Directory.GetFiles(EditorHelper.SourceCodeProjectCorePluginDir, "*.cs", SearchOption.AllDirectories))
- {
- string fileContent = File.ReadAllText(filePath);
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
- File.WriteAllText(filePath, fileContent, Encoding.UTF8);
- }
- }
-
- // Replace namespace names: Editor
- if (Directory.Exists(EditorHelper.SourceCodeProjectEditorPluginDir))
- {
- regExpr = @"^(\s*namespace\s*)(.*)(" + oldRootNamespaceEditor + @")(.*)(\s*{)";
- regExprReplace = @"$1$2" + newRootNamespaceEditor + @"$4$5";
- foreach (string filePath in Directory.GetFiles(EditorHelper.SourceCodeProjectEditorPluginDir, "*.cs", SearchOption.AllDirectories))
- {
- string fileContent = File.ReadAllText(filePath);
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
- File.WriteAllText(filePath, fileContent, Encoding.UTF8);
- }
- }
-
- // Replace class names: Core
- if (File.Exists(EditorHelper.SourceCodeCorePluginFile))
- {
- string fileContent = File.ReadAllText(EditorHelper.SourceCodeCorePluginFile);
-
- // Replace class name
- regExpr = @"(\bclass\b)(.*)(" + oldPluginNameCore + @")(.*)(\s*{)";
- regExprReplace = @"$1$2" + pluginNameCore + @"$4$5";
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
-
- regExpr = @"(\bclass\b)(.*)(" + @"__CorePluginClassName__" + @")(.*)(\s*{)";
- regExprReplace = @"$1$2" + pluginNameCore + @"$4$5";
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
-
- File.WriteAllText(EditorHelper.SourceCodeCorePluginFile, fileContent, Encoding.UTF8);
- }
-
- // Replace class names: Editor
- if (File.Exists(EditorHelper.SourceCodeEditorPluginFile))
- {
- string fileContent = File.ReadAllText(EditorHelper.SourceCodeEditorPluginFile);
-
- // Replace class name
- regExpr = @"(\bclass\b)(.*)(" + oldPluginNameEditor + @")(.*)(\s*{)";
- regExprReplace = @"$1$2" + pluginNameEditor + @"$4$5";
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
-
- regExpr = @"(\bclass\b)(.*)(" + @"__EditorPluginClassName__" + @")(.*)(\s*{)";
- regExprReplace = @"$1$2" + pluginNameEditor + @"$4$5";
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
-
- // Repalce Id property
- regExpr = @"(\boverride\s*string\s*Id\s*{\s*get\s*{\s*return\s*" + '"' + @")(.*)(" + '"' + @"\s*;\s*}\s*})";
- regExprReplace = @"$1" + pluginNameEditor + @"$3";
- fileContent = Regex.Replace(fileContent, regExpr, regExprReplace, RegexOptions.Multiline);
-
- File.WriteAllText(EditorHelper.SourceCodeEditorPluginFile, fileContent, Encoding.UTF8);
- }
- }
public static void NotifyObjPrefabApplied(object sender, ObjectSelection obj)
{
@@ -1429,9 +1199,7 @@ private static void mainForm_Activated(object sender, EventArgs e)
}
private static void mainForm_Deactivate(object sender, EventArgs e)
{
- // Update source code, in case the user is switching to his IDE without hitting the "open source code" button again
- if (DualityApp.ExecContext != DualityApp.ExecutionContext.Terminated)
- DualityEditorApp.UpdatePluginSourceCode();
+
}
private static void editorObjects_GameObjectsAdded(object sender, GameObjectGroupEventArgs e)
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/ErrorHandlersTemplate.txt b/Source/Editor/DualityEditor/EmbeddedResources/ErrorHandlersTemplate.txt
deleted file mode 100644
index 62b3835db..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/ErrorHandlersTemplate.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Duality;
-using Duality.Serialization;
-
-namespace ROOTNAMESPACE.ErrorHandlers
-{
- public class NewProjectErrorHandler : SerializeErrorHandler
- {
- public override void HandleError(SerializeError error)
- {
- ResolveTypeError resolveTypeError = error as ResolveTypeError;
- if (resolveTypeError != null)
- {
- string fixedTypeId = resolveTypeError.TypeId;
-
- if (fixedTypeId.StartsWith("OLDROOTNAMESPACE") &&
- fixedTypeId.Length > "OLDROOTNAMESPACE".Length &&
- (fixedTypeId["OLDROOTNAMESPACE".Length] == '.' || fixedTypeId["OLDROOTNAMESPACE".Length] == '+'))
- {
- fixedTypeId = "ROOTNAMESPACE" + fixedTypeId.Remove(0, "OLDROOTNAMESPACE".Length);
- resolveTypeError.ResolvedType = ReflectionHelper.ResolveType(fixedTypeId);
- }
- }
-
- return;
- }
- }
-}
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/AggregateUserPlugins.targets b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/AggregateUserPlugins.targets
deleted file mode 100644
index efd1a2b59..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/AggregateUserPlugins.targets
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- $(SolutionDir)..\..\Plugins\
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/CorePlugin.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/CorePlugin.cs
deleted file mode 100644
index 30cdc6cba..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/CorePlugin.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Duality;
-
-namespace __Namespace__
-{
- ///
- /// Defines a Duality core plugin.
- ///
- public class __CorePluginClassName__ : CorePlugin
- {
- // Override methods here for global logic
- }
-}
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/CorePlugin.csproj b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/CorePlugin.csproj
deleted file mode 100644
index 3f9e6e26d..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/CorePlugin.csproj
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {AFE883F3-72B4-4C7C-A1D1-44EDC09C8F6E}
- Library
- Properties
- __Namespace__
- GamePlugin.core
- 512
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Profile111
- v4.5
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- GamePlugin.core.xml
- 1591,1592,1573,1571,1570,1572
- false
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- GamePlugin.core.xml
- 1591,1592,1573,1571,1570,1572
- false
-
-
-
- ..\..\..\Duality.dll
-
-
- ..\..\..\DualityPrimitives.dll
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/Properties/AssemblyInfo.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/Properties/AssemblyInfo.cs
deleted file mode 100644
index 75f174dcc..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Allgemeine Informationen über eine Assembly werden über die folgenden
-// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
-// die mit einer Assembly verknüpft sind.
-[assembly: AssemblyTitle("GamePlugin")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GamePlugin")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
-// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
-// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
-[assembly: ComVisible(false)]
-
-// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
-[assembly: Guid("00c8792c-39b8-4558-acf9-03013402301a")]
-
-// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
-//
-// Hauptversion
-// Nebenversion
-// Buildnummer
-// Revision
-//
-// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
-// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/YourCustomComponentType.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/YourCustomComponentType.cs
deleted file mode 100644
index e57232eb1..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/CorePlugin/YourCustomComponentType.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using Duality;
-
-namespace __Namespace__
-{
- public class YourCustomComponentType : Component
- {
-
- }
-}
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/EditorPlugin.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/EditorPlugin.cs
deleted file mode 100644
index 1404de394..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/EditorPlugin.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Duality.Editor;
-
-namespace __Namespace__.Editor
-{
- ///
- /// Defines a Duality editor plugin.
- ///
- public class __EditorPluginClassName__ : EditorPlugin
- {
- public override string Id
- {
- get { return ""; }
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/EditorPlugin.csproj b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/EditorPlugin.csproj
deleted file mode 100644
index 844fe3f4a..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/EditorPlugin.csproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {78DBC94D-EE9D-4AC0-95ED-91A0AE2F6652}
- Library
- Properties
- __Namespace__.Editor
- GamePlugin.editor
- v4.7.2
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
-
- ..\..\..\Duality.dll
-
-
- ..\..\..\DualityPrimitives.dll
-
-
- ..\..\..\DualityEditor.exe
-
-
-
-
-
- ..\..\..\WeifenLuo.WinFormsUI.Docking.dll
-
-
- ..\..\..\Aga.Controls.dll
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/Properties/AssemblyInfo.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/Properties/AssemblyInfo.cs
deleted file mode 100644
index cfe489d22..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/EditorPlugin/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Allgemeine Informationen über eine Assembly werden über die folgenden
-// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
-// die mit einer Assembly verknüpft sind.
-[assembly: AssemblyTitle("EditorPlugin")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("EditorPlugin")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
-// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
-// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
-[assembly: ComVisible(false)]
-
-// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
-[assembly: Guid("97bf1f9a-a247-4620-8818-ba9d40d1822b")]
-
-// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
-//
-// Hauptversion
-// Nebenversion
-// Buildnummer
-// Revision
-//
-// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
-// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/GameDebugger.csproj b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/GameDebugger.csproj
deleted file mode 100644
index b11c9722e..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/GameDebugger.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- Program
- (Dualiy_Placeholder)
- (Dualiy_Placeholder)
-
-
- Debug
- AnyCPU
- {61D53BD6-B088-4B39-BE2E-95034EDAAC3B}
- Exe
- GameDebugger
- GameDebugger
- v4.7.2
- 512
- true
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/Program.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/Program.cs
deleted file mode 100644
index 219c95405..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/Program.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace GameDebugger
-{
- ///
- /// This is a dummy project that serves as a debug target for the Duality launcher.
- ///
- /// It will not be included in a published game in any way and does not produce any
- /// meaningful output itself.
- ///
- public static class Program
- {
- public static void Main(string[] args)
- {
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/Properties/AssemblyInfo.cs b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/Properties/AssemblyInfo.cs
deleted file mode 100644
index 67a0bc3f4..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/GameDebugger/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GameDebugger")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GameDebugger")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("61d53bd6-b088-4b39-be2e-95034edaac3b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/ProjectPlugins.sln b/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/ProjectPlugins.sln
deleted file mode 100644
index 6e0f73636..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GamePluginTemplate/ProjectPlugins.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameDebugger", "GameDebugger\GameDebugger.csproj", "{61D53BD6-B088-4B39-BE2E-95034EDAAC3B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorePlugin", "CorePlugin\CorePlugin.csproj", "{AFE883F3-72B4-4C7C-A1D1-44EDC09C8F6E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {61D53BD6-B088-4B39-BE2E-95034EDAAC3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {61D53BD6-B088-4B39-BE2E-95034EDAAC3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {61D53BD6-B088-4B39-BE2E-95034EDAAC3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {61D53BD6-B088-4B39-BE2E-95034EDAAC3B}.Release|Any CPU.Build.0 = Release|Any CPU
- {AFE883F3-72B4-4C7C-A1D1-44EDC09C8F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AFE883F3-72B4-4C7C-A1D1-44EDC09C8F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AFE883F3-72B4-4C7C-A1D1-44EDC09C8F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AFE883F3-72B4-4C7C-A1D1-44EDC09C8F6E}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/GameResTemplate.txt b/Source/Editor/DualityEditor/EmbeddedResources/GameResTemplate.txt
deleted file mode 100644
index 555383356..000000000
--- a/Source/Editor/DualityEditor/EmbeddedResources/GameResTemplate.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * A set of static helper classes that provide easy runtime access to the games resources.
- * This file is auto-generated. Any changes made to it are lost as soon as Duality decides
- * to regenerate it.
- */
-namespace GameRes
-{
-CONTENT
-}
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/template_current.png b/Source/Editor/DualityEditor/EmbeddedResources/template_current.png
deleted file mode 100644
index b67ae389b..000000000
Binary files a/Source/Editor/DualityEditor/EmbeddedResources/template_current.png and /dev/null differ
diff --git a/Source/Editor/DualityEditor/EmbeddedResources/template_empty.png b/Source/Editor/DualityEditor/EmbeddedResources/template_empty.png
deleted file mode 100644
index 69d6132f8..000000000
Binary files a/Source/Editor/DualityEditor/EmbeddedResources/template_empty.png and /dev/null differ
diff --git a/Source/Editor/DualityEditor/Forms/MainForm.cs b/Source/Editor/DualityEditor/Forms/MainForm.cs
index dc8fc063e..236166af1 100644
--- a/Source/Editor/DualityEditor/Forms/MainForm.cs
+++ b/Source/Editor/DualityEditor/Forms/MainForm.cs
@@ -97,14 +97,6 @@ public void InitMenus()
{
new MenuModelItem { Name = GeneralRes.MenuName_File, SortValue = MenuModelItem.SortValue_Top, Items = new[]
{
- new MenuModelItem
- {
- Name = GeneralRes.MenuItemName_NewProject,
- SortValue = MenuModelItem.SortValue_Top,
- Icon = Properties.GeneralResCache.ImageAppCreate,
- Tag = HelpInfo.FromText(GeneralRes.MenuItemName_NewProject, GeneralRes.MenuItemInfo_NewProject),
- ActionHandler = this.newProjectItem_Click
- },
new MenuModelItem
{
Name = GeneralRes.MenuItemName_PublishGame,
@@ -565,7 +557,6 @@ private void actionSaveAll_Click(object sender, EventArgs e)
}
private void actionOpenCode_Click(object sender, EventArgs e)
{
- DualityEditorApp.UpdatePluginSourceCode();
System.Diagnostics.Process.Start(EditorHelper.SourceCodeSolutionFilePath);
}
private void actionPublishGame_Click(object sender, EventArgs e) {
@@ -634,24 +625,6 @@ private void welcomeDialog_Disposed(object sender, EventArgs e)
this.welcomeDialog.Disposed -= this.welcomeDialog_Disposed;
this.welcomeDialog = null;
}
- private void newProjectItem_Click(object sender, EventArgs e)
- {
- NewProjectDialog newProject = new NewProjectDialog();
- DialogResult result = newProject.ShowDialog(this);
-
- // Project successfully created?
- if (result == DialogResult.OK)
- {
- // Open new project
- var startInfo = new System.Diagnostics.ProcessStartInfo(newProject.ResultEditorBinary);
- startInfo.WorkingDirectory = Path.GetDirectoryName(startInfo.FileName);
- startInfo.UseShellExecute = false;
- System.Diagnostics.Process.Start(startInfo);
-
- // Don't need this DualityEditor anymore - close it!
- this.CloseNonUser();
- }
- }
private void formatSetDefault_Click(object sender, EventArgs e)
{
diff --git a/Source/Editor/DualityEditor/Forms/NewProjectDialog.Designer.cs b/Source/Editor/DualityEditor/Forms/NewProjectDialog.Designer.cs
deleted file mode 100644
index a97c98c8e..000000000
--- a/Source/Editor/DualityEditor/Forms/NewProjectDialog.Designer.cs
+++ /dev/null
@@ -1,382 +0,0 @@
-namespace Duality.Editor.Forms
-{
- partial class NewProjectDialog
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewProjectDialog));
- this.folderView = new Aga.Controls.Tree.TreeViewAdv();
- this.folderViewControlIcon = new Aga.Controls.Tree.NodeControls.NodeStateIcon();
- this.folderViewControlName = new Aga.Controls.Tree.NodeControls.NodeTextBox();
- this.imageListTemplateView = new System.Windows.Forms.ImageList(this.components);
- this.splitFolderTemplate = new System.Windows.Forms.SplitContainer();
- this.templateView = new Duality.Editor.Controls.ExplorerListView();
- this.columnName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.columnDesc = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.buttonCancel = new System.Windows.Forms.Button();
- this.buttonOk = new System.Windows.Forms.Button();
- this.labelProjectName = new System.Windows.Forms.Label();
- this.labelProjectFolder = new System.Windows.Forms.Label();
- this.buttonBrowseFolder = new System.Windows.Forms.Button();
- this.labelLowerArea = new System.Windows.Forms.Label();
- this.labelDialogDesc = new System.Windows.Forms.Label();
- this.labelProjectTemplate = new System.Windows.Forms.Label();
- this.buttonBrowseTemplate = new System.Windows.Forms.Button();
- this.pictureBoxLogo = new System.Windows.Forms.PictureBox();
- this.labelHeader = new System.Windows.Forms.Label();
- this.textBoxTemplate = new Duality.Editor.Controls.CueTextBox();
- this.textBoxName = new Duality.Editor.Controls.CueTextBox();
- this.textBoxFolder = new Duality.Editor.Controls.CueTextBox();
- ((System.ComponentModel.ISupportInitialize)(this.splitFolderTemplate)).BeginInit();
- this.splitFolderTemplate.Panel1.SuspendLayout();
- this.splitFolderTemplate.Panel2.SuspendLayout();
- this.splitFolderTemplate.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).BeginInit();
- this.SuspendLayout();
- //
- // folderView
- //
- this.folderView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196)))));
- this.folderView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.folderView.ColumnHeaderHeight = 0;
- this.folderView.DefaultToolTipProvider = null;
- this.folderView.Dock = System.Windows.Forms.DockStyle.Fill;
- this.folderView.DragDropMarkColor = System.Drawing.Color.Black;
- this.folderView.FullRowSelect = true;
- this.folderView.FullRowSelectActiveColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
- this.folderView.FullRowSelectInactiveColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(212)))), ((int)(((byte)(212)))));
- this.folderView.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(92)))), ((int)(((byte)(92)))));
- this.folderView.LoadOnDemand = true;
- this.folderView.Location = new System.Drawing.Point(0, 0);
- this.folderView.Model = null;
- this.folderView.Name = "folderView";
- this.folderView.NodeControls.Add(this.folderViewControlIcon);
- this.folderView.NodeControls.Add(this.folderViewControlName);
- this.folderView.NodeFilter = null;
- this.folderView.SelectedNode = null;
- this.folderView.Size = new System.Drawing.Size(158, 176);
- this.folderView.TabIndex = 0;
- this.folderView.Text = "Installed Templates";
- this.folderView.SelectionChanged += new System.EventHandler(this.folderView_SelectionChanged);
- //
- // folderViewControlIcon
- //
- this.folderViewControlIcon.DataPropertyName = "Icon";
- this.folderViewControlIcon.LeftMargin = 1;
- this.folderViewControlIcon.ParentColumn = null;
- this.folderViewControlIcon.ScaleMode = Aga.Controls.Tree.ImageScaleMode.Clip;
- //
- // folderViewControlName
- //
- this.folderViewControlName.DataPropertyName = "Name";
- this.folderViewControlName.IncrementalSearchEnabled = true;
- this.folderViewControlName.LeftMargin = 3;
- this.folderViewControlName.ParentColumn = null;
- //
- // imageListTemplateView
- //
- this.imageListTemplateView.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
- this.imageListTemplateView.ImageSize = new System.Drawing.Size(32, 32);
- this.imageListTemplateView.TransparentColor = System.Drawing.Color.Transparent;
- //
- // splitFolderTemplate
- //
- this.splitFolderTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.splitFolderTemplate.Location = new System.Drawing.Point(-1, 60);
- this.splitFolderTemplate.Name = "splitFolderTemplate";
- //
- // splitFolderTemplate.Panel1
- //
- this.splitFolderTemplate.Panel1.Controls.Add(this.folderView);
- this.splitFolderTemplate.Panel1MinSize = 150;
- //
- // splitFolderTemplate.Panel2
- //
- this.splitFolderTemplate.Panel2.Controls.Add(this.templateView);
- this.splitFolderTemplate.Panel2MinSize = 250;
- this.splitFolderTemplate.Size = new System.Drawing.Size(486, 176);
- this.splitFolderTemplate.SplitterDistance = 158;
- this.splitFolderTemplate.TabIndex = 0;
- this.splitFolderTemplate.TabStop = false;
- //
- // templateView
- //
- this.templateView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196)))));
- this.templateView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.templateView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnName,
- this.columnDesc});
- this.templateView.Dock = System.Windows.Forms.DockStyle.Fill;
- this.templateView.FullRowSelect = true;
- this.templateView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.templateView.LargeImageList = this.imageListTemplateView;
- this.templateView.Location = new System.Drawing.Point(0, 0);
- this.templateView.MultiSelect = false;
- this.templateView.Name = "templateView";
- this.templateView.ShowItemToolTips = true;
- this.templateView.Size = new System.Drawing.Size(324, 176);
- this.templateView.Sorting = System.Windows.Forms.SortOrder.Ascending;
- this.templateView.StateImageList = this.imageListTemplateView;
- this.templateView.TabIndex = 1;
- this.templateView.TileSize = new System.Drawing.Size(100, 48);
- this.templateView.UseCompatibleStateImageBehavior = false;
- this.templateView.View = System.Windows.Forms.View.Tile;
- this.templateView.SelectedIndexChanged += new System.EventHandler(this.templateView_SelectedIndexChanged);
- this.templateView.Resize += new System.EventHandler(this.templateView_Resize);
- //
- // columnName
- //
- this.columnName.Text = "Name";
- //
- // columnDesc
- //
- this.columnDesc.Text = "Description";
- //
- // buttonCancel
- //
- this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(398, 332);
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.Size = new System.Drawing.Size(75, 23);
- this.buttonCancel.TabIndex = 8;
- this.buttonCancel.Text = "Cancel";
- this.buttonCancel.UseVisualStyleBackColor = true;
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
- //
- // buttonOk
- //
- this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOk.Location = new System.Drawing.Point(317, 332);
- this.buttonOk.Name = "buttonOk";
- this.buttonOk.Size = new System.Drawing.Size(75, 23);
- this.buttonOk.TabIndex = 7;
- this.buttonOk.Text = "Ok";
- this.buttonOk.UseVisualStyleBackColor = true;
- this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click);
- //
- // labelProjectName
- //
- this.labelProjectName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.labelProjectName.AutoSize = true;
- this.labelProjectName.Location = new System.Drawing.Point(12, 273);
- this.labelProjectName.Name = "labelProjectName";
- this.labelProjectName.Size = new System.Drawing.Size(71, 13);
- this.labelProjectName.TabIndex = 5;
- this.labelProjectName.Text = "Project Name";
- //
- // labelProjectFolder
- //
- this.labelProjectFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.labelProjectFolder.AutoSize = true;
- this.labelProjectFolder.Location = new System.Drawing.Point(12, 299);
- this.labelProjectFolder.Name = "labelProjectFolder";
- this.labelProjectFolder.Size = new System.Drawing.Size(72, 13);
- this.labelProjectFolder.TabIndex = 6;
- this.labelProjectFolder.Text = "Project Folder";
- //
- // buttonBrowseFolder
- //
- this.buttonBrowseFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonBrowseFolder.Location = new System.Drawing.Point(402, 293);
- this.buttonBrowseFolder.Name = "buttonBrowseFolder";
- this.buttonBrowseFolder.Size = new System.Drawing.Size(71, 23);
- this.buttonBrowseFolder.TabIndex = 6;
- this.buttonBrowseFolder.Text = "Browse...";
- this.buttonBrowseFolder.UseVisualStyleBackColor = true;
- this.buttonBrowseFolder.Click += new System.EventHandler(this.buttonBrowseFolder_Click);
- //
- // labelLowerArea
- //
- this.labelLowerArea.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelLowerArea.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(196)))), ((int)(((byte)(196)))));
- this.labelLowerArea.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.labelLowerArea.Location = new System.Drawing.Point(-1, 324);
- this.labelLowerArea.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
- this.labelLowerArea.Name = "labelLowerArea";
- this.labelLowerArea.Size = new System.Drawing.Size(486, 39);
- this.labelLowerArea.TabIndex = 9;
- //
- // labelDialogDesc
- //
- this.labelDialogDesc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelDialogDesc.Location = new System.Drawing.Point(68, 24);
- this.labelDialogDesc.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
- this.labelDialogDesc.Name = "labelDialogDesc";
- this.labelDialogDesc.Size = new System.Drawing.Size(407, 30);
- this.labelDialogDesc.TabIndex = 11;
- this.labelDialogDesc.Text = "After selecting a suitable project template, destination and name, a new project " +
- "folder will be automatically created.";
- this.labelDialogDesc.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // labelProjectTemplate
- //
- this.labelProjectTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.labelProjectTemplate.AutoSize = true;
- this.labelProjectTemplate.Location = new System.Drawing.Point(12, 247);
- this.labelProjectTemplate.Name = "labelProjectTemplate";
- this.labelProjectTemplate.Size = new System.Drawing.Size(87, 13);
- this.labelProjectTemplate.TabIndex = 12;
- this.labelProjectTemplate.Text = "Project Template";
- //
- // buttonBrowseTemplate
- //
- this.buttonBrowseTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonBrowseTemplate.Location = new System.Drawing.Point(402, 242);
- this.buttonBrowseTemplate.Name = "buttonBrowseTemplate";
- this.buttonBrowseTemplate.Size = new System.Drawing.Size(71, 23);
- this.buttonBrowseTemplate.TabIndex = 3;
- this.buttonBrowseTemplate.Text = "Browse...";
- this.buttonBrowseTemplate.UseVisualStyleBackColor = true;
- this.buttonBrowseTemplate.Click += new System.EventHandler(this.buttonBrowseTemplate_Click);
- //
- // pictureBoxLogo
- //
- this.pictureBoxLogo.Image = global::Duality.Editor.Properties.Resources.DualityIcon48;
- this.pictureBoxLogo.Location = new System.Drawing.Point(9, 6);
- this.pictureBoxLogo.Margin = new System.Windows.Forms.Padding(0);
- this.pictureBoxLogo.Name = "pictureBoxLogo";
- this.pictureBoxLogo.Size = new System.Drawing.Size(48, 48);
- this.pictureBoxLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
- this.pictureBoxLogo.TabIndex = 15;
- this.pictureBoxLogo.TabStop = false;
- //
- // labelHeader
- //
- this.labelHeader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelHeader.Location = new System.Drawing.Point(68, 3);
- this.labelHeader.Margin = new System.Windows.Forms.Padding(0);
- this.labelHeader.Name = "labelHeader";
- this.labelHeader.Size = new System.Drawing.Size(407, 22);
- this.labelHeader.TabIndex = 0;
- this.labelHeader.Text = "Create new Duality Project";
- this.labelHeader.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // textBoxTemplate
- //
- this.textBoxTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxTemplate.CueText = "Select project template";
- this.textBoxTemplate.Location = new System.Drawing.Point(105, 244);
- this.textBoxTemplate.Name = "textBoxTemplate";
- this.textBoxTemplate.Size = new System.Drawing.Size(291, 20);
- this.textBoxTemplate.TabIndex = 2;
- this.textBoxTemplate.TextChanged += new System.EventHandler(this.textBoxTemplate_TextChanged);
- //
- // textBoxName
- //
- this.textBoxName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxName.CueText = "Enter project name here";
- this.textBoxName.Location = new System.Drawing.Point(105, 270);
- this.textBoxName.Name = "textBoxName";
- this.textBoxName.Size = new System.Drawing.Size(291, 20);
- this.textBoxName.TabIndex = 4;
- //
- // textBoxFolder
- //
- this.textBoxFolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxFolder.CueText = "Select a project folder";
- this.textBoxFolder.Location = new System.Drawing.Point(105, 296);
- this.textBoxFolder.Name = "textBoxFolder";
- this.textBoxFolder.Size = new System.Drawing.Size(291, 20);
- this.textBoxFolder.TabIndex = 5;
- //
- // NewProjectDialog
- //
- this.AcceptButton = this.buttonOk;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(212)))), ((int)(((byte)(212)))));
- this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(484, 362);
- this.Controls.Add(this.labelHeader);
- this.Controls.Add(this.pictureBoxLogo);
- this.Controls.Add(this.buttonBrowseTemplate);
- this.Controls.Add(this.textBoxTemplate);
- this.Controls.Add(this.labelProjectTemplate);
- this.Controls.Add(this.labelDialogDesc);
- this.Controls.Add(this.textBoxName);
- this.Controls.Add(this.textBoxFolder);
- this.Controls.Add(this.buttonBrowseFolder);
- this.Controls.Add(this.labelProjectFolder);
- this.Controls.Add(this.labelProjectName);
- this.Controls.Add(this.buttonOk);
- this.Controls.Add(this.buttonCancel);
- this.Controls.Add(this.splitFolderTemplate);
- this.Controls.Add(this.labelLowerArea);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(500, 400);
- this.Name = "NewProjectDialog";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "New Project...";
- this.splitFolderTemplate.Panel1.ResumeLayout(false);
- this.splitFolderTemplate.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.splitFolderTemplate)).EndInit();
- this.splitFolderTemplate.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private Aga.Controls.Tree.TreeViewAdv folderView;
- private Duality.Editor.Controls.ExplorerListView templateView;
- private System.Windows.Forms.ColumnHeader columnName;
- private System.Windows.Forms.ColumnHeader columnDesc;
- private System.Windows.Forms.SplitContainer splitFolderTemplate;
- private System.Windows.Forms.Button buttonCancel;
- private System.Windows.Forms.Button buttonOk;
- private System.Windows.Forms.Label labelProjectName;
- private System.Windows.Forms.Label labelProjectFolder;
- private System.Windows.Forms.Button buttonBrowseFolder;
- private Duality.Editor.Controls.CueTextBox textBoxFolder;
- private System.Windows.Forms.Label labelLowerArea;
- private Duality.Editor.Controls.CueTextBox textBoxName;
- private System.Windows.Forms.Label labelDialogDesc;
- private System.Windows.Forms.Label labelProjectTemplate;
- private Duality.Editor.Controls.CueTextBox textBoxTemplate;
- private System.Windows.Forms.Button buttonBrowseTemplate;
- private Aga.Controls.Tree.NodeControls.NodeStateIcon folderViewControlIcon;
- private Aga.Controls.Tree.NodeControls.NodeTextBox folderViewControlName;
- private System.Windows.Forms.PictureBox pictureBoxLogo;
- private System.Windows.Forms.Label labelHeader;
- private System.Windows.Forms.ImageList imageListTemplateView;
- }
-}
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/Forms/NewProjectDialog.cs b/Source/Editor/DualityEditor/Forms/NewProjectDialog.cs
deleted file mode 100644
index 04d58aebc..000000000
--- a/Source/Editor/DualityEditor/Forms/NewProjectDialog.cs
+++ /dev/null
@@ -1,306 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using System.IO;
-using System.Xml.Linq;
-
-using Aga.Controls;
-using Aga.Controls.Tree;
-using Aga.Controls.Tree.NodeControls;
-
-using Duality;
-using Duality.IO;
-
-using Duality.Editor.Controls.TreeModels.FileSystem;
-using Duality.Editor.Properties;
-
-namespace Duality.Editor.Forms
-{
- public partial class NewProjectDialog : Form
- {
- private FolderBrowserTreeModel folderModel = null;
- private string selectedTemplatePath = null;
- private ProjectTemplateInfo selectedTemplate = null;
- private ProjectTemplateInfo templateEmpty = null;
- private ProjectTemplateInfo templateCurrent = null;
- private string resultEditorBinary = null;
- private Color defaultTextBoxBackColor;
-
- public string ResultEditorBinary
- {
- get { return this.resultEditorBinary; }
- }
-
- public NewProjectDialog()
- {
- this.InitializeComponent();
- this.templateView_Resize(this, EventArgs.Empty); // Trigger update tile size
-
- this.defaultTextBoxBackColor = this.textBoxFolder.BackColor;
-
- this.folderModel = new FolderBrowserTreeModel(EditorHelper.GlobalProjectTemplateDirectory);
- this.folderModel.Filter = s => Directory.Exists(s); // Only show directories
- this.folderView.Model = this.folderModel;
- this.folderViewControlName.DrawText += this.folderViewControlName_DrawText;
-
- this.selectedTemplatePath = this.folderModel.BasePath;
-
- // Create hardcoded templates
- this.templateEmpty = new ProjectTemplateInfo();
- this.templateEmpty.Icon = GeneralResCache.ImageTemplateEmpty;
- this.templateEmpty.Name = GeneralRes.Template_Empty_Name;
- this.templateEmpty.Description = GeneralRes.Template_Empty_Desc;
- this.templateEmpty.SpecialTag = ProjectTemplateInfo.SpecialInfo.Empty;
-
- this.templateCurrent = new ProjectTemplateInfo();
- this.templateCurrent.Icon = GeneralResCache.ImageTemplateCurrent;
- this.templateCurrent.Name = GeneralRes.Template_Current_Name;
- this.templateCurrent.Description = GeneralRes.Template_Current_Desc;
- this.templateCurrent.SpecialTag = ProjectTemplateInfo.SpecialInfo.Current;
-
- // Hilde folder selector, if empty
- if (!Directory.Exists(this.folderModel.BasePath) || Directory.GetDirectories(this.folderModel.BasePath).Length == 0)
- {
- this.folderView.Enabled = false;
- this.splitFolderTemplate.Panel1Collapsed = true;
- }
-
- this.UpdateTemplateList();
- }
-
- protected void UpdateTemplateList()
- {
- this.templateView.BeginUpdate();
- this.templateView.Items.Clear();
- this.imageListTemplateView.Images.Clear();
-
- // Scan for template files
- string[] templateFiles = Directory.Exists(this.selectedTemplatePath) ? Directory.GetFiles(this.selectedTemplatePath, "*.zip", SearchOption.TopDirectoryOnly) : new string[0];
- List templateEntries = new List();
- foreach (string templateFile in templateFiles)
- {
- try
- {
- ProjectTemplateInfo entry = new ProjectTemplateInfo(templateFile);
- templateEntries.Add(entry);
- }
- catch (Exception e)
- {
- Logs.Editor.WriteError("Can't load project template {0} because an error occurred in the process: {1}", templateFile, LogFormat.Exception(e));
- }
- }
-
- // Add hardcoded templates
- if (this.selectedTemplatePath == this.folderModel.BasePath)
- {
- templateEntries.Insert(0, this.templateCurrent);
- templateEntries.Insert(0, this.templateEmpty);
- }
-
- // Add template entries to view
- foreach (ProjectTemplateInfo entry in templateEntries)
- {
- Bitmap icon = entry.Icon;
- if (icon != null)
- {
- if (icon.Size != this.imageListTemplateView.ImageSize)
- icon = icon.Rescale(this.imageListTemplateView.ImageSize.Width, this.imageListTemplateView.ImageSize.Height);
- this.imageListTemplateView.Images.Add(entry.FilePath ?? entry.Name, icon);
- }
-
- ListViewItem item = new ListViewItem(new string[] { entry.Name, entry.Description }, entry.FilePath ?? entry.Name);
- item.Tag = entry;
- item.ToolTipText = entry.Description;
- this.templateView.Items.Add(item);
- }
-
- this.templateView.Sort();
- this.templateView.EndUpdate();
- }
- protected bool CheckInputValid()
- {
- Color errorColor = this.defaultTextBoxBackColor.MixWith(Color.Red, 0.25f, true);
-
- this.textBoxFolder.BackColor = this.defaultTextBoxBackColor;
- this.textBoxTemplate.BackColor = this.defaultTextBoxBackColor;
- this.textBoxName.BackColor = this.defaultTextBoxBackColor;
-
- if (this.selectedTemplate == null)
- {
- this.textBoxTemplate.BackColor = errorColor;
- return false;
- }
- if (string.IsNullOrWhiteSpace(this.textBoxName.Text) || !PathHelper.IsPathValid(this.textBoxName.Text))
- {
- this.textBoxName.BackColor = errorColor;
- return false;
- }
- if (string.IsNullOrWhiteSpace(this.textBoxFolder.Text) || !PathHelper.IsPathValid(this.textBoxFolder.Text))
- {
- this.textBoxFolder.BackColor = errorColor;
- return false;
- }
-
- string targetDir = Path.Combine(this.textBoxFolder.Text, this.textBoxName.Text);
- if (Directory.Exists(targetDir))
- {
- if (Directory.EnumerateFiles(targetDir, "*", SearchOption.AllDirectories).Any())
- {
- this.textBoxFolder.BackColor = errorColor;
- MessageBox.Show(
- GeneralRes.Msg_CreateProjectErrorTargetExists_Desc,
- GeneralRes.Msg_CreateProjectErrorTargetExists_Caption,
- MessageBoxButtons.OK,
- MessageBoxIcon.Warning);
- return false;
- }
- }
- if (File.Exists(targetDir))
- {
- this.textBoxFolder.BackColor = errorColor;
- MessageBox.Show(
- GeneralRes.Msg_CreateProjectErrorTargetIsFilePath_Desc,
- GeneralRes.Msg_CreateProjectErrorTargetExists_Caption,
- MessageBoxButtons.OK,
- MessageBoxIcon.Warning);
- return false;
- }
- if (PathOp.IsPathLocatedIn(targetDir, Environment.CurrentDirectory))
- {
- this.textBoxFolder.BackColor = errorColor;
- MessageBox.Show(
- GeneralRes.Msg_CreateProjectErrorNestedFolder_Desc,
- GeneralRes.Msg_CreateProjectErrorNestedFolder_Caption,
- MessageBoxButtons.OK,
- MessageBoxIcon.Warning);
- return false;
- }
-
- return true;
- }
-
- private void folderViewControlName_DrawText(object sender, DrawTextEventArgs e)
- {
- e.TextColor = Color.Black;
- }
-
- private void templateView_Resize(object sender, EventArgs e)
- {
- this.templateView.TileSize = new Size(this.templateView.ClientSize.Width, this.templateView.TileSize.Height);
- }
- private void templateView_SelectedIndexChanged(object sender, EventArgs e)
- {
- ProjectTemplateInfo entry = this.templateView.SelectedItems.Count > 0 ? this.templateView.SelectedItems[0].Tag as ProjectTemplateInfo : null;
- if (entry == null) return;
-
- if (entry.FilePath == null)
- this.textBoxTemplate.Text = entry.Name;
- else
- this.textBoxTemplate.Text = entry.FilePath;
- }
- private void buttonCancel_Click(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.Cancel;
- this.Close();
- }
- private void buttonOk_Click(object sender, EventArgs e)
- {
- // Make sure the input is valid and display an error if not
- if (!this.CheckInputValid()) return;
-
- // Ask if the selected template should be copied to the template directory, if not located there (auto-install)
- if (this.selectedTemplate.SpecialTag == ProjectTemplateInfo.SpecialInfo.None &&
- !PathOp.IsPathLocatedIn(this.selectedTemplate.FilePath, EditorHelper.GlobalProjectTemplateDirectory))
- {
- DialogResult result = MessageBox.Show(
- Properties.GeneralRes.Msg_InstallNewTemplate_Desc,
- Properties.GeneralRes.Msg_InstallNewTemplate_Caption,
- MessageBoxButtons.YesNoCancel,
- MessageBoxIcon.Question);
- if (result == System.Windows.Forms.DialogResult.Cancel) return;
- if (result == System.Windows.Forms.DialogResult.Yes)
- {
- if (!Directory.Exists(EditorHelper.GlobalProjectTemplateDirectory))
- Directory.CreateDirectory(EditorHelper.GlobalProjectTemplateDirectory);
- File.Copy(
- this.selectedTemplate.FilePath,
- Path.Combine(EditorHelper.GlobalProjectTemplateDirectory, Path.GetFileName(this.selectedTemplate.FilePath)));
- }
- }
-
- // Create a new project
- try
- {
- this.resultEditorBinary = EditorHelper.CreateNewProject(this.textBoxName.Text, this.textBoxFolder.Text, this.selectedTemplate);
- }
- catch (Exception exception)
- {
- this.resultEditorBinary = null;
- MessageBox.Show(
- string.Format(Properties.GeneralRes.Msg_ErrorCantCreateProject_Desc, LogFormat.Exception(exception), Environment.NewLine),
- Properties.GeneralRes.Msg_ErrorCantCreateProject_Caption,
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
-
- // Close successfully
- this.DialogResult = this.resultEditorBinary != null ? DialogResult.OK : DialogResult.Cancel;
- this.Close();
- }
-
- private void buttonBrowseTemplate_Click(object sender, EventArgs e)
- {
- OpenFileDialog fileDialog = new OpenFileDialog();
- fileDialog.CheckFileExists = true;
- fileDialog.CheckPathExists = true;
- fileDialog.Multiselect = false;
- fileDialog.Title = Properties.GeneralRes.OpenTemplateDialog_Title;
- fileDialog.RestoreDirectory = true;
- fileDialog.InitialDirectory = Environment.CurrentDirectory;
- fileDialog.AddExtension = true;
- fileDialog.Filter = Properties.GeneralRes.OpenTemplateDialog_Filters;
-
- DialogResult result = fileDialog.ShowDialog();
- if (result == DialogResult.OK)
- {
- this.textBoxTemplate.Text = Path.GetFullPath(fileDialog.FileName);
- }
- }
- private void buttonBrowseFolder_Click(object sender, EventArgs e)
- {
- FolderBrowserDialog folderDialog = new FolderBrowserDialog();
- folderDialog.ShowNewFolderButton = true;
- folderDialog.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
- folderDialog.Description =Properties.GeneralRes.SelectNewProjectFolderDialog_Desc;
-
- DialogResult result = folderDialog.ShowDialog();
- if (result == DialogResult.OK)
- {
- this.textBoxFolder.Text = Path.GetFullPath(folderDialog.SelectedPath);
- }
- }
-
- private void textBoxTemplate_TextChanged(object sender, EventArgs e)
- {
- if (this.textBoxTemplate.Text == this.templateEmpty.Name)
- this.selectedTemplate = this.templateEmpty;
- else if (this.textBoxTemplate.Text == this.templateCurrent.Name)
- this.selectedTemplate = this.templateCurrent;
- else
- {
- try { this.selectedTemplate = new ProjectTemplateInfo(this.textBoxTemplate.Text); }
- catch (Exception) { this.selectedTemplate = null; }
- }
- }
-
- private void folderView_SelectionChanged(object sender, EventArgs e)
- {
- FolderItem folderItem = this.folderView.SelectedNode != null ? this.folderView.SelectedNode.Tag as FolderItem : null;
- this.selectedTemplatePath = folderItem != null ? folderItem.ItemPath : this.folderModel.BasePath;
- this.UpdateTemplateList();
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/Forms/NewProjectDialog.resx b/Source/Editor/DualityEditor/Forms/NewProjectDialog.resx
deleted file mode 100644
index b82877e56..000000000
--- a/Source/Editor/DualityEditor/Forms/NewProjectDialog.resx
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 17, 17
-
-
-
-
- AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/zPZdL8f1hyDA9RIevfMSHLfzhxq0
- 8V0AAAAAAAAAAKlxUanDjmj/wItm/76IZP+7hWH/uYNf/7R+XP+yfFr/k5KF/03P9/8swO7/Jrzs/zPD
- 9P+BhH7/qXFRqQAAAADIkmz//////////////////////////////////////+D3/f9M0Pf/g975/3rZ
- +f8swfT/1/L9/6lyUf8AAAAAypRu///////////////+/////f/+/v3//v78//z+/P+H3/n/dNr4/4zg
- +v+D3fn/VND2/2HQ9/+odFX/AAAAAMyXb//////////8/////f/+/vz//v78//7++/+g5/n/atj5/3Pa
- +P+L4Pr/gt35/1HO9/8yw/T/Vp2z/wAAAADRnHP///////7+/P/+/vz//v78//39+//9/fv/+Pz6/9X0
- +P+k5vj/Ztf4/1nS+P+K3PX/yO/8/6t8Xf8AAAAA1J51///////+/vz//f37//39/P/9/fv//f35//z8
- +P/7+ff/+/n1/3LY9v9n1fX/+/Xy//////+yfFr/AAAAANWgdv///////f38//39+//9/fr//Pz5//z7
- 9//7+fX/+/j0//v38//P7PT/y+nx//jy7P//////tX5c/wAAAADYonn///////39+v/8/Pr//Pv5//v6
- 9v/7+PX/+/f0//v28f/49O7/9/Lr//fw6v/27Oj//////7eBXv8AAAAA2aN5///////8+/n//Pv4//v5
- 9//79/T/+vfy//n18P/38+3/9u/q//Xr5//z6uT/8ufe//////+6hWD/AAAAANukev//////////////
- ////////////////////////////////////////////////////////vYdj/wAAAADcp3v/3Kd7/9yn
- e//cp3v/3Kd7/9yne//cp3v/3Kd7/9yne//cp3v/3Kd7/9yne//cp3v/3Kd7/8CLZv8AAAAA3ayF/ei5
- kv/ouZL/6LmS/+i5kv/ouZL/6LmS/+i5kv/ouZL/6LmS/+i5kv/ouZL/6LmS/+i5kv/BkG/9AAAAAKlx
- UWvdsY303Kd7/9ymev/apHr/2KJ5/9Wgdv/UnnX/0p1z/8+acv/OmXD/y5Zv/8mUbP/Emnr0qXFRawAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAA//+sQf8DrEEAAaxBAAGsQQABrEEAAaxBAAGsQQABrEEAAaxBAAGsQQABrEEAAaxBAAGsQQAB
- rEEAAaxB//+sQQ==
-
-
-
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/PackageManagement/Internal/NuGetTargetedPackageManager.cs b/Source/Editor/DualityEditor/PackageManagement/Internal/NuGetTargetedPackageManager.cs
deleted file mode 100644
index f1a90000f..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/Internal/NuGetTargetedPackageManager.cs
+++ /dev/null
@@ -1,228 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Versioning;
-
-using NuGet;
-using NuGet.Resources;
-
-namespace Duality.Editor.PackageManagement.Internal
-{
- ///
- /// A custom version of the NuGet based on a cleaned up decompile.
- /// This was necessary in order to add support for framework-dependent dependencies via target framework
- /// parameter in its internal package dependency walkers.
- ///
- public class NuGetTargetedPackageManager
- {
- private ILogger logger;
- private readonly FrameworkName targetFrameWork;
-
-
- public event EventHandler PackageInstalling;
- public event EventHandler PackageInstalled;
- public event EventHandler PackageUninstalling;
- public event EventHandler PackageUninstalled;
-
-
- public DependencyVersion DependencyVersion { get; set; }
- public bool WhatIf { get; set; }
- public IFileSystem FileSystem { get; set; }
- public IPackageRepository SourceRepository { get; private set; }
- public IPackageRepository LocalRepository { get; private set; }
- public IPackagePathResolver PathResolver { get; private set; }
- public ILogger Logger
- {
- get { return this.logger ?? NullLogger.Instance; }
- set { this.logger = value; }
- }
-
-
- public NuGetTargetedPackageManager(FrameworkName targetFrameWork, IPackageRepository sourceRepository, string path) : this(
- sourceRepository,
- path)
- {
- this.targetFrameWork = targetFrameWork;
- }
- public NuGetTargetedPackageManager(IPackageRepository sourceRepository, string path) : this(
- sourceRepository,
- new DefaultPackagePathResolver(path),
- new PhysicalFileSystem(path)) { }
- public NuGetTargetedPackageManager(IPackageRepository sourceRepository, IPackagePathResolver pathResolver, IFileSystem fileSystem) : this(
- sourceRepository,
- pathResolver,
- fileSystem,
- new LocalPackageRepository(pathResolver, fileSystem)) { }
- public NuGetTargetedPackageManager(IPackageRepository sourceRepository, IPackagePathResolver pathResolver, IFileSystem fileSystem, IPackageRepository localRepository)
- {
- if (sourceRepository == null) throw new ArgumentNullException("sourceRepository");
- if (pathResolver == null) throw new ArgumentNullException("pathResolver");
- if (fileSystem == null) throw new ArgumentNullException("fileSystem");
- if (localRepository == null) throw new ArgumentNullException("localRepository");
-
- this.SourceRepository = sourceRepository;
- this.PathResolver = pathResolver;
- this.FileSystem = fileSystem;
- this.LocalRepository = localRepository;
- this.DependencyVersion = DependencyVersion.Lowest;
- }
-
- public void InstallPackage(IPackage package, bool ignoreDependencies, bool allowPrereleaseVersions)
- {
- this.Execute(package, new InstallWalker(
- this.LocalRepository,
- this.SourceRepository,
- this.targetFrameWork,
- this.Logger,
- ignoreDependencies,
- allowPrereleaseVersions,
- this.DependencyVersion));
- }
- public void UninstallPackage(IPackage package, bool forceRemove, bool removeDependencies = false)
- {
- this.Execute(package, new UninstallWalker(
- this.LocalRepository,
- new DependentsWalker(this.LocalRepository, this.targetFrameWork),
- this.targetFrameWork,
- this.Logger,
- removeDependencies,
- forceRemove));
- }
- public void UpdatePackage(IPackage newPackage, bool updateDependencies, bool allowPrereleaseVersions)
- {
- this.Execute(newPackage, new UpdateWalker(
- this.LocalRepository,
- this.SourceRepository,
- new DependentsWalker(this.LocalRepository, this.targetFrameWork),
- NullConstraintProvider.Instance,
- this.targetFrameWork,
- this.Logger, updateDependencies,
- allowPrereleaseVersions));
- }
-
-
- private void Execute(IPackage package, IPackageOperationResolver resolver)
- {
- IEnumerable source = resolver.ResolveOperations(package);
- if (source.Any())
- {
- foreach (PackageOperation operation in source)
- {
- this.Execute(operation);
- }
- }
- else
- {
- if (!this.LocalRepository.Exists(package))
- return;
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_PackageAlreadyInstalled, (object)package.GetFullName());
- }
- }
- private void Execute(PackageOperation operation)
- {
- bool isPackageInstalled = this.LocalRepository.Exists(operation.Package);
- if (operation.Action == PackageAction.Install)
- {
- if (isPackageInstalled)
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_PackageAlreadyInstalled, (object)operation.Package.GetFullName());
- else if (this.WhatIf)
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_InstallPackage, (object)operation.Package);
- else
- this.ExecuteInstall(operation.Package);
- }
- else
- {
- if (!isPackageInstalled)
- return;
- if (this.WhatIf)
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_UninstallPackage, (object)operation.Package);
- else
- this.ExecuteUninstall(operation.Package);
- }
- }
-
- private void ExecuteInstall(IPackage package)
- {
- string fullName = package.GetFullName();
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_BeginInstallPackage, (object)fullName);
- PackageOperationEventArgs operation = this.CreateOperation(package);
- this.OnInstalling(operation);
- if (operation.Cancel)
- return;
- this.ExpandFiles(operation.Package);
- this.LocalRepository.AddPackage(package);
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_PackageInstalledSuccessfully, (object)fullName);
- this.OnInstalled(operation);
- }
- private void ExecuteUninstall(IPackage package)
- {
- string fullName = package.GetFullName();
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_BeginUninstallPackage, (object)fullName);
- PackageOperationEventArgs operation = this.CreateOperation(package);
- this.OnUninstalling(operation);
- if (operation.Cancel)
- return;
- this.RemoveFiles(operation.Package);
- this.LocalRepository.RemovePackage(package);
- this.Logger.Log(MessageLevel.Info, NuGetResources.Log_SuccessfullyUninstalledPackage, (object)fullName);
- this.OnUninstalled(operation);
- }
-
- private void ExpandFiles(IPackage package)
- {
- IBatchProcessor fileSystem = this.FileSystem as IBatchProcessor;
- try
- {
- List list = package.GetFiles().ToList();
- if (fileSystem != null)
- fileSystem.BeginProcessing(
- list.Select(p => p.Path),
- PackageAction.Install);
- string packageDirectory = this.PathResolver.GetPackageDirectory(package);
- this.FileSystem.AddFiles(list, packageDirectory);
- IPackage runtimePackage;
- if (!PackageHelper.IsSatellitePackage(package, this.LocalRepository, this.targetFrameWork, out runtimePackage))
- return;
- this.FileSystem.AddFiles(package.GetSatelliteFiles(), this.PathResolver.GetPackageDirectory(runtimePackage));
- }
- finally
- {
- if (fileSystem != null) fileSystem.EndProcessing();
- }
- }
- private void RemoveFiles(IPackage package)
- {
- string packageDirectory = this.PathResolver.GetPackageDirectory(package);
- IPackage runtimePackage;
- if (PackageHelper.IsSatellitePackage(package, this.LocalRepository, this.targetFrameWork, out runtimePackage))
- this.FileSystem.DeleteFiles(package.GetSatelliteFiles(), this.PathResolver.GetPackageDirectory(runtimePackage));
- this.FileSystem.DeleteFiles(package.GetFiles(), packageDirectory);
- }
-
- private void OnInstalling(PackageOperationEventArgs e)
- {
- if (this.PackageInstalling != null)
- this.PackageInstalling(this, e);
- }
- private void OnInstalled(PackageOperationEventArgs e)
- {
- if (this.PackageInstalled != null)
- this.PackageInstalled(this, e);
- }
- private void OnUninstalling(PackageOperationEventArgs e)
- {
- if (this.PackageUninstalling != null)
- this.PackageUninstalling(this, e);
- }
- private void OnUninstalled(PackageOperationEventArgs e)
- {
- if (this.PackageUninstalled != null)
- this.PackageUninstalled(this, e);
- }
-
- private PackageOperationEventArgs CreateOperation(IPackage package)
- {
- return new PackageOperationEventArgs(package, this.FileSystem, this.PathResolver.GetInstallPath(package));
- }
- }
-}
\ No newline at end of file
diff --git a/Source/Editor/DualityEditor/PackageManagement/LocalPackage.cs b/Source/Editor/DualityEditor/PackageManagement/LocalPackage.cs
deleted file mode 100644
index 4ce6f3b99..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/LocalPackage.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Duality.Editor.PackageManagement
-{
- ///
- /// Describes a Duality package that is part of the local .
- ///
- public sealed class LocalPackage
- {
- private PackageName name = PackageName.None;
- private PackageInfo info = null;
-
-
- ///
- /// [GET] The name of the package, including ID and version number.
- /// Note that a local package may be version-invariant to flag itself
- /// for an update to the newest available version during package verify.
- ///
- public PackageName Name
- {
- get { return this.name; }
- }
- ///
- /// [GET] The ID of the package.
- ///
- public string Id
- {
- get { return this.name.Id; }
- }
- ///
- /// [GET] The version of the package. Can be null, in which case the
- /// package will be treated as version-invariant.
- ///
- public Version Version
- {
- get { return this.name.Version; }
- }
- ///
- /// [GET] A representing the locally installed
- /// version of the package.
- ///
- public PackageInfo Info
- {
- get { return this.info; }
- internal set { this.info = value; }
- }
-
-
- internal LocalPackage(PackageInfo info)
- {
- this.name = info.Name;
- this.info = info;
- }
- internal LocalPackage(PackageName package)
- {
- this.name = package;
- this.info = null;
- }
-
- public override string ToString()
- {
- return string.Format("Local Package '{0}'", this.name);
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageCache.cs b/Source/Editor/DualityEditor/PackageManagement/PackageCache.cs
deleted file mode 100644
index 80b3bd30f..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageCache.cs
+++ /dev/null
@@ -1,278 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.IO;
-using System.Xml;
-using System.Xml.Linq;
-using System.Windows.Forms;
-using System.Diagnostics;
-
-using NuGet;
-
-using Duality.IO;
-using Duality.Editor.Properties;
-using Duality.Editor.Forms;
-
-namespace Duality.Editor.PackageManagement
-{
- ///
- /// Caches information about remote package repositories.
- ///
- internal class PackageCache
- {
- private NuGet.IPackageRepository repository = null;
- private bool hasLocalRepo = false;
-
- private object cacheLock = new object();
- private Dictionary nameToPackage = new Dictionary();
- private Dictionary nameToNuGetPackage = new Dictionary();
- private Dictionary uniquePackageWrap = new Dictionary();
- private List latestDuality = null;
- private Dictionary> repositoryPackages = new Dictionary>();
-
-
- public PackageCache(NuGet.IPackageRepository repository, bool isPartiallyLocalRepo)
- {
- this.repository = repository;
- this.hasLocalRepo = isPartiallyLocalRepo;
- }
-
- ///
- /// Clears the cache to allow querying updated information from the repository.
- ///
- /// Does not clear the internal mapping from fully qualified package names to
- /// actual packages, as the repository is still the same and NuGet packages
- /// are read-only after publish.
- ///
- public void Clear()
- {
- lock (this.cacheLock)
- {
- this.latestDuality = null;
- this.nameToPackage.Clear();
- this.nameToNuGetPackage.Clear();
- this.repositoryPackages.Clear();
-
- // Don't clear the unique wrap cache, see XML docs comment about
- // read-only NuGet packages after publish.
- }
- }
-
- ///
- /// Enumerates the latest available Duality packages in the remote repository.
- ///
- ///
- public IEnumerable GetLatestDualityPackages()
- {
- lock (this.cacheLock)
- {
- if (this.latestDuality != null)
- return this.latestDuality;
- }
-
- return this.QueryLatestDualityPackages();
- }
- ///
- /// Retrieves information about the specified package.
- ///
- ///
- ///
- public PackageInfo GetPackage(PackageName name)
- {
- PackageInfo result;
- lock (this.cacheLock)
- {
- if (this.nameToPackage.TryGetValue(name, out result))
- return result;
-
- NuGet.IPackage nugetPackage = this.GetNuGetPackage(name);
- if (nugetPackage == null)
- result = null;
- else
- result = this.WrapPackage(nugetPackage);
-
- this.nameToPackage[name] = result;
- }
- return result;
- }
- ///
- /// Retrieves a NuGet package based on the specified name.
- ///
- ///
- ///
- public NuGet.IPackage GetNuGetPackage(PackageName name)
- {
- NuGet.IPackage result;
- lock (this.cacheLock)
- {
- if (this.nameToNuGetPackage.TryGetValue(name, out result))
- return result;
-
- result = this.FindPackage(name);
-
- this.nameToNuGetPackage[name] = result;
- }
- return result;
- }
-
-
- private IEnumerable QueryLatestDualityPackages()
- {
- // Query all NuGet packages
- IQueryable query = this.repository.GetPackages();
-
- // Filter out old packages
- query = query.Where(p => p.IsLatestVersion);
-
- // Only look at NuGet packages tagged with "Duality" and "Plugin"
- query = query.Where(p =>
- p.Tags != null &&
- p.Tags.Contains(PackageManager.DualityTag));
-
- // If there is a local package repository, IsLatest isn't set. Need to emulate this
- if (this.hasLocalRepo)
- {
- List packages = query.ToList();
- for (int i = packages.Count - 1; i >= 0; i--)
- {
- IPackage current = packages[i];
- bool isLatest = !packages.Any(p => p.Id == current.Id && p.Version > current.Version);
- if (!isLatest)
- {
- packages.RemoveAt(i);
- }
- }
- query = packages.AsQueryable();
- }
-
- // Cache every result item as it arrives, validate the cache only
- // after the qurey has finished
- List results = new List();
-
- // Transform results into Duality package representation
- foreach (NuGet.IPackage package in query)
- {
- // Filter out all packages that shouldn't be presented to the user. This
- // includes pre-release and unlisted packages.
- if (!this.IsUserAvailable(package)) continue;
-
- // Create a Duality package representation for all query hits
- PackageInfo info = this.WrapPackage(package);
- results.Add(info);
- yield return info;
- }
-
- lock (this.cacheLock)
- {
- this.latestDuality = results;
- }
- }
- private NuGet.IPackage FindPackage(PackageName packageRef)
- {
- try
- {
- // Find a specific version. We're not looking for listed packages only.
- if (packageRef.Version != null)
- {
- // First try an indexed lookup. This may fail for freshly released packages.
- foreach (NuGet.IPackage package in this.GetRemotePackages(packageRef.Id))
- {
- if (!package.IsReleaseVersion()) continue;
- if (package.Version.Version != packageRef.Version) continue;
- return package;
- }
-
- // If that fails, enumerate all packages and select the one we need.
- //
- // Note: Make sure to include OrderByDescending. Without it, non-indexed
- // packages will not be returned from the query.
- IQueryable query =
- this.repository.GetPackages()
- .Where(p => p.Id == packageRef.Id)
- .OrderByDescending(p => p.Version);
- foreach (NuGet.IPackage package in query)
- {
- if (!package.IsReleaseVersion()) continue;
- if (package.Version.Version != packageRef.Version) continue;
- return package;
- }
-
- // No matching package was found
- return null;
- }
- // Find the newest available, listed version online.
- else
- {
- // Do an indexed lookup. This may fail for freshly released packages,
- // but turns out to be more robust otherwise. Our previous approach
- // of querying non-indexed NuGet API via search sometimes failed with
- // the server returning no results on the n-th query.
- Version latestVersion = new Version(0, 0);
- NuGet.IPackage latestPackage = null;
- foreach (NuGet.IPackage package in this.GetRemotePackages(packageRef.Id))
- {
- if (!this.IsUserAvailable(package)) continue;
- if (package.Version.Version > latestVersion)
- {
- latestVersion = package.Version.Version;
- latestPackage = package;
- }
- }
- return latestPackage;
- }
- }
- catch (Exception e)
- {
- Logs.Editor.WriteWarning("Error querying NuGet package repository: {0}", LogFormat.Exception(e));
- return null;
- }
- }
- private List GetRemotePackages(string id)
- {
- // Quickly check if we have this result in our cache already
- List result;
- lock (this.cacheLock)
- {
- if (this.repositoryPackages.TryGetValue(id, out result))
- return result;
- }
-
- // Otherwise, query the repository for all packages with this id
- result = this.repository
- .FindPackagesById(id)
- .ToList();
-
- // Update the cache with our new results
- lock (this.cacheLock)
- {
- this.repositoryPackages[id] = result;
- }
- return result;
- }
-
- private PackageInfo WrapPackage(NuGet.IPackage package)
- {
- PackageName name = new PackageName(package.Id, package.Version.Version);
- lock (this.cacheLock)
- {
- PackageInfo info;
- if (this.uniquePackageWrap.TryGetValue(name, out info))
- return info;
-
- info = new PackageInfo(package);
-
- this.uniquePackageWrap.Add(name, info);
- return info;
- }
- }
- private bool IsUserAvailable(NuGet.IPackage package)
- {
- // Filter unlisted, non-release and special versions
- if (!package.IsReleaseVersion()) return false;
- if (!package.IsListed()) return false;
- if (package.Version != new SemanticVersion(package.Version.Version)) return false;
- return true;
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageCompatibility.cs b/Source/Editor/DualityEditor/PackageManagement/PackageCompatibility.cs
deleted file mode 100644
index 3ec812836..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageCompatibility.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-namespace Duality.Editor.PackageManagement
-{
- public enum PackageCompatibility
- {
- Unknown,
-
- None,
- Unlikely,
- Likely,
- Definite
- }
-
- public static class ExtMethodsPackageCompatibility
- {
- public static PackageCompatibility Combine(this PackageCompatibility self, PackageCompatibility other)
- {
- if (self == PackageCompatibility.Unknown || other == PackageCompatibility.Unknown)
- return PackageCompatibility.Unknown;
- else
- return (PackageCompatibility)MathF.Min((int)self, (int)other);
- }
- public static bool IsAtLeast(this PackageCompatibility self, PackageCompatibility other)
- {
- if (self == PackageCompatibility.Unknown) return false;
- return (int)self >= (int)other;
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageDependencyWalker.cs b/Source/Editor/DualityEditor/PackageManagement/PackageDependencyWalker.cs
deleted file mode 100644
index ba228a042..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageDependencyWalker.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.IO;
-using System.Xml;
-using System.Xml.Linq;
-using System.Windows.Forms;
-using System.Diagnostics;
-
-using NuGet;
-
-using Duality.IO;
-using Duality.Editor.Properties;
-using Duality.Editor.Forms;
-
-namespace Duality.Editor.PackageManagement
-{
- ///
- /// Implements an algorithm to walk a package dependency graph and determine
- /// a packages transitive dependencies.
- ///
- public class PackageDependencyWalker
- {
- private Func packageResolver = null;
- private HashSet skipPackageIds = new HashSet();
- private Dictionary resolveCache = new Dictionary();
- private HashSet resolveCacheTemp = new HashSet();
- private Dictionary dependencyCount = new Dictionary();
- private HashSet visitedPackages = new HashSet();
-
-
- ///
- /// [GET] Enumerates all packages that were visited in all walk operations
- /// since the last .
- ///
- public IEnumerable VisitedPackages
- {
- get { return this.visitedPackages; }
- }
-
-
- public PackageDependencyWalker(Func packageResolver)
- {
- this.packageResolver = packageResolver;
- }
-
- ///
- /// Resets the algorithm and clears all previous results, as well as the
- /// internal blacklist.
- ///
- public void Clear()
- {
- this.skipPackageIds.Clear();
- this.dependencyCount.Clear();
- this.visitedPackages.Clear();
-
- // Clear temporary items from the resolve cache
- foreach (PackageName name in this.resolveCacheTemp)
- {
- this.resolveCache.Remove(name);
- }
- this.resolveCacheTemp.Clear();
- }
-
- ///
- /// Configures the algorithm to not visit packages with the specified ID while
- /// exploring the graph.
- ///
- ///
- public void IgnorePackage(string id)
- {
- if (this.skipPackageIds.Add(id))
- {
- this.dependencyCount.Clear();
- this.visitedPackages.Clear();
- }
- }
-
- ///
- /// Walks the specified packages dependency graph and adds
- /// new findings to the result list.
- ///
- ///
- public void WalkGraph(PackageInfo package)
- {
- this.WalkGraph(new [] { package });
- }
- ///
- /// Walks the specified packages dependency graph and adds
- /// new findings to the result list.
- ///
- ///
- public void WalkGraph(PackageName packageName)
- {
- this.WalkGraph(new [] { packageName });
- }
- ///
- /// Walks the specified packages dependency graphs and adds
- /// new findings to the result list.
- ///
- ///
- public void WalkGraph(IEnumerable packages)
- {
- foreach (PackageInfo package in packages)
- {
- if (package == null) continue;
- this.resolveCache[package.Name] = package;
- }
-
- this.WalkGraph(packages.Select(p => p.Name));
- }
- ///
- /// Walks the specified packages dependency graphs and adds
- /// new findings to the result list.
- ///
- ///
- public void WalkGraph(IEnumerable packageNames)
- {
- // If there are no packages in the arguments that we didn't already
- // walk before, do nothing. We already have the result.
- bool anyNewInput = false;
- foreach (PackageName packageName in packageNames)
- {
- if (this.dependencyCount.ContainsKey(packageName)) continue;
- anyNewInput = true;
- break;
- }
- if (!anyNewInput) return;
-
- // Determine the dependency graph of each package
- foreach (PackageName packageName in packageNames)
- {
- PackageInfo package = this.ResolvePackage(packageName);
- if (package == null) continue;
-
- VisitPackage(package);
- }
- }
-
- ///
- /// Retrieves the transitive dependency count of the specified package.
- ///
- ///
- ///
- public int GetDependencyCount(PackageName name)
- {
- int count;
- if (this.dependencyCount.TryGetValue(name, out count))
- return count;
- else
- return 0;
- }
-
- private PackageInfo ResolvePackage(PackageName name)
- {
- PackageInfo package;
- if (!this.resolveCache.TryGetValue(name, out package))
- {
- // Resolve the dependency using the exact name first, then
- // the newest version if that fails.
- package = this.packageResolver(name);
- if (package == null)
- package = this.packageResolver(name.VersionInvariant);
-
- // Cache the results for later
- this.resolveCache[name] = package;
-
- // If we resolved to a different version, remove that item
- // from the cache on the next Clear to allow it to re-resolve
- // differently in the future
- if (package.Version != name.Version)
- this.resolveCacheTemp.Add(name);
- }
- return package;
- }
- private void VisitPackage(PackageInfo package)
- {
- if (!this.visitedPackages.Add(package)) return;
-
- // Improve cyclic dependency handling by counting direct dependencies early
- int count = package.Dependencies.Count;
- this.dependencyCount[package.Name] = count;
-
- // Iterate over dependencies and count theirs as well
- foreach (PackageName dependencyName in package.Dependencies)
- {
- // If this dependency is part of the set of skipped packages, skip it
- if (this.skipPackageIds.Contains(dependencyName.Id)) continue;
-
- // Resolve the dependency name to get a hold on the actual info
- PackageInfo dependency = this.ResolvePackage(dependencyName);
- if (dependency == null) continue;
-
- // Add secondary dependencies
- VisitPackage(dependency);
- count += this.dependencyCount[dependency.Name];
- }
-
- // Update the previous count value
- this.dependencyCount[package.Name] = count;
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageEventArgs.cs b/Source/Editor/DualityEditor/PackageManagement/PackageEventArgs.cs
deleted file mode 100644
index 1832ef1a6..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageEventArgs.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Duality.Editor.PackageManagement
-{
- public class PackageEventArgs : EventArgs
- {
- private PackageName packageName = PackageName.None;
-
- public PackageName PackageName
- {
- get { return this.packageName; }
- }
- public string Id
- {
- get { return this.packageName.Id; }
- }
- public Version Version
- {
- get { return this.packageName.Version; }
- }
-
- public PackageEventArgs(PackageName package)
- {
- this.packageName = package;
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageInfo.cs b/Source/Editor/DualityEditor/PackageManagement/PackageInfo.cs
deleted file mode 100644
index d599743ff..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageInfo.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Versioning;
-using System.Text;
-
-namespace Duality.Editor.PackageManagement
-{
- public class PackageInfo
- {
- private PackageName name = PackageName.None;
- private string title = null;
- private string summary = null;
- private string description = null;
- private string releaseNotes = null;
- private bool requireLicense = false;
- private Uri projectUrl = null;
- private Uri licenseUrl = null;
- private Uri iconUrl = null;
- private int downloadCount = 0;
- private DateTime publishDate = DateTime.MinValue;
- private List authors = new List();
- private List tags = new List();
- private List dependencies = new List();
-
-
- public bool IsDualityPackage
- {
- get { return this.tags.Contains(PackageManager.DualityTag); }
- }
- public bool IsSamplePackage
- {
- get { return this.tags.Contains(PackageManager.SampleTag); }
- }
- public bool IsEditorPackage
- {
- get { return this.tags.Contains(PackageManager.EditorTag); }
- }
- public bool IsCorePackage
- {
- get { return this.tags.Contains(PackageManager.CoreTag); }
- }
- public PackageName Name
- {
- get { return this.name; }
- }
- public string Id
- {
- get { return this.name.Id; }
- }
- public Version Version
- {
- get { return this.name.Version; }
- }
- public string Title
- {
- get { return this.title; }
- internal set { this.title = value; }
- }
- public string Summary
- {
- get { return this.summary; }
- internal set { this.summary = value; }
- }
- public string Description
- {
- get { return this.description; }
- internal set { this.description = value; }
- }
- public string ReleaseNotes
- {
- get { return this.releaseNotes; }
- internal set { this.releaseNotes = value; }
- }
- public bool RequireLicenseAcceptance
- {
- get { return this.requireLicense; }
- internal set { this.requireLicense = value; }
- }
- public Uri ProjectUrl
- {
- get { return this.projectUrl; }
- internal set { this.projectUrl = value; }
- }
- public Uri LicenseUrl
- {
- get { return this.licenseUrl; }
- internal set { this.licenseUrl = value; }
- }
- public Uri IconUrl
- {
- get { return this.iconUrl; }
- internal set { this.iconUrl = value; }
- }
- public int DownloadCount
- {
- get { return this.downloadCount; }
- internal set { this.downloadCount = value; }
- }
- public DateTime PublishDate
- {
- get { return this.publishDate; }
- internal set { this.publishDate = value; }
- }
- public IReadOnlyList Authors
- {
- get { return this.authors; }
- internal set
- {
- this.authors.Clear();
- if (value != null) this.authors.AddRange(value);
- }
- }
- public IReadOnlyList Tags
- {
- get { return this.tags; }
- internal set
- {
- this.tags.Clear();
- if (value != null) this.tags.AddRange(value);
- }
- }
- public IReadOnlyList Dependencies
- {
- get { return this.dependencies; }
- internal set
- {
- this.dependencies.Clear();
- if (value != null) this.dependencies.AddRange(value);
- }
- }
-
-
- internal PackageInfo(PackageName package)
- {
- this.name = package;
- }
- internal PackageInfo(NuGet.IPackage nuGetPackage)
- {
- // Retrieve package data
- this.name = new PackageName(nuGetPackage.Id, nuGetPackage.Version.Version);
- this.title = nuGetPackage.Title;
- this.summary = nuGetPackage.Summary;
- this.description = nuGetPackage.Description;
- this.releaseNotes = nuGetPackage.ReleaseNotes;
- this.requireLicense = nuGetPackage.RequireLicenseAcceptance;
- this.projectUrl = nuGetPackage.ProjectUrl;
- this.licenseUrl = nuGetPackage.LicenseUrl;
- this.iconUrl = nuGetPackage.IconUrl;
- this.downloadCount = nuGetPackage.DownloadCount;
- this.publishDate = nuGetPackage.Published.HasValue ? nuGetPackage.Published.Value.DateTime : DateTime.MinValue;
-
- if (nuGetPackage.Authors != null)
- this.authors.AddRange(nuGetPackage.Authors);
- if (nuGetPackage.Tags != null)
- this.tags.AddRange(nuGetPackage.Tags.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries));
-
- // Retrieve the matching set of dependencies.
- IEnumerable dependencySets = nuGetPackage.DependencySets;
- if (dependencySets != null)
- {
- List availableTargetFrameworks = dependencySets.Select(item => item.TargetFramework).ToList();
- FrameworkName matchingTargetFramework = PackageManager.SelectBestFrameworkMatch(availableTargetFrameworks);
-
- NuGet.PackageDependencySet matchingDependencySet = dependencySets.FirstOrDefault(item => item.TargetFramework == matchingTargetFramework);
- if (matchingDependencySet != null)
- {
- foreach (NuGet.PackageDependency dependency in matchingDependencySet.Dependencies)
- {
- if (dependency.VersionSpec != null && dependency.VersionSpec.MinVersion != null)
- this.dependencies.Add(new PackageName(dependency.Id, dependency.VersionSpec.MinVersion.Version));
- else
- this.dependencies.Add(new PackageName(dependency.Id, null));
- }
- }
- }
- }
-
- public override string ToString()
- {
- return string.Format("Package Info '{0}'", this.name);
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageLicenseAgreementEventArgs.cs b/Source/Editor/DualityEditor/PackageManagement/PackageLicenseAgreementEventArgs.cs
deleted file mode 100644
index aa6c16c40..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageLicenseAgreementEventArgs.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Duality.Editor.PackageManagement
-{
- public class PackageLicenseAgreementEventArgs : PackageEventArgs
- {
- private Uri licenseUrl = null;
- private bool requireLicenseAcceptance = false;
- private bool isLicenseAccepted = false;
-
- public Uri LicenseUrl
- {
- get { return this.licenseUrl; }
- }
- public bool RequireLicenseAcceptance
- {
- get { return this.requireLicenseAcceptance; }
- }
- public bool IsLicenseAccepted
- {
- get { return this.isLicenseAccepted; }
- }
-
- public PackageLicenseAgreementEventArgs(PackageName package, Uri licenseUrl, bool requireAccept) : base(package)
- {
- this.licenseUrl = licenseUrl;
- this.requireLicenseAcceptance = requireAccept;
- }
-
- ///
- /// Marks the license as accepted. Only ever call this when the end user has seen and explicitly accepted the license terms.
- ///
- public void AcceptLicense()
- {
- this.isLicenseAccepted = true;
- }
- }
-}
diff --git a/Source/Editor/DualityEditor/PackageManagement/PackageManager.cs b/Source/Editor/DualityEditor/PackageManagement/PackageManager.cs
deleted file mode 100644
index 96ce8b827..000000000
--- a/Source/Editor/DualityEditor/PackageManagement/PackageManager.cs
+++ /dev/null
@@ -1,1158 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.IO;
-using System.Windows.Forms;
-using System.Diagnostics;
-using System.Runtime.Versioning;
-
-using NuGet;
-
-using Duality.IO;
-using Duality.Editor.Properties;
-using Duality.Editor.Forms;
-using Duality.Editor.PackageManagement.Internal;
-
-namespace Duality.Editor.PackageManagement
-{
- ///
- /// Allows to install, uninstall, update and query local and remote Duality packages.
- ///
- public class PackageManager
- {
- public const string DualityTag = "Duality";
- public const string PluginTag = "Plugin";
- public const string SampleTag = "Sample";
- public const string CoreTag = "Core";
- public const string EditorTag = "Editor";
- public const string LauncherTag = "Launcher";
-
- ///
- /// A list of package names that are considered "core" Duality packages.
- /// If none of these show up anywhere in the deep dependency graph of a Duality package,
- /// it will be assumed that dependencies are simply not specified properly.
- ///
- private static readonly string[] DualityPackageNames = new string[]
- {
- "AdamsLair.Duality",
- "AdamsLair.Duality.Editor",
- "AdamsLair.Duality.Launcher"
- };
-
-
- private PackageSetup setup = new PackageSetup();
- private PackageManagerEnvironment env = null;
- private PackageCache cache = null;
-
- private Dictionary licenseAccepted = new Dictionary();
- private List dependencyWalkerPool = new List();
- private object dependencyWalkerLock = new object();
-
- private NuGetTargetedPackageManager manager = null;
- private NuGet.IPackageRepository repository = null;
- private PackageManagerLogger logger = null;
-
- public event EventHandler PackageLicenseAcceptRequired = null;
- public event EventHandler PackageInstalled = null;
- public event EventHandler PackageUninstalled = null;
-
-
- ///
- /// [GET] Whether the local and the actually installed packages
- /// are currently out of sync.
- ///
- public bool IsPackageSyncRequired
- {
- get
- {
- IPackage[] allInstalledPackages = this.manager
- .LocalRepository
- .GetPackages()
- .ToArray();
-
- // Do we have installed packages that are not registered, i.e. need to be uninstalled?
- foreach (IPackage package in allInstalledPackages)
- {
- if (!IsDualityPackage(package)) continue;
- if (this.setup.GetPackage(package.Id, package.Version.Version) == null)
- return true;
- }
-
- // Do we have registered packages that are not installed or don't have a specific version?
- // Also, are any of them not actually installed yet?
- foreach (LocalPackage package in this.setup.Packages)
- {
- if (package.Id == null) return true;
- if (package.Version == null) return true;
- if (!allInstalledPackages.Any(n =>
- n.Id == package.Id &&
- n.Version == new SemanticVersion(package.Version)))
- return true;
- }
-
- return false;
- }
- }
- ///
- /// [GET] The local file system environment in which this operates.
- ///
- public PackageManagerEnvironment LocalEnvironment
- {
- get { return this.env; }
- }
- ///
- /// [GET / SET] A data class representing the local package setup. Do not change these
- /// values manually, but use API instead.
- ///
- public PackageSetup LocalSetup
- {
- get { return this.setup; }
- }
-
-
- public PackageManager() : this(new PackageManagerEnvironment(null)) { }
- public PackageManager(string rootPath) : this(new PackageManagerEnvironment(rootPath)) { }
- public PackageManager(PackageManagerEnvironment workEnvironment) : this(workEnvironment, null) { }
- public PackageManager(PackageManagerEnvironment workEnvironment, PackageSetup packageSetup)
- {
- // If no external package setup is provided, load it from the config file
- if (packageSetup == null)
- {
- string configFilePath = workEnvironment.ConfigFilePath;
- if (!File.Exists(configFilePath))
- {
- packageSetup = new PackageSetup();
- packageSetup.Save(configFilePath);
- }
- else
- {
- try
- {
- packageSetup = PackageSetup.Load(configFilePath);
- }
- catch (Exception e)
- {
- Logs.Editor.WriteError(
- "Failed to load PackageManager config file '{0}': {1}",
- configFilePath,
- LogFormat.Exception(e));
- }
- }
- }
-
- // Assign work environment and package setup to work with
- this.env = workEnvironment;
- this.setup = packageSetup;
-
- // Create internal package management objects
- IPackageRepository[] repositories = this.setup.RepositoryUrls
- .Select(x => this.CreateRepository(x))
- .Where(x => x != null)
- .ToArray();
- this.repository = new AggregateRepository(repositories);
- this.manager = new NuGetTargetedPackageManager(
- new FrameworkName(".NETFramework", new Version(4, 5, 2)),
- this.repository,
- this.env.RepositoryPath);
- this.manager.PackageInstalling += this.manager_PackageInstalling;
- this.manager.PackageInstalled += this.manager_PackageInstalled;
- this.manager.PackageUninstalled += this.manager_PackageUninstalled;
- this.cache = new PackageCache(
- this.repository,
- repositories.OfType().Any() || repositories.OfType().Any());
-
- this.logger = new PackageManagerLogger();
- this.manager.Logger = this.logger;
-
- // Retrieve information about local packages
- this.RetrieveLocalPackageInfo();
- }
-
-
- ///
- /// Installs the specified package if it wasn't installed yet and synchronizes
- /// the registered Duality package version number with the one that is present
- /// in the local cache.
- ///
- ///
- public void VerifyPackage(LocalPackage localPackage)
- {
- Version oldPackageVersion = localPackage.Version;
-
- // Determine the exact version that will be installed
- PackageInfo packageInfo = this.GetPackage(localPackage.Name);
- if (packageInfo == null)
- {
- throw new Exception(string.Format(
- "Can't resolve version of package '{0}'. There seems to be no compatible version available.",
- localPackage.Id));
- }
-
- // Prepare a listener to determine whether we actually installed something
- EventHandler installListener = null;
- bool packageInstalled = false;
- installListener = delegate(object sender, PackageOperationEventArgs args)
- {
- if (args.Package.Id == localPackage.Id)
- {
- packageInstalled = true;
- }
- };
-
- // Install the package. Won't do anything if the package is already installed.
- this.manager.PackageInstalled += installListener;
- this.InstallPackage(localPackage.Name, true);
- this.manager.PackageInstalled -= installListener;
-
- // If we didn't install anything, that package was already in the local repo.
- // Update the local setup to match its specific version.
- if (!packageInstalled && oldPackageVersion == null)
- {
- // Add the explicit version to the PackageConfig file
- this.setup.Packages.RemoveAll(p => p.Id == packageInfo.Id);
- this.setup.Packages.Add(new LocalPackage(packageInfo));
- }
-
- // In case we've just retrieved an explicit version for the first time, save the config file.
- if (oldPackageVersion == null)
- {
- this.setup.Save(this.env.ConfigFilePath);
- }
- }
- ///
- /// Uninstalls all Duality packages that are installed, but not registered. This
- /// usually happens when a user manually edits the package config file and either
- /// removes package entries explicitly, or changes their version numbers.
- ///
- /// Due to the nature of this operation, it is possible that package dependencies
- /// are removed even though they might still be required by some installed packages.
- /// To make sure this state doesn't persist, it is recommended to perform a package
- /// verification step afterwards, which will re-install dependencies that might have
- /// been accidentally removed.
- ///
- public void UninstallNonRegisteredPackages()
- {
- IPackage[] allInstalledPackages = this.manager
- .LocalRepository
- .GetPackages()
- .ToArray();
- LocalPackage[] registeredPackages = this.setup.Packages
- .ToArray();
-
- foreach (IPackage package in allInstalledPackages)
- {
- // Skip non-Duality packages. They're not registered anyway and not expected to.
- if (!IsDualityPackage(package)) continue;
-
- // Skip packages that are registered in the exact same version
- bool isRegistered = registeredPackages.Any(p =>
- p.Id == package.Id &&
- p.Version == package.Version.Version);
- if (isRegistered) continue;
-
- // Uninstall all others with a force-uninstall. If we happen to remove
- // a package that is actually still needed, an additional package verification
- // step afterwards will fix this.
- this.UninstallPackage(
- new PackageName(package.Id, package.Version.Version),
- true);
- }
- }
-
- ///
- /// Installs the specified package.
- ///
- ///
- public void InstallPackage(PackageName packageName)
- {
- this.InstallPackage(packageName, false);
- }
- private void InstallPackage(PackageName packageName, bool skipLicense)
- {
- NuGet.IPackage installPackage = this.cache.GetNuGetPackage(packageName);
- if (installPackage == null)
- {
- throw new InvalidOperationException(string.Format(
- "Unable to install package '{0}', because no matching package could be found.",
- packageName));
- }
-
- // Check license terms
- if (!skipLicense && !this.CheckDeepLicenseAgreements(installPackage))
- {
- return;
- }
-
- Logs.Editor.Write("Installing package '{0}'...", packageName);
- Logs.Editor.PushIndent();
- try
- {
- // Request NuGet to install the package
- this.manager.InstallPackage(installPackage, false, false);
- }
- finally
- {
- Logs.Editor.PopIndent();
- }
- }
- ///
- /// Uninstalls the specified package.
- ///
- ///
- public void UninstallPackage(PackageName packageName)
- {
- this.UninstallPackage(packageName, false);
- }
- private void UninstallPackage(PackageName packageName, bool force)
- {
- Logs.Editor.Write("Uninstalling package '{0}'...", packageName);
- Logs.Editor.PushIndent();
- try
- {
- // Find the local package that we'll uninstall
- NuGet.IPackage uninstallPackage = this.manager.LocalRepository
- .FindPackagesById(packageName.Id)
- .FirstOrDefault(p => p.Version.Version == packageName.Version);
- if (uninstallPackage == null) return;
-
- // Find all dependencies of the package we want to uninstall
- PackageName uninstallPackageName = new PackageName(uninstallPackage.Id, uninstallPackage.Version.Version);
- PackageInfo uninstallPackageInfo = this.GetPackage(uninstallPackageName);
- List uninstallDependencies = new List();
- if (uninstallPackageInfo != null)
- {
- PackageDependencyWalker dependencyWalker = this.RentDependencyWalker();
- dependencyWalker.IgnorePackage("NETStandard.Library"); // Avoid dependency explosion, treat as opaque
- dependencyWalker.WalkGraph(uninstallPackageInfo);
- uninstallDependencies.AddRange(dependencyWalker.VisitedPackages);
- uninstallDependencies.RemoveAll(package => package.Id == uninstallPackageInfo.Id);
- this.ReturnDependencyWalker(ref dependencyWalker);
- }
-
- // Filter out all dependencies that are used by other Duality packages
- foreach (LocalPackage otherPackage in this.LocalSetup.Packages)
- {
- if (otherPackage.Id == uninstallPackage.Id) continue;
-
- PackageInfo otherPackageInfo = otherPackage.Info ?? this.GetPackage(otherPackage.Name);
- if (otherPackageInfo == null) continue;
-
- PackageDependencyWalker dependencyWalker = this.RentDependencyWalker();
- dependencyWalker.IgnorePackage(uninstallPackage.Id);
- dependencyWalker.IgnorePackage("NETStandard.Library"); // Avoid dependency explosion, treat as opaque
- dependencyWalker.WalkGraph(otherPackageInfo);
- foreach (PackageInfo dependency in dependencyWalker.VisitedPackages)
- {
- // Don't check versions, as dependencies are usually not resolved
- // with an exact version match.
- uninstallDependencies.RemoveAll(item => item.Id == dependency.Id);
- }
- this.ReturnDependencyWalker(ref dependencyWalker);
- }
-
- // Uninstall the package itself
- this.manager.UninstallPackage(
- uninstallPackage,
- force);
-
- // Uninstall its dependencies that are no longer used, in reverse dependency order
- // to avoid stumbling over dependencies that they might have between each other.
- this.OrderByDependencies(uninstallDependencies);
- uninstallDependencies.Reverse();
- foreach (PackageInfo package in uninstallDependencies)
- {
- List matchingNuGetPackages = this.manager.LocalRepository
- .FindPackagesById(package.Id)
- .ToList();
-
- foreach (NuGet.IPackage nugetPackage in matchingNuGetPackages)
- {
- this.manager.UninstallPackage(nugetPackage, force, false);
- }
- }
- }
- finally
- {
- Logs.Editor.PopIndent();
- }
- }
- ///
- /// Determines whether the specified package can be uninstalled. Returns
- /// false when other packages still depend on it.
- ///
- ///
- ///
- [DebuggerNonUserCode]
- public bool CanUninstallPackage(PackageName packageName)
- {
- NuGet.IPackage uninstallPackage = this.manager.LocalRepository
- .FindPackagesById(packageName.Id)
- .FirstOrDefault(p => p.Version.Version == packageName.Version);
- if (uninstallPackage == null) return false;
-
- bool allowed = true;
- this.manager.WhatIf = true;
- this.manager.Logger = null;
- try
- {
- this.manager.UninstallPackage(
- uninstallPackage,
- false,
- true);
- }
- catch (Exception)
- {
- allowed = false;
- }
- this.manager.Logger = this.logger;
- this.manager.WhatIf = false;
- return allowed;
- }
- ///
- /// Updates the specified package to the latest available version.
- ///
- ///
- public void UpdatePackage(PackageName packageName)
- {
- if (!this.manager.LocalRepository.FindPackagesById(packageName.Id).Any())
- {
- throw new InvalidOperationException(string.Format(
- "Can't update package '{0}', because it is not installed.",
- packageName));
- }
-
- NuGet.IPackage latestPackage = this.cache.GetNuGetPackage(packageName.VersionInvariant);
- if (latestPackage == null)
- {
- throw new InvalidOperationException(string.Format(
- "Unable to update package '{0}', because no matching package could be found.",
- packageName));
- }
-
- // Check license terms
- if (!this.CheckDeepLicenseAgreements(latestPackage))
- {
- return;
- }
-
- Logs.Editor.Write("Updating package '{0}'...", packageName);
- Logs.Editor.PushIndent();
- try
- {
- this.manager.UpdatePackage(latestPackage, true, false);
- }
- finally
- {
- Logs.Editor.PopIndent();
- }
- }
-
- ///
- /// Starts applying any pending package updates and returns true when it is required
- /// to shut down the current editor instance in order to complete them.
- ///
- ///
- /// Whether the current editor instance should be restarted after the update has been applied.
- ///
- ///
- public bool ApplyUpdate(bool restartEditor = true)
- {
- if (!File.Exists(this.env.UpdateFilePath)) return false;
-
- Logs.Editor.Write("Applying package update...");
- Logs.Editor.PushIndent();
- try
- {
- // Manually perform update operations on the updater itself
- try
- {
- Logs.Editor.Write("Preparing updater...");
- PackageUpdateSchedule schedule = this.PrepareUpdateSchedule();
- schedule.ApplyUpdaterChanges(this.env.UpdaterExecFilePath);
- this.SaveUpdateSchedule(schedule);
- }
- catch (Exception e)
- {
- Logs.Editor.WriteError(
- "Can't update '{0}', because an error occurred: {1}",
- this.env.UpdaterExecFilePath,
- LogFormat.Exception(e));
- return false;
- }
-
- // Run the updater application
- Logs.Editor.Write("Running updater...");
- Process.Start(this.env.UpdaterExecFilePath, string.Format("\"{0}\" \"{1}\" \"{2}\"",
- this.env.UpdateFilePath,
- restartEditor ? typeof(DualityEditorApp).Assembly.Location : "",
- restartEditor ? Environment.CurrentDirectory : ""));
- }
- finally
- {
- Logs.Editor.PopIndent();
- }
-
- return true;
- }
-
- ///
- /// Clears the internal cache for remote repository packages, allowing
- /// to retrieve updated information about the latest available packages
- /// and package versions.
- ///
- public void ClearCache()
- {
- this.cache.Clear();
- }
- ///
- /// Enumerates the latest versions of all available Duality packages from
- /// the remote repository.
- ///
- ///
- public IEnumerable GetLatestDualityPackages()
- {
- return this.cache.GetLatestDualityPackages();
- }
- ///
- /// Retrieves detailed information about the specified package from the
- /// local or remote repository.
- ///
- ///
- ///
- public PackageInfo GetPackage(PackageName name)
- {
- return this.cache.GetPackage(name);
- }
-
- ///
- /// Enumerates all target packages for local installs that could be updated.
- ///
- ///
- public IEnumerable GetUpdatablePackages()
- {
- List updatePackages = new List();
- LocalPackage[] targetPackages = this.setup.Packages.ToArray();
- for (int i = 0; i < targetPackages.Length; i++)
- {
- PackageInfo update = this.GetPackage(targetPackages[i].Name.VersionInvariant);
- if (update.Version <= targetPackages[i].Version) continue;
- updatePackages.Add(update);
- }
- return updatePackages;
- }
- ///
- /// Determines compatibility between the current package installs and the specified target package.
- /// Works for both updates and new installs.
- ///
- ///
- ///
- public PackageCompatibility GetCompatibilityLevel(PackageInfo target)
- {
- // If the target package is already installed in the matching version, assume compatibility
- if (this.setup.GetPackage(target.Id, target.Version) != null)
- return PackageCompatibility.Definite;
-
- // Determine all packages that might be updated or installed
- PackageDependencyWalker dependencyWalker = this.RentDependencyWalker();
- dependencyWalker.IgnorePackage("NETStandard.Library"); // Avoid dependency explosion, doesn't matter for Duality compatibility anyway
- dependencyWalker.WalkGraph(target);
- List touchedPackages = dependencyWalker.VisitedPackages.ToList();
- this.ReturnDependencyWalker(ref dependencyWalker);
-
- // Verify properly specified dependencies for Duality packages
- if (target.IsDualityPackage)
- {
- // If none of the targets deep dependencies is anyhow related to Duality, assume they're incomplete and potentially incompatible
- bool anyDualityDependency = false;
- foreach (PackageInfo package in touchedPackages)
- {
- if (DualityPackageNames.Any(name => string.Equals(name, package.Id)))
- {
- anyDualityDependency = true;
- break;
- }
- }
- if (!anyDualityDependency)
- return PackageCompatibility.None;
- }
-
- // Generate a mapping to already installed packages
- Dictionary localMap = new Dictionary();
- foreach (PackageInfo package in touchedPackages)
- {
- LocalPackage local = this.setup.GetPackage(package.Id);
- if (local == null) continue;
-
- localMap.Add(package, local);
- }
-
- // Determine the maximum version difference between target and installed
- PackageCompatibility compatibility = PackageCompatibility.Definite;
- foreach (var pair in localMap)
- {
- Version targetVersion = pair.Key.Version;
- Version localVersion = pair.Value.Version;
-
- if (localVersion.Major != targetVersion.Major)
- compatibility = compatibility.Combine(PackageCompatibility.Unlikely);
- else if (localVersion.Minor != targetVersion.Minor)
- compatibility = compatibility.Combine(PackageCompatibility.Likely);
- }
-
- return compatibility;
- }
-
- ///
- /// Sorts the specified list of packages according to their dependencies, guaranteeing that no package
- /// is listed before its dependencies. Use this to determine the order of batch updates and installs
- /// to prevent conflicts from having different versions of the same packages.
- ///
- public void OrderByDependencies(IList packages)
- {
- if (packages.Count < 2) return;
-
- // Determine the number of deep dependencies for each package
- PackageDependencyWalker dependencyWalker = this.RentDependencyWalker();
- dependencyWalker.IgnorePackage("NETStandard.Library"); // Avoid dependency explosion, treat as opaque
- dependencyWalker.WalkGraph(packages);
-
- // Sort packages according to their deep dependency counts
- packages.StableSort((a, b) =>
- {
- int countA = (a == null) ? 0 : dependencyWalker.GetDependencyCount(a.Name);
- int countB = (b == null) ? 0 : dependencyWalker.GetDependencyCount(b.Name);
- return countA - countB;
- });
-
- this.ReturnDependencyWalker(ref dependencyWalker);
- }
- ///
- /// Sorts the specified list of packages according to their dependencies, guaranteeing that no package
- /// is listed before its dependencies. Use this to determine the order of batch updates and installs
- /// to prevent conflicts from having different versions of the same packages.
- ///
- public void OrderByDependencies(IList packages)
- {
- // Map each list entry to its PackageInfo
- PackageInfo[] localInfo = packages
- .Select(p => p.Info ?? this.GetPackage(p.Name))
- .NotNull()
- .ToArray();
-
- // Sort the mapped list
- this.OrderByDependencies(localInfo);
-
- // Now sort the original list to match the sorted mapped list
- LocalPackage[] originalPackages = packages.ToArray();
- int nonSortedCount = 0;
- for (int i = 0; i < originalPackages.Length; i++)
- {
- LocalPackage localPackage = originalPackages[i];
-
- int newIndex = localInfo.IndexOfFirst(p => p.Id == localPackage.Id && p.Version == localPackage.Version);
- if (newIndex == -1)
- newIndex = localInfo.IndexOfFirst(p => p.Id == localPackage.Id);
-
- // Unresolved packages are always last in the sorted list
- if (newIndex == -1)
- {
- newIndex = packages.Count - nonSortedCount - 1;
- nonSortedCount++;
- }
-
- packages[newIndex] = localPackage;
- }
- }
-
- private void RetrieveLocalPackageInfo()
- {
- foreach (LocalPackage setupItem in this.setup.Packages)
- {
- if (setupItem.Version == null) continue;
- if (string.IsNullOrEmpty(setupItem.Id)) continue;
-
- foreach (NuGet.IPackage localPackage in this.manager.LocalRepository.FindPackagesById(setupItem.Id))
- {
- if (localPackage.Version.Version != setupItem.Version) continue;
-
- setupItem.Info = new PackageInfo(localPackage);
- break;
- }
- }
- }
- private IPackageRepository CreateRepository(string repositoryUrl)
- {
- if (string.IsNullOrWhiteSpace(repositoryUrl))
- return null;
-
- try
- {
- string schemeName = null;
- if (repositoryUrl.Contains(Uri.SchemeDelimiter))
- {
- schemeName = repositoryUrl.Split(new[] { Uri.SchemeDelimiter }, StringSplitOptions.RemoveEmptyEntries)[0];
- }
-
- if (schemeName != null && Uri.CheckSchemeName(schemeName))
- repositoryUrl = new Uri(repositoryUrl).AbsoluteUri;
- else
- repositoryUrl = Path.GetFullPath(Path.Combine(this.env.RootPath, repositoryUrl));
- }
- catch (UriFormatException)
- {
- Logs.Editor.WriteError("NuGet repository URI '{0}' has an incorrect format and will be skipped.", repositoryUrl);
- return null;
- }
-
- return PackageRepositoryFactory.Default.CreateRepository(repositoryUrl);
- }
-
- ///
- /// Rents a pooled instance, or allocates a new one when required.
- /// Not returning a rented instance will harm efficiency, but not cause a leak.
- ///
- ///
- private PackageDependencyWalker RentDependencyWalker()
- {
- lock (this.dependencyWalkerLock)
- {
- if (this.dependencyWalkerPool.Count == 0)
- {
- return new PackageDependencyWalker(this.GetPackage);
- }
- else
- {
- int lastWalkerIndex = this.dependencyWalkerPool.Count - 1;
- PackageDependencyWalker walker = this.dependencyWalkerPool[lastWalkerIndex];
- this.dependencyWalkerPool.RemoveAt(lastWalkerIndex);
- return walker;
- }
- }
- }
- ///
- /// Returns a previously rented instance, and nullifies the
- /// provided reference to it afterwards to avoid further use.
- ///
- ///
- private void ReturnDependencyWalker(ref PackageDependencyWalker walker)
- {
- walker.Clear();
- lock (this.dependencyWalkerLock)
- {
- this.dependencyWalkerPool.Add(walker);
- walker = null;
- }
- }
-
- private bool CheckDeepLicenseAgreements(NuGet.IPackage package)
- {
- PackageDependencyWalker dependencyWalker = this.RentDependencyWalker();
- dependencyWalker.IgnorePackage("NETStandard.Library"); // Avoid dependency explosion, doesn't require license acceptance anyway
- dependencyWalker.WalkGraph(new PackageName(package.Id, package.Version.Version));
-
- List packageGraph = dependencyWalker.VisitedPackages.ToList();
- List installedPackages = this.manager.LocalRepository.GetPackages().ToList();
-
- this.ReturnDependencyWalker(ref dependencyWalker);
-
- foreach (PackageInfo visitedPackage in packageGraph)
- {
- // Skip the ones that are already installed
- if (installedPackages.Any(installed =>
- installed.Id == visitedPackage.Id &&
- installed.Version.Version >= visitedPackage.Version))
- continue;
-
- if (!this.CheckLicenseAgreement(visitedPackage))
- return false;
- }
-
- return true;
- }
- private bool CheckLicenseAgreement(PackageInfo package)
- {
- if (package.RequireLicenseAcceptance)
- {
- // On the very first install, do not display additional license agreement dialogs
- // because all the packages being installed are the default ones.
- if (this.setup.IsFirstInstall)
- return true;
-
- bool agreed;
- if (!this.licenseAccepted.TryGetValue(package.Name, out agreed) || !agreed)
- {
- PackageLicenseAgreementEventArgs args = new PackageLicenseAgreementEventArgs(
- package.Name,
- package.LicenseUrl,
- package.RequireLicenseAcceptance);
-
- if (this.PackageLicenseAcceptRequired != null)
- this.PackageLicenseAcceptRequired(this, args);
- else
- DisplayDefaultLicenseAcceptDialog(args);
-
- agreed = args.IsLicenseAccepted;
- this.licenseAccepted[package.Name] = agreed;
- }
-
- if (!agreed)
- {
- return false;
- }
- }
-
- return true;
- }
-
- private PackageUpdateSchedule PrepareUpdateSchedule()
- {
- // Load existing update schedule in order to extend it
- string updateFilePath = this.env.UpdateFilePath;
- PackageUpdateSchedule updateSchedule = null;
- if (File.Exists(updateFilePath))
- {
- try
- {
- updateSchedule = PackageUpdateSchedule.Load(updateFilePath);
- }
- catch (Exception exception)
- {
- updateSchedule = null;
- Logs.Editor.WriteError("Error parsing existing package update schedule '{0}': {1}",
- Path.GetFileName(updateFilePath),
- LogFormat.Exception(exception));
- }
- }
-
- // If none existed yet, create a fresh update schedule
- if (updateSchedule == null)
- updateSchedule = new PackageUpdateSchedule();
-
- return updateSchedule;
- }
- private void SaveUpdateSchedule(PackageUpdateSchedule schedule)
- {
- string updateFilePath = this.env.UpdateFilePath;
- schedule.Save(updateFilePath);
- }
-
- private Dictionary CreateFileMapping(NuGet.IPackage package)
- {
- Dictionary fileMapping = new Dictionary();
-
- bool isDualityPackage = IsDualityPackage(package);
- bool isPluginPackage = isDualityPackage && package.Tags.Contains(PluginTag);
-
- string folderFriendlyPackageName = package.Id;
- string binaryBaseDir = this.env.TargetPluginPath;
- string contentBaseDir = this.env.TargetDataPath;
- string sourceBaseDir = Path.Combine(this.env.TargetSourcePath, folderFriendlyPackageName);
- if (!isPluginPackage || !isDualityPackage)
- {
- binaryBaseDir = this.env.RootPath;
- contentBaseDir = this.env.RootPath;
- }
-
- List applicableFiles = new List();
- try
- {
- // Separate package files in to framework-dependent lib files and framework-independent
- // non-lib files. Those include content and source files, but also any other folder structure
- // that isn't specifically a lib binary.
- List files = package.GetFiles().ToList();
- List libFiles = new List();
- List nonLibFiles = new List();
- foreach (IPackageFile file in files)
- {
- string path = file.Path.Replace('/', '\\');
- bool isLibFile = path.StartsWith("lib\\");
- if (isLibFile)
- libFiles.Add(file);
- else
- nonLibFiles.Add(file);
- }
- List applicableLibFiles = new List();
-
- // Determine which frameworks are available in this package.
- // Note that due to the NuGet version we're using, .NETStandard target frameworks
- // are unknown and will be returned as "Unsupported, Version 0.0".
- List availableFrameworks = libFiles.Select(f => f.TargetFramework).Distinct().ToList();
-
- // Select the closest matching framework this package has and use all of its files,
- // and none of the others
- FrameworkName matchingFramework = SelectBestFrameworkMatch(availableFrameworks);
- applicableLibFiles.AddRange(libFiles.Where(f => f.TargetFramework == matchingFramework));
-
- // Check if we have files without a target framework that do not have an equivalent
- // in the files from the selected match. To support legacy packages, we'll use them
- // as a fallback. Packages that do this are for example AdamsLair.OpenTK, AdamsLair.WinForms
- // and others which have a set of explicit root files and a subset of implicit framework files.
- if (matchingFramework != null)
- {
- List rootFiles = libFiles.Where(f => f.TargetFramework == null).ToList();
- foreach (IPackageFile file in rootFiles)
- {
- string fileName = Path.GetFileName(file.Path);
- bool hasOverride = applicableLibFiles.Any(f => Path.GetFileName(f.Path) == fileName);
- if (!hasOverride)
- {
- applicableLibFiles.Add(file);
- }
- }
- }
-
- // Non-lib files (content, source) are treated differently and used as-is, since they are
- // not dependent on any target framework and just carried over.
- applicableFiles.AddRange(applicableLibFiles);
- applicableFiles.AddRange(nonLibFiles);
- }
- catch (DirectoryNotFoundException)
- {
- // We'll run into this exception when uninstalling a package without any files.
- return fileMapping;
- }
-
- foreach (IPackageFile f in applicableFiles)
- {
- // Determine where the file needs to go
- string targetPath = f.EffectivePath;
- string baseDir = f.Path;
- while (baseDir.Contains(Path.DirectorySeparatorChar) || baseDir.Contains(Path.AltDirectorySeparatorChar))
- {
- baseDir = Path.GetDirectoryName(baseDir);
- }
- if (string.Equals(baseDir, "lib", StringComparison.InvariantCultureIgnoreCase))
- targetPath = Path.Combine(binaryBaseDir, targetPath);
- else if (string.Equals(baseDir, "content", StringComparison.InvariantCultureIgnoreCase))
- targetPath = Path.Combine(contentBaseDir, targetPath);
- else if (string.Equals(baseDir, "source", StringComparison.InvariantCultureIgnoreCase))
- {
- if (targetPath.StartsWith("source") && targetPath.Length > "source".Length)
- targetPath = targetPath.Remove(0, "source".Length + 1);
- targetPath = Path.Combine(sourceBaseDir, targetPath);
- }
- else
- continue;
-
- // Add a file mapping entry linking target path to package path
- if (fileMapping.ContainsKey(targetPath)) continue;
- fileMapping[targetPath] = f.Path;
- }
-
- return fileMapping;
- }
-
- private void OnPackageInstalled(PackageEventArgs args)
- {
- if (this.PackageInstalled != null)
- this.PackageInstalled(this, args);
- }
- private void OnPackageUninstalled(PackageEventArgs args)
- {
- if (this.PackageUninstalled != null)
- this.PackageUninstalled(this, args);
- }
-
- private void manager_PackageUninstalled(object sender, PackageOperationEventArgs e)
- {
- Logs.Editor.Write("Integrating uninstall of package '{0} {1}'...", e.Package.Id, e.Package.Version);
-
- // Determine all files that are referenced by a package, and the ones referenced by this one
- IEnumerable localFiles = this.CreateFileMapping(e.Package).Select(p => p.Key);
-
- // Schedule files for removal
- PackageUpdateSchedule updateSchedule = this.PrepareUpdateSchedule();
- foreach (string packageFile in localFiles)
- {
- // Don't remove any file that is still referenced by a local package
- bool stillInUse = false;
- foreach (NuGet.IPackage localNugetPackage in this.manager.LocalRepository.GetPackages())
- {
- Dictionary localMapping = this.CreateFileMapping(localNugetPackage);
- if (localMapping.Any(p => PathHelper.Equals(p.Key, packageFile)))
- {
- stillInUse = true;
- break;
- }
- }
- if (stillInUse) continue;
-
- // Append the scheduled operation to the updater config file.
- updateSchedule.AppendDeleteFile(packageFile);
- if (Path.GetExtension(packageFile) == ".csproj")
- {
- updateSchedule.AppendSeparateProject(
- packageFile,
- this.env.TargetSolutionPathRelative);
- }
- }
- this.SaveUpdateSchedule(updateSchedule);
-
- // Update local package configuration file
- PackageName packageName = new PackageName(e.Package.Id, e.Package.Version.Version);
- this.setup.Packages.RemoveAll(p => p.Name == packageName);
- this.setup.Save(this.env.ConfigFilePath);
-
- this.OnPackageUninstalled(new PackageEventArgs(new PackageName(e.Package.Id, e.Package.Version.Version)));
- }
- private void manager_PackageInstalling(object sender, PackageOperationEventArgs e)
- {
- // Duality does, by design, not support multiple versions of the same package to be
- // installed at the same time. Enforce this constraint by double-checking every install
- // for already installed versions of the same package.
- List previousPackages = this.manager.LocalRepository
- .FindPackagesById(e.Package.Id)
- .ToList();
- foreach (NuGet.IPackage package in previousPackages)
- {
- // Installing a newer version? Make sure to uninstall any older versions of it.
- if (package.Version < e.Package.Version)
- {
- this.manager.UninstallPackage(
- package,
- true,
- false);
- }
- // Installing an older version? Cancel the operation. We'll prefer the newer
- // version and if a downgrade is really desired, it should be done by explicitly
- // uninstalling the newer package first.
- else if (package.Version > e.Package.Version)
- {
- e.Cancel = true;
- }
- }
- }
- private void manager_PackageInstalled(object sender, PackageOperationEventArgs e)
- {
- Logs.Editor.Write("Integrating install of package '{0} {1}'...", e.Package.Id, e.Package.Version);
-
- // Update package entries from local config
- PackageInfo packageInfo = this.GetPackage(new PackageName(e.Package.Id, e.Package.Version.Version));
- if (packageInfo.IsDualityPackage)
- {
- this.setup.Packages.RemoveAll(p => p.Id == e.Package.Id);
- this.setup.Packages.Add(new LocalPackage(packageInfo));
- this.setup.Save(this.env.ConfigFilePath);
- }
-
- // Schedule files for updating / copying
- PackageUpdateSchedule updateSchedule = this.PrepareUpdateSchedule();
- Dictionary fileMapping = this.CreateFileMapping(e.Package);
- foreach (var pair in fileMapping)
- {
- // Don't overwrite files from a newer version of this package with their old one (think of dependencies)
- bool isOldVersion = false;
- foreach (NuGet.IPackage localNugetPackage in this.manager.LocalRepository.GetPackages())
- {
- if (localNugetPackage.Id != e.Package.Id) continue;
-
- Dictionary localMapping = this.CreateFileMapping(localNugetPackage);
- if (localMapping.Any(p => string.Equals(p.Value, pair.Value, StringComparison.InvariantCultureIgnoreCase)))
- {
- if (localNugetPackage.Version > e.Package.Version)
- {
- isOldVersion = true;
- break;
- }
- }
- }
- if (isOldVersion) continue;
-
- // Append the scheduled operation to the updater config file.
- updateSchedule.AppendCopyFile(Path.Combine(e.InstallPath, pair.Value), pair.Key);
- if (Path.GetExtension(pair.Key) == ".csproj")
- {
- updateSchedule.AppendIntegrateProject(
- pair.Key,
- this.env.TargetSolutionPathRelative,
- this.env.TargetPluginPathRelative);
- }
- }
- this.SaveUpdateSchedule(updateSchedule);
-
- this.OnPackageInstalled(new PackageEventArgs(new PackageName(e.Package.Id, e.Package.Version.Version)));
- }
-
- private static bool IsDualityPackage(NuGet.IPackage package)
- {
- return
- package.Tags != null &&
- package.Tags.Contains(DualityTag);
- }
- private static void DisplayDefaultLicenseAcceptDialog(PackageLicenseAgreementEventArgs args)
- {
- LicenseAcceptDialog licenseDialog = new LicenseAcceptDialog
- {
- DescriptionText = string.Format(GeneralRes.LicenseAcceptDialog_PackageDesc, args.PackageName),
- LicenseUrl = args.LicenseUrl
- };
-
- Form invokeForm = DualityEditorApp.MainForm ?? Application.OpenForms.OfType