I have added a -net4 option to the installer that works on both .NET+Windows and Mono+Unix-family:
- Code: Select all
cd CobraWorkspace
svn up
cd Source
# Windows:
> bin\install-from-workspace -net4
# Unix-family:
$ sudo ./bin/install-from-workspace -net4
On my own Windows 7 32-bit test box, the .NET 4 C# compiler was present, but apparently not all the necessary .NET 4 components were available to compile with. I found this very strange. If you get compilation errors, make sure that you have previously installed .NET 4 or the .NET 4 SDK or a Visual Studio 2010 product (the Express editions are free). After simply installing .NET 4 and nothing else, installation of Cobra was successful for me.
If you can think of a way that the installer can gracefully handle this situation, patches are welcome.
I also enhanced "cobra -about" and "cobra -version" to include the version of the run-time VM and to indicate if it was running on .NET or Mono like so:
- Code: Select all
cd ..
$ cobra -about
The Cobra Programming Language 0.8.0 post-release on Mono CLR v4.0.30319
> cobra -about
The Cobra Programming Language 0.8.0 post-release on .NET CLR v4.0.30319
You'll want to cd out of the CobraWorkspace\Source directory first to examine the installed version. If you don't install with -net4, you'll see a 2.0.x version number even when using ".NET 3.5" DLLs for example. This is because the virtual machine / run-time in .NET 3.0 and .NET 3.5 was not updated. It's a normal thing.
I also improved the installer to output some tips and urls if it errors out. And to print the Cobra url (http://cobra-language.com/) on success to encourage people back to the site.
You can review the refinements via the Trac timeline if you're interested in more details.
After these changes, I welcome testing and feedback. See How to Install from Source if you don't already have a Cobra workspace to build from.