diff --git a/.gitignore b/.gitignore
index ba0b7c5..ba38e25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,5 @@ obj
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
+*/build/PlayScript.MSBuild.Tasks.dll
+
diff --git a/PlayScript.Addin.sln b/PlayScript.Addin.sln
index 6fb2a82..520c815 100644
--- a/PlayScript.Addin.sln
+++ b/PlayScript.Addin.sln
@@ -33,6 +33,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "external\ceci
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Decompiler", "..\monodevelop\main\contrib\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj", "{984CC812-9470-4A13-AFF9-CC44068D666C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlayScript.MSBuild.Tasks", "PlayScript.MSBuild.Tasks\PlayScript.MSBuild.Tasks.csproj", "{BA27E73E-B4F4-48B6-937E-E48D59ADD839}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlayScript.MSBuild.Tasks.Test", "PlayScript.MSBuild.Tasks.Test\PlayScript.MSBuild.Tasks.Test.csproj", "{5A10410E-0971-40D6-8135-EC5F77B8630A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -67,6 +71,10 @@ Global
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5A10410E-0971-40D6-8135-EC5F77B8630A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5A10410E-0971-40D6-8135-EC5F77B8630A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5A10410E-0971-40D6-8135-EC5F77B8630A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5A10410E-0971-40D6-8135-EC5F77B8630A}.Release|Any CPU.Build.0 = Release|Any CPU
{6FBE63EB-4D01-4BED-BC3E-F4AB31AB7D6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FBE63EB-4D01-4BED-BC3E-F4AB31AB7D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FBE63EB-4D01-4BED-BC3E-F4AB31AB7D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -79,6 +87,10 @@ Global
{B1AF7070-8E25-4117-A441-14684219F4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1AF7070-8E25-4117-A441-14684219F4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1AF7070-8E25-4117-A441-14684219F4FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BA27E73E-B4F4-48B6-937E-E48D59ADD839}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BA27E73E-B4F4-48B6-937E-E48D59ADD839}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BA27E73E-B4F4-48B6-937E-E48D59ADD839}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BA27E73E-B4F4-48B6-937E-E48D59ADD839}.Release|Any CPU.Build.0 = Release|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/PlayScript.Addin/Makefile b/PlayScript.Addin/Makefile
new file mode 100644
index 0000000..a48a241
--- /dev/null
+++ b/PlayScript.Addin/Makefile
@@ -0,0 +1,16 @@
+CONFIG?=Debug
+
+all:
+ xbuild /p:Configuration=${CONFIG} ${ARGS}
+
+clean:
+ xbuild /t:Clean ${ARGS}
+
+# Clean does not always really clean, so clean hard ;-)
+cleanhard:
+ find . -name "obj" -print0 | xargs -0 -n 1 rm -Rf
+ find . -name "bin" -print0 | xargs -0 -n 1 rm -Rf
+
+install:
+ xbuild /p:InstallAddin=True /p:Configuration=${CONFIG} ${ARGS}
+
diff --git a/PlayScript.Addin/MonoDevelop.PlayScript/Consts.cs b/PlayScript.Addin/MonoDevelop.PlayScript/Consts.cs
new file mode 100644
index 0000000..a11b35f
--- /dev/null
+++ b/PlayScript.Addin/MonoDevelop.PlayScript/Consts.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace PlayScript
+{
+ public static class Addin
+ {
+ public const string Version = MonoDevelop.BuildInfo.Version + ".1";
+ }
+}
diff --git a/PlayScript.Addin/PlayScript.Addin.csproj b/PlayScript.Addin/PlayScript.Addin.csproj
index e170f85..2200703 100644
--- a/PlayScript.Addin/PlayScript.Addin.csproj
+++ b/PlayScript.Addin/PlayScript.Addin.csproj
@@ -210,6 +210,7 @@
+
@@ -221,8 +222,6 @@
-
-
diff --git a/PlayScript.Addin/Properties/Manifest.addin.xml b/PlayScript.Addin/Properties/Manifest.addin.xml
index 81b357b..7bfcd76 100644
--- a/PlayScript.Addin/Properties/Manifest.addin.xml
+++ b/PlayScript.Addin/Properties/Manifest.addin.xml
@@ -53,10 +53,10 @@
-
+
@@ -188,12 +188,12 @@
macShortcut = "Meta|I" />
-->
+
+
diff --git a/PlayScript.Addin/Properties/PlayScript.AddinInfo.cs b/PlayScript.Addin/Properties/PlayScript.AddinInfo.cs
index 88faf82..176b4c2 100644
--- a/PlayScript.Addin/Properties/PlayScript.AddinInfo.cs
+++ b/PlayScript.Addin/Properties/PlayScript.AddinInfo.cs
@@ -1,11 +1,12 @@
using System;
using Mono.Addins;
using Mono.Addins.Description;
+using PlayScript;
[assembly:Addin (
"PlayScript",
Namespace = "MonoDevelop",
- Version = MonoDevelop.BuildInfo.Version,
+ Version = PlayScript.Addin.Version,
Flags = AddinFlags.None,
Category = "Language bindings",
Url = "https://github.com/PlayScriptRedux/PlayScript.Addin"
diff --git a/PlayScript.Addin/templates/AsConsoleProject.xpt.xml b/PlayScript.Addin/templates/AsConsoleProject.xpt.xml
index e05b49f..29ae3ef 100644
--- a/PlayScript.Addin/templates/AsConsoleProject.xpt.xml
+++ b/PlayScript.Addin/templates/AsConsoleProject.xpt.xml
@@ -23,9 +23,11 @@
-
-
+
+
+
+
-
-
+
+
+
+
\ No newline at end of file
diff --git a/PlayScript.Addin/templates/AsLibrary.xpt.xml b/PlayScript.Addin/templates/AsLibrary.xpt.xml
index ebe0f14..a660d13 100644
--- a/PlayScript.Addin/templates/AsLibrary.xpt.xml
+++ b/PlayScript.Addin/templates/AsLibrary.xpt.xml
@@ -23,9 +23,11 @@
-
-
+
+
+
+
diff --git a/PlayScript.Addin/templates/PsConsoleProject.xpt.xml b/PlayScript.Addin/templates/PsConsoleProject.xpt.xml
index 0234acf..5f6a348 100644
--- a/PlayScript.Addin/templates/PsConsoleProject.xpt.xml
+++ b/PlayScript.Addin/templates/PsConsoleProject.xpt.xml
@@ -23,9 +23,11 @@
-
-
+
+
+
+
-
-
+
+
+
+
\ No newline at end of file
diff --git a/PlayScript.Addin/templates/PsLibrary.xpt.xml b/PlayScript.Addin/templates/PsLibrary.xpt.xml
index 9abe8c9..231cf4f 100644
--- a/PlayScript.Addin/templates/PsLibrary.xpt.xml
+++ b/PlayScript.Addin/templates/PsLibrary.xpt.xml
@@ -24,9 +24,11 @@
-
-
+
+
+
+
diff --git a/PlayScript.MSBuild.Targets.Nuget/Makefile b/PlayScript.MSBuild.Targets.Nuget/Makefile
index 402edf9..9878a45 100644
--- a/PlayScript.MSBuild.Targets.Nuget/Makefile
+++ b/PlayScript.MSBuild.Targets.Nuget/Makefile
@@ -1,10 +1,18 @@
CONFIG?=Debug
-all:
- nuget pack
+all: task pack content
+
+pack:
+ nuget pack
+
+task:
+ cd ../PlayScript.MSBuild.Tasks; xbuild PlayScript.MSBuild.Tasks.csproj /property:Configuration=Release
+ cp ../PlayScript.MSBuild.Tasks/bin/Release/PlayScript.MSBuild.Tasks.dll build
clean:
- rm PlayScript.MSBuild.*.nupkg
+ -rm PlayScript.MSBuild.*.nupkg
+ -cd ../PlayScript.MSBuild.Tasks; xbuild PlayScript.MSBuild.Tasks.csproj /target:Clean /property:Configuration=Release
+ -cd ../PlayScript.MSBuild.Tasks; xbuild PlayScript.MSBuild.Tasks.csproj /target:Clean /property:Configuration=Debug
publish: clean all
nuget push PlayScript.MSBuild.*.nupkg $(MyGetApiKey) -source https://www.myget.org/F/playscript/api/v2
diff --git a/PlayScript.MSBuild.Targets.Nuget/PlayScript.MSBuild.nuspec b/PlayScript.MSBuild.Targets.Nuget/PlayScript.MSBuild.nuspec
index 0570108..9fa62e0 100644
--- a/PlayScript.MSBuild.Targets.Nuget/PlayScript.MSBuild.nuspec
+++ b/PlayScript.MSBuild.Targets.Nuget/PlayScript.MSBuild.nuspec
@@ -2,7 +2,7 @@
PlayScript.MSBuild
- 5.10.2.2
+ 5.10.2.3
SushiHangover\RobertN
SushiHangover\RobertN
https://github.com/PlayScriptRedux/PlayScript.Addin
@@ -20,6 +20,7 @@
PlayScript.MSBuild release notes:
+ 5.10.2.3 Update : Add MsBuild properties debug target : /target=viewenv ; Add custom MSbuild Task to remove hardcoded paths to psc
5.10.2.2 Fix : Include build file (failing due to x-plat pathing)
5.10.2.1 Fix : Fix License and icon
5.10.2.0 New : Initial Public Release
@@ -31,6 +32,8 @@
+
+
diff --git a/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Debug.Targets b/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Debug.Targets
new file mode 100644
index 0000000..208fddb
--- /dev/null
+++ b/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Debug.Targets
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Targets b/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Targets
index a744881..2b6a88e 100644
--- a/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Targets
+++ b/PlayScript.MSBuild.Targets.Nuget/build/PlayScript.MSBuild.Targets
@@ -1,181 +1,37 @@
+
+
.cs
PlayScript
-
- false
-
-
-
-
-
-
-
- $(MSBuildAllProjects);$(MSBuildToolsPath)\PlayScript.Targets
-
-
-
- true
-
-
-
-
-
-
-
-
-
- <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
- false
-
-
-
- <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll
-
-
- <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')">
- false
-
-
-
- <_ExplicitReference Include="$(_ExplicitMSCorlibPath)" Condition="Exists('$(_ExplicitMSCorlibPath)')">
- false
-
-
-
-
-
-
- /Users/sushi/Library/Application Support/XamarinStudio-5.0/LocalInstall/Addins/MonoDevelop.PlayScript.5.10.2/MonoDevelop.PlayScript.SupportPackages
- psc
- $(PsBuildBinPath)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+ Value="$(AssemblySearchPaths);$(PlayScriptSDKPath)">
-
+
+ $(PlayScriptSDKPath)
+ $(PlayScriptCompiler)
+
-
-
-
- $(ResolveAssemblyReferencesDependsOn);_AddCorlibReference
-
-
-
-
-// <autogenerated />
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute("$(TargetFrameworkMoniker)", FrameworkDisplayName = "$(TargetFrameworkMonikerDisplayName)")]
-
-
-
+
+
+
diff --git a/PlayScript.MSBuild.Tasks.Test/PlayScript.MSBuild.Tasks.Test.csproj b/PlayScript.MSBuild.Tasks.Test/PlayScript.MSBuild.Tasks.Test.csproj
new file mode 100644
index 0000000..87a855c
--- /dev/null
+++ b/PlayScript.MSBuild.Tasks.Test/PlayScript.MSBuild.Tasks.Test.csproj
@@ -0,0 +1,52 @@
+
+
+
+ Debug
+ AnyCPU
+ {5A10410E-0971-40D6-8135-EC5F77B8630A}
+ Library
+ PlayScript.MSBuild.Tasks.Test
+ PlayScript.MSBuild.Tasks.Test
+ v4.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ false
+
+
+ full
+ true
+ bin\Release
+ prompt
+ 4
+ false
+
+
+
+
+ ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {BA27E73E-B4F4-48B6-937E-E48D59ADD839}
+ PlayScript.MSBuild.Tasks
+
+
+
\ No newline at end of file
diff --git a/PlayScript.MSBuild.Tasks.Test/Test.cs b/PlayScript.MSBuild.Tasks.Test/Test.cs
new file mode 100644
index 0000000..6be3c9a
--- /dev/null
+++ b/PlayScript.MSBuild.Tasks.Test/Test.cs
@@ -0,0 +1,51 @@
+using NUnit.Framework;
+using System;
+using System.IO;
+using System.Diagnostics;
+
+namespace PlayScript.MSBuild.Tasks.Test
+{
+ [TestFixture ()]
+ public class Test
+ {
+ String _file;
+ public Test() {
+ if (Environment.OSVersion.Platform == PlatformID.Unix) {
+ _file = "ls";
+ } else {
+ _file = "powershell.exe";
+ }
+ }
+
+ [Test ()]
+ public void ExistsOnPath ()
+ {
+ var found = PlayScriptBinPathTask.ExistsOnPath (_file);
+ Assert.IsTrue (found);
+ }
+
+ [Test ()]
+ public void GetPath ()
+ {
+ var path = PlayScriptBinPathTask.GetPath (_file);
+ Assert.IsTrue (Directory.Exists(path));
+ }
+
+ [Test ()]
+ public void GetFullPath ()
+ {
+ var path = PlayScriptBinPathTask.GetFullPath (_file);
+ Assert.IsTrue (File.Exists(path));
+ }
+
+ [Test ()]
+ public void CompilerExists ()
+ {
+ var playTask = new PlayScriptBinPathTask ();
+ Assert.IsNotNull (playTask);
+ var found = playTask.Execute ();
+ Assert.IsTrue (found);
+ }
+ }
+}
+
diff --git a/PlayScript.MSBuild.Tasks.Test/packages.config b/PlayScript.MSBuild.Tasks.Test/packages.config
new file mode 100644
index 0000000..c714ef3
--- /dev/null
+++ b/PlayScript.MSBuild.Tasks.Test/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/PlayScript.MSBuild.Tasks/PlayScript.MSBuild.Tasks.csproj b/PlayScript.MSBuild.Tasks/PlayScript.MSBuild.Tasks.csproj
new file mode 100644
index 0000000..a56f1f5
--- /dev/null
+++ b/PlayScript.MSBuild.Tasks/PlayScript.MSBuild.Tasks.csproj
@@ -0,0 +1,41 @@
+
+
+
+ Debug
+ AnyCPU
+ {BA27E73E-B4F4-48B6-937E-E48D59ADD839}
+ Library
+ PlayScript.MSBuild.Tasks
+ PlayScript.MSBuild.Tasks
+ v4.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ false
+
+
+ full
+ true
+ bin\Release
+ prompt
+ 4
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PlayScript.MSBuild.Tasks/PlayScriptBinPathTask.cs b/PlayScript.MSBuild.Tasks/PlayScriptBinPathTask.cs
new file mode 100644
index 0000000..fed655e
--- /dev/null
+++ b/PlayScript.MSBuild.Tasks/PlayScriptBinPathTask.cs
@@ -0,0 +1,100 @@
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace PlayScript.MSBuild.Tasks
+{
+ public class PlayScriptBinPathTask : Task
+ {
+ [DllImport ("libc")]
+ private static extern int system (string exec);
+
+ String _PlayScriptCompiler = "NoSet";
+ String _PlayScriptSDKPath = "NoSet";
+
+ public PlayScriptBinPathTask ()
+ {
+ }
+
+ public override bool Execute() {
+ Console.WriteLine ("PlayScriptBinPathTask Execute");
+ string psc_name = "psc";
+ if (Environment.OSVersion.Platform != PlatformID.Unix) {
+ psc_name += ".exe";
+ }
+ _PlayScriptCompiler = psc_name;
+ Console.WriteLine ("PlayScriptBinPathTask {0}", _PlayScriptCompiler);
+
+ // Does psc exist on the path?
+ string psc = GetFullPath(psc_name);
+ if (psc != null) {
+ _PlayScriptSDKPath = psc;
+ return true;
+ }
+ // Does psc exist within the XS Addin dir?
+ var home = Environment.GetEnvironmentVariable("HOME");
+ // TODO: this needs to be done via CONST and x-plat
+ var psc_addin = Path.Combine (home, "Library/Application Support/XamarinStudio-5.0/LocalInstall/Addins");
+ psc_addin = Path.Combine(psc_addin, "MonoDevelop.PlayScript.5.10.2");
+ psc_addin = Path.Combine (psc_addin, "MonoDevelop.PlayScript.SupportPackages");
+ var psc_full_path = Path.Combine (psc_addin, psc_name);
+ if (File.Exists(psc_full_path)) {
+ // TODO: Fixme...Hack file perms on script as Addin installer does not preserve them...
+// system (String.Format ("chmod u+x \"{0}\"", psc));
+ _PlayScriptSDKPath = psc_addin;
+ Console.WriteLine ("PlayScriptBinPathTask {0}", PlayScriptSDKPath);
+ return true;
+ }
+ _PlayScriptSDKPath = "";
+ return false;
+ }
+
+ [Output]
+ public String PlayScriptCompiler
+ {
+ get {
+ return _PlayScriptCompiler;
+ }
+ }
+
+ [Output]
+ public String PlayScriptSDKPath
+ {
+ get {
+ return _PlayScriptSDKPath;
+ }
+ }
+
+ public static bool ExistsOnPath(string fileName)
+ {
+ if (GetFullPath(fileName) != null)
+ return true;
+ return false;
+ }
+
+ public static string GetPath(string fileName)
+ {
+ return Path.GetDirectoryName(GetFullPath(fileName));
+
+ }
+ public static string GetFullPath(string fileName)
+ {
+ if (File.Exists(fileName))
+ return Path.GetFullPath(fileName);
+
+ var values = Environment.GetEnvironmentVariable("PATH");
+ foreach (var path in values.Split(Path.PathSeparator))
+ {
+ var fullPath = Path.Combine(path, fileName);
+ if (File.Exists(fullPath))
+ return fullPath;
+ }
+ return null;
+ }
+ }
+}
+
diff --git a/PlayScript.MSBuild.Tasks/Properties/AssemblyInfo.cs b/PlayScript.MSBuild.Tasks/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6afea23
--- /dev/null
+++ b/PlayScript.MSBuild.Tasks/Properties/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle ("PlayScript.MSBuild.Tasks")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("SushiHangover")]
+[assembly: AssemblyProduct ("")]
+[assembly: AssemblyCopyright ("SushiHangover/RobertN - 2015")]
+[assembly: AssemblyTrademark ("SushiHangover")]
+[assembly: AssemblyCulture ("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion ("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+