Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Open README in Visual Studio on first install / Update Clojurescript runtime #151

Merged
merged 4 commits into from

1 participant

Frank Hale
Frank Hale

This opens up the README file in Visual Studio instead of notepad on first install of vsClojure. This also updates the Clojurescript runtime to the most current code as of 2 March.

frankhale added some commits
Frank Hale frankhale Added current build of Clojurescript
removed 0.0-2173 which was actually not 2173 but slightly newer from a
recent pull of the repo. I don't think anyone is using these yet so it
should be okay to keep current.
ea5da34
Frank Hale frankhale Open README in Visual Studio instead of notepad 222970b
Frank Hale frankhale Still tweaking the README open code 90600ff
Frank Hale frankhale Move UnzipRuntimes function call
Make sure UnzipRuntimes is called after the runtime path has been set.
66c61b1
Frank Hale

I didn't necessarily want the Clojurescript runtime update to be rolled into this pull request. It would have been much nicer for it to be in it's own pull request.

Frank Hale frankhale merged commit a26538a into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2014
  1. Frank Hale

    Added current build of Clojurescript

    frankhale authored
    removed 0.0-2173 which was actually not 2173 but slightly newer from a
    recent pull of the repo. I don't think anyone is using these yet so it
    should be okay to keep current.
  2. Frank Hale
  3. Frank Hale
  4. Frank Hale

    Move UnzipRuntimes function call

    frankhale authored
    Make sure UnzipRuntimes is called after the runtime path has been set.
This page is out of date. Refresh to see the latest.
28 ClojureExtension.Deployment/ClojurePackage.cs
View
@@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -79,8 +80,7 @@ protected override void Initialize()
try
{
- EnableSettingOfRuntimePathForNewClojureProjects();
- UnzipRuntimes();
+
RegisterProjectFactory(new ClojureProjectFactory(this));
RegisterCommandMenuService();
HideAllClojureEditorMenuCommands();
@@ -94,6 +94,9 @@ protected override void Initialize()
{
try
{
+ EnableSettingOfRuntimePathForNewClojureProjectsOnFirstInstall();
+ UnzipRuntimes();
+
HippieCompletionSource.Initialize(this);
_metadata = new Metadata(); // SlowLoadingProcess for the 1st time.
}
@@ -141,18 +144,23 @@ private void RegisterCommandMenuService()
commandRegistry.RegisterPriorityCommandTarget(0, _thirdPartyEditorCommands, out cookie);
}
- private void EnableSettingOfRuntimePathForNewClojureProjects()
+ private void EnableSettingOfRuntimePathForNewClojureProjectsOnFirstInstall()
{
- string deployDirectory = GetDirectoryOfDeployedContents();
- string runtimePath = string.Format(@"{0}\Runtimes", deployDirectory);
-
- bool firstInstall = string.Compare(EnvironmentVariables.VsClojureRuntimesDir, runtimePath, true) != 0;
- if (firstInstall)
+ var deployDirectory = GetDirectoryOfDeployedContents();
+ var runtimePath = string.Format(@"{0}\Runtimes", deployDirectory);
+ var firstInstall = string.Compare(EnvironmentVariables.VsClojureRuntimesDir, runtimePath, true, CultureInfo.CurrentCulture) != 0;
+
+ if (firstInstall)
{
EnvironmentVariables.VsClojureRuntimesDir = runtimePath;
- string pathToReadme = string.Format(@"{0}\ReadMe.txt", deployDirectory);
- Process.Start("notepad.exe", pathToReadme);
+ var pathToReadme = string.Format(@"{0}\ReadMe.txt", deployDirectory);
+
+ // Opening a file within Visual Studio
+ // Reference: http://stackoverflow.com/a/10724025/170217
+ var dte = (DTE2) GetService(typeof(DTE));
+ dte.MainWindow.Activate(); // This may not be needed, need to test without!
+ dte.ItemOperations.OpenFile(pathToReadme, EnvDTE.Constants.vsViewKindTextView);
}
}
BIN  ...on.Deployment/Runtimes/Clojurescript-0.0-2173.zip → ...ent/Runtimes/Clojurescript-Current-2March2014.zip
View
Binary file not shown
Something went wrong with that request. Please try again.